ppio-sandbox 2.1.1 → 2.1.2
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-3L3K3WO3.mjs} +2 -2
- package/dist/{chunk-RIWYGA3J.mjs → chunk-3OWF5GCM.mjs} +2 -2
- package/dist/chunk-3OWF5GCM.mjs.map +1 -0
- package/dist/{chunk-M7G3KDGF.mjs → chunk-PQGBLWKQ.mjs} +593 -283
- package/dist/chunk-PQGBLWKQ.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 +602 -290
- 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 +602 -290
- package/dist/desktop.js.map +1 -1
- package/dist/desktop.mjs +4 -2
- package/dist/{index-CRwaZUdl.d.mts → index-CAD08VLb.d.mts} +76 -58
- package/dist/{index-CRwaZUdl.d.ts → index-CAD08VLb.d.ts} +76 -58
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +602 -290
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/sandbox-DMY2YDSO.mjs +8 -0
- package/dist/sandbox-TS3DDCSN.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-3L3K3WO3.mjs.map} +0 -0
- /package/dist/{sandbox-5PUSVOHB.mjs.map → sandbox-DMY2YDSO.mjs.map} +0 -0
- /package/dist/{sandbox-VBQLLX3L.mjs.map → sandbox-TS3DDCSN.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-3OWF5GCM.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-PQGBLWKQ.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,
|
|
@@ -1581,6 +1581,9 @@ interface components {
|
|
|
1581
1581
|
step?: string;
|
|
1582
1582
|
};
|
|
1583
1583
|
ConnectSandbox: {
|
|
1584
|
+
allowPublicTraffic?: boolean;
|
|
1585
|
+
network?: components["schemas"]["SandboxNetworkConfig"];
|
|
1586
|
+
secure?: boolean;
|
|
1584
1587
|
timeout: number;
|
|
1585
1588
|
};
|
|
1586
1589
|
CPUCount: number;
|
|
@@ -1819,7 +1822,7 @@ interface components {
|
|
|
1819
1822
|
maskRequestHost?: string;
|
|
1820
1823
|
};
|
|
1821
1824
|
SandboxOnTimeout: "kill" | "pause";
|
|
1822
|
-
SandboxState: "running" | "paused";
|
|
1825
|
+
SandboxState: "running" | "paused" | "cloning" | "commiting" | "snapshotting";
|
|
1823
1826
|
SandboxVolumeMount: {
|
|
1824
1827
|
name: string;
|
|
1825
1828
|
path: string;
|
|
@@ -2127,6 +2130,41 @@ declare class ApiClient {
|
|
|
2127
2130
|
});
|
|
2128
2131
|
}
|
|
2129
2132
|
|
|
2133
|
+
declare function unsupportedBase(blob: {
|
|
2134
|
+
history?: {
|
|
2135
|
+
created_by?: string;
|
|
2136
|
+
}[];
|
|
2137
|
+
config?: {
|
|
2138
|
+
Labels?: Record<string, string>;
|
|
2139
|
+
Env?: string[];
|
|
2140
|
+
};
|
|
2141
|
+
}): string | null;
|
|
2142
|
+
type ImageConfig = {
|
|
2143
|
+
env: Record<string, string>;
|
|
2144
|
+
workdir: string | null;
|
|
2145
|
+
entrypoint: string[];
|
|
2146
|
+
cmd: string[];
|
|
2147
|
+
error?: string;
|
|
2148
|
+
unsupportedBase?: string;
|
|
2149
|
+
unusable?: string;
|
|
2150
|
+
};
|
|
2151
|
+
type RegistryCredentials = {
|
|
2152
|
+
username: string;
|
|
2153
|
+
password: string;
|
|
2154
|
+
};
|
|
2155
|
+
type RegistryDispatcher = unknown;
|
|
2156
|
+
type ImageConfigFailureMode = 'warn' | 'raise' | 'ignore';
|
|
2157
|
+
declare function parseImageRef(image: string): {
|
|
2158
|
+
host: string;
|
|
2159
|
+
repository: string;
|
|
2160
|
+
reference: string;
|
|
2161
|
+
};
|
|
2162
|
+
declare function fetchImageConfig(image: string, credentials?: RegistryCredentials, options?: {
|
|
2163
|
+
dispatcher?: RegistryDispatcher;
|
|
2164
|
+
}): Promise<ImageConfig>;
|
|
2165
|
+
declare function effectiveStartCmd(entrypoint: string[], cmd: string[]): string | null;
|
|
2166
|
+
declare function clearImageConfigCache(): void;
|
|
2167
|
+
|
|
2130
2168
|
declare class ReadyCmd {
|
|
2131
2169
|
private cmd;
|
|
2132
2170
|
constructor(cmd: string);
|
|
@@ -4089,6 +4127,8 @@ interface TemplateFromImage {
|
|
|
4089
4127
|
password: string;
|
|
4090
4128
|
}, options?: {
|
|
4091
4129
|
inheritConfig?: boolean;
|
|
4130
|
+
onConfigFailure?: ImageConfigFailureMode;
|
|
4131
|
+
dispatcher?: RegistryDispatcher;
|
|
4092
4132
|
}): TemplateBuilder;
|
|
4093
4133
|
fromTemplate(template: string): TemplateBuilder;
|
|
4094
4134
|
fromDockerfile(dockerfileContentOrPath: string): TemplateBuilder;
|
|
@@ -4171,7 +4211,9 @@ interface TemplateBuilder {
|
|
|
4171
4211
|
depth?: number;
|
|
4172
4212
|
user?: string;
|
|
4173
4213
|
}): TemplateBuilder;
|
|
4174
|
-
setEnvs(envs: Record<string, string
|
|
4214
|
+
setEnvs(envs: Record<string, string>, options?: {
|
|
4215
|
+
runtime?: boolean;
|
|
4216
|
+
}): TemplateBuilder;
|
|
4175
4217
|
skipCache(): this;
|
|
4176
4218
|
setStartCmd(startCommand: string, readyCommand: string | ReadyCmd): TemplateFinal;
|
|
4177
4219
|
setReadyCmd(readyCommand: string | ReadyCmd): TemplateFinal;
|
|
@@ -4210,10 +4252,17 @@ declare class TemplateBase implements TemplateFromImage, TemplateBuilder, Templa
|
|
|
4210
4252
|
private forceNextLayer;
|
|
4211
4253
|
private instructions;
|
|
4212
4254
|
private envs;
|
|
4255
|
+
private envDeclarations;
|
|
4256
|
+
private imageEnvs;
|
|
4257
|
+
private imageWorkdir?;
|
|
4258
|
+
private imageStartCmd?;
|
|
4259
|
+
private imageReadyCmd?;
|
|
4213
4260
|
private inheritImageConfig;
|
|
4214
4261
|
private imageCredentials;
|
|
4215
4262
|
private imageConfigError;
|
|
4216
4263
|
private imageUnusable;
|
|
4264
|
+
private imageOnConfigFailure;
|
|
4265
|
+
private imageDispatcher;
|
|
4217
4266
|
private fileContextPath;
|
|
4218
4267
|
private fileIgnorePatterns;
|
|
4219
4268
|
private logsRefreshFrequency;
|
|
@@ -4249,6 +4298,8 @@ declare class TemplateBase implements TemplateFromImage, TemplateBuilder, Templa
|
|
|
4249
4298
|
password: string;
|
|
4250
4299
|
}, options?: {
|
|
4251
4300
|
inheritConfig?: boolean;
|
|
4301
|
+
onConfigFailure?: ImageConfigFailureMode;
|
|
4302
|
+
dispatcher?: RegistryDispatcher;
|
|
4252
4303
|
}): TemplateBuilder;
|
|
4253
4304
|
fromTemplate(template: string): TemplateBuilder;
|
|
4254
4305
|
fromDockerfile(dockerfileContentOrPath: string): TemplateBuilder;
|
|
@@ -4328,9 +4379,13 @@ declare class TemplateBase implements TemplateFromImage, TemplateBuilder, Templa
|
|
|
4328
4379
|
setStartCmd(startCommand: string, readyCommand: string | ReadyCmd): TemplateFinal;
|
|
4329
4380
|
setReadyCmd(readyCommand: string | ReadyCmd): TemplateFinal;
|
|
4330
4381
|
setPatchCmd(cmd: string): TemplateBuilder;
|
|
4331
|
-
setEnvs(envs: Record<string, string
|
|
4382
|
+
setEnvs(envs: Record<string, string>, options?: {
|
|
4383
|
+
runtime?: boolean;
|
|
4384
|
+
}): TemplateBuilder;
|
|
4332
4385
|
private runtimeEnvInstruction;
|
|
4333
4386
|
private withRuntimeEnv;
|
|
4387
|
+
private configFailureMessage;
|
|
4388
|
+
private resetInheritedConfig;
|
|
4334
4389
|
private resolveInheritedConfig;
|
|
4335
4390
|
static imageConfigFailure(template: TemplateClass): {
|
|
4336
4391
|
error: string;
|
|
@@ -4365,6 +4420,7 @@ declare namespace Template {
|
|
|
4365
4420
|
var _a: typeof TemplateBase.delete;
|
|
4366
4421
|
export var toJSON: typeof TemplateBase.toJSON;
|
|
4367
4422
|
export var toDockerfile: typeof TemplateBase.toDockerfile;
|
|
4423
|
+
export var imageConfigFailure: typeof TemplateBase.imageConfigFailure;
|
|
4368
4424
|
export { _a as delete };
|
|
4369
4425
|
}
|
|
4370
4426
|
|
|
@@ -4420,7 +4476,7 @@ type SandboxInfoLifecycle = {
|
|
|
4420
4476
|
onTimeout: 'pause' | 'kill';
|
|
4421
4477
|
autoResume: boolean;
|
|
4422
4478
|
};
|
|
4423
|
-
interface SandboxApiOpts extends Partial<Pick<ConnectionOpts, 'apiKey' | 'headers' | 'debug' | 'domain' | 'requestTimeoutMs' | 'sync'>> {
|
|
4479
|
+
interface SandboxApiOpts extends Partial<Pick<ConnectionOpts, 'apiKey' | 'accessToken' | 'headers' | 'debug' | 'domain' | 'apiUrl' | 'logger' | 'requestTimeoutMs' | 'sync'>> {
|
|
4424
4480
|
}
|
|
4425
4481
|
interface SandboxOpts$1 extends ConnectionOpts {
|
|
4426
4482
|
template?: string;
|
|
@@ -4433,20 +4489,19 @@ interface SandboxOpts$1 extends ConnectionOpts {
|
|
|
4433
4489
|
network?: SandboxNetworkOpts;
|
|
4434
4490
|
volumeMounts?: Record<string, Volume | string>;
|
|
4435
4491
|
sandboxUrl?: string;
|
|
4492
|
+
autoPause?: boolean;
|
|
4436
4493
|
lifecycle?: SandboxLifecycle;
|
|
4437
4494
|
secretEnvs?: Record<string, string>;
|
|
4438
4495
|
nodeId?: string;
|
|
4439
4496
|
}
|
|
4440
|
-
type SandboxBetaCreateOpts = SandboxOpts$1
|
|
4441
|
-
autoPause?: boolean;
|
|
4442
|
-
};
|
|
4497
|
+
type SandboxBetaCreateOpts = SandboxOpts$1;
|
|
4443
4498
|
type SandboxConnectOpts = ConnectionOpts & {
|
|
4444
4499
|
timeoutMs?: number;
|
|
4445
4500
|
secure?: boolean;
|
|
4446
4501
|
allowPublicTraffic?: boolean;
|
|
4447
4502
|
network?: SandboxNetworkOpts;
|
|
4448
4503
|
};
|
|
4449
|
-
type SandboxState = 'running' | 'paused';
|
|
4504
|
+
type SandboxState = 'running' | 'paused' | 'cloning' | 'commiting' | 'snapshotting';
|
|
4450
4505
|
interface SandboxListOpts extends SandboxApiOpts {
|
|
4451
4506
|
query?: {
|
|
4452
4507
|
metadata?: Record<string, string>;
|
|
@@ -4556,26 +4611,14 @@ declare class SandboxApi {
|
|
|
4556
4611
|
sandboxDomain: any;
|
|
4557
4612
|
envdVersion: any;
|
|
4558
4613
|
envdAccessToken: any;
|
|
4559
|
-
trafficAccessToken:
|
|
4560
|
-
} | {
|
|
4561
|
-
sandboxId: string;
|
|
4562
|
-
sandboxDomain: string | undefined;
|
|
4563
|
-
envdVersion: string;
|
|
4564
|
-
envdAccessToken: string | undefined;
|
|
4565
|
-
trafficAccessToken: string | undefined;
|
|
4614
|
+
trafficAccessToken: any;
|
|
4566
4615
|
}>;
|
|
4567
4616
|
protected static connectSandbox(sandboxId: string, opts?: SandboxConnectOpts): Promise<{
|
|
4568
4617
|
sandboxId: any;
|
|
4569
4618
|
sandboxDomain: any;
|
|
4570
4619
|
envdVersion: any;
|
|
4571
4620
|
envdAccessToken: any;
|
|
4572
|
-
trafficAccessToken:
|
|
4573
|
-
} | {
|
|
4574
|
-
sandboxId: string;
|
|
4575
|
-
sandboxDomain: string | undefined;
|
|
4576
|
-
envdVersion: string;
|
|
4577
|
-
envdAccessToken: string | undefined;
|
|
4578
|
-
trafficAccessToken: string | undefined;
|
|
4621
|
+
trafficAccessToken: any;
|
|
4579
4622
|
}>;
|
|
4580
4623
|
static getQuota(opts?: SandboxQuotaOpts): Promise<SandboxQuota>;
|
|
4581
4624
|
static getEvents(opts?: SandboxEventsOpts): Promise<SandboxEventsResult>;
|
|
@@ -4904,6 +4947,8 @@ declare class BuildError extends Error {
|
|
|
4904
4947
|
declare class FileUploadError extends BuildError {
|
|
4905
4948
|
constructor(message: string, stackTrace?: string);
|
|
4906
4949
|
}
|
|
4950
|
+
declare class ImageConfigError extends BuildError {
|
|
4951
|
+
}
|
|
4907
4952
|
declare class VolumeError extends Error {
|
|
4908
4953
|
constructor(message: string);
|
|
4909
4954
|
}
|
|
@@ -5117,7 +5162,7 @@ declare enum FileType {
|
|
|
5117
5162
|
}
|
|
5118
5163
|
type WriteEntry = {
|
|
5119
5164
|
path: string;
|
|
5120
|
-
data: string | ArrayBuffer | Blob | ReadableStream;
|
|
5165
|
+
data: string | ArrayBuffer | Uint8Array | Blob | ReadableStream;
|
|
5121
5166
|
};
|
|
5122
5167
|
interface FilesystemRequestOpts extends Partial<Pick<ConnectionOpts, 'requestTimeoutMs'>> {
|
|
5123
5168
|
user?: Username;
|
|
@@ -5155,7 +5200,10 @@ declare class Filesystem {
|
|
|
5155
5200
|
read(path: string, opts?: FilesystemReadOpts & {
|
|
5156
5201
|
format: 'stream';
|
|
5157
5202
|
}): Promise<ReadableStream<Uint8Array>>;
|
|
5158
|
-
|
|
5203
|
+
read(path: string, opts?: FilesystemReadOpts & {
|
|
5204
|
+
format?: 'text' | 'bytes' | 'blob' | 'stream';
|
|
5205
|
+
}): Promise<string | Uint8Array | Blob | ReadableStream<Uint8Array>>;
|
|
5206
|
+
write(path: string, data: string | ArrayBuffer | Uint8Array | Blob | ReadableStream, opts?: FilesystemWriteOpts): Promise<WriteInfo>;
|
|
5159
5207
|
write(files: WriteEntry[], opts?: FilesystemWriteOpts): Promise<WriteInfo[]>;
|
|
5160
5208
|
writeFiles(files: WriteEntry[], opts?: FilesystemWriteOpts): Promise<WriteInfo[]>;
|
|
5161
5209
|
list(path: string, opts?: FilesystemListOpts): Promise<EntryInfo[]>;
|
|
@@ -5352,7 +5400,7 @@ declare class Sandbox$2 extends SandboxApi {
|
|
|
5352
5400
|
unmountVolume(path: string, opts?: SandboxApiOpts & {
|
|
5353
5401
|
force?: boolean;
|
|
5354
5402
|
}): Promise<SandboxInfo>;
|
|
5355
|
-
kill(opts?:
|
|
5403
|
+
kill(opts?: SandboxApiOpts): Promise<void>;
|
|
5356
5404
|
hotplugMemory(requestedSizeMib: number, opts?: SandboxApiOpts): Promise<void>;
|
|
5357
5405
|
pause(opts?: ConnectionOpts): Promise<boolean>;
|
|
5358
5406
|
betaPause(opts?: ConnectionOpts): Promise<boolean>;
|
|
@@ -5362,7 +5410,7 @@ declare class Sandbox$2 extends SandboxApi {
|
|
|
5362
5410
|
getMcpToken(): Promise<string | undefined>;
|
|
5363
5411
|
uploadUrl(path?: string, opts?: SandboxUrlOpts): Promise<string>;
|
|
5364
5412
|
downloadUrl(path: string, opts?: SandboxUrlOpts): Promise<string>;
|
|
5365
|
-
getInfo(opts?:
|
|
5413
|
+
getInfo(opts?: SandboxApiOpts): Promise<SandboxInfo>;
|
|
5366
5414
|
getMetrics(opts?: SandboxMetricsOpts): Promise<SandboxMetrics[]>;
|
|
5367
5415
|
private resolveApiOpts;
|
|
5368
5416
|
private fileUrl;
|
|
@@ -5598,6 +5646,7 @@ declare class Sandbox extends Sandbox$2 {
|
|
|
5598
5646
|
screenshot(format: 'bytes'): Promise<Uint8Array>;
|
|
5599
5647
|
screenshot(format: 'blob'): Promise<Blob>;
|
|
5600
5648
|
screenshot(format: 'stream'): Promise<ReadableStream<Uint8Array>>;
|
|
5649
|
+
screenshot(format?: 'bytes' | 'blob' | 'stream'): Promise<Uint8Array | Blob | ReadableStream<Uint8Array>>;
|
|
5601
5650
|
leftClick(x?: number, y?: number): Promise<void>;
|
|
5602
5651
|
doubleClick(x?: number, y?: number): Promise<void>;
|
|
5603
5652
|
rightClick(x?: number, y?: number): Promise<void>;
|
|
@@ -5828,35 +5877,4 @@ declare function getSignature({ path, operation, user, expirationInSeconds, envd
|
|
|
5828
5877
|
|
|
5829
5878
|
declare const ALL_TRAFFIC = "0.0.0.0/0";
|
|
5830
5879
|
|
|
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 };
|
|
5880
|
+
export { type SandboxResetOpts 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 SandboxMetrics as H, InvalidArgumentError as I, type SandboxOpts$1 as J, type SandboxApiOpts as K, type Logger as L, type SandboxConnectOpts as M, NotEnoughSpaceError as N, type SandboxBetaCreateOpts as O, PPIO as P, type SandboxMetricsOpts as Q, RateLimitError as R, Sandbox$2 as S, TemplateError as T, type Username as U, VolumeError as V, type WriteInfo as W, type SandboxCloneOpts as X, type SandboxCloneResult as Y, type SandboxCommitOpts as Z, type SandboxCommitResult as _, type ConnectionOpts as a, parseImageRef as a$, type SandboxState as a0, type SandboxListOpts as a1, SandboxPaginator as a2, type SandboxNetworkOpts as a3, type SandboxNetworkUpdateOpts as a4, type SandboxLifecycle as a5, type SandboxInfoLifecycle as a6, type SnapshotInfo as a7, type SnapshotListOpts as a8, SnapshotPaginator as a9, type GitConfigOpts as aA, type GitConfigScope as aB, type GitBranches as aC, type GitFileStatus as aD, type GitStatus as aE, Volume as aF, type VolumeInfo as aG, type VolumeAndToken as aH, Secret as aI, type SecretBinding as aJ, type SecretWriteParams as aK, ReadyCmd as aL, waitForPort as aM, waitForURL as aN, waitForProcess as aO, waitForFile as aP, waitForTimeout as aQ, LogEntry as aR, LogEntryStart as aS, LogEntryEnd as aT, type LogEntryLevel as aU, defaultBuildLogger as aV, type ImageConfig as aW, type RegistryCredentials as aX, clearImageConfigCache as aY, effectiveStartCmd as aZ, fetchImageConfig as a_, type SandboxQuota as aa, type SandboxQuotaLimit as ab, type SandboxQuotaUsage as ac, type SandboxQuotaOpts as ad, type SandboxEventItem as ae, type SandboxEventsOpts as af, type SandboxEventsResult as ag, type McpServer$1 as ah, ALL_TRAFFIC as ai, type ProcessInfo as aj, type CommandRequestOpts as ak, type CommandConnectOpts as al, type CommandStartOpts as am, Commands as an, Pty as ao, Git as ap, type GitRequestOpts as aq, type GitCloneOpts as ar, type GitInitOpts as as, type GitRemoteAddOpts as at, type GitCommitOpts as au, type GitAddOpts as av, type GitDeleteBranchOpts as aw, type GitPushOpts as ax, type GitPullOpts as ay, type GitDangerouslyAuthenticateOpts as az, AuthenticationError as b, unsupportedBase as b0, TemplateApi as b1, TemplatePaginator as b2, TemplateBase as b3, Template as b4, type BuildInfo as b5, type BuildOptions as b6, type BuildStatusReason as b7, type CopyItem as b8, type GetBuildStatusOptions as b9, OutputMessage as bA, ScaleType as bB, ChartType as bC, type ChartTypes as bD, type Chart as bE, type BarChart as bF, type BarData as bG, type LineChart as bH, type ScatterChart as bI, type BoxAndWhiskerChart as bJ, type BoxAndWhiskerData as bK, type PieChart as bL, type PieData as bM, type SuperChart as bN, type PointData as bO, Sandbox as bP, type SandboxOpts as bQ, type McpServerName as ba, type TemplateBuilder as bb, type TemplateBuildStatus as bc, type TemplateBuildStatusResponse as bd, type TemplateClass as be, type TemplateDeleteOpts as bf, type TemplateInfo as bg, type TemplateListOpts as bh, type TemplateListOptions as bi, type TemplateListResponse as bj, type TemplateTag as bk, type TemplateTagInfo as bl, type TemplateType as bm, type ImageConfigFailureMode as bn, type RegistryDispatcher as bo, Sandbox$1 as bp, type Context as bq, type RunCodeOpts as br, type CreateCodeContextOpts as bs, type CodeContextRequestOpts as bt, type Logs as bu, ExecutionError as bv, Result as bw, Execution as bx, type MIMEType as by, type RawData 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 };
|
|
@@ -1581,6 +1581,9 @@ interface components {
|
|
|
1581
1581
|
step?: string;
|
|
1582
1582
|
};
|
|
1583
1583
|
ConnectSandbox: {
|
|
1584
|
+
allowPublicTraffic?: boolean;
|
|
1585
|
+
network?: components["schemas"]["SandboxNetworkConfig"];
|
|
1586
|
+
secure?: boolean;
|
|
1584
1587
|
timeout: number;
|
|
1585
1588
|
};
|
|
1586
1589
|
CPUCount: number;
|
|
@@ -1819,7 +1822,7 @@ interface components {
|
|
|
1819
1822
|
maskRequestHost?: string;
|
|
1820
1823
|
};
|
|
1821
1824
|
SandboxOnTimeout: "kill" | "pause";
|
|
1822
|
-
SandboxState: "running" | "paused";
|
|
1825
|
+
SandboxState: "running" | "paused" | "cloning" | "commiting" | "snapshotting";
|
|
1823
1826
|
SandboxVolumeMount: {
|
|
1824
1827
|
name: string;
|
|
1825
1828
|
path: string;
|
|
@@ -2127,6 +2130,41 @@ declare class ApiClient {
|
|
|
2127
2130
|
});
|
|
2128
2131
|
}
|
|
2129
2132
|
|
|
2133
|
+
declare function unsupportedBase(blob: {
|
|
2134
|
+
history?: {
|
|
2135
|
+
created_by?: string;
|
|
2136
|
+
}[];
|
|
2137
|
+
config?: {
|
|
2138
|
+
Labels?: Record<string, string>;
|
|
2139
|
+
Env?: string[];
|
|
2140
|
+
};
|
|
2141
|
+
}): string | null;
|
|
2142
|
+
type ImageConfig = {
|
|
2143
|
+
env: Record<string, string>;
|
|
2144
|
+
workdir: string | null;
|
|
2145
|
+
entrypoint: string[];
|
|
2146
|
+
cmd: string[];
|
|
2147
|
+
error?: string;
|
|
2148
|
+
unsupportedBase?: string;
|
|
2149
|
+
unusable?: string;
|
|
2150
|
+
};
|
|
2151
|
+
type RegistryCredentials = {
|
|
2152
|
+
username: string;
|
|
2153
|
+
password: string;
|
|
2154
|
+
};
|
|
2155
|
+
type RegistryDispatcher = unknown;
|
|
2156
|
+
type ImageConfigFailureMode = 'warn' | 'raise' | 'ignore';
|
|
2157
|
+
declare function parseImageRef(image: string): {
|
|
2158
|
+
host: string;
|
|
2159
|
+
repository: string;
|
|
2160
|
+
reference: string;
|
|
2161
|
+
};
|
|
2162
|
+
declare function fetchImageConfig(image: string, credentials?: RegistryCredentials, options?: {
|
|
2163
|
+
dispatcher?: RegistryDispatcher;
|
|
2164
|
+
}): Promise<ImageConfig>;
|
|
2165
|
+
declare function effectiveStartCmd(entrypoint: string[], cmd: string[]): string | null;
|
|
2166
|
+
declare function clearImageConfigCache(): void;
|
|
2167
|
+
|
|
2130
2168
|
declare class ReadyCmd {
|
|
2131
2169
|
private cmd;
|
|
2132
2170
|
constructor(cmd: string);
|
|
@@ -4089,6 +4127,8 @@ interface TemplateFromImage {
|
|
|
4089
4127
|
password: string;
|
|
4090
4128
|
}, options?: {
|
|
4091
4129
|
inheritConfig?: boolean;
|
|
4130
|
+
onConfigFailure?: ImageConfigFailureMode;
|
|
4131
|
+
dispatcher?: RegistryDispatcher;
|
|
4092
4132
|
}): TemplateBuilder;
|
|
4093
4133
|
fromTemplate(template: string): TemplateBuilder;
|
|
4094
4134
|
fromDockerfile(dockerfileContentOrPath: string): TemplateBuilder;
|
|
@@ -4171,7 +4211,9 @@ interface TemplateBuilder {
|
|
|
4171
4211
|
depth?: number;
|
|
4172
4212
|
user?: string;
|
|
4173
4213
|
}): TemplateBuilder;
|
|
4174
|
-
setEnvs(envs: Record<string, string
|
|
4214
|
+
setEnvs(envs: Record<string, string>, options?: {
|
|
4215
|
+
runtime?: boolean;
|
|
4216
|
+
}): TemplateBuilder;
|
|
4175
4217
|
skipCache(): this;
|
|
4176
4218
|
setStartCmd(startCommand: string, readyCommand: string | ReadyCmd): TemplateFinal;
|
|
4177
4219
|
setReadyCmd(readyCommand: string | ReadyCmd): TemplateFinal;
|
|
@@ -4210,10 +4252,17 @@ declare class TemplateBase implements TemplateFromImage, TemplateBuilder, Templa
|
|
|
4210
4252
|
private forceNextLayer;
|
|
4211
4253
|
private instructions;
|
|
4212
4254
|
private envs;
|
|
4255
|
+
private envDeclarations;
|
|
4256
|
+
private imageEnvs;
|
|
4257
|
+
private imageWorkdir?;
|
|
4258
|
+
private imageStartCmd?;
|
|
4259
|
+
private imageReadyCmd?;
|
|
4213
4260
|
private inheritImageConfig;
|
|
4214
4261
|
private imageCredentials;
|
|
4215
4262
|
private imageConfigError;
|
|
4216
4263
|
private imageUnusable;
|
|
4264
|
+
private imageOnConfigFailure;
|
|
4265
|
+
private imageDispatcher;
|
|
4217
4266
|
private fileContextPath;
|
|
4218
4267
|
private fileIgnorePatterns;
|
|
4219
4268
|
private logsRefreshFrequency;
|
|
@@ -4249,6 +4298,8 @@ declare class TemplateBase implements TemplateFromImage, TemplateBuilder, Templa
|
|
|
4249
4298
|
password: string;
|
|
4250
4299
|
}, options?: {
|
|
4251
4300
|
inheritConfig?: boolean;
|
|
4301
|
+
onConfigFailure?: ImageConfigFailureMode;
|
|
4302
|
+
dispatcher?: RegistryDispatcher;
|
|
4252
4303
|
}): TemplateBuilder;
|
|
4253
4304
|
fromTemplate(template: string): TemplateBuilder;
|
|
4254
4305
|
fromDockerfile(dockerfileContentOrPath: string): TemplateBuilder;
|
|
@@ -4328,9 +4379,13 @@ declare class TemplateBase implements TemplateFromImage, TemplateBuilder, Templa
|
|
|
4328
4379
|
setStartCmd(startCommand: string, readyCommand: string | ReadyCmd): TemplateFinal;
|
|
4329
4380
|
setReadyCmd(readyCommand: string | ReadyCmd): TemplateFinal;
|
|
4330
4381
|
setPatchCmd(cmd: string): TemplateBuilder;
|
|
4331
|
-
setEnvs(envs: Record<string, string
|
|
4382
|
+
setEnvs(envs: Record<string, string>, options?: {
|
|
4383
|
+
runtime?: boolean;
|
|
4384
|
+
}): TemplateBuilder;
|
|
4332
4385
|
private runtimeEnvInstruction;
|
|
4333
4386
|
private withRuntimeEnv;
|
|
4387
|
+
private configFailureMessage;
|
|
4388
|
+
private resetInheritedConfig;
|
|
4334
4389
|
private resolveInheritedConfig;
|
|
4335
4390
|
static imageConfigFailure(template: TemplateClass): {
|
|
4336
4391
|
error: string;
|
|
@@ -4365,6 +4420,7 @@ declare namespace Template {
|
|
|
4365
4420
|
var _a: typeof TemplateBase.delete;
|
|
4366
4421
|
export var toJSON: typeof TemplateBase.toJSON;
|
|
4367
4422
|
export var toDockerfile: typeof TemplateBase.toDockerfile;
|
|
4423
|
+
export var imageConfigFailure: typeof TemplateBase.imageConfigFailure;
|
|
4368
4424
|
export { _a as delete };
|
|
4369
4425
|
}
|
|
4370
4426
|
|
|
@@ -4420,7 +4476,7 @@ type SandboxInfoLifecycle = {
|
|
|
4420
4476
|
onTimeout: 'pause' | 'kill';
|
|
4421
4477
|
autoResume: boolean;
|
|
4422
4478
|
};
|
|
4423
|
-
interface SandboxApiOpts extends Partial<Pick<ConnectionOpts, 'apiKey' | 'headers' | 'debug' | 'domain' | 'requestTimeoutMs' | 'sync'>> {
|
|
4479
|
+
interface SandboxApiOpts extends Partial<Pick<ConnectionOpts, 'apiKey' | 'accessToken' | 'headers' | 'debug' | 'domain' | 'apiUrl' | 'logger' | 'requestTimeoutMs' | 'sync'>> {
|
|
4424
4480
|
}
|
|
4425
4481
|
interface SandboxOpts$1 extends ConnectionOpts {
|
|
4426
4482
|
template?: string;
|
|
@@ -4433,20 +4489,19 @@ interface SandboxOpts$1 extends ConnectionOpts {
|
|
|
4433
4489
|
network?: SandboxNetworkOpts;
|
|
4434
4490
|
volumeMounts?: Record<string, Volume | string>;
|
|
4435
4491
|
sandboxUrl?: string;
|
|
4492
|
+
autoPause?: boolean;
|
|
4436
4493
|
lifecycle?: SandboxLifecycle;
|
|
4437
4494
|
secretEnvs?: Record<string, string>;
|
|
4438
4495
|
nodeId?: string;
|
|
4439
4496
|
}
|
|
4440
|
-
type SandboxBetaCreateOpts = SandboxOpts$1
|
|
4441
|
-
autoPause?: boolean;
|
|
4442
|
-
};
|
|
4497
|
+
type SandboxBetaCreateOpts = SandboxOpts$1;
|
|
4443
4498
|
type SandboxConnectOpts = ConnectionOpts & {
|
|
4444
4499
|
timeoutMs?: number;
|
|
4445
4500
|
secure?: boolean;
|
|
4446
4501
|
allowPublicTraffic?: boolean;
|
|
4447
4502
|
network?: SandboxNetworkOpts;
|
|
4448
4503
|
};
|
|
4449
|
-
type SandboxState = 'running' | 'paused';
|
|
4504
|
+
type SandboxState = 'running' | 'paused' | 'cloning' | 'commiting' | 'snapshotting';
|
|
4450
4505
|
interface SandboxListOpts extends SandboxApiOpts {
|
|
4451
4506
|
query?: {
|
|
4452
4507
|
metadata?: Record<string, string>;
|
|
@@ -4556,26 +4611,14 @@ declare class SandboxApi {
|
|
|
4556
4611
|
sandboxDomain: any;
|
|
4557
4612
|
envdVersion: any;
|
|
4558
4613
|
envdAccessToken: any;
|
|
4559
|
-
trafficAccessToken:
|
|
4560
|
-
} | {
|
|
4561
|
-
sandboxId: string;
|
|
4562
|
-
sandboxDomain: string | undefined;
|
|
4563
|
-
envdVersion: string;
|
|
4564
|
-
envdAccessToken: string | undefined;
|
|
4565
|
-
trafficAccessToken: string | undefined;
|
|
4614
|
+
trafficAccessToken: any;
|
|
4566
4615
|
}>;
|
|
4567
4616
|
protected static connectSandbox(sandboxId: string, opts?: SandboxConnectOpts): Promise<{
|
|
4568
4617
|
sandboxId: any;
|
|
4569
4618
|
sandboxDomain: any;
|
|
4570
4619
|
envdVersion: any;
|
|
4571
4620
|
envdAccessToken: any;
|
|
4572
|
-
trafficAccessToken:
|
|
4573
|
-
} | {
|
|
4574
|
-
sandboxId: string;
|
|
4575
|
-
sandboxDomain: string | undefined;
|
|
4576
|
-
envdVersion: string;
|
|
4577
|
-
envdAccessToken: string | undefined;
|
|
4578
|
-
trafficAccessToken: string | undefined;
|
|
4621
|
+
trafficAccessToken: any;
|
|
4579
4622
|
}>;
|
|
4580
4623
|
static getQuota(opts?: SandboxQuotaOpts): Promise<SandboxQuota>;
|
|
4581
4624
|
static getEvents(opts?: SandboxEventsOpts): Promise<SandboxEventsResult>;
|
|
@@ -4904,6 +4947,8 @@ declare class BuildError extends Error {
|
|
|
4904
4947
|
declare class FileUploadError extends BuildError {
|
|
4905
4948
|
constructor(message: string, stackTrace?: string);
|
|
4906
4949
|
}
|
|
4950
|
+
declare class ImageConfigError extends BuildError {
|
|
4951
|
+
}
|
|
4907
4952
|
declare class VolumeError extends Error {
|
|
4908
4953
|
constructor(message: string);
|
|
4909
4954
|
}
|
|
@@ -5117,7 +5162,7 @@ declare enum FileType {
|
|
|
5117
5162
|
}
|
|
5118
5163
|
type WriteEntry = {
|
|
5119
5164
|
path: string;
|
|
5120
|
-
data: string | ArrayBuffer | Blob | ReadableStream;
|
|
5165
|
+
data: string | ArrayBuffer | Uint8Array | Blob | ReadableStream;
|
|
5121
5166
|
};
|
|
5122
5167
|
interface FilesystemRequestOpts extends Partial<Pick<ConnectionOpts, 'requestTimeoutMs'>> {
|
|
5123
5168
|
user?: Username;
|
|
@@ -5155,7 +5200,10 @@ declare class Filesystem {
|
|
|
5155
5200
|
read(path: string, opts?: FilesystemReadOpts & {
|
|
5156
5201
|
format: 'stream';
|
|
5157
5202
|
}): Promise<ReadableStream<Uint8Array>>;
|
|
5158
|
-
|
|
5203
|
+
read(path: string, opts?: FilesystemReadOpts & {
|
|
5204
|
+
format?: 'text' | 'bytes' | 'blob' | 'stream';
|
|
5205
|
+
}): Promise<string | Uint8Array | Blob | ReadableStream<Uint8Array>>;
|
|
5206
|
+
write(path: string, data: string | ArrayBuffer | Uint8Array | Blob | ReadableStream, opts?: FilesystemWriteOpts): Promise<WriteInfo>;
|
|
5159
5207
|
write(files: WriteEntry[], opts?: FilesystemWriteOpts): Promise<WriteInfo[]>;
|
|
5160
5208
|
writeFiles(files: WriteEntry[], opts?: FilesystemWriteOpts): Promise<WriteInfo[]>;
|
|
5161
5209
|
list(path: string, opts?: FilesystemListOpts): Promise<EntryInfo[]>;
|
|
@@ -5352,7 +5400,7 @@ declare class Sandbox$2 extends SandboxApi {
|
|
|
5352
5400
|
unmountVolume(path: string, opts?: SandboxApiOpts & {
|
|
5353
5401
|
force?: boolean;
|
|
5354
5402
|
}): Promise<SandboxInfo>;
|
|
5355
|
-
kill(opts?:
|
|
5403
|
+
kill(opts?: SandboxApiOpts): Promise<void>;
|
|
5356
5404
|
hotplugMemory(requestedSizeMib: number, opts?: SandboxApiOpts): Promise<void>;
|
|
5357
5405
|
pause(opts?: ConnectionOpts): Promise<boolean>;
|
|
5358
5406
|
betaPause(opts?: ConnectionOpts): Promise<boolean>;
|
|
@@ -5362,7 +5410,7 @@ declare class Sandbox$2 extends SandboxApi {
|
|
|
5362
5410
|
getMcpToken(): Promise<string | undefined>;
|
|
5363
5411
|
uploadUrl(path?: string, opts?: SandboxUrlOpts): Promise<string>;
|
|
5364
5412
|
downloadUrl(path: string, opts?: SandboxUrlOpts): Promise<string>;
|
|
5365
|
-
getInfo(opts?:
|
|
5413
|
+
getInfo(opts?: SandboxApiOpts): Promise<SandboxInfo>;
|
|
5366
5414
|
getMetrics(opts?: SandboxMetricsOpts): Promise<SandboxMetrics[]>;
|
|
5367
5415
|
private resolveApiOpts;
|
|
5368
5416
|
private fileUrl;
|
|
@@ -5598,6 +5646,7 @@ declare class Sandbox extends Sandbox$2 {
|
|
|
5598
5646
|
screenshot(format: 'bytes'): Promise<Uint8Array>;
|
|
5599
5647
|
screenshot(format: 'blob'): Promise<Blob>;
|
|
5600
5648
|
screenshot(format: 'stream'): Promise<ReadableStream<Uint8Array>>;
|
|
5649
|
+
screenshot(format?: 'bytes' | 'blob' | 'stream'): Promise<Uint8Array | Blob | ReadableStream<Uint8Array>>;
|
|
5601
5650
|
leftClick(x?: number, y?: number): Promise<void>;
|
|
5602
5651
|
doubleClick(x?: number, y?: number): Promise<void>;
|
|
5603
5652
|
rightClick(x?: number, y?: number): Promise<void>;
|
|
@@ -5828,35 +5877,4 @@ declare function getSignature({ path, operation, user, expirationInSeconds, envd
|
|
|
5828
5877
|
|
|
5829
5878
|
declare const ALL_TRAFFIC = "0.0.0.0/0";
|
|
5830
5879
|
|
|
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 };
|
|
5880
|
+
export { type SandboxResetOpts 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 SandboxMetrics as H, InvalidArgumentError as I, type SandboxOpts$1 as J, type SandboxApiOpts as K, type Logger as L, type SandboxConnectOpts as M, NotEnoughSpaceError as N, type SandboxBetaCreateOpts as O, PPIO as P, type SandboxMetricsOpts as Q, RateLimitError as R, Sandbox$2 as S, TemplateError as T, type Username as U, VolumeError as V, type WriteInfo as W, type SandboxCloneOpts as X, type SandboxCloneResult as Y, type SandboxCommitOpts as Z, type SandboxCommitResult as _, type ConnectionOpts as a, parseImageRef as a$, type SandboxState as a0, type SandboxListOpts as a1, SandboxPaginator as a2, type SandboxNetworkOpts as a3, type SandboxNetworkUpdateOpts as a4, type SandboxLifecycle as a5, type SandboxInfoLifecycle as a6, type SnapshotInfo as a7, type SnapshotListOpts as a8, SnapshotPaginator as a9, type GitConfigOpts as aA, type GitConfigScope as aB, type GitBranches as aC, type GitFileStatus as aD, type GitStatus as aE, Volume as aF, type VolumeInfo as aG, type VolumeAndToken as aH, Secret as aI, type SecretBinding as aJ, type SecretWriteParams as aK, ReadyCmd as aL, waitForPort as aM, waitForURL as aN, waitForProcess as aO, waitForFile as aP, waitForTimeout as aQ, LogEntry as aR, LogEntryStart as aS, LogEntryEnd as aT, type LogEntryLevel as aU, defaultBuildLogger as aV, type ImageConfig as aW, type RegistryCredentials as aX, clearImageConfigCache as aY, effectiveStartCmd as aZ, fetchImageConfig as a_, type SandboxQuota as aa, type SandboxQuotaLimit as ab, type SandboxQuotaUsage as ac, type SandboxQuotaOpts as ad, type SandboxEventItem as ae, type SandboxEventsOpts as af, type SandboxEventsResult as ag, type McpServer$1 as ah, ALL_TRAFFIC as ai, type ProcessInfo as aj, type CommandRequestOpts as ak, type CommandConnectOpts as al, type CommandStartOpts as am, Commands as an, Pty as ao, Git as ap, type GitRequestOpts as aq, type GitCloneOpts as ar, type GitInitOpts as as, type GitRemoteAddOpts as at, type GitCommitOpts as au, type GitAddOpts as av, type GitDeleteBranchOpts as aw, type GitPushOpts as ax, type GitPullOpts as ay, type GitDangerouslyAuthenticateOpts as az, AuthenticationError as b, unsupportedBase as b0, TemplateApi as b1, TemplatePaginator as b2, TemplateBase as b3, Template as b4, type BuildInfo as b5, type BuildOptions as b6, type BuildStatusReason as b7, type CopyItem as b8, type GetBuildStatusOptions as b9, OutputMessage as bA, ScaleType as bB, ChartType as bC, type ChartTypes as bD, type Chart as bE, type BarChart as bF, type BarData as bG, type LineChart as bH, type ScatterChart as bI, type BoxAndWhiskerChart as bJ, type BoxAndWhiskerData as bK, type PieChart as bL, type PieData as bM, type SuperChart as bN, type PointData as bO, Sandbox as bP, type SandboxOpts as bQ, type McpServerName as ba, type TemplateBuilder as bb, type TemplateBuildStatus as bc, type TemplateBuildStatusResponse as bd, type TemplateClass as be, type TemplateDeleteOpts as bf, type TemplateInfo as bg, type TemplateListOpts as bh, type TemplateListOptions as bi, type TemplateListResponse as bj, type TemplateTag as bk, type TemplateTagInfo as bl, type TemplateType as bm, type ImageConfigFailureMode as bn, type RegistryDispatcher as bo, Sandbox$1 as bp, type Context as bq, type RunCodeOpts as br, type CreateCodeContextOpts as bs, type CodeContextRequestOpts as bt, type Logs as bu, ExecutionError as bv, Result as bw, Execution as bx, type MIMEType as by, type RawData 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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as Sandbox } from './index-
|
|
2
|
-
export {
|
|
1
|
+
import { S as Sandbox } from './index-CAD08VLb.mjs';
|
|
2
|
+
export { ai as ALL_TRAFFIC, A as ApiClient, b as AuthenticationError, B as BuildError, b5 as BuildInfo, b6 as BuildOptions, b7 as BuildStatusReason, al as CommandConnectOpts, u as CommandExitError, z as CommandHandle, ak as CommandRequestOpts, v as CommandResult, am as CommandStartOpts, an as Commands, C as ConnectionConfig, a as ConnectionOpts, b8 as CopyItem, E as EntryInfo, F as FileNotFoundError, m as FileType, i as FileUploadError, n as Filesystem, s as FilesystemEvent, r as FilesystemEventType, q as FilesystemReadOpts, o as FilesystemWriteOpts, b9 as GetBuildStatusOptions, ap as Git, av as GitAddOpts, G as GitAuthError, aC as GitBranches, ar as GitCloneOpts, au as GitCommitOpts, aA as GitConfigOpts, aB as GitConfigScope, az as GitDangerouslyAuthenticateOpts, aw as GitDeleteBranchOpts, aD as GitFileStatus, as as GitInitOpts, ay as GitPullOpts, ax as GitPushOpts, at as GitRemoteAddOpts, aq as GitRequestOpts, aE as GitStatus, d as GitUpstreamError, aW as ImageConfig, j as ImageConfigError, bn as ImageConfigFailureMode, I as InvalidArgumentError, aR as LogEntry, aT as LogEntryEnd, aU as LogEntryLevel, aS as LogEntryStart, L as Logger, ah as McpServer, ba as McpServerName, N as NotEnoughSpaceError, e as NotFoundError, P as PPIO, aj as ProcessInfo, ao as Pty, y as PtyOutput, R as RateLimitError, aL as ReadyCmd, aX as RegistryCredentials, bo as RegistryDispatcher, K as SandboxApiOpts, O as SandboxBetaCreateOpts, X as SandboxCloneOpts, Y as SandboxCloneResult, Z as SandboxCommitOpts, _ as SandboxCommitResult, M as SandboxConnectOpts, f as SandboxError, ae as SandboxEventItem, af as SandboxEventsOpts, ag as SandboxEventsResult, D as SandboxInfo, a6 as SandboxInfoLifecycle, a5 as SandboxLifecycle, a1 as SandboxListOpts, H as SandboxMetrics, Q as SandboxMetricsOpts, a3 as SandboxNetworkOpts, a4 as SandboxNetworkUpdateOpts, g as SandboxNotFoundError, J as SandboxOpts, a2 as SandboxPaginator, aa as SandboxQuota, ab as SandboxQuotaLimit, ad as SandboxQuotaOpts, ac as SandboxQuotaUsage, $ as SandboxResetOpts, a0 as SandboxState, aI as Secret, aJ as SecretBinding, k as SecretError, aK as SecretWriteParams, a7 as SnapshotInfo, a8 as SnapshotListOpts, a9 as SnapshotPaginator, x as Stderr, w as Stdout, b4 as Template, b1 as TemplateApi, b3 as TemplateBase, bc as TemplateBuildStatus, bd as TemplateBuildStatusResponse, bb as TemplateBuilder, be as TemplateClass, bf as TemplateDeleteOpts, T as TemplateError, bg as TemplateInfo, bi as TemplateListOptions, bh as TemplateListOpts, bj as TemplateListResponse, b2 as TemplatePaginator, bk as TemplateTag, bl as TemplateTagInfo, bm as TemplateType, h as TimeoutError, U as Username, aF as Volume, aH as VolumeAndToken, V as VolumeError, aG as VolumeInfo, t as WatchHandle, W as WriteInfo, aY as clearImageConfigCache, c as components, aV as defaultBuildLogger, aZ as effectiveStartCmd, a_ as fetchImageConfig, l as getSignature, a$ as parseImageRef, p as paths, b0 as unsupportedBase, aP as waitForFile, aM as waitForPort, aO as waitForProcess, aQ as waitForTimeout, aN as waitForURL } from './index-CAD08VLb.mjs';
|
|
3
3
|
import 'openapi-fetch';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import '@connectrpc/connect';
|