/** * Minimal interactive REPL for a harness agent. Uses node:readline. * * Mirrors `_harness/_repl.py` but pares the interactive surface down to * the parts that translate cleanly: prompt → run agent → render events → * loop. Slash commands are handled by `CommandRegistry`. The Python * implementation has rich live-rendering and prompt_toolkit hooks; the * TS port keeps it intentionally simple so it works in any terminal. */ import type { CommandRegistry } from "./registries.js"; import type { ContextCompressor } from "./lifecycle.js"; import type { EventDispatcher, HarnessEvent } from "./events.js"; import type { HookRegistry } from "./registries.js"; import { type Renderer } from "./renderer.js"; export interface ReplConfig { prompt?: string; exitWords?: string[]; renderer?: Renderer; } /** * A harness REPL drives an agent through a stdin/stdout loop. The * `agent` parameter is intentionally typed as `unknown` so consumers * can pass any object that implements `ask(text: string)` — this * keeps the REPL decoupled from the @google/adk runtime. */ export declare class HarnessRepl { readonly agent: { ask?: (text: string) => Promise; }; readonly dispatcher?: EventDispatcher; readonly hooks?: HookRegistry; readonly compressor?: ContextCompressor; readonly config: Required; constructor(agent: { ask?: (text: string) => Promise; }, opts?: { dispatcher?: EventDispatcher; hooks?: HookRegistry; compressor?: ContextCompressor; config?: ReplConfig; }); /** Run the REPL loop until the user exits. */ run(commands?: CommandRegistry): Promise; /** Render a single event through the configured renderer. */ render(event: HarnessEvent): void; } //# sourceMappingURL=repl.d.ts.map