import type { Static } from "typebox"; import { Type } from "typebox"; /** Opens a shell session; the server picks the shell, cwd, and confinement. */ export declare const TerminalOpenParamsSchema: Type.TObject<{ agentId: Type.TOptional; cols: Type.TInteger; rows: Type.TInteger; }>; export type TerminalOpenParams = Static; /** Result of a successful open; carries the facts the UI header renders. */ export declare const TerminalOpenResultSchema: Type.TObject<{ sessionId: Type.TString; agentId: Type.TString; shell: Type.TString; cwd: Type.TString; confined: Type.TBoolean; }>; export type TerminalOpenResult = Static; /** Writes client keystrokes to the session stdin. */ export declare const TerminalInputParamsSchema: Type.TObject<{ sessionId: Type.TString; data: Type.TString; }>; export type TerminalInputParams = Static; /** Resizes the PTY grid after the client viewport changes. */ export declare const TerminalResizeParamsSchema: Type.TObject<{ sessionId: Type.TString; cols: Type.TInteger; rows: Type.TInteger; }>; export type TerminalResizeParams = Static; /** Closes a session and kills its process tree. */ export declare const TerminalCloseParamsSchema: Type.TObject<{ sessionId: Type.TString; }>; export type TerminalCloseParams = Static; /** * Rebinds a live-or-detached session to the calling admin connection. * Attach is take-over (tmux-like): the previous owner, if still connected, * receives `terminal.exit` with reason "detached". */ export declare const TerminalAttachParamsSchema: Type.TObject<{ sessionId: Type.TString; }>; export type TerminalAttachParams = Static; /** Result of a successful attach; mirrors open plus the replay buffer. */ export declare const TerminalAttachResultSchema: Type.TObject<{ sessionId: Type.TString; agentId: Type.TString; shell: Type.TString; cwd: Type.TString; confined: Type.TBoolean; buffer: Type.TString; }>; export type TerminalAttachResult = Static; /** One attachable session, as reported by terminal.list. */ export declare const TerminalSessionInfoSchema: Type.TObject<{ sessionId: Type.TString; agentId: Type.TString; shell: Type.TString; cwd: Type.TString; confined: Type.TBoolean; /** False while the session is detached (no connection owns its stream). */ attached: Type.TBoolean; createdAtMs: Type.TInteger; }>; export type TerminalSessionInfo = Static; /** * Sessions a reconnecting admin client can attach. All admin connections see * the same list: the terminal surface is already operator.admin (full host * access), so cross-connection visibility adds no privilege. */ export declare const TerminalListResultSchema: Type.TObject<{ sessions: Type.TArray>; }>; export type TerminalListResult = Static; /** Reads the current output buffer as plain text without attaching. */ export declare const TerminalTextParamsSchema: Type.TObject<{ sessionId: Type.TString; }>; export type TerminalTextParams = Static; /** Plain-text buffer contents (ANSI stripped); an agent/LLM affordance. */ export declare const TerminalTextResultSchema: Type.TObject<{ text: Type.TString; }>; export type TerminalTextResult = Static; /** Shared ok/void result for input, resize, and close. */ export declare const TerminalAckResultSchema: Type.TObject<{ ok: Type.TBoolean; }>; export type TerminalAckResult = Static; /** Streamed output chunk; seq lets the client detect gaps and preserve order. */ export declare const TerminalDataEventSchema: Type.TObject<{ sessionId: Type.TString; seq: Type.TInteger; data: Type.TString; }>; export type TerminalDataEvent = Static; /** Terminal end-of-life notice; the session id is invalid after this event. */ export declare const TerminalExitEventSchema: Type.TObject<{ sessionId: Type.TString; exitCode: Type.TOptional>; signal: Type.TOptional>; reason: Type.TOptional, Type.TLiteral<"closed">, Type.TLiteral<"disconnected">, Type.TLiteral<"detached">, Type.TLiteral<"error">]>>; error: Type.TOptional; }>; export type TerminalExitEvent = Static; /** Union of every event a terminal session can emit. */ export declare const TerminalEventSchema: Type.TUnion<[Type.TObject<{ sessionId: Type.TString; seq: Type.TInteger; data: Type.TString; }>, Type.TObject<{ sessionId: Type.TString; exitCode: Type.TOptional>; signal: Type.TOptional>; reason: Type.TOptional, Type.TLiteral<"closed">, Type.TLiteral<"disconnected">, Type.TLiteral<"detached">, Type.TLiteral<"error">]>>; error: Type.TOptional; }>]>; export type TerminalEvent = Static;