/** * The radar view's chain line: one line for a run of consecutive tool calls. * * Two renderings of the same chain, because a run that is still going and a run * that is over answer different questions. * * While it runs you want the shape — what it did, in order, and where it broke: * * ◐ grep › read › bash✗ › edit › bash… 4 done · 1 failed · running * * Once it is over the order has stopped mattering and what is left is what it * amounted to: * * ● Edited packages/tui/src/keys.ts 5 calls · 1 failed * * A chain that did *not* finish keeps the running form plus a marker. The * settled form is a claim about what was accomplished, and a chain cut off * partway through has no such claim to make — the same reason * `settleDanglingMainTasks` refuses to mark an aborted turn's plan items done. * * Everything here is pure and deterministic. A model-written phase label would * read better than the inferred one, but it would cost tokens on every turn and * this agent's whole premise is that nothing happens you did not pay for on * purpose. */ /** One tool call's contribution to its chain. */ export interface ChainEntry { tool: string; /** The call's subject — a path, a command, a pattern. */ subject: string; isError: boolean; /** Still executing. */ isPartial: boolean; /** Lines of text output the call returned. */ outputLines: number; } export type ChainState = /** Calls are still arriving or executing. */ "running" /** Every call finished and the turn moved on cleanly. */ | "done" /** The turn was aborted, errored, or hit a length cap partway through. */ | "interrupted"; export type SegmentTone = "ok" | "error" | "running"; export interface ChainSegment { label: string; tone: SegmentTone; } /** The `grep › read × 3 › bash✗` part of a running chain line. */ export declare function chainSegments(entries: ChainEntry[]): ChainSegment[]; /** The flush-right stats for either rendering. */ export declare function chainStats(entries: ChainEntry[], state: ChainState): string; /** * The settled chain's phrase: what this run amounted to. * * Deliberately close to one clause, not an inventory. "Edited packages/tui, read * 6 files, searched packages" is a worse line than "Edited packages/tui" — the * count is already in the stats, and the per-call detail is one stop down the * view dial. * * A long chain earns at most one more clause, and only when its headline family * is a minority of the calls. That is the case where a single clause stops being * terse and starts being false: 31 edits among 182 calls is worth naming, but so * is the fact that 76 of the rest were commands. Listing every family it touched * is not the alternative — a chain that reports "(ran, delegated, read, * searched)" has said only that it was busy. * * A location is only named when the calls actually share one. Naming a single * arbitrary file out of five would read as a claim the chain never made, so * several unrelated targets collapse to a count instead. */ export declare function chainPhrase(entries: ChainEntry[]): string; //# sourceMappingURL=tool-chain-summary.d.ts.map