/** * How a member reaches the board. * * One tool, `board`, built per member and closing over two things it therefore * never has to be told: which board, and who is calling. An agent whose `tools:` * does not name `board` is not given it by pi, so what a member can say stays * readable in its own file, the same way delegation does. * * **The member's id is in the closure, not in the parameters.** That is the * whole reason this file exists rather than the board being handed round: a * `from` a model can write is a `from` a model can borrow, and a medium where * anybody can post as anybody is not a record of anything. * * The tool announces nothing itself. The board and the claims it is handed do * that, whoever acts on them - see `announced.ts` - so what a member did through * this tool and what the workflow did for it land in the same record. * * When the caller gives it a {@link Claims}, the tool also grants and returns * things. That is a different act from posting a `claim`: a post announces into * a medium that was empty when the member looked, and a take is decided. Both * are offered, because a member still has to say what it is doing, and only one * of them settles who does it. */ import type { Board } from "./board.ts"; import type { Claims } from "./claims.ts"; import { type Reader } from "./reader.ts"; import { type ToolDefinition } from "../session.ts"; /** The name an agent writes in its `tools:` to be allowed on the board. */ export declare const BOARD_TOOL = "board"; /** Which board, on whose behalf. */ export type BoardToolOptions = { /** The one everybody is posting to. Shared; the cursor into it is not. */ board: Board; /** * The member holding this tool. * * Stamped on everything it posts. It is a parameter of the *builder*, never * of the tool: whoever builds the tool knows who is holding it, and a model * cannot reach a closure. */ from: string; /** * What there is to take, when anything is. * * Absent, the tool offers `post` and `read` only, and says so in its * description: a member is never shown an action that would be refused * whatever it asked for. */ claims?: Claims; /** * Where this member has read to. Pass the one the workflow hands out from, * so a `read` never hands back what the top of the turn already did. Left * out, the tool keeps its own. */ reader?: Reader; }; /** Whether an agent's definition asks to be allowed on the board. */ export declare function declaresBoard(tools: readonly string[] | undefined): boolean; /** * Builds the `board` tool for one member. * * Pass it through `SpawnOptions.customTools` in its function form: the member's * id is minted by `spawn`, so the tool cannot exist before the subagent does. * * Both halves refuse in prose the model can act on rather than failing silently. * A member told "the board is full" can spend its remaining turn on the work; a * member whose call vanished tries again. */ export declare function boardTool(options: BoardToolOptions): ToolDefinition; //# sourceMappingURL=tool.d.ts.map