/** * Zoe CLI — REPL Functions * * Interrupt handling, chat-with-interrupt, and the main runChat loop. * Extracted from index.ts for single-responsibility. */ import { Agent } from './agent.js'; import type { ApproveToolFn, PermissionLevel } from '../../core/types.js'; export interface InterruptHandle { signal: AbortSignal; /** Temporarily disable ESC detection (e.g. during approval prompts) */ suspend: () => void; /** Re-enable ESC detection after suspend */ resume: () => void; /** Permanently clean up the interrupt handler */ teardown: () => void; } export declare function setupInterrupt(agent: Agent): InterruptHandle; /** Build the adapter-level approveTool callback for the CLI. */ export declare function createCliApproveTool(config: any, handle: InterruptHandle, permissionLevel?: PermissionLevel): ApproveToolFn; export declare function chatWithInterrupt(agent: Agent, input: string, config?: any, permissionLevel?: PermissionLevel): Promise; export declare function runChat(queryParts: string[], options: any): Promise;