import { type ToolStrings } from './toolStrings.js'; export interface ToolHeader { label: string; arg?: string; /** A collapsed header shows `arg` alone: a monitor names what it watches, and its script opens with the block. */ argOnly?: boolean; } export declare function toolHeaderFor(name: string): ToolHeader; export declare function clip(s: string, max: number): string; export declare function sanitizeLabel(s: string): string; export declare function sanitizePanelText(s: string): string; export declare function stripTerminalEscapes(s: string): string; export declare function summarizeToolArgs(primary: string | undefined, argsJSON: string, onlyPrimary?: boolean): string; export declare function fullToolArgs(primary: string | undefined, argsJSON: string): string; /** A running call as it hangs under its folded run: a command as `$ command`, line breaks * kept, and any other call as its header. */ export declare function runningCallLabel(name: string, argsJSON: string): string; /** The feedback a person gave when they declined the call, or null for a call they didn't decline. */ export declare function parseRejection(result: string): { feedback: string; } | null; /** A call that needed approval in a session nobody could answer it in. */ export declare function isUnattendedToolUse(result: string): boolean; /** A call the person's stop cut off before it finished. */ export declare function isUserInterruptedTool(result: string): boolean; /** A call that didn't run, as the person declined it, nobody could approve it, or a stop cut it off. */ export declare function resultNotRun(result: string): boolean; /** The result as a person reads it: a verdict in place of the text written for the model. */ export declare function shownResult(name: string, args: string, result: string, t?: ToolStrings): string; export declare function resultFailed(name: string, result: string): boolean; export declare function bashExitCode(body: string): [string, number, boolean]; export interface ToolSummaryOptions { /** The edit tools' own summary; passed in to keep this module free of the diff one. */ editSummary?: (toolName: string, argsJSON: string, strings: ToolStrings) => string; strings?: ToolStrings; } export declare function toolSummary(name: string, args: string, result: string, isError: boolean, { editSummary, strings: t }?: ToolSummaryOptions): string; export declare function isGroupableTool(name: string): boolean; export declare function rollupSentence(names: string[], t?: ToolStrings): string; export declare function rollupClauses(names: string[], t?: ToolStrings): string[]; export declare function runClauses(names: string[], running: boolean, t?: ToolStrings): string[]; export declare const AGENT_COLOR_NAMES: readonly ['blue', 'green', 'yellow', 'purple', 'cyan', 'orange', 'pink', 'red']; export declare function agentColorHex(name: string | undefined): string | null;