@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
@@ -62,6 +62,7 @@ docs/LimitsResponse.md
62
62
  docs/MeResponse.md
63
63
  docs/MeResponseAllOfUser.md
64
64
  docs/NamedSnapshot.md
65
+ docs/NamedSnapshotAllowance.md
65
66
  docs/NamedSnapshotDeletedResponse.md
66
67
  docs/NamedSnapshotInfoResponse.md
67
68
  docs/NamedSnapshotListResponse.md
@@ -120,6 +121,7 @@ docs/SteerEvent.md
120
121
  docs/SteerEventData.md
121
122
  docs/SteerRequest.md
122
123
  docs/SteerResponse.md
124
+ docs/StopOperation.md
123
125
  docs/StopRequest.md
124
126
  docs/SuccessBase.md
125
127
  docs/UnknownEvent.md
@@ -202,6 +204,7 @@ src/models/LimitsResponse.ts
202
204
  src/models/MeResponse.ts
203
205
  src/models/MeResponseAllOfUser.ts
204
206
  src/models/NamedSnapshot.ts
207
+ src/models/NamedSnapshotAllowance.ts
205
208
  src/models/NamedSnapshotDeletedResponse.ts
206
209
  src/models/NamedSnapshotInfoResponse.ts
207
210
  src/models/NamedSnapshotListResponse.ts
@@ -260,6 +263,7 @@ src/models/SteerEvent.ts
260
263
  src/models/SteerEventData.ts
261
264
  src/models/SteerRequest.ts
262
265
  src/models/SteerResponse.ts
266
+ src/models/StopOperation.ts
263
267
  src/models/StopRequest.ts
264
268
  src/models/SuccessBase.ts
265
269
  src/models/UnknownEvent.ts
