import type { Subscription } from 'rxjs'; import type { ReplSession } from './session.js'; export interface NextAction { command: string; description: string; } /** * Check if agent mode is active via --agent flag or AI agent environment detection. */ export declare function isAgentMode(flagValue?: boolean): boolean; /** * Emit a single NDJSON event to stdout. */ export declare function agentEmit(event: Record): void; /** * Emit a terminal success envelope. */ export declare function agentResult(command: string, result: unknown, nextActions?: NextAction[]): void; /** * Emit a terminal error envelope. */ export declare function agentError(command: string, error: string, options?: { fix?: string; next_actions?: NextAction[]; }): void; /** * Subscribe the session's message stream to the agent NDJSON protocol. * Emits ready/raw/log/warn/error/info/debug/result/eval_error events and * silently drops prompt and disconnect. Returns the Subscription so callers * can tear it down. */ export declare function forwardSessionToAgent(session: ReplSession): Subscription; /** * Read NDJSON commands from stdin. Yields parsed JSON objects. * Silently skips malformed lines. */ export declare function createAgentStdinReader(): AsyncIterable>; //# sourceMappingURL=agent.d.ts.map