sandbox0 0.10.3 → 0.10.5

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 (188) hide show
  1. package/README.md +134 -0
  2. package/dist/apispec/src/apis/FilesApi.d.ts +14 -10
  3. package/dist/apispec/src/apis/FilesApi.d.ts.map +1 -1
  4. package/dist/apispec/src/apis/FilesApi.js +14 -10
  5. package/dist/apispec/src/apis/SandboxRootfsApi.d.ts +96 -5
  6. package/dist/apispec/src/apis/SandboxRootfsApi.d.ts.map +1 -1
  7. package/dist/apispec/src/apis/SandboxRootfsApi.js +291 -5
  8. package/dist/apispec/src/apis/SandboxesApi.d.ts +345 -6
  9. package/dist/apispec/src/apis/SandboxesApi.d.ts.map +1 -1
  10. package/dist/apispec/src/apis/SandboxesApi.js +1017 -7
  11. package/dist/apispec/src/apis/SessionsApi.d.ts +51 -1
  12. package/dist/apispec/src/apis/SessionsApi.d.ts.map +1 -1
  13. package/dist/apispec/src/apis/SessionsApi.js +159 -1
  14. package/dist/apispec/src/models/CaptureSandboxRootFSSnapshotRequest.d.ts +51 -0
  15. package/dist/apispec/src/models/CaptureSandboxRootFSSnapshotRequest.d.ts.map +1 -0
  16. package/dist/apispec/src/models/CaptureSandboxRootFSSnapshotRequest.js +49 -0
  17. package/dist/apispec/src/models/ConditionalExecutionSessionRequest.d.ts +46 -0
  18. package/dist/apispec/src/models/ConditionalExecutionSessionRequest.d.ts.map +1 -0
  19. package/dist/apispec/src/models/ConditionalExecutionSessionRequest.js +52 -0
  20. package/dist/apispec/src/models/ContainerSpec.d.ts +1 -2
  21. package/dist/apispec/src/models/ContainerSpec.d.ts.map +1 -1
  22. package/dist/apispec/src/models/ContainerSpec.js +0 -1
  23. package/dist/apispec/src/models/ForkSandboxConfig.d.ts +6 -0
  24. package/dist/apispec/src/models/ForkSandboxConfig.d.ts.map +1 -1
  25. package/dist/apispec/src/models/ForkSandboxConfig.js +2 -0
  26. package/dist/apispec/src/models/ForkSandboxRequest.d.ts +6 -0
  27. package/dist/apispec/src/models/ForkSandboxRequest.d.ts.map +1 -1
  28. package/dist/apispec/src/models/ForkSandboxRequest.js +2 -0
  29. package/dist/apispec/src/models/ManagedFileReadResponse.d.ts +64 -0
  30. package/dist/apispec/src/models/ManagedFileReadResponse.d.ts.map +1 -0
  31. package/dist/apispec/src/models/ManagedFileReadResponse.js +65 -0
  32. package/dist/apispec/src/models/ManagedFileWriteRequest.d.ts +39 -0
  33. package/dist/apispec/src/models/ManagedFileWriteRequest.d.ts.map +1 -0
  34. package/dist/apispec/src/models/ManagedFileWriteRequest.js +47 -0
  35. package/dist/apispec/src/models/ManagedFilesState.d.ts +58 -0
  36. package/dist/apispec/src/models/ManagedFilesState.d.ts.map +1 -0
  37. package/dist/apispec/src/models/ManagedFilesState.js +61 -0
  38. package/dist/apispec/src/models/PauseSandboxResponse.d.ts +12 -0
  39. package/dist/apispec/src/models/PauseSandboxResponse.d.ts.map +1 -1
  40. package/dist/apispec/src/models/PauseSandboxResponse.js +4 -0
  41. package/dist/apispec/src/models/QuotaDimension.d.ts +6 -1
  42. package/dist/apispec/src/models/QuotaDimension.d.ts.map +1 -1
  43. package/dist/apispec/src/models/QuotaDimension.js +6 -1
  44. package/dist/apispec/src/models/ResourceQuota.d.ts +1 -1
  45. package/dist/apispec/src/models/ResumeSandboxResponse.d.ts +25 -1
  46. package/dist/apispec/src/models/ResumeSandboxResponse.d.ts.map +1 -1
  47. package/dist/apispec/src/models/ResumeSandboxResponse.js +8 -0
  48. package/dist/apispec/src/models/SandboxExecutionStateRequest.d.ts +14 -2
  49. package/dist/apispec/src/models/SandboxExecutionStateRequest.d.ts.map +1 -1
  50. package/dist/apispec/src/models/SandboxExecutionStateRequest.js +4 -0
  51. package/dist/apispec/src/models/SandboxHealth.d.ts +99 -0
  52. package/dist/apispec/src/models/SandboxHealth.d.ts.map +1 -0
  53. package/dist/apispec/src/models/SandboxHealth.js +90 -0
  54. package/dist/apispec/src/models/SandboxHealthObservation.d.ts +109 -0
  55. package/dist/apispec/src/models/SandboxHealthObservation.d.ts.map +1 -0
  56. package/dist/apispec/src/models/SandboxHealthObservation.js +110 -0
  57. package/dist/apispec/src/models/SandboxMemoryOperation.d.ts +115 -0
  58. package/dist/apispec/src/models/SandboxMemoryOperation.d.ts.map +1 -0
  59. package/dist/apispec/src/models/SandboxMemoryOperation.js +100 -0
  60. package/dist/apispec/src/models/SandboxMemoryRestoration.d.ts +64 -0
  61. package/dist/apispec/src/models/SandboxMemoryRestoration.d.ts.map +1 -0
  62. package/dist/apispec/src/models/SandboxMemoryRestoration.js +64 -0
  63. package/dist/apispec/src/models/SandboxMemoryRestorationStep.d.ts +63 -0
  64. package/dist/apispec/src/models/SandboxMemoryRestorationStep.d.ts.map +1 -0
  65. package/dist/apispec/src/models/SandboxMemoryRestorationStep.js +63 -0
  66. package/dist/apispec/src/models/SandboxPauseRequest.d.ts +39 -0
  67. package/dist/apispec/src/models/SandboxPauseRequest.d.ts.map +1 -0
  68. package/dist/apispec/src/models/SandboxPauseRequest.js +43 -0
  69. package/dist/apispec/src/models/SandboxRestartFinalCapture.d.ts +79 -0
  70. package/dist/apispec/src/models/SandboxRestartFinalCapture.d.ts.map +1 -0
  71. package/dist/apispec/src/models/SandboxRestartFinalCapture.js +70 -0
  72. package/dist/apispec/src/models/SandboxRestartFinalCaptureAcknowledgement.d.ts +39 -0
  73. package/dist/apispec/src/models/SandboxRestartFinalCaptureAcknowledgement.d.ts.map +1 -0
  74. package/dist/apispec/src/models/SandboxRestartFinalCaptureAcknowledgement.js +47 -0
  75. package/dist/apispec/src/models/SandboxRestartFinalCaptureFile.d.ts +69 -0
  76. package/dist/apispec/src/models/SandboxRestartFinalCaptureFile.d.ts.map +1 -0
  77. package/dist/apispec/src/models/SandboxRestartFinalCaptureFile.js +67 -0
  78. package/dist/apispec/src/models/SandboxRestartOperation.d.ts +115 -0
  79. package/dist/apispec/src/models/SandboxRestartOperation.d.ts.map +1 -0
  80. package/dist/apispec/src/models/SandboxRestartOperation.js +95 -0
  81. package/dist/apispec/src/models/SandboxRestartRequest.d.ts +33 -0
  82. package/dist/apispec/src/models/SandboxRestartRequest.d.ts.map +1 -0
  83. package/dist/apispec/src/models/SandboxRestartRequest.js +43 -0
  84. package/dist/apispec/src/models/SandboxRestartRetryObservation.d.ts +83 -0
  85. package/dist/apispec/src/models/SandboxRestartRetryObservation.d.ts.map +1 -0
  86. package/dist/apispec/src/models/SandboxRestartRetryObservation.js +75 -0
  87. package/dist/apispec/src/models/SandboxRootFSForkLaunch.d.ts +123 -0
  88. package/dist/apispec/src/models/SandboxRootFSForkLaunch.d.ts.map +1 -0
  89. package/dist/apispec/src/models/SandboxRootFSForkLaunch.js +104 -0
  90. package/dist/apispec/src/models/SandboxRootFSForkLaunchRequest.d.ts +51 -0
  91. package/dist/apispec/src/models/SandboxRootFSForkLaunchRequest.d.ts.map +1 -0
  92. package/dist/apispec/src/models/SandboxRootFSForkLaunchRequest.js +55 -0
  93. package/dist/apispec/src/models/SandboxRootFSForkObservation.d.ts +129 -0
  94. package/dist/apispec/src/models/SandboxRootFSForkObservation.d.ts.map +1 -0
  95. package/dist/apispec/src/models/SandboxRootFSForkObservation.js +107 -0
  96. package/dist/apispec/src/models/SandboxRootFSIdentity.d.ts +138 -0
  97. package/dist/apispec/src/models/SandboxRootFSIdentity.d.ts.map +1 -0
  98. package/dist/apispec/src/models/SandboxRootFSIdentity.js +111 -0
  99. package/dist/apispec/src/models/SandboxRootFSSnapshot.d.ts +6 -0
  100. package/dist/apispec/src/models/SandboxRootFSSnapshot.d.ts.map +1 -1
  101. package/dist/apispec/src/models/SandboxRootFSSnapshot.js +2 -0
  102. package/dist/apispec/src/models/SandboxRuntimeHealth.d.ts +40 -0
  103. package/dist/apispec/src/models/SandboxRuntimeHealth.d.ts.map +1 -0
  104. package/dist/apispec/src/models/SandboxRuntimeHealth.js +48 -0
  105. package/dist/apispec/src/models/SandboxSnapshotRestoreOperation.d.ts +139 -0
  106. package/dist/apispec/src/models/SandboxSnapshotRestoreOperation.d.ts.map +1 -0
  107. package/dist/apispec/src/models/SandboxSnapshotRestoreOperation.js +109 -0
  108. package/dist/apispec/src/models/SandboxSnapshotRestoreRequest.d.ts +51 -0
  109. package/dist/apispec/src/models/SandboxSnapshotRestoreRequest.d.ts.map +1 -0
  110. package/dist/apispec/src/models/SandboxSnapshotRestoreRequest.js +55 -0
  111. package/dist/apispec/src/models/SandboxStorageHealth.d.ts +46 -0
  112. package/dist/apispec/src/models/SandboxStorageHealth.d.ts.map +1 -0
  113. package/dist/apispec/src/models/SandboxStorageHealth.js +52 -0
  114. package/dist/apispec/src/models/SandboxUpdateConfig.d.ts +15 -3
  115. package/dist/apispec/src/models/SandboxUpdateConfig.d.ts.map +1 -1
  116. package/dist/apispec/src/models/SandboxUpdateConfig.js +3 -0
  117. package/dist/apispec/src/models/SuccessManagedFileReadResponse.d.ts +40 -0
  118. package/dist/apispec/src/models/SuccessManagedFileReadResponse.d.ts.map +1 -0
  119. package/dist/apispec/src/models/SuccessManagedFileReadResponse.js +48 -0
  120. package/dist/apispec/src/models/SuccessManagedFilesStateResponse.d.ts +40 -0
  121. package/dist/apispec/src/models/SuccessManagedFilesStateResponse.d.ts.map +1 -0
  122. package/dist/apispec/src/models/SuccessManagedFilesStateResponse.js +48 -0
  123. package/dist/apispec/src/models/SuccessSandboxHealthResponse.d.ts +40 -0
  124. package/dist/apispec/src/models/SuccessSandboxHealthResponse.d.ts.map +1 -0
  125. package/dist/apispec/src/models/SuccessSandboxHealthResponse.js +48 -0
  126. package/dist/apispec/src/models/SuccessSandboxMemoryOperationResponse.d.ts +40 -0
  127. package/dist/apispec/src/models/SuccessSandboxMemoryOperationResponse.d.ts.map +1 -0
  128. package/dist/apispec/src/models/SuccessSandboxMemoryOperationResponse.js +48 -0
  129. package/dist/apispec/src/models/SuccessSandboxMemoryRestorationResponse.d.ts +40 -0
  130. package/dist/apispec/src/models/SuccessSandboxMemoryRestorationResponse.d.ts.map +1 -0
  131. package/dist/apispec/src/models/SuccessSandboxMemoryRestorationResponse.js +48 -0
  132. package/dist/apispec/src/models/SuccessSandboxRestartFinalCaptureFileResponse.d.ts +40 -0
  133. package/dist/apispec/src/models/SuccessSandboxRestartFinalCaptureFileResponse.d.ts.map +1 -0
  134. package/dist/apispec/src/models/SuccessSandboxRestartFinalCaptureFileResponse.js +48 -0
  135. package/dist/apispec/src/models/SuccessSandboxRestartFinalCaptureResponse.d.ts +40 -0
  136. package/dist/apispec/src/models/SuccessSandboxRestartFinalCaptureResponse.d.ts.map +1 -0
  137. package/dist/apispec/src/models/SuccessSandboxRestartFinalCaptureResponse.js +48 -0
  138. package/dist/apispec/src/models/SuccessSandboxRestartOperationResponse.d.ts +40 -0
  139. package/dist/apispec/src/models/SuccessSandboxRestartOperationResponse.d.ts.map +1 -0
  140. package/dist/apispec/src/models/SuccessSandboxRestartOperationResponse.js +48 -0
  141. package/dist/apispec/src/models/SuccessSandboxRootFSForkLaunchResponse.d.ts +40 -0
  142. package/dist/apispec/src/models/SuccessSandboxRootFSForkLaunchResponse.d.ts.map +1 -0
  143. package/dist/apispec/src/models/SuccessSandboxRootFSForkLaunchResponse.js +48 -0
  144. package/dist/apispec/src/models/SuccessSandboxRootFSForkObservationResponse.d.ts +40 -0
  145. package/dist/apispec/src/models/SuccessSandboxRootFSForkObservationResponse.d.ts.map +1 -0
  146. package/dist/apispec/src/models/SuccessSandboxRootFSForkObservationResponse.js +48 -0
  147. package/dist/apispec/src/models/SuccessSandboxRootFSIdentityResponse.d.ts +40 -0
  148. package/dist/apispec/src/models/SuccessSandboxRootFSIdentityResponse.d.ts.map +1 -0
  149. package/dist/apispec/src/models/SuccessSandboxRootFSIdentityResponse.js +48 -0
  150. package/dist/apispec/src/models/SuccessSandboxSnapshotRestoreOperationResponse.d.ts +40 -0
  151. package/dist/apispec/src/models/SuccessSandboxSnapshotRestoreOperationResponse.d.ts.map +1 -0
  152. package/dist/apispec/src/models/SuccessSandboxSnapshotRestoreOperationResponse.js +48 -0
  153. package/dist/apispec/src/models/index.d.ts +37 -0
  154. package/dist/apispec/src/models/index.d.ts.map +1 -1
  155. package/dist/apispec/src/models/index.js +37 -0
  156. package/dist/fork_launch.d.ts +15 -0
  157. package/dist/fork_launch.d.ts.map +1 -0
  158. package/dist/fork_launch.js +38 -0
  159. package/dist/health.d.ts +4 -0
  160. package/dist/health.d.ts.map +1 -0
  161. package/dist/health.js +46 -0
  162. package/dist/index.d.ts +9 -0
  163. package/dist/index.d.ts.map +1 -1
  164. package/dist/index.js +1 -0
  165. package/dist/memory_operation.d.ts +12 -0
  166. package/dist/memory_operation.d.ts.map +1 -0
  167. package/dist/memory_operation.js +44 -0
  168. package/dist/memory_restoration.d.ts +5 -0
  169. package/dist/memory_restoration.d.ts.map +1 -0
  170. package/dist/memory_restoration.js +29 -0
  171. package/dist/models.d.ts +2 -0
  172. package/dist/models.d.ts.map +1 -1
  173. package/dist/resources/sandboxes.d.ts +73 -1
  174. package/dist/resources/sandboxes.d.ts.map +1 -1
  175. package/dist/resources/sandboxes.js +336 -3
  176. package/dist/restart_final_capture.d.ts +10 -0
  177. package/dist/restart_final_capture.d.ts.map +1 -0
  178. package/dist/restart_final_capture.js +52 -0
  179. package/dist/sandbox_managed_files.d.ts +34 -0
  180. package/dist/sandbox_managed_files.d.ts.map +1 -0
  181. package/dist/sandbox_managed_files.js +96 -0
  182. package/dist/sandbox_sessions.d.ts +5 -0
  183. package/dist/sandbox_sessions.d.ts.map +1 -1
  184. package/dist/sandbox_sessions.js +103 -1
  185. package/dist/ws_client.d.ts +8 -0
  186. package/dist/ws_client.d.ts.map +1 -1
  187. package/dist/ws_client.js +20 -2
  188. package/package.json +2 -2
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import * as runtime from '../runtime.js';
15
- import { CreateSandboxRootFSSnapshotRequestToJSON, ForkSandboxRequestToJSON, RebaseSandboxRootFSRequestToJSON, RestoreSandboxRootFSRequestToJSON, SuccessDeletedResponseFromJSON, SuccessForkSandboxResponseFromJSON, SuccessRebaseSandboxRootFSResponseFromJSON, SuccessRestoreSandboxRootFSResponseFromJSON, SuccessSandboxRootFSSnapshotListResponseFromJSON, SuccessSandboxRootFSSnapshotResponseFromJSON, } from '../models/index.js';
15
+ import { CaptureSandboxRootFSSnapshotRequestToJSON, CreateSandboxRootFSSnapshotRequestToJSON, ForkSandboxRequestToJSON, RebaseSandboxRootFSRequestToJSON, RestoreSandboxRootFSRequestToJSON, SandboxRootFSForkLaunchRequestToJSON, SuccessDeletedResponseFromJSON, SuccessForkSandboxResponseFromJSON, SuccessRebaseSandboxRootFSResponseFromJSON, SuccessRestoreSandboxRootFSResponseFromJSON, SuccessSandboxRootFSForkLaunchResponseFromJSON, SuccessSandboxRootFSForkObservationResponseFromJSON, SuccessSandboxRootFSIdentityResponseFromJSON, SuccessSandboxRootFSSnapshotListResponseFromJSON, SuccessSandboxRootFSSnapshotResponseFromJSON, } from '../models/index.js';
16
16
  /**
17
17
  *
18
18
  */
