/** * What an `agent` visit is asked: the whole turn, composed by our code. * * The node's section, then each read under `##
`, then, * when the answer is a tool call, a closing part saying so: `submit` for a * typed node, and for a `verdict:` node the record's terms, which list the * ledger's open obligations by id. Every visit gets * the whole of it, with or without `memory:`, so a resumed run's fresh * subagent is asked what the first one was. The language line comes last, and * `Subagent.ask` adds it to every turn, this one included. */ import type { Ledger } from "../../review/index.ts"; import type { CheckedAgentNode, FlowError } from "../checked.ts"; import type { Held } from "./frames.ts"; import type { Values } from "./values.ts"; /** The whole turn of `node`, reading `values`, closed by `closing`. */ export declare function composeTurn(node: CheckedAgentNode, values: Values, closing: readonly string[]): string; /** * What a retry on the same subagent is asked: the failure, and the closing * part again. The turn itself is already in its history. */ export declare function retryTurn(error: FlowError, closing: readonly string[]): string; /** The closing part of `node`'s turn on `held`, a `verdict:` node's writing to `ledger`. */ export declare function closingPart(node: CheckedAgentNode, held: Held, ledger: Ledger | undefined): string[]; //# sourceMappingURL=turn.d.ts.map