import type { ToolResult } from "../../types.js"; export interface CancelWorkSnapshot { readonly turn: boolean; readonly compaction: boolean; readonly queuedPrompts: number; readonly responderJobs: number; readonly pendingNotifications: number; readonly interruptible: boolean; } export interface AbortForegroundOutcome { readonly turnAborted: boolean; readonly interruptibleCancelled: number; } export interface CancelAllOutcome { readonly ok: boolean; readonly turnAborted: boolean; readonly compactionAborted: boolean; readonly interruptibleCancelled: number; readonly sessionResult: ToolResult; } export interface CancelCoordinatorSession { getState(): { readonly running: boolean; readonly compacting: boolean; readonly queued: readonly string[]; }; abort(): void; cancelAll(): Promise; } export interface CancelCoordinatorJobs { running(sessionId: string): readonly unknown[]; pendingNotifications(sessionId: string): readonly unknown[]; } export interface CancelCoordinatorInterruptible { hasWork(): boolean; cancelAll(): number; } export interface CancelCoordinatorDeps { readonly session: CancelCoordinatorSession; readonly sessionId: () => string; readonly jobs: CancelCoordinatorJobs; readonly interruptible: CancelCoordinatorInterruptible; } export declare class CancelCoordinator { private readonly deps; constructor(deps: CancelCoordinatorDeps); snapshot(): CancelWorkSnapshot; hasCancelableWork(): boolean; abortForeground(): AbortForegroundOutcome; cancelAll(): Promise; }