import { type ConfigContext } from "./config.js"; /** * Which ACP session belongs to which Relay chat, kept where the profile that * owns the agent is kept. * * An ACP agent (cursor, gemini-cli, opencode) gives every `session/new` a * session id, and takes an old one back with `session/load` when it advertises * that it can (`agentCapabilities.loadSession`). The bridge is the only thing * that knows which session belongs to which chat, and it would forget 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 the agent itself. This is the shape `codex-threads.ts` uses for Codex, * kept in its own file so the two never share a key. */ export declare const acpSessionsPath: (context?: ConfigContext) => string; /** The agent a set of sessions belongs to. */ export interface AcpSessionOwner { /** The Relay the agent lives on, so staging and production never share a session. */ apiURL: string; /** The agent that answers, so two agents in one folder never share a session. */ handle: string; } /** One chat's key in the file: the Relay, the agent, and the chat. */ export declare const acpSessionKey: (owner: AcpSessionOwner, chatId: string) => string; /** The session ids for one agent, read once and written on every change. */ export interface AcpSessionStore { /** The session the agent opened for this chat, if this computer still remembers one. */ get(chatId: string): string | undefined; /** Remembers the session the agent just opened for this chat. */ set(chatId: string, sessionId: string): Promise; } export declare const openAcpSessions: (owner: AcpSessionOwner, context?: ConfigContext) => Promise; //# sourceMappingURL=acp-threads.d.ts.map