@tangle-network/sandbox 1.0.209 → 1.0.211
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/agent/index.d.ts +4 -4
- package/dist/agent/index.js +4 -4
- package/dist/agent/preview.d.ts +1 -1
- package/dist/agent/preview.js +2 -2
- package/dist/{agent-run-outcome-DdYlpMUM.d.ts → agent-run-outcome-CP2N40aT.d.ts} +2 -2
- package/dist/{api-request-DJKK0J5o.js → api-request-BDfrz_c1.js} +13 -23
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/index.js +2 -2
- package/dist/{browser-interactive-control-controller-BGxBBCcH.d.ts → browser-interactive-control-controller-7wyaNSvi.d.ts} +1 -1
- package/dist/{browser-interactive-control-controller-uNdUXYAZ.js → browser-interactive-control-controller-BiP6TJFP.js} +1 -1
- package/dist/{chunked-upload-C_8f9f5N.js → chunked-upload-D6ZCQ-iN.js} +13 -10
- package/dist/{chunked-upload-file-Cpz3hZns.js → chunked-upload-file-D3YxQdAl.js} +1 -1
- package/dist/cli-auth-bundle-CMJWI99l.js +2 -0
- package/dist/{client-x02QUDSJ.d.ts → client-DiLd0XGB.d.ts} +5 -5
- package/dist/{client-CUgcOsHm.js → client-qWjcDhXp.js} +16 -15
- package/dist/collaboration/index.d.ts +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/{core-Dzkfkveq.js → core-C1GtjHOv.js} +4 -4
- package/dist/core.d.ts +6 -6
- package/dist/core.js +4 -4
- package/dist/{direct-http2-Bojg02xf.js → direct-http2-DU2SK2Wo.js} +1 -1
- package/dist/{index-CfUk7Yhe.d.ts → index-DyFU9hy7.d.ts} +8 -9
- package/dist/index.d.ts +11 -11
- package/dist/index.js +10 -10
- package/dist/intelligence/index.js +2 -2
- package/dist/interactive-control.d.ts +1 -1
- package/dist/interactive-control.js +1 -1
- package/dist/{interactive-controller-CGlW4Qfp.d.ts → interactive-controller-BzObb8aT.d.ts} +3 -3
- package/dist/{interactive-controller-CGiztnGI.js → interactive-controller-C-CuPVMA.js} +8 -7
- package/dist/lib/prepared-evidence.js +1 -1
- package/dist/lib/prepared-process.js +1 -1
- package/dist/{lines-fyzHzsrx.d.ts → lines-D0dHQ3X5.d.ts} +1 -1
- package/dist/lines.d.ts +1 -1
- package/dist/lines.js +1 -1
- package/dist/{local-cli-auth-CWWDeQ7N.js → local-cli-auth-CPS9yuTc.js} +1 -1
- package/dist/{mcp-local-lPwHM1Zr.js → mcp-local-D5RfqwD9.js} +3 -3
- package/dist/{prepared-evidence-COEcexVv.js → prepared-evidence--rjwnXGD.js} +1 -1
- package/dist/{prepared-process-CS919ksO.js → prepared-process-N-y0xr9S.js} +1 -1
- package/dist/{preview-Bdwy9Rsw.d.ts → preview-CrXG9Y8a.d.ts} +3 -3
- package/dist/{public-templates-DCVYfNbP.d.ts → public-templates-Ba-DTf2O.d.ts} +2 -2
- package/dist/public-templates.d.ts +1 -1
- package/dist/{raw-evidence-archive-Zc02SC0U.js → raw-evidence-archive-DrgeV9_0.js} +2 -2
- package/dist/retry-policy-0_NCh5OB.js +88 -0
- package/dist/runtime.d.ts +5 -5
- package/dist/runtime.js +4 -4
- package/dist/{sandbox-BsAn3XVC.js → sandbox-Bk7OST2r.js} +107 -105
- package/dist/{secp256k1-CZWrpqxW.js → secp256k1-Cbp9tbkX.js} +1 -1
- package/dist/select-seat-command.d.ts +1 -1
- package/dist/session-gateway/index.js +3 -3
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-DyLXpfYy.js → tangle-Bv_mdVIp.js} +3 -3
- package/dist/{types-f5nWlpOq.d.ts → types-BE70nj5h.d.ts} +4 -4
- package/package.json +5 -5
- package/dist/cli-auth-bundle-jlkQA2D8.js +0 -2
- /package/dist/{abort-signal-C0_9B1Hm.js → abort-signal-BbJTt2QJ.js} +0 -0
- /package/dist/{cli-auth-bundle-C6DtK7GX-DJH6vfkJ.js → cli-auth-bundle-C6DtK7GX-BbbiAn-Z.js} +0 -0
- /package/dist/{cli-auth-bundle-COQ25k3d.d.ts → cli-auth-bundle-Wg3x2hd2.d.ts} +0 -0
- /package/dist/{collaboration-BAx-A7gz.js → collaboration-BgSGO1KD.js} +0 -0
- /package/dist/{file-download-BYaUfv8d.js → file-download-DrzpcvdM.js} +0 -0
- /package/dist/{index-Dslyq85a.d.ts → index-CDtEPygc.d.ts} +0 -0
- /package/dist/{index-Dqcr9p97.d.ts → index-YbAo-so_.d.ts} +0 -0
- /package/dist/{keep-alive-fetch-BbSFbRCd.js → keep-alive-fetch-BIaDMUtu.js} +0 -0
- /package/dist/{lines-D4kRkYfv.js → lines-DHOIUO-t.js} +0 -0
- /package/dist/{preview-operations-BvgwYaoL.js → preview-operations-B3TTvqlm.js} +0 -0
- /package/dist/{sidecar-proxy-error-5DpLmHeN.js → sidecar-proxy-error-DpBLxIof.js} +0 -0
- /package/dist/{sse-parser-CV6Jp-Am.js → sse-parser-DOCszo1K.js} +0 -0
- /package/dist/{terminal-stream-types-DxFpAmqp.d.ts → terminal-stream-types-DeH8FF0d.d.ts} +0 -0
- /package/dist/{utils-vaFoyyiO.js → utils-CK-x8vXj.js} +0 -0
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { A as normalizeRuntimeBackendConfig, C as encodeTextForWire, D as applyRequestedModel, F as withoutRuntimeSecrets, I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, M as requestedSecretProfilePublicDigest, O as assertCurrentBackendType, S as encodePromptForWire, T as canUseNodeHttp2, W as normalizeEffectiveBackend, _ as isTraceId, a as assertScopedTokenActive, b as resolveDispatchRunIdentity, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as callHeaders, g as TRACE_ID_HEADER, h as isRetryableCredentialRefusal, i as terminalUpgradeHeadersSupported, j as requestedPublicProfileDigest, k as mergeRuntimeBackendConfig, l as normalizeSessionInfo, m as assertFileWritePreconditions, n as InteractiveSessionController, p as sessionHeaders, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as mintTraceId, w as runtimeFilesystemPath, x as validateAcceptedDispatchRunRef, y as resolveTraceId } from "./interactive-controller-
|
|
1
|
+
import { A as normalizeRuntimeBackendConfig, C as encodeTextForWire, D as applyRequestedModel, F as withoutRuntimeSecrets, I as createAgentRunOutcomeTracker, L as deriveAgentResultOutcome, M as requestedSecretProfilePublicDigest, O as assertCurrentBackendType, S as encodePromptForWire, T as canUseNodeHttp2, W as normalizeEffectiveBackend, _ as isTraceId, a as assertScopedTokenActive, b as resolveDispatchRunIdentity, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as callHeaders, g as TRACE_ID_HEADER, h as isRetryableCredentialRefusal, i as terminalUpgradeHeadersSupported, j as requestedPublicProfileDigest, k as mergeRuntimeBackendConfig, l as normalizeSessionInfo, m as assertFileWritePreconditions, n as InteractiveSessionController, p as sessionHeaders, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as mintTraceId, w as runtimeFilesystemPath, x as validateAcceptedDispatchRunRef, y as resolveTraceId } from "./interactive-controller-C-CuPVMA.js";
|
|
2
2
|
import { C as boundedIdentifierSchema, E as boundedStringSchema, g as sha256DigestSchema$1, o as canonicalCandidateDigest$1, s as canonicalCandidateJson$1, u as isCanonicalJsonValue$1 } from "./harness-DMaNgn0S.js";
|
|
3
3
|
import { t as sha256 } from "./sha2-vu4U-x2L.js";
|
|
4
|
-
import { A as agentInteractiveSessionStatusMatchesRef, B as PlanContinuationSchema, C as AgentInteractiveSessionStopAcknowledgementSchema, D as agentInteractiveSessionControlClaimMatchesRef, E as agentInteractiveSessionControlClaimIsNewer, F as AgentRunCancellationAcknowledgementSchema, G as InteractionResponseSchema, H as InteractionBindingSchema, I as AgentRunCancellationRequestSchema, L as agentRunCancellationAcknowledgementMatchesRequest, M as agentInteractiveDimensionSchema, N as sameAgentExactRun, O as agentInteractiveSessionPromptAcknowledgementMatchesCommand, P as AgentExactRunControlRefSchema, S as AgentInteractiveSessionStatusSchema, T as agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, U as InteractionRequestSchema, V as InteractionAcknowledgementSchema, W as InteractionResponseCommandSchema, _ as AgentInteractiveSessionControlClaimRequestSchema, b as AgentInteractiveSessionPromptCommandSchema, d as interactiveSessionControlClaimResponseSchema, f as interactiveSessionControlReleaseResponseSchema, g as AgentInteractiveSessionControlClaimAcknowledgementSchema, h as AgentInteractiveSessionAttachSchema, j as agentInteractiveSessionStopAcknowledgementMatchesCommand, l as createInteractiveControlHolderId, m as interactiveSessionStatusResponseSchema, p as interactiveSessionControlValidationResponseSchema, v as AgentInteractiveSessionControlClaimSchema, w as AgentInteractiveSessionStopCommandSchema, x as AgentInteractiveSessionRefSchema, y as AgentInteractiveSessionPromptAcknowledgementSchema } from "./browser-interactive-control-controller-
|
|
4
|
+
import { A as agentInteractiveSessionStatusMatchesRef, B as PlanContinuationSchema, C as AgentInteractiveSessionStopAcknowledgementSchema, D as agentInteractiveSessionControlClaimMatchesRef, E as agentInteractiveSessionControlClaimIsNewer, F as AgentRunCancellationAcknowledgementSchema, G as InteractionResponseSchema, H as InteractionBindingSchema, I as AgentRunCancellationRequestSchema, L as agentRunCancellationAcknowledgementMatchesRequest, M as agentInteractiveDimensionSchema, N as sameAgentExactRun, O as agentInteractiveSessionPromptAcknowledgementMatchesCommand, P as AgentExactRunControlRefSchema, S as AgentInteractiveSessionStatusSchema, T as agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, U as InteractionRequestSchema, V as InteractionAcknowledgementSchema, W as InteractionResponseCommandSchema, _ as AgentInteractiveSessionControlClaimRequestSchema, b as AgentInteractiveSessionPromptCommandSchema, d as interactiveSessionControlClaimResponseSchema, f as interactiveSessionControlReleaseResponseSchema, g as AgentInteractiveSessionControlClaimAcknowledgementSchema, h as AgentInteractiveSessionAttachSchema, j as agentInteractiveSessionStopAcknowledgementMatchesCommand, l as createInteractiveControlHolderId, m as interactiveSessionStatusResponseSchema, p as interactiveSessionControlValidationResponseSchema, v as AgentInteractiveSessionControlClaimSchema, w as AgentInteractiveSessionStopCommandSchema, x as AgentInteractiveSessionRefSchema, y as AgentInteractiveSessionPromptAcknowledgementSchema } from "./browser-interactive-control-controller-BiP6TJFP.js";
|
|
5
5
|
import { a as ProxySecretReceiptSchema, o as canonicalAgentProfileValue, r as agentProfileSchema } from "./profile-schema-C1KpT-wS.js";
|
|
6
6
|
import { C as ServerError, D as ValidationError, E as TimeoutError, S as SandboxError, T as StreamInterruptedError, _ as NotFoundError, a as readResponseJson, d as EdgeNotReadyError, g as NetworkError, i as parseResponseError, l as CapabilityError, n as isTransientWrite, o as retryWhen, r as parseErrorResponse, s as AuthError, t as TerminalStreamError, w as StateError, y as ProfileFileMountPathError } from "./errors-CNszZUZ2.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-BbJTt2QJ.js";
|
|
8
|
+
import { a as backoffDelayMs, r as abortableSleep } from "./retry-policy-0_NCh5OB.js";
|
|
9
9
|
import { a as SANDBOX_PROXY_REQUEST_MAX_BYTES, c as PROFILE_FILE_MOUNT_OUTSIDE_ROOTS_CODE, d as isProfileFileMountOutsideRoots, f as profileFileMountOutsideRootsMessage, l as SANDBOX_AGENT_HOME, o as FILE_OPERATION_LIMITS, u as SANDBOX_FILE_API_ABSOLUTE_ROOTS } from "./file-transfer-BSe4ayU9.js";
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import {
|
|
14
|
-
import { t as
|
|
15
|
-
import {
|
|
16
|
-
import "./cli-auth-bundle-
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
10
|
+
import { c as awaitSdkResend, l as countSdkRequest, s as uploadChunked, u as takeSdkTurn } from "./chunked-upload-D6ZCQ-iN.js";
|
|
11
|
+
import { a as rewrapResponse, i as isReplayableBody, t as IDEMPOTENT_METHODS } from "./api-request-BDfrz_c1.js";
|
|
12
|
+
import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-BIaDMUtu.js";
|
|
13
|
+
import { t as SIDECAR_PROXY_ERROR_HEADER } from "./sidecar-proxy-error-DpBLxIof.js";
|
|
14
|
+
import { t as parseSSEStream } from "./sse-parser-DOCszo1K.js";
|
|
15
|
+
import { t as runPreparedProcess } from "./prepared-process-N-y0xr9S.js";
|
|
16
|
+
import { a as isBackendType, r as cliAuthReferenceSchema } from "./cli-auth-bundle-C6DtK7GX-BbbiAn-Z.js";
|
|
17
|
+
import "./cli-auth-bundle-CMJWI99l.js";
|
|
18
|
+
import { n as SandboxLines } from "./lines-DHOIUO-t.js";
|
|
19
|
+
import { t as downloadFile } from "./file-download-DrzpcvdM.js";
|
|
19
20
|
import { z } from "zod";
|
|
20
21
|
import { createHash } from "node:crypto";
|
|
21
22
|
import { constants } from "node:fs";
|
|
@@ -261,13 +262,9 @@ const DEFAULT_CREATE_TIMEOUT_MS = 12e4;
|
|
|
261
262
|
const DEFAULT_GPU_CREATE_TIMEOUT_MS = 900 * 1e3;
|
|
262
263
|
const CREATE_RETRY_MAX_DELAY_MS = 4e3;
|
|
263
264
|
/**
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
* internal owner paced behind customers. Re-POSTing is safe: the idempotency
|
|
268
|
-
* key joins whichever provision did start. `SANDBOX_CREATE_RECONCILING` is
|
|
269
|
-
* deliberately absent: it follows a retained real failure and outlasts any
|
|
270
|
-
* budget here.
|
|
265
|
+
* 503s that mean "the cell cannot place this now, ask again"; re-POSTing is
|
|
266
|
+
* safe because the key joins any provision that did start.
|
|
267
|
+
* `SANDBOX_CREATE_RECONCILING` is absent: it outlasts any budget here.
|
|
271
268
|
*/
|
|
272
269
|
const DEPLOY_WINDOW_RETRY_CODES = new Set([
|
|
273
270
|
"INTERNAL_CREATE_PACED",
|
|
@@ -311,32 +308,28 @@ function isDeployWindowCreateError(cause) {
|
|
|
311
308
|
}
|
|
312
309
|
/** A no-room refusal allocated nothing, so a create giving up on one reports this typed 503. */
|
|
313
310
|
const isCapacityShortageCreateError = (cause) => isDeployWindowCreateError(cause) && (cause.code === "CAPACITY_EXHAUSTED" || cause.code === "HOST_PRESSURE");
|
|
314
|
-
/**
|
|
315
|
-
* The plan rate limiter's 429 (a quota 429 is final). Answered right after a
|
|
316
|
-
* capacity refusal on the same key it is part of that pacing: retried on its
|
|
317
|
-
* own `Retry-After` on the time budget, spending none of the attempt budget.
|
|
318
|
-
*/
|
|
311
|
+
/** The plan limiter's 429 (a quota 429 is final), paced on its own `Retry-After` within the time budget. */
|
|
319
312
|
function isRateLimitCreateError(cause) {
|
|
320
313
|
return retryWhen(cause) && cause.status === 429;
|
|
321
314
|
}
|
|
322
|
-
/**
|
|
323
|
-
* Create retries what the catalog marks retryable (a 524 is a `TIMEOUT`, so a
|
|
324
|
-
* key that a proxy cut off is joined), except a 409, which create never
|
|
325
|
-
* retried, and a customer-floor hold: the cell keeps that room for customers
|
|
326
|
-
* and a re-POST meets the same hold.
|
|
327
|
-
*/
|
|
315
|
+
/** Create retries what the catalog marks retryable (a 524 `TIMEOUT` joins its key), except a 409 and a customer-floor hold. */
|
|
328
316
|
function isRetryableCreateError(cause) {
|
|
329
317
|
return retryWhen(cause) && cause.status !== 409 && !cause.capacityHold;
|
|
330
318
|
}
|
|
331
|
-
/**
|
|
332
|
-
* Longest wait on an `IDEMPOTENT_CREATE_PROBE_FAILED` `Retry-After`: the
|
|
333
|
-
* probe answers again within seconds, and an upstream 11.8 s hint ended a
|
|
334
|
-
* create on 10-26 instead of re-probing.
|
|
335
|
-
*/
|
|
319
|
+
/** Longest wait on an `IDEMPOTENT_CREATE_PROBE_FAILED` `Retry-After`: the probe answers again within seconds. */
|
|
336
320
|
const PROBE_FAILED_MAX_DELAY_MS = 5e3;
|
|
321
|
+
function createRetryAfterMs(cause) {
|
|
322
|
+
if (!(cause instanceof SandboxError) || cause.retryAfterMs === void 0) return void 0;
|
|
323
|
+
return cause.code === "IDEMPOTENT_CREATE_PROBE_FAILED" ? Math.min(cause.retryAfterMs, PROBE_FAILED_MAX_DELAY_MS) : cause.retryAfterMs;
|
|
324
|
+
}
|
|
337
325
|
function createRetryDelayMs(cause, failedAttempt) {
|
|
338
|
-
|
|
339
|
-
|
|
326
|
+
return backoffDelayMs(failedAttempt, createRetryAfterMs(cause), CREATE_RETRY_MAX_DELAY_MS);
|
|
327
|
+
}
|
|
328
|
+
/** Wait `delayMs`, and a re-send the server did not pace also its budget turn; throws when that falls past `deadline`. */
|
|
329
|
+
async function awaitCreateResend(delayMs, deadline, signal, cause) {
|
|
330
|
+
const turnMs = createRetryAfterMs(cause) !== void 0 ? 0 : takeSdkTurn(deadline - Date.now() - delayMs);
|
|
331
|
+
if (turnMs === void 0) throw new Error("No retry turn before deadline");
|
|
332
|
+
await abortableSleep(Math.max(delayMs, turnMs), signal);
|
|
340
333
|
}
|
|
341
334
|
function generateIdempotencyKey() {
|
|
342
335
|
const c = globalThis.crypto;
|
|
@@ -353,13 +346,15 @@ function generateIdempotencyKey() {
|
|
|
353
346
|
* the keyed POST through a gateway 502, 503 or 504.
|
|
354
347
|
*/
|
|
355
348
|
async function retryForkRefusal(post) {
|
|
356
|
-
const
|
|
349
|
+
const deadlineAt = Date.now() + DEPLOY_WINDOW_RETRY_MS;
|
|
357
350
|
for (let failed = 1;; failed++) try {
|
|
358
351
|
return await post();
|
|
359
352
|
} catch (cause) {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
353
|
+
if (!isDeployWindowCreateError(cause) || !await awaitSdkResend(failed, {
|
|
354
|
+
retryAfterMs: createRetryAfterMs(cause),
|
|
355
|
+
deadlineAt,
|
|
356
|
+
capMs: 4e3
|
|
357
|
+
})) throw cause;
|
|
363
358
|
}
|
|
364
359
|
}
|
|
365
360
|
//#endregion
|
|
@@ -3055,8 +3050,9 @@ var DirectRuntimeHttpClient = class {
|
|
|
3055
3050
|
path
|
|
3056
3051
|
};
|
|
3057
3052
|
if (!route) throw new NetworkError("Direct runtime route was withdrawn");
|
|
3053
|
+
countSdkRequest();
|
|
3058
3054
|
if ((route.useHost || route.useExec) && canUseNodeHttp2()) {
|
|
3059
|
-
const { fetchDirectHttp2 } = await import("./direct-http2-
|
|
3055
|
+
const { fetchDirectHttp2 } = await import("./direct-http2-DU2SK2Wo.js");
|
|
3060
3056
|
return fetchDirectHttp2(route.url, request, timing);
|
|
3061
3057
|
}
|
|
3062
3058
|
return fetchWithKeepAlive(route.url, request, timing);
|
|
@@ -3389,13 +3385,12 @@ function profileFileBundleKey(mounts) {
|
|
|
3389
3385
|
files: profileBundleFileTable(mounts)
|
|
3390
3386
|
});
|
|
3391
3387
|
}
|
|
3388
|
+
//#endregion
|
|
3389
|
+
//#region src/profile-file-failure.ts
|
|
3392
3390
|
const PROFILE_FILE_MOUNT_RETRY_MAX_MS = 2e3;
|
|
3393
3391
|
/**
|
|
3394
|
-
* Wall-clock ceiling for
|
|
3395
|
-
*
|
|
3396
|
-
* 3 s key-verification budget, so this admits about three such attempts: it
|
|
3397
|
-
* rides out a stall of a few seconds without holding create() through a
|
|
3398
|
-
* platform restart, which the caller is better told about.
|
|
3392
|
+
* Wall-clock ceiling for re-sending one undecided file API batch write: it
|
|
3393
|
+
* rides a stall of a few seconds, not a platform restart the caller should hear of.
|
|
3399
3394
|
*/
|
|
3400
3395
|
const PROFILE_FILE_MOUNT_WRITE_RETRY_BUDGET_MS = 1e4;
|
|
3401
3396
|
var ProfileFileMountExecTimeoutError = class extends Error {
|
|
@@ -3564,10 +3559,11 @@ async function writeBatchRidingOutUndecided(write, maxRetries) {
|
|
|
3564
3559
|
await write();
|
|
3565
3560
|
return;
|
|
3566
3561
|
} catch (err) {
|
|
3567
|
-
if (!(retryWhen(err) && (err instanceof NetworkError || err.status >= 502 && !(err instanceof TimeoutError))) || attempt >= maxRetries
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3562
|
+
if (!(retryWhen(err) && (err instanceof NetworkError || err.status >= 502 && !(err instanceof TimeoutError))) || attempt >= maxRetries || !await awaitSdkResend(attempt + 1, {
|
|
3563
|
+
retryAfterMs: retryAfterMs(err),
|
|
3564
|
+
deadlineAt: startedAt + PROFILE_FILE_MOUNT_WRITE_RETRY_BUDGET_MS,
|
|
3565
|
+
capMs: 2e3
|
|
3566
|
+
})) throw err;
|
|
3571
3567
|
}
|
|
3572
3568
|
}
|
|
3573
3569
|
//#endregion
|
|
@@ -3759,7 +3755,7 @@ function isFileApiRootOnlyError(error) {
|
|
|
3759
3755
|
//#endregion
|
|
3760
3756
|
//#region src/profile-file-mounts.ts
|
|
3761
3757
|
const PROFILE_FILE_MOUNT_B64_CHUNK_CHARS = 3e3;
|
|
3762
|
-
const PROFILE_FILE_MOUNT_MAX_RETRIES =
|
|
3758
|
+
const PROFILE_FILE_MOUNT_MAX_RETRIES = 6;
|
|
3763
3759
|
const PROFILE_FILE_MOUNT_EXEC_TIMEOUT_MS = 3e4;
|
|
3764
3760
|
async function execProfileFileMount(box, mount, content, options, execState) {
|
|
3765
3761
|
const maxRetries = options.maxRetries ?? PROFILE_FILE_MOUNT_MAX_RETRIES;
|
|
@@ -3783,11 +3779,11 @@ async function execProfileFileMount(box, mount, content, options, execState) {
|
|
|
3783
3779
|
return await execWithTimeout(box, cmd, options.execTimeoutMs);
|
|
3784
3780
|
} catch (err) {
|
|
3785
3781
|
const { retryable, retryAfterMs: retryAfter } = transientExecError(err);
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
}
|
|
3782
|
+
const capMs = PROFILE_FILE_MOUNT_RETRY_MAX_MS;
|
|
3783
|
+
if (retryable && attempt < maxRetries && await awaitSdkResend(attempt + 1, {
|
|
3784
|
+
retryAfterMs: retryAfter === void 0 ? void 0 : Math.min(retryAfter, capMs),
|
|
3785
|
+
capMs
|
|
3786
|
+
})) continue;
|
|
3791
3787
|
throw new ProfileFileMaterializeError(`materializeProfileFileMounts: exec failed for ${path}`, { cause: err });
|
|
3792
3788
|
}
|
|
3793
3789
|
}
|
|
@@ -4361,26 +4357,40 @@ var SandboxOperation = class SandboxOperation {
|
|
|
4361
4357
|
* with a succeeded operation; throws {@link SandboxOperationFailedError} on
|
|
4362
4358
|
* a failed one and {@link TimeoutError} past `timeoutMs` (default 10 min).
|
|
4363
4359
|
* The verb was accepted, so a read that was lost, timed out or refused
|
|
4364
|
-
* retryably says nothing about it: read again
|
|
4365
|
-
*
|
|
4360
|
+
* retryably says nothing about it: read again on the shared retry pacing
|
|
4361
|
+
* (the server's Retry-After, else full jitter, and the client's retry budget).
|
|
4366
4362
|
*/
|
|
4367
4363
|
async wait(options = {}) {
|
|
4368
4364
|
const timeoutMs = options.timeoutMs ?? DEFAULT_WAIT_TIMEOUT_MS;
|
|
4369
4365
|
const startedAt = Date.now();
|
|
4370
4366
|
const { signal } = options;
|
|
4371
|
-
let [delayMs, capMs] = [
|
|
4367
|
+
let [delayMs, capMs, failedReads] = [
|
|
4368
|
+
0,
|
|
4369
|
+
0,
|
|
4370
|
+
0
|
|
4371
|
+
];
|
|
4372
4372
|
let info;
|
|
4373
|
+
const timedOut = (cause) => new TimeoutError(`Timed out waiting for ${this.#info.kind} operation ${this.#info.id} (last state ${this.#info.state})`, {
|
|
4374
|
+
timeoutMs,
|
|
4375
|
+
cause
|
|
4376
|
+
});
|
|
4373
4377
|
while (!info || !isTerminalOperation(info)) {
|
|
4374
|
-
if (Date.now() - startedAt + delayMs > timeoutMs) throw
|
|
4375
|
-
signal
|
|
4376
|
-
if (delayMs > 0) await abortableSleep(delayMs, signal);
|
|
4378
|
+
if (Date.now() - startedAt + delayMs > timeoutMs) throw timedOut();
|
|
4379
|
+
await abortableSleep(delayMs, signal);
|
|
4377
4380
|
capMs = Math.min(Math.max(capMs * 2, FIRST_POLL_MS), MAX_POLL_MS);
|
|
4378
4381
|
try {
|
|
4379
4382
|
info = await this.refresh({ signal });
|
|
4380
|
-
delayMs = capMs;
|
|
4383
|
+
[delayMs, failedReads] = [capMs, 0];
|
|
4381
4384
|
} catch (error) {
|
|
4382
4385
|
if (!retryWhen(error) || error.code === "UPSTREAM_CONTRACT_VIOLATION") throw error;
|
|
4383
|
-
|
|
4386
|
+
const deadlineAt = startedAt + timeoutMs;
|
|
4387
|
+
const pacing = {
|
|
4388
|
+
retryAfterMs: error.retryAfterMs,
|
|
4389
|
+
signal,
|
|
4390
|
+
deadlineAt
|
|
4391
|
+
};
|
|
4392
|
+
if (!await awaitSdkResend(++failedReads, pacing)) throw timedOut(error);
|
|
4393
|
+
delayMs = 0;
|
|
4384
4394
|
}
|
|
4385
4395
|
}
|
|
4386
4396
|
signal?.throwIfAborted();
|
|
@@ -5447,9 +5457,6 @@ var SandboxLifecycleEventsCapabilities = class extends SandboxPreviewCapabilitie
|
|
|
5447
5457
|
});
|
|
5448
5458
|
return connection?.edgeStatus !== "pending" && Boolean(connection?.hostUrl || connection?.execHost || connection?.runtimeUrl);
|
|
5449
5459
|
}
|
|
5450
|
-
sleep(ms) {
|
|
5451
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
5452
|
-
}
|
|
5453
5460
|
};
|
|
5454
5461
|
//#endregion
|
|
5455
5462
|
//#region src/sandbox-lifecycle.ts
|
|
@@ -5582,19 +5589,13 @@ var SandboxLifecycleCapabilities = class extends SandboxLifecycleEventsCapabilit
|
|
|
5582
5589
|
}
|
|
5583
5590
|
};
|
|
5584
5591
|
/**
|
|
5585
|
-
* How long a lifecycle call re-attempts a refusal that only asks it to wait
|
|
5586
|
-
* `resume`, `stop` and `delete` share one lease per sandbox,
|
|
5587
|
-
*
|
|
5588
|
-
*
|
|
5589
|
-
*
|
|
5590
|
-
* provider-seam runs (agent-sdk#280) lost a completed turn to it. A
|
|
5591
|
-
* lease-store or storage outage answers 503 (us1 2026-11-01: 16/16 child
|
|
5592
|
-
* deletes failed through a Platform deploy that had removed every child). The
|
|
5593
|
-
* ceiling (~11 s) is short: a longer conflict is a real concurrent operation.
|
|
5592
|
+
* How long a lifecycle call re-attempts a refusal that only asks it to wait:
|
|
5593
|
+
* `resume`, `stop` and `delete` share one lease per sandbox, held past a
|
|
5594
|
+
* response while its deferred cleanup runs, and a lease-store outage answers
|
|
5595
|
+
* 503. 15 s of the SDK's own waits rides a release roll, however long the
|
|
5596
|
+
* server held each attempt; a longer conflict is a real operation.
|
|
5594
5597
|
*/
|
|
5595
|
-
const
|
|
5596
|
-
const LIFECYCLE_CONFLICT_BASE_DELAY_MS = 500;
|
|
5597
|
-
const LIFECYCLE_CONFLICT_MAX_DELAY_MS = 4e3;
|
|
5598
|
+
const LIFECYCLE_CONFLICT_WINDOW_MS = 15e3;
|
|
5598
5599
|
/** A lease-store or storage outage the API answers 503 before or after its effect: a retry is safe. */
|
|
5599
5600
|
const LIFECYCLE_OUTAGE_CODES = new Set(["SANDBOX_LIFECYCLE_COORDINATION_UNAVAILABLE", "STORAGE_UNAVAILABLE"]);
|
|
5600
5601
|
function isLifecycleConflict(cause) {
|
|
@@ -5604,10 +5605,6 @@ function isLifecycleConflict(cause) {
|
|
|
5604
5605
|
function isDeleteRetry(cause) {
|
|
5605
5606
|
return isLifecycleConflict(cause) || cause instanceof NetworkError || cause instanceof SandboxError && [502, 503].includes(cause.status);
|
|
5606
5607
|
}
|
|
5607
|
-
function lifecycleConflictDelayMs(cause, failedAttempt) {
|
|
5608
|
-
if (cause instanceof SandboxError && cause.retryAfterMs !== void 0) return cause.retryAfterMs;
|
|
5609
|
-
return Math.min(LIFECYCLE_CONFLICT_BASE_DELAY_MS * 2 ** Math.max(0, failedAttempt - 1), LIFECYCLE_CONFLICT_MAX_DELAY_MS);
|
|
5610
|
-
}
|
|
5611
5608
|
/**
|
|
5612
5609
|
* Run one lifecycle mutation, re-attempting only the failures `retry` names
|
|
5613
5610
|
* (by default the lifecycle refusals above).
|
|
@@ -5616,13 +5613,18 @@ function lifecycleConflictDelayMs(cause, failedAttempt) {
|
|
|
5616
5613
|
* error class, and a caller abort ends the wait immediately.
|
|
5617
5614
|
*/
|
|
5618
5615
|
async function withLifecycleConflictRetry(run, options, retry = isLifecycleConflict) {
|
|
5619
|
-
|
|
5616
|
+
let windowMs = LIFECYCLE_CONFLICT_WINDOW_MS;
|
|
5617
|
+
for (let resend = 1;; resend += 1) try {
|
|
5620
5618
|
const response = await run();
|
|
5621
5619
|
if (!response.ok) throw await parseResponseError(response);
|
|
5622
5620
|
return response;
|
|
5623
5621
|
} catch (error) {
|
|
5624
|
-
if (!retry(error) ||
|
|
5625
|
-
|
|
5622
|
+
if (!retry(error) || options?.signal?.aborted || !await awaitSdkResend(resend, {
|
|
5623
|
+
retryAfterMs: error instanceof SandboxError ? error.retryAfterMs : void 0,
|
|
5624
|
+
deadlineAt: Date.now() + windowMs,
|
|
5625
|
+
signal: options?.signal,
|
|
5626
|
+
spent: (waitedMs) => windowMs -= waitedMs
|
|
5627
|
+
})) throw error;
|
|
5626
5628
|
}
|
|
5627
5629
|
}
|
|
5628
5630
|
/** The largest delay `setTimeout` holds: past this it overflows its 32-bit
|
|
@@ -7129,11 +7131,10 @@ var SandboxFileWriteCapabilities = class extends SandboxFileOperations {
|
|
|
7129
7131
|
});
|
|
7130
7132
|
break;
|
|
7131
7133
|
} catch (err) {
|
|
7132
|
-
if (isTransientWrite(err) && attempt < maxRetries
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
}
|
|
7134
|
+
if (isTransientWrite(err) && attempt < maxRetries && await awaitSdkResend(attempt + 1, {
|
|
7135
|
+
retryAfterMs: err instanceof SandboxError ? err.retryAfterMs : void 0,
|
|
7136
|
+
capMs: WRITE_MANY_RETRY_MAX_MS
|
|
7137
|
+
})) continue;
|
|
7137
7138
|
throw err;
|
|
7138
7139
|
}
|
|
7139
7140
|
}
|
|
@@ -7191,8 +7192,7 @@ var SandboxFileWriteCapabilities = class extends SandboxFileOperations {
|
|
|
7191
7192
|
}
|
|
7192
7193
|
};
|
|
7193
7194
|
const WRITE_MANY_DEFAULT_PACE_MS = 0;
|
|
7194
|
-
const WRITE_MANY_DEFAULT_MAX_RETRIES =
|
|
7195
|
-
const WRITE_MANY_RETRY_BASE_MS = 250;
|
|
7195
|
+
const WRITE_MANY_DEFAULT_MAX_RETRIES = 6;
|
|
7196
7196
|
const WRITE_MANY_RETRY_MAX_MS = 2e3;
|
|
7197
7197
|
const WRITE_MANY_BATCH_WIRE_BUDGET_BYTES = SANDBOX_PROXY_REQUEST_MAX_BYTES - 8 * 1024;
|
|
7198
7198
|
function toWriteManyWireFile(file) {
|
|
@@ -8236,8 +8236,10 @@ var SandboxPromptTransportCapabilities = class extends SandboxSessionAdmissionCa
|
|
|
8236
8236
|
method: request.method,
|
|
8237
8237
|
path: `/v1/sandboxes/${encodeURIComponent(this.id)}/runtime${state.requestEndpoint}`
|
|
8238
8238
|
}, response.headers);
|
|
8239
|
-
if (!isRetryableCredentialRefusal(refusal)
|
|
8240
|
-
|
|
8239
|
+
if (!isRetryableCredentialRefusal(refusal) || !await awaitSdkResend(attempt, {
|
|
8240
|
+
retryAfterMs: refusal.retryAfterMs ?? 1e3,
|
|
8241
|
+
signal: state.streamSignal
|
|
8242
|
+
})) break;
|
|
8241
8243
|
response = await this.runtimeFetch(state.requestEndpoint, request, state.internal?.forceFullProfile ? { skipProfileReference: true } : void 0);
|
|
8242
8244
|
}
|
|
8243
8245
|
} catch (err) {
|
|
@@ -8825,7 +8827,7 @@ var SandboxInteractiveCapabilities = class extends SandboxPromptCapabilities {
|
|
|
8825
8827
|
var SandboxSessionEvidenceCapabilities = class extends SandboxInteractiveCapabilities {
|
|
8826
8828
|
/** @internal — invoked before the sandbox is deleted. */
|
|
8827
8829
|
async _sessionExportRawEvidence(id, destination, options) {
|
|
8828
|
-
const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-
|
|
8830
|
+
const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-DrgeV9_0.js");
|
|
8829
8831
|
await this.ensureRunning();
|
|
8830
8832
|
await this.refresh();
|
|
8831
8833
|
return exportRawEvidenceDirectory((signal, archiveId, cancel) => this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}/raw-evidence/archive?${new URLSearchParams([
|
|
@@ -8856,7 +8858,7 @@ var SandboxSessionEvidenceCapabilities = class extends SandboxInteractiveCapabil
|
|
|
8856
8858
|
* and the byte and file bounds are verified before the directory appears.
|
|
8857
8859
|
*/
|
|
8858
8860
|
async exportRawEvidence(destination, options) {
|
|
8859
|
-
const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-
|
|
8861
|
+
const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-DrgeV9_0.js");
|
|
8860
8862
|
await this.ensureRunning();
|
|
8861
8863
|
await this.refresh();
|
|
8862
8864
|
return exportRawEvidenceDirectory((signal, archiveId, cancel) => this.runtimeFetch(`/agents/raw-evidence/archive?${new URLSearchParams({
|
|
@@ -10022,7 +10024,7 @@ var SandboxSnapshotCapabilities = class extends SandboxTurnCapabilities {
|
|
|
10022
10024
|
const error = await parseResponseError(response);
|
|
10023
10025
|
const remainingMs = budgetMs - (Date.now() - started);
|
|
10024
10026
|
if (!isRetainedHold(error, reason) || remainingMs <= 0) throw error;
|
|
10025
|
-
await
|
|
10027
|
+
await abortableSleep(Math.min(error.retryAfterMs ?? SNAPSHOT_DELETE_RETAINED_RETRY_MS, CREATE_RETRY_MAX_DELAY_MS, remainingMs));
|
|
10026
10028
|
heldUntil = Date.now();
|
|
10027
10029
|
}
|
|
10028
10030
|
const body = await response.json().catch(() => ({}));
|
|
@@ -10098,7 +10100,7 @@ var SandboxSnapshotCapabilities = class extends SandboxTurnCapabilities {
|
|
|
10098
10100
|
return await this.waitForSnapshotVisible(snapshotId, status.completedAt ? { createdAt: new Date(status.completedAt) } : void 0);
|
|
10099
10101
|
}
|
|
10100
10102
|
const heldMs = Date.now() - polledAt;
|
|
10101
|
-
if (heldMs < SNAPSHOT_RESTORE_POLL_FLOOR_MS) await
|
|
10103
|
+
if (heldMs < SNAPSHOT_RESTORE_POLL_FLOOR_MS) await abortableSleep(SNAPSHOT_RESTORE_POLL_FLOOR_MS - heldMs);
|
|
10102
10104
|
polledAt = Date.now();
|
|
10103
10105
|
status = await readResponseJson(await state(this).client.fetch(`/v1/sandboxes/${this.id}/snapshots/jobs/${encodeURIComponent(accepted.jobId)}?waitMs=${SNAPSHOT_RESTORE_HOLD_MS}`));
|
|
10104
10106
|
}
|
|
@@ -10121,7 +10123,7 @@ var SandboxSnapshotCapabilities = class extends SandboxTurnCapabilities {
|
|
|
10121
10123
|
if (!isTransientSnapshotVisibilityError(error)) throw error;
|
|
10122
10124
|
lastError = error;
|
|
10123
10125
|
}
|
|
10124
|
-
await
|
|
10126
|
+
await abortableSleep(SNAPSHOT_VISIBILITY_POLL_INTERVAL_MS);
|
|
10125
10127
|
}
|
|
10126
10128
|
if (fallback) return {
|
|
10127
10129
|
snapshotId,
|
|
@@ -10273,7 +10275,7 @@ var SandboxBranchCapabilities = class extends SandboxSnapshotCapabilities {
|
|
|
10273
10275
|
const record = await this.getRollout(rolloutId);
|
|
10274
10276
|
if (record.status !== "running") return record;
|
|
10275
10277
|
if (Date.now() - startTime > timeoutMs) throw new TimeoutError(`Timed out waiting for rollout ${rolloutId} to settle`, { timeoutMs });
|
|
10276
|
-
await
|
|
10278
|
+
await abortableSleep(pollIntervalMs);
|
|
10277
10279
|
}
|
|
10278
10280
|
}
|
|
10279
10281
|
};
|
|
@@ -10988,7 +10990,7 @@ var SandboxFilesystemOperations = class extends DeclaredFilesystemOperations {
|
|
|
10988
10990
|
totalBytes: size,
|
|
10989
10991
|
percentage: 0
|
|
10990
10992
|
});
|
|
10991
|
-
const { uploadChunkedFromFile } = await import("./chunked-upload-file-
|
|
10993
|
+
const { uploadChunkedFromFile } = await import("./chunked-upload-file-D3YxQdAl.js");
|
|
10992
10994
|
await uploadChunkedFromFile({ fetch: (path, init) => this.host.runtimeFetch(path, init) }, remotePath, localPath, {
|
|
10993
10995
|
mode: options?.permissions,
|
|
10994
10996
|
onProgress: options?.onProgress ? (progress) => {
|
|
@@ -11896,4 +11898,4 @@ var SandboxInstance = class SandboxInstance extends SandboxEgressCapabilities {
|
|
|
11896
11898
|
}
|
|
11897
11899
|
};
|
|
11898
11900
|
//#endregion
|
|
11899
|
-
export { normalizeSandboxCreateReceipt as A, CAPACITY_ETA_WAIT_MAX_MS as B, SandboxOperationFailedError as C, validateDeferredProfileFileMounts as D, splitInlineProfileSkills as E, normalizeConnection as F,
|
|
11901
|
+
export { normalizeSandboxCreateReceipt as A, CAPACITY_ETA_WAIT_MAX_MS as B, SandboxOperationFailedError as C, validateDeferredProfileFileMounts as D, splitInlineProfileSkills as E, normalizeConnection as F, createRetryDelayMs as G, DEFAULT_GPU_CREATE_TIMEOUT_MS as H, normalizeEgressPolicyFields as I, isCapacityShortageCreateError as J, extendableDeadline as K, normalizeProxySecretReceipt as L, readFilesystemIncarnationTuple as M, dateOf as N, isRetryableProfileFileMaterializeFailure as O, parseLifecycleTimes as P, canonicalAgentProfileDigest as Q, normalizeSandboxShape as R, SandboxOperation as S, splitInlineProfileFileMounts as T, DEPLOY_WINDOW_RETRY_MS as U, DEFAULT_CREATE_TIMEOUT_MS as V, awaitCreateResend as W, isRateLimitCreateError as X, isDeployWindowCreateError as Y, isRetryableCreateError as Z, collectAgentFinalMessageText as _, buildTraceExportPayload as a, isToolBearingEvent as b, toOtelJson as c, sandboxLedgerUsd as d, InteractiveSessionHandle as f, applySandboxEventText as g, createInteractiveTerminalSession as h, MAX_EGRESS_DENIALS_LIMIT as i, normalizeStartupDiagnostics as j, normalizeCaptureProof as k, SandboxTaskSession as l, createInteractiveTerminalCapture as m, createSandboxInstanceFromResponse as n, exportTraceBundle as o, InteractiveTerminalFrameLog as p, generateIdempotencyKey as q, WorkspaceImages as r, otelTraceIdForTangleTrace as s, SandboxInstance as t, SandboxSession as u, collectAgentResponseText as v, materializeProfileFileMounts as w, ManagedProcessClient as x, getSandboxEventText as y, CAPACITY_ETA_MARGIN_MS as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as anumber, c as concatBytes$1, f as randomBytes, h as toBytes, i as ahash, l as createHasher$1, n as abytes$1, o as aoutput, p as rotr, r as aexists, s as clean, t as Hash, u as createView, x as split } from "./utils-
|
|
1
|
+
import { a as anumber, c as concatBytes$1, f as randomBytes, h as toBytes, i as ahash, l as createHasher$1, n as abytes$1, o as aoutput, p as rotr, r as aexists, s as clean, t as Hash, u as createView, x as split } from "./utils-CK-x8vXj.js";
|
|
2
2
|
//#region ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js
|
|
3
3
|
/**
|
|
4
4
|
* Internal Merkle-Damgard hash utils.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as combineAbortSignals } from "../abort-signal-
|
|
2
|
-
import "../sidecar-proxy-error-
|
|
3
|
-
import { t as parseSSEStream } from "../sse-parser-
|
|
1
|
+
import { n as combineAbortSignals } from "../abort-signal-BbJTt2QJ.js";
|
|
2
|
+
import "../sidecar-proxy-error-DpBLxIof.js";
|
|
3
|
+
import { t as parseSSEStream } from "../sse-parser-DOCszo1K.js";
|
|
4
4
|
import { PART_TEXT, PART_TEXT_SUFFIX } from "@tangle-network/agent-core/sse";
|
|
5
5
|
//#region ../../../packages/runtime-contracts/dist/session-gateway.js
|
|
6
6
|
/**
|
package/dist/tangle/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as JOB_SANDBOX_DELETE, T as SandboxCreateResponseParamTypes, _ as TANGLE_CHAIN_ID, a as fetchQuote, b as AgentSandboxBlueprintAbi, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as BlueprintSandboxClientConfig, h as BlueprintSandboxClient, i as SignedQuote, l as validateQuote, m as SignMessage, n as QuoteDomain, o as inputsHashOf, p as OperatorSessionToken, r as QuoteError, s as jobQuoteDigest, t as JobQuoteDetails, u as OperatorChallenge, v as TANGLE_JOBS_CONTRACT, w as SandboxCreateParamTypes, x as JOB_SANDBOX_CREATE, y as ITangleJobsAbi } from "../index-
|
|
1
|
+
import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as JOB_SANDBOX_DELETE, T as SandboxCreateResponseParamTypes, _ as TANGLE_CHAIN_ID, a as fetchQuote, b as AgentSandboxBlueprintAbi, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as BlueprintSandboxClientConfig, h as BlueprintSandboxClient, i as SignedQuote, l as validateQuote, m as SignMessage, n as QuoteDomain, o as inputsHashOf, p as OperatorSessionToken, r as QuoteError, s as jobQuoteDigest, t as JobQuoteDetails, u as OperatorChallenge, v as TANGLE_JOBS_CONTRACT, w as SandboxCreateParamTypes, x as JOB_SANDBOX_CREATE, y as ITangleJobsAbi } from "../index-DyFU9hy7.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, BlueprintSandboxClient, BlueprintSandboxClientConfig, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JobQuoteDetails, JsonResponseParamTypes, OperatorChallenge, OperatorSession, OperatorSessionError, OperatorSessionToken, QuoteDomain, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, SignMessage, SignedQuote, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
|
package/dist/tangle/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as TANGLE_JOBS_CONTRACT, f as ITangleJobsAbi, g as JsonResponseParamTypes, h as JOB_SANDBOX_DELETE, i as jobQuoteDigest, l as OperatorSessionError, m as JOB_SANDBOX_CREATE, n as fetchQuote, o as validateQuote, p as AgentSandboxBlueprintAbi, r as inputsHashOf, s as BlueprintSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-
|
|
1
|
+
import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as TANGLE_JOBS_CONTRACT, f as ITangleJobsAbi, g as JsonResponseParamTypes, h as JOB_SANDBOX_DELETE, i as jobQuoteDigest, l as OperatorSessionError, m as JOB_SANDBOX_CREATE, n as fetchQuote, o as validateQuote, p as AgentSandboxBlueprintAbi, r as inputsHashOf, s as BlueprintSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-Bv_mdVIp.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, BlueprintSandboxClient, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, OperatorSession, OperatorSessionError, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as readFilesystemIncarnationTuple, n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
1
|
+
import { M as readFilesystemIncarnationTuple, n as createSandboxInstanceFromResponse } from "./sandbox-Bk7OST2r.js";
|
|
2
2
|
import { a as readResponseJson } from "./errors-CNszZUZ2.js";
|
|
3
|
-
import { _ as rotlBH, a as anumber, b as rotlSL, d as createXOFer, g as u32, h as toBytes$1, l as createHasher, m as swap32IfBE, n as abytes, o as aoutput, r as aexists, s as clean, t as Hash, v as rotlBL, x as split, y as rotlSH } from "./utils-
|
|
3
|
+
import { _ as rotlBH, a as anumber, b as rotlSL, d as createXOFer, g as u32, h as toBytes$1, l as createHasher, m as swap32IfBE, n as abytes, o as aoutput, r as aexists, s as clean, t as Hash, v as rotlBL, x as split, y as rotlSH } from "./utils-CK-x8vXj.js";
|
|
4
4
|
//#region ../../../packages/runtime-contracts/dist/tangle-blueprint-abi.js
|
|
5
5
|
/**
|
|
6
6
|
* Tangle blueprint wire contract shared by the orchestrator's Tangle driver and
|
|
@@ -2712,7 +2712,7 @@ function isAddressEqual(a, b) {
|
|
|
2712
2712
|
//#region ../../../node_modules/.pnpm/viem@2.57.11_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/signature/recoverPublicKey.js
|
|
2713
2713
|
async function recoverPublicKey({ hash, signature }) {
|
|
2714
2714
|
const hashHex = isHex(hash) ? hash : toHex(hash);
|
|
2715
|
-
const { secp256k1 } = await import("./secp256k1-
|
|
2715
|
+
const { secp256k1 } = await import("./secp256k1-Cbp9tbkX.js");
|
|
2716
2716
|
return `0x${(() => {
|
|
2717
2717
|
if (typeof signature === "object" && "r" in signature && "s" in signature) {
|
|
2718
2718
|
const { r, s, v, yParity } = signature;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as ProxySecretReceipt, At as SandboxCreateReceipt, G as AgentProfileConfidential, L as AgentExactRunControlRef, Q as ReasoningEffort, U as AgentProfile, V as InteractionRequest, W as AgentProfileCapabilities, Z as AgentProfileValidationResult, a as TerminalStreamOptions, b as SandboxSizePreset, g as TerminalReadyInfo, i as TerminalStreamHandlers, s as TerminalStreamToken, t as TerminalAttachTimings, tt as PlanContinuation, x as AgentRuntimeAttachments } from "./terminal-stream-types-
|
|
2
|
-
import { t as CliAuthReference } from "./cli-auth-bundle-
|
|
1
|
+
import { $ as ProxySecretReceipt, At as SandboxCreateReceipt, G as AgentProfileConfidential, L as AgentExactRunControlRef, Q as ReasoningEffort, U as AgentProfile, V as InteractionRequest, W as AgentProfileCapabilities, Z as AgentProfileValidationResult, a as TerminalStreamOptions, b as SandboxSizePreset, g as TerminalReadyInfo, i as TerminalStreamHandlers, s as TerminalStreamToken, t as TerminalAttachTimings, tt as PlanContinuation, x as AgentRuntimeAttachments } from "./terminal-stream-types-DeH8FF0d.js";
|
|
2
|
+
import { t as CliAuthReference } from "./cli-auth-bundle-Wg3x2hd2.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region ../../../packages/runtime-contracts/dist/backend-types.d.ts
|
|
5
5
|
/** This distribution's backend vocabulary. Gemini is only a backing transport, not a direct backend. */
|
|
@@ -4453,7 +4453,7 @@ interface ChunkedUploadOptions {
|
|
|
4453
4453
|
* carrying the uploadId, instead of deleting the session. Default false
|
|
4454
4454
|
* (a failed upload cleans up after itself). */
|
|
4455
4455
|
keepSessionOnFailure?: boolean;
|
|
4456
|
-
/** Max retries per part on a transient error before failing loud. Default
|
|
4456
|
+
/** Max retries per part on a transient error before failing loud. Default 6. */
|
|
4457
4457
|
maxRetries?: number;
|
|
4458
4458
|
}
|
|
4459
4459
|
/**
|
|
@@ -4649,7 +4649,7 @@ interface WriteFileOptions {
|
|
|
4649
4649
|
interface WriteManyOptions {
|
|
4650
4650
|
/** Delay between batch requests or sequential writes. Default 0. */
|
|
4651
4651
|
paceMs?: number;
|
|
4652
|
-
/** Max retries per sequential write on a transient error. Default
|
|
4652
|
+
/** Max retries per sequential write on a transient error. Default 6. */
|
|
4653
4653
|
maxRetries?: number;
|
|
4654
4654
|
}
|
|
4655
4655
|
interface FileSystem {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.211",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -153,15 +153,15 @@
|
|
|
153
153
|
"vitest": "^4.1.12",
|
|
154
154
|
"ws": "^8.22.0",
|
|
155
155
|
"yjs": "13.6.33",
|
|
156
|
-
"@tangle-network/agent-profile-materialize": "0.27.1",
|
|
157
156
|
"@products/sandbox-test-utils": "0.0.0",
|
|
158
|
-
"@tangle-network/runtime-contracts": "0.20.0",
|
|
159
157
|
"@repo/shared": "0.0.0",
|
|
158
|
+
"@tangle-network/agent-profile-materialize": "0.27.1",
|
|
159
|
+
"@tangle-network/runtime-contracts": "0.20.0",
|
|
160
160
|
"@tangle-network/cli-agent-registry": "0.15.0"
|
|
161
161
|
},
|
|
162
162
|
"tangleRelease": {
|
|
163
|
-
"sourceSha": "
|
|
164
|
-
"mergedAt": "2026-11-
|
|
163
|
+
"sourceSha": "ddb82e7a6cc8f9f4e5110503bf9e0abab4588cdc",
|
|
164
|
+
"mergedAt": "2026-11-04T01:27:29-08:00"
|
|
165
165
|
},
|
|
166
166
|
"scripts": {
|
|
167
167
|
"build": "node scripts/build-dist.mjs",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|