@boatdev/sdk 1.6.0 → 1.8.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 (80) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/dist/apis/BoatApi.d.ts +47 -4
  3. package/dist/apis/BoatApi.js +100 -4
  4. package/dist/esm/apis/BoatApi.d.ts +47 -4
  5. package/dist/esm/apis/BoatApi.js +100 -4
  6. package/dist/esm/http2-fetch.d.ts +1 -0
  7. package/dist/esm/http2-fetch.js +203 -0
  8. package/dist/esm/models/Conversation.d.ts +1 -1
  9. package/dist/esm/models/CreateSandboxRequest.d.ts +3 -2
  10. package/dist/esm/models/CreateSandboxRequest.js +2 -1
  11. package/dist/esm/models/ForkRequest.d.ts +2 -1
  12. package/dist/esm/models/ForkRequest.js +2 -1
  13. package/dist/esm/models/PromptRequest.d.ts +2 -1
  14. package/dist/esm/models/PromptRequest.js +2 -1
  15. package/dist/esm/models/Recover200Response.d.ts +57 -0
  16. package/dist/esm/models/Recover200Response.js +53 -0
  17. package/dist/esm/models/ResumeRequest.d.ts +2 -1
  18. package/dist/esm/models/ResumeRequest.js +2 -1
  19. package/dist/esm/models/Sandbox.d.ts +21 -1
  20. package/dist/esm/models/Sandbox.js +9 -1
  21. package/dist/esm/models/SandboxUsageResponse.d.ts +2 -1
  22. package/dist/esm/models/SandboxUsageResponse.js +2 -1
  23. package/dist/esm/models/StopOperation.d.ts +72 -0
  24. package/dist/esm/models/StopOperation.js +72 -0
  25. package/dist/esm/models/StopOperationResponse.d.ts +58 -0
  26. package/dist/esm/models/StopOperationResponse.js +62 -0
  27. package/dist/esm/models/StopRequest.d.ts +1 -1
  28. package/dist/esm/models/UpdateSandboxRequest.d.ts +1 -1
  29. package/dist/esm/models/index.d.ts +3 -0
  30. package/dist/esm/models/index.js +3 -0
  31. package/dist/esm/runtime.js +2 -1
  32. package/dist/http2-fetch.d.ts +1 -0
  33. package/dist/http2-fetch.js +239 -0
  34. package/dist/models/Conversation.d.ts +1 -1
  35. package/dist/models/CreateSandboxRequest.d.ts +3 -2
  36. package/dist/models/CreateSandboxRequest.js +2 -1
  37. package/dist/models/ForkRequest.d.ts +2 -1
  38. package/dist/models/ForkRequest.js +2 -1
  39. package/dist/models/PromptRequest.d.ts +2 -1
  40. package/dist/models/PromptRequest.js +2 -1
  41. package/dist/models/Recover200Response.d.ts +57 -0
  42. package/dist/models/Recover200Response.js +61 -0
  43. package/dist/models/ResumeRequest.d.ts +2 -1
  44. package/dist/models/ResumeRequest.js +2 -1
  45. package/dist/models/Sandbox.d.ts +21 -1
  46. package/dist/models/Sandbox.js +9 -1
  47. package/dist/models/SandboxUsageResponse.d.ts +2 -1
  48. package/dist/models/SandboxUsageResponse.js +2 -1
  49. package/dist/models/StopOperation.d.ts +72 -0
  50. package/dist/models/StopOperation.js +80 -0
  51. package/dist/models/StopOperationResponse.d.ts +58 -0
  52. package/dist/models/StopOperationResponse.js +70 -0
  53. package/dist/models/StopRequest.d.ts +1 -1
  54. package/dist/models/UpdateSandboxRequest.d.ts +1 -1
  55. package/dist/models/index.d.ts +3 -0
  56. package/dist/models/index.js +3 -0
  57. package/dist/runtime.js +9 -8
  58. package/docs/BoatApi.md +160 -2
  59. package/docs/PromptRequest.md +1 -1
  60. package/docs/Recover200Response.md +38 -0
  61. package/docs/Sandbox.md +6 -0
  62. package/docs/StopOperation.md +42 -0
  63. package/docs/StopOperationResponse.md +38 -0
  64. package/package.json +1 -1
  65. package/src/apis/BoatApi.ts +147 -4
  66. package/src/http2-fetch.ts +179 -0
  67. package/src/models/Conversation.ts +1 -1
  68. package/src/models/CreateSandboxRequest.ts +4 -3
  69. package/src/models/ForkRequest.ts +3 -2
  70. package/src/models/PromptRequest.ts +3 -2
  71. package/src/models/Recover200Response.ts +99 -0
  72. package/src/models/ResumeRequest.ts +3 -2
  73. package/src/models/Sandbox.ts +34 -2
  74. package/src/models/SandboxUsageResponse.ts +3 -2
  75. package/src/models/StopOperation.ts +124 -0
  76. package/src/models/StopOperationResponse.ts +111 -0
  77. package/src/models/StopRequest.ts +1 -1
  78. package/src/models/UpdateSandboxRequest.ts +1 -1
  79. package/src/models/index.ts +3 -0
  80. package/src/runtime.ts +2 -1
