import { type ExtensionUIContext, type ExtensionAPI } from "@earendil-works/pi-coding-agent"; import { type PersistedRun } from "./persistence.js"; import { type WorkflowRegistryApi } from "./registry.js"; import { type WorkflowRecoveryContext, type createWorkflowRecovery } from "./host-recovery.js"; import { type WorkflowRunRecord } from "./host-runtime.js"; import { type TrajectoryPublisherProvider } from "./trajectory-host-handle.js"; import { type JsonValue } from "./types.js"; type UiSelect = (title: string, options: string[]) => Promise; type UiInput = (title: string, placeholder?: string) => Promise; type UiSetStatus = (key: string, text?: string) => void; type UiCustom = ExtensionUIContext["custom"]; export type UiHostCapabilities = { select?: UiSelect; input?: UiInput; setStatus?: UiSetStatus; custom?: UiCustom; }; type ReportBlocked = (active: boolean, label?: string) => void; export declare function uiHostCapabilities(ui: unknown): UiHostCapabilities | undefined; export type WorkflowNavigatorDependencies = { pi: Pick; home: string | undefined; clipboard: (value: string) => Promise; extensionAgentDir: string; runs: Map; terminalRunStates: Map; hardTerminalRunStates: ReadonlySet; ensureSessionLease: (cwd: string, sessionId: string) => Promise; answerCheckpoint: (runId: string, name: string, approved: boolean, silent?: boolean) => Promise; recovery: ReturnType; stopWorkflowRun: (runId: string) => Promise<{ runId: string; state: string; stopped: boolean; reason?: "unknown_run" | "already_terminal"; }>; moveForegroundToBackground: (runId: string) => Promise<{ runId: string; state: "running"; detached: true; }>; isForegroundAttached: (runId: string) => boolean; liveAgents: { get(runId: string, agentId: string): Readonly<{ session?: import("./types.js").WorkflowAgentSession; prepared?: Readonly; handoff?: import("./types.js").LiveSessionHandoff; }> | undefined; overlay(run: PersistedRun): PersistedRun; }; registry: WorkflowRegistryApi; projectTrusted: (context: unknown) => boolean; resumeHostContext: (context: unknown) => WorkflowRecoveryContext; resumeSelectedWorkflow: (runId: string, foreground: boolean, context: unknown, budgetPatch?: unknown) => Promise<{ workflowName: string; state: "running" | "completed" | "awaiting_approval"; attached: boolean; value?: JsonValue; }>; reportBlocked?: ReportBlocked; setNavigatorOpen?: (open: boolean) => void; trajectoryProvider: TrajectoryPublisherProvider; }; export declare function registerWorkflowNavigator(deps: WorkflowNavigatorDependencies): void; export {};