tensorlake 0.5.5 → 0.5.7
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/bin/darwin-arm64/tensorlake +0 -0
- package/dist/bin/darwin-arm64/tl +0 -0
- package/dist/bin/linux-x64/tensorlake +0 -0
- package/dist/bin/linux-x64/tl +0 -0
- package/dist/bin/win32-x64/tensorlake.exe +0 -0
- package/dist/bin/win32-x64/tl.exe +0 -0
- package/dist/index.cjs +120 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -22
- package/dist/index.d.ts +34 -22
- package/dist/index.js +120 -35
- package/dist/index.js.map +1 -1
- package/dist/{sandbox-image-BmhjX2bC.d.cts → sandbox-image-BMDaNpZ2.d.cts} +1 -1
- package/dist/{sandbox-image-BmhjX2bC.d.ts → sandbox-image-BMDaNpZ2.d.ts} +1 -1
- package/dist/sandbox-image.cjs +120 -35
- package/dist/sandbox-image.cjs.map +1 -1
- package/dist/sandbox-image.d.cts +1 -1
- package/dist/sandbox-image.d.ts +1 -1
- package/dist/sandbox-image.js +120 -35
- package/dist/sandbox-image.js.map +1 -1
- package/package.json +1 -1
package/dist/sandbox-image.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as CreateSandboxImageOptions, E as DockerfileBuildPlan, F as DockerfileInstruction, V as SandboxImageSource, Z as createSandboxImage, $ as defaultRegisteredName, a0 as loadDockerfilePlan, a1 as loadImagePlan, a2 as logicalDockerfileLines, a3 as runCreateSandboxImageCli } from './sandbox-image-
|
|
1
|
+
export { A as CreateSandboxImageOptions, E as DockerfileBuildPlan, F as DockerfileInstruction, V as SandboxImageSource, Z as createSandboxImage, $ as defaultRegisteredName, a0 as loadDockerfilePlan, a1 as loadImagePlan, a2 as logicalDockerfileLines, a3 as runCreateSandboxImageCli } from './sandbox-image-BMDaNpZ2.cjs';
|
package/dist/sandbox-image.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as CreateSandboxImageOptions, E as DockerfileBuildPlan, F as DockerfileInstruction, V as SandboxImageSource, Z as createSandboxImage, $ as defaultRegisteredName, a0 as loadDockerfilePlan, a1 as loadImagePlan, a2 as logicalDockerfileLines, a3 as runCreateSandboxImageCli } from './sandbox-image-
|
|
1
|
+
export { A as CreateSandboxImageOptions, E as DockerfileBuildPlan, F as DockerfileInstruction, V as SandboxImageSource, Z as createSandboxImage, $ as defaultRegisteredName, a0 as loadDockerfilePlan, a1 as loadImagePlan, a2 as logicalDockerfileLines, a3 as runCreateSandboxImageCli } from './sandbox-image-BMDaNpZ2.js';
|
package/dist/sandbox-image.js
CHANGED
|
@@ -61,7 +61,7 @@ var SDK_VERSION, API_URL, API_KEY, NAMESPACE, SANDBOX_PROXY_URL, DEFAULT_HTTP_TI
|
|
|
61
61
|
var init_defaults = __esm({
|
|
62
62
|
"src/defaults.ts"() {
|
|
63
63
|
"use strict";
|
|
64
|
-
SDK_VERSION = "0.
|
|
64
|
+
SDK_VERSION = "0.5.7";
|
|
65
65
|
API_URL = process.env.TENSORLAKE_API_URL ?? "https://api.tensorlake.ai";
|
|
66
66
|
API_KEY = process.env.TENSORLAKE_API_KEY ?? void 0;
|
|
67
67
|
NAMESPACE = process.env.INDEXIFY_NAMESPACE ?? "default";
|
|
@@ -242,6 +242,9 @@ var init_http = __esm({
|
|
|
242
242
|
if (options.hostHeader) {
|
|
243
243
|
this.headers["Host"] = options.hostHeader;
|
|
244
244
|
}
|
|
245
|
+
if (options.sandboxIdHeader) {
|
|
246
|
+
this.headers["X-Tensorlake-Sandbox-Id"] = options.sandboxIdHeader;
|
|
247
|
+
}
|
|
245
248
|
if (options.routingHint) {
|
|
246
249
|
this.headers["X-Tensorlake-Route-Hint"] = options.routingHint;
|
|
247
250
|
}
|
|
@@ -2868,21 +2871,36 @@ function resolveProxyTarget(proxyUrl, sandboxId) {
|
|
|
2868
2871
|
if (host === "localhost" || host === "127.0.0.1") {
|
|
2869
2872
|
return {
|
|
2870
2873
|
baseUrl: trimTrailingSlashes(proxyUrl),
|
|
2871
|
-
hostHeader: `${sandboxId}.local
|
|
2874
|
+
hostHeader: `${sandboxId}.local`,
|
|
2875
|
+
sandboxIdHeader: void 0
|
|
2872
2876
|
};
|
|
2873
2877
|
}
|
|
2874
2878
|
const port = parsed.port ? `:${parsed.port}` : "";
|
|
2875
2879
|
return {
|
|
2876
|
-
baseUrl: `${parsed.protocol}//${
|
|
2877
|
-
hostHeader: void 0
|
|
2880
|
+
baseUrl: `${parsed.protocol}//${host}${port}`,
|
|
2881
|
+
hostHeader: void 0,
|
|
2882
|
+
sandboxIdHeader: sandboxId
|
|
2878
2883
|
};
|
|
2879
2884
|
} catch {
|
|
2880
2885
|
return {
|
|
2881
2886
|
baseUrl: `${trimTrailingSlashes(proxyUrl)}/${sandboxId}`,
|
|
2882
|
-
hostHeader: void 0
|
|
2887
|
+
hostHeader: void 0,
|
|
2888
|
+
sandboxIdHeader: void 0
|
|
2883
2889
|
};
|
|
2884
2890
|
}
|
|
2885
2891
|
}
|
|
2892
|
+
function resolveSandboxLifecycleUrl(apiUrl) {
|
|
2893
|
+
if (isLocalhost(apiUrl)) return apiUrl;
|
|
2894
|
+
try {
|
|
2895
|
+
const parsed = new URL(apiUrl);
|
|
2896
|
+
if (parsed.hostname.startsWith("api.")) {
|
|
2897
|
+
parsed.hostname = "sandbox." + parsed.hostname.slice(4);
|
|
2898
|
+
return parsed.toString().replace(/\/$/, "");
|
|
2899
|
+
}
|
|
2900
|
+
} catch {
|
|
2901
|
+
}
|
|
2902
|
+
return apiUrl;
|
|
2903
|
+
}
|
|
2886
2904
|
function lifecyclePath(path2, isLocal, namespace) {
|
|
2887
2905
|
if (isLocal) {
|
|
2888
2906
|
return `/v1/namespaces/${namespace}/${path2}`;
|
|
@@ -3109,7 +3127,7 @@ var init_sandbox = __esm({
|
|
|
3109
3127
|
this.sandboxId = options.sandboxId;
|
|
3110
3128
|
this.lifecycleIdentifier = options.sandboxId;
|
|
3111
3129
|
const proxyUrl = options.proxyUrl ?? SANDBOX_PROXY_URL;
|
|
3112
|
-
const { baseUrl, hostHeader } = resolveProxyTarget(proxyUrl, options.sandboxId);
|
|
3130
|
+
const { baseUrl, hostHeader, sandboxIdHeader } = resolveProxyTarget(proxyUrl, options.sandboxId);
|
|
3113
3131
|
this.baseUrl = baseUrl;
|
|
3114
3132
|
this.wsHeaders = {};
|
|
3115
3133
|
if (options.apiKey) {
|
|
@@ -3124,12 +3142,16 @@ var init_sandbox = __esm({
|
|
|
3124
3142
|
if (hostHeader) {
|
|
3125
3143
|
this.wsHeaders.Host = hostHeader;
|
|
3126
3144
|
}
|
|
3145
|
+
if (sandboxIdHeader) {
|
|
3146
|
+
this.wsHeaders["X-Tensorlake-Sandbox-Id"] = sandboxIdHeader;
|
|
3147
|
+
}
|
|
3127
3148
|
this.http = new HttpClient({
|
|
3128
3149
|
baseUrl,
|
|
3129
3150
|
apiKey: options.apiKey,
|
|
3130
3151
|
organizationId: options.organizationId,
|
|
3131
3152
|
projectId: options.projectId,
|
|
3132
3153
|
hostHeader,
|
|
3154
|
+
sandboxIdHeader,
|
|
3133
3155
|
routingHint: options.routingHint
|
|
3134
3156
|
});
|
|
3135
3157
|
}
|
|
@@ -3170,8 +3192,8 @@ var init_sandbox = __esm({
|
|
|
3170
3192
|
/**
|
|
3171
3193
|
* Attach to an existing sandbox and return a connected handle.
|
|
3172
3194
|
*
|
|
3173
|
-
*
|
|
3174
|
-
*
|
|
3195
|
+
* Returns immediately without contacting the server. Call `sandbox.info()`
|
|
3196
|
+
* to fetch the current state on demand. Does **not** auto-resume a suspended
|
|
3175
3197
|
* sandbox — call `sandbox.resume()` explicitly.
|
|
3176
3198
|
*/
|
|
3177
3199
|
static async connect(options) {
|
|
@@ -3181,15 +3203,12 @@ var init_sandbox = __esm({
|
|
|
3181
3203
|
/* _internal */
|
|
3182
3204
|
true
|
|
3183
3205
|
);
|
|
3184
|
-
const info = await client.get(options.sandboxId);
|
|
3185
3206
|
const sandbox = client.connect(
|
|
3186
|
-
|
|
3207
|
+
options.sandboxId,
|
|
3187
3208
|
options.proxyUrl,
|
|
3188
|
-
options.routingHint
|
|
3209
|
+
options.routingHint
|
|
3189
3210
|
);
|
|
3190
3211
|
sandbox.lifecycleClient = client;
|
|
3191
|
-
sandbox._setLifecycleIdentifier(info.sandboxId);
|
|
3192
|
-
sandbox._setName(info.name ?? null);
|
|
3193
3212
|
return sandbox;
|
|
3194
3213
|
}
|
|
3195
3214
|
// --- Static snapshot management ---
|
|
@@ -3213,6 +3232,26 @@ var init_sandbox = __esm({
|
|
|
3213
3232
|
);
|
|
3214
3233
|
await client.deleteSnapshot(snapshotId);
|
|
3215
3234
|
}
|
|
3235
|
+
/** List all sandboxes. No sandbox handle needed. */
|
|
3236
|
+
static async list(options) {
|
|
3237
|
+
const { SandboxClient: SandboxClient2 } = await Promise.resolve().then(() => (init_client(), client_exports));
|
|
3238
|
+
const client = new SandboxClient2(
|
|
3239
|
+
options,
|
|
3240
|
+
/* _internal */
|
|
3241
|
+
true
|
|
3242
|
+
);
|
|
3243
|
+
return client.list();
|
|
3244
|
+
}
|
|
3245
|
+
/** List all snapshots in the project. No sandbox handle needed. */
|
|
3246
|
+
static async listSnapshots(options) {
|
|
3247
|
+
const { SandboxClient: SandboxClient2 } = await Promise.resolve().then(() => (init_client(), client_exports));
|
|
3248
|
+
const client = new SandboxClient2(
|
|
3249
|
+
options,
|
|
3250
|
+
/* _internal */
|
|
3251
|
+
true
|
|
3252
|
+
);
|
|
3253
|
+
return client.listSnapshots();
|
|
3254
|
+
}
|
|
3216
3255
|
// --- Instance lifecycle methods ---
|
|
3217
3256
|
requireLifecycleClient(operation) {
|
|
3218
3257
|
if (!this.lifecycleClient) {
|
|
@@ -3222,6 +3261,14 @@ var init_sandbox = __esm({
|
|
|
3222
3261
|
}
|
|
3223
3262
|
return this.lifecycleClient;
|
|
3224
3263
|
}
|
|
3264
|
+
/** Fetch the current sandbox information from the server on demand. */
|
|
3265
|
+
async info() {
|
|
3266
|
+
const client = this.requireLifecycleClient("info");
|
|
3267
|
+
const info = await client.get(this.lifecycleIdentifier);
|
|
3268
|
+
this._setLifecycleIdentifier(info.sandboxId);
|
|
3269
|
+
this._setName(info.name ?? null);
|
|
3270
|
+
return info;
|
|
3271
|
+
}
|
|
3225
3272
|
/**
|
|
3226
3273
|
* Fetch the current sandbox status from the server.
|
|
3227
3274
|
*
|
|
@@ -3329,6 +3376,7 @@ var init_sandbox = __esm({
|
|
|
3329
3376
|
"/api/v1/processes/run",
|
|
3330
3377
|
{ json: body }
|
|
3331
3378
|
);
|
|
3379
|
+
const traceId = sseStream.traceId;
|
|
3332
3380
|
const stdoutLines = [];
|
|
3333
3381
|
const stderrLines = [];
|
|
3334
3382
|
let exitCode = -1;
|
|
@@ -3347,11 +3395,10 @@ var init_sandbox = __esm({
|
|
|
3347
3395
|
}
|
|
3348
3396
|
}
|
|
3349
3397
|
}
|
|
3350
|
-
return
|
|
3351
|
-
exitCode,
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
};
|
|
3398
|
+
return Object.assign(
|
|
3399
|
+
{ exitCode, stdout: stdoutLines.join("\n"), stderr: stderrLines.join("\n") },
|
|
3400
|
+
{ traceId }
|
|
3401
|
+
);
|
|
3355
3402
|
}
|
|
3356
3403
|
// --- Process management ---
|
|
3357
3404
|
/**
|
|
@@ -3381,7 +3428,7 @@ var init_sandbox = __esm({
|
|
|
3381
3428
|
"/api/v1/processes",
|
|
3382
3429
|
{ body: payload }
|
|
3383
3430
|
);
|
|
3384
|
-
return fromSnakeKeys(raw);
|
|
3431
|
+
return Object.assign(fromSnakeKeys(raw), { traceId: raw.traceId });
|
|
3385
3432
|
}
|
|
3386
3433
|
/** List all processes (running and exited) tracked by the sandbox daemon. */
|
|
3387
3434
|
async listProcesses() {
|
|
@@ -3398,7 +3445,7 @@ var init_sandbox = __esm({
|
|
|
3398
3445
|
"GET",
|
|
3399
3446
|
`/api/v1/processes/${pid}`
|
|
3400
3447
|
);
|
|
3401
|
-
return fromSnakeKeys(raw);
|
|
3448
|
+
return Object.assign(fromSnakeKeys(raw), { traceId: raw.traceId });
|
|
3402
3449
|
}
|
|
3403
3450
|
/** Send SIGKILL to a process. */
|
|
3404
3451
|
async killProcess(pid) {
|
|
@@ -3411,7 +3458,7 @@ var init_sandbox = __esm({
|
|
|
3411
3458
|
`/api/v1/processes/${pid}/signal`,
|
|
3412
3459
|
{ body: { signal } }
|
|
3413
3460
|
);
|
|
3414
|
-
return fromSnakeKeys(raw);
|
|
3461
|
+
return Object.assign(fromSnakeKeys(raw), { traceId: raw.traceId });
|
|
3415
3462
|
}
|
|
3416
3463
|
// --- Process I/O ---
|
|
3417
3464
|
/** Write bytes to a process's stdin. The process must have been started with `stdinMode: StdinMode.PIPE`. */
|
|
@@ -3431,7 +3478,7 @@ var init_sandbox = __esm({
|
|
|
3431
3478
|
"GET",
|
|
3432
3479
|
`/api/v1/processes/${pid}/stdout`
|
|
3433
3480
|
);
|
|
3434
|
-
return fromSnakeKeys(raw);
|
|
3481
|
+
return Object.assign(fromSnakeKeys(raw), { traceId: raw.traceId });
|
|
3435
3482
|
}
|
|
3436
3483
|
/** Return all captured stderr lines produced so far by a process. */
|
|
3437
3484
|
async getStderr(pid) {
|
|
@@ -3439,7 +3486,7 @@ var init_sandbox = __esm({
|
|
|
3439
3486
|
"GET",
|
|
3440
3487
|
`/api/v1/processes/${pid}/stderr`
|
|
3441
3488
|
);
|
|
3442
|
-
return fromSnakeKeys(raw);
|
|
3489
|
+
return Object.assign(fromSnakeKeys(raw), { traceId: raw.traceId });
|
|
3443
3490
|
}
|
|
3444
3491
|
/** Return all captured stdout+stderr lines produced so far by a process. */
|
|
3445
3492
|
async getOutput(pid) {
|
|
@@ -3447,7 +3494,7 @@ var init_sandbox = __esm({
|
|
|
3447
3494
|
"GET",
|
|
3448
3495
|
`/api/v1/processes/${pid}/output`
|
|
3449
3496
|
);
|
|
3450
|
-
return fromSnakeKeys(raw);
|
|
3497
|
+
return Object.assign(fromSnakeKeys(raw), { traceId: raw.traceId });
|
|
3451
3498
|
}
|
|
3452
3499
|
// --- Streaming (SSE) ---
|
|
3453
3500
|
/** Stream stdout events from a process until it exits. Yields one `OutputEvent` per line. */
|
|
@@ -3521,7 +3568,7 @@ var init_sandbox = __esm({
|
|
|
3521
3568
|
"GET",
|
|
3522
3569
|
`/api/v1/files/list?path=${encodeURIComponent(path2)}`
|
|
3523
3570
|
);
|
|
3524
|
-
return fromSnakeKeys(raw);
|
|
3571
|
+
return Object.assign(fromSnakeKeys(raw), { traceId: raw.traceId });
|
|
3525
3572
|
}
|
|
3526
3573
|
// --- PTY ---
|
|
3527
3574
|
/** Create an interactive PTY session. Returns a `sessionId` and `token` for WebSocket connection via `connectPty()`. */
|
|
@@ -3539,7 +3586,7 @@ var init_sandbox = __esm({
|
|
|
3539
3586
|
"/api/v1/pty",
|
|
3540
3587
|
{ body: payload }
|
|
3541
3588
|
);
|
|
3542
|
-
return fromSnakeKeys(raw);
|
|
3589
|
+
return Object.assign(fromSnakeKeys(raw), { traceId: raw.traceId });
|
|
3543
3590
|
}
|
|
3544
3591
|
/** Create a PTY session and connect to it immediately. Cleans up the session if the WebSocket connection fails. */
|
|
3545
3592
|
async createPty(options) {
|
|
@@ -3593,15 +3640,53 @@ var init_sandbox = __esm({
|
|
|
3593
3640
|
}
|
|
3594
3641
|
/** Connect to a sandbox VNC session for programmatic desktop control. */
|
|
3595
3642
|
async connectDesktop(options) {
|
|
3643
|
+
const port = options?.port ?? 5901;
|
|
3644
|
+
const connectTimeout = options?.connectTimeout ?? 10;
|
|
3645
|
+
const startMs = Date.now();
|
|
3646
|
+
const deadlineMs = startMs + connectTimeout * 1e3;
|
|
3647
|
+
await this.waitForPortReady(port, deadlineMs);
|
|
3648
|
+
const remainingSecs = Math.max(0.1, (deadlineMs - Date.now()) / 1e3);
|
|
3596
3649
|
return Desktop.connect({
|
|
3597
3650
|
baseUrl: this.baseUrl,
|
|
3598
3651
|
wsHeaders: this.wsHeaders,
|
|
3599
|
-
port
|
|
3652
|
+
port,
|
|
3600
3653
|
password: options?.password,
|
|
3601
3654
|
shared: options?.shared,
|
|
3602
|
-
connectTimeout:
|
|
3655
|
+
connectTimeout: remainingSecs
|
|
3603
3656
|
});
|
|
3604
3657
|
}
|
|
3658
|
+
/**
|
|
3659
|
+
* Poll the in-sandbox daemon until `127.0.0.1:port` accepts a TCP connection.
|
|
3660
|
+
* Uses `bash`'s `/dev/tcp` builtin via `processes/run` — no extra deps in
|
|
3661
|
+
* the sandbox image. `bash` is present on every image we ship.
|
|
3662
|
+
*/
|
|
3663
|
+
async waitForPortReady(port, deadlineMs) {
|
|
3664
|
+
const probeIntervalMs = 250;
|
|
3665
|
+
const probeProcessTimeoutSecs = 2;
|
|
3666
|
+
let lastError;
|
|
3667
|
+
while (Date.now() < deadlineMs) {
|
|
3668
|
+
try {
|
|
3669
|
+
const result = await this.run("/bin/bash", {
|
|
3670
|
+
args: ["-c", `exec 3<>/dev/tcp/127.0.0.1/${port}`],
|
|
3671
|
+
timeout: probeProcessTimeoutSecs
|
|
3672
|
+
});
|
|
3673
|
+
if (result.exitCode === 0) {
|
|
3674
|
+
return;
|
|
3675
|
+
}
|
|
3676
|
+
} catch (error) {
|
|
3677
|
+
lastError = error;
|
|
3678
|
+
}
|
|
3679
|
+
const remainingMs = deadlineMs - Date.now();
|
|
3680
|
+
if (remainingMs <= 0) break;
|
|
3681
|
+
await new Promise(
|
|
3682
|
+
(resolve) => setTimeout(resolve, Math.min(probeIntervalMs, remainingMs))
|
|
3683
|
+
);
|
|
3684
|
+
}
|
|
3685
|
+
const detail = lastError instanceof Error ? `: ${lastError.message}` : "";
|
|
3686
|
+
throw new SandboxError(
|
|
3687
|
+
`port ${port} did not become reachable inside sandbox within the connect timeout${detail}`
|
|
3688
|
+
);
|
|
3689
|
+
}
|
|
3605
3690
|
ptyWsUrl(sessionId, token) {
|
|
3606
3691
|
let wsBase;
|
|
3607
3692
|
if (this.baseUrl.startsWith("https://")) {
|
|
@@ -3620,15 +3705,15 @@ var init_sandbox = __esm({
|
|
|
3620
3705
|
"GET",
|
|
3621
3706
|
"/api/v1/health"
|
|
3622
3707
|
);
|
|
3623
|
-
return fromSnakeKeys(raw);
|
|
3708
|
+
return Object.assign(fromSnakeKeys(raw), { traceId: raw.traceId });
|
|
3624
3709
|
}
|
|
3625
3710
|
/** Get sandbox daemon info (version, uptime, process counts). */
|
|
3626
|
-
async
|
|
3711
|
+
async daemonInfo() {
|
|
3627
3712
|
const raw = await this.http.requestJson(
|
|
3628
3713
|
"GET",
|
|
3629
3714
|
"/api/v1/info"
|
|
3630
3715
|
);
|
|
3631
|
-
return fromSnakeKeys(raw);
|
|
3716
|
+
return Object.assign(fromSnakeKeys(raw), { traceId: raw.traceId });
|
|
3632
3717
|
}
|
|
3633
3718
|
};
|
|
3634
3719
|
}
|
|
@@ -3721,7 +3806,7 @@ var init_client = __esm({
|
|
|
3721
3806
|
this.namespace = options?.namespace ?? NAMESPACE;
|
|
3722
3807
|
this.local = isLocalhost(this.apiUrl);
|
|
3723
3808
|
this.http = new HttpClient({
|
|
3724
|
-
baseUrl: this.apiUrl,
|
|
3809
|
+
baseUrl: resolveSandboxLifecycleUrl(this.apiUrl),
|
|
3725
3810
|
apiKey: this.apiKey,
|
|
3726
3811
|
organizationId: this.organizationId,
|
|
3727
3812
|
projectId: this.projectId,
|
|
@@ -3789,7 +3874,7 @@ var init_client = __esm({
|
|
|
3789
3874
|
"GET",
|
|
3790
3875
|
this.path(`sandboxes/${sandboxId}`)
|
|
3791
3876
|
);
|
|
3792
|
-
return fromSnakeKeys(raw, "sandboxId");
|
|
3877
|
+
return Object.assign(fromSnakeKeys(raw, "sandboxId"), { traceId: raw.traceId });
|
|
3793
3878
|
}
|
|
3794
3879
|
/** List all sandboxes in the namespace. */
|
|
3795
3880
|
async list() {
|
|
@@ -3820,7 +3905,7 @@ var init_client = __esm({
|
|
|
3820
3905
|
this.path(`sandboxes/${sandboxId}`),
|
|
3821
3906
|
{ body }
|
|
3822
3907
|
);
|
|
3823
|
-
return fromSnakeKeys(raw, "sandboxId");
|
|
3908
|
+
return Object.assign(fromSnakeKeys(raw, "sandboxId"), { traceId: raw.traceId });
|
|
3824
3909
|
}
|
|
3825
3910
|
/** Get the current proxy port settings for a sandbox. */
|
|
3826
3911
|
async getPortAccess(sandboxId) {
|
|
@@ -3962,7 +4047,7 @@ var init_client = __esm({
|
|
|
3962
4047
|
"GET",
|
|
3963
4048
|
this.path(`snapshots/${snapshotId}`)
|
|
3964
4049
|
);
|
|
3965
|
-
return fromSnakeKeys(raw, "snapshotId");
|
|
4050
|
+
return Object.assign(fromSnakeKeys(raw, "snapshotId"), { traceId: raw.traceId });
|
|
3966
4051
|
}
|
|
3967
4052
|
/** List all snapshots in the namespace. */
|
|
3968
4053
|
async listSnapshots() {
|