@@ -0,0 +1,239 @@
1
+ "use strict";
2
+ // The SDK's default fetch. On Node it sends every request to an https origin over
3
+ // ONE shared HTTP/2 connection. Node's global fetch speaks HTTP/1.1 only, so N
4
+ // concurrent calls opened N TLS connections: a burst of 200 calls from a laptop
5
+ // made 200 handshakes (measured 2026-10-08), and 250 creates arrived at the API
6
+ // over 8-14 s. Elsewhere (browsers, Deno, Bun, an origin without HTTP/2), and for
7
+ // any body this does not handle, it is the global fetch.
8
+ // Pass `fetchApi` in the Configuration to use your own fetch instead.
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || (function () {
26
+ var ownKeys = function(o) {
27
+ ownKeys = Object.getOwnPropertyNames || function (o) {
28
+ var ar = [];
29
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
+ return ar;
31
+ };
32
+ return ownKeys(o);
33
+ };
34
+ return function (mod) {
35
+ if (mod && mod.__esModule) return mod;
36
+ var result = {};
37
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
+ __setModuleDefault(result, mod);
39
+ return result;
40
+ };
41
+ })();
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ exports.defaultFetch = void 0;
44
+ const sessions = new Map();
45
+ const http1Only = new Set();
46
+ const slots = new WeakMap();
47
+ // A server caps the streams open at once on a connection (boat.dev: 250; this uses
48
+ // at most 100). A stream past the cap is refused, so the excess waits here. Requests open
49
+ // or waiting keep the process alive; an idle shared connection does not.
50
+ async function streamSlot(s, signal) {
51
+ var _a;
52
+ let st = slots.get(s);
53
+ if (!st) {
54
+ st = { active: 0, waiting: [] };
55
+ slots.set(s, st);
56
+ }
57
+ const state = st;
58
+ const cap = Math.max(1, Math.min(Number((_a = s.remoteSettings) === null || _a === void 0 ? void 0 : _a.maxConcurrentStreams) || 100, 100));
59
+ // Already aborted: take no stream, never queue (an abort listener added now never fires).
60
+ if (signal === null || signal === void 0 ? void 0 : signal.aborted)
61
+ return () => { };
62
+ if (state.active === 0 && state.waiting.length === 0)
63
+ s.ref();
64
+ if (state.active >= cap) {
65
+ const turn = await new Promise((wake) => {
66
+ const w = () => wake(true);
67
+ state.waiting.push(w);
68
+ // An aborted waiter leaves the queue without a stream; the caller rejects it.
69
+ signal === null || signal === void 0 ? void 0 : signal.addEventListener('abort', () => {
70
+ const i = state.waiting.indexOf(w);
71
+ if (i !== -1) {
72
+ state.waiting.splice(i, 1);
73
+ wake(false);
74
+ }
75
+ }, { once: true });
76
+ });
77
+ if (!turn)
78
+ return () => { };
79
+ }
80
+ state.active++;
81
+ let released = false;
82
+ return () => {
83
+ if (released)
84
+ return;
85
+ released = true;
86
+ state.active--;
87
+ const next = state.waiting.shift();
88
+ if (next)
89
+ next();
90
+ else if (state.active === 0)
91
+ s.unref();
92
+ };
93
+ }
94
+ let nodeHttp2;
95
+ function loadNode() {
96
+ var _a;
97
+ if (!nodeHttp2) {
98
+ const versions = (_a = globalThis.process) === null || _a === void 0 ? void 0 : _a.versions;
99
+ const isNode = !!(versions === null || versions === void 0 ? void 0 : versions.node) && !versions.bun && typeof globalThis.Deno === 'undefined';
100
+ // A variable, not a literal: a browser bundler must not try to resolve it.
101
+ const h2 = 'node:http2';
102
+ nodeHttp2 = isNode
103
+ ? Promise.resolve(`${h2}`).then(s => __importStar(require(s))).catch(() => null)
104
+ : Promise.resolve(null);
105
+ }
106
+ return nodeHttp2;
107
+ }
108
+ function session(origin, http2) {
109
+ const open = sessions.get(origin);
110
+ if (open)
111
+ return open;
112
+ const pending = new Promise((resolve) => {
113
+ let s;
114
+ try {
115
+ s = http2.connect(origin);
116
+ }
117
+ catch (_a) {
118
+ resolve(null);
119
+ return;
120
+ }
121
+ const drop = () => { if (sessions.get(origin) === pending)
122
+ sessions.delete(origin); };
123
+ s.once('connect', () => {
124
+ // An origin that answered without h2 never gets here: the TLS layer fails the connect.
125
+ s.unref(); // an idle shared connection must not keep the process alive
126
+ resolve(s);
127
+ });
128
+ // `on`, not `once`: a session can emit more than one error, and an unhandled one kills the process.
129
+ s.on('error', () => { drop(); resolve(null); });
130
+ s.once('close', drop);
131
+ s.once('goaway', drop);
132
+ });
133
+ sessions.set(origin, pending);
134
+ return pending;
135
+ }
136
+ function sendableBody(body) {
137
+ if (body == null)
138
+ return null;
139
+ if (typeof body === 'string')
140
+ return body;
141
+ if (body instanceof Uint8Array)
142
+ return body;
143
+ if (body instanceof ArrayBuffer)
144
+ return new Uint8Array(body);
145
+ if (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams)
146
+ return body.toString();
147
+ return undefined; // FormData, Blob, streams: the global fetch encodes these
148
+ }
149
+ const HOP_BY_HOP = new Set(['connection', 'host', 'keep-alive', 'proxy-connection', 'transfer-encoding', 'upgrade']);
150
+ async function http2Fetch(input, init = {}) {
151
+ const url = new URL(typeof input === 'string' ? input : input instanceof URL ? input.href : input.url);
152
+ const body = sendableBody(init.body);
153
+ const node = await loadNode();
154
+ const isRequest = typeof input !== 'string' && !(input instanceof URL);
155
+ if (!node || isRequest || body === undefined || url.protocol !== 'https:' || http1Only.has(url.origin)) {
156
+ return fetch(input, init);
157
+ }
158
+ const s = await session(url.origin, node);
159
+ if (!s || s.closed || s.destroyed) {
160
+ if (!s)
161
+ http1Only.add(url.origin);
162
+ return fetch(input, init);
163
+ }
164
+ const headers = { ':method': (init.method || 'GET').toUpperCase(), ':path': url.pathname + url.search };
165
+ new Headers(init.headers).forEach((value, key) => { if (!HOP_BY_HOP.has(key))
166
+ headers[key] = value; });
167
+ const signal = init.signal;
168
+ const aborted = () => { var _a; return (_a = signal.reason) !== null && _a !== void 0 ? _a : new DOMException('This operation was aborted', 'AbortError'); };
169
+ const release = await streamSlot(s, signal);
170
+ return new Promise((resolve, reject) => {
171
+ if (signal === null || signal === void 0 ? void 0 : signal.aborted) {
172
+ release();
173
+ reject(aborted());
174
+ return;
175
+ }
176
+ let req;
177
+ try {
178
+ req = s.request(headers, { endStream: body === null });
179
+ }
180
+ catch (e) {
181
+ // The connection closed (GOAWAY) while this call waited for a stream.
182
+ release();
183
+ reject(e);
184
+ return;
185
+ }
186
+ const onAbort = () => { req.close(); reject(aborted()); };
187
+ signal === null || signal === void 0 ? void 0 : signal.addEventListener('abort', onAbort, { once: true });
188
+ req.once('close', () => { release(); signal === null || signal === void 0 ? void 0 : signal.removeEventListener('abort', onAbort); });
189
+ req.on('error', reject); // after the response this errors its body stream; a no-op here
190
+ req.once('response', (h) => {
191
+ const status = Number(h[':status']);
192
+ const out = new Headers();
193
+ for (const [k, v] of Object.entries(h)) {
194
+ if (k.startsWith(':') || v === undefined)
195
+ continue;
196
+ for (const one of Array.isArray(v) ? v : [v])
197
+ out.append(k, String(one));
198
+ }
199
+ const empty = status === 204 || status === 205 || status === 304 || headers[':method'] === 'HEAD';
200
+ if (empty)
201
+ req.resume();
202
+ // Fed from 'data' events, not Readable.toWeb: an HTTP/2 stream the server has
203
+ // already closed is destroyed with its unread data, and toWeb's backpressure
204
+ // turned that into "Premature close" on 25 of 250 calls (prod, 2026-10-08).
205
+ // A slow reader (streamCommand between frames) must not let a fast command
206
+ // fill memory: past 4 MiB unread the stream pauses until the reader pulls.
207
+ const bodyStream = empty ? null : new ReadableStream({
208
+ start(controller) {
209
+ req.on('data', (chunk) => {
210
+ var _a;
211
+ controller.enqueue(new Uint8Array(chunk));
212
+ if (((_a = controller.desiredSize) !== null && _a !== void 0 ? _a : 1) <= 0)
213
+ req.pause();
214
+ });
215
+ req.once('end', () => controller.close());
216
+ req.once('error', (e) => controller.error(e));
217
+ req.once('close', () => {
218
+ if (!req.readableEnded) {
219
+ try {
220
+ controller.error(new Error(`HTTP/2 stream closed before its end (code ${req.rstCode})`));
221
+ }
222
+ catch (_a) { }
223
+ }
224
+ });
225
+ },
226
+ pull() { if (req.isPaused())
227
+ req.resume(); },
228
+ cancel() { req.close(); },
229
+ }, { highWaterMark: 4 * 1024 * 1024, size: (chunk) => { var _a; return (_a = chunk === null || chunk === void 0 ? void 0 : chunk.byteLength) !== null && _a !== void 0 ? _a : 0; } });
230
+ const response = new Response(bodyStream, { status, headers: out });
231
+ // Response.url is read-only; the generated client never reads it, but keep it right.
232
+ Object.defineProperty(response, 'url', { value: url.href });
233
+ resolve(response);
234
+ });
235
+ if (body !== null)
236
+ req.end(body);
237
+ });
238
+ }
239
+ exports.defaultFetch = http2Fetch;
@@ -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
  */
