/** After this with no refresh, a waiter stops trusting the marker. */ export declare const CHANNEL_GONE_MS = 120000; /** The state folder the message hook and the waiter already share. */ export declare function channelStateDir(): string; /** * Say which session this process belongs to, keyed by the processes above it. * * The hook is the only thing that ever learns the session id — Claude Code puts * it in the hook payload — and it runs in a sibling process of the MCP server, * so a file is the only thing they can share. Keyed by the parent pid because * that is what both processes have in common: their own `claude`. */ export declare function recordSessionForPids(sessionId: string, pids: readonly number[]): void; /** The session id the hook recorded for one of the processes above us. */ export declare function sessionIdFromPids(pids: readonly number[]): string | null; /** * Forget the records of processes that are gone. * * One file per session, and nothing else would ever remove them: the hook is * the only writer and it writes only for its own session. */ export declare function pruneSessionPids(): void; /** * Claim delivery for this session, so the waiter stops competing for it. * * Two consumers of the same lease would each deliver a message: the loser is * only spared a duplicate while the winner's lease holds. The marker is how the * waiter knows which of them owns the session. */ export declare function markChannelAlive(sessionId: string): void; /** Remove the claim, so the waiter takes over again on the next turn. */ export declare function clearChannelAlive(sessionId: string): void; /** Whether a live channel is delivering for this session right now. */ export declare function channelOwnsSession(sessionId: string, now?: number): boolean; //# sourceMappingURL=channel-state.d.ts.map