hyperbrane 0.1.2 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/README.md +105 -23
  2. package/dist/agent/agentClient.d.ts +5 -0
  3. package/dist/agent/agentClient.js +4 -0
  4. package/dist/agent/agentService.d.ts +9 -37
  5. package/dist/agent/agentService.js +64 -323
  6. package/dist/agent/agentStorage.d.ts +1 -20
  7. package/dist/agent/agentStorage.js +0 -30
  8. package/dist/agent/api.d.ts +105 -152
  9. package/dist/agent/api.js +1 -8
  10. package/dist/agent/client.d.ts +3 -1
  11. package/dist/agent/client.js +2 -3
  12. package/dist/agent/control.d.ts +23 -0
  13. package/dist/agent/control.js +479 -0
  14. package/dist/agent/dimensionAgentClient.d.ts +8 -0
  15. package/dist/agent/dimensionAgentClient.js +99 -0
  16. package/dist/agent/hostTranscript.d.ts +0 -6
  17. package/dist/agent/hostTranscript.js +3 -14
  18. package/dist/agent/session/backend.d.ts +18 -32
  19. package/dist/agent/session/claude/home.d.ts +0 -1
  20. package/dist/agent/session/claude/home.js +0 -1
  21. package/dist/agent/session/claude/provision.d.ts +10 -0
  22. package/dist/agent/session/claude/provision.js +17 -0
  23. package/dist/agent/session/claude/transcript.d.ts +3 -7
  24. package/dist/agent/session/claude/transcript.js +68 -14
  25. package/dist/agent/session/client.d.ts +1 -10
  26. package/dist/agent/session/client.js +0 -3
  27. package/dist/agent/session/codex/provision.d.ts +14 -0
  28. package/dist/agent/session/codex/provision.js +25 -0
  29. package/dist/agent/session/fileTranscript.d.ts +6 -49
  30. package/dist/agent/session/fileTranscript.js +26 -82
  31. package/dist/agent/session/install.d.ts +5 -0
  32. package/dist/agent/session/install.js +35 -0
  33. package/dist/agent/session/sessionStorage.d.ts +4 -35
  34. package/dist/agent/session/sessionStorage.js +10 -16
  35. package/dist/agent/session/sharedConnection.d.ts +0 -8
  36. package/dist/agent/session/sharedConnection.js +0 -7
  37. package/dist/agent/session/storedTranscripts.d.ts +1 -6
  38. package/dist/agent/session/storedTranscripts.js +0 -3
  39. package/dist/agent/session/worker/jsonRpc.d.ts +2 -13
  40. package/dist/agent/session/worker/jsonRpc.js +2 -11
  41. package/dist/agent/session/worker/protocol.d.ts +30 -21
  42. package/dist/agent/session/worker/protocol.js +29 -18
  43. package/dist/agent/session/worker/workerParams.d.ts +0 -5
  44. package/dist/agent/session/worker/workerParams.js +24 -17
  45. package/dist/agent/session/workerConnection.d.ts +2 -13
  46. package/dist/agent/session/workerConnection.js +7 -12
  47. package/dist/agent/session/workerGatewayConnection.d.ts +18 -0
  48. package/dist/agent/session/workerGatewayConnection.js +86 -0
  49. package/dist/agent/vendor-types/manifest.json +32 -0
  50. package/dist/agent/workerBundle.d.ts +4 -19
  51. package/dist/agent/workerBundle.generated.js +1 -1
  52. package/dist/agent/workerBundle.js +3 -30
  53. package/dist/agent/workerReplacement.d.ts +3 -0
  54. package/dist/agent/workerReplacement.js +49 -0
  55. package/dist/cli/agent.js +31 -16
  56. package/dist/cli/command.d.ts +10 -11
  57. package/dist/cli/command.js +0 -4
  58. package/dist/cli/dimension.js +6 -6
  59. package/dist/cli/gateway.js +3 -6
  60. package/dist/cli/main.js +14 -31
  61. package/dist/cli/streamPrinter.d.ts +2 -10
  62. package/dist/cli/streamPrinter.js +16 -46
  63. package/dist/cli/table.d.ts +0 -3
  64. package/dist/cli/table.js +0 -4
  65. package/dist/dimension/api.d.ts +42 -27
  66. package/dist/dimension/api.js +28 -47
  67. package/dist/dimension/client.d.ts +5 -0
  68. package/dist/dimension/client.js +4 -0
  69. package/dist/dimension/control.d.ts +22 -0
  70. package/dist/dimension/control.js +346 -0
  71. package/dist/dimension/image.d.ts +0 -5
  72. package/dist/dimension/image.js +0 -8
  73. package/dist/dimension/imageFiles.generated.js +1 -1
  74. package/dist/dimension/paths.d.ts +5 -4
  75. package/dist/dimension/paths.js +15 -6
  76. package/dist/dimension/service.d.ts +8 -24
  77. package/dist/dimension/service.js +85 -227
  78. package/dist/dimension/transport-worker.d.ts +1 -0
  79. package/dist/dimension/transport-worker.js +151 -0
  80. package/dist/dimension/transportBundle.d.ts +2 -0
  81. package/dist/dimension/transportBundle.generated.d.ts +1 -0
  82. package/dist/dimension/transportBundle.generated.js +2 -0
  83. package/dist/dimension/transportBundle.js +4 -0
  84. package/dist/dimension/transportClient.d.ts +10 -0
  85. package/dist/dimension/transportClient.js +115 -0
  86. package/dist/dimension/transportProtocol.d.ts +53 -0
  87. package/dist/dimension/transportProtocol.js +8 -0
  88. package/dist/index.d.ts +7 -9
  89. package/dist/index.js +7 -19
  90. package/dist/lib/control.d.ts +11 -0
  91. package/dist/lib/control.js +62 -0
  92. package/dist/lib/docker.d.ts +0 -22
  93. package/dist/lib/docker.js +0 -10
  94. package/dist/lib/image.d.ts +0 -3
  95. package/dist/lib/image.js +0 -2
  96. package/dist/lib/jsonDirectory.d.ts +0 -13
  97. package/dist/lib/jsonDirectory.js +34 -18
  98. package/dist/lib/scriptBundle.d.ts +6 -0
  99. package/dist/lib/scriptBundle.js +28 -0
  100. package/dist/lib/sh.d.ts +2 -0
  101. package/dist/lib/sh.js +8 -0
  102. package/dist/lib/sleep.d.ts +0 -1
  103. package/dist/lib/sleep.js +0 -1
  104. package/dist/lib/streamFetch.d.ts +15 -0
  105. package/dist/lib/streamFetch.js +150 -0
  106. package/dist/lib/tar.d.ts +0 -1
  107. package/dist/lib/tar.js +5 -11
  108. package/dist/lib/unixSocket.d.ts +2 -0
  109. package/dist/lib/unixSocket.js +28 -0
  110. package/dist/portal-gateway/api.d.ts +14 -44
  111. package/dist/portal-gateway/api.js +1 -3
  112. package/dist/portal-gateway/control.d.ts +42 -0
  113. package/dist/portal-gateway/control.js +657 -0
  114. package/dist/portal-gateway/gatewayClient.d.ts +5 -0
  115. package/dist/portal-gateway/gatewayClient.js +4 -0
  116. package/dist/portal-gateway/gatewayService.d.ts +8 -38
  117. package/dist/portal-gateway/gatewayService.js +82 -254
  118. package/dist/portal-gateway/image.d.ts +0 -1
  119. package/dist/portal-gateway/image.js +0 -2
  120. package/dist/portal-gateway/imageFiles.generated.js +2 -2
  121. package/dist/portal-gateway/portalClient.d.ts +5 -0
  122. package/dist/portal-gateway/portalClient.js +4 -0
  123. package/dist/portal-gateway/portalService.d.ts +5 -47
  124. package/dist/portal-gateway/portalService.js +19 -349
  125. package/dist/portal-gateway/transport-worker.d.ts +1 -0
  126. package/dist/portal-gateway/transport-worker.js +205 -0
  127. package/dist/portal-gateway/transportBundle.d.ts +2 -0
  128. package/dist/portal-gateway/transportBundle.generated.d.ts +1 -0
  129. package/dist/portal-gateway/transportBundle.generated.js +2 -0
  130. package/dist/portal-gateway/transportBundle.js +4 -0
  131. package/dist/portal-gateway/upstream.d.ts +0 -81
  132. package/dist/portal-gateway/upstream.js +0 -1
  133. package/dist/restore.d.ts +9 -0
  134. package/dist/restore.js +10 -0
  135. package/dist/sandbox/api.d.ts +126 -187
  136. package/dist/sandbox/api.js +5 -7
  137. package/dist/sandbox/client.d.ts +3 -0
  138. package/dist/sandbox/client.js +7 -0
  139. package/dist/sandbox/data-endpoints/dataEndpoints.d.ts +13 -0
  140. package/dist/sandbox/data-endpoints/dataEndpoints.js +100 -0
  141. package/dist/sandbox/data-endpoints/firewalledPorts.d.ts +4 -0
  142. package/dist/sandbox/data-endpoints/firewalledPorts.js +28 -0
  143. package/dist/sandbox/lib/httpOverStream.d.ts +3 -0
  144. package/dist/sandbox/lib/httpOverStream.js +21 -0
  145. package/dist/sandbox/lib/remoteFileOperations.d.ts +10 -0
  146. package/dist/sandbox/lib/remoteFileOperations.js +70 -0
  147. package/dist/sandbox/lib/shellCommand.d.ts +3 -0
  148. package/dist/sandbox/lib/shellCommand.js +7 -0
  149. package/dist/sandbox/lib/sshKey.d.ts +6 -0
  150. package/dist/sandbox/lib/sshKey.js +75 -0
  151. package/dist/sandbox/providers/boat/boatService.d.ts +3 -0
  152. package/dist/sandbox/providers/boat/boatService.js +373 -0
  153. package/dist/sandbox/providers/exedev/exeDevService.d.ts +2 -0
  154. package/dist/sandbox/providers/exedev/exeDevService.js +129 -0
  155. package/dist/sandbox/providers/exedev/exeDevToken.d.ts +1 -0
  156. package/dist/sandbox/providers/exedev/exeDevToken.js +50 -0
  157. package/dist/sandbox/providers/local/localService.d.ts +2 -0
  158. package/dist/sandbox/providers/local/localService.js +197 -0
  159. package/dist/sandbox/providers/ssh/sshService.d.ts +2 -0
  160. package/dist/sandbox/providers/ssh/sshService.js +83 -0
  161. package/dist/sandbox/providers/ssh/sshTransport.d.ts +12 -0
  162. package/dist/sandbox/providers/ssh/sshTransport.js +216 -0
  163. package/dist/sandbox/service.d.ts +3 -0
  164. package/dist/sandbox/service.js +26 -0
  165. package/dist/sandbox/storage/descriptors.d.ts +6 -0
  166. package/dist/sandbox/storage/descriptors.js +25 -0
  167. package/dist/sandbox/storage/sandboxStorage.d.ts +11 -0
  168. package/dist/sandbox/storage/sandboxStorage.js +42 -0
  169. package/dist/upstreams/anthropic.d.ts +0 -5
  170. package/dist/upstreams/anthropic.js +1 -8
  171. package/dist/upstreams/index.d.ts +2 -6
  172. package/dist/upstreams/index.js +0 -4
  173. package/dist/upstreams/openai.d.ts +0 -5
  174. package/dist/upstreams/openai.js +1 -13
  175. package/dist/vendor-types/claude/agent-sdk/bridge.d.ts +20 -4
  176. package/dist/vendor-types/claude/agent-sdk/browser-sdk.d.ts +24 -0
  177. package/dist/vendor-types/claude/agent-sdk/core.d.ts +2 -0
  178. package/dist/vendor-types/claude/agent-sdk/sdk-tools.d.ts +75 -6
  179. package/dist/vendor-types/claude/agent-sdk/sdk.d.ts +569 -100
  180. package/package.json +13 -4
  181. package/dist/agent/gatewaySignIns.d.ts +0 -5
  182. package/dist/agent/gatewaySignIns.js +0 -11
  183. package/dist/agent/session/codex/home.d.ts +0 -2
  184. package/dist/agent/session/codex/home.js +0 -4
  185. package/dist/agent/session/codex/messages.d.ts +0 -30
  186. package/dist/agent/session/codex/messages.js +0 -135
  187. package/dist/agent/session/codex/transcript.d.ts +0 -12
  188. package/dist/agent/session/codex/transcript.js +0 -22
  189. package/dist/agent/session/sdkMessages.d.ts +0 -15
  190. package/dist/agent/session/sdkMessages.js +0 -28
  191. package/dist/agent/session/workerSseConnection.d.ts +0 -31
  192. package/dist/agent/session/workerSseConnection.js +0 -76
  193. package/dist/agent/vendor-types/codex/app-server/AbsolutePathBuf.d.ts +0 -10
  194. package/dist/agent/vendor-types/codex/app-server/AbsolutePathBuf.js +0 -2
  195. package/dist/agent/vendor-types/codex/app-server/FunctionCallOutputBody.d.ts +0 -2
  196. package/dist/agent/vendor-types/codex/app-server/FunctionCallOutputBody.js +0 -2
  197. package/dist/agent/vendor-types/codex/app-server/FunctionCallOutputContentItem.d.ts +0 -22
  198. package/dist/agent/vendor-types/codex/app-server/FunctionCallOutputContentItem.js +0 -2
  199. package/dist/agent/vendor-types/codex/app-server/ImageDetail.d.ts +0 -1
  200. package/dist/agent/vendor-types/codex/app-server/ImageDetail.js +0 -2
  201. package/dist/agent/vendor-types/codex/app-server/ImageGenerationFailure.d.ts +0 -5
  202. package/dist/agent/vendor-types/codex/app-server/ImageGenerationFailure.js +0 -2
  203. package/dist/agent/vendor-types/codex/app-server/ImageGenerationItem.d.ts +0 -11
  204. package/dist/agent/vendor-types/codex/app-server/ImageGenerationItem.js +0 -2
  205. package/dist/agent/vendor-types/codex/app-server/LegacyAppPathString.d.ts +0 -23
  206. package/dist/agent/vendor-types/codex/app-server/LegacyAppPathString.js +0 -2
  207. package/dist/agent/vendor-types/codex/app-server/MessagePhase.d.ts +0 -7
  208. package/dist/agent/vendor-types/codex/app-server/MessagePhase.js +0 -2
  209. package/dist/agent/vendor-types/codex/app-server/ReasoningEffort.d.ts +0 -4
  210. package/dist/agent/vendor-types/codex/app-server/ReasoningEffort.js +0 -2
  211. package/dist/agent/vendor-types/codex/app-server/SleepItem.d.ts +0 -7
  212. package/dist/agent/vendor-types/codex/app-server/SleepItem.js +0 -2
  213. package/dist/agent/vendor-types/codex/app-server/WebSearchItem.d.ts +0 -14
  214. package/dist/agent/vendor-types/codex/app-server/WebSearchItem.js +0 -2
  215. package/dist/agent/vendor-types/codex/app-server/serde_json/JsonValue.d.ts +0 -3
  216. package/dist/agent/vendor-types/codex/app-server/serde_json/JsonValue.js +0 -2
  217. package/dist/agent/vendor-types/codex/app-server/v2/AgentMessageDelivery.d.ts +0 -1
  218. package/dist/agent/vendor-types/codex/app-server/v2/AgentMessageDelivery.js +0 -2
  219. package/dist/agent/vendor-types/codex/app-server/v2/AsyncUserInputQuestion.d.ts +0 -4
  220. package/dist/agent/vendor-types/codex/app-server/v2/AsyncUserInputQuestion.js +0 -2
  221. package/dist/agent/vendor-types/codex/app-server/v2/ByteRange.d.ts +0 -4
  222. package/dist/agent/vendor-types/codex/app-server/v2/ByteRange.js +0 -2
  223. package/dist/agent/vendor-types/codex/app-server/v2/CollabAgentState.d.ts +0 -5
  224. package/dist/agent/vendor-types/codex/app-server/v2/CollabAgentState.js +0 -2
  225. package/dist/agent/vendor-types/codex/app-server/v2/CollabAgentStatus.d.ts +0 -1
  226. package/dist/agent/vendor-types/codex/app-server/v2/CollabAgentStatus.js +0 -2
  227. package/dist/agent/vendor-types/codex/app-server/v2/CollabAgentTool.d.ts +0 -1
  228. package/dist/agent/vendor-types/codex/app-server/v2/CollabAgentTool.js +0 -2
  229. package/dist/agent/vendor-types/codex/app-server/v2/CollabAgentToolCallStatus.d.ts +0 -1
  230. package/dist/agent/vendor-types/codex/app-server/v2/CollabAgentToolCallStatus.js +0 -2
  231. package/dist/agent/vendor-types/codex/app-server/v2/CommandAction.d.ts +0 -19
  232. package/dist/agent/vendor-types/codex/app-server/v2/CommandAction.js +0 -2
  233. package/dist/agent/vendor-types/codex/app-server/v2/CommandExecutionSource.d.ts +0 -1
  234. package/dist/agent/vendor-types/codex/app-server/v2/CommandExecutionSource.js +0 -2
  235. package/dist/agent/vendor-types/codex/app-server/v2/CommandExecutionStatus.d.ts +0 -1
  236. package/dist/agent/vendor-types/codex/app-server/v2/CommandExecutionStatus.js +0 -2
  237. package/dist/agent/vendor-types/codex/app-server/v2/DynamicToolCallOutputContentItem.d.ts +0 -10
  238. package/dist/agent/vendor-types/codex/app-server/v2/DynamicToolCallOutputContentItem.js +0 -2
  239. package/dist/agent/vendor-types/codex/app-server/v2/DynamicToolCallStatus.d.ts +0 -1
  240. package/dist/agent/vendor-types/codex/app-server/v2/DynamicToolCallStatus.js +0 -2
  241. package/dist/agent/vendor-types/codex/app-server/v2/FileUpdateChange.d.ts +0 -6
  242. package/dist/agent/vendor-types/codex/app-server/v2/FileUpdateChange.js +0 -2
  243. package/dist/agent/vendor-types/codex/app-server/v2/HookPromptFragment.d.ts +0 -4
  244. package/dist/agent/vendor-types/codex/app-server/v2/HookPromptFragment.js +0 -2
  245. package/dist/agent/vendor-types/codex/app-server/v2/McpAppDisplayMode.d.ts +0 -1
  246. package/dist/agent/vendor-types/codex/app-server/v2/McpAppDisplayMode.js +0 -2
  247. package/dist/agent/vendor-types/codex/app-server/v2/McpAppUi.d.ts +0 -8
  248. package/dist/agent/vendor-types/codex/app-server/v2/McpAppUi.js +0 -2
  249. package/dist/agent/vendor-types/codex/app-server/v2/McpToolCallAppContext.d.ts +0 -7
  250. package/dist/agent/vendor-types/codex/app-server/v2/McpToolCallAppContext.js +0 -2
  251. package/dist/agent/vendor-types/codex/app-server/v2/McpToolCallError.d.ts +0 -3
  252. package/dist/agent/vendor-types/codex/app-server/v2/McpToolCallError.js +0 -2
  253. package/dist/agent/vendor-types/codex/app-server/v2/McpToolCallResult.d.ts +0 -6
  254. package/dist/agent/vendor-types/codex/app-server/v2/McpToolCallResult.js +0 -2
  255. package/dist/agent/vendor-types/codex/app-server/v2/McpToolCallStatus.d.ts +0 -1
  256. package/dist/agent/vendor-types/codex/app-server/v2/McpToolCallStatus.js +0 -2
  257. package/dist/agent/vendor-types/codex/app-server/v2/MemoryCitation.d.ts +0 -5
  258. package/dist/agent/vendor-types/codex/app-server/v2/MemoryCitation.js +0 -2
  259. package/dist/agent/vendor-types/codex/app-server/v2/MemoryCitationEntry.d.ts +0 -6
  260. package/dist/agent/vendor-types/codex/app-server/v2/MemoryCitationEntry.js +0 -2
  261. package/dist/agent/vendor-types/codex/app-server/v2/PatchApplyStatus.d.ts +0 -1
  262. package/dist/agent/vendor-types/codex/app-server/v2/PatchApplyStatus.js +0 -2
  263. package/dist/agent/vendor-types/codex/app-server/v2/PatchChangeKind.d.ts +0 -8
  264. package/dist/agent/vendor-types/codex/app-server/v2/PatchChangeKind.js +0 -2
  265. package/dist/agent/vendor-types/codex/app-server/v2/SubAgentActivityKind.d.ts +0 -1
  266. package/dist/agent/vendor-types/codex/app-server/v2/SubAgentActivityKind.js +0 -2
  267. package/dist/agent/vendor-types/codex/app-server/v2/TextElement.d.ts +0 -11
  268. package/dist/agent/vendor-types/codex/app-server/v2/TextElement.js +0 -2
  269. package/dist/agent/vendor-types/codex/app-server/v2/ThreadItem.d.ts +0 -215
  270. package/dist/agent/vendor-types/codex/app-server/v2/ThreadItem.js +0 -2
  271. package/dist/agent/vendor-types/codex/app-server/v2/UserInput.d.ts +0 -35
  272. package/dist/agent/vendor-types/codex/app-server/v2/UserInput.js +0 -2
  273. package/dist/agent/vendor-types/codex/app-server/v2/WebSearchAction.d.ts +0 -14
  274. package/dist/agent/vendor-types/codex/app-server/v2/WebSearchAction.js +0 -2
  275. package/dist/cli/services.d.ts +0 -19
  276. package/dist/cli/services.js +0 -34
  277. package/dist/dimension/http.d.ts +0 -7
  278. package/dist/dimension/http.js +0 -77
  279. package/dist/dimension/storage.d.ts +0 -39
  280. package/dist/dimension/storage.js +0 -79
  281. package/dist/portal-gateway/fakes.d.ts +0 -3
  282. package/dist/portal-gateway/fakes.js +0 -11
  283. package/dist/portal-gateway/gatewayStorage.d.ts +0 -66
  284. package/dist/portal-gateway/gatewayStorage.js +0 -125
  285. package/dist/portal-gateway/portalStorage.d.ts +0 -34
  286. package/dist/portal-gateway/portalStorage.js +0 -44
  287. package/dist/sandbox/boatService.d.ts +0 -52
  288. package/dist/sandbox/boatService.js +0 -343
  289. package/dist/sandbox/containerService.d.ts +0 -15
  290. package/dist/sandbox/containerService.js +0 -184
  291. package/dist/sandbox/endpointProxy.d.ts +0 -90
  292. package/dist/sandbox/endpointProxy.js +0 -716
  293. package/dist/sandbox/exeDevAuth.d.ts +0 -16
  294. package/dist/sandbox/exeDevAuth.js +0 -49
  295. package/dist/sandbox/localService.d.ts +0 -19
  296. package/dist/sandbox/localService.js +0 -200
  297. package/dist/sandbox/sseConnection.d.ts +0 -41
  298. package/dist/sandbox/sseConnection.js +0 -166
  299. package/dist/sandbox/sshService.d.ts +0 -30
  300. package/dist/sandbox/sshService.js +0 -680
