@boatdev/sdk 1.5.0 → 1.7.0

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 (51) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/dist/apis/BoatApi.d.ts +2 -2
  3. package/dist/apis/BoatApi.js +2 -2
  4. package/dist/boat-helpers.d.ts +6 -0
  5. package/dist/boat-helpers.js +28 -4
  6. package/dist/esm/apis/BoatApi.d.ts +2 -2
  7. package/dist/esm/apis/BoatApi.js +2 -2
  8. package/dist/esm/boat-helpers.d.ts +6 -0
  9. package/dist/esm/boat-helpers.js +28 -4
  10. package/dist/esm/models/Conversation.d.ts +1 -1
  11. package/dist/esm/models/NamedSnapshotAllowance.d.ts +74 -0
  12. package/dist/esm/models/NamedSnapshotAllowance.js +55 -0
  13. package/dist/esm/models/NamedSnapshotListResponse.d.ts +7 -0
  14. package/dist/esm/models/NamedSnapshotListResponse.js +3 -0
  15. package/dist/esm/models/PromptRequest.d.ts +2 -1
  16. package/dist/esm/models/PromptRequest.js +2 -1
  17. package/dist/esm/models/Sandbox.d.ts +19 -0
  18. package/dist/esm/models/Sandbox.js +7 -0
  19. package/dist/esm/models/StopOperation.d.ts +72 -0
  20. package/dist/esm/models/StopOperation.js +72 -0
  21. package/dist/esm/models/index.d.ts +2 -0
  22. package/dist/esm/models/index.js +2 -0
  23. package/dist/models/Conversation.d.ts +1 -1
  24. package/dist/models/NamedSnapshotAllowance.d.ts +74 -0
  25. package/dist/models/NamedSnapshotAllowance.js +62 -0
  26. package/dist/models/NamedSnapshotListResponse.d.ts +7 -0
  27. package/dist/models/NamedSnapshotListResponse.js +3 -0
  28. package/dist/models/PromptRequest.d.ts +2 -1
  29. package/dist/models/PromptRequest.js +2 -1
  30. package/dist/models/Sandbox.d.ts +19 -0
  31. package/dist/models/Sandbox.js +7 -0
  32. package/dist/models/StopOperation.d.ts +72 -0
  33. package/dist/models/StopOperation.js +80 -0
  34. package/dist/models/index.d.ts +2 -0
  35. package/dist/models/index.js +2 -0
  36. package/docs/BoatApi.md +3 -2
  37. package/docs/NamedSnapshotAllowance.md +47 -0
  38. package/docs/NamedSnapshotListResponse.md +2 -0
  39. package/docs/PromptRequest.md +1 -1
  40. package/docs/Sandbox.md +6 -0
  41. package/docs/StopOperation.md +42 -0
  42. package/package.json +1 -1
  43. package/src/apis/BoatApi.ts +2 -2
  44. package/src/boat-helpers.ts +27 -5
  45. package/src/models/Conversation.ts +1 -1
  46. package/src/models/NamedSnapshotAllowance.ts +121 -0
  47. package/src/models/NamedSnapshotListResponse.ts +15 -0
  48. package/src/models/PromptRequest.ts +3 -2
  49. package/src/models/Sandbox.ts +31 -0
  50. package/src/models/StopOperation.ts +124 -0
  51. package/src/models/index.ts +2 -0
@@ -9,6 +9,7 @@ Name | Type
9
9
  `ok` | boolean
10
10
  `type` | string
11
11
  `snapshots` | [Array<NamedSnapshot>](NamedSnapshot.md)
12
+ `allowance` | [NamedSnapshotAllowance](NamedSnapshotAllowance.md)
12
13
 
13
14
  ## Example
14
15
 
@@ -20,6 +21,7 @@ const example = {
20
21
  "ok": null,
21
22
  "type": null,
22
23
  "snapshots": null,
24
+ "allowance": null,
23
25
  } satisfies NamedSnapshotListResponse
24
26
 
25
27
  console.log(example)
@@ -1,7 +1,7 @@
1
1
 
2
2
  # PromptRequest
3
3
 
