ppio-sandbox 2.1.1 → 2.1.4-a1
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/README.md +19 -0
- package/dist/{chunk-NRHSODSZ.mjs → chunk-PPBSBQ3N.mjs} +2 -2
- package/dist/{chunk-RIWYGA3J.mjs → chunk-Q4BOWZMT.mjs} +2 -2
- package/dist/chunk-Q4BOWZMT.mjs.map +1 -0
- package/dist/{chunk-M7G3KDGF.mjs → chunk-RWHOETVW.mjs} +695 -327
- package/dist/chunk-RWHOETVW.mjs.map +1 -0
- package/dist/code-interpreter.d.mts +2 -2
- package/dist/code-interpreter.d.ts +2 -2
- package/dist/code-interpreter.js +705 -335
- package/dist/code-interpreter.js.map +1 -1
- package/dist/code-interpreter.mjs +4 -2
- package/dist/code-interpreter.mjs.map +1 -1
- package/dist/desktop.d.mts +1 -1
- package/dist/desktop.d.ts +1 -1
- package/dist/desktop.js +705 -335
- package/dist/desktop.js.map +1 -1
- package/dist/desktop.mjs +4 -2
- package/dist/{index-CRwaZUdl.d.mts → index-DIHU8MXT.d.mts} +239 -61
- package/dist/{index-CRwaZUdl.d.ts → index-DIHU8MXT.d.ts} +239 -61
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +705 -335
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/sandbox-6EPWOUGN.mjs +8 -0
- package/dist/sandbox-OKITI7WW.mjs +8 -0
- package/package.json +1 -1
- package/dist/chunk-M7G3KDGF.mjs.map +0 -1
- package/dist/chunk-RIWYGA3J.mjs.map +0 -1
- package/dist/sandbox-5PUSVOHB.mjs +0 -8
- package/dist/sandbox-VBQLLX3L.mjs +0 -8
- /package/dist/{chunk-NRHSODSZ.mjs.map → chunk-PPBSBQ3N.mjs.map} +0 -0
- /package/dist/{sandbox-5PUSVOHB.mjs.map → sandbox-6EPWOUGN.mjs.map} +0 -0
- /package/dist/{sandbox-VBQLLX3L.mjs.map → sandbox-OKITI7WW.mjs.map} +0 -0
package/dist/desktop.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Sandbox
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q4BOWZMT.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ALL_TRAFFIC,
|
|
6
6
|
ApiClient,
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
Git,
|
|
16
16
|
GitAuthError,
|
|
17
17
|
GitUpstreamError,
|
|
18
|
+
ImageConfigError,
|
|
18
19
|
InvalidArgumentError,
|
|
19
20
|
LogEntry,
|
|
20
21
|
LogEntryEnd,
|
|
@@ -48,7 +49,7 @@ import {
|
|
|
48
49
|
waitForProcess,
|
|
49
50
|
waitForTimeout,
|
|
50
51
|
waitForURL
|
|
51
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-RWHOETVW.mjs";
|
|
52
53
|
export {
|
|
53
54
|
ALL_TRAFFIC,
|
|
54
55
|
ApiClient,
|
|
@@ -63,6 +64,7 @@ export {
|
|
|
63
64
|
Git,
|
|
64
65
|
GitAuthError,
|
|
65
66
|
GitUpstreamError,
|
|
67
|
+
ImageConfigError,
|
|
66
68
|
InvalidArgumentError,
|
|
67
69
|
LogEntry,
|
|
68
70
|
LogEntryEnd,
|
|
@@ -69,6 +69,58 @@ interface paths {
|
|
|
69
69
|
patch?: never;
|
|
70
70
|
trace?: never;
|
|
71
71
|
};
|
|
72
|
+
"/sandboxes/{sandboxID}/resize": {
|
|
73
|
+
parameters: {
|
|
74
|
+
query?: never;
|
|
75
|
+
header?: never;
|
|
76
|
+
path?: never;
|
|
77
|
+
cookie?: never;
|
|
78
|
+
};
|
|
79
|
+
get?: never;
|
|
80
|
+
put?: never;
|
|
81
|
+
post: {
|
|
82
|
+
parameters: {
|
|
83
|
+
query?: never;
|
|
84
|
+
header?: never;
|
|
85
|
+
path: {
|
|
86
|
+
sandboxID: components["parameters"]["sandboxID"];
|
|
87
|
+
};
|
|
88
|
+
cookie?: never;
|
|
89
|
+
};
|
|
90
|
+
requestBody: {
|
|
91
|
+
content: {
|
|
92
|
+
"application/json": components["schemas"]["SandboxResourceTargets"];
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
responses: {
|
|
96
|
+
200: {
|
|
97
|
+
headers: {
|
|
98
|
+
[name: string]: unknown;
|
|
99
|
+
};
|
|
100
|
+
content: {
|
|
101
|
+
"application/json": components["schemas"]["SandboxResizeResponse"];
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
207: {
|
|
105
|
+
headers: {
|
|
106
|
+
[name: string]: unknown;
|
|
107
|
+
};
|
|
108
|
+
content: {
|
|
109
|
+
"application/json": components["schemas"]["SandboxResizeResponse"];
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
400: components["responses"]["400"];
|
|
113
|
+
403: components["responses"]["403"];
|
|
114
|
+
404: components["responses"]["404"];
|
|
115
|
+
409: components["responses"]["409"];
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
delete?: never;
|
|
119
|
+
options?: never;
|
|
120
|
+
head?: never;
|
|
121
|
+
patch?: never;
|
|
122
|
+
trace?: never;
|
|
123
|
+
};
|
|
72
124
|
"/sandboxes/{sandboxID}": {
|
|
73
125
|
parameters: {
|
|
74
126
|
query?: never;
|
|
@@ -1170,6 +1222,60 @@ interface paths {
|
|
|
1170
1222
|
patch?: never;
|
|
1171
1223
|
trace?: never;
|
|
1172
1224
|
};
|
|
1225
|
+
"/sandboxes/custom": {
|
|
1226
|
+
parameters: {
|
|
1227
|
+
query?: never;
|
|
1228
|
+
header?: never;
|
|
1229
|
+
path?: never;
|
|
1230
|
+
cookie?: never;
|
|
1231
|
+
};
|
|
1232
|
+
get?: never;
|
|
1233
|
+
put?: never;
|
|
1234
|
+
post: {
|
|
1235
|
+
parameters: {
|
|
1236
|
+
query?: never;
|
|
1237
|
+
header?: never;
|
|
1238
|
+
path?: never;
|
|
1239
|
+
cookie?: never;
|
|
1240
|
+
};
|
|
1241
|
+
requestBody: {
|
|
1242
|
+
content: {
|
|
1243
|
+
"application/json": components["schemas"]["CustomSandbox"];
|
|
1244
|
+
};
|
|
1245
|
+
};
|
|
1246
|
+
responses: {
|
|
1247
|
+
201: {
|
|
1248
|
+
headers: {
|
|
1249
|
+
[name: string]: unknown;
|
|
1250
|
+
};
|
|
1251
|
+
content: {
|
|
1252
|
+
"application/json": components["schemas"]["CustomSandboxResponse"];
|
|
1253
|
+
};
|
|
1254
|
+
};
|
|
1255
|
+
400: components["responses"]["400"];
|
|
1256
|
+
401: components["responses"]["401"];
|
|
1257
|
+
403: components["responses"]["403"];
|
|
1258
|
+
412: {
|
|
1259
|
+
headers: {
|
|
1260
|
+
[name: string]: unknown;
|
|
1261
|
+
};
|
|
1262
|
+
content?: never;
|
|
1263
|
+
};
|
|
1264
|
+
429: {
|
|
1265
|
+
headers: {
|
|
1266
|
+
[name: string]: unknown;
|
|
1267
|
+
};
|
|
1268
|
+
content?: never;
|
|
1269
|
+
};
|
|
1270
|
+
500: components["responses"]["500"];
|
|
1271
|
+
};
|
|
1272
|
+
};
|
|
1273
|
+
delete?: never;
|
|
1274
|
+
options?: never;
|
|
1275
|
+
head?: never;
|
|
1276
|
+
patch?: never;
|
|
1277
|
+
trace?: never;
|
|
1278
|
+
};
|
|
1173
1279
|
"/v2/sandboxes": {
|
|
1174
1280
|
parameters: {
|
|
1175
1281
|
query?: never;
|
|
@@ -1581,6 +1687,9 @@ interface components {
|
|
|
1581
1687
|
step?: string;
|
|
1582
1688
|
};
|
|
1583
1689
|
ConnectSandbox: {
|
|
1690
|
+
allowPublicTraffic?: boolean;
|
|
1691
|
+
network?: components["schemas"]["SandboxNetworkConfig"];
|
|
1692
|
+
secure?: boolean;
|
|
1584
1693
|
timeout: number;
|
|
1585
1694
|
};
|
|
1586
1695
|
CPUCount: number;
|
|
@@ -1751,6 +1860,36 @@ interface components {
|
|
|
1751
1860
|
enabled: components["schemas"]["SandboxAutoResumeEnabled"];
|
|
1752
1861
|
};
|
|
1753
1862
|
SandboxAutoResumeEnabled: boolean;
|
|
1863
|
+
SandboxResourceTargets: {
|
|
1864
|
+
vcpu?: number;
|
|
1865
|
+
memory_mb?: number;
|
|
1866
|
+
disk_size_mb?: number;
|
|
1867
|
+
};
|
|
1868
|
+
SandboxResources: {
|
|
1869
|
+
vcpu: number;
|
|
1870
|
+
memory_mb: number;
|
|
1871
|
+
disk_size_mb: number;
|
|
1872
|
+
};
|
|
1873
|
+
SandboxResizeItem: {
|
|
1874
|
+
status: "applied" | "skipped" | "failed" | "unknown";
|
|
1875
|
+
requested: number;
|
|
1876
|
+
previous: number;
|
|
1877
|
+
current: number;
|
|
1878
|
+
code: number;
|
|
1879
|
+
reason?: string;
|
|
1880
|
+
message?: string;
|
|
1881
|
+
};
|
|
1882
|
+
SandboxResizeResponse: {
|
|
1883
|
+
cpu?: components["schemas"]["SandboxResizeItem"];
|
|
1884
|
+
memory?: components["schemas"]["SandboxResizeItem"];
|
|
1885
|
+
disk?: components["schemas"]["SandboxResizeItem"];
|
|
1886
|
+
};
|
|
1887
|
+
CustomSandbox: components["schemas"]["NewSandbox"] & {
|
|
1888
|
+
resources: components["schemas"]["SandboxResourceTargets"];
|
|
1889
|
+
};
|
|
1890
|
+
CustomSandboxResponse: components["schemas"]["Sandbox"] & {
|
|
1891
|
+
resources: components["schemas"]["SandboxResources"];
|
|
1892
|
+
};
|
|
1754
1893
|
SandboxDetail: {
|
|
1755
1894
|
alias?: string;
|
|
1756
1895
|
allowInternetAccess?: boolean | null;
|
|
@@ -1819,7 +1958,7 @@ interface components {
|
|
|
1819
1958
|
maskRequestHost?: string;
|
|
1820
1959
|
};
|
|
1821
1960
|
SandboxOnTimeout: "kill" | "pause";
|
|
1822
|
-
SandboxState: "running" | "paused";
|
|
1961
|
+
SandboxState: "running" | "paused" | "cloning" | "commiting" | "snapshotting";
|
|
1823
1962
|
SandboxVolumeMount: {
|
|
1824
1963
|
name: string;
|
|
1825
1964
|
path: string;
|
|
@@ -2127,6 +2266,41 @@ declare class ApiClient {
|
|
|
2127
2266
|
});
|
|
2128
2267
|
}
|
|
2129
2268
|
|
|
2269
|
+
declare function unsupportedBase(blob: {
|
|
2270
|
+
history?: {
|
|
2271
|
+
created_by?: string;
|
|
2272
|
+
}[];
|
|
2273
|
+
config?: {
|
|
2274
|
+
Labels?: Record<string, string>;
|
|
2275
|
+
Env?: string[];
|
|
2276
|
+
};
|
|
2277
|
+
}): string | null;
|
|
2278
|
+
type ImageConfig = {
|
|
2279
|
+
env: Record<string, string>;
|
|
2280
|
+
workdir: string | null;
|
|
2281
|
+
entrypoint: string[];
|
|
2282
|
+
cmd: string[];
|
|
2283
|
+
error?: string;
|
|
2284
|
+
unsupportedBase?: string;
|
|
2285
|
+
unusable?: string;
|
|
2286
|
+
};
|
|
2287
|
+
type RegistryCredentials = {
|
|
2288
|
+
username: string;
|
|
2289
|
+
password: string;
|
|
2290
|
+
};
|
|
2291
|
+
type RegistryDispatcher = unknown;
|
|
2292
|
+
type ImageConfigFailureMode = 'warn' | 'raise' | 'ignore';
|
|
2293
|
+
declare function parseImageRef(image: string): {
|
|
2294
|
+
host: string;
|
|
2295
|
+
repository: string;
|
|
2296
|
+
reference: string;
|
|
2297
|
+
};
|
|
2298
|
+
declare function fetchImageConfig(image: string, credentials?: RegistryCredentials, options?: {
|
|
2299
|
+
dispatcher?: RegistryDispatcher;
|
|
2300
|
+
}): Promise<ImageConfig>;
|
|
2301
|
+
declare function effectiveStartCmd(entrypoint: string[], cmd: string[]): string | null;
|
|
2302
|
+
declare function clearImageConfigCache(): void;
|
|
2303
|
+
|
|
2130
2304
|
declare class ReadyCmd {
|
|
2131
2305
|
private cmd;
|
|
2132
2306
|
constructor(cmd: string);
|
|
@@ -4089,6 +4263,8 @@ interface TemplateFromImage {
|
|
|
4089
4263
|
password: string;
|
|
4090
4264
|
}, options?: {
|
|
4091
4265
|
inheritConfig?: boolean;
|
|
4266
|
+
onConfigFailure?: ImageConfigFailureMode;
|
|
4267
|
+
dispatcher?: RegistryDispatcher;
|
|
4092
4268
|
}): TemplateBuilder;
|
|
4093
4269
|
fromTemplate(template: string): TemplateBuilder;
|
|
4094
4270
|
fromDockerfile(dockerfileContentOrPath: string): TemplateBuilder;
|
|
@@ -4171,7 +4347,9 @@ interface TemplateBuilder {
|
|
|
4171
4347
|
depth?: number;
|
|
4172
4348
|
user?: string;
|
|
4173
4349
|
}): TemplateBuilder;
|
|
4174
|
-
setEnvs(envs: Record<string, string
|
|
4350
|
+
setEnvs(envs: Record<string, string>, options?: {
|
|
4351
|
+
runtime?: boolean;
|
|
4352
|
+
}): TemplateBuilder;
|
|
4175
4353
|
skipCache(): this;
|
|
4176
4354
|
setStartCmd(startCommand: string, readyCommand: string | ReadyCmd): TemplateFinal;
|
|
4177
4355
|
setReadyCmd(readyCommand: string | ReadyCmd): TemplateFinal;
|
|
@@ -4210,10 +4388,17 @@ declare class TemplateBase implements TemplateFromImage, TemplateBuilder, Templa
|
|
|
4210
4388
|
private forceNextLayer;
|
|
4211
4389
|
private instructions;
|
|
4212
4390
|
private envs;
|
|
4391
|
+
private envDeclarations;
|
|
4392
|
+
private imageEnvs;
|
|
4393
|
+
private imageWorkdir?;
|
|
4394
|
+
private imageStartCmd?;
|
|
4395
|
+
private imageReadyCmd?;
|
|
4213
4396
|
private inheritImageConfig;
|
|
4214
4397
|
private imageCredentials;
|
|
4215
4398
|
private imageConfigError;
|
|
4216
4399
|
private imageUnusable;
|
|
4400
|
+
private imageOnConfigFailure;
|
|
4401
|
+
private imageDispatcher;
|
|
4217
4402
|
private fileContextPath;
|
|
4218
4403
|
private fileIgnorePatterns;
|
|
4219
4404
|
private logsRefreshFrequency;
|
|
@@ -4249,6 +4434,8 @@ declare class TemplateBase implements TemplateFromImage, TemplateBuilder, Templa
|
|
|
4249
4434
|
password: string;
|
|
4250
4435
|
}, options?: {
|
|
4251
4436
|
inheritConfig?: boolean;
|
|
4437
|
+
onConfigFailure?: ImageConfigFailureMode;
|
|
4438
|
+
dispatcher?: RegistryDispatcher;
|
|
4252
4439
|
}): TemplateBuilder;
|
|
4253
4440
|
fromTemplate(template: string): TemplateBuilder;
|
|
4254
4441
|
fromDockerfile(dockerfileContentOrPath: string): TemplateBuilder;
|
|
@@ -4328,9 +4515,13 @@ declare class TemplateBase implements TemplateFromImage, TemplateBuilder, Templa
|
|
|
4328
4515
|
setStartCmd(startCommand: string, readyCommand: string | ReadyCmd): TemplateFinal;
|
|
4329
4516
|
setReadyCmd(readyCommand: string | ReadyCmd): TemplateFinal;
|
|
4330
4517
|
setPatchCmd(cmd: string): TemplateBuilder;
|
|
4331
|
-
setEnvs(envs: Record<string, string
|
|
4518
|
+
setEnvs(envs: Record<string, string>, options?: {
|
|
4519
|
+
runtime?: boolean;
|
|
4520
|
+
}): TemplateBuilder;
|
|
4332
4521
|
private runtimeEnvInstruction;
|
|
4333
4522
|
private withRuntimeEnv;
|
|
4523
|
+
private configFailureMessage;
|
|
4524
|
+
private resetInheritedConfig;
|
|
4334
4525
|
private resolveInheritedConfig;
|
|
4335
4526
|
static imageConfigFailure(template: TemplateClass): {
|
|
4336
4527
|
error: string;
|
|
@@ -4365,6 +4556,7 @@ declare namespace Template {
|
|
|
4365
4556
|
var _a: typeof TemplateBase.delete;
|
|
4366
4557
|
export var toJSON: typeof TemplateBase.toJSON;
|
|
4367
4558
|
export var toDockerfile: typeof TemplateBase.toDockerfile;
|
|
4559
|
+
export var imageConfigFailure: typeof TemplateBase.imageConfigFailure;
|
|
4368
4560
|
export { _a as delete };
|
|
4369
4561
|
}
|
|
4370
4562
|
|
|
@@ -4420,9 +4612,30 @@ type SandboxInfoLifecycle = {
|
|
|
4420
4612
|
onTimeout: 'pause' | 'kill';
|
|
4421
4613
|
autoResume: boolean;
|
|
4422
4614
|
};
|
|
4423
|
-
interface SandboxApiOpts extends Partial<Pick<ConnectionOpts, 'apiKey' | 'headers' | 'debug' | 'domain' | 'requestTimeoutMs' | 'sync'>> {
|
|
4615
|
+
interface SandboxApiOpts extends Partial<Pick<ConnectionOpts, 'apiKey' | 'accessToken' | 'headers' | 'debug' | 'domain' | 'apiUrl' | 'logger' | 'requestTimeoutMs' | 'sync'>> {
|
|
4424
4616
|
}
|
|
4617
|
+
type Resources = {
|
|
4618
|
+
cpu?: number;
|
|
4619
|
+
memoryGiB?: number;
|
|
4620
|
+
diskGiB?: number;
|
|
4621
|
+
};
|
|
4622
|
+
type ResizeItem = {
|
|
4623
|
+
status: 'applied' | 'skipped' | 'failed' | 'unknown';
|
|
4624
|
+
requested: number;
|
|
4625
|
+
previous: number;
|
|
4626
|
+
current: number;
|
|
4627
|
+
code: number;
|
|
4628
|
+
unit: 'cores' | 'GiB';
|
|
4629
|
+
reason?: string;
|
|
4630
|
+
message?: string;
|
|
4631
|
+
};
|
|
4632
|
+
type ResizeResult = {
|
|
4633
|
+
cpu?: ResizeItem;
|
|
4634
|
+
memory?: ResizeItem;
|
|
4635
|
+
disk?: ResizeItem;
|
|
4636
|
+
};
|
|
4425
4637
|
interface SandboxOpts$1 extends ConnectionOpts {
|
|
4638
|
+
resources?: Resources;
|
|
4426
4639
|
template?: string;
|
|
4427
4640
|
metadata?: Record<string, string>;
|
|
4428
4641
|
envs?: Record<string, string>;
|
|
@@ -4433,20 +4646,19 @@ interface SandboxOpts$1 extends ConnectionOpts {
|
|
|
4433
4646
|
network?: SandboxNetworkOpts;
|
|
4434
4647
|
volumeMounts?: Record<string, Volume | string>;
|
|
4435
4648
|
sandboxUrl?: string;
|
|
4649
|
+
autoPause?: boolean;
|
|
4436
4650
|
lifecycle?: SandboxLifecycle;
|
|
4437
4651
|
secretEnvs?: Record<string, string>;
|
|
4438
4652
|
nodeId?: string;
|
|
4439
4653
|
}
|
|
4440
|
-
type SandboxBetaCreateOpts = SandboxOpts$1
|
|
4441
|
-
autoPause?: boolean;
|
|
4442
|
-
};
|
|
4654
|
+
type SandboxBetaCreateOpts = SandboxOpts$1;
|
|
4443
4655
|
type SandboxConnectOpts = ConnectionOpts & {
|
|
4444
4656
|
timeoutMs?: number;
|
|
4445
4657
|
secure?: boolean;
|
|
4446
4658
|
allowPublicTraffic?: boolean;
|
|
4447
4659
|
network?: SandboxNetworkOpts;
|
|
4448
4660
|
};
|
|
4449
|
-
type SandboxState = 'running' | 'paused';
|
|
4661
|
+
type SandboxState = 'running' | 'paused' | 'cloning' | 'commiting' | 'snapshotting';
|
|
4450
4662
|
interface SandboxListOpts extends SandboxApiOpts {
|
|
4451
4663
|
query?: {
|
|
4452
4664
|
metadata?: Record<string, string>;
|
|
@@ -4509,6 +4721,7 @@ interface SandboxInfo {
|
|
|
4509
4721
|
state: SandboxState;
|
|
4510
4722
|
cpuCount: number;
|
|
4511
4723
|
memoryMB: number;
|
|
4724
|
+
diskSizeMB?: number;
|
|
4512
4725
|
envdVersion?: string;
|
|
4513
4726
|
allowInternetAccess?: boolean | undefined;
|
|
4514
4727
|
network?: SandboxNetworkOpts;
|
|
@@ -4534,7 +4747,7 @@ declare class SandboxApi {
|
|
|
4534
4747
|
static getMetrics(sandboxId: string, opts?: SandboxMetricsOpts): Promise<SandboxMetrics[]>;
|
|
4535
4748
|
static setTimeout(sandboxId: string, timeoutMs: number, opts?: SandboxApiOpts): Promise<void>;
|
|
4536
4749
|
static commit(sandboxId: string, opts?: SandboxCommitOpts): Promise<SandboxCommitResult>;
|
|
4537
|
-
static
|
|
4750
|
+
static resize(sandboxId: string, resources: Resources, opts?: SandboxApiOpts): Promise<ResizeResult>;
|
|
4538
4751
|
static reset(sandboxId: string, opts?: SandboxResetOpts): Promise<boolean>;
|
|
4539
4752
|
static mountVolume(sandboxId: string, name: string, path: string, opts?: SandboxApiOpts): Promise<SandboxInfo>;
|
|
4540
4753
|
static unmountVolume(sandboxId: string, path: string, opts?: SandboxApiOpts & {
|
|
@@ -4556,26 +4769,14 @@ declare class SandboxApi {
|
|
|
4556
4769
|
sandboxDomain: any;
|
|
4557
4770
|
envdVersion: any;
|
|
4558
4771
|
envdAccessToken: any;
|
|
4559
|
-
trafficAccessToken:
|
|
4560
|
-
} | {
|
|
4561
|
-
sandboxId: string;
|
|
4562
|
-
sandboxDomain: string | undefined;
|
|
4563
|
-
envdVersion: string;
|
|
4564
|
-
envdAccessToken: string | undefined;
|
|
4565
|
-
trafficAccessToken: string | undefined;
|
|
4772
|
+
trafficAccessToken: any;
|
|
4566
4773
|
}>;
|
|
4567
4774
|
protected static connectSandbox(sandboxId: string, opts?: SandboxConnectOpts): Promise<{
|
|
4568
4775
|
sandboxId: any;
|
|
4569
4776
|
sandboxDomain: any;
|
|
4570
4777
|
envdVersion: any;
|
|
4571
4778
|
envdAccessToken: any;
|
|
4572
|
-
trafficAccessToken:
|
|
4573
|
-
} | {
|
|
4574
|
-
sandboxId: string;
|
|
4575
|
-
sandboxDomain: string | undefined;
|
|
4576
|
-
envdVersion: string;
|
|
4577
|
-
envdAccessToken: string | undefined;
|
|
4578
|
-
trafficAccessToken: string | undefined;
|
|
4779
|
+
trafficAccessToken: any;
|
|
4579
4780
|
}>;
|
|
4580
4781
|
static getQuota(opts?: SandboxQuotaOpts): Promise<SandboxQuota>;
|
|
4581
4782
|
static getEvents(opts?: SandboxEventsOpts): Promise<SandboxEventsResult>;
|
|
@@ -4904,6 +5105,8 @@ declare class BuildError extends Error {
|
|
|
4904
5105
|
declare class FileUploadError extends BuildError {
|
|
4905
5106
|
constructor(message: string, stackTrace?: string);
|
|
4906
5107
|
}
|
|
5108
|
+
declare class ImageConfigError extends BuildError {
|
|
5109
|
+
}
|
|
4907
5110
|
declare class VolumeError extends Error {
|
|
4908
5111
|
constructor(message: string);
|
|
4909
5112
|
}
|
|
@@ -5117,7 +5320,7 @@ declare enum FileType {
|
|
|
5117
5320
|
}
|
|
5118
5321
|
type WriteEntry = {
|
|
5119
5322
|
path: string;
|
|
5120
|
-
data: string | ArrayBuffer | Blob | ReadableStream;
|
|
5323
|
+
data: string | ArrayBuffer | Uint8Array | Blob | ReadableStream;
|
|
5121
5324
|
};
|
|
5122
5325
|
interface FilesystemRequestOpts extends Partial<Pick<ConnectionOpts, 'requestTimeoutMs'>> {
|
|
5123
5326
|
user?: Username;
|
|
@@ -5155,7 +5358,10 @@ declare class Filesystem {
|
|
|
5155
5358
|
read(path: string, opts?: FilesystemReadOpts & {
|
|
5156
5359
|
format: 'stream';
|
|
5157
5360
|
}): Promise<ReadableStream<Uint8Array>>;
|
|
5158
|
-
|
|
5361
|
+
read(path: string, opts?: FilesystemReadOpts & {
|
|
5362
|
+
format?: 'text' | 'bytes' | 'blob' | 'stream';
|
|
5363
|
+
}): Promise<string | Uint8Array | Blob | ReadableStream<Uint8Array>>;
|
|
5364
|
+
write(path: string, data: string | ArrayBuffer | Uint8Array | Blob | ReadableStream, opts?: FilesystemWriteOpts): Promise<WriteInfo>;
|
|
5159
5365
|
write(files: WriteEntry[], opts?: FilesystemWriteOpts): Promise<WriteInfo[]>;
|
|
5160
5366
|
writeFiles(files: WriteEntry[], opts?: FilesystemWriteOpts): Promise<WriteInfo[]>;
|
|
5161
5367
|
list(path: string, opts?: FilesystemListOpts): Promise<EntryInfo[]>;
|
|
@@ -5330,7 +5536,7 @@ declare class Sandbox$2 extends SandboxApi {
|
|
|
5330
5536
|
static create<S extends typeof Sandbox$2>(this: S, opts?: SandboxOpts$1): Promise<InstanceType<S>>;
|
|
5331
5537
|
static create<S extends typeof Sandbox$2>(this: S, template: string, opts?: SandboxOpts$1): Promise<InstanceType<S>>;
|
|
5332
5538
|
static clone<S extends typeof Sandbox$2>(this: S, sandboxId: string, opts?: SandboxCloneOpts): Promise<SandboxCloneResult<InstanceType<S>>>;
|
|
5333
|
-
static
|
|
5539
|
+
static resize(sandboxId: string, resources: Resources, opts?: SandboxApiOpts): Promise<ResizeResult>;
|
|
5334
5540
|
static mountVolume(sandboxId: string, name: string, path: string, opts?: SandboxApiOpts): Promise<SandboxInfo>;
|
|
5335
5541
|
static unmountVolume(sandboxId: string, path: string, opts?: SandboxApiOpts & {
|
|
5336
5542
|
force?: boolean;
|
|
@@ -5352,8 +5558,8 @@ declare class Sandbox$2 extends SandboxApi {
|
|
|
5352
5558
|
unmountVolume(path: string, opts?: SandboxApiOpts & {
|
|
5353
5559
|
force?: boolean;
|
|
5354
5560
|
}): Promise<SandboxInfo>;
|
|
5355
|
-
kill(opts?:
|
|
5356
|
-
|
|
5561
|
+
kill(opts?: SandboxApiOpts): Promise<void>;
|
|
5562
|
+
resize(resources: Resources, opts?: SandboxApiOpts): Promise<ResizeResult>;
|
|
5357
5563
|
pause(opts?: ConnectionOpts): Promise<boolean>;
|
|
5358
5564
|
betaPause(opts?: ConnectionOpts): Promise<boolean>;
|
|
5359
5565
|
createSnapshot(opts?: SandboxApiOpts): Promise<SnapshotInfo>;
|
|
@@ -5362,7 +5568,7 @@ declare class Sandbox$2 extends SandboxApi {
|
|
|
5362
5568
|
getMcpToken(): Promise<string | undefined>;
|
|
5363
5569
|
uploadUrl(path?: string, opts?: SandboxUrlOpts): Promise<string>;
|
|
5364
5570
|
downloadUrl(path: string, opts?: SandboxUrlOpts): Promise<string>;
|
|
5365
|
-
getInfo(opts?:
|
|
5571
|
+
getInfo(opts?: SandboxApiOpts): Promise<SandboxInfo>;
|
|
5366
5572
|
getMetrics(opts?: SandboxMetricsOpts): Promise<SandboxMetrics[]>;
|
|
5367
5573
|
private resolveApiOpts;
|
|
5368
5574
|
private fileUrl;
|
|
@@ -5598,6 +5804,7 @@ declare class Sandbox extends Sandbox$2 {
|
|
|
5598
5804
|
screenshot(format: 'bytes'): Promise<Uint8Array>;
|
|
5599
5805
|
screenshot(format: 'blob'): Promise<Blob>;
|
|
5600
5806
|
screenshot(format: 'stream'): Promise<ReadableStream<Uint8Array>>;
|
|
5807
|
+
screenshot(format?: 'bytes' | 'blob' | 'stream'): Promise<Uint8Array | Blob | ReadableStream<Uint8Array>>;
|
|
5601
5808
|
leftClick(x?: number, y?: number): Promise<void>;
|
|
5602
5809
|
doubleClick(x?: number, y?: number): Promise<void>;
|
|
5603
5810
|
rightClick(x?: number, y?: number): Promise<void>;
|
|
@@ -5718,6 +5925,7 @@ declare class RuntimeSandboxNamespace<TSandbox, TCreateOpts extends ConnectionOp
|
|
|
5718
5925
|
getInfo(sandboxId: string, opts?: SandboxApiOpts): Promise<SandboxInfo>;
|
|
5719
5926
|
getMetrics(sandboxId: string, opts?: SandboxMetricsOpts): Promise<SandboxMetrics[]>;
|
|
5720
5927
|
getQuota(opts?: SandboxQuotaOpts): Promise<SandboxQuota>;
|
|
5928
|
+
resize(sandboxId: string, resources: Resources, opts?: SandboxApiOpts): Promise<ResizeResult>;
|
|
5721
5929
|
getEvents(opts?: SandboxEventsOpts): Promise<SandboxEventsResult>;
|
|
5722
5930
|
}
|
|
5723
5931
|
declare class SandboxNamespace {
|
|
@@ -5744,6 +5952,7 @@ declare class SandboxNamespace {
|
|
|
5744
5952
|
listSnapshots(opts?: SnapshotListOpts): SnapshotPaginator;
|
|
5745
5953
|
deleteSnapshot(snapshotId: string, opts?: SandboxApiOpts): Promise<boolean>;
|
|
5746
5954
|
getQuota(opts?: SandboxQuotaOpts): Promise<SandboxQuota>;
|
|
5955
|
+
resize(sandboxId: string, resources: Resources, opts?: SandboxApiOpts): Promise<ResizeResult>;
|
|
5747
5956
|
getEvents(opts?: SandboxEventsOpts): Promise<SandboxEventsResult>;
|
|
5748
5957
|
}
|
|
5749
5958
|
declare class TemplateNamespace {
|
|
@@ -5828,35 +6037,4 @@ declare function getSignature({ path, operation, user, expirationInSeconds, envd
|
|
|
5828
6037
|
|
|
5829
6038
|
declare const ALL_TRAFFIC = "0.0.0.0/0";
|
|
5830
6039
|
|
|
5831
|
-
|
|
5832
|
-
history?: {
|
|
5833
|
-
created_by?: string;
|
|
5834
|
-
}[];
|
|
5835
|
-
config?: {
|
|
5836
|
-
Labels?: Record<string, string>;
|
|
5837
|
-
Env?: string[];
|
|
5838
|
-
};
|
|
5839
|
-
}): string | null;
|
|
5840
|
-
type ImageConfig = {
|
|
5841
|
-
env: Record<string, string>;
|
|
5842
|
-
workdir: string | null;
|
|
5843
|
-
entrypoint: string[];
|
|
5844
|
-
cmd: string[];
|
|
5845
|
-
error?: string;
|
|
5846
|
-
unsupportedBase?: string;
|
|
5847
|
-
unusable?: string;
|
|
5848
|
-
};
|
|
5849
|
-
type RegistryCredentials = {
|
|
5850
|
-
username: string;
|
|
5851
|
-
password: string;
|
|
5852
|
-
};
|
|
5853
|
-
declare function parseImageRef(image: string): {
|
|
5854
|
-
host: string;
|
|
5855
|
-
repository: string;
|
|
5856
|
-
reference: string;
|
|
5857
|
-
};
|
|
5858
|
-
declare function fetchImageConfig(image: string, credentials?: RegistryCredentials): Promise<ImageConfig>;
|
|
5859
|
-
declare function effectiveStartCmd(entrypoint: string[], cmd: string[]): string | null;
|
|
5860
|
-
declare function clearImageConfigCache(): void;
|
|
5861
|
-
|
|
5862
|
-
export { type SandboxState as $, ApiClient as A, BuildError as B, ConnectionConfig as C, type SandboxMetrics as D, type EntryInfo as E, FileNotFoundError as F, GitAuthError as G, type SandboxOpts$1 as H, InvalidArgumentError as I, type SandboxApiOpts as J, type SandboxConnectOpts as K, type Logger as L, type SandboxBetaCreateOpts as M, NotEnoughSpaceError as N, type SandboxMetricsOpts as O, PPIO as P, type SandboxCloneOpts as Q, RateLimitError as R, Sandbox$2 as S, TemplateError as T, type Username as U, VolumeError as V, type WriteInfo as W, type SandboxCloneResult as X, type SandboxCommitOpts as Y, type SandboxCommitResult as Z, type SandboxResetOpts as _, type ConnectionOpts as a, unsupportedBase as a$, type SandboxListOpts as a0, SandboxPaginator as a1, type SandboxNetworkOpts as a2, type SandboxNetworkUpdateOpts as a3, type SandboxLifecycle as a4, type SandboxInfoLifecycle as a5, type SnapshotInfo as a6, type SnapshotListOpts as a7, SnapshotPaginator as a8, type SandboxQuota as a9, type GitConfigScope as aA, type GitBranches as aB, type GitFileStatus as aC, type GitStatus as aD, Volume as aE, type VolumeInfo as aF, type VolumeAndToken as aG, Secret as aH, type SecretBinding as aI, type SecretWriteParams as aJ, ReadyCmd as aK, waitForPort as aL, waitForURL as aM, waitForProcess as aN, waitForFile as aO, waitForTimeout as aP, LogEntry as aQ, LogEntryStart as aR, LogEntryEnd as aS, type LogEntryLevel as aT, defaultBuildLogger as aU, type ImageConfig as aV, type RegistryCredentials as aW, clearImageConfigCache as aX, effectiveStartCmd as aY, fetchImageConfig as aZ, parseImageRef as a_, type SandboxQuotaLimit as aa, type SandboxQuotaUsage as ab, type SandboxQuotaOpts as ac, type SandboxEventItem as ad, type SandboxEventsOpts as ae, type SandboxEventsResult as af, type McpServer$1 as ag, ALL_TRAFFIC as ah, type ProcessInfo as ai, type CommandRequestOpts as aj, type CommandConnectOpts as ak, type CommandStartOpts as al, Commands as am, Pty as an, Git as ao, type GitRequestOpts as ap, type GitCloneOpts as aq, type GitInitOpts as ar, type GitRemoteAddOpts as as, type GitCommitOpts as at, type GitAddOpts as au, type GitDeleteBranchOpts as av, type GitPushOpts as aw, type GitPullOpts as ax, type GitDangerouslyAuthenticateOpts as ay, type GitConfigOpts as az, AuthenticationError as b, TemplateApi as b0, TemplatePaginator as b1, TemplateBase as b2, Template as b3, type BuildInfo as b4, type BuildOptions as b5, type BuildStatusReason as b6, type CopyItem as b7, type GetBuildStatusOptions as b8, type McpServerName as b9, type ChartTypes as bA, type Chart as bB, type BarChart as bC, type BarData as bD, type LineChart as bE, type ScatterChart as bF, type BoxAndWhiskerChart as bG, type BoxAndWhiskerData as bH, type PieChart as bI, type PieData as bJ, type SuperChart as bK, type PointData as bL, Sandbox as bM, type TemplateBuilder as ba, type TemplateBuildStatus as bb, type TemplateBuildStatusResponse as bc, type TemplateClass as bd, type TemplateDeleteOpts as be, type TemplateInfo as bf, type TemplateListOpts as bg, type TemplateListOptions as bh, type TemplateListResponse as bi, type TemplateTag as bj, type TemplateTagInfo as bk, type TemplateType as bl, Sandbox$1 as bm, type Context as bn, type RunCodeOpts as bo, type CreateCodeContextOpts as bp, type CodeContextRequestOpts as bq, type Logs as br, ExecutionError as bs, Result as bt, Execution as bu, type MIMEType as bv, type RawData as bw, OutputMessage as bx, ScaleType as by, ChartType as bz, type components as c, GitUpstreamError as d, NotFoundError as e, SandboxError as f, SandboxNotFoundError as g, TimeoutError as h, FileUploadError as i, SecretError as j, getSignature as k, FileType as l, Filesystem as m, type FilesystemWriteOpts as n, type FilesystemReadOpts as o, type paths as p, FilesystemEventType as q, type FilesystemEvent as r, WatchHandle as s, CommandExitError as t, type CommandResult as u, type Stdout as v, type Stderr as w, type PtyOutput as x, CommandHandle as y, type SandboxInfo as z };
|
|
6040
|
+
export { type SandboxCommitOpts as $, ApiClient as A, BuildError as B, ConnectionConfig as C, type SandboxInfo as D, type EntryInfo as E, FileNotFoundError as F, GitAuthError as G, type Resources as H, InvalidArgumentError as I, type ResizeResult as J, type SandboxMetrics as K, type Logger as L, type SandboxOpts$1 as M, NotEnoughSpaceError as N, type SandboxApiOpts as O, PPIO as P, type SandboxConnectOpts as Q, RateLimitError as R, Sandbox$2 as S, TemplateError as T, type Username as U, VolumeError as V, type WriteInfo as W, type SandboxBetaCreateOpts as X, type SandboxMetricsOpts as Y, type SandboxCloneOpts as Z, type SandboxCloneResult as _, type ConnectionOpts as a, effectiveStartCmd as a$, type SandboxCommitResult as a0, type SandboxResetOpts as a1, type SandboxState as a2, type SandboxListOpts as a3, SandboxPaginator as a4, type SandboxNetworkOpts as a5, type SandboxNetworkUpdateOpts as a6, type SandboxLifecycle as a7, type SandboxInfoLifecycle as a8, type SnapshotInfo as a9, type GitPullOpts as aA, type GitDangerouslyAuthenticateOpts as aB, type GitConfigOpts as aC, type GitConfigScope as aD, type GitBranches as aE, type GitFileStatus as aF, type GitStatus as aG, Volume as aH, type VolumeInfo as aI, type VolumeAndToken as aJ, Secret as aK, type SecretBinding as aL, type SecretWriteParams as aM, ReadyCmd as aN, waitForPort as aO, waitForURL as aP, waitForProcess as aQ, waitForFile as aR, waitForTimeout as aS, LogEntry as aT, LogEntryStart as aU, LogEntryEnd as aV, type LogEntryLevel as aW, defaultBuildLogger as aX, type ImageConfig as aY, type RegistryCredentials as aZ, clearImageConfigCache as a_, type SnapshotListOpts as aa, SnapshotPaginator as ab, type SandboxQuota as ac, type SandboxQuotaLimit as ad, type SandboxQuotaUsage as ae, type SandboxQuotaOpts as af, type SandboxEventItem as ag, type SandboxEventsOpts as ah, type SandboxEventsResult as ai, type McpServer$1 as aj, ALL_TRAFFIC as ak, type ProcessInfo as al, type CommandRequestOpts as am, type CommandConnectOpts as an, type CommandStartOpts as ao, Commands as ap, Pty as aq, Git as ar, type GitRequestOpts as as, type GitCloneOpts as at, type GitInitOpts as au, type GitRemoteAddOpts as av, type GitCommitOpts as aw, type GitAddOpts as ax, type GitDeleteBranchOpts as ay, type GitPushOpts as az, AuthenticationError as b, fetchImageConfig as b0, parseImageRef as b1, unsupportedBase as b2, TemplateApi as b3, TemplatePaginator as b4, TemplateBase as b5, Template as b6, type BuildInfo as b7, type BuildOptions as b8, type BuildStatusReason as b9, type MIMEType as bA, type RawData as bB, OutputMessage as bC, ScaleType as bD, ChartType as bE, type ChartTypes as bF, type Chart as bG, type BarChart as bH, type BarData as bI, type LineChart as bJ, type ScatterChart as bK, type BoxAndWhiskerChart as bL, type BoxAndWhiskerData as bM, type PieChart as bN, type PieData as bO, type SuperChart as bP, type PointData as bQ, Sandbox as bR, type SandboxOpts as bS, type CopyItem as ba, type GetBuildStatusOptions as bb, type McpServerName as bc, type TemplateBuilder as bd, type TemplateBuildStatus as be, type TemplateBuildStatusResponse as bf, type TemplateClass as bg, type TemplateDeleteOpts as bh, type TemplateInfo as bi, type TemplateListOpts as bj, type TemplateListOptions as bk, type TemplateListResponse as bl, type TemplateTag as bm, type TemplateTagInfo as bn, type TemplateType as bo, type ImageConfigFailureMode as bp, type RegistryDispatcher as bq, Sandbox$1 as br, type Context as bs, type RunCodeOpts as bt, type CreateCodeContextOpts as bu, type CodeContextRequestOpts as bv, type Logs as bw, ExecutionError as bx, Result as by, Execution as bz, type components as c, GitUpstreamError as d, NotFoundError as e, SandboxError as f, SandboxNotFoundError as g, TimeoutError as h, FileUploadError as i, ImageConfigError as j, SecretError as k, getSignature as l, FileType as m, Filesystem as n, type FilesystemWriteOpts as o, type paths as p, type FilesystemReadOpts as q, FilesystemEventType as r, type FilesystemEvent as s, WatchHandle as t, CommandExitError as u, type CommandResult as v, type Stdout as w, type Stderr as x, type PtyOutput as y, CommandHandle as z };
|