/**
 * Agent — unified runtime with strategy plug-ins.
 *
 * Replaces the legacy split between {@link OODAAgentImpl} (full ceremony,
 * OODA-only) and the inline preste loops (`standalone-react-loop.ts`,
 * `standalone-plan-loop.ts`). One class, four strategies :
 *
 *   - `ooda`     — Observe → Orient → Decide → Act → (Reflect?) → Feedback
 *   - `react`    — Thought → Action → Observe (text protocol + JSON fallback)
 *   - `plan`     — Plan → Execute → Synthesize
 *   - `one-shot` — Single LLM call, no tool loop
 *
 * Hooks (skillCapture, onStep, attestation) run uniformly across all
 * strategies. Strategies remain pure : they invoke `ctx.tools` + `ctx.llmFn`
 * and return an {@link AgentCycleResult}, nothing else.
 *
 * @public @experimental @since 2.0.0
 */
import type { LoggerPort } from "../ports/logger.js";
import type { LLMProviderPort } from "../ports/llm-provider.js";
import type { ToolRegistry } from "../tools/types.js";
import type { AgentCycleResult, AgentHooks, AgentStrategy, AgentStrategyName, StrategyLLMCompletionFn } from "../strategies/types.js";
import { type OODACycleInvoker } from "../strategies/ooda.js";
import type { SkillCaptureOptions } from "./ooda/skill-capture.js";
import type { OutcomeRecord } from "./ooda/types.js";
/**
 * Configuration for the unified Agent.
 *
 * @public @experimental @since 2.0.0
 */
export interface AgentConfig {
    /** Agent identifier — used for telemetry, skill capture, etc. */
    readonly agentId: string;
    /** Agent version string. Defaults to "0.0.0". */
    readonly agentVersion?: string;
    /** Strategy to use. Default: `"ooda"`. */
    readonly strategy?: AgentStrategyName | AgentStrategy;
    /** System prompt baseline. Strategies may augment it. */
    readonly systemPrompt: string;
    /** Tool registry. */
    readonly tools: ToolRegistry;
    /** LLM port (used by ooda strategy when wired). */
    readonly llm?: LLMProviderPort;
    /**
     * Lower-level completion function consumed by react / plan / one-shot.
     * MUST be provided when using any non-ooda strategy.
     */
    readonly llmFn?: StrategyLLMCompletionFn;
    /** Maximum steps per cycle. Default: 10. */
    readonly maxSteps?: number;
    /** Optional logger. Falls back to noop. */
    readonly logger?: LoggerPort;
    /** Optional allowlist of tool names to expose to the strategy. */
    readonly allowedTools?: readonly string[];
    /** Hook bundle. */
    readonly hooks?: AgentHooks;
    /** Abort signal forwarded to the strategy. */
    readonly signal?: AbortSignal;
    /**
     * For the OODA strategy : an externally-built invoker that wraps an
     * existing {@link OODAAgentImpl}. Required when `strategy === "ooda"` and
     * the consumer needs the full OODA lifecycle.
     */
    readonly oodaInvoker?: OODACycleInvoker;
    /**
     * Optional skill capture (Hermes Procedural Learning Loop). Fires after
     * a successful cycle when `outcome.quality >= minQuality`.
     */
    readonly skillCapture?: SkillCaptureOptions;
    /**
     * Outcome mapping — strategies don't compute this themselves. Receives
     * the cycle result and produces an optional outcome record used by
     * skillCapture + downstream telemetry.
     */
    readonly outcomeMapping?: (result: AgentCycleResult) => OutcomeRecord | null;
}
/**
 * Result returned by {@link Agent.run}.
 *
 * @public @experimental @since 2.0.0
 */
export interface AgentRunResult {
    readonly runId: string;
    readonly agentId: string;
    readonly strategy: AgentStrategyName;
    readonly finalMessage: string;
    readonly stopReason: AgentCycleResult["stopReason"];
    readonly stepCount: number;
    readonly tokensUsed: {
        in: number;
        out: number;
    };
    readonly durationMs: number;
    readonly outcome?: OutcomeRecord;
    readonly stepsTrace?: readonly unknown[];
    readonly model?: string;
    readonly provider?: string;
    /** Whether a skill was captured during this run (if skillCapture enabled). */
    readonly skillCaptured?: boolean;
}
/**
 * The unified Agent — single runtime, four strategies, all hooks.
 *
 * @public @experimental @since 2.0.0
 */
export declare class Agent {
    private readonly cfg;
    private readonly strategy;
    private readonly strategyName;
    private readonly logger;
    constructor(cfg: AgentConfig);
    /**
     * Execute one full cycle of the configured strategy and return the result.
     *
     * Fires hooks uniformly across strategies :
     *   - `onStep` is invoked by each strategy on every meaningful phase.
     *   - skillCapture fires after a successful cycle when configured + quality met.
     */
    run(task: string): Promise<AgentRunResult>;
    /** Read-only accessor — the strategy this Agent was constructed with. */
    get strategyKind(): AgentStrategyName;
}
/**
 * Factory for the unified Agent.
 *
 * @public @experimental @since 2.0.0
 */
export declare function createAgent(cfg: AgentConfig): Agent;
//# sourceMappingURL=agent.d.ts.map