@mutagent/sdk 0.3.41 → 0.3.42

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 (244) hide show
  1. package/README.md +14 -8
  2. package/dist/commonjs/funcs/sandbox-get-api-sandbox-by-id-checkpoints.d.ts +18 -0
  3. package/dist/commonjs/funcs/sandbox-get-api-sandbox-by-id-checkpoints.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/sandbox-get-api-sandbox-by-id-checkpoints.js +124 -0
  5. package/dist/commonjs/funcs/sandbox-get-api-sandbox-by-id-checkpoints.js.map +1 -0
  6. package/dist/commonjs/funcs/sandbox-get-api-sandbox-by-id-stream.d.ts +1 -1
  7. package/dist/commonjs/funcs/sandbox-get-api-sandbox-by-id-stream.js +1 -1
  8. package/dist/commonjs/funcs/sandbox-post-api-sandbox-by-id-checkpoint.d.ts +18 -0
  9. package/dist/commonjs/funcs/sandbox-post-api-sandbox-by-id-checkpoint.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/sandbox-post-api-sandbox-by-id-checkpoint.js +125 -0
  11. package/dist/commonjs/funcs/sandbox-post-api-sandbox-by-id-checkpoint.js.map +1 -0
  12. package/dist/commonjs/funcs/sandbox-post-api-sandbox-by-id-restore.d.ts +18 -0
  13. package/dist/commonjs/funcs/sandbox-post-api-sandbox-by-id-restore.d.ts.map +1 -0
  14. package/dist/commonjs/funcs/sandbox-post-api-sandbox-by-id-restore.js +125 -0
  15. package/dist/commonjs/funcs/sandbox-post-api-sandbox-by-id-restore.js.map +1 -0
  16. package/dist/commonjs/lib/config.d.ts +2 -2
  17. package/dist/commonjs/lib/config.js +2 -2
  18. package/dist/commonjs/models/definition-provider.d.ts +35 -0
  19. package/dist/commonjs/models/definition-provider.d.ts.map +1 -1
  20. package/dist/commonjs/models/definition-provider.js +21 -1
  21. package/dist/commonjs/models/definition-provider.js.map +1 -1
  22. package/dist/commonjs/models/index.d.ts +5 -3
  23. package/dist/commonjs/models/index.d.ts.map +1 -1
  24. package/dist/commonjs/models/index.js +5 -3
  25. package/dist/commonjs/models/index.js.map +1 -1
  26. package/dist/commonjs/models/mode-arm-args.d.ts +62 -0
  27. package/dist/commonjs/models/mode-arm-args.d.ts.map +1 -0
  28. package/dist/commonjs/models/mode-arm-args.js +64 -0
  29. package/dist/commonjs/models/mode-arm-args.js.map +1 -0
  30. package/dist/commonjs/models/name-image-arch.d.ts +35 -0
  31. package/dist/commonjs/models/name-image-arch.d.ts.map +1 -1
  32. package/dist/commonjs/models/name-image-arch.js +21 -1
  33. package/dist/commonjs/models/name-image-arch.js.map +1 -1
  34. package/dist/commonjs/models/operations/get-api-sandbox-by-id-checkpoints.d.ts +38 -0
  35. package/dist/commonjs/models/operations/get-api-sandbox-by-id-checkpoints.d.ts.map +1 -0
  36. package/dist/commonjs/models/operations/get-api-sandbox-by-id-checkpoints.js +74 -0
  37. package/dist/commonjs/models/operations/get-api-sandbox-by-id-checkpoints.js.map +1 -0
  38. package/dist/commonjs/models/operations/get-api-sandbox-by-id.d.ts +1 -1
  39. package/dist/commonjs/models/operations/get-api-sandbox-by-id.js +1 -1
  40. package/dist/commonjs/models/operations/get-api-sandbox.d.ts +1 -1
  41. package/dist/commonjs/models/operations/get-api-sandbox.js +1 -1
  42. package/dist/commonjs/models/operations/index.d.ts +3 -0
  43. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  44. package/dist/commonjs/models/operations/index.js +3 -0
  45. package/dist/commonjs/models/operations/index.js.map +1 -1
  46. package/dist/commonjs/models/operations/post-api-sandbox-by-id-checkpoint.d.ts +83 -0
  47. package/dist/commonjs/models/operations/post-api-sandbox-by-id-checkpoint.d.ts.map +1 -0
  48. package/dist/commonjs/models/operations/post-api-sandbox-by-id-checkpoint.js +77 -0
  49. package/dist/commonjs/models/operations/post-api-sandbox-by-id-checkpoint.js.map +1 -0
  50. package/dist/commonjs/models/operations/post-api-sandbox-by-id-restore.d.ts +151 -0
  51. package/dist/commonjs/models/operations/post-api-sandbox-by-id-restore.d.ts.map +1 -0
  52. package/dist/commonjs/models/operations/post-api-sandbox-by-id-restore.js +121 -0
  53. package/dist/commonjs/models/operations/post-api-sandbox-by-id-restore.js.map +1 -0
  54. package/dist/commonjs/models/operations/post-api-sandbox-by-id-session.d.ts +7 -3
  55. package/dist/commonjs/models/operations/post-api-sandbox-by-id-session.d.ts.map +1 -1
  56. package/dist/commonjs/models/operations/post-api-sandbox-by-id-session.js +3 -2
  57. package/dist/commonjs/models/operations/post-api-sandbox-by-id-session.js.map +1 -1
  58. package/dist/commonjs/models/operations/post-api-sandbox.d.ts +1 -1
  59. package/dist/commonjs/models/operations/post-api-sandbox.js +1 -1
  60. package/dist/commonjs/models/operations/update-organization-member.d.ts +1 -1
  61. package/dist/commonjs/models/operations/update-organization-member.js +1 -1
  62. package/dist/commonjs/models/operations/update-workspace-member.d.ts +1 -1
  63. package/dist/commonjs/models/operations/update-workspace-member.d.ts.map +1 -1
  64. package/dist/commonjs/models/operations/update-workspace-member.js +1 -1
  65. package/dist/commonjs/models/operations/update-workspace-member.js.map +1 -1
  66. package/dist/commonjs/models/preset-timeout-ms-keep2.d.ts +10 -0
  67. package/dist/commonjs/models/preset-timeout-ms-keep2.d.ts.map +1 -1
  68. package/dist/commonjs/models/preset-timeout-ms-keep2.js +2 -0
  69. package/dist/commonjs/models/preset-timeout-ms-keep2.js.map +1 -1
  70. package/dist/commonjs/models/schemadefaul11.d.ts +9 -0
  71. package/dist/commonjs/models/schemadefaul11.d.ts.map +1 -0
  72. package/dist/commonjs/models/{schemadefaul8.js → schemadefaul11.js} +9 -9
  73. package/dist/commonjs/models/schemadefaul11.js.map +1 -0
  74. package/dist/commonjs/models/schemadefaul5.d.ts +7 -4
  75. package/dist/commonjs/models/schemadefaul5.d.ts.map +1 -1
  76. package/dist/commonjs/models/schemadefaul5.js +8 -5
  77. package/dist/commonjs/models/schemadefaul5.js.map +1 -1
  78. package/dist/commonjs/models/schemadefaul6.d.ts +7 -5
  79. package/dist/commonjs/models/schemadefaul6.d.ts.map +1 -1
  80. package/dist/commonjs/models/schemadefaul6.js +7 -7
  81. package/dist/commonjs/models/schemadefaul6.js.map +1 -1
  82. package/dist/commonjs/models/schemadefaul7.d.ts +13 -0
  83. package/dist/commonjs/models/schemadefaul7.d.ts.map +1 -0
  84. package/dist/commonjs/models/{schemadefaul4.js → schemadefaul7.js} +11 -13
  85. package/dist/commonjs/models/schemadefaul7.js.map +1 -0
  86. package/dist/commonjs/models/schemadefaul9.d.ts +10 -0
  87. package/dist/commonjs/models/schemadefaul9.d.ts.map +1 -0
  88. package/dist/commonjs/models/{mode-args-env.js → schemadefaul9.js} +10 -13
  89. package/dist/commonjs/models/schemadefaul9.js.map +1 -0
  90. package/dist/commonjs/models/snapshot-id-definition-partial.d.ts +40 -0
  91. package/dist/commonjs/models/snapshot-id-definition-partial.d.ts.map +1 -0
  92. package/dist/commonjs/models/snapshot-id-definition-partial.js +63 -0
  93. package/dist/commonjs/models/snapshot-id-definition-partial.js.map +1 -0
  94. package/dist/commonjs/sdk/sandbox.d.ts +34 -13
  95. package/dist/commonjs/sdk/sandbox.d.ts.map +1 -1
  96. package/dist/commonjs/sdk/sandbox.js +47 -17
  97. package/dist/commonjs/sdk/sandbox.js.map +1 -1
  98. package/dist/esm/funcs/sandbox-get-api-sandbox-by-id-checkpoints.d.ts +18 -0
  99. package/dist/esm/funcs/sandbox-get-api-sandbox-by-id-checkpoints.d.ts.map +1 -0
  100. package/dist/esm/funcs/sandbox-get-api-sandbox-by-id-checkpoints.js +88 -0
  101. package/dist/esm/funcs/sandbox-get-api-sandbox-by-id-checkpoints.js.map +1 -0
  102. package/dist/esm/funcs/sandbox-get-api-sandbox-by-id-stream.d.ts +1 -1
  103. package/dist/esm/funcs/sandbox-get-api-sandbox-by-id-stream.js +1 -1
  104. package/dist/esm/funcs/sandbox-post-api-sandbox-by-id-checkpoint.d.ts +18 -0
  105. package/dist/esm/funcs/sandbox-post-api-sandbox-by-id-checkpoint.d.ts.map +1 -0
  106. package/dist/esm/funcs/sandbox-post-api-sandbox-by-id-checkpoint.js +89 -0
  107. package/dist/esm/funcs/sandbox-post-api-sandbox-by-id-checkpoint.js.map +1 -0
  108. package/dist/esm/funcs/sandbox-post-api-sandbox-by-id-restore.d.ts +18 -0
  109. package/dist/esm/funcs/sandbox-post-api-sandbox-by-id-restore.d.ts.map +1 -0
  110. package/dist/esm/funcs/sandbox-post-api-sandbox-by-id-restore.js +89 -0
  111. package/dist/esm/funcs/sandbox-post-api-sandbox-by-id-restore.js.map +1 -0
  112. package/dist/esm/lib/config.d.ts +2 -2
  113. package/dist/esm/lib/config.js +2 -2
  114. package/dist/esm/models/definition-provider.d.ts +35 -0
  115. package/dist/esm/models/definition-provider.d.ts.map +1 -1
  116. package/dist/esm/models/definition-provider.js +19 -0
  117. package/dist/esm/models/definition-provider.js.map +1 -1
  118. package/dist/esm/models/index.d.ts +5 -3
  119. package/dist/esm/models/index.d.ts.map +1 -1
  120. package/dist/esm/models/index.js +5 -3
  121. package/dist/esm/models/index.js.map +1 -1
  122. package/dist/esm/models/mode-arm-args.d.ts +62 -0
  123. package/dist/esm/models/mode-arm-args.d.ts.map +1 -0
  124. package/dist/esm/models/mode-arm-args.js +26 -0
  125. package/dist/esm/models/mode-arm-args.js.map +1 -0
  126. package/dist/esm/models/name-image-arch.d.ts +35 -0
  127. package/dist/esm/models/name-image-arch.d.ts.map +1 -1
  128. package/dist/esm/models/name-image-arch.js +19 -0
  129. package/dist/esm/models/name-image-arch.js.map +1 -1
  130. package/dist/esm/models/operations/get-api-sandbox-by-id-checkpoints.d.ts +38 -0
  131. package/dist/esm/models/operations/get-api-sandbox-by-id-checkpoints.d.ts.map +1 -0
  132. package/dist/esm/models/operations/get-api-sandbox-by-id-checkpoints.js +35 -0
  133. package/dist/esm/models/operations/get-api-sandbox-by-id-checkpoints.js.map +1 -0
  134. package/dist/esm/models/operations/get-api-sandbox-by-id.d.ts +1 -1
  135. package/dist/esm/models/operations/get-api-sandbox-by-id.js +1 -1
  136. package/dist/esm/models/operations/get-api-sandbox.d.ts +1 -1
  137. package/dist/esm/models/operations/get-api-sandbox.js +1 -1
  138. package/dist/esm/models/operations/index.d.ts +3 -0
  139. package/dist/esm/models/operations/index.d.ts.map +1 -1
  140. package/dist/esm/models/operations/index.js +3 -0
  141. package/dist/esm/models/operations/index.js.map +1 -1
  142. package/dist/esm/models/operations/post-api-sandbox-by-id-checkpoint.d.ts +83 -0
  143. package/dist/esm/models/operations/post-api-sandbox-by-id-checkpoint.d.ts.map +1 -0
  144. package/dist/esm/models/operations/post-api-sandbox-by-id-checkpoint.js +38 -0
  145. package/dist/esm/models/operations/post-api-sandbox-by-id-checkpoint.js.map +1 -0
  146. package/dist/esm/models/operations/post-api-sandbox-by-id-restore.d.ts +151 -0
  147. package/dist/esm/models/operations/post-api-sandbox-by-id-restore.d.ts.map +1 -0
  148. package/dist/esm/models/operations/post-api-sandbox-by-id-restore.js +80 -0
  149. package/dist/esm/models/operations/post-api-sandbox-by-id-restore.js.map +1 -0
  150. package/dist/esm/models/operations/post-api-sandbox-by-id-session.d.ts +7 -3
  151. package/dist/esm/models/operations/post-api-sandbox-by-id-session.d.ts.map +1 -1
  152. package/dist/esm/models/operations/post-api-sandbox-by-id-session.js +3 -2
  153. package/dist/esm/models/operations/post-api-sandbox-by-id-session.js.map +1 -1
  154. package/dist/esm/models/operations/post-api-sandbox.d.ts +1 -1
  155. package/dist/esm/models/operations/post-api-sandbox.js +1 -1
  156. package/dist/esm/models/operations/update-organization-member.d.ts +1 -1
  157. package/dist/esm/models/operations/update-organization-member.js +1 -1
  158. package/dist/esm/models/operations/update-workspace-member.d.ts +1 -1
  159. package/dist/esm/models/operations/update-workspace-member.d.ts.map +1 -1
  160. package/dist/esm/models/operations/update-workspace-member.js +1 -1
  161. package/dist/esm/models/operations/update-workspace-member.js.map +1 -1
  162. package/dist/esm/models/preset-timeout-ms-keep2.d.ts +10 -0
  163. package/dist/esm/models/preset-timeout-ms-keep2.d.ts.map +1 -1
  164. package/dist/esm/models/preset-timeout-ms-keep2.js +2 -0
  165. package/dist/esm/models/preset-timeout-ms-keep2.js.map +1 -1
  166. package/dist/esm/models/schemadefaul11.d.ts +9 -0
  167. package/dist/esm/models/schemadefaul11.d.ts.map +1 -0
  168. package/dist/esm/models/schemadefaul11.js +13 -0
  169. package/dist/esm/models/schemadefaul11.js.map +1 -0
  170. package/dist/esm/models/schemadefaul5.d.ts +7 -4
  171. package/dist/esm/models/schemadefaul5.d.ts.map +1 -1
  172. package/dist/esm/models/schemadefaul5.js +7 -4
  173. package/dist/esm/models/schemadefaul5.js.map +1 -1
  174. package/dist/esm/models/schemadefaul6.d.ts +7 -5
  175. package/dist/esm/models/schemadefaul6.d.ts.map +1 -1
  176. package/dist/esm/models/schemadefaul6.js +6 -6
  177. package/dist/esm/models/schemadefaul6.js.map +1 -1
  178. package/dist/esm/models/schemadefaul7.d.ts +13 -0
  179. package/dist/esm/models/schemadefaul7.d.ts.map +1 -0
  180. package/dist/esm/models/schemadefaul7.js +15 -0
  181. package/dist/esm/models/schemadefaul7.js.map +1 -0
  182. package/dist/esm/models/schemadefaul9.d.ts +10 -0
  183. package/dist/esm/models/schemadefaul9.d.ts.map +1 -0
  184. package/dist/esm/models/schemadefaul9.js +14 -0
  185. package/dist/esm/models/schemadefaul9.js.map +1 -0
  186. package/dist/esm/models/snapshot-id-definition-partial.d.ts +40 -0
  187. package/dist/esm/models/snapshot-id-definition-partial.d.ts.map +1 -0
  188. package/dist/esm/models/snapshot-id-definition-partial.js +26 -0
  189. package/dist/esm/models/snapshot-id-definition-partial.js.map +1 -0
  190. package/dist/esm/sdk/sandbox.d.ts +34 -13
  191. package/dist/esm/sdk/sandbox.d.ts.map +1 -1
  192. package/dist/esm/sdk/sandbox.js +47 -17
  193. package/dist/esm/sdk/sandbox.js.map +1 -1
  194. package/package.json +1 -1
  195. package/src/funcs/sandbox-get-api-sandbox-by-id-checkpoints.ts +184 -0
  196. package/src/funcs/sandbox-get-api-sandbox-by-id-stream.ts +1 -1
  197. package/src/funcs/sandbox-post-api-sandbox-by-id-checkpoint.ts +186 -0
  198. package/src/funcs/sandbox-post-api-sandbox-by-id-restore.ts +186 -0
  199. package/src/lib/config.ts +2 -2
  200. package/src/models/definition-provider.ts +59 -0
  201. package/src/models/index.ts +5 -3
  202. package/src/models/mode-arm-args.ts +100 -0
  203. package/src/models/name-image-arch.ts +59 -0
  204. package/src/models/operations/get-api-sandbox-by-id-checkpoints.ts +97 -0
  205. package/src/models/operations/get-api-sandbox-by-id.ts +3 -3
  206. package/src/models/operations/get-api-sandbox.ts +3 -3
  207. package/src/models/operations/index.ts +3 -0
  208. package/src/models/operations/post-api-sandbox-by-id-checkpoint.ts +151 -0
  209. package/src/models/operations/post-api-sandbox-by-id-restore.ts +263 -0
  210. package/src/models/operations/post-api-sandbox-by-id-session.ts +14 -6
  211. package/src/models/operations/post-api-sandbox.ts +3 -3
  212. package/src/models/operations/update-organization-member.ts +3 -3
  213. package/src/models/operations/update-workspace-member.ts +3 -3
  214. package/src/models/preset-timeout-ms-keep2.ts +12 -0
  215. package/src/models/{schemadefaul8.ts → schemadefaul11.ts} +4 -3
  216. package/src/models/schemadefaul5.ts +7 -7
  217. package/src/models/schemadefaul6.ts +14 -6
  218. package/src/models/schemadefaul7.ts +25 -0
  219. package/src/models/schemadefaul9.ts +16 -0
  220. package/src/models/snapshot-id-definition-partial.ts +70 -0
  221. package/src/sdk/sandbox.ts +82 -28
  222. package/dist/commonjs/models/mode-args-env.d.ts +0 -35
  223. package/dist/commonjs/models/mode-args-env.d.ts.map +0 -1
  224. package/dist/commonjs/models/mode-args-env.js.map +0 -1
  225. package/dist/commonjs/models/schemadefaul4.d.ts +0 -15
  226. package/dist/commonjs/models/schemadefaul4.d.ts.map +0 -1
  227. package/dist/commonjs/models/schemadefaul4.js.map +0 -1
  228. package/dist/commonjs/models/schemadefaul8.d.ts +0 -9
  229. package/dist/commonjs/models/schemadefaul8.d.ts.map +0 -1
  230. package/dist/commonjs/models/schemadefaul8.js.map +0 -1
  231. package/dist/esm/models/mode-args-env.d.ts +0 -35
  232. package/dist/esm/models/mode-args-env.d.ts.map +0 -1
  233. package/dist/esm/models/mode-args-env.js +0 -16
  234. package/dist/esm/models/mode-args-env.js.map +0 -1
  235. package/dist/esm/models/schemadefaul4.d.ts +0 -15
  236. package/dist/esm/models/schemadefaul4.d.ts.map +0 -1
  237. package/dist/esm/models/schemadefaul4.js +0 -17
  238. package/dist/esm/models/schemadefaul4.js.map +0 -1
  239. package/dist/esm/models/schemadefaul8.d.ts +0 -9
  240. package/dist/esm/models/schemadefaul8.d.ts.map +0 -1
  241. package/dist/esm/models/schemadefaul8.js +0 -13
  242. package/dist/esm/models/schemadefaul8.js.map +0 -1
  243. package/src/models/mode-args-env.ts +0 -52
  244. package/src/models/schemadefaul4.ts +0 -24
