import { PlannerConfig } from "../contracts/planner/planner-config.type.mjs"; import { PlannerContract } from "../contracts/planner/planner.contract.mjs"; //#region ../ai/src/planner/planner.d.ts /** * `ai.planner(config)` — construct a {@link PlannerContract}. * * Validates the config at author time (throws {@link PlannerFailedError} * on a bad shape), builds (or adopts) the plan-generation agent, computes * a stable structural signature, and returns an instance satisfying * `ExecutableContract` so the planner composes into supervisors, * orchestrators, and outer agents through the same uniform surface. * * At `execute(goal)` the planner asks its LLM for an ordered plan over * the registered `capabilities`, then executes that plan step-by-step * through each capability's own `execute()` — reusing the existing * executable machinery rather than forking it — and returns the unified * `{ data, report, usage, error }` envelope with `report.type === * "planner"`. * * @example * const research = ai.planner({ * name: "research-assistant", * model: ai.openai.model({ name: "gpt-4o" }), * capabilities: [ * { name: "search", description: "Search the web", executable: searchAgent }, * { name: "write", description: "Draft a summary", executable: writerAgent }, * ], * maxSteps: 6, * }); * * const { data, report } = await research.execute("Compare React vs Vue in 2026"); */ declare function planner(config: PlannerConfig): PlannerContract; //#endregion export { planner }; //# sourceMappingURL=planner.d.mts.map