export interface ConnectionConfig { endpoint: string; atespace: string; token?: string; timeoutMs: number; maxBytes: number; } export interface CallOptions { signal?: AbortSignal; timeoutMs?: number; } export interface Environment { id: string; atespace: string; status: string; } export interface RemoteProcess { processId: string; status: string; exitCode: number; } export interface OutputChunk { source: "stdout" | "stderr"; data: Buffer; } export interface ProcessOutput { stdout: string; stderr: string; stdoutOffset: number; stderrOffset: number; truncated: boolean; } export interface ProcessRequest { command: string[]; cwd?: string; env?: Record; } export interface SubstrateTransport { create(id: string, template?: { name: string; atespace: string }, options?: CallOptions): Promise; get(id: string, options?: CallOptions): Promise; suspend(id: string, options?: CallOptions): Promise; delete(id: string, options?: CallOptions): Promise; start(id: string, request: ProcessRequest, options?: CallOptions): Promise; process(id: string, processId: string, options?: CallOptions): Promise; kill(id: string, processId: string, options?: CallOptions): Promise; outputs(id: string, processId: string, request?: { follow?: boolean; stdoutOffset?: number; stderrOffset?: number }, options?: CallOptions): Promise; read(id: string, path: string, options?: CallOptions): Promise; write(id: string, path: string, content: Buffer, options?: CallOptions): Promise; close(): void; } export interface WorkspaceBinding { version: 1; sessionId: string; endpoint: string; atespace: string; environmentId: string; processIds: string[]; uncertain: boolean; } export interface WorkspaceOptions { sessionId: string; endpoint: string; atespace: string; idleMs: number; persist(binding: WorkspaceBinding | null): void; notify(message: string, level: "info" | "warning" | "error"): void; changed(binding: WorkspaceBinding | null): void; }