@@ -1,157 +1,158 @@
1
- import type { ModelInfo, SDKBackgroundTasksChangedMessage, PermissionResult, SDKAssistantMessage, SDKPartialAssistantMessage, SDKResultMessage, SDKSystemMessage, SDKUserMessage } from "../vendor-types/claude/agent-sdk/sdk.js";
1
+ import type { ModelInfo, SDKBackgroundTasksChangedMessage, PermissionResult, SDKAssistantMessage, SDKCompactBoundaryMessage, SDKPartialAssistantMessage, SDKResultMessage, SDKSystemMessage, SDKUserMessage } from "../vendor-types/claude/agent-sdk/sdk.js";
2
2
  import type { AskUserQuestionInput } from "../vendor-types/claude/agent-sdk/sdk-tools.js";
3
3
  import type { CPULimit, MemoryLimit } from "../dimension/api.ts";
4
- import type { SandboxEndpoint, SandboxEndpointScheme } from "../sandbox/api.ts";
5
- /** A session worker running in a dimension; it hosts that agent's sessions. */
6
4
  export type Agent = {
7
5
  name: string;
8
6
  dimensionName: string;
9
7
  };
10
- /** The agent CLIs a session can run (agent/session/<backend>/). */
11
8
  export declare const AGENT_BACKENDS: readonly ["claude", "codex"];
