/**
 * OODAAgentImpl — sequential while+sleep cycle loop with phase persistence,
 * guards, HITL gate, resource limits, and replay-safe context propagation.
 *
 * Implements all 10 anti-patterns enforced by-design (see `./types.ts`).
 *
 * @public
 */
import type { CycleEvent, CycleStatus, OODAAgent, OODAAgentConfig } from "./types.js";
/**
 * Prepare an `insertStep` payload for emission on `telemetry.step.metadata`.
 *
 * Returns `undefined` when the payload is empty or absent — telemetry.step
 * keeps backward compat (metadata field omitted from the wire event).
 */
export declare function buildTelemetryMetadata(payload: Record<string, unknown> | undefined): Record<string, unknown> | undefined;
/**
 * OODAAgentImpl — concrete implementation. Prefer `createOODAAgent` factory.
 */
export declare class OODAAgentImpl<TConfig = unknown, TObs = unknown, TOrient = unknown, TDecision = unknown, TAction = unknown, TFeedback = unknown> implements OODAAgent {
    private readonly _config;
    private readonly _limits;
    private _running;
    private _cyclesCompleted;
    private _lastCycleAt?;
    private _activeCycle?;
    constructor(config: OODAAgentConfig<TConfig, TObs, TOrient, TDecision, TAction, TFeedback>);
    start(): Promise<void>;
    stop(): Promise<void>;
    triggerCycle(opts: {
        dryRun: boolean;
        initialContext?: Record<string, unknown>;
    }): Promise<{
        runId: string;
        status: CycleStatus;
    }>;
    streamCycle(opts: {
        dryRun: boolean;
        initialContext?: Record<string, unknown>;
    }): AsyncGenerator<CycleEvent>;
    getStatus(): {
        running: boolean;
        lastCycleAt?: string;
        nextCycleAt?: string;
        cyclesCompleted: number;
    };
    private runCycle;
    /**
     * Execute one full cycle, pushing `CycleEvent` to `sink` as they occur.
     * Used by `streamCycle()` to decouple event emission from async generator
     * mechanics. Single-pass — each phase runs exactly once.
     */
    private _runCycleWithSink;
    /**
     * Run a single OODA phase with OTel span instrumentation. Used by runCycle().
     */
    private _runOodaPhase;
    /**
     * Fire-soft onStep callback (sprint-727:stream-capture-onstep).
     *
     * Best-effort extraction of token/cost/model metadata from the phase output
     * shape when it looks like a standard LLM-completion result (i.e. it carries
     * `inputTokens` / `outputTokens` / `costUsd` / `model` keys). Phases that do
     * NOT return such a shape simply omit those fields — the consumer (TUI etc.)
     * must treat them as optional.
     *
     * Errors thrown by the user-provided `onStep` are caught and logged. The
     * cycle is NEVER aborted on a callback failure.
     */
    private _fireOnStep;
    private _checkSessionGuards;
    private _checkRiskGuards;
}
//# sourceMappingURL=agent.d.ts.map