import type { Logger } from './types.js'; export interface InteractiveWedgeVerdict { /** True when the latest non-carried interactive tool_use has no matching * tool_result later in the tail — the turn is parked on an un-answerable * elicitation. */ wedged: boolean; /** The wedging tool's name, or null when no non-carried interactive tool_use * appears in the tail. Set even when resolved (wedged=false) so a reader can * see which tool was last elicited. */ tool: string | null; /** Count of `queue-operation:enqueue` records after the unresolved tool_use — * operator inbound that piled up un-drained. A wedge appends no assistant * turns, so this queued-inbound count is the only meaningful magnitude; it is * logged as `turns=`. 0 when not wedged. */ pendingInbound: number; } /** Pure classifier. Finds the LAST non-carried interactive tool_use; reports it * wedged when no later record carries a tool_result with that tool_use's id. */ export declare function classifyInteractiveWedge(records: ReadonlyArray>): InteractiveWedgeVerdict; /** One eligible session for a watch tick: a live channel session. */ export interface InteractiveWedgeCandidate { sessionId: string; jsonlPath: string; } /** Injectable surface for `collectSubAccountChannelCandidates`. The real * implementations are thin fs reads wired in the manager; tests pass fakes. */ export interface SubAccountChannelScanDeps { /** Slug directory names under `CLAUDE_CONFIG_DIR/projects`, EXCLUDING the boot * slug and any `archive` entry. */ otherSlugDirs: () => string[]; /** Live (top-level, non-archived) session ids under the given slug dir. */ sessionIdsForSlug: (slug: string) => string[]; /** True when a channel MCP config marker for this session exists in tmpdir. */ hasChannelMarker: (sessionId: string) => boolean; /** Absolute JSONL path for a (slug, sessionId). */ jsonlPathFor: (slug: string, sessionId: string) => string; } /** Pure. Collects channel-attached sessions from every non-boot project-slug so * the wedge watch covers client sub-account sessions, not just the boot * account. Ordering follows `otherSlugDirs()` then `sessionIdsForSlug()`. */ export declare function collectSubAccountChannelCandidates(deps: SubAccountChannelScanDeps): InteractiveWedgeCandidate[]; export interface InteractiveWedgeWatchDeps { /** Eligible sessions this tick — live channel sessions with a living pid. */ candidates: () => InteractiveWedgeCandidate[]; intervalMs: number; logger: Logger; /** Injectable tail reader for tests; defaults to the stuck-turn tail reader. */ readTail?: (path: string) => Record[]; } export interface InteractiveWedgeWatch { start(): void; stop(): void; tickOnce(): { scanned: number; wedged: number; }; } export declare function createInteractiveWedgeWatch(deps: InteractiveWedgeWatchDeps): InteractiveWedgeWatch; //# sourceMappingURL=interactive-wedge.d.ts.map