export declare function isOpenCodeHooksInstalled(workspaceRoot: string): boolean; export declare function installOpenCodeHooks(workspaceRoot: string): void; /** * Return true if an opencode process is actively writing to the hooks JSONL. * Prefers the per-session file when sessionId is known; falls back to the global file. */ export declare function isOpenCodeCliActive(workspaceRoot: string, windowMs?: number, sessionId?: string): boolean; /** * Return true if the most recent opencode session exited cleanly (Stop event present). * Prefers the per-session file when sessionId is known. */ export declare function openCodeExitedCleanly(workspaceRoot: string, sessionId?: string): boolean; /** * Read the workspace-scoped hooks-events.jsonl and return the session ID from * the most recent OpenCode session event. * Returns undefined if the file is absent or no session event has been seen yet. * * @param notBefore Only consider events with a timestamp >= this ISO string or * epoch-ms number. Pass the task-start time to avoid picking * up stale/foreign sessions from before this dispatch. */ export declare function getOpenCodeSessionIdFromHooks(workspaceRoot: string, notBefore?: string | number): string | undefined; export declare function uninstallOpenCodeHooks(workspaceRoot: string): void;