import type { SessionPlan } from "../store/plan.js"; import type { ToolCall } from "../types.js"; export interface ResponderParentAccepted { readonly ok: true; readonly taskId: string | undefined; readonly source: "declared" | "active-fallback" | "none"; } export interface ResponderParentRejected { readonly ok: false; readonly reason: string; } export type ResponderParentResolution = ResponderParentAccepted | ResponderParentRejected; /** Read a declared responder parent from a tool call, if the model supplied one. */ export declare function readDeclaredParentTaskId(call: ToolCall): string | undefined; /** * Validate the declared parent against the live plan. Omission falls back to the * single active foreground task; ambiguity is reported instead of guessed. */ export declare function resolveResponderParent(input: { readonly plan: SessionPlan | undefined; readonly declared: string | undefined; readonly activeForegroundTaskIds: readonly string[]; }): ResponderParentResolution; /** * True when an explicit shell.exec request will actually be Responder-owned * after applying the same foreground/persistent precedence as tool runtime. */ export declare function isExplicitResponderDelegation(call: ToolCall): boolean; /** Stable, readable child-task title for a delegated command. */ export declare function delegationTaskTitle(call: ToolCall): string;