import type { AgentEvent } from "../../agent/events.ts"; import type { AskInput } from "../../agent/runtime.ts"; import type { AskContext, Stage } from "../types.ts"; /** * The last stage. It can answer anything the others can, and everything they * cannot. * * Every stage before this one is an optimisation. This one is the product. */ /** The part of an agent this stage needs. Typed structurally so no import binds it. */ export type AgentLike = { stream(input: AskInput): AsyncGenerator; }; export declare function agentStage(agent: AgentLike): Stage; /** * The agent stage as a live event stream. * * The stage above collects the whole answer before returning, which is right for * a pipeline that has to decide whether a stage answered at all. A route that * streams to a browser wants the events as they happen, so it calls this instead * once the earlier stages have missed. */ export declare function streamAgent(agent: AgentLike, ctx: AskContext): AsyncGenerator; //# sourceMappingURL=agent.d.ts.map