import type { AgentSession } from "../../session/agent-session.js"; import type { RpcBtwDeltaFrame, RpcBtwHistoryRecord, RpcBtwRecordFrame } from "./rpc-types.js"; type RpcBtwOutputFrame = RpcBtwDeltaFrame | RpcBtwRecordFrame | { type: "notice"; level: "error"; message: string; source: "btw-history"; }; export declare class RpcBtwController { #private; constructor(session: Pick, output: (frame: RpcBtwOutputFrame) => void); /** * Start a side question (or a follow-up in topic `recordId`); resolves once it is * checkpointed as running. The turn itself starts after the caller has answered. */ ask(question: string, recordId?: string): Promise; /** Cancel the running or starting question (only if it is topic `recordId`, when given). */ cancel(recordId?: string): boolean; /** Newest first, re-read from disk when idle; a running topic carries its live partial answer. */ history(): Promise; /** * Before the session is replaced or the process exits: cancel the running or starting * question and land every terminal checkpoint. Throws, after one retry, when a checkpoint * still cannot be saved, so the caller keeps the session instead of losing that answer. */ close(): Promise; } export {};