/** * interactive-terminal-tool.ts — the `interactive_terminal` tool. * * A single multiplexed tool that drives persistent interactive terminal * sessions (REPLs, prompts, and full-screen TUIs when a real PTY is * available). Unlike a one-shot bash tool, a session stays alive between * calls so the model can send input and read evolving output. * * Actions: * open — start a session (returns an id). Gated via context.ask(). * write — send input/keystrokes to a session. * read — read output: raw stream, or (pty) the rendered screen snapshot. * resize — resize the terminal (PTY backend only). * close — terminate a session (graceful, then SIGKILL). * list — list this session's live terminals. */ import { z } from "zod"; /** * Decode the documented `data` input syntax into real bytes: * - `\uXXXX` / `\xXX` hex escapes (e.g. `\u0003` → Ctrl-C, `\u001b` → ESC) * - C-style escapes `\r` `\n` `\t` `\b` `\f` `\e` `\0` `\\` * - named keys wrapped in angle brackets, e.g. ``, ``, `` * Anything that is not a well-formed escape passes through untouched, so * plain text containing literal backslashes or `<` is preserved. */ export declare function decodeKeystrokeEscapes(data: string): string; export declare function createInteractiveTerminalTool(): import("../platform/types.ts").CanonicalToolDef<{ action: z.ZodEnum<{ close: "close"; open: "open"; write: "write"; resize: "resize"; list: "list"; read: "read"; }>; /** Session id. Returned by `open`; required for write/read/resize/close. * On open, a custom id may be requested (sanitized; suffixed on collision). */ id: z.ZodOptional; command: z.ZodOptional; args: z.ZodOptional>; shell: z.ZodOptional; backend: z.ZodOptional>; cwd: z.ZodOptional; env: z.ZodOptional>; cols: z.ZodOptional; rows: z.ZodOptional; idle_timeout_ms: z.ZodOptional; data: z.ZodOptional; keys: z.ZodOptional>; append_newline: z.ZodOptional; mode: z.ZodOptional>; wait_ms: z.ZodOptional; until: z.ZodOptional; timeout_ms: z.ZodOptional; from_start: z.ZodOptional; strip_ansi: z.ZodOptional; signal: z.ZodOptional; }>; //# sourceMappingURL=interactive-terminal-tool.d.ts.map