@@ -1169,12 +1169,12 @@ export declare class BoatApi extends runtime.BaseAPI {
1169
1169
  */
1170
1170
  stopRequestOpts(input: StopOperationRequest | runtime.FlatBody<StopOperationRequest, 'stopRequest'>): Promise<runtime.RequestOpts>;
1171
1171
  /**
1172
- * 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.
1172
+ * 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.
1173
1173
  * Stop and archive sandbox
1174
1174
  */
1175
1175
  stopRaw(requestParameters: StopOperationRequest | runtime.FlatBody<StopOperationRequest, 'stopRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SandboxActionResponse>>;
1176
1176
  /**
1177
- * 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.
1177
+ * 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.
1178
1178
  * Stop and archive sandbox
1179
1179
  */
1180
1180
  stop(requestParameters: StopOperationRequest | runtime.FlatBody<StopOperationRequest, 'stopRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SandboxActionResponse>;
@@ -2852,7 +2852,7 @@ class BoatApi extends runtime.BaseAPI {
2852
2852
  };
2853
2853
  }
2854
2854
  /**
2855
- * 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.
2855
+ * 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.
2856
2856
  * Stop and archive sandbox
2857
2857
  */
2858
2858
  async stopRaw(requestParameters, initOverrides) {
@@ -2861,7 +2861,7 @@ class BoatApi extends runtime.BaseAPI {
2861
2861
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, SandboxActionResponse_1.SandboxActionResponseFromJSON)(jsonValue));
2862
2862
  }
2863
2863
  /**
2864
- * 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.
2864
+ * 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.
2865
2865
  * Stop and archive sandbox
2866
2866
  */
2867
2867
  async stop(requestParameters, initOverrides) {
@@ -53,6 +53,12 @@ export declare function stopAndRemove(api: BoatApi, sandboxId: string, options?:
53
53
  }): Promise<import("./models").DeletionOperationResponse | import("./models").SandboxActionResponse>;
54
54
  export declare function readText(api: BoatApi, sandboxId: string, path: string): Promise<string>;
55
55
  export declare function writeText(api: BoatApi, sandboxId: string, path: string, content: string): Promise<import("./models").FileWriteResponse>;
56
+ /**
57
+ * Run a command and return its result.
58
+ *
59
+ * Safe to call right after `resume()`: a refusal that never ran the command
60
+ * (`retryable: true`, the sandbox is still restoring) is resent for up to 60 s.
61
+ */
56
62
  export declare function execCommand(api: BoatApi, sandboxId: string, command: string, cwd?: string, timeoutSeconds?: number): Promise<import("./models").Command200Response>;
57
63
  /** One line of a streamed command, as sent (an `exit` frame also carries e.g. `signal`, `oomKilled`). */
58
64
  export type CommandFrame = CommandStreamFrame & Record<string, unknown>;
@@ -172,12 +172,36 @@ async function readText(api, sandboxId, path) {
172
172
  async function writeText(api, sandboxId, path, content) {
173
173
  return api.writeFile({ sandboxId, fileWriteRequest: { path, content, encoding: 'utf8' } });
174
174
  }
175
- async function execCommand(api, sandboxId, command, cwd, timeoutSeconds = 30) {
176
- return api.command({ sandboxId, commandRequest: { command, cwd, timeoutSeconds } });
177
- }
178
175
  // A refusal that provably never ran the command (the sandbox is still restoring
179
- // its disk, `retryable: true` before `started`) is retried for this long.
176
+ // its disk, `retryable: true`) is retried for this long.
180
177
  const STREAM_RETRY_MS = 60000;
178
+ async function isRetryable(e) {
179
+ const response = e === null || e === void 0 ? void 0 : e.response;
180
+ if (!response)
181
+ return false;
182
+ const body = await response.clone().json().catch(() => undefined);
183
+ return (body === null || body === void 0 ? void 0 : body.retryable) === true;
184
+ }
185
+ /**
186
+ * Run a command and return its result.
187
+ *
188
+ * Safe to call right after `resume()`: a refusal that never ran the command
189
+ * (`retryable: true`, the sandbox is still restoring) is resent for up to 60 s.
190
+ */
191
+ async function execCommand(api, sandboxId, command, cwd, timeoutSeconds = 30) {
192
+ const deadline = Date.now() + STREAM_RETRY_MS;
193
+ for (;;) {
194
+ try {
195
+ return await api.command({ sandboxId, commandRequest: { command, cwd, timeoutSeconds } });
196
+ }
197
+ catch (e) {
198
+ // The 1 s pause before the resend must also fit before the deadline.
199
+ if (Date.now() + 1000 >= deadline || !(await isRetryable(e)))
200
+ throw e;
201
+ }
202
+ await delay(1000);
203
+ }
204
+ }
181
205
  async function* ndjsonFrames(response) {
182
206
  if (!response.body)
183
207
  throw new Error('The command stream has no body');
@@ -1169,12 +1169,12 @@ export declare class BoatApi extends runtime.BaseAPI {
1169
1169
  */
1170
1170
  stopRequestOpts(input: StopOperationRequest | runtime.FlatBody<StopOperationRequest, 'stopRequest'>): Promise<runtime.RequestOpts>;
1171
1171
  /**
1172
- * 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.
1172
+ * 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.
1173
1173
  * Stop and archive sandbox
1174
1174
  */
1175
1175
  stopRaw(requestParameters: StopOperationRequest | runtime.FlatBody<StopOperationRequest, 'stopRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SandboxActionResponse>>;
1176
1176
  /**
1177
- * 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.
1177
+ * 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.
1178
1178
  * Stop and archive sandbox
1179
1179
  */
1180
1180
  stop(requestParameters: StopOperationRequest | runtime.FlatBody<StopOperationRequest, 'stopRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SandboxActionResponse>;
@@ -2816,7 +2816,7 @@ export class BoatApi extends runtime.BaseAPI {
2816
2816
  };
2817
2817
  }
2818
2818
  /**
2819
- * 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.
2819
+ * 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.
2820
2820
  * Stop and archive sandbox
2821
2821
  */
2822
2822
  async stopRaw(requestParameters, initOverrides) {
@@ -2825,7 +2825,7 @@ export class BoatApi extends runtime.BaseAPI {
2825
2825
  return new runtime.JSONApiResponse(response, (jsonValue) => SandboxActionResponseFromJSON(jsonValue));
2826
2826
  }
2827
2827
  /**
2828
- * 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.
2828
+ * 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.
2829
2829
  * Stop and archive sandbox
2830
2830
  */
2831
2831
  async stop(requestParameters, initOverrides) {
@@ -53,6 +53,12 @@ export declare function stopAndRemove(api: BoatApi, sandboxId: string, options?:
53
53
  }): Promise<import("./models").DeletionOperationResponse | import("./models").SandboxActionResponse>;
54
54
  export declare function readText(api: BoatApi, sandboxId: string, path: string): Promise<string>;
55
55
  export declare function writeText(api: BoatApi, sandboxId: string, path: string, content: string): Promise<import("./models").FileWriteResponse>;
56
+ /**
57
+ * Run a command and return its result.
58
+ *
59
+ * Safe to call right after `resume()`: a refusal that never ran the command
60
+ * (`retryable: true`, the sandbox is still restoring) is resent for up to 60 s.
61
+ */
56
62
  export declare function execCommand(api: BoatApi, sandboxId: string, command: string, cwd?: string, timeoutSeconds?: number): Promise<import("./models").Command200Response>;
57
63
  /** One line of a streamed command, as sent (an `exit` frame also carries e.g. `signal`, `oomKilled`). */
58
64
  export type CommandFrame = CommandStreamFrame & Record<string, unknown>;
@@ -158,12 +158,36 @@ export async function readText(api, sandboxId, path) {
158
158
  export async function writeText(api, sandboxId, path, content) {
159
159
  return api.writeFile({ sandboxId, fileWriteRequest: { path, content, encoding: 'utf8' } });
160
160
  }
161
- export async function execCommand(api, sandboxId, command, cwd, timeoutSeconds = 30) {
162
- return api.command({ sandboxId, commandRequest: { command, cwd, timeoutSeconds } });
163
- }
164
161
  // A refusal that provably never ran the command (the sandbox is still restoring
165
- // its disk, `retryable: true` before `started`) is retried for this long.
162
+ // its disk, `retryable: true`) is retried for this long.
166
163
  const STREAM_RETRY_MS = 60000;
164
+ async function isRetryable(e) {
165
+ const response = e === null || e === void 0 ? void 0 : e.response;
166
+ if (!response)
167
+ return false;
168
+ const body = await response.clone().json().catch(() => undefined);
169
+ return (body === null || body === void 0 ? void 0 : body.retryable) === true;
170
+ }
171
+ /**
172
+ * Run a command and return its result.
173
+ *
174
+ * Safe to call right after `resume()`: a refusal that never ran the command
175
+ * (`retryable: true`, the sandbox is still restoring) is resent for up to 60 s.
176
+ */
177
+ export async function execCommand(api, sandboxId, command, cwd, timeoutSeconds = 30) {
178
+ const deadline = Date.now() + STREAM_RETRY_MS;
179
+ for (;;) {
180
+ try {
181
+ return await api.command({ sandboxId, commandRequest: { command, cwd, timeoutSeconds } });
182
+ }
183
+ catch (e) {
184
+ // The 1 s pause before the resend must also fit before the deadline.
185
+ if (Date.now() + 1000 >= deadline || !(await isRetryable(e)))
186
+ throw e;
187
+ }
188
+ await delay(1000);
189
+ }
190
+ }
167
191
  async function* ndjsonFrames(response) {
168
192
  if (!response.body)
169
193
  throw new Error('The command stream has no body');
@@ -46,7 +46,7 @@ export interface Conversation {
46
46
  */
47
47
  running: boolean;
48
48
  /**
49
- * Harness the most recent prompt ran on (`claude`, `codex`, `pi`, `opencode`, `prime-agent`, `kimi`).
49
+ * Harness the most recent prompt ran on (`claude`, `codex`, `pi`, `opencode`, `prime-agent`, `kimi`, `mistral`).
50
50
  * @type {string}
51
51
  * @memberof Conversation
52
52
  */
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Boat Public API v1
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * 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.
14
+ * @export
15
+ * @interface NamedSnapshotAllowance
16
+ */
17
+ export interface NamedSnapshotAllowance {
18
+ /**
19
+ * Organization the numbers are for. null = personal.
20
+ * @type {string}
21
+ * @memberof NamedSnapshotAllowance
22
+ */
23
+ org?: string | null;
24
+ /**
25
+ * That organization's name.
26
+ * @type {string}
27
+ * @memberof NamedSnapshotAllowance
28
+ */
29
+ orgName?: string | null;
30
+ /**
31
+ * Named snapshots kept for free.
32
+ * @type {number}
33
+ * @memberof NamedSnapshotAllowance
34
+ */
35
+ free?: number;
36
+ /**
37
+ * Named snapshots this wallet keeps.
38
+ * @type {number}
39
+ * @memberof NamedSnapshotAllowance
40
+ */
41
+ used?: number;
42
+ /**
43
+ * Named snapshots above the free ones.
44
+ * @type {number}
45
+ * @memberof NamedSnapshotAllowance
46
+ */
47
+ extra?: number;
48
+ /**
49
+ * What the extra ones cost per month.
50
+ * @type {number}
51
+ * @memberof NamedSnapshotAllowance
52
+ */
53
+ extraMonthlyDollars?: number;
54
+ /**
55
+ * Boat time the extra ones take per day, in dollars (the daily charge).
56
+ * @type {number}
57
+ * @memberof NamedSnapshotAllowance
58
+ */
59
+ extraDailyDollars?: number;
60
+ /**
61
+ * Monthly price of one extra named snapshot.
62
+ * @type {number}
63
+ * @memberof NamedSnapshotAllowance
64
+ */
65
+ pricePerExtraMonthlyDollars?: number;
66
+ }
67
+ /**
68
+ * Check if a given object implements the NamedSnapshotAllowance interface.
69
+ */
70
+ export declare function instanceOfNamedSnapshotAllowance(value: object): value is NamedSnapshotAllowance;
71
+ export declare function NamedSnapshotAllowanceFromJSON(json: any): NamedSnapshotAllowance;
72
+ export declare function NamedSnapshotAllowanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): NamedSnapshotAllowance;
73
+ export declare function NamedSnapshotAllowanceToJSON(json: any): NamedSnapshotAllowance;
74
+ export declare function NamedSnapshotAllowanceToJSONTyped(value?: NamedSnapshotAllowance | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
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
+ * Check if a given object implements the NamedSnapshotAllowance interface.
16
+ */
17
+ export function instanceOfNamedSnapshotAllowance(value) {
18
+ return true;
19
+ }
20
+ export function NamedSnapshotAllowanceFromJSON(json) {
21
+ return NamedSnapshotAllowanceFromJSONTyped(json, false);
22
+ }
23
+ export function NamedSnapshotAllowanceFromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'org': json['org'] == null ? undefined : json['org'],
29
+ 'orgName': json['orgName'] == null ? undefined : json['orgName'],
30
+ 'free': json['free'] == null ? undefined : json['free'],
31
+ 'used': json['used'] == null ? undefined : json['used'],
32
+ 'extra': json['extra'] == null ? undefined : json['extra'],
33
+ 'extraMonthlyDollars': json['extraMonthlyDollars'] == null ? undefined : json['extraMonthlyDollars'],
34
+ 'extraDailyDollars': json['extraDailyDollars'] == null ? undefined : json['extraDailyDollars'],
35
+ 'pricePerExtraMonthlyDollars': json['pricePerExtraMonthlyDollars'] == null ? undefined : json['pricePerExtraMonthlyDollars'],
36
+ };
37
+ }
38
+ export function NamedSnapshotAllowanceToJSON(json) {
39
+ return NamedSnapshotAllowanceToJSONTyped(json, false);
40
+ }
41
+ export function NamedSnapshotAllowanceToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'org': value['org'],
47
+ 'orgName': value['orgName'],
48
+ 'free': value['free'],
49
+ 'used': value['used'],
50
+ 'extra': value['extra'],
51
+ 'extraMonthlyDollars': value['extraMonthlyDollars'],
52
+ 'extraDailyDollars': value['extraDailyDollars'],
53
+ 'pricePerExtraMonthlyDollars': value['pricePerExtraMonthlyDollars'],
54
+ };
55
+ }
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { NamedSnapshotAllowance } from './NamedSnapshotAllowance';
12
13
  import type { NamedSnapshot } from './NamedSnapshot';
13
14
  /**
14
15
  *
@@ -34,6 +35,12 @@ export interface NamedSnapshotListResponse {
34
35
  * @memberof NamedSnapshotListResponse
35
36
  */
36
37
  snapshots: Array<NamedSnapshot>;
38
+ /**
39
+ *
40
+ * @type {NamedSnapshotAllowance}
41
+ * @memberof NamedSnapshotListResponse
42
+ */
43
+ allowance?: NamedSnapshotAllowance;
37
44
  }
38
45
  /**
39
46
  * @export
@@ -11,6 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { NamedSnapshotAllowanceFromJSON, NamedSnapshotAllowanceToJSON, } from './NamedSnapshotAllowance';
14
15
  import { NamedSnapshotFromJSON, NamedSnapshotToJSON, } from './NamedSnapshot';
15
16
  /**
16
17
  * @export
@@ -41,6 +42,7 @@ export function NamedSnapshotListResponseFromJSONTyped(json, ignoreDiscriminator
41
42
  'ok': json['ok'],
42
43
  'type': json['type'],
43
44
  'snapshots': (json['snapshots'].map(NamedSnapshotFromJSON)),
45
+ 'allowance': json['allowance'] == null ? undefined : NamedSnapshotAllowanceFromJSON(json['allowance']),
44
46
  };
45
47
  }
46
48
  export function NamedSnapshotListResponseToJSON(json) {
@@ -54,5 +56,6 @@ export function NamedSnapshotListResponseToJSONTyped(value, ignoreDiscriminator
54
56
  'ok': value['ok'],
55
57
  'type': value['type'],
56
58
  'snapshots': (value['snapshots'].map(NamedSnapshotToJSON)),
59
+ 'allowance': NamedSnapshotAllowanceToJSON(value['allowance']),
57
60
  };
58
61
  }
@@ -12,7 +12,7 @@
12
12
  /**
13
13
  * Work item to queue inside an existing sandbox. Provider credentials must already be configured in the Boat dashboard.
14
14
  *
15
- * **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.
15
+ * **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.
16
16
  *
17
17
  * **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`).
18
18
  *
@@ -78,6 +78,7 @@ export declare const PromptRequestProviderEnum: {
78
78
  readonly Prime: 'prime';
79
79
  readonly Kimi: 'kimi';
80
80
  readonly KimiCode: 'kimi-code';
81
+ readonly Mistral: 'mistral';
81
82
  };
82
83
  export type PromptRequestProviderEnum = typeof PromptRequestProviderEnum[keyof typeof PromptRequestProviderEnum];
83
84
  /**
@@ -23,7 +23,8 @@ export const PromptRequestProviderEnum = {
23
23
  PrimeAgent: 'prime-agent',
24
24
  Prime: 'prime',
25
25
  Kimi: 'kimi',
26
- KimiCode: 'kimi-code'
26
+ KimiCode: 'kimi-code',
27
+ Mistral: 'mistral'
27
28
  };
28
29
  /**
29
30
  * Check if a given object implements the PromptRequest interface.
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { SandboxTeam } from './SandboxTeam';
13
+ import type { StopOperation } from './StopOperation';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -58,6 +59,18 @@ export interface Sandbox {
58
59
  * @memberof Sandbox
59
60
  */
60
61
  degradedSince?: Date | null;
62
+ /**
63
+ * 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.
64
+ * @type {boolean}
65
+ * @memberof Sandbox
66
+ */
67
+ hydrated?: boolean;
68
+ /**
69
+ * When the last resume or fork finished copying files in, or null.
70
+ * @type {Date}
71
+ * @memberof Sandbox
72
+ */
73
+ hydratedAt?: Date | null;
61
74
  /**
62
75
  * Current machine size: what the sandbox was created with, or the size it was last resumed or forked onto.
63
76
  * @type {SandboxTypeEnum}
@@ -238,6 +251,12 @@ export interface Sandbox {
238
251
  * @memberof Sandbox
239
252
  */
240
253
  environmentVersion?: number | null;
254
+ /**
255
+ * The last stop you requested (`POST /sandboxes/{sandboxId}/stop`), or null if you never stopped this sandbox.
256
+ * @type {StopOperation}
257
+ * @memberof Sandbox
258
+ */
259
+ stop?: StopOperation | null;
241
260
  }
242
261
  /**
243
262
  * @export
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { SandboxTeamFromJSON, SandboxTeamToJSON, } from './SandboxTeam';
15
+ import { StopOperationFromJSON, StopOperationToJSON, } from './StopOperation';
15
16
  /**
16
17
  * @export
17
18
  */
@@ -108,6 +109,8 @@ export function SandboxFromJSONTyped(json, ignoreDiscriminator) {
108
109
  'health': json['health'] == null ? undefined : json['health'],
109
110
  'healthReason': json['healthReason'] == null ? undefined : json['healthReason'],
110
111
  'degradedSince': json['degradedSince'] == null ? undefined : (new Date(json['degradedSince'])),
112
+ 'hydrated': json['hydrated'] == null ? undefined : json['hydrated'],
113
+ 'hydratedAt': json['hydratedAt'] == null ? undefined : (new Date(json['hydratedAt'])),
111
114
  'type': json['type'] == null ? undefined : json['type'],
112
115
  'vcpu': json['vcpu'] == null ? undefined : json['vcpu'],
113
116
  'memoryGB': json['memoryGB'] == null ? undefined : json['memoryGB'],
@@ -138,6 +141,7 @@ export function SandboxFromJSONTyped(json, ignoreDiscriminator) {
138
141
  'setupError': json['setupError'] == null ? undefined : json['setupError'],
139
142
  'environment': json['environment'] == null ? undefined : json['environment'],
140
143
  'environmentVersion': json['environmentVersion'] == null ? undefined : json['environmentVersion'],
144
+ 'stop': json['stop'] == null ? undefined : StopOperationFromJSON(json['stop']),
141
145
  };
142
146
  }
143
147
  export function SandboxToJSON(json) {
@@ -155,6 +159,8 @@ export function SandboxToJSONTyped(value, ignoreDiscriminator = false) {
155
159
  'health': value['health'],
156
160
  'healthReason': value['healthReason'],
157
161
  'degradedSince': value['degradedSince'] == null ? value['degradedSince'] : value['degradedSince'].toISOString(),
162
+ 'hydrated': value['hydrated'],
163
+ 'hydratedAt': value['hydratedAt'] == null ? value['hydratedAt'] : value['hydratedAt'].toISOString(),
158
164
  'type': value['type'],
159
165
  'vcpu': value['vcpu'],
160
166
  'memoryGB': value['memoryGB'],
@@ -185,5 +191,6 @@ export function SandboxToJSONTyped(value, ignoreDiscriminator = false) {
185
191
  'setupError': value['setupError'],
186
192
  'environment': value['environment'],
187
193
  'environmentVersion': value['environmentVersion'],
194
+ 'stop': StopOperationToJSON(value['stop']),
188
195
  };
189
196
  }
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Boat Public API v1
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface StopOperation
16
+ */
17
+ export interface StopOperation {
18
+ /**
19
+ * Stable id of this stop. Calling stop again while it is pending returns the same id.
20
+ * @type {string}
21
+ * @memberof StopOperation
22
+ */
23
+ id: string;
24
+ /**
25
+ * `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.
26
+ * @type {StopOperationStatusEnum}
27
+ * @memberof StopOperation
28
+ */
29
+ status: StopOperationStatusEnum;
30
+ /**
31
+ * When the stop was accepted. Null once it has ended.
32
+ * @type {Date}
33
+ * @memberof StopOperation
34
+ */
35
+ requestedAt: Date | null;
36
+ /**
37
+ * When the last archival attempt ended.
38
+ * @type {Date}
39
+ * @memberof StopOperation
40
+ */
41
+ lastAttemptAt: Date | null;
42
+ /**
43
+ * Why the last attempt failed, while `status` is `failing`. Otherwise null.
44
+ * @type {string}
45
+ * @memberof StopOperation
46
+ */
47
+ error: string | null;
48
+ /**
49
+ * When the stop completed or was superseded.
50
+ * @type {Date}
51
+ * @memberof StopOperation
52
+ */
53
+ endedAt: Date | null;
54
+ }
55
+ /**
56
+ * @export
57
+ */
58
+ export declare const StopOperationStatusEnum: {
59
+ readonly Pending: 'pending';
60
+ readonly Failing: 'failing';
61
+ readonly Completed: 'completed';
62
+ readonly Superseded: 'superseded';
63
+ };
64
+ export type StopOperationStatusEnum = typeof StopOperationStatusEnum[keyof typeof StopOperationStatusEnum];
65
+ /**
66
+ * Check if a given object implements the StopOperation interface.
67
+ */
68
+ export declare function instanceOfStopOperation(value: object): value is StopOperation;
69
+ export declare function StopOperationFromJSON(json: any): StopOperation;
70
+ export declare function StopOperationFromJSONTyped(json: any, ignoreDiscriminator: boolean): StopOperation;
71
+ export declare function StopOperationToJSON(json: any): StopOperation;
72
+ export declare function StopOperationToJSONTyped(value?: StopOperation | null, ignoreDiscriminator?: boolean): any;