9
+ export declare const AGENT_PERMISSION_MODES: readonly ["ask", "auto"];
10
+ export type AgentPermissionMode = (typeof AGENT_PERMISSION_MODES)[number];
12
11
  export type AgentBackend = (typeof AGENT_BACKENDS)[number];
13
12
  export type AgentSession = {
14
13
  name: string;
15
14
  backend: AgentBackend;
16
15
  memoryLimit: MemoryLimit;
17
16
  cpuLimit: CPULimit;
18
- /** Dimension path the agent works in; defaults to the workspace. */
19
17
  cwd?: string;
20
- /** Extra environment for the agent CLI (e.g. ANTHROPIC_BASE_URL). */
21
18
  env?: Record<string, string>;
22
19
  };
23
- /** What `updateSession` can change; omitted limits stay as they are. */
24
20
  export type AgentSessionLimits = Partial<Pick<AgentSession, "memoryLimit" | "cpuLimit">>;
25
- /**
26
- * Where a session's CLI stands, as the CLI itself reports it (claude's session state, codex's thread
27
- * status). "stopped": no CLI running (none started yet, or it exited; the next message starts one).
28
- * "waiting": a turn is blocked on a permission request or a question. "error": the CLI says it can't
29
- * go on (codex's systemError).
30
- */
31
- export type AgentSessionState = "stopped" | "starting" | "idle" | "running" | "waiting" | "error";
21
+ export type AgentSessionUpdate = Partial<Omit<AgentSession, "name">>;
22
+ export type AgentSessionState = ({
23
+ readonly state: "exited";
24
+ readonly code: number | null;
25
+ readonly signal: string | null;
26
+ readonly error?: string;
27
+ } | {
28
+ readonly state: "installing";
29
+ readonly backend: AgentBackend;
30
+ readonly version: string;
31
+ } | {
32
+ readonly state: "starting";
33
+ } | {
34
+ readonly state: "waiting";
35
+ } | {
36
+ readonly state: "idle";
37
+ } | {
38
+ readonly state: "tool";
39
+ readonly tools: readonly string[];
40
+ } | {
41
+ readonly state: "thinking";
42
+ }) & {
43
+ readonly since?: number;
44
+ };
45
+ export type AgentStatusMessage = {
46
+ readonly type: "session_status";
47
+ readonly status: AgentSessionState;
48
+ };
49
+ export type AgentPromptFailedMessage = {
50
+ readonly type: "prompt_failed";
51
+ readonly uuid: string;
52
+ readonly error: string;
53
+ };
54
+ export type AgentNoticeMessage = {
55
+ readonly type: "session_notice";
56
+ readonly text: string;
57
+ };
58
+ export type AgentCompactionMessage = Omit<SDKCompactBoundaryMessage, "compact_metadata"> & {
59
+ readonly compact_metadata?: SDKCompactBoundaryMessage["compact_metadata"];
60
+ readonly timestamp?: string;
61
+ };
62
+ export type AgentSessionEvent = {
63
+ readonly kind: "review";
64
+ readonly state: "entered" | "exited";
65
+ readonly review: string;
66
+ } | {
67
+ readonly kind: "subagent";
68
+ readonly activity: "started" | "interacted" | "interrupted" | "completed";
69
+ readonly agent: string;
70
+ readonly path: string;
71
+ };
72
+ export type AgentEventMessage = {
73
+ readonly type: "system";
74
+ readonly subtype: "session_event";
75
+ readonly event: AgentSessionEvent;
76
+ readonly uuid: string;
77
+ readonly session_id: string;
78
+ readonly timestamp?: string;
79
+ };
80
+ export type AgentAssistantMessage = SDKAssistantMessage & {
81
+ readonly phase?: "commentary" | "final";
82
+ readonly async?: true;
83
+ };
32
84
  export type AgentSessionInfo = AgentSession & {
33
85
  readonly agentName: string;
34
86
  readonly status: AgentSessionState;
35
- /** The backend's own id for the conversation (claude's session id, codex's thread id), once known. */
36
87
  readonly nativeId: string | null;
37
- /** Chosen through AgentModels; null for the backend's default. */
38
88
  readonly model: string | null;
89
+ readonly permissionMode: AgentPermissionMode;
39
90
  };
