index.d.ts 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. export interface ComputerUseRuntimeContext {
  2. sessionId: string;
  3. runtimeScope: "main" | "subagent";
  4. workspaceKey: string;
  5. workspacePath?: string;
  6. workspaceIdentity?: string;
  7. remoteSessionId?: string;
  8. turnId?: string;
  9. clientMode?: "web-remote-replayable" | "desktop-continuous";
  10. deliveryKind?: "web-remote-replayable" | "desktop-continuous";
  11. trace?: Record<string, unknown>;
  12. }
  13. export interface ComputerUseRuntimeExecuteInput {
  14. toolName: string;
  15. arguments?: unknown;
  16. context: ComputerUseRuntimeContext;
  17. signal?: AbortSignal;
  18. }
  19. export interface ComputerUseRuntime {
  20. execute(input: ComputerUseRuntimeExecuteInput): Promise<unknown>;
  21. closeSession(context: ComputerUseRuntimeContext): Promise<void>;
  22. dispose(): Promise<void>;
  23. }
  24. export interface ComputerUseRuntimeOptions {
  25. brokerSocketPath?: string;
  26. refreshMarkerPath?: string;
  27. ensureBrokerAvailable?: () => Promise<void>;
  28. env?: Record<string, string | undefined>;
  29. }
  30. export declare function createComputerUseRuntime(
  31. options?: ComputerUseRuntimeOptions,
  32. ): ComputerUseRuntime;