export interface ParentClaudeSession { kind: 'claude-code'; pid: number; sessionId: string; socketPath: string; messagingToken: string; registryPath: string; } export interface CodexInteractiveSession { kind: 'codex'; sessionId: string; threadId: string; } export interface OpenCodeInteractiveSession { kind: 'opencode'; pid: number; sessionId: string; socketPath: string; bridgeToken: string; } export type InteractiveSession = ParentClaudeSession | CodexInteractiveSession | OpenCodeInteractiveSession; /** Attach inherited transport metadata without adding it to a public config type. */ export declare function attachInteractiveSession(target: T, session: InteractiveSession): T; /** Read transport metadata attached by daemon startup inside this package. */ export declare function attachedInteractiveSession(target: object): InteractiveSession | undefined; export type InteractiveSessionCompletion = { kind: 'completed'; durationMs: number; output: string; } | { kind: 'timeout' | 'disconnected' | 'shutdown' | 'terminal'; durationMs: number; error: string; }; export type InteractiveSessionDelivery = { kind: 'not-delivered'; reason: string; } | { kind: 'handed-off'; certainty: 'acknowledged' | 'possible'; helperPath: string; completion: Promise; }; export interface InteractiveSessionHandoffOptions { session: InteractiveSession; runId: number; prompt: string; token: string; memoryUrl: string; timeoutMs: number; shutdownSignal?: AbortSignal; terminalSignal?: AbortSignal; cliLaunch?: { command: string; args: string[]; }; /** Exact installed Codex command; injected by tests or a binary override. */ codexCommand?: string; disconnectCheckIntervalMs?: number; } export declare function detectParentClaudeSession(opts?: { env?: NodeJS.ProcessEnv; sessionsDir?: string; }): { ok: true; session: ParentClaudeSession; } | { ok: false; reason: string; }; export declare function detectCodexInteractiveSession(env?: NodeJS.ProcessEnv): { ok: true; session: CodexInteractiveSession; } | { ok: false; reason: string; }; export declare function detectOpenCodeInteractiveSession(env?: NodeJS.ProcessEnv): { ok: true; session: OpenCodeInteractiveSession; } | { ok: false; reason: string; }; export declare function detectInteractiveSession(opts?: { env?: NodeJS.ProcessEnv; sessionsDir?: string; }): { ok: true; session: InteractiveSession; } | { ok: false; reason: string; }; export declare function deriveInteractiveWorkerId(session: InteractiveSession): string; export declare function handoffToInteractiveSession(opts: InteractiveSessionHandoffOptions): Promise; //# sourceMappingURL=interactive-session.d.ts.map