import type { ApprovalQuestion } from '../types.js'; export declare function hiddenTranscriptTool(name: string): boolean; /** Also reads an older call's lone `question`. */ export declare function askQuestionsFromArgs(argsJSON: string): ApprovalQuestion[]; export declare function planFromArgs(argsJSON: string): string; /** A Task call's display label the way the tool itself picks it: the * description, else the clipped prompt, plus its custom agent type. */ export declare function taskCallFromArgs(argsJSON: string): { description: string; agentType: string; }; /** The built-in "default" type is the same general-purpose agent an untyped * Task spawns, so naming it would only add noise. */ export declare function agentTypeLabel(t: string): string; /** The first line when the model wrote it as a heading ("# Title" or * "**Title**"), the way reasoning summaries open, so a folded thought says * what it was about. Prose gets no label of its own. */ export declare function thinkingHeading(raw: string): string; /** How a turn the user cut short reads, whether replayed or watched live. */ export declare const INTERRUPTED_NOTICE = "Request interrupted by the user."; /** The line the daemon files as the assistant's when a turn is cut short, by * the user or for a reason it names ("[Request interrupted because …]"); it * is a status, not something the model said. */ export declare function interruptionNotice(text: string): string | null; export declare function firstNonEmptyLine(text: string, max: number): string; export interface SubagentNotice { id: string; description: string; preview: string; /** The report itself, without the closing line addressed to the model. */ body: string; interim: boolean; /** The interrupted form is written for the model alone; the child's own * block already reads interrupted, so no line is drawn for it. */ silent: boolean; /** A background command's, rather than a subagent's. */ shell?: boolean; exitCode?: number; failed?: boolean; /** How long the subagent ran, or a monitor's time limit; 0 when the notice doesn't say. */ elapsedMs?: number; /** A monitor's: a script whose output lines arrive as events. An event's * `body` is the lines it printed, and `preview` the first of them. */ monitor?: boolean; /** How a monitor ended; unset on an event. `exitCode` says how its script * exited, and `elapsedMs` how long one that expired or flooded was given. */ ended?: MonitorEnd; /** The events a monitor sent before it expired. */ events?: number; } /** A monitor ends when its script exits, when its time runs out, or when it is * stopped for printing too much. */ export type MonitorEnd = 'exited' | 'expired' | 'flooded'; /** The words of the line a background task's notice draws. A host that leaves * out a monitor's lines gets the English ones. */ export interface SubagentNoticeStrings { messageFrom: (name: string) => string; commandCompleted: (name: string) => string; commandFailed: (name: string, exitCode: number) => string; /** `elapsed` is empty when the notice doesn't say how long it ran. */ agentFinished: (name: string, elapsed: string) => string; agentFailed: (name: string, elapsed: string) => string; /** `line` is the first line the script printed. */ monitorEvent?: (name: string, line: string) => string; monitorEnded?: (name: string) => string; monitorFailed?: (name: string, exitCode: number) => string; monitorExpired?: (name: string, elapsed: string, events: number) => string; monitorFlooded?: (name: string, elapsed: string) => string; } export declare const defaultSubagentNoticeStrings: Required; /** How long a subagent ran: 42s, 2m 59s or 1h 4m. */ export declare function formatAgentDuration(ms: number): string; /** Reads a "[Background subagent () completed]" header; null for * any other notice, which keeps its full text. */ export declare function parseSubagentNotice(text: string): SubagentNotice | null; /** The line that marks a child's report, a background command's end or a * monitor's event entering the main conversation; what was reported opens * under it. */ export declare function subagentDeliveryLine(n: SubagentNotice, t?: SubagentNoticeStrings): string;