import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; export interface ComputerUseRuntimeContext { sessionId: string; runtimeScope: "main" | "subagent"; workspaceKey: string; workspacePath?: string; workspaceIdentity?: string; remoteSessionId?: string; turnId?: string; clientMode?: "web-remote-replayable" | "desktop-continuous"; deliveryKind?: "web-remote-replayable" | "desktop-continuous"; trace?: Record; } export interface ComputerUseRuntimeExecuteInput { toolName: string; arguments?: unknown; context: ComputerUseRuntimeContext; signal?: AbortSignal; } export interface ComputerUseRuntime { // 公共 broker 读取 MCP 元数据;占位返回同一结果类型,避免导出后丢失契约。 execute(input: ComputerUseRuntimeExecuteInput): Promise; closeSession(context: ComputerUseRuntimeContext): Promise; dispose(): Promise; } export interface ComputerUseRuntimeOptions { brokerSocketPath?: string; refreshMarkerPath?: string; ensureBrokerAvailable?: () => Promise; env?: Record; } export declare function createComputerUseRuntime( options?: ComputerUseRuntimeOptions, ): ComputerUseRuntime;