/**
 * OODA strategy — Observe → Orient → Decide → Act → (Reflect) → Feedback.
 *
 * Adapter that maps the unified {@link AgentStrategy} contract onto the
 * existing {@link OODAAgentImpl}. The legacy OODA agent is feature-complete
 * (skill capture, telemetry, HITL gates, attestation, hot-reload config,
 * resource limits, run-step persistence) ; we re-use it verbatim rather than
 * re-port 1500 LOC.
 *
 * For users who want the full OODA lifecycle (sequential `while+sleep` loop,
 * `start`/`stop`/`streamCycle`), keep using `createOODAAgent` directly. This
 * strategy exposes the one-shot semantics needed by the unified `Agent.run`
 * surface : a single cycle, single user task.
 *
 * @public @experimental @since 2.0.0
 */
class OODAStrategy {
    invoker;
    name = "ooda";
    constructor(invoker) {
        this.invoker = invoker;
    }
    async run(ctx) {
        return this.invoker.invoke(ctx);
    }
}
/**
 * Factory for the OODA strategy. The Agent class injects an `OODACycleInvoker`
 * which wraps the existing `OODAAgentImpl`.
 *
 * @public @experimental @since 2.0.0
 */
export function createOODAStrategy(invoker) {
    return new OODAStrategy(invoker);
}
/**
 * Sentinel invoker used when the Agent class has not been configured with
 * full OODA phases. Returns an error result without attempting any LLM call.
 *
 * @public
 */
export function createUnconfiguredOODAInvoker() {
    return {
        invoke: async (_ctx) => ({
            finalMessage: "OODA strategy requires an OODAAgentConfig with full phase definitions. " +
                "Use createOODAAgent directly or pass `oodaPhases` to createAgent.",
            stopReason: "error",
            stepCount: 0,
            tokensUsed: { in: 0, out: 0 },
        }),
    };
}
//# sourceMappingURL=ooda.js.map