@@ -30,13 +30,6 @@ export declare class Sandbox extends ClientSDK {
30
30
  * Spawns from a preset, runs the command, tears the sandbox down. Requires an operator token — a one-shot run creates a sandbox. 200, not 201: the durable outcome is a result, and the sandbox it names is already gone unless `keep` was set. Blocking, and therefore bounded by the provider invocation timeout — long or interactive runs belong on POST /api/sandbox + /:id/exec.
31
31
  */
32
32
  postApiSandboxRun(request: models.PresetTimeoutMsKeep, options?: RequestOptions): Promise<operations.PostApiSandboxRunResponse>;
33
- /**
34
- * Run one agent turn in a fresh sandbox
35
- *
36
- * @remarks
37
- * `prompt` is WHO the agent is (the agent definition) and `task` is WHAT to do this turn. They are two different prompts and are never concatenated. The turn's output comes back on stdout with the agent's real exit code. With `?stream=1` the same turn is delivered as it happens, in the event framing of `GET /:id/stream`: a `sandbox` event naming the box, then `stdout`/`stderr` as the agent produces them, then a `result` event carrying the exit code and whether the sandbox was torn down, then the terminal `status`. Disconnecting mid-stream releases the sandbox.
38
- */
39
- postApiSandboxAgentRun(request: operations.PostApiSandboxAgentRunRequest, options?: RequestOptions): Promise<operations.PostApiSandboxAgentRunResponse>;
40
33
  /**
41
34
  * Spawn a sandbox
42
35
  *
@@ -66,7 +59,7 @@ export declare class Sandbox extends ClientSDK {
66
59
  * Watch a sandbox's output live
67
60
  *
68
61
  * @remarks
69
- * Server-sent events: `stdout`, `stderr`, `rpc`, `unrecognised`, `status`, `ping` (every 15s), `error`. `rpc` carries one complete NDJSON frame from a Helix session running in RPC mode, verbatim — parse it client-side. `unrecognised` carries a line the backend could not classify; receiving one means this server and the sandbox image disagree about the protocol, and it is forwarded rather than dropped so that drift is visible instead of silent. All four output events share the `{seq, ts, text}` shape and one sequence counter, so their interleaving is the order the box produced them. `seq` is monotonic per sandbox and starts at 1; pass the last one seen as `?since=` to resume. If the buffer has already rolled past `since`, an `error` event names the lost range rather than skipping it silently. Disconnecting tears down the upstream.
62
+ * Server-sent events: `stdout`, `stderr`, `rpc`, `unrecognised`, `session`, `live`, `status`, `ping` (every 15s), `error`. `rpc` carries one complete NDJSON frame from a Helix session running in RPC mode, verbatim — parse it client-side. `unrecognised` carries a line the backend could not classify; receiving one means this server and the sandbox image disagree about the protocol, and it is forwarded rather than dropped so that drift is visible instead of silent. Those four output events share the `{seq, ts, text}` shape and one sequence counter, so their interleaving is the order the box produced them. `session` shares that counter too but carries flat fields instead of `text` — `{sessionId, status: "started"|"exited", exitCode, lastSeq, generation}` — and is how a client learns a Helix session began or ended; it is persisted and replayed like any output event, and `exitCode` is the session's real code (the terminal `status` event describes the SANDBOX and reports null by contract). `live` is emitted at most once, before the opening `status`, and only when this instance cannot follow the sandbox: it replays the log and ends rather than tailing. `seq` is monotonic per sandbox and starts at 1, and every seq-bearing event also carries it as the SSE `id:` field; pass the last one seen as `?since=` to resume. A resume is served from the persisted event log first and the live buffer only for the tail, so it survives a restart and can be answered by an instance that never spawned the box. If the requested range has been TRIMMED from that log, an `error` event names the lost range rather than skipping it silently — it carries `code: 'gap'` with the inclusive `from`/`to` wire seqs, and the stream continues past the gap; a source failure instead carries `code: 'upstream'` and is the end of the stream. Branch on `code`, never on `message`. Disconnecting tears down the upstream.
70
63
  */
71
64
  getApiSandboxByIdStream(request: operations.GetApiSandboxByIdStreamRequest, options?: RequestOptions): Promise<operations.GetApiSandboxByIdStreamResponse>;
72
65
  /**
@@ -76,6 +69,17 @@ export declare class Sandbox extends ClientSDK {
76
69
  * Returns the command's real exit code. A task token is rejected — in-sandbox code reports on itself, it does not drive the box. With `?stream=1` the same result comes back as the event stream of `GET /:id/stream`, scoped to this one invocation and terminated by a `status` event carrying the exit code.
77
70
  */
78
71
  postApiSandboxByIdExec(request: operations.PostApiSandboxByIdExecRequest, options?: RequestOptions): Promise<operations.PostApiSandboxByIdExecResponse>;
72
+ /**
73
+ * Ingest OTLP spans from inside a sandbox
74
+ *
75
+ * @remarks
76
+ * OTLP/HTTP JSON. Requires a task token; spans are attributed to the sandbox the token is bound to, never to the sandbox named in the payload.
77
+ */
78
+ postApiSandboxTelemetryV1Traces(options?: RequestOptions): Promise<operations.PostApiSandboxTelemetryV1TracesResponse>;
79
+ /**
80
+ * Read a sandbox's captured spans
81
+ */
82
+ getApiSandboxByIdTraces(request: operations.GetApiSandboxByIdTracesRequest, options?: RequestOptions): Promise<operations.GetApiSandboxByIdTracesResponse>;
79
83
  /**
80
84
  * Start a Helix session in a sandbox
81
85
  *
@@ -105,16 +109,33 @@ export declare class Sandbox extends ClientSDK {
105
109
  */
106
110
  postApiSandboxByIdSignal(request: operations.PostApiSandboxByIdSignalRequest, options?: RequestOptions): Promise<operations.PostApiSandboxByIdSignalResponse>;
107
111
  /**
108
- * Ingest OTLP spans from inside a sandbox
112
+ * Capture a Helix session's own transcript
109
113
  *
110
114
  * @remarks
111
- * OTLP/HTTP JSON. Requires a task token; spans are attributed to the sandbox the token is bound to, never to the sandbox named in the payload.
115
+ * Copies the HARNESS's session file off the box, verbatim, and stores it. This is what a NEW box needs to CONTINUE the conversation — distinct from `GET /:id/stream?since=`, which replays what the client observed and restores no agent state at all. 409 when the session has not completed a turn: the harness writes its file lazily, so there is genuinely nothing to capture yet, and storing an empty snapshot would produce a restore that succeeds and restores nothing. 503 when the deployment has no snapshot store.
112
116
  */
113
- postApiSandboxTelemetryV1Traces(options?: RequestOptions): Promise<operations.PostApiSandboxTelemetryV1TracesResponse>;
117
+ postApiSandboxByIdCheckpoint(request: operations.PostApiSandboxByIdCheckpointRequest, options?: RequestOptions): Promise<operations.PostApiSandboxByIdCheckpointResponse>;
114
118
  /**
115
- * Read a sandbox's captured spans
119
+ * List checkpoints captured from this sandbox
120
+ *
121
+ * @remarks
122
+ * Newest first, tenant-scoped, WITHOUT the stored bytes. `messageCount` is how much conversation each one holds.
116
123
  */
117
- getApiSandboxByIdTraces(request: operations.GetApiSandboxByIdTracesRequest, options?: RequestOptions): Promise<operations.GetApiSandboxByIdTracesResponse>;
124
+ getApiSandboxByIdCheckpoints(request: operations.GetApiSandboxByIdCheckpointsRequest, options?: RequestOptions): Promise<operations.GetApiSandboxByIdCheckpointsResponse>;
125
+ /**
126
+ * Rebuild this sandbox from a checkpoint, with full state
127
+ *
128
+ * @remarks
129
+ * A cloud equivalent of a local `/resume`, and it does NOT require the old box to still exist — a reaped or torn-down sandbox is the ordinary input. In order: a fresh box is spawned for the SAME sandbox id at generation+1 with the same secret NAMES (values are re-minted, never stored); the relay's seq counter is seeded from the persisted high-water mark so a client's `?since=` cursor stays valid; the workspace and `$HOME/.mutagent` are extracted BEFORE Helix starts; a session is started in the checkpoint's cwd; the conversation is written in, its sha256 compared against the box's own, and only then switched onto; the runtime settings and pending queue are replayed; and a `session {status:"restored"}` frame is appended to the stream with a real seq. A digest mismatch is a 422 and the session is NOT switched. 404 if the snapshot is not in this workspace. Read `notRestored` — a restore that carried only the conversation is legitimate and says so there. A DEFAULTED restore uses the newest checkpoint that has a manifest and lists newer rows it passed over in `skippedSnapshots`. `partial: true` restores the incremental transcript prefix beyond the checkpoint when one exists (the frame then carries `partial: true`); its tail may end on a tool call with no result, which the harness answers with a synthetic error on the next turn — the accepted risk of asking for it.
130
+ */
131
+ postApiSandboxByIdRestore(request: operations.PostApiSandboxByIdRestoreRequest, options?: RequestOptions): Promise<operations.PostApiSandboxByIdRestoreResponse>;
132
+ /**
133
+ * Run one agent turn in a fresh sandbox
134
+ *
135
+ * @remarks
136
+ * `prompt` is WHO the agent is (the agent definition) and `task` is WHAT to do this turn. They are two different prompts and are never concatenated. The turn's output comes back on stdout with the agent's real exit code. With `?stream=1` the same turn is delivered as it happens, in the event framing of `GET /:id/stream`: a `sandbox` event naming the box, then `stdout`/`stderr` as the agent produces them, then a `result` event carrying the exit code and whether the sandbox was torn down, then the terminal `status`. Disconnecting mid-stream releases the sandbox.
137
+ */
138
+ postApiSandboxAgentRun(request: operations.PostApiSandboxAgentRunRequest, options?: RequestOptions): Promise<operations.PostApiSandboxAgentRunResponse>;
118
139
  /**
119
140
  * Exchange a platform API key for a sandbox operator token
120
141
  *
@@ -1 +1 @@
1
- {"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../../src/sdk/sandbox.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,OAAQ,SAAQ,SAAS;IACpC;;;;;OAKG;IACG,sBAAsB,CAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,8BAA8B,CAAC;IAOrD;;;;;OAKG;IACG,uBAAuB,CAC3B,OAAO,EAAE,MAAM,CAAC,kBAAkB,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC;IAQtD;;;;;OAKG;IACG,oBAAoB,CACxB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,4BAA4B,CAAC;IAOnD;;;;;OAKG;IACG,iBAAiB,CACrB,OAAO,EAAE,MAAM,CAAC,mBAAmB,EACnC,O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;;;;OAKG;IACG,sBAAsB,CAC1B,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,8BAA8B,CAAC;IAQrD;;;;;OAKG;IACG,mBAAmB,CACvB,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,2BAA2B,CAAC;CAOnD"}
@@ -5,6 +5,7 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Sandbox = void 0;
7
7
  const sandbox_delete_api_sandbox_by_id_js_1 = require("../funcs/sandbox-delete-api-sandbox-by-id.js");
8
+ const sandbox_get_api_sandbox_by_id_checkpoints_js_1 = require("../funcs/sandbox-get-api-sandbox-by-id-checkpoints.js");
8
9
  const sandbox_get_api_sandbox_by_id_sessions_js_1 = require("../funcs/sandbox-get-api-sandbox-by-id-sessions.js");
9
10
  const sandbox_get_api_sandbox_by_id_stream_js_1 = require("../funcs/sandbox-get-api-sandbox-by-id-stream.js");
10
11
  const sandbox_get_api_sandbox_by_id_traces_js_1 = require("../funcs/sandbox-get-api-sandbox-by-id-traces.js");
@@ -13,8 +14,10 @@ const sandbox_get_api_sandbox_presets_js_1 = require("../funcs/sandbox-get-api-s
13
14
  const sandbox_get_api_sandbox_providers_js_1 = require("../funcs/sandbox-get-api-sandbox-providers.js");
14
15
  const sandbox_get_api_sandbox_js_1 = require("../funcs/sandbox-get-api-sandbox.js");
15
16
  const sandbox_post_api_sandbox_agent_run_js_1 = require("../funcs/sandbox-post-api-sandbox-agent-run.js");
17
+ const sandbox_post_api_sandbox_by_id_checkpoint_js_1 = require("../funcs/sandbox-post-api-sandbox-by-id-checkpoint.js");
16
18
  const sandbox_post_api_sandbox_by_id_exec_js_1 = require("../funcs/sandbox-post-api-sandbox-by-id-exec.js");
17
19
  const sandbox_post_api_sandbox_by_id_input_js_1 = require("../funcs/sandbox-post-api-sandbox-by-id-input.js");
20
+ const sandbox_post_api_sandbox_by_id_restore_js_1 = require("../funcs/sandbox-post-api-sandbox-by-id-restore.js");
18
21
  const sandbox_post_api_sandbox_by_id_session_js_1 = require("../funcs/sandbox-post-api-sandbox-by-id-session.js");
19
22
  const sandbox_post_api_sandbox_by_id_signal_js_1 = require("../funcs/sandbox-post-api-sandbox-by-id-signal.js");
20
23
  const sandbox_post_api_sandbox_preflight_js_1 = require("../funcs/sandbox-post-api-sandbox-preflight.js");
@@ -61,15 +64,6 @@ class Sandbox extends sdks_js_1.ClientSDK {
61
64
  async postApiSandboxRun(request, options) {
62
65
  return (0, fp_js_1.unwrapAsync)((0, sandbox_post_api_sandbox_run_js_1.sandboxPostApiSandboxRun)(this, request, options));
63
66
  }
64
- /**
65
- * Run one agent turn in a fresh sandbox
66
- *
67
- * @remarks
68
- * `prompt` is WHO the agent is (the agent definition) and `task` is WHAT to do this turn. They are two different prompts and are never concatenated. The turn's output comes back on stdout with the agent's real exit code. With `?stream=1` the same turn is delivered as it happens, in the event framing of `GET /:id/stream`: a `sandbox` event naming the box, then `stdout`/`stderr` as the agent produces them, then a `result` event carrying the exit code and whether the sandbox was torn down, then the terminal `status`. Disconnecting mid-stream releases the sandbox.
69
- */
70
- async postApiSandboxAgentRun(request, options) {
71
- return (0, fp_js_1.unwrapAsync)((0, sandbox_post_api_sandbox_agent_run_js_1.sandboxPostApiSandboxAgentRun)(this, request, options));
72
- }
73
67
  /**
74
68
  * Spawn a sandbox
75
69
  *
@@ -107,7 +101,7 @@ class Sandbox extends sdks_js_1.ClientSDK {
107
101
  * Watch a sandbox's output live
108
102
  *
109
103
  * @remarks
110
- * Server-sent events: `stdout`, `stderr`, `rpc`, `unrecognised`, `status`, `ping` (every 15s), `error`. `rpc` carries one complete NDJSON frame from a Helix session running in RPC mode, verbatim — parse it client-side. `unrecognised` carries a line the backend could not classify; receiving one means this server and the sandbox image disagree about the protocol, and it is forwarded rather than dropped so that drift is visible instead of silent. All four output events share the `{seq, ts, text}` shape and one sequence counter, so their interleaving is the order the box produced them. `seq` is monotonic per sandbox and starts at 1; pass the last one seen as `?since=` to resume. If the buffer has already rolled past `since`, an `error` event names the lost range rather than skipping it silently. Disconnecting tears down the upstream.
104
+ * Server-sent events: `stdout`, `stderr`, `rpc`, `unrecognised`, `session`, `live`, `status`, `ping` (every 15s), `error`. `rpc` carries one complete NDJSON frame from a Helix session running in RPC mode, verbatim — parse it client-side. `unrecognised` carries a line the backend could not classify; receiving one means this server and the sandbox image disagree about the protocol, and it is forwarded rather than dropped so that drift is visible instead of silent. Those four output events share the `{seq, ts, text}` shape and one sequence counter, so their interleaving is the order the box produced them. `session` shares that counter too but carries flat fields instead of `text` — `{sessionId, status: "started"|"exited", exitCode, lastSeq, generation}` — and is how a client learns a Helix session began or ended; it is persisted and replayed like any output event, and `exitCode` is the session's real code (the terminal `status` event describes the SANDBOX and reports null by contract). `live` is emitted at most once, before the opening `status`, and only when this instance cannot follow the sandbox: it replays the log and ends rather than tailing. `seq` is monotonic per sandbox and starts at 1, and every seq-bearing event also carries it as the SSE `id:` field; pass the last one seen as `?since=` to resume. A resume is served from the persisted event log first and the live buffer only for the tail, so it survives a restart and can be answered by an instance that never spawned the box. If the requested range has been TRIMMED from that log, an `error` event names the lost range rather than skipping it silently — it carries `code: 'gap'` with the inclusive `from`/`to` wire seqs, and the stream continues past the gap; a source failure instead carries `code: 'upstream'` and is the end of the stream. Branch on `code`, never on `message`. Disconnecting tears down the upstream.
111
105
  */
112
106
  async getApiSandboxByIdStream(request, options) {
113
107
  return (0, fp_js_1.unwrapAsync)((0, sandbox_get_api_sandbox_by_id_stream_js_1.sandboxGetApiSandboxByIdStream)(this, request, options));
@@ -121,6 +115,21 @@ class Sandbox extends sdks_js_1.ClientSDK {
121
115
  async postApiSandboxByIdExec(request, options) {
122
116
  return (0, fp_js_1.unwrapAsync)((0, sandbox_post_api_sandbox_by_id_exec_js_1.sandboxPostApiSandboxByIdExec)(this, request, options));
123
117
  }
118
+ /**
119
+ * Ingest OTLP spans from inside a sandbox
120
+ *
121
+ * @remarks
122
+ * OTLP/HTTP JSON. Requires a task token; spans are attributed to the sandbox the token is bound to, never to the sandbox named in the payload.
123
+ */
124
+ async postApiSandboxTelemetryV1Traces(options) {
125
+ return (0, fp_js_1.unwrapAsync)((0, sandbox_post_api_sandbox_telemetry_v1_traces_js_1.sandboxPostApiSandboxTelemetryV1Traces)(this, options));
126
+ }
127
+ /**
128
+ * Read a sandbox's captured spans
129
+ */
130
+ async getApiSandboxByIdTraces(request, options) {
131
+ return (0, fp_js_1.unwrapAsync)((0, sandbox_get_api_sandbox_by_id_traces_js_1.sandboxGetApiSandboxByIdTraces)(this, request, options));
132
+ }
124
133
  /**
125
134
  * Start a Helix session in a sandbox
126
135
  *
@@ -158,19 +167,40 @@ class Sandbox extends sdks_js_1.ClientSDK {
158
167
  return (0, fp_js_1.unwrapAsync)((0, sandbox_post_api_sandbox_by_id_signal_js_1.sandboxPostApiSandboxByIdSignal)(this, request, options));
159
168
  }
160
169
  /**
161
- * Ingest OTLP spans from inside a sandbox
170
+ * Capture a Helix session's own transcript
162
171
  *
163
172
  * @remarks
164
- * OTLP/HTTP JSON. Requires a task token; spans are attributed to the sandbox the token is bound to, never to the sandbox named in the payload.
173
+ * Copies the HARNESS's session file off the box, verbatim, and stores it. This is what a NEW box needs to CONTINUE the conversation — distinct from `GET /:id/stream?since=`, which replays what the client observed and restores no agent state at all. 409 when the session has not completed a turn: the harness writes its file lazily, so there is genuinely nothing to capture yet, and storing an empty snapshot would produce a restore that succeeds and restores nothing. 503 when the deployment has no snapshot store.
165
174
  */
166
- async postApiSandboxTelemetryV1Traces(options) {
167
- return (0, fp_js_1.unwrapAsync)((0, sandbox_post_api_sandbox_telemetry_v1_traces_js_1.sandboxPostApiSandboxTelemetryV1Traces)(this, options));
175
+ async postApiSandboxByIdCheckpoint(request, options) {
176
+ return (0, fp_js_1.unwrapAsync)((0, sandbox_post_api_sandbox_by_id_checkpoint_js_1.sandboxPostApiSandboxByIdCheckpoint)(this, request, options));
168
177
  }
169
178
  /**
170
- * Read a sandbox's captured spans
179
+ * List checkpoints captured from this sandbox
180
+ *
181
+ * @remarks
182
+ * Newest first, tenant-scoped, WITHOUT the stored bytes. `messageCount` is how much conversation each one holds.
171
183
  */
172
- async getApiSandboxByIdTraces(request, options) {
173
- return (0, fp_js_1.unwrapAsync)((0, sandbox_get_api_sandbox_by_id_traces_js_1.sandboxGetApiSandboxByIdTraces)(this, request, options));
184
+ async getApiSandboxByIdCheckpoints(request, options) {
185
+ return (0, fp_js_1.unwrapAsync)((0, sandbox_get_api_sandbox_by_id_checkpoints_js_1.sandboxGetApiSandboxByIdCheckpoints)(this, request, options));
186
+ }
187
+ /**
188
+ * Rebuild this sandbox from a checkpoint, with full state
189
+ *
190
+ * @remarks
191
+ * A cloud equivalent of a local `/resume`, and it does NOT require the old box to still exist — a reaped or torn-down sandbox is the ordinary input. In order: a fresh box is spawned for the SAME sandbox id at generation+1 with the same secret NAMES (values are re-minted, never stored); the relay's seq counter is seeded from the persisted high-water mark so a client's `?since=` cursor stays valid; the workspace and `$HOME/.mutagent` are extracted BEFORE Helix starts; a session is started in the checkpoint's cwd; the conversation is written in, its sha256 compared against the box's own, and only then switched onto; the runtime settings and pending queue are replayed; and a `session {status:"restored"}` frame is appended to the stream with a real seq. A digest mismatch is a 422 and the session is NOT switched. 404 if the snapshot is not in this workspace. Read `notRestored` — a restore that carried only the conversation is legitimate and says so there. A DEFAULTED restore uses the newest checkpoint that has a manifest and lists newer rows it passed over in `skippedSnapshots`. `partial: true` restores the incremental transcript prefix beyond the checkpoint when one exists (the frame then carries `partial: true`); its tail may end on a tool call with no result, which the harness answers with a synthetic error on the next turn — the accepted risk of asking for it.
192
+ */
193
+ async postApiSandboxByIdRestore(request, options) {
194
+ return (0, fp_js_1.unwrapAsync)((0, sandbox_post_api_sandbox_by_id_restore_js_1.sandboxPostApiSandboxByIdRestore)(this, request, options));
195
+ }
196
+ /**
197
+ * Run one agent turn in a fresh sandbox
198
+ *
199
+ * @remarks
200
+ * `prompt` is WHO the agent is (the agent definition) and `task` is WHAT to do this turn. They are two different prompts and are never concatenated. The turn's output comes back on stdout with the agent's real exit code. With `?stream=1` the same turn is delivered as it happens, in the event framing of `GET /:id/stream`: a `sandbox` event naming the box, then `stdout`/`stderr` as the agent produces them, then a `result` event carrying the exit code and whether the sandbox was torn down, then the terminal `status`. Disconnecting mid-stream releases the sandbox.
201
+ */
202
+ async postApiSandboxAgentRun(request, options) {
203
+ return (0, fp_js_1.unwrapAsync)((0, sandbox_post_api_sandbox_agent_run_js_1.sandboxPostApiSandboxAgentRun)(this, request, options));
174
204
  }
175
205
  /**
176
206
  * Exchange a platform API key for a sandbox operator token
@@ -1 +1 @@
1
- {"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../../../src/sdk/sandbox.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,sGAA2F;AAC3F,kHAAsG;AACtG,8GAAkG;AAClG,8GAAkG;AAClG,gGAAqF;AACrF,oGAA0F;AAC1F,wGAA8F;AAC9F,oFAA2E;AAC3E,0GAA+F;AAC/F,4GAAgG;AAChG,8GAAkG;AAClG,kHAAsG;AACtG,gHAAoG;AACpG,0GAAgG;AAChG,8FAAoF;AACpF,8HAAkH;AAClH,kGAAwF;AACxF,sFAA6E;AAC7E,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,OAAQ,SAAQ,mBAAS;IACpC;;;;;OAKG;IACH,KAAK,CAAC,sBAAsB,CAC1B,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oEAA6B,EAC9C,IAAI,EACJ,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,uBAAuB,CAC3B,OAAkC,EAClC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sEAA8B,EAC/C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,C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AKG;IACH,KAAK,CAAC,4BAA4B,CAChC,OAAuD,EACvD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kFAAmC,EACpD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,yBAAyB,CAC7B,OAAoD,EACpD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,4EAAgC,EACjD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,sBAAsB,CAC1B,OAAiD,EACjD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,qEAA6B,EAC9C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,mBAAmB,CACvB,OAA8C,EAC9C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8DAA0B,EAC3C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAvVD,0BAuVC"}
@@ -0,0 +1,18 @@
1
+ import { MutagentCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/http-client-errors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { MutagentError } from "../models/errors/mutagent-error.js";
6
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
7
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
8
+ import * as operations from "../models/operations/index.js";
9
+ import { APIPromise } from "../types/async.js";
10
+ import { Result } from "../types/fp.js";
11
+ /**
12
+ * List checkpoints captured from this sandbox
13
+ *
14
+ * @remarks
15
+ * Newest first, tenant-scoped, WITHOUT the stored bytes. `messageCount` is how much conversation each one holds.
16
+ */
17
+ export declare function sandboxGetApiSandboxByIdCheckpoints(client: MutagentCore, request: operations.GetApiSandboxByIdCheckpointsRequest, options?: RequestOptions): APIPromise<Result<operations.GetApiSandboxByIdCheckpointsResponse, errors.ErrorMessage | errors.ErrorMessageStatusCode | MutagentError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
+ //# sourceMappingURL=sandbox-get-api-sandbox-by-id-checkpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox-get-api-sandbox-by-id-checkpoints.d.ts","sourceRoot":"","sources":["../../../src/funcs/sandbox-get-api-sandbox-by-id-checkpoints.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM1C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,UAAU,CAAC,mCAAmC,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,oCAAoC,EAC7C,MAAM,CAAC,YAAY,GACnB,MAAM,CAAC,sBAAsB,GAC7B,aAAa,GACb,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -0,0 +1,88 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4-mini";
5
+ import { encodeSimple } from "../lib/encodings.js";
6
+ import { matchStatusCode } from "../lib/http.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as errors from "../models/errors/index.js";
13
+ import * as operations from "../models/operations/index.js";
14
+ import { APIPromise } from "../types/async.js";
15
+ /**
16
+ * List checkpoints captured from this sandbox
17
+ *
18
+ * @remarks
19
+ * Newest first, tenant-scoped, WITHOUT the stored bytes. `messageCount` is how much conversation each one holds.
20
+ */
21
+ export function sandboxGetApiSandboxByIdCheckpoints(client, request, options) {
22
+ return new APIPromise($do(client, request, options));
23
+ }
24
+ async function $do(client, request, options) {
25
+ const parsed = safeParse(request, (value) => z.parse(operations.GetApiSandboxByIdCheckpointsRequest$outboundSchema, value), "Input validation failed");
26
+ if (!parsed.ok) {
27
+ return [parsed, { status: "invalid" }];
28
+ }
29
+ const payload = parsed.value;
30
+ const body = null;
31
+ const pathParams = {
32
+ id: encodeSimple("id", payload.id, {
33
+ explode: false,
34
+ charEncoding: "percent",
35
+ }),
36
+ };
37
+ const path = pathToFunc("/api/sandbox/{id}/checkpoints")(pathParams);
38
+ const headers = new Headers(compactMap({
39
+ Accept: "application/json",
40
+ }));
41
+ const securityInput = await extractSecurity(client._options.security);
42
+ const requestSecurity = resolveGlobalSecurity(securityInput);
43
+ const context = {
44
+ options: client._options,
45
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
46
+ operationID: "getApiSandboxByIdCheckpoints",
47
+ oAuth2Scopes: null,
48
+ resolvedSecurity: requestSecurity,
49
+ securitySource: client._options.security,
50
+ retryConfig: options?.retries
51
+ || client._options.retryConfig
52
+ || { strategy: "none" },
53
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
54
+ };
55
+ const requestRes = client._createRequest(context, {
56
+ security: requestSecurity,
57
+ method: "GET",
58
+ baseURL: options?.serverURL,
59
+ path: path,
60
+ headers: headers,
61
+ body: body,
62
+ userAgent: client._options.userAgent,
63
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
64
+ }, options);
65
+ if (!requestRes.ok) {
66
+ return [requestRes, { status: "invalid" }];
67
+ }
68
+ const req = requestRes.value;
69
+ const doResult = await client._do(req, {
70
+ context,
71
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
72
+ retryConfig: context.retryConfig,
73
+ retryCodes: context.retryCodes,
74
+ });
75
+ if (!doResult.ok) {
76
+ return [doResult, { status: "request-error", request: req }];
77
+ }
78
+ const response = doResult.value;
79
+ const responseFields = {
80
+ HttpMeta: { Response: response, Request: req },
81
+ };
82
+ const [result] = await M.match(M.json(200, operations.GetApiSandboxByIdCheckpointsResponse$inboundSchema), M.jsonErr([400, 401, 403, 404], errors.ErrorMessage$inboundSchema), M.jsonErr(500, errors.ErrorMessageStatusCode$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
83
+ if (!result.ok) {
84
+ return [result, { status: "complete", request: req, response }];
85
+ }
86
+ return [result, { status: "complete", request: req, response }];
87
+ }
88
+ //# sourceMappingURL=sandbox-get-api-sandbox-by-id-checkpoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox-get-api-sandbox-by-id-checkpoints.js","sourceRoot":"","sources":["../../../src/funcs/sandbox-get-api-sandbox-by-id-checkpoints.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,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,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
12
12
  * Watch a sandbox's output live
13
13
  *
14
14
  * @remarks
15
- * Server-sent events: `stdout`, `stderr`, `rpc`, `unrecognised`, `status`, `ping` (every 15s), `error`. `rpc` carries one complete NDJSON frame from a Helix session running in RPC mode, verbatim — parse it client-side. `unrecognised` carries a line the backend could not classify; receiving one means this server and the sandbox image disagree about the protocol, and it is forwarded rather than dropped so that drift is visible instead of silent. All four output events share the `{seq, ts, text}` shape and one sequence counter, so their interleaving is the order the box produced them. `seq` is monotonic per sandbox and starts at 1; pass the last one seen as `?since=` to resume. If the buffer has already rolled past `since`, an `error` event names the lost range rather than skipping it silently. Disconnecting tears down the upstream.
15
+ * Server-sent events: `stdout`, `stderr`, `rpc`, `unrecognised`, `session`, `live`, `status`, `ping` (every 15s), `error`. `rpc` carries one complete NDJSON frame from a Helix session running in RPC mode, verbatim — parse it client-side. `unrecognised` carries a line the backend could not classify; receiving one means this server and the sandbox image disagree about the protocol, and it is forwarded rather than dropped so that drift is visible instead of silent. Those four output events share the `{seq, ts, text}` shape and one sequence counter, so their interleaving is the order the box produced them. `session` shares that counter too but carries flat fields instead of `text` — `{sessionId, status: "started"|"exited", exitCode, lastSeq, generation}` — and is how a client learns a Helix session began or ended; it is persisted and replayed like any output event, and `exitCode` is the session's real code (the terminal `status` event describes the SANDBOX and reports null by contract). `live` is emitted at most once, before the opening `status`, and only when this instance cannot follow the sandbox: it replays the log and ends rather than tailing. `seq` is monotonic per sandbox and starts at 1, and every seq-bearing event also carries it as the SSE `id:` field; pass the last one seen as `?since=` to resume. A resume is served from the persisted event log first and the live buffer only for the tail, so it survives a restart and can be answered by an instance that never spawned the box. If the requested range has been TRIMMED from that log, an `error` event names the lost range rather than skipping it silently — it carries `code: 'gap'` with the inclusive `from`/`to` wire seqs, and the stream continues past the gap; a source failure instead carries `code: 'upstream'` and is the end of the stream. Branch on `code`, never on `message`. Disconnecting tears down the upstream.
16
16
  */
17
17
  export declare function sandboxGetApiSandboxByIdStream(client: MutagentCore, request: operations.GetApiSandboxByIdStreamRequest, options?: RequestOptions): APIPromise<Result<operations.GetApiSandboxByIdStreamResponse, errors.ErrorMessage | errors.ErrorMessageStatusCode | MutagentError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
18
  //# sourceMappingURL=sandbox-get-api-sandbox-by-id-stream.d.ts.map
@@ -16,7 +16,7 @@ import { APIPromise } from "../types/async.js";
16
16
  * Watch a sandbox's output live
17
17
  *
18
18
  * @remarks
19
- * Server-sent events: `stdout`, `stderr`, `rpc`, `unrecognised`, `status`, `ping` (every 15s), `error`. `rpc` carries one complete NDJSON frame from a Helix session running in RPC mode, verbatim — parse it client-side. `unrecognised` carries a line the backend could not classify; receiving one means this server and the sandbox image disagree about the protocol, and it is forwarded rather than dropped so that drift is visible instead of silent. All four output events share the `{seq, ts, text}` shape and one sequence counter, so their interleaving is the order the box produced them. `seq` is monotonic per sandbox and starts at 1; pass the last one seen as `?since=` to resume. If the buffer has already rolled past `since`, an `error` event names the lost range rather than skipping it silently. Disconnecting tears down the upstream.
19
+ * Server-sent events: `stdout`, `stderr`, `rpc`, `unrecognised`, `session`, `live`, `status`, `ping` (every 15s), `error`. `rpc` carries one complete NDJSON frame from a Helix session running in RPC mode, verbatim — parse it client-side. `unrecognised` carries a line the backend could not classify; receiving one means this server and the sandbox image disagree about the protocol, and it is forwarded rather than dropped so that drift is visible instead of silent. Those four output events share the `{seq, ts, text}` shape and one sequence counter, so their interleaving is the order the box produced them. `session` shares that counter too but carries flat fields instead of `text` — `{sessionId, status: "started"|"exited", exitCode, lastSeq, generation}` — and is how a client learns a Helix session began or ended; it is persisted and replayed like any output event, and `exitCode` is the session's real code (the terminal `status` event describes the SANDBOX and reports null by contract). `live` is emitted at most once, before the opening `status`, and only when this instance cannot follow the sandbox: it replays the log and ends rather than tailing. `seq` is monotonic per sandbox and starts at 1, and every seq-bearing event also carries it as the SSE `id:` field; pass the last one seen as `?since=` to resume. A resume is served from the persisted event log first and the live buffer only for the tail, so it survives a restart and can be answered by an instance that never spawned the box. If the requested range has been TRIMMED from that log, an `error` event names the lost range rather than skipping it silently — it carries `code: 'gap'` with the inclusive `from`/`to` wire seqs, and the stream continues past the gap; a source failure instead carries `code: 'upstream'` and is the end of the stream. Branch on `code`, never on `message`. Disconnecting tears down the upstream.
20
20
  */
21
21
  export function sandboxGetApiSandboxByIdStream(client, request, options) {
22
22
  return new APIPromise($do(client, request, options));
@@ -0,0 +1,18 @@
1
+ import { MutagentCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/http-client-errors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { MutagentError } from "../models/errors/mutagent-error.js";
6
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
7
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
8
+ import * as operations from "../models/operations/index.js";
9
+ import { APIPromise } from "../types/async.js";
10
+ import { Result } from "../types/fp.js";
11
+ /**
12
+ * Capture a Helix session's own transcript
13
+ *
14
+ * @remarks
15
+ * Copies the HARNESS's session file off the box, verbatim, and stores it. This is what a NEW box needs to CONTINUE the conversation — distinct from `GET /:id/stream?since=`, which replays what the client observed and restores no agent state at all. 409 when the session has not completed a turn: the harness writes its file lazily, so there is genuinely nothing to capture yet, and storing an empty snapshot would produce a restore that succeeds and restores nothing. 503 when the deployment has no snapshot store.
16
+ */
17
+ export declare function sandboxPostApiSandboxByIdCheckpoint(client: MutagentCore, request: operations.PostApiSandboxByIdCheckpointRequest, options?: RequestOptions): APIPromise<Result<operations.PostApiSandboxByIdCheckpointResponse, errors.ErrorMessage | errors.ErrorMessageStatusCode | MutagentError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
+ //# sourceMappingURL=sandbox-post-api-sandbox-by-id-checkpoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox-post-api-sandbox-by-id-checkpoint.d.ts","sourceRoot":"","sources":["../../../src/funcs/sandbox-post-api-sandbox-by-id-checkpoint.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM1C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,UAAU,CAAC,mCAAmC,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,oCAAoC,EAC7C,MAAM,CAAC,YAAY,GACnB,MAAM,CAAC,sBAAsB,GAC7B,aAAa,GACb,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -0,0 +1,89 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4-mini";
5
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
6
+ import { matchStatusCode } from "../lib/http.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as errors from "../models/errors/index.js";
13
+ import * as operations from "../models/operations/index.js";
14
+ import { APIPromise } from "../types/async.js";
15
+ /**
16
+ * Capture a Helix session's own transcript
17
+ *
18
+ * @remarks
19
+ * Copies the HARNESS's session file off the box, verbatim, and stores it. This is what a NEW box needs to CONTINUE the conversation — distinct from `GET /:id/stream?since=`, which replays what the client observed and restores no agent state at all. 409 when the session has not completed a turn: the harness writes its file lazily, so there is genuinely nothing to capture yet, and storing an empty snapshot would produce a restore that succeeds and restores nothing. 503 when the deployment has no snapshot store.
20
+ */
21
+ export function sandboxPostApiSandboxByIdCheckpoint(client, request, options) {
22
+ return new APIPromise($do(client, request, options));
23
+ }
24
+ async function $do(client, request, options) {
25
+ const parsed = safeParse(request, (value) => z.parse(operations.PostApiSandboxByIdCheckpointRequest$outboundSchema, value), "Input validation failed");
26
+ if (!parsed.ok) {
27
+ return [parsed, { status: "invalid" }];
28
+ }
29
+ const payload = parsed.value;
30
+ const body = encodeJSON("body", payload.body, { explode: true });
31
+ const pathParams = {
32
+ id: encodeSimple("id", payload.id, {
33
+ explode: false,
34
+ charEncoding: "percent",
35
+ }),
36
+ };
37
+ const path = pathToFunc("/api/sandbox/{id}/checkpoint")(pathParams);
38
+ const headers = new Headers(compactMap({
39
+ "Content-Type": "application/json",
40
+ Accept: "application/json",
41
+ }));
42
+ const securityInput = await extractSecurity(client._options.security);
43
+ const requestSecurity = resolveGlobalSecurity(securityInput);
44
+ const context = {
45
+ options: client._options,
46
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
47
+ operationID: "postApiSandboxByIdCheckpoint",
48
+ oAuth2Scopes: null,
49
+ resolvedSecurity: requestSecurity,
50
+ securitySource: client._options.security,
51
+ retryConfig: options?.retries
52
+ || client._options.retryConfig
53
+ || { strategy: "none" },
54
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
55
+ };
56
+ const requestRes = client._createRequest(context, {
57
+ security: requestSecurity,
58
+ method: "POST",
59
+ baseURL: options?.serverURL,
60
+ path: path,
61
+ headers: headers,
62
+ body: body,
63
+ userAgent: client._options.userAgent,
64
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
65
+ }, options);
66
+ if (!requestRes.ok) {
67
+ return [requestRes, { status: "invalid" }];
68
+ }
69
+ const req = requestRes.value;
70
+ const doResult = await client._do(req, {
71
+ context,
72
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
73
+ retryConfig: context.retryConfig,
74
+ retryCodes: context.retryCodes,
75
+ });
76
+ if (!doResult.ok) {
77
+ return [doResult, { status: "request-error", request: req }];
78
+ }
79
+ const response = doResult.value;
80
+ const responseFields = {
81
+ HttpMeta: { Response: response, Request: req },
82
+ };
83
+ const [result] = await M.match(M.json(200, operations.PostApiSandboxByIdCheckpointResponse$inboundSchema), M.jsonErr([400, 401, 403, 404], errors.ErrorMessage$inboundSchema), M.jsonErr(409, errors.ErrorMessageStatusCode$inboundSchema), M.jsonErr(500, errors.ErrorMessageStatusCode$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
84
+ if (!result.ok) {
85
+ return [result, { status: "complete", request: req, response }];
86
+ }
87
+ return [result, { status: "complete", request: req, response }];
88
+ }
89
+ //# sourceMappingURL=sandbox-post-api-sandbox-by-id-checkpoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox-post-api-sandbox-by-id-checkpoint.js","sourceRoot":"","sources":["../../../src/funcs/sandbox-post-api-sandbox-by-id-checkpoint.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAIpD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;GAKG;AACH,MAAM,UAAU,mCAAmC,CACjD,MAAoB,EACpB,OAAuD,EACvD,OAAwB;IAgBxB,OAAO,IAAI,UAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAoB,EACpB,OAAuD,EACvD,OAAwB;IAmBxB,MAAM,MAAM,GAAG,SAAS,CACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CACR,CAAC,CAAC,KAAK,CACL,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Ac,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAa5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,kDAAkD,CAAC,EAC1E,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,0BAA0B,CAAC,EAClE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,oCAAoC,CAAC,EAC3D,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,oCAAoC,CAAC,EAC3D,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { MutagentCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/http-client-errors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { MutagentError } from "../models/errors/mutagent-error.js";
6
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
7
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
8
+ import * as operations from "../models/operations/index.js";
9
+ import { APIPromise } from "../types/async.js";
10
+ import { Result } from "../types/fp.js";
11
+ /**
12
+ * Rebuild this sandbox from a checkpoint, with full state
13
+ *
14
+ * @remarks
15
+ * A cloud equivalent of a local `/resume`, and it does NOT require the old box to still exist — a reaped or torn-down sandbox is the ordinary input. In order: a fresh box is spawned for the SAME sandbox id at generation+1 with the same secret NAMES (values are re-minted, never stored); the relay's seq counter is seeded from the persisted high-water mark so a client's `?since=` cursor stays valid; the workspace and `$HOME/.mutagent` are extracted BEFORE Helix starts; a session is started in the checkpoint's cwd; the conversation is written in, its sha256 compared against the box's own, and only then switched onto; the runtime settings and pending queue are replayed; and a `session {status:"restored"}` frame is appended to the stream with a real seq. A digest mismatch is a 422 and the session is NOT switched. 404 if the snapshot is not in this workspace. Read `notRestored` — a restore that carried only the conversation is legitimate and says so there. A DEFAULTED restore uses the newest checkpoint that has a manifest and lists newer rows it passed over in `skippedSnapshots`. `partial: true` restores the incremental transcript prefix beyond the checkpoint when one exists (the frame then carries `partial: true`); its tail may end on a tool call with no result, which the harness answers with a synthetic error on the next turn — the accepted risk of asking for it.
16
+ */
17
+ export declare function sandboxPostApiSandboxByIdRestore(client: MutagentCore, request: operations.PostApiSandboxByIdRestoreRequest, options?: RequestOptions): APIPromise<Result<operations.PostApiSandboxByIdRestoreResponse, errors.ErrorMessage | errors.ErrorMessageStatusCode | MutagentError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
+ //# sourceMappingURL=sandbox-post-api-sandbox-by-id-restore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox-post-api-sandbox-by-id-restore.d.ts","sourceRoot":"","sources":["../../../src/funcs/sandbox-post-api-sandbox-by-id-restore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM1C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,UAAU,CAAC,gCAAgC,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,iCAAiC,EAC1C,MAAM,CAAC,YAAY,GACnB,MAAM,CAAC,sBAAsB,GAC7B,aAAa,GACb,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}