40
- /** Where a session lives: sessions are named per agent. */
41
91
  export type SessionRef = {
42
92
  agentName: string;
43
93
  sessionName: string;
44
94
  };
45
95
  /** @sealed */
46
96
  export interface AgentClient {
47
- /** PUT /v1/agents/:agentName — starts (or updates) the worker in the dimension. */
48
97
  createAgent(agent: Agent): Promise<Agent>;
49
- /** DELETE /v1/agents/:agentName — stops the worker and its sessions. */
50
98
  stopAgent(agentName: string): Promise<void>;
51
- /** GET /v1/agents */
52
99
  listAgents(): Promise<Agent[]>;
53
- /** POST /v1/agents/:agentName/sessions — idempotent for the same spec. */
54
100
  createSession(agentName: string, session: AgentSession): Promise<AgentSessionInfo>;
55
- /** PATCH /v1/agents/:agentName/sessions/:sessionName — changes its limits. */
56
- updateSession(ref: SessionRef, limits: AgentSessionLimits): Promise<AgentSessionInfo>;
57
- /** GET /v1/sessions — every agent's sessions. */
101
+ updateSession(ref: SessionRef, update: AgentSessionUpdate): Promise<AgentSessionInfo>;
58
102
  listSessions(): Promise<AgentSessionInfo[]>;
59
- /** DELETE /v1/agents/:agentName/sessions/:sessionName — ends the CLI and forgets the session. */
60
103
  stopSession(ref: SessionRef): Promise<void>;
104
+ restoreAgents(): Promise<string[]>;
61
105
  }
