import { type ConfigContext } from "./config.js"; /** * Which Codex thread belongs to which Relay chat, kept where the profile that * owns the agent is kept. * * `codex app-server` keeps a thread for as long as its rollout file exists, and * takes that thread back by id (`thread/resume`). The bridge is the only thing * that knows which thread belongs to which chat, and it forgot on every restart * while the ids lived in memory. They live here instead, beside * `config.json`, so a chat keeps its context across restarts of the bridge and * of Codex itself. */ export declare const codexThreadsPath: (context?: ConfigContext) => string; /** The agent a set of threads belongs to. */ export interface CodexThreadOwner { /** The Relay the agent lives on, so staging and production never share a thread. */ apiURL: string; /** The agent that answers, so two agents in one folder never share a thread. */ handle: string; } /** One chat's key in the file: the Relay, the agent, and the chat. */ export declare const codexThreadKey: (owner: CodexThreadOwner, chatId: string) => string; /** The thread ids for one agent, read once and written on every change. */ export interface CodexThreadStore { /** The thread Codex opened for this chat, if this computer still remembers one. */ get(chatId: string): string | undefined; /** Remembers the thread Codex just opened for this chat. */ set(chatId: string, threadId: string): Promise; } export declare const openCodexThreads: (owner: CodexThreadOwner, context?: ConfigContext) => Promise; //# sourceMappingURL=codex-threads.d.ts.map