4
- Work item to queue inside an existing sandbox. Provider credentials must already be configured in the Boat dashboard. **Providers (harnesses):** `codex`, `claude-code` (alias `claude`), `pi`, `opencode`, `prime-agent` (alias `prime`), `kimi` (Kimi Code CLI, alias `kimi-code`). Omit `provider` to use the harness the user selected on the Agents dashboard. **Models & reasoning effort** are harness- and model-specific and change over time. Fetch the live catalog (every provider\'s models and which reasoning-effort levels each accepts) from `GET /provider-models`. Some models accept no reasoning control. `pi`, `opencode` and `prime-agent` also expose models routed through OpenRouter and llmgateway (ids like `openrouter:anthropic/claude-sonnet-4.5`). **Conversations:** a sandbox runs many conversations in parallel, each with its own history. Set `new: true` to start a fresh conversation, or `conversationId` to continue a specific one; omit both to continue the sandbox\'s most-recently-active conversation. The response returns the `conversationId` this prompt ran in. Conversations run concurrently up to a per-sandbox limit that scales with the sandbox\'s memory; beyond it, prompts queue.
4
+ Work item to queue inside an existing sandbox. Provider credentials must already be configured in the Boat dashboard. **Providers (harnesses):** `codex`, `claude-code` (alias `claude`), `pi`, `opencode`, `prime-agent` (alias `prime`), `kimi` (Kimi Code CLI, alias `kimi-code`), `mistral` (Mistral Vibe). Omit `provider` to use the harness the user selected on the Agents dashboard. **Models & reasoning effort** are harness- and model-specific and change over time. Fetch the live catalog (every provider\'s models and which reasoning-effort levels each accepts) from `GET /provider-models`. Some models accept no reasoning control. `pi`, `opencode` and `prime-agent` also expose models routed through OpenRouter and llmgateway (ids like `openrouter:anthropic/claude-sonnet-4.5`). **Conversations:** a sandbox runs many conversations in parallel, each with its own history. Set `new: true` to start a fresh conversation, or `conversationId` to continue a specific one; omit both to continue the sandbox\'s most-recently-active conversation. The response returns the `conversationId` this prompt ran in. Conversations run concurrently up to a per-sandbox limit that scales with the sandbox\'s memory; beyond it, prompts queue.
5
5
 
6
6
  ## Properties
7
7
 
package/docs/Sandbox.md CHANGED
@@ -13,6 +13,8 @@ Name | Type
13
13
  `health` | string
14
14
  `healthReason` | string
15
15
  `degradedSince` | Date
16
+ `hydrated` | boolean
17
+ `hydratedAt` | Date
16
18
  `type` | string
17
19
  `vcpu` | number
18
20
  `memoryGB` | number
@@ -43,6 +45,7 @@ Name | Type
43
45
  `setupError` | string
44
46
  `environment` | string
45
47
  `environmentVersion` | number
48
+ `stop` | [StopOperation](StopOperation.md)
46
49
 
47
50
  ## Example
48
51
 
@@ -58,6 +61,8 @@ const example = {
58
61
  "health": null,
59
62
  "healthReason": null,
60
63
  "degradedSince": null,
64
+ "hydrated": null,
65
+ "hydratedAt": null,
61
66
  "type": null,
62
67
  "vcpu": null,
63
68
  "memoryGB": null,
@@ -88,6 +93,7 @@ const example = {
88
93
  "setupError": null,
89
94
  "environment": null,
90
95
  "environmentVersion": null,
96
+ "stop": null,
91
97
  } satisfies Sandbox
92
98
 
93
99
  console.log(example)
@@ -0,0 +1,42 @@
1
+
2
+ # StopOperation
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `id` | string
10
+ `status` | string
11
+ `requestedAt` | Date
12
+ `lastAttemptAt` | Date
13
+ `error` | string
14
+ `endedAt` | Date
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import type { StopOperation } from '@boatdev/sdk'
20
+
21
+ // TODO: Update the object below with actual values
22
+ const example = {
23
+ "id": null,
24
+ "status": null,
25
+ "requestedAt": null,
26
+ "lastAttemptAt": null,
27
+ "error": null,
28
+ "endedAt": null,
29
+ } satisfies StopOperation
30
+
31
+ console.log(example)
32
+
33
+ // Convert the instance to a JSON string
34
+ const exampleJSON: string = JSON.stringify(example)
35
+ console.log(exampleJSON)
36
+
37
+ // Parse the JSON string back to an object
38
+ const exampleParsed = JSON.parse(exampleJSON) as StopOperation
39
+ console.log(exampleParsed)
40
+ ```
41
+
42
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boatdev/sdk",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "description": "OpenAPI client for @boatdev/sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "license": "MIT",
@@ -4318,7 +4318,7 @@ export class BoatApi extends runtime.BaseAPI {
4318
4318
  }
4319
4319
 
4320
4320
  /**
4321
- * Stop active work and archive/snapshot the sandbox for later resume or fork. A stop always saves the sandbox\'s disk first. If that save is failing, the stop is refused and the sandbox keeps running so your work is not discarded, we retry automatically and email you. You are not billed for time spent in that state. Set `force: true` to stop anyway, accepting the loss of everything written since the last successful snapshot. This is irreversible; only reach for it after a stop has already failed.
4321
+ * Stop active work and archive/snapshot the sandbox for later resume or fork. A stop always saves the sandbox\'s disk first. If that save is failing, the stop is refused and the sandbox keeps running so your work is not discarded, we retry automatically and email you. You are not billed for time spent in that state. The stop is an operation: the response and the sandbox carry it as `stop`, with an `id` and a `status`. Poll `GET /sandboxes/{sandboxId}` until `stop.status` is `completed`. A failed attempt shows `failing` with its `error` and is retried until the sandbox archives; commands and prompts you send meanwhile do not cancel it. Only a resume ends it early (`superseded`). Calling stop again while one is pending returns the same `id`. Set `force: true` to stop anyway, accepting the loss of everything written since the last successful snapshot. This is irreversible; only reach for it after a stop has already failed.
4322
4322
  * Stop and archive sandbox
4323
4323
  */
4324
4324
  async stopRaw(requestParameters: StopOperationRequest | runtime.FlatBody<StopOperationRequest, 'stopRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SandboxActionResponse>> {
@@ -4329,7 +4329,7 @@ export class BoatApi extends runtime.BaseAPI {
4329
4329
  }
4330
4330
 
4331
4331
  /**
4332
- * Stop active work and archive/snapshot the sandbox for later resume or fork. A stop always saves the sandbox\'s disk first. If that save is failing, the stop is refused and the sandbox keeps running so your work is not discarded, we retry automatically and email you. You are not billed for time spent in that state. Set `force: true` to stop anyway, accepting the loss of everything written since the last successful snapshot. This is irreversible; only reach for it after a stop has already failed.
4332
+ * Stop active work and archive/snapshot the sandbox for later resume or fork. A stop always saves the sandbox\'s disk first. If that save is failing, the stop is refused and the sandbox keeps running so your work is not discarded, we retry automatically and email you. You are not billed for time spent in that state. The stop is an operation: the response and the sandbox carry it as `stop`, with an `id` and a `status`. Poll `GET /sandboxes/{sandboxId}` until `stop.status` is `completed`. A failed attempt shows `failing` with its `error` and is retried until the sandbox archives; commands and prompts you send meanwhile do not cancel it. Only a resume ends it early (`superseded`). Calling stop again while one is pending returns the same `id`. Set `force: true` to stop anyway, accepting the loss of everything written since the last successful snapshot. This is irreversible; only reach for it after a stop has already failed.
4333
4333
  * Stop and archive sandbox
4334
4334
  */
4335
4335
  async stop(requestParameters: StopOperationRequest | runtime.FlatBody<StopOperationRequest, 'stopRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SandboxActionResponse> {
@@ -182,8 +182,34 @@ export async function writeText(api: BoatApi, sandboxId: string, path: string, c
182
182
  return api.writeFile({ sandboxId, fileWriteRequest: { path, content, encoding: 'utf8' } });
183
183
  }
184
184
 
185
+ // A refusal that provably never ran the command (the sandbox is still restoring
186
+ // its disk, `retryable: true`) is retried for this long.
187
+ const STREAM_RETRY_MS = 60_000;
188
+
189
+ async function isRetryable(e: unknown): Promise<boolean> {
190
+ const response = (e as { response?: Response })?.response;
191
+ if (!response) return false;
192
+ const body = await response.clone().json().catch(() => undefined);
193
+ return body?.retryable === true;
194
+ }
195
+
196
+ /**
197
+ * Run a command and return its result.
198
+ *
199
+ * Safe to call right after `resume()`: a refusal that never ran the command
200
+ * (`retryable: true`, the sandbox is still restoring) is resent for up to 60 s.
201
+ */
185
202
  export async function execCommand(api: BoatApi, sandboxId: string, command: string, cwd?: string, timeoutSeconds = 30) {
186
- return api.command({ sandboxId, commandRequest: { command, cwd, timeoutSeconds } });
203
+ const deadline = Date.now() + STREAM_RETRY_MS;
204
+ for (;;) {
205
+ try {
206
+ return await api.command({ sandboxId, commandRequest: { command, cwd, timeoutSeconds } });
207
+ } catch (e) {
208
+ // The 1 s pause before the resend must also fit before the deadline.
209
+ if (Date.now() + 1_000 >= deadline || !(await isRetryable(e))) throw e;
210
+ }
211
+ await delay(1_000);
212
+ }
187
213
  }
188
214
 
189
215
  /** One line of a streamed command, as sent (an `exit` frame also carries e.g. `signal`, `oomKilled`). */
@@ -195,10 +221,6 @@ export type StreamCommandOptions = {
195
221
  signal?: AbortSignal;
196
222
  };
197
223
 
198
- // A refusal that provably never ran the command (the sandbox is still restoring
199
- // its disk, `retryable: true` before `started`) is retried for this long.
200
- const STREAM_RETRY_MS = 60_000;
201
-
202
224
  async function* ndjsonFrames(response: Response): AsyncGenerator<CommandFrame> {
203
225
  if (!response.body) throw new Error('The command stream has no body');
204
226
  const reader = response.body.getReader();
@@ -50,7 +50,7 @@ export interface Conversation {
50
50
  */
51
51
  running: boolean;
52
52
  /**
53
- * Harness the most recent prompt ran on (`claude`, `codex`, `pi`, `opencode`, `prime-agent`, `kimi`).
53
+ * Harness the most recent prompt ran on (`claude`, `codex`, `pi`, `opencode`, `prime-agent`, `kimi`, `mistral`).
54
54
  * @type {string}
55
55
  * @memberof Conversation
56
56
  */
@@ -0,0 +1,121 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Boat Public API v1
5
+ * Public JSON API for creating, operating, prompting, observing, and exposing sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * What the request's wallet (your active organization, `?org=`, or personal) pays for named snapshots. 10 are free per wallet; each one above costs $1.70 a month, charged daily from usage. An organization's count includes every member's names billed to it.
18
+ * @export
19
+ * @interface NamedSnapshotAllowance
20
+ */
21
+ export interface NamedSnapshotAllowance {
22
+ /**
23
+ * Organization the numbers are for. null = personal.
24
+ * @type {string}
25
+ * @memberof NamedSnapshotAllowance
26
+ */
27
+ org?: string | null;
28
+ /**
29
+ * That organization's name.
30
+ * @type {string}
31
+ * @memberof NamedSnapshotAllowance
32
+ */
33
+ orgName?: string | null;
34
+ /**
35
+ * Named snapshots kept for free.
36
+ * @type {number}
37
+ * @memberof NamedSnapshotAllowance
38
+ */
39
+ free?: number;
40
+ /**
41
+ * Named snapshots this wallet keeps.
42
+ * @type {number}
43
+ * @memberof NamedSnapshotAllowance
44
+ */
45
+ used?: number;
46
+ /**
47
+ * Named snapshots above the free ones.
48
+ * @type {number}
49
+ * @memberof NamedSnapshotAllowance
50
+ */
51
+ extra?: number;
52
+ /**
53
+ * What the extra ones cost per month.
54
+ * @type {number}
55
+ * @memberof NamedSnapshotAllowance
56
+ */
57
+ extraMonthlyDollars?: number;
58
+ /**
59
+ * Boat time the extra ones take per day, in dollars (the daily charge).
60
+ * @type {number}
61
+ * @memberof NamedSnapshotAllowance
62
+ */
63
+ extraDailyDollars?: number;
64
+ /**
65
+ * Monthly price of one extra named snapshot.
66
+ * @type {number}
67
+ * @memberof NamedSnapshotAllowance
68
+ */
69
+ pricePerExtraMonthlyDollars?: number;
70
+ }
71
+
72
+ /**
73
+ * Check if a given object implements the NamedSnapshotAllowance interface.
74
+ */
75
+ export function instanceOfNamedSnapshotAllowance(value: object): value is NamedSnapshotAllowance {
76
+ return true;
77
+ }
78
+
79
+ export function NamedSnapshotAllowanceFromJSON(json: any): NamedSnapshotAllowance {
80
+ return NamedSnapshotAllowanceFromJSONTyped(json, false);
81
+ }
82
+
83
+ export function NamedSnapshotAllowanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): NamedSnapshotAllowance {
84
+ if (json == null) {
85
+ return json;
86
+ }
87
+ return {
88
+
89
+ 'org': json['org'] == null ? undefined : json['org'],
90
+ 'orgName': json['orgName'] == null ? undefined : json['orgName'],
91
+ 'free': json['free'] == null ? undefined : json['free'],
92
+ 'used': json['used'] == null ? undefined : json['used'],
93
+ 'extra': json['extra'] == null ? undefined : json['extra'],
94
+ 'extraMonthlyDollars': json['extraMonthlyDollars'] == null ? undefined : json['extraMonthlyDollars'],
95
+ 'extraDailyDollars': json['extraDailyDollars'] == null ? undefined : json['extraDailyDollars'],
96
+ 'pricePerExtraMonthlyDollars': json['pricePerExtraMonthlyDollars'] == null ? undefined : json['pricePerExtraMonthlyDollars'],
97
+ };
98
+ }
99
+
100
+ export function NamedSnapshotAllowanceToJSON(json: any): NamedSnapshotAllowance {
101
+ return NamedSnapshotAllowanceToJSONTyped(json, false);
102
+ }
103
+
104
+ export function NamedSnapshotAllowanceToJSONTyped(value?: NamedSnapshotAllowance | null, ignoreDiscriminator: boolean = false): any {
105
+ if (value == null) {
106
+ return value;
107
+ }
108
+
109
+ return {
110
+
111
+ 'org': value['org'],
112
+ 'orgName': value['orgName'],
113
+ 'free': value['free'],
114
+ 'used': value['used'],
115
+ 'extra': value['extra'],
116
+ 'extraMonthlyDollars': value['extraMonthlyDollars'],
117
+ 'extraDailyDollars': value['extraDailyDollars'],
118
+ 'pricePerExtraMonthlyDollars': value['pricePerExtraMonthlyDollars'],
119
+ };
120
+ }
121
+
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { NamedSnapshotAllowance } from './NamedSnapshotAllowance';
17
+ import {
18
+ NamedSnapshotAllowanceFromJSON,
19
+ NamedSnapshotAllowanceFromJSONTyped,
20
+ NamedSnapshotAllowanceToJSON,
21
+ NamedSnapshotAllowanceToJSONTyped,
22
+ } from './NamedSnapshotAllowance';
16
23
  import type { NamedSnapshot } from './NamedSnapshot';
17
24
  import {
18
25
  NamedSnapshotFromJSON,
@@ -45,6 +52,12 @@ export interface NamedSnapshotListResponse {
45
52
  * @memberof NamedSnapshotListResponse
46
53
  */
47
54
  snapshots: Array<NamedSnapshot>;
55
+ /**
56
+ *
57
+ * @type {NamedSnapshotAllowance}
58
+ * @memberof NamedSnapshotListResponse
59
+ */
60
+ allowance?: NamedSnapshotAllowance;
48
61
  }
49
62
 
50
63
 
@@ -80,6 +93,7 @@ export function NamedSnapshotListResponseFromJSONTyped(json: any, ignoreDiscrimi
80
93
  'ok': json['ok'],
81
94
  'type': json['type'],
82
95
  'snapshots': ((json['snapshots'] as Array<any>).map(NamedSnapshotFromJSON)),
96
+ 'allowance': json['allowance'] == null ? undefined : NamedSnapshotAllowanceFromJSON(json['allowance']),
83
97
  };
84
98
  }
85
99
 
@@ -97,6 +111,7 @@ export function NamedSnapshotListResponseToJSONTyped(value?: NamedSnapshotListRe
97
111
  'ok': value['ok'],
98
112
  'type': value['type'],
99
113
  'snapshots': ((value['snapshots'] as Array<any>).map(NamedSnapshotToJSON)),
114
+ 'allowance': NamedSnapshotAllowanceToJSON(value['allowance']),
100
115
  };
101
116
  }
102
117
 
@@ -16,7 +16,7 @@ import { mapValues } from '../runtime';
16
16
  /**
17
17
  * Work item to queue inside an existing sandbox. Provider credentials must already be configured in the Boat dashboard.
18
18
  *
19
- * **Providers (harnesses):** `codex`, `claude-code` (alias `claude`), `pi`, `opencode`, `prime-agent` (alias `prime`), `kimi` (Kimi Code CLI, alias `kimi-code`). Omit `provider` to use the harness the user selected on the Agents dashboard.
19
+ * **Providers (harnesses):** `codex`, `claude-code` (alias `claude`), `pi`, `opencode`, `prime-agent` (alias `prime`), `kimi` (Kimi Code CLI, alias `kimi-code`), `mistral` (Mistral Vibe). Omit `provider` to use the harness the user selected on the Agents dashboard.
20
20
  *
21
21
  * **Models & reasoning effort** are harness- and model-specific and change over time. Fetch the live catalog (every provider's models and which reasoning-effort levels each accepts) from `GET /provider-models`. Some models accept no reasoning control. `pi`, `opencode` and `prime-agent` also expose models routed through OpenRouter and llmgateway (ids like `openrouter:anthropic/claude-sonnet-4.5`).
22
22
  *
@@ -83,7 +83,8 @@ export const PromptRequestProviderEnum = {
83
83
  PrimeAgent: 'prime-agent',
84
84
  Prime: 'prime',
85
85
  Kimi: 'kimi',
86
- KimiCode: 'kimi-code'
86
+ KimiCode: 'kimi-code',
87
+ Mistral: 'mistral'
87
88
  } as const;
88
89
  export type PromptRequestProviderEnum = typeof PromptRequestProviderEnum[keyof typeof PromptRequestProviderEnum];
89
90
 
@@ -20,6 +20,13 @@ import {
20
20
  SandboxTeamToJSON,
21
21
  SandboxTeamToJSONTyped,
22
22
  } from './SandboxTeam';
23
+ import type { StopOperation } from './StopOperation';
24
+ import {
25
+ StopOperationFromJSON,
26
+ StopOperationFromJSONTyped,
27
+ StopOperationToJSON,
28
+ StopOperationToJSONTyped,
29
+ } from './StopOperation';
23
30
 
24
31
  /**
25
32
  *
@@ -69,6 +76,18 @@ export interface Sandbox {
69
76
  * @memberof Sandbox
70
77
  */
71
78
  degradedSince?: Date | null;
79
+ /**
80
+ * True once every file of the sandbox's snapshot is on its disk. A resumed or forked sandbox is usable before that: its files keep copying in the background, and its docker volumes move onto the real disk near the end. Its docker containers start earlier; at that point their volume mounts move onto the real disk in place, without a restart. The `sandbox.hydrated` webhook fires at the same moment this turns true. A sandbox that restored nothing is hydrated from the start.
81
+ * @type {boolean}
82
+ * @memberof Sandbox
83
+ */
84
+ hydrated?: boolean;
85
+ /**
86
+ * When the last resume or fork finished copying files in, or null.
87
+ * @type {Date}
88
+ * @memberof Sandbox
89
+ */
90
+ hydratedAt?: Date | null;
72
91
  /**
73
92
  * Current machine size: what the sandbox was created with, or the size it was last resumed or forked onto.
74
93
  * @type {SandboxTypeEnum}
@@ -249,6 +268,12 @@ export interface Sandbox {
249
268
  * @memberof Sandbox
250
269
  */
251
270
  environmentVersion?: number | null;
271
+ /**
272
+ * The last stop you requested (`POST /sandboxes/{sandboxId}/stop`), or null if you never stopped this sandbox.
273
+ * @type {StopOperation}
274
+ * @memberof Sandbox
275
+ */
276
+ stop?: StopOperation | null;
252
277
  }
253
278
 
254
279
 
@@ -361,6 +386,8 @@ export function SandboxFromJSONTyped(json: any, ignoreDiscriminator: boolean): S
361
386
  'health': json['health'] == null ? undefined : json['health'],
362
387
  'healthReason': json['healthReason'] == null ? undefined : json['healthReason'],
363
388
  'degradedSince': json['degradedSince'] == null ? undefined : (new Date(json['degradedSince'])),
389
+ 'hydrated': json['hydrated'] == null ? undefined : json['hydrated'],
390
+ 'hydratedAt': json['hydratedAt'] == null ? undefined : (new Date(json['hydratedAt'])),
364
391
  'type': json['type'] == null ? undefined : json['type'],
365
392
  'vcpu': json['vcpu'] == null ? undefined : json['vcpu'],
366
393
  'memoryGB': json['memoryGB'] == null ? undefined : json['memoryGB'],
@@ -391,6 +418,7 @@ export function SandboxFromJSONTyped(json: any, ignoreDiscriminator: boolean): S
391
418
  'setupError': json['setupError'] == null ? undefined : json['setupError'],
392
419
  'environment': json['environment'] == null ? undefined : json['environment'],
393
420
  'environmentVersion': json['environmentVersion'] == null ? undefined : json['environmentVersion'],
421
+ 'stop': json['stop'] == null ? undefined : StopOperationFromJSON(json['stop']),
394
422
  };
395
423
  }
396
424
 
@@ -412,6 +440,8 @@ export function SandboxToJSONTyped(value?: Sandbox | null, ignoreDiscriminator:
412
440
  'health': value['health'],
413
441
  'healthReason': value['healthReason'],
414
442
  'degradedSince': value['degradedSince'] == null ? value['degradedSince'] : value['degradedSince'].toISOString(),
443
+ 'hydrated': value['hydrated'],
444
+ 'hydratedAt': value['hydratedAt'] == null ? value['hydratedAt'] : value['hydratedAt'].toISOString(),
415
445
  'type': value['type'],
416
446
  'vcpu': value['vcpu'],
417
447
  'memoryGB': value['memoryGB'],
@@ -442,6 +472,7 @@ export function SandboxToJSONTyped(value?: Sandbox | null, ignoreDiscriminator:
442
472
  'setupError': value['setupError'],
443
473
  'environment': value['environment'],
444
474
  'environmentVersion': value['environmentVersion'],
475
+ 'stop': StopOperationToJSON(value['stop']),
445
476
  };
446
477
  }
447
478
 
@@ -0,0 +1,124 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Boat Public API v1
5
+ * Public JSON API for creating, operating, prompting, observing, and exposing sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface StopOperation
20
+ */
21
+ export interface StopOperation {
22
+ /**
23
+ * Stable id of this stop. Calling stop again while it is pending returns the same id.
24
+ * @type {string}
25
+ * @memberof StopOperation
26
+ */
27
+ id: string;
28
+ /**
29
+ * `pending`: accepted, the sandbox is archiving. `failing`: the last attempt failed (see `error`); it is retried automatically until the sandbox archives. Running commands or prompts does not cancel it. `completed`: the sandbox is archived. `superseded`: a resume ended it before it completed.
30
+ * @type {StopOperationStatusEnum}
31
+ * @memberof StopOperation
32
+ */
33
+ status: StopOperationStatusEnum;
34
+ /**
35
+ * When the stop was accepted. Null once it has ended.
36
+ * @type {Date}
37
+ * @memberof StopOperation
38
+ */
39
+ requestedAt: Date | null;
40
+ /**
41
+ * When the last archival attempt ended.
42
+ * @type {Date}
43
+ * @memberof StopOperation
44
+ */
45
+ lastAttemptAt: Date | null;
46
+ /**
47
+ * Why the last attempt failed, while `status` is `failing`. Otherwise null.
48
+ * @type {string}
49
+ * @memberof StopOperation
50
+ */
51
+ error: string | null;
52
+ /**
53
+ * When the stop completed or was superseded.
54
+ * @type {Date}
55
+ * @memberof StopOperation
56
+ */
57
+ endedAt: Date | null;
58
+ }
59
+
60
+
61
+ /**
62
+ * @export
63
+ */
64
+ export const StopOperationStatusEnum = {
65
+ Pending: 'pending',
66
+ Failing: 'failing',
67
+ Completed: 'completed',
68
+ Superseded: 'superseded'
69
+ } as const;
70
+ export type StopOperationStatusEnum = typeof StopOperationStatusEnum[keyof typeof StopOperationStatusEnum];
71
+
72
+
73
+ /**
74
+ * Check if a given object implements the StopOperation interface.
75
+ */
76
+ export function instanceOfStopOperation(value: object): value is StopOperation {
77
+ if (!('id' in value) || value['id'] === undefined) return false;
78
+ if (!('status' in value) || value['status'] === undefined) return false;
79
+ if (!('requestedAt' in value) || value['requestedAt'] === undefined) return false;
80
+ if (!('lastAttemptAt' in value) || value['lastAttemptAt'] === undefined) return false;
81
+ if (!('error' in value) || value['error'] === undefined) return false;
82
+ if (!('endedAt' in value) || value['endedAt'] === undefined) return false;
83
+ return true;
84
+ }
85
+
86
+ export function StopOperationFromJSON(json: any): StopOperation {
87
+ return StopOperationFromJSONTyped(json, false);
88
+ }
89
+
90
+ export function StopOperationFromJSONTyped(json: any, ignoreDiscriminator: boolean): StopOperation {
91
+ if (json == null) {
92
+ return json;
93
+ }
94
+ return {
95
+
96
+ 'id': json['id'],
97
+ 'status': json['status'],
98
+ 'requestedAt': (json['requestedAt'] == null ? null : new Date(json['requestedAt'])),
99
+ 'lastAttemptAt': (json['lastAttemptAt'] == null ? null : new Date(json['lastAttemptAt'])),
100
+ 'error': json['error'],
101
+ 'endedAt': (json['endedAt'] == null ? null : new Date(json['endedAt'])),
102
+ };
103
+ }
104
+
105
+ export function StopOperationToJSON(json: any): StopOperation {
106
+ return StopOperationToJSONTyped(json, false);
107
+ }
108
+
109
+ export function StopOperationToJSONTyped(value?: StopOperation | null, ignoreDiscriminator: boolean = false): any {
110
+ if (value == null) {
111
+ return value;
112
+ }
113
+
114
+ return {
115
+
116
+ 'id': value['id'],
117
+ 'status': value['status'],
118
+ 'requestedAt': value['requestedAt'] == null ? value['requestedAt'] : value['requestedAt'].toISOString(),
119
+ 'lastAttemptAt': value['lastAttemptAt'] == null ? value['lastAttemptAt'] : value['lastAttemptAt'].toISOString(),
120
+ 'error': value['error'],
121
+ 'endedAt': value['endedAt'] == null ? value['endedAt'] : value['endedAt'].toISOString(),
122
+ };
123
+ }
124
+
@@ -59,6 +59,7 @@ export * from './LimitsResponse';
59
59
  export * from './MeResponse';
60
60
  export * from './MeResponseAllOfUser';
61
61
  export * from './NamedSnapshot';
62
+ export * from './NamedSnapshotAllowance';
62
63
  export * from './NamedSnapshotDeletedResponse';
63
64
  export * from './NamedSnapshotInfoResponse';
64
65
  export * from './NamedSnapshotListResponse';
@@ -117,6 +118,7 @@ export * from './SteerEvent';
117
118
  export * from './SteerEventData';
118
119
  export * from './SteerRequest';
119
120
  export * from './SteerResponse';
121
+ export * from './StopOperation';
120
122
  export * from './StopRequest';
121
123
  export * from './SuccessBase';
122
124
  export * from './UnknownEvent';