import { fs, port, setup, shell, task } from "../pitcher-protocol"; import { IAgentClient, IAgentClientFS, IAgentClientPorts, IAgentClientSetup, IAgentClientShells, IAgentClientSystem, IAgentClientTasks, PickRawFsResult } from "../agent-client-interface"; import { AgentConnection } from "./AgentConnection"; import { Event } from "../utils/event"; import { SandboxSession } from "../types"; import { InitStatus } from "../pitcher-protocol/messages/system"; declare class AgentClientShells implements IAgentClientShells { private agentConnection; private onShellExitedEmitter; onShellExited: Event<{ shellId: string; exitCode: number; }>; private onShellTerminatedEmitter; onShellTerminated: Event<{ shellId: shell.ShellId; author: string; }>; private onShellOutEmitter; onShellOut: Event<{ shellId: shell.ShellId; out: string; }>; constructor(agentConnection: AgentConnection); create(projectPath: string, size: shell.ShellSize, command?: string, type?: shell.ShellProcessType, isSystemShell?: boolean): Promise; delete(shellId: shell.ShellId): Promise; getShells(): Promise; open(shellId: shell.ShellId, size: shell.ShellSize): Promise; rename(shellId: shell.ShellId, name: string): Promise; restart(shellId: shell.ShellId): Promise; send(shellId: shell.ShellId, input: string, size: shell.ShellSize): Promise; } declare class AgentClientFS implements IAgentClientFS { private agentConnection; private workspacePath; constructor(agentConnection: AgentConnection, workspacePath: string); private handleRawFsResponse; copy(from: string, to: string, recursive?: boolean, overwrite?: boolean): Promise>; download(path?: string): Promise<{ downloadUrl: string; }>; mkdir(path: string, recursive?: boolean): Promise>; readdir(path: string): Promise>; readFile(path: string): Promise>; remove(path: string, recursive?: boolean): Promise>; rename(path: string, newPath: string): Promise>; stat(path: string): Promise>; watch(path: string, options: { readonly recursive?: boolean; readonly excludes?: readonly string[]; }, onEvent: (watchEvent: fs.FSWatchEvent) => void): Promise<(PickRawFsResult<"fs/watch"> & { type: "error"; }) | { type: "success"; dispose(): void; }>; writeFile(path: string, content: Uint8Array, create?: boolean, overwrite?: boolean): Promise>; } declare class AgentClientPorts implements IAgentClientPorts { private agentConnection; private onPortsUpdatedEmitter; onPortsUpdated: Event; constructor(agentConnection: AgentConnection); getPorts(): Promise; } declare class AgentClientSetup implements IAgentClientSetup { private agentConnection; private onSetupProgressUpdateEmitter; onSetupProgressUpdate: Event; constructor(agentConnection: AgentConnection); getProgress(): Promise; init(): Promise; } declare class AgentClientTasks implements IAgentClientTasks { private agentConnection; private onTaskUpdateEmitter; onTaskUpdate: Event; constructor(agentConnection: AgentConnection); getTasks(): Promise; getTask(taskId: string): Promise; runTask(taskId: string): Promise; stopTask(taskId: string): Promise; } declare class AgentClientSystem implements IAgentClientSystem { private agentConnection; constructor(agentConnection: AgentConnection); private onInitStatusUpdateEmitter; onInitStatusUpdate: Event; update(): Promise>; } export declare class AgentClient implements IAgentClient { private getSession; private agentConnection; private params; static create({ session, getSession, }: { session: SandboxSession; getSession: (sandboxId: string) => Promise; }): Promise<{ client: AgentClient; joinResult: import("../pitcher-protocol/messages/client").ClientJoinResult; }>; sandboxId: string; workspacePath: string; isUpToDate: boolean; private reconnectToken; get state(): import("../agent-client-interface").IAgentClientState; onStateChange: Event; shells: AgentClientShells; fs: AgentClientFS; setup: AgentClientSetup; tasks: AgentClientTasks; system: AgentClientSystem; ports: AgentClientPorts; constructor(getSession: (sandboxId: string) => Promise, agentConnection: AgentConnection, params: { sandboxId: string; workspacePath: string; isUpToDate: boolean; reconnectToken: string; }); ping(): void; disconnect(): Promise; reconnect(): Promise; dispose(): void; } export {};