/** * #327: a role's position in a chain, as its tool calls and its org_send mail * carry it. * * - The chain (`chain_id`, `hop`) comes from the latest message delivered to * the role with a `[trace chn_… hop=N]` line (cross-org.ts's recordTrace), * else a fresh chain at hop 0 minted once for the role. * - `turn` numbers the role's turns: 1 for its first, +1 each time a turn ends * (the runner's `result`). Every call inside one turn carries the same * value; the count is checkpointed, so a stop/resume continues it. * - A role's org_send is stamped with its chain at hop + 1 (withTrace), the * way mono-agent's WithTrace stamps the mail it sends, so A → B → A climbs * one chain instead of each hop starting over. */ import type { RunningOrg } from './daemon.js'; import { type ChainTrace } from './tool-providers.js'; export interface RoleTrace extends ChainTrace { turn: number; } /** The role's current chain and turn; mints the chain on first use. */ export declare function currentRoleTrace(running: RunningOrg | undefined, role: string): RoleTrace; /** A role's turn ended: its next tool call belongs to the next turn. */ export declare function endTurn(running: RunningOrg, role: string): void; /** `body` with the next hop of `t` as its first line, replacing any trace line * already in it — a message sits at one position in one chain. */ export declare function withTrace(body: string, t: ChainTrace): string; //# sourceMappingURL=role-trace.d.ts.map