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,82 +1,68 @@
1
- import type { AgentBackendInfo, AgentBackgroundTasks, AgentInput, AgentInterrupt, AgentMessageQueue, AgentModels, AgentPermissionRequest, AgentPermissionResult, AgentQuestionRequest, AgentQuestionResponse, AgentSession, AgentSessionStatus, AgentStreamingMessage, SessionRef } from "../api.ts";
2
- import type { FileTranscript, TranscriptFiles } from "./fileTranscript.ts";
3
- /** A capability's calls for one session: those of api.ts, with the session already chosen. */
1
+ import type { AgentBackendInfo, AgentBackgroundTasks, AgentInput, AgentInterrupt, AgentMessageQueue, AgentModels, AgentPermissionMode, AgentPermissionModes, AgentPermissionRequest, AgentPermissionResult, AgentQuestionRequest, AgentQuestionResponse, AgentSession, AgentStreamingMessage, AgentTurnUsage, SessionRef } from "../api.ts";
2
+ import type { Transcript, TranscriptFiles } from "./fileTranscript.ts";
4
3
  export type ForSession<Capability> = {
5
4
  [K in keyof Capability]: Capability[K] extends (ref: SessionRef, ...args: infer Args) => infer Result ? (...args: Args) => Result : never;
6
5
  };
7
- /** What one session's CLI runs with. */
8
6
  export type SessionLaunch = {
9
7
  spec: AgentSession;
10
- /** The backend's id for the conversation, from an earlier run, to resume it; null for a new one. */
11
8
  nativeId: string | null;
12
9
  cwd: string;
13
- /** The model chosen through AgentModels; null for the backend's default. */
14
10
  model: string | null;
15
- /** Where backends are installed (see SessionBackend.install). */
11
+ permissionMode: AgentPermissionMode;
16
12
  installDir: string;
17
- /** The worker's own environment, the CLI pointed at its home, and the session's. */
18
13
  env: Record<string, string>;
19
14
  };
20
- /** What the CLI reports to, and asks of, the worker. */
21
15
  export type SessionCallbacks = {
22
- /** Appends to the session's stream. */
23
16
  emit(message: AgentStreamingMessage): void;
24
- /** Records the backend's conversation id, so a later run can resume it. */
25
17
  setNativeId(id: string): void;
26
- /** The decision on a tool call: someone's answer, or a denial once the turn is interrupted, the session stops, or `signal` aborts. */
27
18
  requestPermission(request: Omit<AgentPermissionRequest, "id">, signal?: AbortSignal): Promise<AgentPermissionResult>;
28
- /** The user's answers, or null once the turn is interrupted, the session stops, or `signal` aborts. */
29
19
  askQuestions(request: Omit<AgentQuestionRequest, "id">, signal?: AbortSignal): Promise<AgentQuestionResponse | null>;
30
- /** The CLI is gone (crashed, or closed); the next message starts it again. */
31
- exited(error?: Error): void;
20
+ exited(exit: CliExit | null, error?: Error): void;
21
+ activeChanged(): void;
22
+ subagentStarted(toolUseId: string, subagentId: string): void;
23
+ };
24
+ export type CliExit = {
25
+ code: number | null;
26
+ signal: string | null;
32
27
  };
33
28
  export type SessionContext = SessionLaunch & SessionCallbacks;
