UNPKG

@phren/cli

Version:

Knowledge layer for AI agents - CLI, MCP server, and data layer

43 lines (42 loc) • 2.32 kB
export declare function materializedRoot(): string; export declare function materializedPath(session: string): string; /** Codex 0.155 threads the SQLite store knows, by stable thread identity. Search * uses this to discover threads that have no rollout file to glob. */ export declare function codexThreadSessions(limit?: number, after?: string): Promise<string[]>; /** The materialized row retains its original turn, independently of whichever * turn happens to be active when search catches up. */ export declare function codexTurnSettled(session: string, turn: string | null): Promise<boolean | undefined>; /** One request's view of Codex's SQLite stores. Reusing the connections is what * keeps discovery of hundreds of threads from paying an open/close per item. */ export interface CodexThreadStore { sessions(limit?: number, after?: string): Promise<string[]>; turnSettled(session: string, turn: string | null): Promise<boolean | undefined>; materialize(session: string, deadline?: number, maxItems?: number): Promise<string | undefined>; close(): Promise<void>; } export declare function openCodexThreadStore(): CodexThreadStore; /** A working pane whose projection cursor stopped at an unfinished turn can * keep accepting input even though none of it will be readable again. */ export declare function threadHealth(session: string, agentStatus: unknown): Promise<{ stalled: boolean; since?: string; }>; export declare function codexThreadPreview(session: string): Promise<{ turnStartedAt: string; text: string; } | undefined>; /** Bring the materialized file up to date with the store. Returns the file * when the thread exists there, undefined otherwise. Safe to call often: * an unchanged thread costs one aggregate query. */ export declare function materializeCodexThread(session: string, deadline?: number, maxItems?: number): Promise<string | undefined>; /** The pending queued question as the pane's choice shape: the asking * sentence and one numbered option per choice (Codex answers with number * keys once alt+up has opened the queue). Undefined when nothing answerable * remains. */ export declare function queuedQuestion(session: string): Promise<{ title: string; options: { label: string; key: string; }[]; } | undefined>;