import type { ToolDefinition } from "@opencode-ai/plugin"; import type { PluginContext } from "../types.js"; export type InspectTerminalKind = "FRESH" | "INTERRUPTED" | "PHASE-FAILED"; /** A completed inspect phase, normalized once for every terminal outcome. */ export interface InspectPhaseEntry { id: string; producer?: string; category?: string; alsoSatisfied: string[]; } export interface InspectTerminal { kind: InspectTerminalKind; phases: InspectPhaseEntry[]; waitStampText?: string; failedPhase?: InspectPhaseEntry; failureReason?: string; failureDetail?: string; } /** * Parse phase entries shared by all terminal outcomes. If also_satisfied is * omitted, store it as an empty list so callers can always treat it as a list. */ export declare function parseInspectPhaseEntries(value: unknown): InspectPhaseEntry[]; /** * Use the same phase parser for every terminal outcome. Alternate discriminator * spellings keep older payload encodings compatible with the canonical shape. */ export declare function parseInspectTerminal(payload: unknown): InspectTerminal | undefined; /** Render every taxonomy field instead of reducing non-fresh terminals to an error. */ export declare function renderInspectTerminal(terminal: InspectTerminal, serverText?: string): string; export interface InspectToolConfig { tool_surface?: "minimal" | "recommended" | "all"; disabled_tools?: string[]; inspect?: { enabled?: boolean; diagnostics_timeout_ms?: number; tier2_idle_minutes?: number; }; } export declare function inspectToolSurfaceEnabled(config: InspectToolConfig): boolean; export declare function shouldRegisterInspectTool(config: InspectToolConfig): boolean; type TimerHandle = ReturnType; export interface InspectTier2IdleSchedulerOptions { isEnabled: () => boolean; idleMinutes: () => number | undefined; run: (sessionID: string) => Promise; warn?: (message: string) => void; setTimer?: (callback: () => void, delayMs: number) => TimerHandle; clearTimer?: (timer: TimerHandle) => void; } export declare function createInspectTier2IdleScheduler(options: InspectTier2IdleSchedulerOptions): { schedule: (sessionID: string) => void; clear: (sessionID: string) => void; clearAll: () => void; }; export declare function inspectTools(ctx: PluginContext): Record; export {}; //# sourceMappingURL=inspect.d.ts.map