34
- /** One session's running CLI: the capabilities it serves itself. */
35
- export type RunningSession = ForSession<AgentInput & AgentInterrupt & AgentSessionStatus & AgentMessageQueue & AgentModels & AgentBackgroundTasks> & {
29
+ export type RunningSession = ForSession<AgentInput & AgentInterrupt & AgentMessageQueue & AgentModels & AgentPermissionModes & AgentBackgroundTasks> & {
30
+ active(): boolean;
36
31
  close(): Promise<void>;
37
32
  };
38
- /** What a CLI's sign-in commands run with. */
39
33
  export type AuthEnvironment = {
40
34
  installDir: string;
41
35
  env: Record<string, string>;
42
36
  cwd: string;
43
37
  };
44
- /** A sign-in in progress: the CLI's own login command. */
45
38
  export interface LoginProcess {
46
- /** Resolves once the CLI has shown where to sign in. */
47
39
  prompt: Promise<{
48
40
  url: string;
49
41
  userCode?: string;
50
42
  needsCode: boolean;
51
43
  }>;
52
- /** Resolves when the CLI signed in; rejects with why it didn't. */
53
44
  done: Promise<void>;
54
- /** Gives the CLI the code the sign-in page showed. */
55
45
  submitCode(code: string): void;
56
46
  cancel(): void;
57
47
  }
58
- /** A CLI's sign-in, through its own commands. The credentials it saves are fakes when a gateway holds the real ones. */
59
48
  export type BackendAuth = {
60
49
  signedIn(environment: AuthEnvironment): Promise<boolean>;
61
- /** With `gatewaySignedIn` (the dimension's gateway holds the upstream's credential) it completes by itself: the gateway answers. */
62
50
  login(environment: AuthEnvironment, gatewaySignedIn: boolean): LoginProcess;
63
51
  };
64
- /** What finds a session's conversation in its backend's storage, read through `files`. */
65
52
  export type TranscriptSource = {
66
53
  nativeId: string;
67
54
  env: Record<string, string>;
68
55
  files: TranscriptFiles;
56
+ installDir: string;
69
57
  };
70
- /** An agent CLI, wired in agent/session/<backend>/: one file per capability. */
71
58
  export type SessionBackend = {
72
- /** Installs the backend under `installDir`, or updates it to the pinned version. Runs in the dimension. */
73
59
  install(installDir: string): Promise<void>;
74
- /** What's installed under `installDir`, and whether it's what install leaves: this release's version, complete. */
75
- installed(installDir: string): Promise<Pick<AgentBackendInfo, "version" | "ready">>;
60
+ installed(installDir: string): Promise<Omit<AgentBackendInfo, "backend">>;
76
61
  start(context: SessionContext): Promise<RunningSession>;
77
62
  auth: BackendAuth;
78
- /** The conversation `nativeId` in the backend's own storage, which needs no CLI running. */
79
- transcript(source: TranscriptSource): FileTranscript;
80
- /** The environment that points the CLI at `home` for everything it keeps (see SessionStorage.backendHome). */
63
+ transcript(source: TranscriptSource): Transcript;
64
+ findSubagent(source: TranscriptSource, toolUseId: string): Promise<string | null>;
65
+ subagentTranscript(source: TranscriptSource, subagentId: string, toolUseId: string): Transcript;
66
+ usage(source: TranscriptSource): Promise<AgentTurnUsage[]>;
81
67
  homeEnvironment(home: string): Record<string, string>;
82
68
  };
@@ -1,2 +1 @@
1
- /** Points claude at `home` for everything it keeps: its .claude.json too, which otherwise sits in the home directory. */
2
1
  export declare function claudeHomeEnvironment(home: string): Record<string, string>;
@@ -1,4 +1,3 @@
1
- /** Points claude at `home` for everything it keeps: its .claude.json too, which otherwise sits in the home directory. */
2
1
  export function claudeHomeEnvironment(home) {
3
2
  return { CLAUDE_CONFIG_DIR: home };
4
3
  }
@@ -0,0 +1,10 @@
1
+ import type { AgentBackendInfo } from "../../api.ts";
2
+ export declare const CLAUDE_SDK_PACKAGE = "../../../vendor-types/claude/agent-sdk/sdk.js";
3
+ export declare function claudePackage(): {
4
+ pkg: string;
5
+ version: string;
6
+ executables: string;
7
+ };
8
+ export declare function installClaude(installDir: string): Promise<void>;
9
+ export declare function installedClaude(installDir: string): Promise<Omit<AgentBackendInfo, "backend">>;
10
+ export declare function claudeExecutable(installDir: string): string;
@@ -0,0 +1,17 @@
1
+ import { existsSync } from "node:fs";
2
+ import { installPackage, installedPackage, pinnedVersion } from "../install.js";
3
+ export const CLAUDE_SDK_PACKAGE = "@anthropic-ai/claude-agent-sdk";
4
+ export function claudePackage() {
5
+ return { pkg: CLAUDE_SDK_PACKAGE, version: pinnedVersion("claude", CLAUDE_SDK_PACKAGE), executables: `${CLAUDE_SDK_PACKAGE}-linux-*/claude` };
6
+ }
7
+ export function installClaude(installDir) {
8
+ return installPackage(installDir, CLAUDE_SDK_PACKAGE, pinnedVersion("claude", CLAUDE_SDK_PACKAGE), () => claudeExecutable(installDir));
9
+ }
10
+ export function installedClaude(installDir) {
11
+ return installedPackage(installDir, CLAUDE_SDK_PACKAGE, pinnedVersion("claude", CLAUDE_SDK_PACKAGE), () => claudeExecutable(installDir));
12
+ }
13
+ export function claudeExecutable(installDir) {
14
+ const base = `${installDir}/node_modules/${CLAUDE_SDK_PACKAGE}-linux-${process.arch}`;
15
+ const glibc = `${base}/claude`;
16
+ return existsSync(glibc) ? glibc : `${base}-musl/claude`;
17
+ }
@@ -1,13 +1,9 @@
1
1
  import type { AgentTranscriptMessage } from "../../api.ts";
2
2
  import type { TranscriptSource } from "../backend.ts";
3
3
  import { type FileTranscript, type TranscriptLayout } from "../fileTranscript.ts";
4
- /**
5
- * The conversation from claude's own session file, <config>/projects/<cwd>/<session>.jsonl. Its user
6
- * and assistant entries are the messages the stream carried, with their uuids (claude keeps the one
7
- * a prompt was sent with); the rest (attachments, queue bookkeeping, a subagent's sidechain, meta
8
- * notes) isn't the conversation.
9
- */
10
4
  export declare function claudeTranscript({ nativeId, env, files }: TranscriptSource): FileTranscript;
11
- /** projects/<cwd>/<session>.jsonl in claude's config directory. */
5
+ export declare function claudeSubagentTranscript(source: TranscriptSource, agentId: string, toolUseId: string): FileTranscript;
6
+ export declare function claudeFindSubagent(source: TranscriptSource, toolUseId: string): Promise<string | null>;
7
+ export declare function claudeHome(env: Record<string, string>): string;
12
8
  export declare const CLAUDE_TRANSCRIPT_LAYOUT: TranscriptLayout;
13
9
  export declare function claudeLineMessages(line: unknown): AgentTranscriptMessage[];
@@ -1,29 +1,83 @@
1
- import { createFileTranscript, locateTranscript } from "../fileTranscript.js";
2
- /**
3
- * The conversation from claude's own session file, <config>/projects/<cwd>/<session>.jsonl. Its user
4
- * and assistant entries are the messages the stream carried, with their uuids (claude keeps the one
5
- * a prompt was sent with); the rest (attachments, queue bookkeeping, a subagent's sidechain, meta
6
- * notes) isn't the conversation.
7
- */
1
+ import { createFileTranscript, directoryNames, locateTranscript } from "../fileTranscript.js";
8
2
  export function claudeTranscript({ nativeId, env, files }) {
9
- const home = env.CLAUDE_CONFIG_DIR ?? `${env.HOME}/.claude`;
10
- return createFileTranscript(files, () => locateTranscript(files, home, CLAUDE_TRANSCRIPT_LAYOUT, nativeId), claudeLineMessages, CLAUDE_TRANSCRIPT_LAYOUT);
3
+ return createFileTranscript(files, () => locateTranscript(files, claudeHome(env), CLAUDE_TRANSCRIPT_LAYOUT, nativeId), claudeLineMessages, CLAUDE_TRANSCRIPT_LAYOUT);
11
4
  }
12
- /** projects/<cwd>/<session>.jsonl in claude's config directory. */
5
+ export function claudeSubagentTranscript(source, agentId, toolUseId) {
6
+ return subagentFile(source, `agent-${agentId}.jsonl`, toolUseId);
7
+ }
8
+ export async function claudeFindSubagent(source, toolUseId) {
9
+ const isResult = (message) => message.type === "user" && Array.isArray(message.message.content) && message.message.content.some((block) => block.type === "tool_result" && block.tool_use_id === toolUseId);
10
+ let found = await claudeTranscript(source).find(isResult);
11
+ const dir = found ? null : await subagentsDirectory(source);
12
+ const names = dir ? ((await directoryNames(source.files, dir)) ?? []) : [];
13
+ for (const name of names.filter((entry) => SUBAGENT_FILE.test(entry))) {
14
+ found = await subagentFile(source, name, toolUseId).find(isResult);
15
+ if (found)
16
+ break;
17
+ }
18
+ const agentId = found?.tool_use_result?.agentId;
19
+ return typeof agentId === "string" ? agentId : null;
20
+ }
21
+ function subagentFile(source, name, toolUseId) {
22
+ async function locate() {
23
+ const dir = await subagentsDirectory(source);
24
+ if (!dir)
25
+ return null;
26
+ return (await directoryNames(source.files, dir))?.includes(name) ? `${dir}/${name}` : null;
27
+ }
28
+ return createFileTranscript(source.files, locate, (line) => lineMessages(line, toolUseId), CLAUDE_TRANSCRIPT_LAYOUT);
29
+ }
30
+ async function subagentsDirectory({ nativeId, env, files }) {
31
+ const main = await locateTranscript(files, claudeHome(env), CLAUDE_TRANSCRIPT_LAYOUT, nativeId);
32
+ return main ? `${main.slice(0, -".jsonl".length)}/subagents` : null;
33
+ }
34
+ export function claudeHome(env) {
35
+ return env.CLAUDE_CONFIG_DIR ?? `${env.HOME}/.claude`;
36
+ }
37
+ const SUBAGENT_FILE = /^agent-.+\.jsonl$/;
13
38
  export const CLAUDE_TRANSCRIPT_LAYOUT = {
14
39
  dir: "projects",
15
40
  depth: 2,
16
41
  name: "{id}.jsonl",
17
42
  time: "timestamp",
18
- // Resuming a session, claude writes what it said since its last compaction again, from that compaction's line.
19
43
  copies: '"subtype":"compact_boundary"',
20
44
  };
21
45
  export function claudeLineMessages(line) {
46
+ return lineMessages(line, null);
47
+ }
48
+ function lineMessages(line, parentToolUseId) {
22
49
  const entry = line;
50
+ if (entry.type === "system" && entry.subtype === "compact_boundary")
51
+ return compaction(entry);
23
52
  if (entry.type !== "user" && entry.type !== "assistant")
24
53
  return [];
25
- if (entry.isSidechain || entry.isMeta || !entry.uuid || !entry.message)
54
+ if ((entry.isSidechain && parentToolUseId === null) || entry.isMeta || !entry.uuid || !entry.message)
55
+ return [];
56
+ const common = { parent_tool_use_id: parentToolUseId, uuid: entry.uuid, session_id: entry.sessionId ?? "", ...(entry.timestamp ? { timestamp: entry.timestamp } : {}) };
57
+ if (entry.type === "assistant")
58
+ return [{ type: "assistant", message: entry.message, ...common }];
59
+ return [{ type: "user", message: entry.message, ...common, ...(entry.toolUseResult !== undefined ? { tool_use_result: entry.toolUseResult } : {}) }];
60
+ }
61
+ function compaction(entry) {
62
+ const meta = entry.compactMetadata;
63
+ if (!entry.uuid || !meta?.trigger)
26
64
  return [];
27
- // type-bypass: claude stores the message the stream carried; its type is the SDK's.
28
- return [{ type: entry.type, message: entry.message, parent_tool_use_id: null, uuid: entry.uuid, session_id: entry.sessionId ?? "" }];
65
+ const { preservedSegment: segment, preservedMessages: preserved } = meta;
66
+ return [
67
+ {
68
+ type: "system",
69
+ subtype: "compact_boundary",
70
+ compact_metadata: {
71
+ trigger: meta.trigger,
72
+ pre_tokens: meta.preTokens ?? 0,
73
+ ...(meta.postTokens !== undefined ? { post_tokens: meta.postTokens } : {}),
74
+ ...(meta.durationMs !== undefined ? { duration_ms: meta.durationMs } : {}),
75
+ ...(segment ? { preserved_segment: { head_uuid: segment.headUuid, anchor_uuid: segment.anchorUuid, tail_uuid: segment.tailUuid } } : {}),
76
+ ...(preserved ? { preserved_messages: { anchor_uuid: preserved.anchorUuid, uuids: preserved.uuids } } : {}),
77
+ },
78
+ uuid: entry.uuid,
79
+ session_id: entry.sessionId ?? "",
80
+ ...(entry.timestamp ? { timestamp: entry.timestamp } : {}),
81
+ },
82
+ ];
29
83
  }
@@ -1,18 +1,9 @@
1
1
  import type { AgentStreamingMessage } from "../api.ts";
2
2
  import type { WorkerMethod, WorkerRequests } from "./worker/protocol.ts";
3
3
  import type { ConnectWorker } from "./workerConnection.ts";
4
- /**
5
- * The worker's protocol (protocol.ts). Errors come back as the Agent*Error they were.
6
- *
7
- * @sealed
8
- */
4
+ /** @sealed */
9
5
  export type WorkerClient = {
10
6
  call<M extends WorkerMethod>(method: M, params: WorkerRequests[M][0]): Promise<WorkerRequests[M][1]>;
11
- /**
12
- * The session's messages after `afterId`, then each one as the worker produces it, over a
13
- * connection held open while the caller reads. Throws once the worker goes away.
14
- */
15
7
  stream(sessionName: string, afterId: string | undefined): AsyncGenerator<AgentStreamingMessage>;
16
8
  };
17
- /** Calls the worker over the connections `connect` opens (workerSocketConnector: its unix socket). */
18
9
  export declare function createWorkerClient(connect: ConnectWorker): WorkerClient;
@@ -1,6 +1,4 @@
1
- /** Calls the worker over the connections `connect` opens (workerSocketConnector: its unix socket). */
2
1
  export function createWorkerClient(connect) {
3
- /** One request on a connection of its own. */
4
2
  async function call(method, params) {
5
3
  const connection = await connect();
6
4
  try {
@@ -37,7 +35,6 @@ export function createWorkerClient(connect) {
37
35
  }
38
36
  }
39
37
  finally {
40
- // On a shared connection (sharedConnector) the worker would go on sending to it otherwise.
41
38
  if (!ended)
42
39
  connection.request("session/unsubscribe", { subscription }).catch(() => { });
43
40
  connection.close();
@@ -0,0 +1,14 @@
1
+ import type { AgentBackendInfo } from "../../api.ts";
2
+ export declare const CODEX_PACKAGE = "@openai/codex";
3
+ export declare function codexPackage(): {
4
+ pkg: string;
5
+ version: string;
6
+ executables: string;
7
+ };
8
+ export declare function installCodex(installDir: string): Promise<void>;
9
+ export declare function installedCodex(installDir: string): Promise<Omit<AgentBackendInfo, "backend">>;
10
+ export type CodexExecutable = {
11
+ path: string;
12
+ env: Record<string, string>;
13
+ };
14
+ export declare function codexExecutable(installDir: string): CodexExecutable;
@@ -0,0 +1,25 @@
1
+ import { installPackage, installedPackage, pinnedVersion } from "../install.js";
2
+ export const CODEX_PACKAGE = "@openai/codex";
3
+ const CODEX_VERSION = () => pinnedVersion("codex", CODEX_PACKAGE, "@openai/codex-sdk");
4
+ export function codexPackage() {
5
+ return { pkg: CODEX_PACKAGE, version: CODEX_VERSION(), executables: "@openai/codex-linux-*/vendor/*/bin/codex" };
6
+ }
7
+ export function installCodex(installDir) {
8
+ return installPackage(installDir, CODEX_PACKAGE, CODEX_VERSION(), () => codexExecutable(installDir).path);
9
+ }
10
+ export function installedCodex(installDir) {
11
+ return installedPackage(installDir, CODEX_PACKAGE, CODEX_VERSION(), () => codexExecutable(installDir).path);
12
+ }
13
+ const LINUX_TARGETS = {
14
+ x64: { pkg: "@openai/codex-linux-x64", triple: "x86_64-unknown-linux-musl" },
15
+ arm64: { pkg: "@openai/codex-linux-arm64", triple: "aarch64-unknown-linux-musl" },
16
+ };
17
+ export function codexExecutable(installDir) {
18
+ const target = LINUX_TARGETS[process.arch];
19
+ if (process.platform !== "linux" || !target)
20
+ throw new Error(`codex: unsupported platform ${process.platform}/${process.arch}`);
21
+ return {
22
+ path: `${installDir}/node_modules/${target.pkg}/vendor/${target.triple}/bin/codex`,
23
+ env: { CODEX_MANAGED_PACKAGE_ROOT: `${installDir}/node_modules/${CODEX_PACKAGE}`, CODEX_MANAGED_BY_BUN: "1" },
24
+ };
25
+ }
@@ -1,44 +1,22 @@
1
1
  import { type SandboxFileOperations } from "../../sandbox/api.ts";
2
2
  import { type AgentTranscriptMessage as TranscriptMessage, type AgentTranscriptPage, type AgentTranscriptRequest } from "../api.ts";
3
- /** One page of a transcript: its messages oldest first, and the time the next (older) page is before. */
4
3
  export type TranscriptPage = {
5
4
  messages: TranscriptMessage[];
6
5
  nextBefore: string | null;
7
6
  };
8
- /**
9
- * A backend's transcript, read from its own JSONL file a chunk at a time, so a long conversation (a
10
- * file of hundreds of MB) never has to be in memory: a page holds its messages and a few chunks, and
11
- * a replay streams. Pages go by the time on each line: the file is in conversation order, its times
12
- * nearly so (a line is written when its message completes, so parallel branches land seconds out of
13
- * order), which lets a time be found by bisecting the file.
14
- */
15
- export interface FileTranscript {
16
- /**
17
- * The newest `limit` or so messages from before `before` (epoch ms; null for the newest), by their
18
- * times, with every other message of the oldest one's time, so the page before it is exactly those
19
- * before that time. `found`: what a search of the file found beforehand.
20
- */
7
+ export interface Transcript {
21
8
  page(before: number | null, limit: number, found?: TranscriptFound): Promise<TranscriptPage>;
22
- /**
23
- * Hands `emit` every message after the one whose uuid is `afterId` (all of them when undefined), in
24
- * order, as far as the file went when the replay began. False when `afterId` isn't in the file.
25
- */
26
9
  replay(afterId: string | undefined, emit: (message: TranscriptMessage) => void): Promise<boolean>;
27
10
  }
28
- /** What a transcript is read through: the worker's own files (sandboxFiles), or what the host fetched of them. */
11
+ export type FileTranscript = Transcript & {
12
+ find(match: (message: TranscriptMessage) => boolean): Promise<TranscriptMessage | null>;
13
+ };
29
14
  export type TranscriptFiles = {
30
15
  size(path: string): Promise<number>;
31
16
  readFileRange(path: string, start: number, end: number): Promise<Uint8Array>;
32
17
  listDirectory(path: string): Promise<string[]>;
33
18
  };
34
19
  export declare function sandboxFiles(sandbox: SandboxFileOperations): TranscriptFiles;
35
- /**
36
- * Where a backend keeps its conversations, under its home: in `dir`, `depth` levels down (1: in
37
- * `dir` itself), a file named `name`, where `*` is any characters and `{id}` the conversation's id.
38
- * Each line of it is a JSON object with its ISO 8601 time in the field `time`. `copies`: what's in
39
- * the line that starts a stretch the backend writes again (claude, resuming a session, writes what
40
- * it said since its last compaction again, under the same ids and times), as it's written.
41
- */
42
20
  export type TranscriptLayout = {
43
21
  dir: string;
44
22
  depth: number;
@@ -46,46 +24,25 @@ export type TranscriptLayout = {
46
24
  time: string;
47
25
  copies?: string;
48
26
  };
49
- /** A stretch of the file a reader passes over, from one line's start to another's. */
50
27
  export type Skip = {
51
28
  start: number;
52
29
  end: number;
53
30
  };
54
- /** What a search of the file found beforehand (the host's, in the same round trip as the record). */
55
31
  export type TranscriptFound = {
56
- /** Where the page starts: FileTranscript.page's `before`, found. */
57
32
  end: number;
58
- /** The time of the first timed line from `end` on, if any. */
59
33
  after: number | null;
60
- /** The stretches written again. */
61
34
  copies: Skip[];
62
35
  };
63
- /** The file of conversation `nativeId` laid out as `layout` under `home`; null when there's none yet. */
64
36
  export declare function locateTranscript(files: TranscriptFiles, home: string, layout: TranscriptLayout, nativeId: string): Promise<string | null>;
65
- /** The messages one line of the file stands for, oldest first (none for bookkeeping lines). */
66
37
  export type LineMessages = (entry: unknown) => TranscriptMessage[];
67
- /** How much of the file is read at a time. */
68
38
  export declare const CHUNK_BYTES: number;
69
- /**
70
- * How far out of time order lines get, nearly always (parallel branches completing; in long claude
71
- * sessions half are within 2s, 99% within a minute): searches allow for this much.
72
- */
73
39
  export declare const TIME_SLACK_MS = 60000;
74
- /** How many timed lines a probe of the bisection looks at: the earliest wins, so one odd line can't mislead it. */
75
40
  export declare const PROBE_LINES = 3;
76
- /** How much a probe reads, at most, before it gives up on finding a timed line (huge tool outputs). */
77
41
  export declare const PROBE_BYTES: number;
78
- /** `locate` finds the file; null when there's none yet (nothing stored). */
79
42
  export declare function createFileTranscript(files: TranscriptFiles, locate: () => Promise<string | null>, lineMessages: LineMessages, layout: Pick<TranscriptLayout, "time" | "copies">): FileTranscript;
80
- /** A page of the API's transcript (AgentTranscript.getTranscript); none stored for a session that never ran. */
81
- export declare function transcriptPage(transcript: FileTranscript | null, { limit, before, cursor }?: AgentTranscriptRequest, found?: TranscriptFound): Promise<AgentTranscriptPage>;
82
- /** AgentTranscriptRequest.before as epoch ms; null for none. */
43
+ export declare function transcriptPage(transcript: Transcript | null, { limit, before, cursor }?: AgentTranscriptRequest, found?: TranscriptFound): Promise<AgentTranscriptPage>;
83
44
  export declare function transcriptTime(before: string | undefined): number | null;
84
- /**
85
- * `files` with what was already fetched of the file at `path` in the same round trip: its size, and
86
- * pieces of it (what a page reads, mostly). Reading back beyond them (a page across huge tool
87
- * outputs) fetches twice as much as the time before, so it takes a few more reads, not one per chunk.
88
- */
45
+ export declare function directoryNames(files: TranscriptFiles, dir: string): Promise<string[] | null>;
89
46
  export declare function prefetchedFiles(files: TranscriptFiles, path: string, size: number, pieces: {
90
47
  start: number;
91
48
  bytes: Uint8Array;