@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,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. On the sandbox, null once it has ended. Read by id (`GET /sandboxes/{sandboxId}/stops/{stopId}`), it is kept.
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;
@@ -0,0 +1,80 @@
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.StopOperationStatusEnum = void 0;
17
+ exports.instanceOfStopOperation = instanceOfStopOperation;
18
+ exports.StopOperationFromJSON = StopOperationFromJSON;
19
+ exports.StopOperationFromJSONTyped = StopOperationFromJSONTyped;
20
+ exports.StopOperationToJSON = StopOperationToJSON;
21
+ exports.StopOperationToJSONTyped = StopOperationToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.StopOperationStatusEnum = {
26
+ Pending: 'pending',
27
+ Failing: 'failing',
28
+ Completed: 'completed',
29
+ Superseded: 'superseded'
30
+ };
31
+ /**
32
+ * Check if a given object implements the StopOperation interface.
33
+ */
34
+ function instanceOfStopOperation(value) {
35
+ if (!('id' in value) || value['id'] === undefined)
36
+ return false;
37
+ if (!('status' in value) || value['status'] === undefined)
38
+ return false;
39
+ if (!('requestedAt' in value) || value['requestedAt'] === undefined)
40
+ return false;
41
+ if (!('lastAttemptAt' in value) || value['lastAttemptAt'] === undefined)
42
+ return false;
43
+ if (!('error' in value) || value['error'] === undefined)
44
+ return false;
45
+ if (!('endedAt' in value) || value['endedAt'] === undefined)
46
+ return false;
47
+ return true;
48
+ }
49
+ function StopOperationFromJSON(json) {
50
+ return StopOperationFromJSONTyped(json, false);
51
+ }
52
+ function StopOperationFromJSONTyped(json, ignoreDiscriminator) {
53
+ if (json == null) {
54
+ return json;
55
+ }
56
+ return {
57
+ 'id': json['id'],
58
+ 'status': json['status'],
59
+ 'requestedAt': (json['requestedAt'] == null ? null : new Date(json['requestedAt'])),
60
+ 'lastAttemptAt': (json['lastAttemptAt'] == null ? null : new Date(json['lastAttemptAt'])),
61
+ 'error': json['error'],
62
+ 'endedAt': (json['endedAt'] == null ? null : new Date(json['endedAt'])),
63
+ };
64
+ }
65
+ function StopOperationToJSON(json) {
66
+ return StopOperationToJSONTyped(json, false);
67
+ }
68
+ function StopOperationToJSONTyped(value, ignoreDiscriminator = false) {
69
+ if (value == null) {
70
+ return value;
71
+ }
72
+ return {
73
+ 'id': value['id'],
74
+ 'status': value['status'],
75
+ 'requestedAt': value['requestedAt'] == null ? value['requestedAt'] : value['requestedAt'].toISOString(),
76
+ 'lastAttemptAt': value['lastAttemptAt'] == null ? value['lastAttemptAt'] : value['lastAttemptAt'].toISOString(),
77
+ 'error': value['error'],
78
+ 'endedAt': value['endedAt'] == null ? value['endedAt'] : value['endedAt'].toISOString(),
79
+ };
80
+ }
@@ -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. Everything written since the last successful snapshot 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.
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 archival TTL. `null` disables auto-stop.
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
  */
@@ -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';
@@ -116,6 +117,8 @@ export * from './SteerEvent';
116
117
  export * from './SteerEventData';
117
118
  export * from './SteerRequest';
118
119
  export * from './SteerResponse';
120
+ export * from './StopOperation';
121
+ export * from './StopOperationResponse';
119
122
  export * from './StopRequest';
120
123
  export * from './SuccessBase';
121
124
  export * from './UnknownEvent';
@@ -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);
@@ -134,6 +135,8 @@ __exportStar(require("./SteerEvent"), exports);
134
135
  __exportStar(require("./SteerEventData"), exports);
135
136
  __exportStar(require("./SteerRequest"), exports);
136
137
  __exportStar(require("./SteerResponse"), exports);
138
+ __exportStar(require("./StopOperation"), exports);
139
+ __exportStar(require("./StopOperationResponse"), exports);
137
140
  __exportStar(require("./StopRequest"), exports);
138
141
  __exportStar(require("./SuccessBase"), exports);
139
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 || fetch)(fetchParams.url, fetchParams.init);
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. 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.
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
@@ -1,7 +1,7 @@
1
1
 
2
2
  # PromptRequest
3
3
 
4
- Work item to queue inside an existing sandbox. Provider credentials must already be configured in the Boat dashboard. **Providers (harnesses):** `codex`, `claude-code` (alias `claude`), `pi`, `opencode`, `prime-agent` (alias `prime`), `kimi` (Kimi Code CLI, alias `kimi-code`). Omit `provider` to use the harness the user selected on the Agents dashboard. **Models & reasoning effort** are harness- and model-specific and change over time. Fetch the live catalog (every provider\'s models and which reasoning-effort levels each accepts) from `GET /provider-models`. Some models accept no reasoning control. `pi`, `opencode` and `prime-agent` also expose models routed through OpenRouter and llmgateway (ids like `openrouter:anthropic/claude-sonnet-4.5`). **Conversations:** a sandbox runs many conversations in parallel, each with its own history. Set `new: true` to start a fresh conversation, or `conversationId` to continue a specific one; omit both to continue the sandbox\'s most-recently-active conversation. The response returns the `conversationId` this prompt ran in. Conversations run concurrently up to a per-sandbox limit that scales with the sandbox\'s memory; beyond it, prompts queue.
4
+ Work item to queue inside an existing sandbox. Provider credentials must already be configured in the Boat dashboard. **Providers (harnesses):** `codex`, `claude-code` (alias `claude`), `pi`, `opencode`, `prime-agent` (alias `prime`), `kimi` (Kimi Code CLI, alias `kimi-code`), `mistral` (Mistral Vibe). Omit `provider` to use the harness the user selected on the Agents dashboard. **Models & reasoning effort** are harness- and model-specific and change over time. Fetch the live catalog (every provider\'s models and which reasoning-effort levels each accepts) from `GET /provider-models`. Some models accept no reasoning control. `pi`, `opencode` and `prime-agent` also expose models routed through OpenRouter and llmgateway (ids like `openrouter:anthropic/claude-sonnet-4.5`). **Conversations:** a sandbox runs many conversations in parallel, each with its own history. Set `new: true` to start a fresh conversation, or `conversationId` to continue a specific one; omit both to continue the sandbox\'s most-recently-active conversation. The response returns the `conversationId` this prompt ran in. Conversations run concurrently up to a per-sandbox limit that scales with the sandbox\'s memory; beyond it, prompts queue.
5
5
 
6
6
  ## Properties
7
7
 
@@ -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)