@boatdev/sdk 1.7.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.
- package/.openapi-generator/FILES +4 -0
- package/dist/apis/BoatApi.d.ts +47 -4
- package/dist/apis/BoatApi.js +100 -4
- package/dist/esm/apis/BoatApi.d.ts +47 -4
- package/dist/esm/apis/BoatApi.js +100 -4
- package/dist/esm/http2-fetch.d.ts +1 -0
- package/dist/esm/http2-fetch.js +203 -0
- package/dist/esm/models/CreateSandboxRequest.d.ts +3 -2
- package/dist/esm/models/CreateSandboxRequest.js +2 -1
- package/dist/esm/models/ForkRequest.d.ts +2 -1
- package/dist/esm/models/ForkRequest.js +2 -1
- package/dist/esm/models/Recover200Response.d.ts +57 -0
- package/dist/esm/models/Recover200Response.js +53 -0
- package/dist/esm/models/ResumeRequest.d.ts +2 -1
- package/dist/esm/models/ResumeRequest.js +2 -1
- package/dist/esm/models/Sandbox.d.ts +2 -1
- package/dist/esm/models/Sandbox.js +2 -1
- package/dist/esm/models/SandboxUsageResponse.d.ts +2 -1
- package/dist/esm/models/SandboxUsageResponse.js +2 -1
- package/dist/esm/models/StopOperation.d.ts +1 -1
- package/dist/esm/models/StopOperationResponse.d.ts +58 -0
- package/dist/esm/models/StopOperationResponse.js +62 -0
- package/dist/esm/models/StopRequest.d.ts +1 -1
- package/dist/esm/models/UpdateSandboxRequest.d.ts +1 -1
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/esm/runtime.js +2 -1
- package/dist/http2-fetch.d.ts +1 -0
- package/dist/http2-fetch.js +239 -0
- package/dist/models/CreateSandboxRequest.d.ts +3 -2
- package/dist/models/CreateSandboxRequest.js +2 -1
- package/dist/models/ForkRequest.d.ts +2 -1
- package/dist/models/ForkRequest.js +2 -1
- package/dist/models/Recover200Response.d.ts +57 -0
- package/dist/models/Recover200Response.js +61 -0
- package/dist/models/ResumeRequest.d.ts +2 -1
- package/dist/models/ResumeRequest.js +2 -1
- package/dist/models/Sandbox.d.ts +2 -1
- package/dist/models/Sandbox.js +2 -1
- package/dist/models/SandboxUsageResponse.d.ts +2 -1
- package/dist/models/SandboxUsageResponse.js +2 -1
- package/dist/models/StopOperation.d.ts +1 -1
- package/dist/models/StopOperationResponse.d.ts +58 -0
- package/dist/models/StopOperationResponse.js +70 -0
- package/dist/models/StopRequest.d.ts +1 -1
- package/dist/models/UpdateSandboxRequest.d.ts +1 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/runtime.js +9 -8
- package/docs/BoatApi.md +160 -2
- package/docs/Recover200Response.md +38 -0
- package/docs/StopOperationResponse.md +38 -0
- package/package.json +1 -1
- package/src/apis/BoatApi.ts +147 -4
- package/src/http2-fetch.ts +179 -0
- package/src/models/CreateSandboxRequest.ts +4 -3
- package/src/models/ForkRequest.ts +3 -2
- package/src/models/Recover200Response.ts +99 -0
- package/src/models/ResumeRequest.ts +3 -2
- package/src/models/Sandbox.ts +3 -2
- package/src/models/SandboxUsageResponse.ts +3 -2
- package/src/models/StopOperation.ts +1 -1
- package/src/models/StopOperationResponse.ts +111 -0
- package/src/models/StopRequest.ts +1 -1
- package/src/models/UpdateSandboxRequest.ts +1 -1
- package/src/models/index.ts +2 -0
- package/src/runtime.ts +2 -1
|
@@ -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.
|
package/dist/models/Sandbox.d.ts
CHANGED
|
@@ -90,7 +90,7 @@ export interface Sandbox {
|
|
|
90
90
|
*/
|
|
91
91
|
memoryGB?: number;
|
|
92
92
|
/**
|
|
93
|
-
* Rate at which this sandbox consumes machine time. 0.5 for `small`, 1 for `default`, and
|
|
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`.
|
|
94
94
|
* @type {number}
|
|
95
95
|
* @memberof Sandbox
|
|
96
96
|
*/
|
|
@@ -290,6 +290,7 @@ export declare const SandboxTypeEnum: {
|
|
|
290
290
|
readonly Small: 'small';
|
|
291
291
|
readonly Default: 'default';
|
|
292
292
|
readonly Large: 'large';
|
|
293
|
+
readonly Xlarge: 'xlarge';
|
|
293
294
|
};
|
|
294
295
|
export type SandboxTypeEnum = typeof SandboxTypeEnum[keyof typeof SandboxTypeEnum];
|
|
295
296
|
/**
|
package/dist/models/Sandbox.js
CHANGED
|
@@ -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
|
|
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.
|
|
@@ -28,7 +28,7 @@ export interface StopOperation {
|
|
|
28
28
|
*/
|
|
29
29
|
status: StopOperationStatusEnum;
|
|
30
30
|
/**
|
|
31
|
-
* When the stop was accepted.
|
|
31
|
+
* When the stop was accepted. On the sandbox, null once it has ended. Read by id (`GET /sandboxes/{sandboxId}/stops/{stopId}`), it is kept.
|
|
32
32
|
* @type {Date}
|
|
33
33
|
* @memberof StopOperation
|
|
34
34
|
*/
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
import type { StopOperation } from './StopOperation';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface StopOperationResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface StopOperationResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {boolean}
|
|
22
|
+
* @memberof StopOperationResponse
|
|
23
|
+
*/
|
|
24
|
+
ok: boolean;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {StopOperationResponseTypeEnum}
|
|
28
|
+
* @memberof StopOperationResponse
|
|
29
|
+
*/
|
|
30
|
+
type: StopOperationResponseTypeEnum;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof StopOperationResponse
|
|
35
|
+
*/
|
|
36
|
+
id: string;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {StopOperation}
|
|
40
|
+
* @memberof StopOperationResponse
|
|
41
|
+
*/
|
|
42
|
+
stop: StopOperation;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @export
|
|
46
|
+
*/
|
|
47
|
+
export declare const StopOperationResponseTypeEnum: {
|
|
48
|
+
readonly StopStatus: 'stop.status';
|
|
49
|
+
};
|
|
50
|
+
export type StopOperationResponseTypeEnum = typeof StopOperationResponseTypeEnum[keyof typeof StopOperationResponseTypeEnum];
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the StopOperationResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export declare function instanceOfStopOperationResponse(value: object): value is StopOperationResponse;
|
|
55
|
+
export declare function StopOperationResponseFromJSON(json: any): StopOperationResponse;
|
|
56
|
+
export declare function StopOperationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): StopOperationResponse;
|
|
57
|
+
export declare function StopOperationResponseToJSON(json: any): StopOperationResponse;
|
|
58
|
+
export declare function StopOperationResponseToJSONTyped(value?: StopOperationResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,70 @@
|
|
|
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.StopOperationResponseTypeEnum = void 0;
|
|
17
|
+
exports.instanceOfStopOperationResponse = instanceOfStopOperationResponse;
|
|
18
|
+
exports.StopOperationResponseFromJSON = StopOperationResponseFromJSON;
|
|
19
|
+
exports.StopOperationResponseFromJSONTyped = StopOperationResponseFromJSONTyped;
|
|
20
|
+
exports.StopOperationResponseToJSON = StopOperationResponseToJSON;
|
|
21
|
+
exports.StopOperationResponseToJSONTyped = StopOperationResponseToJSONTyped;
|
|
22
|
+
const StopOperation_1 = require("./StopOperation");
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.StopOperationResponseTypeEnum = {
|
|
27
|
+
StopStatus: 'stop.status'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the StopOperationResponse interface.
|
|
31
|
+
*/
|
|
32
|
+
function instanceOfStopOperationResponse(value) {
|
|
33
|
+
if (!('ok' in value) || value['ok'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('stop' in value) || value['stop'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
function StopOperationResponseFromJSON(json) {
|
|
44
|
+
return StopOperationResponseFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
function StopOperationResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
47
|
+
if (json == null) {
|
|
48
|
+
return json;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'ok': json['ok'],
|
|
52
|
+
'type': json['type'],
|
|
53
|
+
'id': json['id'],
|
|
54
|
+
'stop': (0, StopOperation_1.StopOperationFromJSON)(json['stop']),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function StopOperationResponseToJSON(json) {
|
|
58
|
+
return StopOperationResponseToJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
function StopOperationResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
'ok': value['ok'],
|
|
66
|
+
'type': value['type'],
|
|
67
|
+
'id': value['id'],
|
|
68
|
+
'stop': (0, StopOperation_1.StopOperationToJSON)(value['stop']),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface StopRequest {
|
|
18
18
|
/**
|
|
19
|
-
* Stop the sandbox even if its disk cannot be snapshotted.
|
|
19
|
+
* Stop the sandbox even if its disk cannot be snapshotted. It keeps its last successful snapshot and everything written since then is permanently LOST. Without this, a sandbox whose snapshot pipeline is failing is left running rather than discarding your work, and you are not billed for that time. Only use this after a stop has already been refused.
|
|
20
20
|
* @type {boolean}
|
|
21
21
|
* @memberof StopRequest
|
|
22
22
|
*/
|
|
@@ -22,7 +22,7 @@ export interface UpdateSandboxRequest {
|
|
|
22
22
|
*/
|
|
23
23
|
name?: string;
|
|
24
24
|
/**
|
|
25
|
-
* New
|
|
25
|
+
* New auto-stop TTL. The deadline becomes now + `ttlSeconds`, so calling this again extends a running sandbox's life. `null` disables auto-stop.
|
|
26
26
|
* @type {number}
|
|
27
27
|
* @memberof UpdateSandboxRequest
|
|
28
28
|
*/
|
package/dist/models/index.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ export * from './PromptRequest';
|
|
|
74
74
|
export * from './PromptResponse';
|
|
75
75
|
export * from './PromptRun';
|
|
76
76
|
export * from './PromptRunResponse';
|
|
77
|
+
export * from './Recover200Response';
|
|
77
78
|
export * from './RepoSelectionRequest';
|
|
78
79
|
export * from './RepoSelectionResponse';
|
|
79
80
|
export * from './ReposResponse';
|
|
@@ -117,6 +118,7 @@ export * from './SteerEventData';
|
|
|
117
118
|
export * from './SteerRequest';
|
|
118
119
|
export * from './SteerResponse';
|
|
119
120
|
export * from './StopOperation';
|
|
121
|
+
export * from './StopOperationResponse';
|
|
120
122
|
export * from './StopRequest';
|
|
121
123
|
export * from './SuccessBase';
|
|
122
124
|
export * from './UnknownEvent';
|
package/dist/models/index.js
CHANGED
|
@@ -92,6 +92,7 @@ __exportStar(require("./PromptRequest"), exports);
|
|
|
92
92
|
__exportStar(require("./PromptResponse"), exports);
|
|
93
93
|
__exportStar(require("./PromptRun"), exports);
|
|
94
94
|
__exportStar(require("./PromptRunResponse"), exports);
|
|
95
|
+
__exportStar(require("./Recover200Response"), exports);
|
|
95
96
|
__exportStar(require("./RepoSelectionRequest"), exports);
|
|
96
97
|
__exportStar(require("./RepoSelectionResponse"), exports);
|
|
97
98
|
__exportStar(require("./ReposResponse"), exports);
|
|
@@ -135,6 +136,7 @@ __exportStar(require("./SteerEventData"), exports);
|
|
|
135
136
|
__exportStar(require("./SteerRequest"), exports);
|
|
136
137
|
__exportStar(require("./SteerResponse"), exports);
|
|
137
138
|
__exportStar(require("./StopOperation"), exports);
|
|
139
|
+
__exportStar(require("./StopOperationResponse"), exports);
|
|
138
140
|
__exportStar(require("./StopRequest"), exports);
|
|
139
141
|
__exportStar(require("./SuccessBase"), exports);
|
|
140
142
|
__exportStar(require("./UnknownEvent"), exports);
|
package/dist/runtime.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0;
|
|
4
|
+
exports.querystring = querystring;
|
|
5
|
+
exports.exists = exists;
|
|
6
|
+
exports.mapValues = mapValues;
|
|
7
|
+
exports.canConsumeForm = canConsumeForm;
|
|
8
|
+
exports.unflattenBody = unflattenBody;
|
|
9
|
+
const http2_fetch_1 = require("./http2-fetch");
|
|
2
10
|
/* tslint:disable */
|
|
3
11
|
/* eslint-disable */
|
|
4
12
|
/**
|
|
@@ -12,13 +20,6 @@
|
|
|
12
20
|
* https://openapi-generator.tech
|
|
13
21
|
* Do not edit the class manually.
|
|
14
22
|
*/
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0;
|
|
17
|
-
exports.querystring = querystring;
|
|
18
|
-
exports.exists = exists;
|
|
19
|
-
exports.mapValues = mapValues;
|
|
20
|
-
exports.canConsumeForm = canConsumeForm;
|
|
21
|
-
exports.unflattenBody = unflattenBody;
|
|
22
23
|
exports.BASE_PATH = "https://boat.dev/api/v1".replace(/\/+$/, "");
|
|
23
24
|
class Configuration {
|
|
24
25
|
constructor(configuration = {}) {
|
|
@@ -86,7 +87,7 @@ class BaseAPI {
|
|
|
86
87
|
}
|
|
87
88
|
let response = undefined;
|
|
88
89
|
try {
|
|
89
|
-
response = await (this.configuration.fetchApi ||
|
|
90
|
+
response = await (this.configuration.fetchApi || http2_fetch_1.defaultFetch)(fetchParams.url, fetchParams.init);
|
|
90
91
|
}
|
|
91
92
|
catch (e) {
|
|
92
93
|
for (const middleware of this.middleware) {
|
package/docs/BoatApi.md
CHANGED
|
@@ -36,6 +36,7 @@ All URIs are relative to *https://boat.dev/api/v1*
|
|
|
36
36
|
| [**getSnapshotDownload**](BoatApi.md#getsnapshotdownload) | **GET** /snapshots/{snapshotId}/download | Get snapshot download |
|
|
37
37
|
| [**getSnapshotFile**](BoatApi.md#getsnapshotfile) | **GET** /snapshots/{snapshotId}/files | Download a file or folder from a snapshot |
|
|
38
38
|
| [**getSnapshotTree**](BoatApi.md#getsnapshottree) | **GET** /snapshots/{snapshotId}/tree | Get snapshot file tree |
|
|
39
|
+
| [**getStop**](BoatApi.md#getstop) | **GET** /sandboxes/{sandboxId}/stops/{stopId} | Get a stop by id |
|
|
39
40
|
| [**getWebhook**](BoatApi.md#getwebhook) | **GET** /webhooks/{webhookId} | Get webhook |
|
|
40
41
|
| [**hostPort**](BoatApi.md#hostportoperation) | **POST** /sandboxes/{sandboxId}/host | Expose a sandbox port on a public HTTPS URL |
|
|
41
42
|
| [**interrupt**](BoatApi.md#interrupt) | **POST** /sandboxes/{sandboxId}/interrupt | Interrupt running work |
|
|
@@ -49,6 +50,7 @@ All URIs are relative to *https://boat.dev/api/v1*
|
|
|
49
50
|
| [**prompt**](BoatApi.md#promptoperation) | **POST** /sandboxes/{sandboxId}/prompt | Prompt Sandbox |
|
|
50
51
|
| [**promptRunStatus**](BoatApi.md#promptrunstatus) | **GET** /sandboxes/{sandboxId}/prompts/{promptId} | Get prompt run status |
|
|
51
52
|
| [**readFile**](BoatApi.md#readfile) | **GET** /sandboxes/{sandboxId}/files | Read a file from a sandbox |
|
|
53
|
+
| [**recover**](BoatApi.md#recover) | **POST** /sandboxes/{sandboxId}/recover | Recover a sandbox that stopped responding |
|
|
52
54
|
| [**repos**](BoatApi.md#repos) | **GET** /repos | List GitHub repositories available to Boat |
|
|
53
55
|
| [**resume**](BoatApi.md#resumeoperation) | **POST** /sandboxes/{sandboxId}/resume | Resume sandbox |
|
|
54
56
|
| [**revokeApiKey**](BoatApi.md#revokeapikey) | **DELETE** /api-keys/{apiKeyId} | Revoke an API key |
|
|
@@ -297,6 +299,8 @@ This endpoint does not need any parameter.
|
|
|
297
299
|
|
|
298
300
|
Download a sandbox artifact
|
|
299
301
|
|
|
302
|
+
Downloads one file of up to 50 MiB, under /home/user or /tmp, as raw bytes.
|
|
303
|
+
|
|
300
304
|
### Example
|
|
301
305
|
|
|
302
306
|
```ts
|
|
@@ -2482,6 +2486,82 @@ example().catch(console.error);
|
|
|
2482
2486
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2483
2487
|
|
|
2484
2488
|
|
|
2489
|
+
## getStop
|
|
2490
|
+
|
|
2491
|
+
> StopOperationResponse getStop(sandboxId, stopId)
|
|
2492
|
+
|
|
2493
|
+
Get a stop by id
|
|
2494
|
+
|
|
2495
|
+
Returns one stop of this sandbox by the id that `POST /sandboxes/{sandboxId}/stop` returned. Old stops stay readable after a resume or a later stop. Returns 404 when the id is unknown or belongs to another sandbox.
|
|
2496
|
+
|
|
2497
|
+
### Example
|
|
2498
|
+
|
|
2499
|
+
```ts
|
|
2500
|
+
import {
|
|
2501
|
+
Configuration,
|
|
2502
|
+
BoatApi,
|
|
2503
|
+
} from '@boatdev/sdk';
|
|
2504
|
+
import type { GetStopRequest } from '@boatdev/sdk';
|
|
2505
|
+
|
|
2506
|
+
async function example() {
|
|
2507
|
+
console.log("🚀 Testing @boatdev/sdk SDK...");
|
|
2508
|
+
const config = new Configuration({
|
|
2509
|
+
// Configure HTTP bearer authorization: BoatBearerAuth
|
|
2510
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
2511
|
+
});
|
|
2512
|
+
const api = new BoatApi(config);
|
|
2513
|
+
|
|
2514
|
+
const body = {
|
|
2515
|
+
// string | Public Sandbox id returned by create/list/get sandbox calls.
|
|
2516
|
+
sandboxId: sandboxId_example,
|
|
2517
|
+
// string
|
|
2518
|
+
stopId: stopId_example,
|
|
2519
|
+
} satisfies GetStopRequest;
|
|
2520
|
+
|
|
2521
|
+
try {
|
|
2522
|
+
const data = await api.getStop(body);
|
|
2523
|
+
console.log(data);
|
|
2524
|
+
} catch (error) {
|
|
2525
|
+
console.error(error);
|
|
2526
|
+
}
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
// Run the test
|
|
2530
|
+
example().catch(console.error);
|
|
2531
|
+
```
|
|
2532
|
+
|
|
2533
|
+
### Parameters
|
|
2534
|
+
|
|
2535
|
+
|
|
2536
|
+
| Name | Type | Description | Notes |
|
|
2537
|
+
|------------- | ------------- | ------------- | -------------|
|
|
2538
|
+
| **sandboxId** | `string` | Public Sandbox id returned by create/list/get sandbox calls. | [Defaults to `undefined`] |
|
|
2539
|
+
| **stopId** | `string` | | [Defaults to `undefined`] |
|
|
2540
|
+
|
|
2541
|
+
### Return type
|
|
2542
|
+
|
|
2543
|
+
[**StopOperationResponse**](StopOperationResponse.md)
|
|
2544
|
+
|
|
2545
|
+
### Authorization
|
|
2546
|
+
|
|
2547
|
+
[BoatBearerAuth](../README.md#BoatBearerAuth)
|
|
2548
|
+
|
|
2549
|
+
### HTTP request headers
|
|
2550
|
+
|
|
2551
|
+
- **Content-Type**: Not defined
|
|
2552
|
+
- **Accept**: `application/json`
|
|
2553
|
+
|
|
2554
|
+
|
|
2555
|
+
### HTTP response details
|
|
2556
|
+
| Status code | Description | Response headers |
|
|
2557
|
+
|-------------|-------------|------------------|
|
|
2558
|
+
| **200** | The stop. | - |
|
|
2559
|
+
| **401** | Missing or invalid bearer token. | - |
|
|
2560
|
+
| **404** | Resource not found. | - |
|
|
2561
|
+
|
|
2562
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2563
|
+
|
|
2564
|
+
|
|
2485
2565
|
## getWebhook
|
|
2486
2566
|
|
|
2487
2567
|
> WebhookResponse getWebhook(webhookId)
|
|
@@ -3368,6 +3448,8 @@ example().catch(console.error);
|
|
|
3368
3448
|
|
|
3369
3449
|
Read a file from a sandbox
|
|
3370
3450
|
|
|
3451
|
+
Files up to 5 MiB. Use `GET /sandboxes/{sandboxId}/artifacts` for files up to 50 MiB, and SCP over SSH for larger ones.
|
|
3452
|
+
|
|
3371
3453
|
### Example
|
|
3372
3454
|
|
|
3373
3455
|
```ts
|
|
@@ -3438,6 +3520,80 @@ example().catch(console.error);
|
|
|
3438
3520
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3439
3521
|
|
|
3440
3522
|
|
|
3523
|
+
## recover
|
|
3524
|
+
|
|
3525
|
+
> Recover200Response recover(sandboxId)
|
|
3526
|
+
|
|
3527
|
+
Recover a sandbox that stopped responding
|
|
3528
|
+
|
|
3529
|
+
Power-cycle the machine of a sandbox that stopped answering. The disk is not touched. The sandbox usually answers again within 1-2 minutes and then saves your work by itself; `sandbox.recovered` fires when it does. Refused with `409`: - `sandbox_is_reachable`: the sandbox answers normally. - `too_soon`: a recover started less than 10 minutes ago. - `no_machine`: the sandbox has no machine. Resume it instead. - `recover_unsupported`: its machine cannot be power-cycled. Wait for it to answer, or resume it from its last snapshot. - `reset_failed`: the power-cycle failed. Reply to the incident email.
|
|
3530
|
+
|
|
3531
|
+
### Example
|
|
3532
|
+
|
|
3533
|
+
```ts
|
|
3534
|
+
import {
|
|
3535
|
+
Configuration,
|
|
3536
|
+
BoatApi,
|
|
3537
|
+
} from '@boatdev/sdk';
|
|
3538
|
+
import type { RecoverRequest } from '@boatdev/sdk';
|
|
3539
|
+
|
|
3540
|
+
async function example() {
|
|
3541
|
+
console.log("🚀 Testing @boatdev/sdk SDK...");
|
|
3542
|
+
const config = new Configuration({
|
|
3543
|
+
// Configure HTTP bearer authorization: BoatBearerAuth
|
|
3544
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
3545
|
+
});
|
|
3546
|
+
const api = new BoatApi(config);
|
|
3547
|
+
|
|
3548
|
+
const body = {
|
|
3549
|
+
// string | Public Sandbox id returned by create/list/get sandbox calls.
|
|
3550
|
+
sandboxId: sandboxId_example,
|
|
3551
|
+
} satisfies RecoverRequest;
|
|
3552
|
+
|
|
3553
|
+
try {
|
|
3554
|
+
const data = await api.recover(body);
|
|
3555
|
+
console.log(data);
|
|
3556
|
+
} catch (error) {
|
|
3557
|
+
console.error(error);
|
|
3558
|
+
}
|
|
3559
|
+
}
|
|
3560
|
+
|
|
3561
|
+
// Run the test
|
|
3562
|
+
example().catch(console.error);
|
|
3563
|
+
```
|
|
3564
|
+
|
|
3565
|
+
### Parameters
|
|
3566
|
+
|
|
3567
|
+
|
|
3568
|
+
| Name | Type | Description | Notes |
|
|
3569
|
+
|------------- | ------------- | ------------- | -------------|
|
|
3570
|
+
| **sandboxId** | `string` | Public Sandbox id returned by create/list/get sandbox calls. | [Defaults to `undefined`] |
|
|
3571
|
+
|
|
3572
|
+
### Return type
|
|
3573
|
+
|
|
3574
|
+
[**Recover200Response**](Recover200Response.md)
|
|
3575
|
+
|
|
3576
|
+
### Authorization
|
|
3577
|
+
|
|
3578
|
+
[BoatBearerAuth](../README.md#BoatBearerAuth)
|
|
3579
|
+
|
|
3580
|
+
### HTTP request headers
|
|
3581
|
+
|
|
3582
|
+
- **Content-Type**: Not defined
|
|
3583
|
+
- **Accept**: `application/json`
|
|
3584
|
+
|
|
3585
|
+
|
|
3586
|
+
### HTTP response details
|
|
3587
|
+
| Status code | Description | Response headers |
|
|
3588
|
+
|-------------|-------------|------------------|
|
|
3589
|
+
| **200** | The power-cycle started. | - |
|
|
3590
|
+
| **401** | Missing or invalid bearer token. | - |
|
|
3591
|
+
| **404** | Resource not found. | - |
|
|
3592
|
+
| **409** | The sandbox cannot be recovered now. `code` says why (see above). | - |
|
|
3593
|
+
|
|
3594
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3595
|
+
|
|
3596
|
+
|
|
3441
3597
|
## repos
|
|
3442
3598
|
|
|
3443
3599
|
> ReposResponse repos(sync, limit, cursor, sort, q, selected)
|
|
@@ -4518,7 +4674,7 @@ example().catch(console.error);
|
|
|
4518
4674
|
|
|
4519
4675
|
Steer a running turn
|
|
4520
4676
|
|
|
4521
|
-
Send a new message to a turn that is already running, without losing what the agent is doing. This is what typing into a coding agent while it works does: the instruction is taken into account and the work continues. Where the harness has a native mid-turn primitive (Claude Code, Codex, pi, Prime Agent) nothing is interrupted and the response has `native: true`. Where it does not (OpenCode), Boat interrupts that turn and immediately continues the SAME conversation with the instruction, keeping the session and its memory, and the response has `native: false`. Refused with **409 `no_running_turn`** when the conversation has nothing in flight; queue work with `POST /prompt` instead. The steer shows up in `GET /events` as a `steer` event. See [Integrated agents](/integrated-agents).
|
|
4677
|
+
Send a new message to a turn that is already running, without losing what the agent is doing. This is what typing into a coding agent while it works does: the instruction is taken into account and the work continues. Where the harness has a native mid-turn primitive (Claude Code, Codex, pi, Prime Agent) nothing is interrupted and the response has `native: true`. Where it does not (OpenCode), Boat interrupts that turn and immediately continues the SAME conversation with the instruction, keeping the session and its memory, and the response has `native: false`. Refused with **409 `no_running_turn`** when the conversation has nothing in flight; queue work with `POST /prompt` instead. `error.details.reason` says why: `turn_ended` (with `error.details.lastTurn.status` and `.error` of the newest turn), `turn_not_started` (the turn is starting; retry in a moment), `no_turn`, `not_running` (the sandbox is not running) or `delivery_failed` (the sandbox did not accept the steer; check the turn before sending more work). The steer shows up in `GET /events` as a `steer` event. See [Integrated agents](/integrated-agents).
|
|
4522
4678
|
|
|
4523
4679
|
### Example
|
|
4524
4680
|
|
|
@@ -4600,7 +4756,7 @@ example().catch(console.error);
|
|
|
4600
4756
|
|
|
4601
4757
|
Stop and archive sandbox
|
|
4602
4758
|
|
|
4603
|
-
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,
|
|
4759
|
+
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, keeping the last successful snapshot and losing everything written since then. This is irreversible; only reach for it after a stop has already failed. A force on a stop that is already pending escalates that stop.
|
|
4604
4760
|
|
|
4605
4761
|
### Example
|
|
4606
4762
|
|
|
@@ -5208,6 +5364,8 @@ example().catch(console.error);
|
|
|
5208
5364
|
|
|
5209
5365
|
Write a file in a sandbox
|
|
5210
5366
|
|
|
5367
|
+
Files up to 5 MiB after decoding. Use SCP over SSH for larger files.
|
|
5368
|
+
|
|
5211
5369
|
### Example
|
|
5212
5370
|
|
|
5213
5371
|
```ts
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# Recover200Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`ok` | boolean
|
|
10
|
+
`type` | string
|
|
11
|
+
`status` | string
|
|
12
|
+
`message` | string
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { Recover200Response } from '@boatdev/sdk'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"ok": null,
|
|
22
|
+
"type": null,
|
|
23
|
+
"status": null,
|
|
24
|
+
"message": null,
|
|
25
|
+
} satisfies Recover200Response
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as Recover200Response
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# StopOperationResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`ok` | boolean
|
|
10
|
+
`type` | string
|
|
11
|
+
`id` | string
|
|
12
|
+
`stop` | [StopOperation](StopOperation.md)
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { StopOperationResponse } from '@boatdev/sdk'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"ok": null,
|
|
22
|
+
"type": null,
|
|
23
|
+
"id": null,
|
|
24
|
+
"stop": null,
|
|
25
|
+
} satisfies StopOperationResponse
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as StopOperationResponse
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|