62
106
  export type AgentStreamingRequest = {
63
- /**
64
- * The `uuid` of the last user or assistant message already seen (e.g. the prompt just sent);
65
- * omitted to read the whole conversation. Those uuids are the backend's own ids for the messages
66
- * it stores, so a stream resumes from the backend's transcript; partial output and results aren't
67
- * stored and can't be resumed from.
68
- */
69
107
  after_id?: string;
70
108
  };
71
- /**
72
- * The SDK messages a session streams. `stream_event` messages are the partial assistant output;
73
- * `assistant`/`user` the complete messages (tool calls and their results included), each with the
74
- * uuid its backend stores it under; `result` ends each turn. codex sessions emit no `system` message.
75
- */
76
- export type AgentStreamingMessage = SDKSystemMessage | SDKAssistantMessage | SDKPartialAssistantMessage | (SDKUserMessage & {
109
+ export type AgentStreamingMessage = SDKSystemMessage | AgentAssistantMessage | SDKPartialAssistantMessage | (SDKUserMessage & {
77
110
  uuid: string;
78
111
  session_id: string;
79
- }) | SDKResultMessage;
80
- /** A complete message of the conversation so far (no partial output), as the stream carried it. */
112
+ }) | SDKResultMessage | AgentCompactionMessage | AgentEventMessage | AgentStatusMessage | AgentPromptFailedMessage | AgentNoticeMessage;
81
113
  export type AgentTranscriptMessage = Extract<AgentStreamingMessage, {
82
114
  type: "user" | "assistant";
83
- }>;
115
+ }> | AgentCompactionMessage | AgentEventMessage;
84
116
  export type AgentTranscriptRequest = {
85
- /** How many messages a page holds, about (a tool call and its result share a page); default 50, at most 500. */
86
117
  limit?: number;
87
- /**
88
- * An ISO 8601 time: the page holds the newest messages from before it (a page's `nextBefore`, for
89
- * the page before that one); omitted for the newest page.
90
- */
91
118
  before?: string;
92
- /** @deprecated `before` by its old name: a page's `nextCursor` is its `nextBefore`. */
119
+ toolUseId?: string;
120
+ /** @deprecated */
93
121
  cursor?: string;
94
122
  };
