@boatdev/sdk 1.3.0 → 1.5.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 +2 -0
- package/dist/apis/BoatApi.d.ts +24 -2
- package/dist/apis/BoatApi.js +53 -2
- package/dist/esm/apis/BoatApi.d.ts +24 -2
- package/dist/esm/apis/BoatApi.js +53 -2
- package/dist/esm/models/CreateSandboxRequest.d.ts +1 -1
- package/dist/esm/models/ForkRequest.d.ts +6 -0
- package/dist/esm/models/ForkRequest.js +2 -0
- package/dist/esm/models/PromptRequest.d.ts +6 -0
- package/dist/esm/models/PromptRequest.js +2 -0
- package/dist/esm/models/PromptResponse.d.ts +6 -0
- package/dist/esm/models/PromptResponse.js +2 -0
- package/dist/esm/models/PromptRun.d.ts +6 -0
- package/dist/esm/models/PromptRun.js +2 -0
- package/dist/esm/models/ResumeRequest.d.ts +6 -0
- package/dist/esm/models/ResumeRequest.js +2 -0
- package/dist/esm/models/Sandbox.d.ts +65 -0
- package/dist/esm/models/Sandbox.js +31 -0
- package/dist/esm/models/Share200Response.d.ts +45 -0
- package/dist/esm/models/Share200Response.js +46 -0
- package/dist/esm/models/WebhookEventData.d.ts +10 -4
- package/dist/esm/models/WebhookEventData.js +4 -6
- package/dist/esm/models/WebhookEventType.d.ts +2 -0
- package/dist/esm/models/WebhookEventType.js +3 -1
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/CreateSandboxRequest.d.ts +1 -1
- package/dist/models/ForkRequest.d.ts +6 -0
- package/dist/models/ForkRequest.js +2 -0
- package/dist/models/PromptRequest.d.ts +6 -0
- package/dist/models/PromptRequest.js +2 -0
- package/dist/models/PromptResponse.d.ts +6 -0
- package/dist/models/PromptResponse.js +2 -0
- package/dist/models/PromptRun.d.ts +6 -0
- package/dist/models/PromptRun.js +2 -0
- package/dist/models/ResumeRequest.d.ts +6 -0
- package/dist/models/ResumeRequest.js +2 -0
- package/dist/models/Sandbox.d.ts +65 -0
- package/dist/models/Sandbox.js +32 -1
- package/dist/models/Share200Response.d.ts +45 -0
- package/dist/models/Share200Response.js +53 -0
- package/dist/models/WebhookEventData.d.ts +10 -4
- package/dist/models/WebhookEventData.js +4 -6
- package/dist/models/WebhookEventType.d.ts +2 -0
- package/dist/models/WebhookEventType.js +3 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/docs/BoatApi.md +89 -3
- package/docs/ForkRequest.md +2 -0
- package/docs/PromptRequest.md +2 -0
- package/docs/PromptResponse.md +2 -0
- package/docs/PromptRun.md +2 -0
- package/docs/ResumeRequest.md +2 -0
- package/docs/Sandbox.md +16 -0
- package/docs/Share200Response.md +36 -0
- package/docs/WebhookEventData.md +2 -0
- package/package.json +1 -1
- package/src/apis/BoatApi.ts +78 -2
- package/src/models/CreateSandboxRequest.ts +1 -1
- package/src/models/ForkRequest.ts +8 -0
- package/src/models/PromptRequest.ts +8 -0
- package/src/models/PromptResponse.ts +8 -0
- package/src/models/PromptRun.ts +8 -0
- package/src/models/ResumeRequest.ts +8 -0
- package/src/models/Sandbox.ts +83 -0
- package/src/models/Share200Response.ts +89 -0
- package/src/models/WebhookEventData.ts +14 -8
- package/src/models/WebhookEventType.ts +3 -1
- package/src/models/index.ts +1 -0
package/src/apis/BoatApi.ts
CHANGED
|
@@ -303,6 +303,11 @@ import {
|
|
|
303
303
|
SetEnvironmentVarRequestFromJSON,
|
|
304
304
|
SetEnvironmentVarRequestToJSON,
|
|
305
305
|
} from '../models/SetEnvironmentVarRequest';
|
|
306
|
+
import {
|
|
307
|
+
type Share200Response,
|
|
308
|
+
Share200ResponseFromJSON,
|
|
309
|
+
Share200ResponseToJSON,
|
|
310
|
+
} from '../models/Share200Response';
|
|
306
311
|
import {
|
|
307
312
|
type SnapshotDownloadResponse,
|
|
308
313
|
SnapshotDownloadResponseFromJSON,
|
|
@@ -616,6 +621,8 @@ export interface RotateWebhookSigningSecretRequest {
|
|
|
616
621
|
}
|
|
617
622
|
|
|
618
623
|
export interface SandboxesRequest {
|
|
624
|
+
org?: string;
|
|
625
|
+
xBoatOrg?: string;
|
|
619
626
|
limit?: number;
|
|
620
627
|
cursor?: string | null;
|
|
621
628
|
sort?: SandboxesSortEnum;
|
|
@@ -645,6 +652,10 @@ export interface SetEnvironmentVarOperationRequest {
|
|
|
645
652
|
setEnvironmentVarRequest: SetEnvironmentVarRequest;
|
|
646
653
|
}
|
|
647
654
|
|
|
655
|
+
export interface ShareRequest {
|
|
656
|
+
sandboxId: string;
|
|
657
|
+
}
|
|
658
|
+
|
|
648
659
|
export interface SshKeyOperationRequest {
|
|
649
660
|
sandboxId: string;
|
|
650
661
|
sshKeyRequest: SshKeyRequest;
|
|
@@ -984,7 +995,7 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
984
995
|
}
|
|
985
996
|
|
|
986
997
|
/**
|
|
987
|
-
* Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
|
|
998
|
+
* Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. A sandbox that is not starting (`error`, `stopped`) returns 409 sandbox_not_ready with `retryable: false` and its `state` at once: resume or recover it first. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
|
|
988
999
|
* Execute a command in a sandbox
|
|
989
1000
|
*/
|
|
990
1001
|
async commandRaw(requestParameters: CommandOperationRequest | runtime.FlatBody<CommandOperationRequest, 'commandRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Command200Response>> {
|
|
@@ -995,7 +1006,7 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
995
1006
|
}
|
|
996
1007
|
|
|
997
1008
|
/**
|
|
998
|
-
* Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
|
|
1009
|
+
* Runs the command synchronously by default (timeout configurable via `timeoutSeconds`, 600s cap). With `detached: true` the command starts in the background and a process id is returned immediately; poll `/sandboxes/{sandboxId}/commands/{processId}` for status and logs. With `stream: true` the output arrives as the command writes it, as newline-delimited JSON (`application/x-ndjson`): `{\"type\":\"started\"}`, then `{\"type\":\"stdout\"|\"stderr\",\"data\":\"...\"}` per chunk, and last `{\"type\":\"exit\",...}` (the synchronous result without stdout/stderr) or `{\"type\":\"error\",\"error\":\"...\",\"message\":\"...\"}`. Returns 400 invalid_timeout when `timeoutSeconds` is not an integer in 1-600. A command sent while the sandbox is still starting (right after a resume) waits up to 60s for it to be ready instead of failing; 409 boat_starting (retryable) is returned only if it is still not ready by then. A sandbox that is not starting (`error`, `stopped`) returns 409 sandbox_not_ready with `retryable: false` and its `state` at once: resume or recover it first. Command execution is never retried automatically: a 502 boat_direct_failed means the command may already be running on the sandbox.
|
|
999
1010
|
* Execute a command in a sandbox
|
|
1000
1011
|
*/
|
|
1001
1012
|
async command(requestParameters: CommandOperationRequest | runtime.FlatBody<CommandOperationRequest, 'commandRequest'>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Command200Response> {
|
|
@@ -3650,6 +3661,10 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
3650
3661
|
async sandboxesRequestOpts(requestParameters: SandboxesRequest): Promise<runtime.RequestOpts> {
|
|
3651
3662
|
const queryParameters: any = {};
|
|
3652
3663
|
|
|
3664
|
+
if (requestParameters['org'] != null) {
|
|
3665
|
+
queryParameters['org'] = requestParameters['org'];
|
|
3666
|
+
}
|
|
3667
|
+
|
|
3653
3668
|
if (requestParameters['limit'] != null) {
|
|
3654
3669
|
queryParameters['limit'] = requestParameters['limit'];
|
|
3655
3670
|
}
|
|
@@ -3668,6 +3683,10 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
3668
3683
|
|
|
3669
3684
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
3670
3685
|
|
|
3686
|
+
if (requestParameters['xBoatOrg'] != null) {
|
|
3687
|
+
headerParameters['X-Boat-Org'] = String(requestParameters['xBoatOrg']);
|
|
3688
|
+
}
|
|
3689
|
+
|
|
3671
3690
|
if (this.configuration && this.configuration.accessToken) {
|
|
3672
3691
|
const token = this.configuration.accessToken;
|
|
3673
3692
|
const tokenString = await token("BoatBearerAuth", []);
|
|
@@ -3688,6 +3707,7 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
3688
3707
|
}
|
|
3689
3708
|
|
|
3690
3709
|
/**
|
|
3710
|
+
* Your sandboxes. In an organization\'s scope (the active wallet, `org`, or `X-Boat-Org`) the list also holds every sandbox that organization pays for, whoever created it; `createdBy` and `access` say whose it is and what you may do with it.
|
|
3691
3711
|
* List sandboxes
|
|
3692
3712
|
*/
|
|
3693
3713
|
async sandboxesRaw(requestParameters: SandboxesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SandboxListResponse>> {
|
|
@@ -3698,6 +3718,7 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
3698
3718
|
}
|
|
3699
3719
|
|
|
3700
3720
|
/**
|
|
3721
|
+
* Your sandboxes. In an organization\'s scope (the active wallet, `org`, or `X-Boat-Org`) the list also holds every sandbox that organization pays for, whoever created it; `createdBy` and `access` say whose it is and what you may do with it.
|
|
3701
3722
|
* List sandboxes
|
|
3702
3723
|
*/
|
|
3703
3724
|
async sandboxes(requestParameters: SandboxesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SandboxListResponse> {
|
|
@@ -4066,6 +4087,61 @@ export class BoatApi extends runtime.BaseAPI {
|
|
|
4066
4087
|
return await response.value();
|
|
4067
4088
|
}
|
|
4068
4089
|
|
|
4090
|
+
/**
|
|
4091
|
+
* Creates request options for share without sending the request
|
|
4092
|
+
*/
|
|
4093
|
+
async shareRequestOpts(requestParameters: ShareRequest): Promise<runtime.RequestOpts> {
|
|
4094
|
+
if (requestParameters['sandboxId'] == null) {
|
|
4095
|
+
throw new runtime.RequiredError(
|
|
4096
|
+
'sandboxId',
|
|
4097
|
+
'Required parameter "sandboxId" was null or undefined when calling share().'
|
|
4098
|
+
);
|
|
4099
|
+
}
|
|
4100
|
+
|
|
4101
|
+
const queryParameters: any = {};
|
|
4102
|
+
|
|
4103
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
4104
|
+
|
|
4105
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
4106
|
+
const token = this.configuration.accessToken;
|
|
4107
|
+
const tokenString = await token("BoatBearerAuth", []);
|
|
4108
|
+
|
|
4109
|
+
if (tokenString) {
|
|
4110
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
4111
|
+
}
|
|
4112
|
+
}
|
|
4113
|
+
|
|
4114
|
+
let urlPath = `/sandboxes/{sandboxId}/share`;
|
|
4115
|
+
urlPath = urlPath.replace('{sandboxId}', encodeURIComponent(String(requestParameters['sandboxId'])));
|
|
4116
|
+
|
|
4117
|
+
return {
|
|
4118
|
+
path: urlPath,
|
|
4119
|
+
method: 'POST',
|
|
4120
|
+
headers: headerParameters,
|
|
4121
|
+
query: queryParameters,
|
|
4122
|
+
};
|
|
4123
|
+
}
|
|
4124
|
+
|
|
4125
|
+
/**
|
|
4126
|
+
* Let every member of the organization that pays for this sandbox use it. Your personal logins (GitHub token, Claude and Codex logins, environment secrets, the sandbox\'s own CLI key) are never pushed to it again and are wiped off its disk at its next start, so a teammate never acts as you. Files you wrote stay. One-way: the sandbox stays like a `noEnv` sandbox from then on. A running sandbox stays `view` for the organization until you stop and resume it (`restartRequired`). Only the person who created the sandbox can share it, and only a sandbox billed to an organization. Sharing an already shared sandbox is a no-op.
|
|
4127
|
+
* Share sandbox with the organization
|
|
4128
|
+
*/
|
|
4129
|
+
async shareRaw(requestParameters: ShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Share200Response>> {
|
|
4130
|
+
const requestOptions = await this.shareRequestOpts(requestParameters);
|
|
4131
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
4132
|
+
|
|
4133
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => Share200ResponseFromJSON(jsonValue));
|
|
4134
|
+
}
|
|
4135
|
+
|
|
4136
|
+
/**
|
|
4137
|
+
* Let every member of the organization that pays for this sandbox use it. Your personal logins (GitHub token, Claude and Codex logins, environment secrets, the sandbox\'s own CLI key) are never pushed to it again and are wiped off its disk at its next start, so a teammate never acts as you. Files you wrote stay. One-way: the sandbox stays like a `noEnv` sandbox from then on. A running sandbox stays `view` for the organization until you stop and resume it (`restartRequired`). Only the person who created the sandbox can share it, and only a sandbox billed to an organization. Sharing an already shared sandbox is a no-op.
|
|
4138
|
+
* Share sandbox with the organization
|
|
4139
|
+
*/
|
|
4140
|
+
async share(requestParameters: ShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Share200Response> {
|
|
4141
|
+
const response = await this.shareRaw(requestParameters, initOverrides);
|
|
4142
|
+
return await response.value();
|
|
4143
|
+
}
|
|
4144
|
+
|
|
4069
4145
|
/**
|
|
4070
4146
|
* Creates request options for sshKey without sending the request
|
|
4071
4147
|
*/
|
|
@@ -56,7 +56,7 @@ export interface CreateSandboxRequest {
|
|
|
56
56
|
*/
|
|
57
57
|
snapshots?: boolean;
|
|
58
58
|
/**
|
|
59
|
-
* Pass `true` to get a sandbox only if a machine of this type is ready right now. The call answers within about 1.5 s: either the usual `202` with the sandbox, or `503` `no_ready_machine` with nothing created, billed, or counted against your start limits, so you can retry or fall back at once. Without it, a create waits for a machine to be built when none is ready.
|
|
59
|
+
* Pass `true` to get a sandbox only if a machine of this type is ready right now. The call answers within about 1.5 s: either the usual `202` with the sandbox, or `503` `no_ready_machine` with nothing created, billed, or counted against your start limits, so you can retry or fall back at once. Without it, a create waits for a machine to be built when none is ready. Works with `from`; fork and resume take it too.
|
|
60
60
|
* @type {boolean}
|
|
61
61
|
* @memberof CreateSandboxRequest
|
|
62
62
|
*/
|
|
@@ -19,6 +19,12 @@ import { mapValues } from '../runtime';
|
|
|
19
19
|
* @interface ForkRequest
|
|
20
20
|
*/
|
|
21
21
|
export interface ForkRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Pass `true` to fork only if a machine is ready right now. Within about 1.5 s you get the usual `202`, or `503` `no_ready_machine` with no fork created and nothing counted against your start limits.
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof ForkRequest
|
|
26
|
+
*/
|
|
27
|
+
failFast?: boolean;
|
|
22
28
|
/**
|
|
23
29
|
* Replaces the env the fork would otherwise inherit from the source sandbox. Same validation rules as `CreateSandboxRequest.env`.
|
|
24
30
|
* @type {{ [key: string]: string; }}
|
|
@@ -80,6 +86,7 @@ export function ForkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
80
86
|
}
|
|
81
87
|
return {
|
|
82
88
|
|
|
89
|
+
'failFast': json['failFast'] == null ? undefined : json['failFast'],
|
|
83
90
|
'env': json['env'] == null ? undefined : json['env'],
|
|
84
91
|
'environment': json['environment'] == null ? undefined : json['environment'],
|
|
85
92
|
'noEnv': json['noEnv'] == null ? undefined : json['noEnv'],
|
|
@@ -99,6 +106,7 @@ export function ForkRequestToJSONTyped(value?: ForkRequest | null, ignoreDiscrim
|
|
|
99
106
|
|
|
100
107
|
return {
|
|
101
108
|
|
|
109
|
+
'failFast': value['failFast'],
|
|
102
110
|
'env': value['env'],
|
|
103
111
|
'environment': value['environment'],
|
|
104
112
|
'noEnv': value['noEnv'],
|
|
@@ -44,6 +44,12 @@ export interface PromptRequest {
|
|
|
44
44
|
* @memberof PromptRequest
|
|
45
45
|
*/
|
|
46
46
|
reasoningEffort?: string | null;
|
|
47
|
+
/**
|
|
48
|
+
* Optional. `true` runs this prompt in fast mode. The model stays the same and gives output faster. The provider bills fast mode at its higher fast rate. Omit to use the choice saved on the Agents dashboard for that model. `false` forces standard speed. Only models with `fastMode` set to `true` in `GET /provider-models` accept `true`. Other models return 400 `fast_mode_not_supported`.
|
|
49
|
+
* @type {boolean}
|
|
50
|
+
* @memberof PromptRequest
|
|
51
|
+
*/
|
|
52
|
+
fast?: boolean | null;
|
|
47
53
|
/**
|
|
48
54
|
* Start a NEW conversation on the sandbox (runs in parallel with any existing ones) instead of continuing the most-recently-active one. Mutually exclusive with `conversationId`.
|
|
49
55
|
* @type {boolean}
|
|
@@ -104,6 +110,7 @@ export function PromptRequestFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
104
110
|
'provider': json['provider'],
|
|
105
111
|
'model': json['model'] == null ? undefined : json['model'],
|
|
106
112
|
'reasoningEffort': json['reasoningEffort'] == null ? undefined : json['reasoningEffort'],
|
|
113
|
+
'fast': json['fast'] == null ? undefined : json['fast'],
|
|
107
114
|
'_new': json['new'] == null ? undefined : json['new'],
|
|
108
115
|
'conversationId': json['conversationId'] == null ? undefined : json['conversationId'],
|
|
109
116
|
'prompt': json['prompt'],
|
|
@@ -124,6 +131,7 @@ export function PromptRequestToJSONTyped(value?: PromptRequest | null, ignoreDis
|
|
|
124
131
|
'provider': value['provider'],
|
|
125
132
|
'model': value['model'],
|
|
126
133
|
'reasoningEffort': value['reasoningEffort'],
|
|
134
|
+
'fast': value['fast'],
|
|
127
135
|
'new': value['_new'],
|
|
128
136
|
'conversationId': value['conversationId'],
|
|
129
137
|
'prompt': value['prompt'],
|
|
@@ -87,6 +87,12 @@ export interface PromptResponse {
|
|
|
87
87
|
* @memberof PromptResponse
|
|
88
88
|
*/
|
|
89
89
|
reasoningEffort?: string | null;
|
|
90
|
+
/**
|
|
91
|
+
* The prompt runs in fast mode.
|
|
92
|
+
* @type {boolean}
|
|
93
|
+
* @memberof PromptResponse
|
|
94
|
+
*/
|
|
95
|
+
fast?: boolean;
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
|
|
@@ -141,6 +147,7 @@ export function PromptResponseFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
141
147
|
'provider': json['provider'],
|
|
142
148
|
'model': json['model'] == null ? undefined : json['model'],
|
|
143
149
|
'reasoningEffort': json['reasoningEffort'] == null ? undefined : json['reasoningEffort'],
|
|
150
|
+
'fast': json['fast'] == null ? undefined : json['fast'],
|
|
144
151
|
};
|
|
145
152
|
}
|
|
146
153
|
|
|
@@ -165,6 +172,7 @@ export function PromptResponseToJSONTyped(value?: PromptResponse | null, ignoreD
|
|
|
165
172
|
'provider': value['provider'],
|
|
166
173
|
'model': value['model'],
|
|
167
174
|
'reasoningEffort': value['reasoningEffort'],
|
|
175
|
+
'fast': value['fast'],
|
|
168
176
|
};
|
|
169
177
|
}
|
|
170
178
|
|
package/src/models/PromptRun.ts
CHANGED
|
@@ -67,6 +67,12 @@ export interface PromptRun {
|
|
|
67
67
|
* @memberof PromptRun
|
|
68
68
|
*/
|
|
69
69
|
reasoningEffort?: string | null;
|
|
70
|
+
/**
|
|
71
|
+
* The prompt runs in fast mode. `null` means no speed is set yet. The prompt waits without a speed choice, or it ended without running (`done` is true). The speed is set when the prompt starts, for the model that runs.
|
|
72
|
+
* @type {boolean}
|
|
73
|
+
* @memberof PromptRun
|
|
74
|
+
*/
|
|
75
|
+
fast?: boolean | null;
|
|
70
76
|
/**
|
|
71
77
|
* The conversation this prompt ran in. A Sandbox runs many conversations in parallel; see [Integrated agents](/integrated-agents).
|
|
72
78
|
* @type {string}
|
|
@@ -120,6 +126,7 @@ export function PromptRunFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
120
126
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
121
127
|
'model': json['model'] == null ? undefined : json['model'],
|
|
122
128
|
'reasoningEffort': json['reasoningEffort'] == null ? undefined : json['reasoningEffort'],
|
|
129
|
+
'fast': json['fast'] == null ? undefined : json['fast'],
|
|
123
130
|
'conversationId': json['conversationId'] == null ? undefined : json['conversationId'],
|
|
124
131
|
};
|
|
125
132
|
}
|
|
@@ -143,6 +150,7 @@ export function PromptRunToJSONTyped(value?: PromptRun | null, ignoreDiscriminat
|
|
|
143
150
|
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(),
|
|
144
151
|
'model': value['model'],
|
|
145
152
|
'reasoningEffort': value['reasoningEffort'],
|
|
153
|
+
'fast': value['fast'],
|
|
146
154
|
'conversationId': value['conversationId'],
|
|
147
155
|
};
|
|
148
156
|
}
|
|
@@ -19,6 +19,12 @@ import { mapValues } from '../runtime';
|
|
|
19
19
|
* @interface ResumeRequest
|
|
20
20
|
*/
|
|
21
21
|
export interface ResumeRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Pass `true` to resume only if a machine is ready right now. Within about 1.5 s you get the usual `202`, or `503` `no_ready_machine` with the sandbox left stopped and nothing counted against your start limits.
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof ResumeRequest
|
|
26
|
+
*/
|
|
27
|
+
failFast?: boolean;
|
|
22
28
|
/**
|
|
23
29
|
* 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.
|
|
24
30
|
* @type {ResumeRequestTypeEnum}
|
|
@@ -80,6 +86,7 @@ export function ResumeRequestFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
80
86
|
}
|
|
81
87
|
return {
|
|
82
88
|
|
|
89
|
+
'failFast': json['failFast'] == null ? undefined : json['failFast'],
|
|
83
90
|
'type': json['type'] == null ? undefined : json['type'],
|
|
84
91
|
'env': json['env'] == null ? undefined : json['env'],
|
|
85
92
|
'environment': json['environment'] == null ? undefined : json['environment'],
|
|
@@ -99,6 +106,7 @@ export function ResumeRequestToJSONTyped(value?: ResumeRequest | null, ignoreDis
|
|
|
99
106
|
|
|
100
107
|
return {
|
|
101
108
|
|
|
109
|
+
'failFast': value['failFast'],
|
|
102
110
|
'type': value['type'],
|
|
103
111
|
'env': value['env'],
|
|
104
112
|
'environment': value['environment'],
|
package/src/models/Sandbox.ts
CHANGED
|
@@ -51,6 +51,24 @@ export interface Sandbox {
|
|
|
51
51
|
* @memberof Sandbox
|
|
52
52
|
*/
|
|
53
53
|
error?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
* `degraded` when the machine is alive but Boat cannot fully reach it (for example a firewall rule inside the sandbox blocks the tunnel). The sandbox keeps running.
|
|
56
|
+
* @type {SandboxHealthEnum}
|
|
57
|
+
* @memberof Sandbox
|
|
58
|
+
*/
|
|
59
|
+
health?: SandboxHealthEnum;
|
|
60
|
+
/**
|
|
61
|
+
* Why the sandbox is degraded, or null.
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof Sandbox
|
|
64
|
+
*/
|
|
65
|
+
healthReason?: string | null;
|
|
66
|
+
/**
|
|
67
|
+
* When the sandbox became degraded, or null.
|
|
68
|
+
* @type {Date}
|
|
69
|
+
* @memberof Sandbox
|
|
70
|
+
*/
|
|
71
|
+
degradedSince?: Date | null;
|
|
54
72
|
/**
|
|
55
73
|
* Current machine size: what the sandbox was created with, or the size it was last resumed or forked onto.
|
|
56
74
|
* @type {SandboxTypeEnum}
|
|
@@ -159,6 +177,36 @@ export interface Sandbox {
|
|
|
159
177
|
* @memberof Sandbox
|
|
160
178
|
*/
|
|
161
179
|
team?: SandboxTeam;
|
|
180
|
+
/**
|
|
181
|
+
* Display name (or email) of the person who created the sandbox. Organization members see every sandbox the organization pays for, so this says whose it is.
|
|
182
|
+
* @type {string}
|
|
183
|
+
* @memberof Sandbox
|
|
184
|
+
*/
|
|
185
|
+
createdBy?: string | null;
|
|
186
|
+
/**
|
|
187
|
+
* Account id of the person who created the sandbox.
|
|
188
|
+
* @type {string}
|
|
189
|
+
* @memberof Sandbox
|
|
190
|
+
*/
|
|
191
|
+
createdById?: string | null;
|
|
192
|
+
/**
|
|
193
|
+
* What you may do with this sandbox. `owner`: you created it. `use`: a teammate's organization sandbox that is `noEnv` (created with it, or shared and restarted), so you can open, run commands in, prompt, resume and stop it. `view`: a teammate's organization sandbox that still holds their personal logins, so you can see it and stop it until they share it (`POST /sandboxes/{sandboxId}/share`).
|
|
194
|
+
* @type {SandboxAccessEnum}
|
|
195
|
+
* @memberof Sandbox
|
|
196
|
+
*/
|
|
197
|
+
access?: SandboxAccessEnum;
|
|
198
|
+
/**
|
|
199
|
+
* True while the sandbox still holds its creator's personal logins (GitHub token, model logins, secrets). Other members can only see such a sandbox.
|
|
200
|
+
* @type {boolean}
|
|
201
|
+
* @memberof Sandbox
|
|
202
|
+
*/
|
|
203
|
+
holdsCreatorLogins?: boolean;
|
|
204
|
+
/**
|
|
205
|
+
* True once the sandbox is shared but not restarted yet. Its creator's logins are wiped at its next start, and the organization can use it from then on.
|
|
206
|
+
* @type {boolean}
|
|
207
|
+
* @memberof Sandbox
|
|
208
|
+
*/
|
|
209
|
+
wipePendingUntilRestart?: boolean;
|
|
162
210
|
/**
|
|
163
211
|
* The sandbox's stable three-word subdomain slug (e.g. "frazil-pneuma-rallye"), or null before one is assigned.
|
|
164
212
|
* @type {string}
|
|
@@ -222,6 +270,15 @@ export const SandboxStateEnum = {
|
|
|
222
270
|
} as const;
|
|
223
271
|
export type SandboxStateEnum = typeof SandboxStateEnum[keyof typeof SandboxStateEnum];
|
|
224
272
|
|
|
273
|
+
/**
|
|
274
|
+
* @export
|
|
275
|
+
*/
|
|
276
|
+
export const SandboxHealthEnum = {
|
|
277
|
+
Ok: 'ok',
|
|
278
|
+
Degraded: 'degraded'
|
|
279
|
+
} as const;
|
|
280
|
+
export type SandboxHealthEnum = typeof SandboxHealthEnum[keyof typeof SandboxHealthEnum];
|
|
281
|
+
|
|
225
282
|
/**
|
|
226
283
|
* @export
|
|
227
284
|
*/
|
|
@@ -241,6 +298,16 @@ export const SandboxMachineProviderEnum = {
|
|
|
241
298
|
} as const;
|
|
242
299
|
export type SandboxMachineProviderEnum = typeof SandboxMachineProviderEnum[keyof typeof SandboxMachineProviderEnum];
|
|
243
300
|
|
|
301
|
+
/**
|
|
302
|
+
* @export
|
|
303
|
+
*/
|
|
304
|
+
export const SandboxAccessEnum = {
|
|
305
|
+
Owner: 'owner',
|
|
306
|
+
Use: 'use',
|
|
307
|
+
View: 'view'
|
|
308
|
+
} as const;
|
|
309
|
+
export type SandboxAccessEnum = typeof SandboxAccessEnum[keyof typeof SandboxAccessEnum];
|
|
310
|
+
|
|
244
311
|
/**
|
|
245
312
|
* @export
|
|
246
313
|
*/
|
|
@@ -291,6 +358,9 @@ export function SandboxFromJSONTyped(json: any, ignoreDiscriminator: boolean): S
|
|
|
291
358
|
'name': json['name'],
|
|
292
359
|
'state': json['state'],
|
|
293
360
|
'error': json['error'] == null ? undefined : json['error'],
|
|
361
|
+
'health': json['health'] == null ? undefined : json['health'],
|
|
362
|
+
'healthReason': json['healthReason'] == null ? undefined : json['healthReason'],
|
|
363
|
+
'degradedSince': json['degradedSince'] == null ? undefined : (new Date(json['degradedSince'])),
|
|
294
364
|
'type': json['type'] == null ? undefined : json['type'],
|
|
295
365
|
'vcpu': json['vcpu'] == null ? undefined : json['vcpu'],
|
|
296
366
|
'memoryGB': json['memoryGB'] == null ? undefined : json['memoryGB'],
|
|
@@ -309,6 +379,11 @@ export function SandboxFromJSONTyped(json: any, ignoreDiscriminator: boolean): S
|
|
|
309
379
|
'snapshotCompletedAt': json['snapshotCompletedAt'] == null ? undefined : (new Date(json['snapshotCompletedAt'])),
|
|
310
380
|
'snapshotVerifiedAt': json['snapshotVerifiedAt'] == null ? undefined : (new Date(json['snapshotVerifiedAt'])),
|
|
311
381
|
'team': json['team'] == null ? undefined : SandboxTeamFromJSON(json['team']),
|
|
382
|
+
'createdBy': json['createdBy'] == null ? undefined : json['createdBy'],
|
|
383
|
+
'createdById': json['createdById'] == null ? undefined : json['createdById'],
|
|
384
|
+
'access': json['access'] == null ? undefined : json['access'],
|
|
385
|
+
'holdsCreatorLogins': json['holdsCreatorLogins'] == null ? undefined : json['holdsCreatorLogins'],
|
|
386
|
+
'wipePendingUntilRestart': json['wipePendingUntilRestart'] == null ? undefined : json['wipePendingUntilRestart'],
|
|
312
387
|
'subdomain': json['subdomain'] == null ? undefined : json['subdomain'],
|
|
313
388
|
'lastSnapshotAttemptAt': json['lastSnapshotAttemptAt'] == null ? undefined : (new Date(json['lastSnapshotAttemptAt'])),
|
|
314
389
|
'lastSnapshotStatus': json['lastSnapshotStatus'] == null ? undefined : json['lastSnapshotStatus'],
|
|
@@ -334,6 +409,9 @@ export function SandboxToJSONTyped(value?: Sandbox | null, ignoreDiscriminator:
|
|
|
334
409
|
'name': value['name'],
|
|
335
410
|
'state': value['state'],
|
|
336
411
|
'error': value['error'],
|
|
412
|
+
'health': value['health'],
|
|
413
|
+
'healthReason': value['healthReason'],
|
|
414
|
+
'degradedSince': value['degradedSince'] == null ? value['degradedSince'] : value['degradedSince'].toISOString(),
|
|
337
415
|
'type': value['type'],
|
|
338
416
|
'vcpu': value['vcpu'],
|
|
339
417
|
'memoryGB': value['memoryGB'],
|
|
@@ -352,6 +430,11 @@ export function SandboxToJSONTyped(value?: Sandbox | null, ignoreDiscriminator:
|
|
|
352
430
|
'snapshotCompletedAt': value['snapshotCompletedAt'] == null ? value['snapshotCompletedAt'] : value['snapshotCompletedAt'].toISOString(),
|
|
353
431
|
'snapshotVerifiedAt': value['snapshotVerifiedAt'] == null ? value['snapshotVerifiedAt'] : value['snapshotVerifiedAt'].toISOString(),
|
|
354
432
|
'team': SandboxTeamToJSON(value['team']),
|
|
433
|
+
'createdBy': value['createdBy'],
|
|
434
|
+
'createdById': value['createdById'],
|
|
435
|
+
'access': value['access'],
|
|
436
|
+
'holdsCreatorLogins': value['holdsCreatorLogins'],
|
|
437
|
+
'wipePendingUntilRestart': value['wipePendingUntilRestart'],
|
|
355
438
|
'subdomain': value['subdomain'],
|
|
356
439
|
'lastSnapshotAttemptAt': value['lastSnapshotAttemptAt'] == null ? value['lastSnapshotAttemptAt'] : value['lastSnapshotAttemptAt'].toISOString(),
|
|
357
440
|
'lastSnapshotStatus': value['lastSnapshotStatus'],
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Boat Public API v1
|
|
5
|
+
* Public JSON API for creating, operating, prompting, observing, and exposing sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { Sandbox } from './Sandbox';
|
|
17
|
+
import {
|
|
18
|
+
SandboxFromJSON,
|
|
19
|
+
SandboxFromJSONTyped,
|
|
20
|
+
SandboxToJSON,
|
|
21
|
+
SandboxToJSONTyped,
|
|
22
|
+
} from './Sandbox';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface Share200Response
|
|
28
|
+
*/
|
|
29
|
+
export interface Share200Response {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Sandbox}
|
|
33
|
+
* @memberof Share200Response
|
|
34
|
+
*/
|
|
35
|
+
sandbox?: Sandbox;
|
|
36
|
+
/**
|
|
37
|
+
* True when the sandbox was running: what runs on it still holds your logins in memory, so it stays `view` for the organization until you stop and resume it.
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
* @memberof Share200Response
|
|
40
|
+
*/
|
|
41
|
+
restartRequired?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof Share200Response
|
|
46
|
+
*/
|
|
47
|
+
message?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the Share200Response interface.
|
|
52
|
+
*/
|
|
53
|
+
export function instanceOfShare200Response(value: object): value is Share200Response {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function Share200ResponseFromJSON(json: any): Share200Response {
|
|
58
|
+
return Share200ResponseFromJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function Share200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Share200Response {
|
|
62
|
+
if (json == null) {
|
|
63
|
+
return json;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
|
|
67
|
+
'sandbox': json['sandbox'] == null ? undefined : SandboxFromJSON(json['sandbox']),
|
|
68
|
+
'restartRequired': json['restartRequired'] == null ? undefined : json['restartRequired'],
|
|
69
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function Share200ResponseToJSON(json: any): Share200Response {
|
|
74
|
+
return Share200ResponseToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function Share200ResponseToJSONTyped(value?: Share200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'sandbox': SandboxToJSON(value['sandbox']),
|
|
85
|
+
'restartRequired': value['restartRequired'],
|
|
86
|
+
'message': value['message'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
@@ -34,17 +34,23 @@ export interface WebhookEventData {
|
|
|
34
34
|
*/
|
|
35
35
|
sandbox: WebhookEventDataSandbox;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* On sandbox.ready, sandbox.error and sandbox.archived only.
|
|
38
38
|
* @type {string}
|
|
39
39
|
* @memberof WebhookEventData
|
|
40
40
|
*/
|
|
41
|
-
previousState
|
|
41
|
+
previousState?: string;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Absent on sandbox.hydrated.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof WebhookEventData
|
|
46
|
+
*/
|
|
47
|
+
state?: string;
|
|
48
|
+
/**
|
|
49
|
+
* On sandbox.degraded and sandbox.recovered. Why the sandbox is degraded (null on recovered).
|
|
44
50
|
* @type {string}
|
|
45
51
|
* @memberof WebhookEventData
|
|
46
52
|
*/
|
|
47
|
-
|
|
53
|
+
reason?: string | null;
|
|
48
54
|
}
|
|
49
55
|
|
|
50
56
|
/**
|
|
@@ -52,8 +58,6 @@ export interface WebhookEventData {
|
|
|
52
58
|
*/
|
|
53
59
|
export function instanceOfWebhookEventData(value: object): value is WebhookEventData {
|
|
54
60
|
if (!('sandbox' in value) || value['sandbox'] === undefined) return false;
|
|
55
|
-
if (!('previousState' in value) || value['previousState'] === undefined) return false;
|
|
56
|
-
if (!('state' in value) || value['state'] === undefined) return false;
|
|
57
61
|
return true;
|
|
58
62
|
}
|
|
59
63
|
|
|
@@ -68,8 +72,9 @@ export function WebhookEventDataFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
68
72
|
return {
|
|
69
73
|
|
|
70
74
|
'sandbox': WebhookEventDataSandboxFromJSON(json['sandbox']),
|
|
71
|
-
'previousState': json['previousState'],
|
|
72
|
-
'state': json['state'],
|
|
75
|
+
'previousState': json['previousState'] == null ? undefined : json['previousState'],
|
|
76
|
+
'state': json['state'] == null ? undefined : json['state'],
|
|
77
|
+
'reason': json['reason'] == null ? undefined : json['reason'],
|
|
73
78
|
};
|
|
74
79
|
}
|
|
75
80
|
|
|
@@ -87,6 +92,7 @@ export function WebhookEventDataToJSONTyped(value?: WebhookEventData | null, ign
|
|
|
87
92
|
'sandbox': WebhookEventDataSandboxToJSON(value['sandbox']),
|
|
88
93
|
'previousState': value['previousState'],
|
|
89
94
|
'state': value['state'],
|
|
95
|
+
'reason': value['reason'],
|
|
90
96
|
};
|
|
91
97
|
}
|
|
92
98
|
|
|
@@ -21,7 +21,9 @@ export const WebhookEventType = {
|
|
|
21
21
|
SandboxReady: 'sandbox.ready',
|
|
22
22
|
SandboxError: 'sandbox.error',
|
|
23
23
|
SandboxArchived: 'sandbox.archived',
|
|
24
|
-
SandboxHydrated: 'sandbox.hydrated'
|
|
24
|
+
SandboxHydrated: 'sandbox.hydrated',
|
|
25
|
+
SandboxDegraded: 'sandbox.degraded',
|
|
26
|
+
SandboxRecovered: 'sandbox.recovered'
|
|
25
27
|
} as const;
|
|
26
28
|
export type WebhookEventType = typeof WebhookEventType[keyof typeof WebhookEventType];
|
|
27
29
|
|
package/src/models/index.ts
CHANGED
|
@@ -101,6 +101,7 @@ export * from './SecretsUpdateRequest';
|
|
|
101
101
|
export * from './SelectedRepository';
|
|
102
102
|
export * from './SetEnvironmentSecretFileRequest';
|
|
103
103
|
export * from './SetEnvironmentVarRequest';
|
|
104
|
+
export * from './Share200Response';
|
|
104
105
|
export * from './SnapshotChunk';
|
|
105
106
|
export * from './SnapshotDownloadResponse';
|
|
106
107
|
export * from './SnapshotDownloadResponseAllOfInventory';
|