evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a minimal client that manages server-backed shell sessions which stay alive after the UI disconnects. The client must open named sessions, reuse them without resetting shell state, and allow reconnecting later to keep running commands in the same environment. Closing a local handle should not kill the server session; only an explicit shutdown ends it.
cd /tmp, running pwd still returns /tmp) @testecho ready into a session returns a result whose output contains ready and ends with a newline that reflects the shell output @testpwd reflects the directory set before disconnecting @testexport interface TerminalResult {
output: string;
}
export interface TerminalSessionInfo {
id: string;
name: string;
}
export interface PersistentTerminal {
readonly id: string;
send(command: string): Promise<TerminalResult>;
close(): Promise<void>;
}
export interface TerminalClient {
open(name?: string): Promise<PersistentTerminal>;
resume(id: string): Promise<PersistentTerminal>;
list(): Promise<TerminalSessionInfo[]>;
shutdown(id: string): Promise<void>;
}
export function createTerminalClient(): TerminalClient;Provides persistent, server-backed terminals.