@@ -84,7 +84,7 @@ export class SandboxRootfsApi extends runtime.BaseAPI {
84
84
  return await response.value();
85
85
  }
86
86
  /**
87
- * Forks the source sandbox writable rootfs into a new paused sandbox. A paused source is forked from its current rootfs head. A running source is briefly barriered and checkpointed first; the source sandbox remains running after the fork operation completes. Set memory=true to retain execution state as well. Memory forks require a stable Idempotency-Key. While capture or parent restoration is pending, retry 503 responses with that same key and request. A successful response always contains a committed paused child.
87
+ * Forks the source sandbox writable rootfs into a new paused sandbox. A paused source is forked from its current rootfs head. A running source is briefly barriered and checkpointed first; the source sandbox remains running after the fork operation completes. Set memory=true to retain execution state as well. Memory forks and requests with expected_runtime_generation require a stable Idempotency-Key. While capture or parent restoration is pending, retry 503 responses with that same key and request. A successful response always contains a committed paused child.
88
88
  * Fork a sandbox
89
89
  */
90
90
  async apiV1SandboxesIdForkPostRaw(requestParameters, initOverrides) {
@@ -116,7 +116,7 @@ export class SandboxRootfsApi extends runtime.BaseAPI {
116
116
  return new runtime.JSONApiResponse(response, (jsonValue) => SuccessForkSandboxResponseFromJSON(jsonValue));
117
117
  }
118
118
  /**
119
- * Forks the source sandbox writable rootfs into a new paused sandbox. A paused source is forked from its current rootfs head. A running source is briefly barriered and checkpointed first; the source sandbox remains running after the fork operation completes. Set memory=true to retain execution state as well. Memory forks require a stable Idempotency-Key. While capture or parent restoration is pending, retry 503 responses with that same key and request. A successful response always contains a committed paused child.
119
+ * Forks the source sandbox writable rootfs into a new paused sandbox. A paused source is forked from its current rootfs head. A running source is briefly barriered and checkpointed first; the source sandbox remains running after the fork operation completes. Set memory=true to retain execution state as well. Memory forks and requests with expected_runtime_generation require a stable Idempotency-Key. While capture or parent restoration is pending, retry 503 responses with that same key and request. A successful response always contains a committed paused child.
120
120
  * Fork a sandbox
121
121
  */
122
122
  async apiV1SandboxesIdForkPost(requestParameters, initOverrides) {
@@ -235,7 +235,7 @@ export class SandboxRootfsApi extends runtime.BaseAPI {
235
235
  return await response.value();
236
236
  }
237
237
  /**
238
- * Creates an immutable snapshot record from the source sandbox writable rootfs. A paused source is snapshotted from its current rootfs head. A running source is briefly barriered and checkpointed first; the source sandbox remains running after the snapshot operation completes.
238
+ * Creates an immutable snapshot record from the source sandbox writable rootfs. A paused source is snapshotted from its current rootfs head. A running source is briefly barriered and checkpointed first; the source sandbox remains running after the snapshot operation completes. Each sandbox retains at most its team\'s snapshots_per_sandbox quota (default 10). Creating a snapshot automatically removes the oldest excess public snapshots. Internal template-build snapshots are excluded.
239
239
  * Create sandbox rootfs snapshot
240
240
  */
241
241
  async apiV1SandboxesIdSnapshotsPostRaw(requestParameters, initOverrides) {
@@ -264,11 +264,297 @@ export class SandboxRootfsApi extends runtime.BaseAPI {
264
264
  return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxRootFSSnapshotResponseFromJSON(jsonValue));
265
265
  }
266
266
  /**
267
- * Creates an immutable snapshot record from the source sandbox writable rootfs. A paused source is snapshotted from its current rootfs head. A running source is briefly barriered and checkpointed first; the source sandbox remains running after the snapshot operation completes.
267
+ * Creates an immutable snapshot record from the source sandbox writable rootfs. A paused source is snapshotted from its current rootfs head. A running source is briefly barriered and checkpointed first; the source sandbox remains running after the snapshot operation completes. Each sandbox retains at most its team\'s snapshots_per_sandbox quota (default 10). Creating a snapshot automatically removes the oldest excess public snapshots. Internal template-build snapshots are excluded.
268
268
  * Create sandbox rootfs snapshot
269
269
  */
270
270
  async apiV1SandboxesIdSnapshotsPost(requestParameters, initOverrides) {
271
271
  const response = await this.apiV1SandboxesIdSnapshotsPostRaw(requestParameters, initOverrides);
272
272
  return await response.value();
273
273
  }
274
+ /**
275
+ * Captures one immutable RootFS snapshot from the expected running runtime generation without stopping its processes. Admission checks the generation while locking the external source and exact writer. Reuse the same key, generation and metadata after uncertainty: an accepted capture retains its original transaction and returns its original snapshot when completed, even if the source subsequently changes generation or pauses. A new capture of a paused or mismatched source is rejected. No guest execution, automatic resume, process restart or memory checkpoint fallback is performed. This distinct endpoint fails closed on servers without conditional capture.
276
+ * Capture a generation-conditioned running RootFS snapshot
277
+ */
278
+ async captureSandboxRootFSSnapshotRaw(requestParameters, initOverrides) {
279
+ if (requestParameters['id'] == null) {
280
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling captureSandboxRootFSSnapshot().');
281
+ }
282
+ if (requestParameters['idempotencyKey'] == null) {
283
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling captureSandboxRootFSSnapshot().');
284
+ }
285
+ if (requestParameters['captureSandboxRootFSSnapshotRequest'] == null) {
286
+ throw new runtime.RequiredError('captureSandboxRootFSSnapshotRequest', 'Required parameter "captureSandboxRootFSSnapshotRequest" was null or undefined when calling captureSandboxRootFSSnapshot().');
287
+ }
288
+ const queryParameters = {};
289
+ const headerParameters = {};
290
+ headerParameters['Content-Type'] = 'application/json';
291
+ if (requestParameters['idempotencyKey'] != null) {
292
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
293
+ }
294
+ if (this.configuration && this.configuration.accessToken) {
295
+ const token = this.configuration.accessToken;
296
+ const tokenString = await token("bearerAuth", []);
297
+ if (tokenString) {
298
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
299
+ }
300
+ }
301
+ let urlPath = `/api/v1/sandboxes/{id}/snapshots/capture`;
302
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
303
+ const response = await this.request({
304
+ path: urlPath,
305
+ method: 'POST',
306
+ headers: headerParameters,
307
+ query: queryParameters,
308
+ body: CaptureSandboxRootFSSnapshotRequestToJSON(requestParameters['captureSandboxRootFSSnapshotRequest']),
309
+ }, initOverrides);
310
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxRootFSSnapshotResponseFromJSON(jsonValue));
311
+ }
312
+ /**
313
+ * Captures one immutable RootFS snapshot from the expected running runtime generation without stopping its processes. Admission checks the generation while locking the external source and exact writer. Reuse the same key, generation and metadata after uncertainty: an accepted capture retains its original transaction and returns its original snapshot when completed, even if the source subsequently changes generation or pauses. A new capture of a paused or mismatched source is rejected. No guest execution, automatic resume, process restart or memory checkpoint fallback is performed. This distinct endpoint fails closed on servers without conditional capture.
314
+ * Capture a generation-conditioned running RootFS snapshot
315
+ */
316
+ async captureSandboxRootFSSnapshot(requestParameters, initOverrides) {
317
+ const response = await this.captureSandboxRootFSSnapshotRaw(requestParameters, initOverrides);
318
+ return await response.value();
319
+ }
320
+ /**
321
+ * Reads only the capture identified by the authenticated caller, original Idempotency-Key and expected runtime generation. Does not admit, dispatch, retry, cancel or repair work. Completed receipts can be read after the source changes generation or pauses. A 404 is not proof of cancellation and must not clear an outstanding operation fence. A missing, expired or deleted retained snapshot is never replaced with a new capture.
322
+ * Read the original generation-conditioned snapshot receipt
323
+ */
324
+ async getCapturedSandboxRootFSSnapshotRaw(requestParameters, initOverrides) {
325
+ if (requestParameters['id'] == null) {
326
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getCapturedSandboxRootFSSnapshot().');
327
+ }
328
+ if (requestParameters['idempotencyKey'] == null) {
329
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling getCapturedSandboxRootFSSnapshot().');
330
+ }
331
+ if (requestParameters['expectedRuntimeGeneration'] == null) {
332
+ throw new runtime.RequiredError('expectedRuntimeGeneration', 'Required parameter "expectedRuntimeGeneration" was null or undefined when calling getCapturedSandboxRootFSSnapshot().');
333
+ }
334
+ const queryParameters = {};
335
+ if (requestParameters['expectedRuntimeGeneration'] != null) {
336
+ queryParameters['expected_runtime_generation'] = requestParameters['expectedRuntimeGeneration'];
337
+ }
338
+ const headerParameters = {};
339
+ if (requestParameters['idempotencyKey'] != null) {
340
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
341
+ }
342
+ if (this.configuration && this.configuration.accessToken) {
343
+ const token = this.configuration.accessToken;
344
+ const tokenString = await token("bearerAuth", []);
345
+ if (tokenString) {
346
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
347
+ }
348
+ }
349
+ let urlPath = `/api/v1/sandboxes/{id}/snapshots/capture`;
350
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
351
+ const response = await this.request({
352
+ path: urlPath,
353
+ method: 'GET',
354
+ headers: headerParameters,
355
+ query: queryParameters,
356
+ }, initOverrides);
357
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxRootFSSnapshotResponseFromJSON(jsonValue));
358
+ }
359
+ /**
360
+ * Reads only the capture identified by the authenticated caller, original Idempotency-Key and expected runtime generation. Does not admit, dispatch, retry, cancel or repair work. Completed receipts can be read after the source changes generation or pauses. A 404 is not proof of cancellation and must not clear an outstanding operation fence. A missing, expired or deleted retained snapshot is never replaced with a new capture.
361
+ * Read the original generation-conditioned snapshot receipt
362
+ */
363
+ async getCapturedSandboxRootFSSnapshot(requestParameters, initOverrides) {
364
+ const response = await this.getCapturedSandboxRootFSSnapshotRaw(requestParameters, initOverrides);
365
+ return await response.value();
366
+ }
367
+ /**
368
+ * Reads one external database observation for the original authenticated caller, Idempotency-Key and source runtime generation, including zero. Does not submit, retry, cancel or repair work, contact the guest or resume a runtime. Requires sandbox:read. A 404 is not proof of cancellation. Only RootFS forks qualify: memory forks are rejected. The child must remain paused, never run, and retain its original claim and durable head. Configuration must match birth or the one externally committed credential-free network isolation preparation; other changes are rejected. Running-source forks must retain their checkpoint proof; paused-source forks must retain the source filesystem binding. Later source generations or a retained source tombstone do not create a new capture. This is not a credential-safety attestation or a state reservation; subsequent mutations require their own identity conditions.
369
+ * Read original RootFS fork destination provenance
370
+ */
371
+ async getSandboxRootFSForkRaw(requestParameters, initOverrides) {
372
+ if (requestParameters['id'] == null) {
373
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getSandboxRootFSFork().');
374
+ }
375
+ if (requestParameters['idempotencyKey'] == null) {
376
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling getSandboxRootFSFork().');
377
+ }
378
+ if (requestParameters['expectedRuntimeGeneration'] == null) {
379
+ throw new runtime.RequiredError('expectedRuntimeGeneration', 'Required parameter "expectedRuntimeGeneration" was null or undefined when calling getSandboxRootFSFork().');
380
+ }
381
+ const queryParameters = {};
382
+ if (requestParameters['expectedRuntimeGeneration'] != null) {
383
+ queryParameters['expected_runtime_generation'] = requestParameters['expectedRuntimeGeneration'];
384
+ }
385
+ const headerParameters = {};
386
+ if (requestParameters['idempotencyKey'] != null) {
387
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
388
+ }
389
+ if (this.configuration && this.configuration.accessToken) {
390
+ const token = this.configuration.accessToken;
391
+ const tokenString = await token("bearerAuth", []);
392
+ if (tokenString) {
393
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
394
+ }
395
+ }
396
+ let urlPath = `/api/v1/sandboxes/{id}/fork`;
397
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
398
+ const response = await this.request({
399
+ path: urlPath,
400
+ method: 'GET',
401
+ headers: headerParameters,
402
+ query: queryParameters,
403
+ }, initOverrides);
404
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxRootFSForkObservationResponseFromJSON(jsonValue));
405
+ }
406
+ /**
407
+ * Reads one external database observation for the original authenticated caller, Idempotency-Key and source runtime generation, including zero. Does not submit, retry, cancel or repair work, contact the guest or resume a runtime. Requires sandbox:read. A 404 is not proof of cancellation. Only RootFS forks qualify: memory forks are rejected. The child must remain paused, never run, and retain its original claim and durable head. Configuration must match birth or the one externally committed credential-free network isolation preparation; other changes are rejected. Running-source forks must retain their checkpoint proof; paused-source forks must retain the source filesystem binding. Later source generations or a retained source tombstone do not create a new capture. This is not a credential-safety attestation or a state reservation; subsequent mutations require their own identity conditions.
408
+ * Read original RootFS fork destination provenance
409
+ */
410
+ async getSandboxRootFSFork(requestParameters, initOverrides) {
411
+ const response = await this.getSandboxRootFSForkRaw(requestParameters, initOverrides);
412
+ return await response.value();
413
+ }
414
+ /**
415
+ * Binds the original authenticated caller and Idempotency-Key to a first cold launch of the child at generation zero. Supply the original fork operation and the child\'s observed filesystem, head and writer epoch. The child must retain its original birth configuration, or its one externally committed credential-free network isolation preparation; all other fields and automatic-wake disablement must remain unchanged. Memory forks and ordinary resumes are excluded. Retries must keep the same key and conditions; never refresh them after uncertainty. Requires sandbox:read. This is a read-only historical lookup and never admits, retries, wakes or contacts a guest. A 404 is not cancellation. Completed history survives later lifecycles. Current only compares the owner/lifecycle snapshot, not runtime health or a lease. Aborted does not prove physical absence. This is not credential admission.
416
+ * Read the original first fork launch result
417
+ */
418
+ async getSandboxRootFSForkLaunchRaw(requestParameters, initOverrides) {
419
+ if (requestParameters['id'] == null) {
420
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getSandboxRootFSForkLaunch().');
421
+ }
422
+ if (requestParameters['idempotencyKey'] == null) {
423
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling getSandboxRootFSForkLaunch().');
424
+ }
425
+ if (requestParameters['forkOperationId'] == null) {
426
+ throw new runtime.RequiredError('forkOperationId', 'Required parameter "forkOperationId" was null or undefined when calling getSandboxRootFSForkLaunch().');
427
+ }
428
+ if (requestParameters['filesystemId'] == null) {
429
+ throw new runtime.RequiredError('filesystemId', 'Required parameter "filesystemId" was null or undefined when calling getSandboxRootFSForkLaunch().');
430
+ }
431
+ if (requestParameters['headGenerationId'] == null) {
432
+ throw new runtime.RequiredError('headGenerationId', 'Required parameter "headGenerationId" was null or undefined when calling getSandboxRootFSForkLaunch().');
433
+ }
434
+ if (requestParameters['writerEpoch'] == null) {
435
+ throw new runtime.RequiredError('writerEpoch', 'Required parameter "writerEpoch" was null or undefined when calling getSandboxRootFSForkLaunch().');
436
+ }
437
+ const queryParameters = {};
438
+ if (requestParameters['forkOperationId'] != null) {
439
+ queryParameters['fork_operation_id'] = requestParameters['forkOperationId'];
440
+ }
441
+ if (requestParameters['filesystemId'] != null) {
442
+ queryParameters['filesystem_id'] = requestParameters['filesystemId'];
443
+ }
444
+ if (requestParameters['headGenerationId'] != null) {
445
+ queryParameters['head_generation_id'] = requestParameters['headGenerationId'];
446
+ }
447
+ if (requestParameters['writerEpoch'] != null) {
448
+ queryParameters['writer_epoch'] = requestParameters['writerEpoch'];
449
+ }
450
+ const headerParameters = {};
451
+ if (requestParameters['idempotencyKey'] != null) {
452
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
453
+ }
454
+ if (this.configuration && this.configuration.accessToken) {
455
+ const token = this.configuration.accessToken;
456
+ const tokenString = await token("bearerAuth", []);
457
+ if (tokenString) {
458
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
459
+ }
460
+ }
461
+ let urlPath = `/api/v1/sandboxes/{id}/fork-launch`;
462
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
463
+ const response = await this.request({
464
+ path: urlPath,
465
+ method: 'GET',
466
+ headers: headerParameters,
467
+ query: queryParameters,
468
+ }, initOverrides);
469
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxRootFSForkLaunchResponseFromJSON(jsonValue));
470
+ }
471
+ /**
472
+ * Binds the original authenticated caller and Idempotency-Key to a first cold launch of the child at generation zero. Supply the original fork operation and the child\'s observed filesystem, head and writer epoch. The child must retain its original birth configuration, or its one externally committed credential-free network isolation preparation; all other fields and automatic-wake disablement must remain unchanged. Memory forks and ordinary resumes are excluded. Retries must keep the same key and conditions; never refresh them after uncertainty. Requires sandbox:read. This is a read-only historical lookup and never admits, retries, wakes or contacts a guest. A 404 is not cancellation. Completed history survives later lifecycles. Current only compares the owner/lifecycle snapshot, not runtime health or a lease. Aborted does not prove physical absence. This is not credential admission.
473
+ * Read the original first fork launch result
474
+ */
475
+ async getSandboxRootFSForkLaunch(requestParameters, initOverrides) {
476
+ const response = await this.getSandboxRootFSForkLaunchRaw(requestParameters, initOverrides);
477
+ return await response.value();
478
+ }
479
+ /**
480
+ * Requires sandbox:read. Reads one owner-scoped control-plane database snapshot without guest execution, node probing or automatic resume. Binds runtime coordinates to the durable filesystem, committed head and immutable image digest. This is provenance, not current storage liveness, an uncommitted-write guarantee or credential-clean attestation. A later lifecycle can invalidate the observation; mutations must still condition on the expected runtime generation and their own admission evidence.
481
+ * Read external runtime and RootFS identity
482
+ */
483
+ async getSandboxRootFSIdentityRaw(requestParameters, initOverrides) {
484
+ if (requestParameters['id'] == null) {
485
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getSandboxRootFSIdentity().');
486
+ }
487
+ const queryParameters = {};
488
+ const headerParameters = {};
489
+ if (this.configuration && this.configuration.accessToken) {
490
+ const token = this.configuration.accessToken;
491
+ const tokenString = await token("bearerAuth", []);
492
+ if (tokenString) {
493
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
494
+ }
495
+ }
496
+ let urlPath = `/api/v1/sandboxes/{id}/rootfs/identity`;
497
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
498
+ const response = await this.request({
499
+ path: urlPath,
500
+ method: 'GET',
501
+ headers: headerParameters,
502
+ query: queryParameters,
503
+ }, initOverrides);
504
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxRootFSIdentityResponseFromJSON(jsonValue));
505
+ }
506
+ /**
507
+ * Requires sandbox:read. Reads one owner-scoped control-plane database snapshot without guest execution, node probing or automatic resume. Binds runtime coordinates to the durable filesystem, committed head and immutable image digest. This is provenance, not current storage liveness, an uncommitted-write guarantee or credential-clean attestation. A later lifecycle can invalidate the observation; mutations must still condition on the expected runtime generation and their own admission evidence.
508
+ * Read external runtime and RootFS identity
509
+ */
510
+ async getSandboxRootFSIdentity(requestParameters, initOverrides) {
511
+ const response = await this.getSandboxRootFSIdentityRaw(requestParameters, initOverrides);
512
+ return await response.value();
513
+ }
514
+ /**
515
+ * Binds the original authenticated caller and Idempotency-Key to a first cold launch of the child at generation zero. Supply the original fork operation and the child\'s observed filesystem, head and writer epoch. The child must retain its original birth configuration, or its one externally committed credential-free network isolation preparation; all other fields and automatic-wake disablement must remain unchanged. Memory forks and ordinary resumes are excluded. Retries must keep the same key and conditions; never refresh them after uncertainty. Requires sandbox:write. Admission is durable before node dispatch; manager recovery continues the exact lifecycle after a timeout or lost reply. No guest command or terminal is required. A 503 does not prove that admission failed; use GET with the original key and conditions. Completed history survives later lifecycles. Current only compares the owner/lifecycle snapshot, not runtime health or a lease. Aborted does not prove physical absence. This is not credential admission.
516
+ * Launch the original never-run RootFS fork
517
+ */
518
+ async launchSandboxRootFSForkRaw(requestParameters, initOverrides) {
519
+ if (requestParameters['id'] == null) {
520
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling launchSandboxRootFSFork().');
521
+ }
522
+ if (requestParameters['idempotencyKey'] == null) {
523
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling launchSandboxRootFSFork().');
524
+ }
525
+ if (requestParameters['sandboxRootFSForkLaunchRequest'] == null) {
526
+ throw new runtime.RequiredError('sandboxRootFSForkLaunchRequest', 'Required parameter "sandboxRootFSForkLaunchRequest" was null or undefined when calling launchSandboxRootFSFork().');
527
+ }
528
+ const queryParameters = {};
529
+ const headerParameters = {};
530
+ headerParameters['Content-Type'] = 'application/json';
531
+ if (requestParameters['idempotencyKey'] != null) {
532
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
533
+ }
534
+ if (this.configuration && this.configuration.accessToken) {
535
+ const token = this.configuration.accessToken;
536
+ const tokenString = await token("bearerAuth", []);
537
+ if (tokenString) {
538
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
539
+ }
540
+ }
541
+ let urlPath = `/api/v1/sandboxes/{id}/fork-launch`;
542
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
543
+ const response = await this.request({
544
+ path: urlPath,
545
+ method: 'POST',
546
+ headers: headerParameters,
547
+ query: queryParameters,
548
+ body: SandboxRootFSForkLaunchRequestToJSON(requestParameters['sandboxRootFSForkLaunchRequest']),
549
+ }, initOverrides);
550
+ return new runtime.JSONApiResponse(response, (jsonValue) => SuccessSandboxRootFSForkLaunchResponseFromJSON(jsonValue));
551
+ }
552
+ /**
553
+ * Binds the original authenticated caller and Idempotency-Key to a first cold launch of the child at generation zero. Supply the original fork operation and the child\'s observed filesystem, head and writer epoch. The child must retain its original birth configuration, or its one externally committed credential-free network isolation preparation; all other fields and automatic-wake disablement must remain unchanged. Memory forks and ordinary resumes are excluded. Retries must keep the same key and conditions; never refresh them after uncertainty. Requires sandbox:write. Admission is durable before node dispatch; manager recovery continues the exact lifecycle after a timeout or lost reply. No guest command or terminal is required. A 503 does not prove that admission failed; use GET with the original key and conditions. Completed history survives later lifecycles. Current only compares the owner/lifecycle snapshot, not runtime health or a lease. Aborted does not prove physical absence. This is not credential admission.
554
+ * Launch the original never-run RootFS fork
555
+ */
556
+ async launchSandboxRootFSFork(requestParameters, initOverrides) {
557
+ const response = await this.launchSandboxRootFSForkRaw(requestParameters, initOverrides);
558
+ return await response.value();
559
+ }
274
560
  }