95
- /**
96
- * Newest pages first; each page's messages oldest first. `nextBefore` is the time of its oldest
97
- * message, when there are older ones: every message of that time is on this page.
98
- */
99
123
  export type AgentTranscriptPage = {
100
124
  readonly messages: AgentTranscriptMessage[];
101
125
  readonly nextBefore: string | null;
102
- /** @deprecated `nextBefore` by its old name, for requests that give it as `cursor`. */
126
+ /** @deprecated */
103
127
  readonly nextCursor: string | null;
104
128
  };
105
129
  export type UserMessage = SDKUserMessage;
106
- /**
107
- * A tool call waiting for permission: claude's canUseTool call. The SDK's own permission request (its
108
- * `can_use_tool` control request) isn't exported, so this mirrors it.
109
- */
110
130
  export type AgentPermissionRequest = {
111
131
  readonly id: string;
112
132
  readonly tool_name: string;
113
133
  readonly input: Record<string, unknown>;
114
134
  readonly tool_use_id: string;
115
- /** Why the agent asks, when it says (e.g. codex's reason for wanting network access). */
116
135
  readonly decision_reason?: string;
117
136
  };
118
137
  export type AgentPermissionResult = PermissionResult;
119
138
  type AskUserQuestion = AskUserQuestionInput["questions"][number];
120
- /** A question of claude's AskUserQuestion tool; codex's may come with any number of options. */
121
139
  export type AgentQuestion = Omit<AskUserQuestion, "options"> & {
122
140
  readonly options: AskUserQuestion["options"][number][];
123
141
  };
124
- /** The agent asking the user something (claude's AskUserQuestion, codex's request_user_input). */
125
142
  export type AgentQuestionRequest = {
126
143
  readonly id: string;
127
144
  readonly tool_use_id: string;
128
145
  readonly questions: AgentQuestion[];
129
146
  };
130
- /**
131
- * AskUserQuestion's own answer: question text -> the chosen label (labels joined with ", " for a
132
- * multi-select), or the user's own words.
133
- */
134
147
  export type AgentQuestionResponse = {
135
148
  answers: NonNullable<AskUserQuestionInput["answers"]>;
136
149
  };
137
- /** One of the models a session can be switched to. */
138
150
  export type AgentModelInfo = ModelInfo;
139
- /**
140
- * A task the agent keeps running after the tool call that started it has returned: claude's
141
- * background commands and agents (its own shape, from background_tasks_changed), codex's background
142
- * terminals.
143
- */
144
151
  export type AgentBackgroundTask = SDKBackgroundTasksChangedMessage["tasks"][number];
