/** * A `SessionPort` that answers from a script: what a dry run's subagents run * on in place of a model. * * Narrower than the test fake, on purpose: no delay, no token, no steer. * What it keeps is what the runner reads, so a scripted answer takes the * path a real one would. A typed value goes through the real `submit` tool * and a verdict through the real `verdict` tool, a provider failure is a turn * that comes back with an error, a timeout expires the attempt's deadline and * waits for the signal it fires, a schema failure is a turn that calls * nothing, and `no-tool` is the failure of a turn that called no tool its * agent had to call. */ import type { CreateSessionOptions, SessionPort } from "../../session.ts"; /** What one scripted turn does: say a text, call one of its tools with `args`, or fail as `fail` says. */ export type ScriptedTurn = { readonly say: string; } | { readonly call: string; readonly args: unknown; } | { readonly fail: "provider" | "timeout" | "schema" | "no-tool"; }; /** A scripted session, told before each turn what that turn does and how to expire the deadline it runs under. */ export type ScriptedSession = SessionPort & { stage(turn: ScriptedTurn, expire: () => void): void; }; /** A session for a subagent spawned with `options`, answering whatever it is staged with. */ export declare function scriptedSession(options: CreateSessionOptions): ScriptedSession; //# sourceMappingURL=scripted.d.ts.map