@@ -16,7 +16,7 @@
16
16
  */
17
17
  export interface CreateSandboxRequest {
18
18
  /**
19
- * Machine size. `small` consumes machine time at half rate and `large` at twice the default rate (see the Billing guide). A fork inherits the source sandbox's type unless the fork request passes its own, and resume and fork can move a sandbox between sizes.
19
+ * Machine size. `small` consumes machine time at half rate and `large` at twice the default rate (see the Billing guide). `xlarge` needs the $100/month plan or higher; lower plans get a 403 `machine_class_plan_required` on create, resume and fork. A fork inherits the source sandbox's type unless the fork request passes its own, and resume and fork can move a sandbox between sizes.
20
20
  * @type {CreateSandboxRequestTypeEnum}
21
21
  * @memberof CreateSandboxRequest
22
22
  */
@@ -60,7 +60,7 @@ export interface CreateSandboxRequest {
60
60
  */
61
61
  failFast?: boolean;
62
62
  /**
63
- * Shell script that runs on the sandbox after it is ready. Ready means "ready to accept the user", not "setup done": the script starts in the background once provisioning completes and never blocks the sandbox becoming usable. It runs as the sandbox user via `bash`, with the sandbox's environment applied, and its output goes to a log file on the sandbox. Observe the outcome as `setupStatus` (pending/running/done/failed) and `setupError` on the sandbox. Rejected with a 400 `invalid_setup_script` error when it is not a string or exceeds 64KB.
63
+ * Shell script that runs on the sandbox after it is ready. Ready means "ready to accept the user", not "setup done": the script starts in the background once provisioning completes and never blocks the sandbox becoming usable. It runs as the sandbox user (`user`, not root; `sudo` needs no password) via `bash`, with the sandbox's environment applied, and its output goes to a log file on the sandbox. Observe the outcome as `setupStatus` (pending/running/done/failed) and `setupError` on the sandbox. Rejected with a 400 `invalid_setup_script` error when it is not a string or exceeds 64KB.
64
64
  * @type {string}
65
65
  * @memberof CreateSandboxRequest
66
66
  */
@@ -91,6 +91,7 @@ export declare const CreateSandboxRequestTypeEnum: {
91
91
  readonly Small: 'small';
92
92
  readonly Default: 'default';
93
93
  readonly Large: 'large';
94
+ readonly Xlarge: 'xlarge';
94
95
  };
95
96
  export type CreateSandboxRequestTypeEnum = typeof CreateSandboxRequestTypeEnum[keyof typeof CreateSandboxRequestTypeEnum];
96
97
  /**
@@ -25,7 +25,8 @@ exports.CreateSandboxRequestToJSONTyped = CreateSandboxRequestToJSONTyped;
25
25
  exports.CreateSandboxRequestTypeEnum = {
26
26
  Small: 'small',
27
27
  Default: 'default',
28
- Large: 'large'
28
+ Large: 'large',
29
+ Xlarge: 'xlarge'
29
30
  };
30
31
  /**
31
32
  * Check if a given object implements the CreateSandboxRequest interface.
@@ -42,7 +42,7 @@ export interface ForkRequest {
42
42
  */
43
43
  noEnv?: boolean;
44
44
  /**
45
- * Machine size for the fork. Omit to inherit the source sandbox's type. The source sandbox is never modified. Shrinking is rejected with `type_too_small` when the source's data would not fit the smaller disk.
45
+ * Machine size for the fork. Omit to inherit the source sandbox's type. `xlarge` needs the $100/month plan or higher (403 `machine_class_plan_required`). The source sandbox is never modified. Shrinking is rejected with `type_too_small` when the source's data would not fit the smaller disk.
46
46
  * @type {ForkRequestTypeEnum}
47
47
  * @memberof ForkRequest
48
48
  */
@@ -61,6 +61,7 @@ export declare const ForkRequestTypeEnum: {
61
61
  readonly Small: 'small';
62
62
  readonly Default: 'default';
63
63
  readonly Large: 'large';
64
+ readonly Xlarge: 'xlarge';
64
65
  };
65
66
  export type ForkRequestTypeEnum = typeof ForkRequestTypeEnum[keyof typeof ForkRequestTypeEnum];
66
67
  /**
@@ -25,7 +25,8 @@ exports.ForkRequestToJSONTyped = ForkRequestToJSONTyped;
25
25
  exports.ForkRequestTypeEnum = {
26
26
  Small: 'small',
27
27
  Default: 'default',
28
- Large: 'large'
28
+ Large: 'large',
29
+ Xlarge: 'xlarge'
29
30
  };
30
31
  /**
31
32
  * Check if a given object implements the ForkRequest interface.
@@ -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
  /**
@@ -31,7 +31,8 @@ exports.PromptRequestProviderEnum = {
31
31
  PrimeAgent: 'prime-agent',
32
32
  Prime: 'prime',
33
33
  Kimi: 'kimi',
34
- KimiCode: 'kimi-code'
34
+ KimiCode: 'kimi-code',
35
+ Mistral: 'mistral'
35
36
  };
36
37
  /**
37
38
  * Check if a given object implements the PromptRequest interface.
@@ -0,0 +1,57 @@
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 Recover200Response
16
+ */
17
+ export interface Recover200Response {
18
+ /**
19
+ *
20
+ * @type {boolean}
21
+ * @memberof Recover200Response
22
+ */
23
+ ok?: boolean;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof Recover200Response
28
+ */
29
+ type?: string;
30
+ /**
31
+ *
32
+ * @type {Recover200ResponseStatusEnum}
33
+ * @memberof Recover200Response
34
+ */
35
+ status?: Recover200ResponseStatusEnum;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof Recover200Response
40
+ */
41
+ message?: string;
42
+ }
43
+ /**
44
+ * @export
45
+ */
46
+ export declare const Recover200ResponseStatusEnum: {
47
+ readonly Recovering: 'recovering';
48
+ };
49
+ export type Recover200ResponseStatusEnum = typeof Recover200ResponseStatusEnum[keyof typeof Recover200ResponseStatusEnum];
50
+ /**
51
+ * Check if a given object implements the Recover200Response interface.
52
+ */
53
+ export declare function instanceOfRecover200Response(value: object): value is Recover200Response;
54
+ export declare function Recover200ResponseFromJSON(json: any): Recover200Response;
55
+ export declare function Recover200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Recover200Response;
56
+ export declare function Recover200ResponseToJSON(json: any): Recover200Response;
57
+ export declare function Recover200ResponseToJSONTyped(value?: Recover200Response | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Boat Public API v1
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.Recover200ResponseStatusEnum = void 0;
17
+ exports.instanceOfRecover200Response = instanceOfRecover200Response;
18
+ exports.Recover200ResponseFromJSON = Recover200ResponseFromJSON;
19
+ exports.Recover200ResponseFromJSONTyped = Recover200ResponseFromJSONTyped;
20
+ exports.Recover200ResponseToJSON = Recover200ResponseToJSON;
21
+ exports.Recover200ResponseToJSONTyped = Recover200ResponseToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.Recover200ResponseStatusEnum = {
26
+ Recovering: 'recovering'
27
+ };
28
+ /**
29
+ * Check if a given object implements the Recover200Response interface.
30
+ */
31
+ function instanceOfRecover200Response(value) {
32
+ return true;
33
+ }
34
+ function Recover200ResponseFromJSON(json) {
35
+ return Recover200ResponseFromJSONTyped(json, false);
36
+ }
37
+ function Recover200ResponseFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'ok': json['ok'] == null ? undefined : json['ok'],
43
+ 'type': json['type'] == null ? undefined : json['type'],
44
+ 'status': json['status'] == null ? undefined : json['status'],
45
+ 'message': json['message'] == null ? undefined : json['message'],
46
+ };
47
+ }
48
+ function Recover200ResponseToJSON(json) {
49
+ return Recover200ResponseToJSONTyped(json, false);
50
+ }
51
+ function Recover200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+ 'ok': value['ok'],
57
+ 'type': value['type'],
58
+ 'status': value['status'],
59
+ 'message': value['message'],
60
+ };
61
+ }
@@ -22,7 +22,7 @@ export interface ResumeRequest {
22
22
  */
23
23
  failFast?: boolean;
24
24
  /**
25
- * Resume onto a different machine size. Omit to keep the sandbox's current type. A resume already restores onto a fresh machine, so changing size costs nothing extra. Shrinking is rejected with `type_too_small` when the sandbox's data would not fit the smaller disk.
25
+ * Resume onto a different machine size. Omit to keep the sandbox's current type. `xlarge` needs the $100/month plan or higher (403 `machine_class_plan_required`). A resume already restores onto a fresh machine, so changing size costs nothing extra. Shrinking is rejected with `type_too_small` when the sandbox's data would not fit the smaller disk.
26
26
  * @type {ResumeRequestTypeEnum}
27
27
  * @memberof ResumeRequest
28
28
  */
@@ -61,6 +61,7 @@ export declare const ResumeRequestTypeEnum: {
61
61
  readonly Small: 'small';
62
62
  readonly Default: 'default';
63
63
  readonly Large: 'large';
64
+ readonly Xlarge: 'xlarge';
64
65
  };
65
66
  export type ResumeRequestTypeEnum = typeof ResumeRequestTypeEnum[keyof typeof ResumeRequestTypeEnum];
66
67
  /**
@@ -25,7 +25,8 @@ exports.ResumeRequestToJSONTyped = ResumeRequestToJSONTyped;
25
25
  exports.ResumeRequestTypeEnum = {
26
26
  Small: 'small',
27
27
  Default: 'default',
28
- Large: 'large'
28
+ Large: 'large',
29
+ Xlarge: 'xlarge'
29
30
  };
30
31
  /**
31
32
  * Check if a given object implements the ResumeRequest 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}
@@ -77,7 +90,7 @@ export interface Sandbox {
77
90
  */
78
91
  memoryGB?: number;
79
92
  /**
80
- * Rate at which this sandbox consumes machine time. 0.5 for `small`, 1 for `default`, and 2 for `large`.
93
+ * Rate at which this sandbox consumes machine time. 0.5 for `small`, 1 for `default`, 2 for `large`, and 50/9 (about 5.56) for `xlarge`.
81
94
  * @type {number}
82
95
  * @memberof Sandbox
83
96
  */
@@ -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
@@ -271,6 +290,7 @@ export declare const SandboxTypeEnum: {
271
290
  readonly Small: 'small';
272
291
  readonly Default: 'default';
273
292
  readonly Large: 'large';
293
+ readonly Xlarge: 'xlarge';
274
294
  };
275
295
  export type SandboxTypeEnum = typeof SandboxTypeEnum[keyof typeof SandboxTypeEnum];
276
296
  /**
@@ -20,6 +20,7 @@ exports.SandboxFromJSONTyped = SandboxFromJSONTyped;
20
20
  exports.SandboxToJSON = SandboxToJSON;
21
21
  exports.SandboxToJSONTyped = SandboxToJSONTyped;
22
22
  const SandboxTeam_1 = require("./SandboxTeam");
23
+ const StopOperation_1 = require("./StopOperation");
23
24
  /**
24
25
  * @export
25
26
  */
@@ -49,7 +50,8 @@ exports.SandboxHealthEnum = {
49
50
  exports.SandboxTypeEnum = {
50
51
  Small: 'small',
51
52
  Default: 'default',
52
- Large: 'large'
53
+ Large: 'large',
54
+ Xlarge: 'xlarge'
53
55
  };
54
56
  /**
55
57
  * @export
@@ -116,6 +118,8 @@ function SandboxFromJSONTyped(json, ignoreDiscriminator) {
116
118
  'health': json['health'] == null ? undefined : json['health'],
117
119
  'healthReason': json['healthReason'] == null ? undefined : json['healthReason'],
118
120
  'degradedSince': json['degradedSince'] == null ? undefined : (new Date(json['degradedSince'])),
121
+ 'hydrated': json['hydrated'] == null ? undefined : json['hydrated'],
122
+ 'hydratedAt': json['hydratedAt'] == null ? undefined : (new Date(json['hydratedAt'])),
119
123
  'type': json['type'] == null ? undefined : json['type'],
120
124
  'vcpu': json['vcpu'] == null ? undefined : json['vcpu'],
121
125
  'memoryGB': json['memoryGB'] == null ? undefined : json['memoryGB'],
@@ -146,6 +150,7 @@ function SandboxFromJSONTyped(json, ignoreDiscriminator) {
146
150
  'setupError': json['setupError'] == null ? undefined : json['setupError'],
147
151
  'environment': json['environment'] == null ? undefined : json['environment'],
148
152
  'environmentVersion': json['environmentVersion'] == null ? undefined : json['environmentVersion'],
153
+ 'stop': json['stop'] == null ? undefined : (0, StopOperation_1.StopOperationFromJSON)(json['stop']),
149
154
  };
150
155
  }
151
156
  function SandboxToJSON(json) {
@@ -163,6 +168,8 @@ function SandboxToJSONTyped(value, ignoreDiscriminator = false) {
163
168
  'health': value['health'],
164
169
  'healthReason': value['healthReason'],
165
170
  'degradedSince': value['degradedSince'] == null ? value['degradedSince'] : value['degradedSince'].toISOString(),
171
+ 'hydrated': value['hydrated'],
172
+ 'hydratedAt': value['hydratedAt'] == null ? value['hydratedAt'] : value['hydratedAt'].toISOString(),
166
173
  'type': value['type'],
167
174
  'vcpu': value['vcpu'],
168
175
  'memoryGB': value['memoryGB'],
@@ -193,5 +200,6 @@ function SandboxToJSONTyped(value, ignoreDiscriminator = false) {
193
200
  'setupError': value['setupError'],
194
201
  'environment': value['environment'],
195
202
  'environmentVersion': value['environmentVersion'],
203
+ 'stop': (0, StopOperation_1.StopOperationToJSON)(value['stop']),
196
204
  };
197
205
  }
@@ -40,7 +40,7 @@ export interface SandboxUsageResponse {
40
40
  */
41
41
  sandboxType: SandboxUsageResponseSandboxTypeEnum;
42
42
  /**
43
- * Rate at which this sandbox consumes machine time. 0.5 for `small`, 1 for `default`, and 2 for `large`.
43
+ * Rate at which this sandbox consumes machine time. 0.5 for `small`, 1 for `default`, 2 for `large`, and 50/9 (about 5.56) for `xlarge`.
44
44
  * @type {number}
45
45
  * @memberof SandboxUsageResponse
46
46
  */
@@ -89,6 +89,7 @@ export declare const SandboxUsageResponseSandboxTypeEnum: {
89
89
  readonly Small: 'small';
90
90
  readonly Default: 'default';
91
91
  readonly Large: 'large';
92
+ readonly Xlarge: 'xlarge';
92
93
  };
93
94
  export type SandboxUsageResponseSandboxTypeEnum = typeof SandboxUsageResponseSandboxTypeEnum[keyof typeof SandboxUsageResponseSandboxTypeEnum];
94
95
  /**
@@ -25,7 +25,8 @@ exports.SandboxUsageResponseToJSONTyped = SandboxUsageResponseToJSONTyped;
25
25
  exports.SandboxUsageResponseSandboxTypeEnum = {
26
26
  Small: 'small',
27
27
  Default: 'default',
28
- Large: 'large'
28
+ Large: 'large',
29
+ Xlarge: 'xlarge'
29
30
  };
30
31
  /**
31
32
  * Check if a given object implements the SandboxUsageResponse interface.