import { AdapterRegistry } from './adapters/base.js'; /** * Session with persistent interactive mode support * - Regular messages: uses -p (print mode) with --continue/--resume * - Interactive mode: persistent PTY process, detach with Ctrl+] */ export declare class SDKSession { private isRunning; private activeTool; private conversationHistory; private registry; private ptyManagers; private cwd; private rl; private inputHistory; private requestInProgress; constructor(registry: AdapterRegistry, cwd?: string); /** * Get or create a PersistentPtyManager for a tool. * Lazy-spawns the PTY on first use. * @param tool The tool name * @param waitForReady If false, returns immediately after spawning (for interactive mode) */ private getOrCreateManager; start(): Promise; private getPrompt; /** * Tab completion for / commands */ private completer; private setupReadline; private runLoop; private promptLoop; private readInput; private handleMetaCommand; private showHelp; /** * Send a message silently (no response display). * Used for /fwdi to send via print mode without showing output, * then user sees response in interactive mode. */ private sendToToolSilent; private sendToTool; /** * Enter full interactive mode with the active tool. * Uses the unified PersistentPtyManager for session continuity. * Press Ctrl+] to detach (PTY keeps running) */ private enterInteractiveMode; /** * Enter interactive mode and automatically send a slash command * Uses v1.0.1 proven approach: detect new vs reattach, proper delay, char-by-char typing */ private enterInteractiveModeWithCommand; /** * Common interactive session logic - handles stdin forwarding and detach keys */ private runInteractiveSession; private showStatus; private handleForward; private showHistory; private cleanup; } export declare function startSDKSession(registry: AdapterRegistry): Promise; //# sourceMappingURL=sdk-session.d.ts.map