@blaxel/core 0.2.59-preview.42 → 0.2.59-preview.43
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/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/client/sdk.gen.js +142 -155
- package/dist/cjs/common/settings.js +2 -2
- package/dist/cjs/sandbox/action.js +2 -2
- package/dist/cjs/sandbox/client/sdk.gen.js +1 -103
- package/dist/cjs/sandbox/interpreter.js +7 -4
- package/dist/cjs/sandbox/preview.js +11 -8
- package/dist/cjs/sandbox/sandbox.js +3 -3
- package/dist/cjs/sandbox/session.js +11 -11
- package/dist/cjs/sandbox/types.js +4 -1
- package/dist/cjs/tools/index.js +1 -3
- package/dist/cjs/types/client/sdk.gen.d.ts +177 -166
- package/dist/cjs/types/client/types.gen.d.ts +1805 -1375
- package/dist/cjs/types/sandbox/client/sdk.gen.d.ts +1 -31
- package/dist/cjs/types/sandbox/client/types.gen.d.ts +0 -83
- package/dist/cjs/types/sandbox/preview.d.ts +2 -2
- package/dist/cjs/types/sandbox/sandbox.d.ts +3 -3
- package/dist/cjs/types/volume/index.d.ts +3 -3
- package/dist/cjs/volume/index.js +12 -14
- package/dist/cjs-browser/.tsbuildinfo +1 -1
- package/dist/cjs-browser/client/sdk.gen.js +142 -155
- package/dist/cjs-browser/common/settings.js +2 -2
- package/dist/cjs-browser/sandbox/action.js +2 -2
- package/dist/cjs-browser/sandbox/client/sdk.gen.js +1 -103
- package/dist/cjs-browser/sandbox/interpreter.js +7 -4
- package/dist/cjs-browser/sandbox/preview.js +11 -8
- package/dist/cjs-browser/sandbox/sandbox.js +3 -3
- package/dist/cjs-browser/sandbox/session.js +11 -11
- package/dist/cjs-browser/sandbox/types.js +4 -1
- package/dist/cjs-browser/tools/index.js +1 -3
- package/dist/cjs-browser/types/client/sdk.gen.d.ts +177 -166
- package/dist/cjs-browser/types/client/types.gen.d.ts +1805 -1375
- package/dist/cjs-browser/types/sandbox/client/sdk.gen.d.ts +1 -31
- package/dist/cjs-browser/types/sandbox/client/types.gen.d.ts +0 -83
- package/dist/cjs-browser/types/sandbox/preview.d.ts +2 -2
- package/dist/cjs-browser/types/sandbox/sandbox.d.ts +3 -3
- package/dist/cjs-browser/types/volume/index.d.ts +3 -3
- package/dist/cjs-browser/volume/index.js +12 -14
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/client/sdk.gen.js +140 -151
- package/dist/esm/common/settings.js +2 -2
- package/dist/esm/sandbox/action.js +2 -2
- package/dist/esm/sandbox/client/sdk.gen.js +0 -96
- package/dist/esm/sandbox/interpreter.js +7 -4
- package/dist/esm/sandbox/preview.js +11 -8
- package/dist/esm/sandbox/sandbox.js +3 -3
- package/dist/esm/sandbox/session.js +11 -11
- package/dist/esm/sandbox/types.js +4 -1
- package/dist/esm/tools/index.js +1 -3
- package/dist/esm/volume/index.js +12 -14
- package/dist/esm-browser/.tsbuildinfo +1 -1
- package/dist/esm-browser/client/sdk.gen.js +140 -151
- package/dist/esm-browser/common/settings.js +2 -2
- package/dist/esm-browser/sandbox/action.js +2 -2
- package/dist/esm-browser/sandbox/client/sdk.gen.js +0 -96
- package/dist/esm-browser/sandbox/interpreter.js +7 -4
- package/dist/esm-browser/sandbox/preview.js +11 -8
- package/dist/esm-browser/sandbox/sandbox.js +3 -3
- package/dist/esm-browser/sandbox/session.js +11 -11
- package/dist/esm-browser/sandbox/types.js +4 -1
- package/dist/esm-browser/tools/index.js +1 -3
- package/dist/esm-browser/volume/index.js +12 -14
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Options as ClientOptions, type TDataShape, type Client } from '@hey-api/client-fetch';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PutCodegenFastapplyByPathData, GetCodegenRerankingByPathData, GetFilesystemContentSearchByPathData, GetFilesystemFindByPathData, GetFilesystemMultipartData, DeleteFilesystemMultipartByUploadIdAbortData, PostFilesystemMultipartByUploadIdCompleteData, PutFilesystemMultipartByUploadIdPartData, GetFilesystemMultipartByUploadIdPartsData, PostFilesystemMultipartInitiateByPathData, GetFilesystemSearchByPathData, DeleteFilesystemByPathData, GetFilesystemByPathData, PutFilesystemByPathData, DeleteFilesystemTreeByPathData, GetFilesystemTreeByPathData, PutFilesystemTreeByPathData, DeleteNetworkProcessByPidMonitorData, PostNetworkProcessByPidMonitorData, GetNetworkProcessByPidPortsData, GetProcessData, PostProcessData, DeleteProcessByIdentifierData, GetProcessByIdentifierData, DeleteProcessByIdentifierKillData, GetProcessByIdentifierLogsData, GetProcessByIdentifierLogsStreamData, GetWatchFilesystemByPathData } from './types.gen';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -13,36 +13,6 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
|
|
|
13
13
|
*/
|
|
14
14
|
meta?: Record<string, unknown>;
|
|
15
15
|
};
|
|
16
|
-
/**
|
|
17
|
-
* Welcome message
|
|
18
|
-
* Returns a welcome message with links to documentation
|
|
19
|
-
*/
|
|
20
|
-
export declare const delete_: <ThrowOnError extends boolean = false>(options?: Options<DeleteData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").WelcomeResponse, unknown, ThrowOnError>;
|
|
21
|
-
/**
|
|
22
|
-
* Welcome message
|
|
23
|
-
* Returns a welcome message with links to documentation
|
|
24
|
-
*/
|
|
25
|
-
export declare const get: <ThrowOnError extends boolean = false>(options?: Options<GetData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").WelcomeResponse, unknown, ThrowOnError>;
|
|
26
|
-
/**
|
|
27
|
-
* Welcome message
|
|
28
|
-
* Returns a welcome message with links to documentation
|
|
29
|
-
*/
|
|
30
|
-
export declare const options: <ThrowOnError extends boolean = false>(options?: Options<OptionsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").WelcomeResponse, unknown, ThrowOnError>;
|
|
31
|
-
/**
|
|
32
|
-
* Welcome message
|
|
33
|
-
* Returns a welcome message with links to documentation
|
|
34
|
-
*/
|
|
35
|
-
export declare const patch: <ThrowOnError extends boolean = false>(options?: Options<PatchData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").WelcomeResponse, unknown, ThrowOnError>;
|
|
36
|
-
/**
|
|
37
|
-
* Welcome message
|
|
38
|
-
* Returns a welcome message with links to documentation
|
|
39
|
-
*/
|
|
40
|
-
export declare const post: <ThrowOnError extends boolean = false>(options?: Options<PostData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").WelcomeResponse, unknown, ThrowOnError>;
|
|
41
|
-
/**
|
|
42
|
-
* Welcome message
|
|
43
|
-
* Returns a welcome message with links to documentation
|
|
44
|
-
*/
|
|
45
|
-
export declare const put: <ThrowOnError extends boolean = false>(options?: Options<PutData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").WelcomeResponse, unknown, ThrowOnError>;
|
|
46
16
|
/**
|
|
47
17
|
* Apply code edit
|
|
48
18
|
* Uses the configured LLM provider (Relace or Morph) to apply a code edit to the original content.
|
|
@@ -170,11 +170,6 @@ export type TreeRequest = {
|
|
|
170
170
|
[key: string]: string;
|
|
171
171
|
};
|
|
172
172
|
};
|
|
173
|
-
export type WelcomeResponse = {
|
|
174
|
-
description?: string;
|
|
175
|
-
documentation?: string;
|
|
176
|
-
message?: string;
|
|
177
|
-
};
|
|
178
173
|
export type FilesystemMultipartUpload = {
|
|
179
174
|
initiatedAt?: string;
|
|
180
175
|
parts?: {
|
|
@@ -190,84 +185,6 @@ export type FilesystemUploadedPart = {
|
|
|
190
185
|
size?: number;
|
|
191
186
|
uploadedAt?: string;
|
|
192
187
|
};
|
|
193
|
-
export type DeleteData = {
|
|
194
|
-
body?: never;
|
|
195
|
-
path?: never;
|
|
196
|
-
query?: never;
|
|
197
|
-
url: '/';
|
|
198
|
-
};
|
|
199
|
-
export type DeleteResponses = {
|
|
200
|
-
/**
|
|
201
|
-
* OK
|
|
202
|
-
*/
|
|
203
|
-
200: WelcomeResponse;
|
|
204
|
-
};
|
|
205
|
-
export type DeleteResponse = DeleteResponses[keyof DeleteResponses];
|
|
206
|
-
export type GetData = {
|
|
207
|
-
body?: never;
|
|
208
|
-
path?: never;
|
|
209
|
-
query?: never;
|
|
210
|
-
url: '/';
|
|
211
|
-
};
|
|
212
|
-
export type GetResponses = {
|
|
213
|
-
/**
|
|
214
|
-
* OK
|
|
215
|
-
*/
|
|
216
|
-
200: WelcomeResponse;
|
|
217
|
-
};
|
|
218
|
-
export type GetResponse = GetResponses[keyof GetResponses];
|
|
219
|
-
export type OptionsData = {
|
|
220
|
-
body?: never;
|
|
221
|
-
path?: never;
|
|
222
|
-
query?: never;
|
|
223
|
-
url: '/';
|
|
224
|
-
};
|
|
225
|
-
export type OptionsResponses = {
|
|
226
|
-
/**
|
|
227
|
-
* OK
|
|
228
|
-
*/
|
|
229
|
-
200: WelcomeResponse;
|
|
230
|
-
};
|
|
231
|
-
export type OptionsResponse = OptionsResponses[keyof OptionsResponses];
|
|
232
|
-
export type PatchData = {
|
|
233
|
-
body?: never;
|
|
234
|
-
path?: never;
|
|
235
|
-
query?: never;
|
|
236
|
-
url: '/';
|
|
237
|
-
};
|
|
238
|
-
export type PatchResponses = {
|
|
239
|
-
/**
|
|
240
|
-
* OK
|
|
241
|
-
*/
|
|
242
|
-
200: WelcomeResponse;
|
|
243
|
-
};
|
|
244
|
-
export type PatchResponse = PatchResponses[keyof PatchResponses];
|
|
245
|
-
export type PostData = {
|
|
246
|
-
body?: never;
|
|
247
|
-
path?: never;
|
|
248
|
-
query?: never;
|
|
249
|
-
url: '/';
|
|
250
|
-
};
|
|
251
|
-
export type PostResponses = {
|
|
252
|
-
/**
|
|
253
|
-
* OK
|
|
254
|
-
*/
|
|
255
|
-
200: WelcomeResponse;
|
|
256
|
-
};
|
|
257
|
-
export type PostResponse = PostResponses[keyof PostResponses];
|
|
258
|
-
export type PutData = {
|
|
259
|
-
body?: never;
|
|
260
|
-
path?: never;
|
|
261
|
-
query?: never;
|
|
262
|
-
url: '/';
|
|
263
|
-
};
|
|
264
|
-
export type PutResponses = {
|
|
265
|
-
/**
|
|
266
|
-
* OK
|
|
267
|
-
*/
|
|
268
|
-
200: WelcomeResponse;
|
|
269
|
-
};
|
|
270
|
-
export type PutResponse = PutResponses[keyof PutResponses];
|
|
271
188
|
export type PutCodegenFastapplyByPathData = {
|
|
272
189
|
/**
|
|
273
190
|
* Code edit request
|
|
@@ -22,8 +22,8 @@ export declare class SandboxPreview {
|
|
|
22
22
|
tokens: SandboxPreviewTokens;
|
|
23
23
|
constructor(preview: Preview);
|
|
24
24
|
get name(): string;
|
|
25
|
-
get metadata(): import("../client/types.gen.js").PreviewMetadata
|
|
26
|
-
get spec(): import("../client/types.gen.js").PreviewSpec
|
|
25
|
+
get metadata(): import("../client/types.gen.js").PreviewMetadata;
|
|
26
|
+
get spec(): import("../client/types.gen.js").PreviewSpec;
|
|
27
27
|
}
|
|
28
28
|
export declare class SandboxPreviews {
|
|
29
29
|
private sandbox;
|
|
@@ -15,10 +15,10 @@ export declare class SandboxInstance {
|
|
|
15
15
|
sessions: SandboxSessions;
|
|
16
16
|
codegen: SandboxCodegen;
|
|
17
17
|
constructor(sandbox: SandboxConfiguration);
|
|
18
|
-
get metadata(): import("../client/types.gen.js").Metadata
|
|
19
|
-
get status():
|
|
18
|
+
get metadata(): import("../client/types.gen.js").Metadata;
|
|
19
|
+
get status(): import("../client/types.gen.js").Status | undefined;
|
|
20
20
|
get events(): import("../client/types.gen.js").CoreEvents | undefined;
|
|
21
|
-
get spec(): import("../client/types.gen.js").SandboxSpec
|
|
21
|
+
get spec(): import("../client/types.gen.js").SandboxSpec;
|
|
22
22
|
wait({ maxWait, interval }?: {
|
|
23
23
|
maxWait?: number;
|
|
24
24
|
interval?: number;
|
|
@@ -10,10 +10,10 @@ export interface VolumeCreateConfiguration {
|
|
|
10
10
|
export declare class VolumeInstance {
|
|
11
11
|
private volume;
|
|
12
12
|
constructor(volume: Volume);
|
|
13
|
-
get metadata(): import("../client/types.gen.js").Metadata
|
|
14
|
-
get spec(): import("../client/types.gen.js").VolumeSpec
|
|
13
|
+
get metadata(): import("../client/types.gen.js").Metadata;
|
|
14
|
+
get spec(): import("../client/types.gen.js").VolumeSpec;
|
|
15
15
|
get status(): string | undefined;
|
|
16
|
-
get name(): string
|
|
16
|
+
get name(): string;
|
|
17
17
|
get displayName(): string | undefined;
|
|
18
18
|
get size(): number | undefined;
|
|
19
19
|
get region(): string | undefined;
|
package/dist/cjs/volume/index.js
CHANGED
|
@@ -18,16 +18,16 @@ class VolumeInstance {
|
|
|
18
18
|
return this.volume.status;
|
|
19
19
|
}
|
|
20
20
|
get name() {
|
|
21
|
-
return this.volume.metadata
|
|
21
|
+
return this.volume.metadata.name;
|
|
22
22
|
}
|
|
23
23
|
get displayName() {
|
|
24
|
-
return this.volume.metadata
|
|
24
|
+
return this.volume.metadata.displayName;
|
|
25
25
|
}
|
|
26
26
|
get size() {
|
|
27
|
-
return this.volume.spec
|
|
27
|
+
return this.volume.spec.size;
|
|
28
28
|
}
|
|
29
29
|
get region() {
|
|
30
|
-
return this.volume.spec
|
|
30
|
+
return this.volume.spec.region;
|
|
31
31
|
}
|
|
32
32
|
static async create(config) {
|
|
33
33
|
const defaultName = `volume-${(0, uuid_1.v4)().replace(/-/g, '').substring(0, 8)}`;
|
|
@@ -39,18 +39,16 @@ class VolumeInstance {
|
|
|
39
39
|
volume = config;
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
42
|
-
// It's a VolumeCreateConfiguration
|
|
43
|
-
const volumeConfig = config;
|
|
44
42
|
volume = {
|
|
45
43
|
metadata: {
|
|
46
|
-
name:
|
|
47
|
-
displayName:
|
|
48
|
-
labels:
|
|
44
|
+
name: config.name || defaultName,
|
|
45
|
+
displayName: config.displayName || config.name || defaultName,
|
|
46
|
+
labels: config.labels
|
|
49
47
|
},
|
|
50
48
|
spec: {
|
|
51
|
-
size:
|
|
52
|
-
region:
|
|
53
|
-
template:
|
|
49
|
+
size: config.size || defaultSize,
|
|
50
|
+
region: config.region,
|
|
51
|
+
template: config.template
|
|
54
52
|
}
|
|
55
53
|
};
|
|
56
54
|
}
|
|
@@ -96,7 +94,7 @@ class VolumeInstance {
|
|
|
96
94
|
return data;
|
|
97
95
|
}
|
|
98
96
|
async delete() {
|
|
99
|
-
return await VolumeInstance.delete(this.metadata
|
|
97
|
+
return await VolumeInstance.delete(this.metadata.name);
|
|
100
98
|
}
|
|
101
99
|
static async createIfNotExists(config) {
|
|
102
100
|
try {
|
|
@@ -104,7 +102,7 @@ class VolumeInstance {
|
|
|
104
102
|
}
|
|
105
103
|
catch (e) {
|
|
106
104
|
if (typeof e === "object" && e !== null && "code" in e && (e.code === 409 || e.code === 'VOLUME_ALREADY_EXISTS')) {
|
|
107
|
-
const name = 'name' in config ? config.name : config.metadata
|
|
105
|
+
const name = 'name' in config ? config.name : config.metadata.name;
|
|
108
106
|
if (!name) {
|
|
109
107
|
throw new Error("Volume name is required");
|
|
110
108
|
}
|