import { SupervisorIntentValue } from "../contracts/supervisor/intent-entry.type.mjs"; import { OrchestratorContract } from "../contracts/orchestrator/orchestrator.contract.mjs"; import { OrchestratorConfig } from "../contracts/orchestrator/orchestrator-config.type.mjs"; //#region ../ai/src/orchestrator/orchestrator.d.ts /** * `ai.orchestrator(config)` — construct an {@link OrchestratorContract}: * a session-state manager wrapped around a supervisor (orchestrator.md * §1, §15). Validates the config at author time (throws * {@link OrchestratorConfigError} on bad shape), resolves the intent * entries, computes a stable structural signature for drift detection * (§10.1), wires the three-tier event emitter, and returns a handle that * runs one durable session turn per `execute` / `stream` call, resumes * an interrupted `iterate: true` turn via `resume`, and exposes typed * built-in commands plus an `asTool` wrapper. * * The "what runs" fields (`intents`, `route` / `router`, `evaluate`, * `state`, `output`, `initialAgent`, `maxIterations`) are the * supervisor's surface spread directly — the lifecycle builds the * supervisor lazily per turn and delegates to it (§3 Phase 5). Users * never see the supervisor object. * * @example * const supportBot = ai.orchestrator({ * name: "refund-support", * intents: { classify, lookup, process, compose }, * route: (ctx) => (ctx.iteration === 0 ? "classify" : END), * iterate: true, * checkpointStore: ai.checkpoint.pg({ client: pg }), * snapshotStore: ai.snapshot.pg({ client: pg }), * }); * * const result = await supportBot.execute(message, { sessionId, history }); */ declare function orchestrator = Record>(config: OrchestratorConfig): OrchestratorContract; //#endregion export { orchestrator }; //# sourceMappingURL=orchestrator.d.mts.map