import { type NextAction } from '../agent.js'; import { type SessionHandles } from './openSession.js'; export interface AgentReplHooks { /** Command name used in agentError / agentResult envelopes. */ command: 'dev' | 'console'; /** Ran after openSession + session-to-agent forwarding is set up, before * the stdin command loop starts. A thrown error triggers agentError + * process.exit(1). */ onReady?: (handles: SessionHandles) => Promise; /** Handler for an `{type: 'deploy', force?: boolean}` stdin message. * No-op if absent. */ onDeploy?: (force: boolean, handles: SessionHandles) => void; /** Appended to the `agentResult` terminal envelope on exit. */ nextActions?: NextAction[]; /** Ran on every exit path (stdin 'exit', SIGINT, SIGTERM). */ onDispose?: () => void; } /** * Shared agent-mode orchestrator for the long-running REPL commands * (`dev`, `console`). Owns: * * - device connect via {@link openSession} * - session → agent NDJSON forwarding * - SIGINT / SIGTERM / process.on('exit') cleanup * - the stdin command loop (eval / directive / complete / restart / deploy / exit) * * Per-command behavior slots in via the `hooks` object. */ export declare function runAgentRepl(config: T, hooks: AgentReplHooks): Promise; //# sourceMappingURL=runAgentRepl.d.ts.map