145
- /**
146
- * Where a session's CLI stands with its sign-in. The CLI signs in as it normally would, through the
147
- * dimension's gateway, which keeps the real tokens and gives the CLI fakes. "pending": a sign-in is
148
- * waiting for the user to open `url` (and, for codex, enter `userCode` there; for claude, send back
149
- * the code the page shows, when `needsCode`).
150
- */
151
152
  export type AgentAuthStatus = {
152
153
  readonly state: "signedIn";
153
154
  } | {
154
- readonly state: "signedOut"; /** Why the last sign-in failed, if one did. */
155
+ readonly state: "signedOut";
155
156
  readonly error?: string;
156
157
  } | {
157
158
  readonly state: "pending";
@@ -159,156 +160,108 @@ export type AgentAuthStatus = {
159
160
  readonly userCode?: string;
160
161
  readonly needsCode: boolean;
161
162
  };
162
- /**
163
- * A backend in an agent's dimension: the version installed (null: none), and whether it's ready to
164
- * run, i.e. this release's version, complete. Kept in the dimension's state directory, so it lasts as
165
- * long as the dimension, its container recreated or not.
166
- */
167
163
  export type AgentBackendInfo = {
168
164
  readonly backend: AgentBackend;
169
165
  readonly version: string | null;
170
166
  readonly ready: boolean;
167
+ readonly pinned: string;
171
168
  };
172
169
  /** @sealed */
173
170
  export interface AgentProvision {
174
- /**
175
- * POST /v1/agents/:agentName/backends/:backend/install — installs the backend in the dimension, or
176
- * updates it, or completes it; nothing to do when it's ready. Downloads through the dimension's portals.
177
- */
178
171
  install(agentName: string, backend: AgentBackend): Promise<void>;
179
- /** GET /v1/agents/:agentName/backends — each backend, as installed in the agent's dimension. */
180
172
  listBackends(agentName: string): Promise<AgentBackendInfo[]>;
181
173
  }
182
174
  /** @sealed */
183
- export interface AgentEndpoint {
184
- /**
185
- * POST /v1/agents/:agentName/endpoint — the agent's worker, reachable from the client over the
186
- * network (workerSseConnector speaks to it), authenticated by `scheme`, callable from pages of
187
- * `allowedOrigins`. Its URL lasts, but the proxy behind it doesn't: an archived and resumed Boat
188
- * sandbox, or a reboot, stops it, and a page connecting then gets what a browser reports as a CORS
189
- * error. This call (three round trips to the host when nothing changed) starts the agent's worker
190
- * and the endpoint's proxy again if they stopped, keeping the same URL and credentials: give
191
- * workerSseConnector a function that calls it, and it calls it again whenever a connection fails
192
- * to open; an endpoint kept elsewhere goes stale. Origins add up: those given join the endpoint's own, in place, so
193
- * pages already connected stay connected, and a call with fewer (or none) removes nothing. A new
194
- * endpoint only for another scheme, or once the old one can't be served (its port taken); the old
195
- * one's connections end then. Closed with the agent. Needs a host that declares endpoints.
196
- */
197
- exposeAgent(agentName: string, scheme: SandboxEndpointScheme, allowedOrigins?: string[]): Promise<SandboxEndpoint>;
198
- }
199
- /** @sealed */
200
175
  export interface AgentStream {
201
- /**
202
- * GET /v1/agents/:agentName/sessions/:sessionName/stream?after_id= — the complete messages after
203
- * `after_id` from the backend's transcript, then each message as the session produces it, pushed
204
- * by the worker (session/subscribe) until the caller stops reading. Throws if the worker goes
205
- * away; resume with the last user or assistant uuid seen.
206
- */
207
176
  getStream(ref: SessionRef, req: AgentStreamingRequest): AsyncGenerator<AgentStreamingMessage>;
208
177
  }
209
178
  /** @sealed */
210
179
  export interface AgentTranscript {
211
- /**
212
- * GET /v1/agents/:agentName/sessions/:sessionName/transcript?limit=&before= (or &cursor=, its old name) — a page of the
213
- * conversation, read from the backend's own storage a piece at a time, so a conversation of any
214
- * length can be paged through.
215
- */
216
180
  getTranscript(ref: SessionRef, req?: AgentTranscriptRequest): Promise<AgentTranscriptPage>;
217
181
  }
218
182
  /** @sealed */
219
183
  export interface AgentInterrupt {
220
- /** POST /v1/agents/:agentName/sessions/:sessionName/interrupt — ends the current turn; pending permission requests are denied and questions dropped. */
221
184
  cancel(ref: SessionRef): Promise<void>;
222
185
  }
223
186
  /** @sealed */
224
187
  export interface AgentInput {
225
- /**
226
- * POST /v1/agents/:agentName/sessions/:sessionName/messages — resolves once the agent confirms it
227
- * received the message (it starts a turn, or waits in the agent's own queue); fails if the agent
228
- * refuses it or doesn't confirm.
229
- */
230
188
  sendMessage(ref: SessionRef, message: UserMessage): Promise<void>;
231
189
  }
232
190
  /** @sealed */
233
191
  export interface AgentSessionStatus {
234
- /** GET /v1/agents/:agentName/sessions/:sessionName/status */
235
192
  getSessionStatus(ref: SessionRef): Promise<AgentSessionState>;
236
193
  }
237
194
  /** @sealed */
238
195
  export interface AgentMessageQueue {
239
- /**
240
- * GET /v1/agents/:agentName/sessions/:sessionName/queue — from the agent (claude's command
241
- * lifecycle, codex's turn items), oldest first: the last message it took into a turn, then every
242
- * one it still holds queued. While no CLI runs (nothing can be queued), the last prompt in its
243
- * transcript. Empty before the first message.
244
- */
245
196
  getLastUserMessages(ref: SessionRef): Promise<AgentLastUserMessage[]>;
246
197
  }
247
198
  /** @sealed */
248
199
  export interface AgentPermissions {
249
- /** GET /v1/agents/:agentName/sessions/:sessionName/permission-requests — the ones still waiting. */
250
200
  listPermissionRequests(ref: SessionRef): Promise<AgentPermissionRequest[]>;
251
- /** POST /v1/agents/:agentName/sessions/:sessionName/permission-requests/:requestId */
252
201
  respondPermissionRequest(ref: SessionRef, requestId: string, result: AgentPermissionResult): Promise<void>;
253
202
  }
254
203
  /** @sealed */
255
204
  export interface AgentQuestions {
256
- /** GET /v1/agents/:agentName/sessions/:sessionName/question-requests — the ones still waiting. */
257
205
  listQuestionRequests(ref: SessionRef): Promise<AgentQuestionRequest[]>;
258
- /** POST /v1/agents/:agentName/sessions/:sessionName/question-requests/:requestId */
259
206
  respondQuestionRequest(ref: SessionRef, requestId: string, response: AgentQuestionResponse): Promise<void>;
260
207
  }
261
208
  /** @sealed */
262
209
  export interface AgentBackgroundTasks {
263
- /** GET /v1/agents/:agentName/sessions/:sessionName/background-tasks — those still running; none while the CLI isn't. */
264
210
  listBackgroundTasks(ref: SessionRef): Promise<AgentBackgroundTask[]>;
265
- /** POST /v1/agents/:agentName/sessions/:sessionName/background-tasks/:taskId/stop — ends the task. */
266
211
  stopTask(ref: SessionRef, taskId: string): Promise<void>;
267
212
  }
268
213
  /** @sealed */
269
214
  export interface AgentAuth {
270
- /** GET /v1/agents/:agentName/sessions/:sessionName/auth */
271
215
  getAuthStatus(ref: SessionRef): Promise<AgentAuthStatus>;
272
- /**
273
- * POST /v1/agents/:agentName/sessions/:sessionName/auth/login — signs the session's CLI in with
274
- * its own login. When the dimension's gateway already holds the upstream's credential, the sign-in
275
- * completes without anyone (the gateway answers it) and this resolves signed in; otherwise it
276
- * resolves pending, with the link for the user, and the gateway keeps the tokens once they sign in.
277
- */
278
216
  login(ref: SessionRef): Promise<AgentAuthStatus>;
279
- /** POST /v1/agents/:agentName/sessions/:sessionName/auth/code — finishes a pending sign-in that needs the page's code. */
280
217
  submitAuthCode(ref: SessionRef, code: string): Promise<AgentAuthStatus>;
281
218
  }
282
219
  /** @sealed */
283
220
  export interface AgentModels {
284
- /** GET /v1/agents/:agentName/sessions/:sessionName/models — starts the CLI if it isn't running. */
285
221
  listModels(ref: SessionRef): Promise<AgentModelInfo[]>;
286
- /** PUT /v1/agents/:agentName/sessions/:sessionName/model — from the next turn on; null for the backend's default. */
287
222
  setModel(ref: SessionRef, model: string | null): Promise<void>;
288
223
  }
289
- /** Everything a session can do, each call naming the session. */
290
- export type AgentSessionCapabilities = AgentStream & AgentTranscript & AgentInterrupt & AgentInput & AgentSessionStatus & AgentMessageQueue & AgentPermissions & AgentQuestions & AgentBackgroundTasks & AgentAuth & AgentModels;
291
- /** A message sent to a session, and whether its agent still holds it queued (not yet taken into a turn). */
224
+ /** @sealed */
225
+ export interface AgentPermissionModes {
226
+ setPermissionMode(ref: SessionRef, mode: AgentPermissionMode): Promise<void>;
227
+ }
228
+ export type AgentModelUsage = {
229
+ readonly model: string;
230
+ readonly inputTokens: number;
231
+ readonly outputTokens: number;
232
+ readonly cacheReadTokens: number;
233
+ readonly cacheWriteTokens: number;
234
+ readonly costUsd: number | null;
235
+ };
236
+ export type AgentTurnUsage = {
237
+ readonly id: string;
238
+ readonly startedAt: string;
239
+ readonly endedAt: string;
240
+ readonly models: AgentModelUsage[];
241
+ readonly costUsd: number | null;
242
+ };
243
+ /** @sealed */
244
+ export interface AgentUsage {
245
+ getUsage(ref: SessionRef): Promise<AgentTurnUsage[]>;
246
+ }
247
+ export type AgentSessionCapabilities = AgentStream & AgentTranscript & AgentInterrupt & AgentInput & AgentSessionStatus & AgentMessageQueue & AgentPermissions & AgentQuestions & AgentBackgroundTasks & AgentAuth & AgentModels & AgentPermissionModes & AgentUsage;
248
+ /** @sealed */
249
+ export interface DimensionAgentClient extends Pick<AgentClient, "createSession" | "updateSession" | "listSessions" | "stopSession">, AgentProvision, AgentSessionCapabilities {
250
+ listAgents(): Promise<string[]>;
251
+ }
292
252
  export type AgentLastUserMessage = {
293
253
  readonly message: UserMessage;
294
254
  readonly queued: boolean;
295
255
  };
296
- /** The request can't be satisfied as sent (bad name, unknown backend, unknown after_id, ...). */
297
256
  export declare class AgentInvalidError extends Error {
298
257
  name: string;
299
258
  }
300
- /** No agent, session, permission or question request by that name. */
301
259
  export declare class AgentNotFoundError extends Error {
302
260
  name: string;
303
261
  }
304
- /** The name is taken with a different spec. */
305
262
  export declare class AgentConflictError extends Error {
306
263
  name: string;
307
264
  }
308
- /**
309
- * The session's backend isn't installed in its dimension, or not completely (AgentBackendInfo.ready):
310
- * AgentProvision.install puts it there. A conflict with the dimension's state, so caught as one too.
311
- */
312
265
  export declare class AgentBackendNotInstalledError extends AgentConflictError {
313
266
  name: string;
314
267
  }
package/dist/agent/api.js CHANGED
@@ -1,21 +1,14 @@
1
- /** The agent CLIs a session can run (agent/session/<backend>/). */
2
1
  export const AGENT_BACKENDS = ["claude", "codex"];
3
- /** The request can't be satisfied as sent (bad name, unknown backend, unknown after_id, ...). */
2
+ export const AGENT_PERMISSION_MODES = ["ask", "auto"];
4
3
  export class AgentInvalidError extends Error {
5
4
  name = "AgentInvalidError";
6
5
  }
7
- /** No agent, session, permission or question request by that name. */
8
6
  export class AgentNotFoundError extends Error {
9
7
  name = "AgentNotFoundError";
10
8
  }
11
- /** The name is taken with a different spec. */
12
9
  export class AgentConflictError extends Error {
13
10
  name = "AgentConflictError";
14
11
  }
15
- /**
16
- * The session's backend isn't installed in its dimension, or not completely (AgentBackendInfo.ready):
17
- * AgentProvision.install puts it there. A conflict with the dimension's state, so caught as one too.
18
- */
19
12
  export class AgentBackendNotInstalledError extends AgentConflictError {
20
13
  name = "AgentBackendNotInstalledError";
21
14
  }
@@ -1,3 +1,5 @@
1
1
  export { createWorkerClient, type WorkerClient } from "./session/client.ts";
2
2
  export { sharedConnector, type SharedConnector } from "./session/sharedConnection.ts";
3
- export { EndpointLoginRequiredError, EndpointUnreachableError, exeDevLoginUrl, workerSseConnector, type WorkerEndpoint } from "./session/workerSseConnection.ts";
3
+ export type { ConnectWorker } from "./session/workerConnection.ts";
4
+ export { EndpointCredentialsError, EndpointUnreachableError, workerGatewayConnector } from "./session/workerGatewayConnection.ts";
5
+ export { WorkerErrorCode } from "./session/worker/protocol.ts";
@@ -1,5 +1,4 @@
1
- // An agent's worker, reached through its endpoint (AgentService.exposeAgent): what a browser can
2
- // import (hyperbrane/agent/client), since the root module brings the server side with it.
3
1
  export { createWorkerClient } from "./session/client.js";
4
2
  export { sharedConnector } from "./session/sharedConnection.js";
5
- export { EndpointLoginRequiredError, EndpointUnreachableError, exeDevLoginUrl, workerSseConnector } from "./session/workerSseConnection.js";
3
+ export { EndpointCredentialsError, EndpointUnreachableError, workerGatewayConnector } from "./session/workerGatewayConnection.js";
4
+ export { WorkerErrorCode } from "./session/worker/protocol.js";
@@ -0,0 +1,23 @@
1
+ import type { Sandbox } from "../sandbox/api.ts";
2
+ import { type Agent, type AgentBackend, type AgentBackendInfo, type AgentSessionInfo, type SessionRef } from "./api.ts";
3
+ export declare const WORKER_DIR: string;
4
+ export type ControlOptions = {
5
+ dataDirectory?: string;
6
+ };
7
+ export declare function createAgentScript(host: Sandbox, agent: Agent, options?: ControlOptions & {
8
+ replaceBuild?: boolean;
9
+ }): Promise<void>;
10
+ export declare function stopAgentScript(host: Sandbox, agentName: string, options?: ControlOptions): Promise<void>;
11
+ export declare function listAgentsScript(host: Sandbox, options?: ControlOptions): Promise<Agent[]>;
12
+ export declare function listSessionsScript(host: Sandbox, options?: ControlOptions): Promise<AgentSessionInfo[]>;
13
+ export declare function installScript(host: Sandbox, agentName: string, backend: AgentBackend, options?: ControlOptions): Promise<void>;
14
+ export declare function loginStateScript(host: Sandbox, ref: SessionRef, options?: ControlOptions): Promise<{
15
+ backend: AgentBackend;
16
+ gatewaySignedIn: boolean;
17
+ }>;
18
+ export declare function agentsDownScript(host: Sandbox, options?: ControlOptions): Promise<Agent[]>;
19
+ export declare function workerSocketScript(host: Sandbox, agentName: string, options?: ControlOptions): Promise<{
20
+ dimensionName: string;
21
+ socket: string;
22
+ }>;
23
+ export declare function listBackendsScript(host: Sandbox, agentName: string, options?: ControlOptions): Promise<AgentBackendInfo[]>;