/** * What the model sends the `subagent` tool: one schema, and the type is what it * says. * * pi is told the schema and validates the call against it, so a value it does * not name - a lifetime spelt differently, a scope nobody defined - is refused * before the tool body runs, and the body never has to check what pi already * did. Every field is optional: the mode is inferred from the others. */ import { Type, type Static } from "typebox"; /** The combinators the tool runs, by the name the model gives them, and `flow`, a flow a file describes. */ export declare const MODES: readonly ["single", "chain", "parallel", "loop", "route", "orchestrate", "reduce", "flow"]; /** One of {@link MODES}. */ export type Mode = (typeof MODES)[number]; /** * The arguments the model sends, as pi is told them and as this file reads * them: one schema, and the type is what it says. Every field optional, the * mode inferred from the others. */ export declare const Schema: Type.TObject<{ mode: Type.TOptional>; agent: Type.TOptional; flow: Type.TOptional; task: Type.TOptional; tasks: Type.TOptional>; steps: Type.TOptional>; lifetime: Type.TOptional>; model: Type.TOptional; concurrency: Type.TOptional; until: Type.TOptional; maxIterations: Type.TOptional; maxTasks: Type.TOptional; maxDepth: Type.TOptional; candidates: Type.TOptional>; timeoutMs: Type.TOptional; openInHerdr: Type.TOptional; scope: Type.TOptional>; reduceWith: Type.TOptional; herdrAll: Type.TOptional; export: Type.TOptional; }>; /** {@link Schema}, as a type. Nothing is declared twice. */ export type Params = Static; /** The fields `flow` mode reads beside `flow` itself, in the order the schema lists them. */ export declare const FLOW_FIELDS: ("task" | "model" | "lifetime" | "concurrency" | "openInHerdr" | "agent" | "flow" | "until" | "timeoutMs" | "tasks" | "steps" | "maxDepth" | "maxTasks" | "reduceWith" | "scope" | "herdrAll" | "maxIterations" | "candidates" | "export")[]; /** * Infers the mode from what was actually provided. `candidates` alone is a * route, the cheaper reading; beside a field only orchestrate reads, it is an * orchestration, since a route would drop that field without a word. */ export declare function inferMode(params: Params): Mode; /** * Who a call in `mode` runs, from the field that mode reads: the flow, the * steps of a chain or a loop, or the agent, and the candidates when a router * or a planner is not named. Another field the model filled in beside them * is not what runs, so the row never names it. */ export declare function runsWho(params: Params, mode: Mode): string | undefined; //# sourceMappingURL=params.d.ts.map