import type { DiscoveredProcess } from "../../types"; export declare const RESUME_BUSY_WINDOW_MS = 120000; export declare function resolveResumeBusyWindowMs(env?: NodeJS.ProcessEnv): number; export type BusySignal = "jsonl_mtime" | "process_argv" | "process_cwd" | "file_handle"; export interface ConversationBusyInput { conversationId: string; projectPath: string | null; jsonlPath: string | null; discovered: DiscoveredProcess[]; now?: number; windowMs?: number; platform?: NodeJS.Platform; /** * When this streamer's own PTY for this conversation last went idle (ms epoch), * or null/undefined if it never owned one in this process's lifetime. * * Without this the probe cannot tell our own echo from a stranger: the normal * background → hold_session → foreground → resume flow releases the PTY (so the * hasSession early-return no longer applies) while leaving a JSONL we wrote * seconds ago — which would 409 the single most common resume in the product. * File activity at or before this timestamp is attributed to us, not a collision. */ selfPtyEndedAt?: number | null; } export interface ConversationBusyResult { busy: boolean; detectedBy: BusySignal[]; lastActivityMs: number | null; likelyOwner: "external" | "unknown"; } export declare function conversationBusy(input: ConversationBusyInput): ConversationBusyResult; //# sourceMappingURL=conversationBusy.d.ts.map