@tangle-network/sandbox 0.38.2 → 0.39.1
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 +3 -3
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +4 -4
- package/dist/{agent-run-outcome-Bq1aHHPy.d.ts → agent-run-outcome-DYdwjCOf.d.ts} +1 -1
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/index.js +2 -1
- package/dist/{browser-interactive-control-controller-lRfzpg9t.d.ts → browser-interactive-control-controller-BELrFH4f.d.ts} +1 -1
- package/dist/cli-auth-bundle-DUsK57rK.js +25 -0
- package/dist/{client-XqUR9qgS.d.ts → client-D0wfbjMF.d.ts} +13 -4
- package/dist/{client-DRumogtw.js → client-D7m-EvDD.js} +98 -13
- package/dist/collaboration/index.d.ts +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/{collaboration-DoSvMDEu.js → collaboration-BKHF1SP8.js} +1 -1
- package/dist/core.d.ts +4 -4
- package/dist/core.js +3 -3
- package/dist/{errors-MMMPY4T6.js → errors-DrJySZQG.js} +14 -1
- package/dist/{errors-BMinPhXs.d.ts → errors-rp1GiVzL.d.ts} +13 -1
- package/dist/{index-Bq_z_u6A.d.ts → index-CS-t6tPU.d.ts} +11 -1
- package/dist/{index-D3h0zRzl.d.ts → index-H0L9SOXd.d.ts} +2 -2
- package/dist/index.d.ts +30 -31
- package/dist/index.js +6 -14
- package/dist/intelligence/index.js +1 -1
- package/dist/interactive-control.d.ts +1 -1
- package/dist/{local-cli-auth-CJmSpTjk.js → local-cli-auth-BAJuMBZU.js} +7 -5
- package/dist/{runtime-api-CrjcDtUw.js → runtime-api-B8uIpISe.js} +27 -3
- package/dist/runtime.d.ts +3 -3
- package/dist/runtime.js +2 -2
- package/dist/{sandbox-CzBWptVE.js → sandbox-B6ac3lK0.js} +10 -20
- package/dist/{sandbox-DQmu7a6M.d.ts → sandbox-DWJixf9M.d.ts} +4 -4
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-B0p39vvV.js → tangle-DXgX-BpB.js} +2 -2
- package/dist/{types-DTDI3kek.d.ts → types-DlRSEEnc.d.ts} +8 -3
- package/package.json +6 -5
- /package/dist/{index-CMLW3u5K.d.ts → index-BzAxTiqF.d.ts} +0 -0
- /package/dist/{terminal-stream-5GNLCsms.d.ts → terminal-stream-CcaBTVg3.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -310,10 +310,10 @@ console.log(config);
|
|
|
310
310
|
| Public API request | 1 MiB | `SANDBOX_PROXY_REQUEST_MAX_BYTES` | Requests routed through the Sandbox API |
|
|
311
311
|
| Direct runtime file request | 32 MiB | `SANDBOX_DIRECT_FILE_REQUEST_MAX_BYTES` | Direct runtime requests |
|
|
312
312
|
| Multipart upload | 5 MiB | `FILE_MULTIPART_UPLOAD_MAX_BYTES` | One multipart upload |
|
|
313
|
-
| Chunked upload part | 768 KiB | `FILE_UPLOAD_PART_MAX_BYTES` | One `fs.uploadData()` part |
|
|
314
|
-
| Chunked upload session | 64 MiB | `FILE_UPLOAD_SESSION_MAX_BYTES` | One complete `fs.uploadData()` call |
|
|
313
|
+
| Chunked upload part | 768 KiB | `FILE_UPLOAD_PART_MAX_BYTES` | One `fs.upload()` or `fs.uploadData()` part |
|
|
314
|
+
| Chunked upload session | 64 MiB | `FILE_UPLOAD_SESSION_MAX_BYTES` | One complete `fs.upload()` or `fs.uploadData()` call |
|
|
315
315
|
|
|
316
|
-
Use `fs.uploadData()`
|
|
316
|
+
Use `fs.upload()` for local files or `fs.uploadData()` for in-memory content larger than the single-request limit.
|
|
317
317
|
|
|
318
318
|
The instance also exposes `git`, `tools`, `process`, `terminals`, `network`, `egress`, `previewLinks`, `images`, and `backend` capability clients.
|
|
319
319
|
Unsupported capabilities fail with a typed SDK error.
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as SandboxSession, h as SandboxTaskSession, r as SandboxInstance } from "../sandbox-
|
|
2
|
-
import { D as CodeExecutionResult, E as CodeExecutionOptions, O as CodeLanguage, Si as SessionListOptions, bi as SessionInfo, d as BackendConfig, k as CodeResultPart } from "../types-
|
|
3
|
-
import { i as Sandbox } from "../client-
|
|
1
|
+
import { g as SandboxSession, h as SandboxTaskSession, r as SandboxInstance } from "../sandbox-DWJixf9M.js";
|
|
2
|
+
import { D as CodeExecutionResult, E as CodeExecutionOptions, O as CodeLanguage, Si as SessionListOptions, bi as SessionInfo, d as BackendConfig, k as CodeResultPart } from "../types-DlRSEEnc.js";
|
|
3
|
+
import { i as Sandbox } from "../client-D0wfbjMF.js";
|
|
4
4
|
import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
|
|
5
5
|
|
|
6
6
|
//#region src/agent/instances.d.ts
|
package/dist/agent/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as assertCurrentBackendType } from "../runtime-api-
|
|
2
|
-
import { f as StateError, m as ValidationError, s as NotFoundError } from "../errors-
|
|
3
|
-
import { n as Sandbox } from "../client-
|
|
4
|
-
import { t as SandboxInstance } from "../sandbox-
|
|
1
|
+
import { f as assertCurrentBackendType } from "../runtime-api-B8uIpISe.js";
|
|
2
|
+
import { f as StateError, m as ValidationError, s as NotFoundError } from "../errors-DrJySZQG.js";
|
|
3
|
+
import { n as Sandbox } from "../client-D7m-EvDD.js";
|
|
4
|
+
import { t as SandboxInstance } from "../sandbox-B6ac3lK0.js";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
//#region src/agent/instances.ts
|
|
7
7
|
const managers = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AgentQuestionRequest, et as DurablePlanSnapshot, fr as SandboxEvent, i as AgentApprovalRequirement, o as AgentRunStatus, s as AgentToolInvocation } from "./types-
|
|
1
|
+
import { a as AgentQuestionRequest, et as DurablePlanSnapshot, fr as SandboxEvent, i as AgentApprovalRequirement, o as AgentRunStatus, s as AgentToolInvocation } from "./types-DlRSEEnc.js";
|
|
2
2
|
import { InteractionRequest } from "@tangle-network/agent-interface";
|
|
3
3
|
|
|
4
4
|
//#region src/agent-run-outcome.d.ts
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as ReadTokenPayload, a as issueCollaborationToken, c as issueSessionScopedToken, d as AnyTokenPayload, f as BatchScopedTokenPayload, g as ProjectScopedTokenPayload, h as IssueCollaborationTokenOptions, i as issueBatchScopedToken, l as unsafeDecodeToken, m as CollaborationTokenPayload, n as getTokenTTL, o as issueProjectScopedToken, p as CollaborationAccess, r as isTokenExpiringSoon, s as issueReadToken, t as ProductTokenIssuer, u as verifyToken, v as SessionScopedTokenPayload, y as TokenScope } from "../index-
|
|
2
|
-
export { AnyTokenPayload, BatchScopedTokenPayload, CollaborationAccess, CollaborationTokenPayload, IssueCollaborationTokenOptions, ProductTokenIssuer, ProjectScopedTokenPayload, ReadTokenPayload, SessionScopedTokenPayload, TokenScope, getTokenTTL, isTokenExpiringSoon, issueBatchScopedToken, issueCollaborationToken, issueProjectScopedToken, issueReadToken, issueSessionScopedToken, unsafeDecodeToken, verifyToken };
|
|
1
|
+
import { _ as ReadTokenPayload, a as issueCollaborationToken, b as materializeCliAuthBundle, c as issueSessionScopedToken, d as AnyTokenPayload, f as BatchScopedTokenPayload, g as ProjectScopedTokenPayload, h as IssueCollaborationTokenOptions, i as issueBatchScopedToken, l as unsafeDecodeToken, m as CollaborationTokenPayload, n as getTokenTTL, o as issueProjectScopedToken, p as CollaborationAccess, r as isTokenExpiringSoon, s as issueReadToken, t as ProductTokenIssuer, u as verifyToken, v as SessionScopedTokenPayload, y as TokenScope } from "../index-CS-t6tPU.js";
|
|
2
|
+
export { AnyTokenPayload, BatchScopedTokenPayload, CollaborationAccess, CollaborationTokenPayload, IssueCollaborationTokenOptions, ProductTokenIssuer, ProjectScopedTokenPayload, ReadTokenPayload, SessionScopedTokenPayload, TokenScope, getTokenTTL, isTokenExpiringSoon, issueBatchScopedToken, issueCollaborationToken, issueProjectScopedToken, issueReadToken, issueSessionScopedToken, materializeCliAuthBundle, unsafeDecodeToken, verifyToken };
|
package/dist/auth/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as materializeCliAuthBundle } from "../cli-auth-bundle-DUsK57rK.js";
|
|
1
2
|
//#region src/auth/tokens.ts
|
|
2
3
|
const textEncoder = new TextEncoder();
|
|
3
4
|
const textDecoder = new TextDecoder();
|
|
@@ -311,4 +312,4 @@ var ProductTokenIssuer = class {
|
|
|
311
312
|
}
|
|
312
313
|
};
|
|
313
314
|
//#endregion
|
|
314
|
-
export { ProductTokenIssuer, getTokenTTL, isTokenExpiringSoon, issueBatchScopedToken, issueCollaborationToken, issueProjectScopedToken, issueReadToken, issueSessionScopedToken, unsafeDecodeToken, verifyToken };
|
|
315
|
+
export { ProductTokenIssuer, getTokenTTL, isTokenExpiringSoon, issueBatchScopedToken, issueCollaborationToken, issueProjectScopedToken, issueReadToken, issueSessionScopedToken, materializeCliAuthBundle, unsafeDecodeToken, verifyToken };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as TerminalStreamHandlers } from "./terminal-stream-
|
|
1
|
+
import { r as TerminalStreamHandlers } from "./terminal-stream-CcaBTVg3.js";
|
|
2
2
|
import { AgentInteractiveSessionAttach, AgentInteractiveSessionControlClaimAcknowledgement, AgentInteractiveSessionStatus } from "@tangle-network/agent-interface";
|
|
3
3
|
import { AgentInteractiveSessionControlClaim as AgentInteractiveSessionControlClaim$1, AgentInteractiveSessionControlClaimRequest as AgentInteractiveSessionControlClaimRequest$1, AgentInteractiveSessionRef as AgentInteractiveSessionRef$1 } from "@tangle-network/agent-interface/environment-interactive-control";
|
|
4
4
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region ../../../packages/cli-agent-registry/dist/cli-auth-bundle.mjs
|
|
2
|
+
const DEFAULT_MODE = 384;
|
|
3
|
+
const AUTH_BUNDLE_PATHS = Object.freeze({
|
|
4
|
+
codex: ".codex/auth.json",
|
|
5
|
+
"claude-code": ".claude/.credentials.json"
|
|
6
|
+
});
|
|
7
|
+
/** Convert a native credential JSON bundle without reading host credentials. */
|
|
8
|
+
function materializeCliAuthBundle(backendType, rawBundle) {
|
|
9
|
+
if (backendType !== "codex" && backendType !== "claude-code") throw new Error("CLI auth bundle is not supported for the selected backend");
|
|
10
|
+
if (typeof rawBundle !== "string") throw new Error("CLI auth bundle must be a JSON object");
|
|
11
|
+
let value;
|
|
12
|
+
try {
|
|
13
|
+
value = JSON.parse(rawBundle);
|
|
14
|
+
} catch {
|
|
15
|
+
throw new Error("CLI auth bundle must be a JSON object");
|
|
16
|
+
}
|
|
17
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("CLI auth bundle must be a JSON object");
|
|
18
|
+
return [{
|
|
19
|
+
path: AUTH_BUNDLE_PATHS[backendType],
|
|
20
|
+
content: rawBundle,
|
|
21
|
+
mode: DEFAULT_MODE
|
|
22
|
+
}];
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { materializeCliAuthBundle as n, AUTH_BUNDLE_PATHS as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as TraceExportResult, n as HttpClient, r as SandboxInstance, u as TraceExportSink } from "./sandbox-
|
|
2
|
-
import { l as ScopedToken, s as MintInteractiveSessionTokenOptions } from "./terminal-stream-
|
|
3
|
-
import { Ar as SandboxFleetToken, At as FleetDriveTurnRequest, Bn as PublicTemplateVersionInfo, Br as SandboxIdentity, Dt as FleetDispatchResultBufferOptions, Er as SandboxFleetManifest, Et as FleetDispatchResultBuffer, F as CreateSandboxFleetOptions, Fr as SandboxFleetUsage, Ft as FleetPromptDispatchResult, Gn as ReconcileSandboxFleetsOptions, Hn as PublishPublicTemplateVersionOptions, I as CreateSandboxFleetTokenOptions, Ji as TokenRefreshHandler, Kn as ReconcileSandboxFleetsResult, L as CreateSandboxFleetWithCoordinatorOptions, Li as SubscriptionInfo, Lr as SandboxFleetWorkspaceReconcileResult, Mn as PromptInputPart, Mt as FleetExecDispatchResult, N as CreateIntelligenceReportOptions, Ni as SshKeysManager, Nn as PromptOptions, Nt as FleetMachineId, Or as SandboxFleetOperationsSummary, Ot as FleetDispatchStreamOptions, P as CreateRequestOptions, Pn as PromptResult, Pr as SandboxFleetTraceOptions, Pt as FleetPromptDispatchOptions, R as CreateSandboxOptions, Rr as SandboxFleetWorkspaceRestoreResult, Tt as FleetDispatchCancelResult, Un as ReapExpiredSandboxFleetsOptions, Vn as PublishPublicTemplateOptions, Vr as SandboxInfo, Wn as ReapExpiredSandboxFleetsResult, _r as SandboxFleetDispatchResponse, an as IntelligenceReportCompareTo, ar as SandboxConfig, b as BatchRunRequest, br as SandboxFleetInfo, ca as BatchEvent, dn as ListSandboxFleetOptions, dr as SandboxEnvironment, dt as ExecResult, ea as UsageInfo, fn as ListSandboxOptions, hr as SandboxFleetCostEstimate, in as IntelligenceReportBudget, jr as SandboxFleetTraceBundle, jt as FleetExecDispatchOptions, kt as FleetDriveTurnOutcome, l as AttachSandboxFleetMachineOptions, mr as SandboxFleetArtifactSpec, pr as SandboxFleetArtifact, rn as IntelligenceReport, sn as IntelligenceReportWindow, ui as SecretsManager, ut as ExecOptions, v as BatchResult, vr as SandboxFleetDriverCapability, wr as SandboxFleetMachineRecord, y as BatchRunOptions, zn as PublicTemplateInfo, zr as SandboxFleetWorkspaceSnapshotResult } from "./types-
|
|
1
|
+
import { l as TraceExportResult, n as HttpClient, r as SandboxInstance, u as TraceExportSink } from "./sandbox-DWJixf9M.js";
|
|
2
|
+
import { l as ScopedToken, s as MintInteractiveSessionTokenOptions } from "./terminal-stream-CcaBTVg3.js";
|
|
3
|
+
import { Ar as SandboxFleetToken, At as FleetDriveTurnRequest, Bn as PublicTemplateVersionInfo, Br as SandboxIdentity, Dt as FleetDispatchResultBufferOptions, Er as SandboxFleetManifest, Et as FleetDispatchResultBuffer, F as CreateSandboxFleetOptions, Fr as SandboxFleetUsage, Ft as FleetPromptDispatchResult, Gn as ReconcileSandboxFleetsOptions, Hn as PublishPublicTemplateVersionOptions, I as CreateSandboxFleetTokenOptions, Ji as TokenRefreshHandler, Kn as ReconcileSandboxFleetsResult, L as CreateSandboxFleetWithCoordinatorOptions, Li as SubscriptionInfo, Lr as SandboxFleetWorkspaceReconcileResult, Mn as PromptInputPart, Mt as FleetExecDispatchResult, N as CreateIntelligenceReportOptions, Ni as SshKeysManager, Nn as PromptOptions, Nt as FleetMachineId, Or as SandboxFleetOperationsSummary, Ot as FleetDispatchStreamOptions, P as CreateRequestOptions, Pn as PromptResult, Pr as SandboxFleetTraceOptions, Pt as FleetPromptDispatchOptions, R as CreateSandboxOptions, Rr as SandboxFleetWorkspaceRestoreResult, Tt as FleetDispatchCancelResult, Un as ReapExpiredSandboxFleetsOptions, Vn as PublishPublicTemplateOptions, Vr as SandboxInfo, Wn as ReapExpiredSandboxFleetsResult, _r as SandboxFleetDispatchResponse, an as IntelligenceReportCompareTo, ar as SandboxConfig, b as BatchRunRequest, br as SandboxFleetInfo, ca as BatchEvent, dn as ListSandboxFleetOptions, dr as SandboxEnvironment, dt as ExecResult, ea as UsageInfo, fn as ListSandboxOptions, hr as SandboxFleetCostEstimate, in as IntelligenceReportBudget, jr as SandboxFleetTraceBundle, jt as FleetExecDispatchOptions, kt as FleetDriveTurnOutcome, l as AttachSandboxFleetMachineOptions, mr as SandboxFleetArtifactSpec, pr as SandboxFleetArtifact, rn as IntelligenceReport, sn as IntelligenceReportWindow, ui as SecretsManager, ut as ExecOptions, v as BatchResult, vr as SandboxFleetDriverCapability, wr as SandboxFleetMachineRecord, y as BatchRunOptions, zn as PublicTemplateInfo, zr as SandboxFleetWorkspaceSnapshotResult } from "./types-DlRSEEnc.js";
|
|
4
4
|
import { AgentInteractiveSessionRef } from "@tangle-network/agent-interface";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
@@ -23,6 +23,9 @@ declare const backendRegistryCapabilitiesSchema: z.ZodObject<{
|
|
|
23
23
|
imageInput: z.ZodBoolean;
|
|
24
24
|
contextWindow: z.ZodNumber;
|
|
25
25
|
mcp: z.ZodBoolean;
|
|
26
|
+
runtimeAttachments: z.ZodOptional<z.ZodObject<{
|
|
27
|
+
mcp: z.ZodLiteral<true>;
|
|
28
|
+
}, z.core.$strip>>;
|
|
26
29
|
sessions: z.ZodBoolean;
|
|
27
30
|
configurable: z.ZodBoolean;
|
|
28
31
|
interactions: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<("permission" | "question" | "plan")[], string[]>>;
|
|
@@ -40,6 +43,9 @@ declare const backendRegistryEntrySchema: z.ZodObject<{
|
|
|
40
43
|
imageInput: z.ZodBoolean;
|
|
41
44
|
contextWindow: z.ZodNumber;
|
|
42
45
|
mcp: z.ZodBoolean;
|
|
46
|
+
runtimeAttachments: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
mcp: z.ZodLiteral<true>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
43
49
|
sessions: z.ZodBoolean;
|
|
44
50
|
configurable: z.ZodBoolean;
|
|
45
51
|
interactions: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<("permission" | "question" | "plan")[], string[]>>;
|
|
@@ -59,6 +65,9 @@ declare const backendRegistryResponseSchema: z.ZodObject<{
|
|
|
59
65
|
imageInput: z.ZodBoolean;
|
|
60
66
|
contextWindow: z.ZodNumber;
|
|
61
67
|
mcp: z.ZodBoolean;
|
|
68
|
+
runtimeAttachments: z.ZodOptional<z.ZodObject<{
|
|
69
|
+
mcp: z.ZodLiteral<true>;
|
|
70
|
+
}, z.core.$strip>>;
|
|
62
71
|
sessions: z.ZodBoolean;
|
|
63
72
|
configurable: z.ZodBoolean;
|
|
64
73
|
interactions: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<("permission" | "question" | "plan")[], string[]>>;
|
|
@@ -422,7 +431,7 @@ declare class Sandbox implements HttpClient, ScopedTokenHttpClient {
|
|
|
422
431
|
* });
|
|
423
432
|
* ```
|
|
424
433
|
*/
|
|
425
|
-
create(
|
|
434
|
+
create(inputOptions?: CreateSandboxOptions, requestOptions?: CreateRequestOptions): Promise<SandboxInstance>;
|
|
426
435
|
/**
|
|
427
436
|
* Poll a sandbox to `running` by id. Surfaces a real provision failure
|
|
428
437
|
* as a {@link StateError} (carrying the sandbox's error message) rather
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as PartialFailureError, d as ServerError, h as parseErrorResponse, m as ValidationError, o as NetworkError, p as TimeoutError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-
|
|
1
|
+
import { c as encodePromptForWire, d as applyRequestedModel, f as assertCurrentBackendType, l as encodeTextForWire, m as normalizeRuntimeBackendConfig, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, u as parseSSEStream, v as backendTypeSchema } from "./runtime-api-B8uIpISe.js";
|
|
2
|
+
import { c as PartialFailureError, d as ServerError, h as parseErrorResponse, m as ValidationError, o as NetworkError, p as TimeoutError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-DrJySZQG.js";
|
|
3
3
|
import { n as combineAbortSignals } from "./abort-signal-si1WMfJb.js";
|
|
4
|
-
import { E as normalizeConnection, O as exportTraceBundle, b as requestInteractiveSessionToken, i as normalizeStartupDiagnostics, n as createSandboxInstanceFromResponse, r as normalizeSandboxCreateReceipt } from "./sandbox-
|
|
4
|
+
import { E as normalizeConnection, O as exportTraceBundle, b as requestInteractiveSessionToken, i as normalizeStartupDiagnostics, n as createSandboxInstanceFromResponse, r as normalizeSandboxCreateReceipt } from "./sandbox-B6ac3lK0.js";
|
|
5
5
|
import { agentProfileSchema } from "@tangle-network/agent-interface";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/backend-registry.ts
|
|
@@ -24,6 +24,7 @@ const backendRegistryCapabilitiesSchema = z.object({
|
|
|
24
24
|
imageInput: z.boolean(),
|
|
25
25
|
contextWindow: z.number(),
|
|
26
26
|
mcp: z.boolean(),
|
|
27
|
+
runtimeAttachments: z.object({ mcp: z.literal(true) }).optional(),
|
|
27
28
|
sessions: z.boolean(),
|
|
28
29
|
configurable: z.boolean(),
|
|
29
30
|
interactions: z.array(z.string().min(1)).transform((values) => values.filter(isBackendRegistryInteractionKind))
|
|
@@ -2429,6 +2430,56 @@ const RETRYABLE_CREATE_STATUS_CODES = new Set([
|
|
|
2429
2430
|
503,
|
|
2430
2431
|
504
|
|
2431
2432
|
]);
|
|
2433
|
+
/**
|
|
2434
|
+
* 503 classes that mean "the cell cannot place a create right now, ask
|
|
2435
|
+
* again", not "this create failed". They are what a caller sees while the
|
|
2436
|
+
* production host-agent rolls: placement is drained on the only host, so an
|
|
2437
|
+
* unkeyed create fails `CAPACITY_EXHAUSTED` (`HOST_PRESSURE` and
|
|
2438
|
+
* `PROVISIONING_PAUSED` are the sibling admission refusals the orchestrator
|
|
2439
|
+
* maps to 503), and a keyed create cannot verify its ref while the agent is
|
|
2440
|
+
* down (`IDEMPOTENT_CREATE_PROBE_FAILED`). Re-POSTing is safe: the admission
|
|
2441
|
+
* refusals started no provision, the probe answer is the Worker declining to
|
|
2442
|
+
* act until it can prove what exists, and the idempotency key joins
|
|
2443
|
+
* whichever provision did start.
|
|
2444
|
+
*
|
|
2445
|
+
* `SANDBOX_CREATE_RECONCILING` is deliberately not in the family. The Worker
|
|
2446
|
+
* answers it (Retry-After 2) when a same-key create meets a journaled D1
|
|
2447
|
+
* reservation left by an earlier attempt
|
|
2448
|
+
* (products/sandbox/api/src/routes/sandbox-create-idempotency-flow.ts). The
|
|
2449
|
+
* Worker releases that journal on the three admission refusals above
|
|
2450
|
+
* (sandbox-create-failure.ts, `PRE_PROVISION_REFUSAL_CODES`), so the hold
|
|
2451
|
+
* can only follow a retained real failure: a provision that started and
|
|
2452
|
+
* failed, or a create whose commit never ran because the Worker or the
|
|
2453
|
+
* controller stopped mid-create. The reconciler leaves such a journal alone
|
|
2454
|
+
* for RESERVATION_TTL_MS = 5 min and then releases it only after three
|
|
2455
|
+
* authoritative misses, one cron tick apart
|
|
2456
|
+
* (products/sandbox/api/src/cf/create-reservation-reconciler.ts), which is
|
|
2457
|
+
* longer than the 150 s ceiling below and the 120 s default create budget.
|
|
2458
|
+
* Retrying it on the time budget could never outlast the hold; it only
|
|
2459
|
+
* turned a ~10 s failure into a 120 s TimeoutError. It keeps the
|
|
2460
|
+
* five-attempt budget, paced on its Retry-After, like every other 503. The
|
|
2461
|
+
* same code also answers a failed read of that recovery state, a transient
|
|
2462
|
+
* the short budget already covers.
|
|
2463
|
+
*/
|
|
2464
|
+
const DEPLOY_WINDOW_RETRY_CODES = new Set([
|
|
2465
|
+
"IDEMPOTENT_CREATE_PROBE_FAILED",
|
|
2466
|
+
"CAPACITY_EXHAUSTED",
|
|
2467
|
+
"HOST_PRESSURE",
|
|
2468
|
+
"PROVISIONING_PAUSED"
|
|
2469
|
+
]);
|
|
2470
|
+
/**
|
|
2471
|
+
* Longest a create keeps re-POSTing through the deploy-window family,
|
|
2472
|
+
* counted from the start of the create. Sized to the production host-agent
|
|
2473
|
+
* roll in `.github/actions/update-host-agents/action.yml` (drain placement
|
|
2474
|
+
* on the host, swap the agent, restore placement): the last measured roll
|
|
2475
|
+
* kept placement drained for 124 s. The caller's create deadline binds
|
|
2476
|
+
* first when it is shorter, and the 120 s default is, so a default create
|
|
2477
|
+
* waits out its own deadline rather than this ceiling.
|
|
2478
|
+
*/
|
|
2479
|
+
const DEPLOY_WINDOW_RETRY_MS = 15e4;
|
|
2480
|
+
function isDeployWindowCreateError(cause) {
|
|
2481
|
+
return cause instanceof SandboxError && cause.status === 503 && DEPLOY_WINDOW_RETRY_CODES.has(cause.code);
|
|
2482
|
+
}
|
|
2432
2483
|
function isRetryableCreateError(cause) {
|
|
2433
2484
|
if (cause instanceof NetworkError) return true;
|
|
2434
2485
|
return cause instanceof SandboxError && cause.status !== void 0 && RETRYABLE_CREATE_STATUS_CODES.has(cause.status);
|
|
@@ -2480,11 +2531,11 @@ function withRequestContextHeaders(response, path, method) {
|
|
|
2480
2531
|
});
|
|
2481
2532
|
}
|
|
2482
2533
|
async function resolveLocalCliAuthFiles(backendType) {
|
|
2483
|
-
const { discoverLocalCliAuthFiles } = await import("./local-cli-auth-
|
|
2534
|
+
const { discoverLocalCliAuthFiles } = await import("./local-cli-auth-BAJuMBZU.js");
|
|
2484
2535
|
return discoverLocalCliAuthFiles(backendType);
|
|
2485
2536
|
}
|
|
2486
2537
|
async function describeLocalCliAuthExpectation(backendType) {
|
|
2487
|
-
const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-
|
|
2538
|
+
const { describeLocalCliAuthExpectation: describe } = await import("./local-cli-auth-BAJuMBZU.js");
|
|
2488
2539
|
return describe(backendType);
|
|
2489
2540
|
}
|
|
2490
2541
|
async function hydrateLocalCliBackendAuth(backend, baseUrl, trustLocalCliAuth) {
|
|
@@ -2661,11 +2712,24 @@ var Sandbox = class {
|
|
|
2661
2712
|
* });
|
|
2662
2713
|
* ```
|
|
2663
2714
|
*/
|
|
2664
|
-
async create(
|
|
2715
|
+
async create(inputOptions, requestOptions) {
|
|
2716
|
+
let options = inputOptions;
|
|
2717
|
+
if (options?.backend?.runtimeAttachments !== void 0) {
|
|
2718
|
+
normalizeRuntimeBackendConfig(options.backend);
|
|
2719
|
+
options = {
|
|
2720
|
+
...options,
|
|
2721
|
+
backend: {
|
|
2722
|
+
...options.backend,
|
|
2723
|
+
runtimeAttachments: structuredClone(options.backend.runtimeAttachments)
|
|
2724
|
+
}
|
|
2725
|
+
};
|
|
2726
|
+
}
|
|
2665
2727
|
if (options?.backend?.type !== void 0) assertCurrentBackendType(options.backend.type);
|
|
2666
2728
|
const timeoutMs = requestOptions?.timeoutMs ?? (options?.gpuLease ? DEFAULT_GPU_CREATE_TIMEOUT_MS : DEFAULT_CREATE_TIMEOUT_MS);
|
|
2667
2729
|
const idempotencyKey = options?.idempotencyKey ?? generateIdempotencyKey();
|
|
2668
|
-
const
|
|
2730
|
+
const startedAt = Date.now();
|
|
2731
|
+
const deadline = startedAt + timeoutMs;
|
|
2732
|
+
const deployWindowDeadline = Math.min(deadline, startedAt + DEPLOY_WINDOW_RETRY_MS);
|
|
2669
2733
|
const git = options?.git ? {
|
|
2670
2734
|
url: options.git.url,
|
|
2671
2735
|
ref: options.git.ref,
|
|
@@ -2754,17 +2818,36 @@ var Sandbox = class {
|
|
|
2754
2818
|
idempotencyKey,
|
|
2755
2819
|
billingOwnerId: options?.billingOwnerId
|
|
2756
2820
|
});
|
|
2757
|
-
|
|
2758
|
-
const
|
|
2821
|
+
let lastServerError;
|
|
2822
|
+
const createTimeoutError = () => new TimeoutError(timeoutMs, `Sandbox create did not complete within ${timeoutMs}ms. ` + (lastServerError ? `The last attempt failed with ${lastServerError.code}${lastServerError.status === void 0 ? "" : ` (HTTP ${lastServerError.status})`}: ${lastServerError.message}. ` : "") + `The provision may still be running server-side; retry create() with idempotencyKey="${idempotencyKey}" to join it.`, void 0, lastServerError);
|
|
2823
|
+
const sleepBeforeRetry = async (delayMs) => {
|
|
2759
2824
|
try {
|
|
2760
|
-
await waitForCreateRetry(
|
|
2825
|
+
await waitForCreateRetry(delayMs, postSignal);
|
|
2761
2826
|
} catch (waitError) {
|
|
2762
2827
|
if (requestOptions?.signal?.aborted) throw waitError;
|
|
2763
2828
|
throw createTimeoutError();
|
|
2764
2829
|
}
|
|
2765
2830
|
};
|
|
2831
|
+
const waitBeforeRetry = async (cause, failedAttempt) => {
|
|
2832
|
+
if (isDeployWindowCreateError(cause)) {
|
|
2833
|
+
const delayMs = Math.max(createRetryDelayMs(cause, failedAttempt), CREATE_RETRY_BASE_DELAY_MS);
|
|
2834
|
+
if (delayMs >= deployWindowDeadline - Date.now()) throw deployWindowDeadline === deadline ? createTimeoutError() : cause;
|
|
2835
|
+
await sleepBeforeRetry(delayMs);
|
|
2836
|
+
return;
|
|
2837
|
+
}
|
|
2838
|
+
const delayMs = createRetryDelayMs(cause, failedAttempt);
|
|
2839
|
+
if (cause instanceof SandboxError && delayMs >= deadline - Date.now()) throw cause;
|
|
2840
|
+
await sleepBeforeRetry(delayMs);
|
|
2841
|
+
};
|
|
2766
2842
|
let response;
|
|
2767
|
-
|
|
2843
|
+
let shortBudgetFailures = 0;
|
|
2844
|
+
const exhaustsRetryBudget = (error) => {
|
|
2845
|
+
if (!isRetryableCreateError(error)) return true;
|
|
2846
|
+
if (isDeployWindowCreateError(error)) return false;
|
|
2847
|
+
shortBudgetFailures += 1;
|
|
2848
|
+
return shortBudgetFailures >= CREATE_POST_MAX_ATTEMPTS;
|
|
2849
|
+
};
|
|
2850
|
+
for (let attempt = 1;; attempt++) {
|
|
2768
2851
|
try {
|
|
2769
2852
|
response = await this.fetch("/v1/sandboxes", {
|
|
2770
2853
|
method: "POST",
|
|
@@ -2774,15 +2857,17 @@ var Sandbox = class {
|
|
|
2774
2857
|
}, { timeoutMs });
|
|
2775
2858
|
} catch (error) {
|
|
2776
2859
|
if (requestOptions?.signal?.aborted) throw error;
|
|
2860
|
+
if (error instanceof SandboxError && !(error instanceof TimeoutError)) lastServerError = error;
|
|
2777
2861
|
if (postDeadline.aborted || Date.now() >= deadline || error instanceof TimeoutError || error instanceof Error && (error.name === "AbortError" || error.name === "TimeoutError")) throw createTimeoutError();
|
|
2778
|
-
if (
|
|
2862
|
+
if (exhaustsRetryBudget(error instanceof Error ? error : new Error(String(error)))) throw error;
|
|
2779
2863
|
await waitBeforeRetry(error, attempt);
|
|
2780
2864
|
continue;
|
|
2781
2865
|
}
|
|
2782
2866
|
if (response.ok) break;
|
|
2783
2867
|
const body = await response.text();
|
|
2784
2868
|
const error = parseErrorResponse(response.status, body, void 0, response.headers);
|
|
2785
|
-
|
|
2869
|
+
lastServerError = error;
|
|
2870
|
+
if (exhaustsRetryBudget(error)) throw error;
|
|
2786
2871
|
await waitBeforeRetry(error, attempt);
|
|
2787
2872
|
response = void 0;
|
|
2788
2873
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as CollaborationTransportConfig, a as CollaborationClient, c as CollaborationClientConfig, d as CollaborationDocumentRef, f as CollaborationFileBridgeOptions, g as CollaborationTokenRefreshResponse, h as CollaborationTokenRefreshRequest, i as parseCollaborationDocumentId, l as CollaborationDocumentAdapter, m as CollaborationPermissions, n as buildCollaborationDocumentId, o as CollaborationBootstrapRequest, p as CollaborationFileEvent, r as normalizeCollaborationPath, s as CollaborationBootstrapResponse, t as CollaborationFileBridge, u as CollaborationDocumentChange, v as SaveCollaborationSnapshotRequest, y as SaveCollaborationSnapshotResponse } from "../index-
|
|
1
|
+
import { _ as CollaborationTransportConfig, a as CollaborationClient, c as CollaborationClientConfig, d as CollaborationDocumentRef, f as CollaborationFileBridgeOptions, g as CollaborationTokenRefreshResponse, h as CollaborationTokenRefreshRequest, i as parseCollaborationDocumentId, l as CollaborationDocumentAdapter, m as CollaborationPermissions, n as buildCollaborationDocumentId, o as CollaborationBootstrapRequest, p as CollaborationFileEvent, r as normalizeCollaborationPath, s as CollaborationBootstrapResponse, t as CollaborationFileBridge, u as CollaborationDocumentChange, v as SaveCollaborationSnapshotRequest, y as SaveCollaborationSnapshotResponse } from "../index-BzAxTiqF.js";
|
|
2
2
|
export { CollaborationBootstrapRequest, CollaborationBootstrapResponse, CollaborationClient, CollaborationClientConfig, CollaborationDocumentAdapter, CollaborationDocumentChange, CollaborationDocumentRef, CollaborationFileBridge, CollaborationFileBridgeOptions, CollaborationFileEvent, CollaborationPermissions, CollaborationTokenRefreshRequest, CollaborationTokenRefreshResponse, CollaborationTransportConfig, SaveCollaborationSnapshotRequest, SaveCollaborationSnapshotResponse, buildCollaborationDocumentId, normalizeCollaborationPath, parseCollaborationDocumentId };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-
|
|
1
|
+
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-BKHF1SP8.js";
|
|
2
2
|
export { CollaborationClient, CollaborationFileBridge, buildCollaborationDocumentId, normalizeCollaborationPath, parseCollaborationDocumentId };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as parseErrorResponse, o as NetworkError, p as TimeoutError } from "./errors-
|
|
1
|
+
import { h as parseErrorResponse, o as NetworkError, p as TimeoutError } from "./errors-DrJySZQG.js";
|
|
2
2
|
//#region src/collaboration/client.ts
|
|
3
3
|
const DEFAULT_TIMEOUT_MS = 3e4;
|
|
4
4
|
function normalizeBaseUrl(url) {
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as WorkspaceImagePublishRequestOptions, i as WorkspaceImagePublishInput, o as WorkspaceImagePublishResult, r as SandboxInstance, s as WorkspaceImages } from "./sandbox-
|
|
2
|
-
import { Cn as PreviewLinkWaitOptions, Mn as PromptInputPart, R as CreateSandboxOptions, Sn as PreviewLinkManager, Vr as SandboxInfo, Yr as SandboxStatus, ar as SandboxConfig, dt as ExecResult, gn as NetworkConfig, ut as ExecOptions, xn as PreviewLinkInfo } from "./types-
|
|
3
|
-
import { C as isBackendRegistryInteractionKind, S as backendRegistryResponseSchema, T as parseBackendRegistryResponseBody, _ as BackendRegistryInteractionKind, b as backendRegistryEntrySchema, g as BackendRegistryEntry, h as BackendRegistryCapabilities, i as Sandbox, v as BackendRegistryResponse, w as parseBackendRegistryResponse, x as backendRegistryInteractionKindSchema, y as backendRegistryCapabilitiesSchema } from "./client-
|
|
4
|
-
import { a as FileWriteConflictError, c as PartialFailureError, d as SandboxErrorJson, f as SandboxFailureDetail, g as ValidationError, h as TimeoutError, l as QuotaError, m as StateError, n as CapabilityError, o as NetworkError, p as ServerError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-
|
|
1
|
+
import { a as WorkspaceImagePublishRequestOptions, i as WorkspaceImagePublishInput, o as WorkspaceImagePublishResult, r as SandboxInstance, s as WorkspaceImages } from "./sandbox-DWJixf9M.js";
|
|
2
|
+
import { Cn as PreviewLinkWaitOptions, Mn as PromptInputPart, R as CreateSandboxOptions, Sn as PreviewLinkManager, Vr as SandboxInfo, Yr as SandboxStatus, ar as SandboxConfig, dt as ExecResult, gn as NetworkConfig, ut as ExecOptions, xn as PreviewLinkInfo } from "./types-DlRSEEnc.js";
|
|
3
|
+
import { C as isBackendRegistryInteractionKind, S as backendRegistryResponseSchema, T as parseBackendRegistryResponseBody, _ as BackendRegistryInteractionKind, b as backendRegistryEntrySchema, g as BackendRegistryEntry, h as BackendRegistryCapabilities, i as Sandbox, v as BackendRegistryResponse, w as parseBackendRegistryResponse, x as backendRegistryInteractionKindSchema, y as backendRegistryCapabilitiesSchema } from "./client-D0wfbjMF.js";
|
|
4
|
+
import { a as FileWriteConflictError, c as PartialFailureError, d as SandboxErrorJson, f as SandboxFailureDetail, g as ValidationError, h as TimeoutError, l as QuotaError, m as StateError, n as CapabilityError, o as NetworkError, p as ServerError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-rp1GiVzL.js";
|
|
5
5
|
export { AuthError, type BackendRegistryCapabilities, type BackendRegistryEntry, type BackendRegistryInteractionKind, type BackendRegistryResponse, CapabilityError, type CreateSandboxOptions, type ExecOptions, type ExecResult, FileWriteConflictError, type NetworkConfig, NetworkError, NotFoundError, PartialFailureError, type PreviewLinkInfo, type PreviewLinkManager, type PreviewLinkWaitOptions, type PromptInputPart, QuotaError, Sandbox, type SandboxConfig, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, type SandboxInfo, SandboxInstance, type SandboxStatus, ServerError, StateError, TimeoutError, ValidationError, type WorkspaceImagePublishInput, type WorkspaceImagePublishRequestOptions, type WorkspaceImagePublishResult, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, isBackendRegistryInteractionKind, parseBackendRegistryResponse, parseBackendRegistryResponseBody };
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as FileWriteConflictError, c as PartialFailureError, d as ServerError, f as StateError, l as QuotaError, m as ValidationError, n as CapabilityError, o as NetworkError, p as TimeoutError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-
|
|
2
|
-
import { _ as parseBackendRegistryResponse, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, p as backendRegistryEntrySchema, v as parseBackendRegistryResponseBody } from "./client-
|
|
3
|
-
import { a as WorkspaceImages, t as SandboxInstance } from "./sandbox-
|
|
1
|
+
import { a as FileWriteConflictError, c as PartialFailureError, d as ServerError, f as StateError, l as QuotaError, m as ValidationError, n as CapabilityError, o as NetworkError, p as TimeoutError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-DrJySZQG.js";
|
|
2
|
+
import { _ as parseBackendRegistryResponse, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, p as backendRegistryEntrySchema, v as parseBackendRegistryResponseBody } from "./client-D7m-EvDD.js";
|
|
3
|
+
import { a as WorkspaceImages, t as SandboxInstance } from "./sandbox-B6ac3lK0.js";
|
|
4
4
|
export { AuthError, CapabilityError, FileWriteConflictError, NetworkError, NotFoundError, PartialFailureError, QuotaError, Sandbox, SandboxError, SandboxInstance, ServerError, StateError, TimeoutError, ValidationError, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, isBackendRegistryInteractionKind, parseBackendRegistryResponse, parseBackendRegistryResponseBody };
|
|
@@ -168,10 +168,23 @@ var EgressProxyRecoveryError = class extends SandboxError {
|
|
|
168
168
|
var TimeoutError = class extends SandboxError {
|
|
169
169
|
/** Timeout duration in milliseconds */
|
|
170
170
|
timeoutMs;
|
|
171
|
-
|
|
171
|
+
/**
|
|
172
|
+
* The last typed failure the operation had already received when the
|
|
173
|
+
* deadline fired, when there was one.
|
|
174
|
+
*
|
|
175
|
+
* An operation that spends its budget across several attempts (create's
|
|
176
|
+
* bounded POST retry) usually learns the server's failure class on an
|
|
177
|
+
* earlier attempt — `CONTAINER_START_FAILED`, `PROVISIONING_ERROR`,
|
|
178
|
+
* `RATE_LIMIT_EXCEEDED`. Without this field that class dies at the
|
|
179
|
+
* deadline and the caller is left with a timeout that names no cause,
|
|
180
|
+
* which is the last discard in a chain built specifically to deliver it.
|
|
181
|
+
*/
|
|
182
|
+
cause;
|
|
183
|
+
constructor(timeoutMs, message, metadata, cause) {
|
|
172
184
|
super(message ?? `Request timed out after ${timeoutMs}ms`, "TIMEOUT", 408, metadata);
|
|
173
185
|
this.name = "TimeoutError";
|
|
174
186
|
this.timeoutMs = timeoutMs;
|
|
187
|
+
this.cause = cause;
|
|
175
188
|
}
|
|
176
189
|
};
|
|
177
190
|
/**
|
|
@@ -128,7 +128,19 @@ declare class EgressProxyRecoveryError extends SandboxError {
|
|
|
128
128
|
declare class TimeoutError extends SandboxError {
|
|
129
129
|
/** Timeout duration in milliseconds */
|
|
130
130
|
readonly timeoutMs: number;
|
|
131
|
-
|
|
131
|
+
/**
|
|
132
|
+
* The last typed failure the operation had already received when the
|
|
133
|
+
* deadline fired, when there was one.
|
|
134
|
+
*
|
|
135
|
+
* An operation that spends its budget across several attempts (create's
|
|
136
|
+
* bounded POST retry) usually learns the server's failure class on an
|
|
137
|
+
* earlier attempt — `CONTAINER_START_FAILED`, `PROVISIONING_ERROR`,
|
|
138
|
+
* `RATE_LIMIT_EXCEEDED`. Without this field that class dies at the
|
|
139
|
+
* deadline and the caller is left with a timeout that names no cause,
|
|
140
|
+
* which is the last discard in a chain built specifically to deliver it.
|
|
141
|
+
*/
|
|
142
|
+
readonly cause?: SandboxError;
|
|
143
|
+
constructor(timeoutMs: number, message?: string, metadata?: SandboxErrorMetadata, cause?: SandboxError);
|
|
132
144
|
}
|
|
133
145
|
/**
|
|
134
146
|
* A network or connection error occurred.
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
//#region ../../../packages/cli-agent-registry/dist/cli-auth-bundle.d.mts
|
|
2
|
+
//#region src/cli-auth-bundle.d.ts
|
|
3
|
+
type LocalCliAuthFile = {
|
|
4
|
+
path: string;
|
|
5
|
+
content: string;
|
|
6
|
+
mode?: number;
|
|
7
|
+
};
|
|
8
|
+
/** Convert a native credential JSON bundle without reading host credentials. */
|
|
9
|
+
declare function materializeCliAuthBundle(backendType: string, rawBundle: string): LocalCliAuthFile[]; //#endregion
|
|
10
|
+
//#endregion
|
|
1
11
|
//#region src/auth/types.d.ts
|
|
2
12
|
/**
|
|
3
13
|
* Auth Types
|
|
@@ -217,4 +227,4 @@ declare class ProductTokenIssuer {
|
|
|
217
227
|
getTtlMinutes(tier?: "free" | "pro" | "enterprise"): number;
|
|
218
228
|
}
|
|
219
229
|
//#endregion
|
|
220
|
-
export { ReadTokenPayload as _, issueCollaborationToken as a, issueSessionScopedToken as c, AnyTokenPayload as d, BatchScopedTokenPayload as f, ProjectScopedTokenPayload as g, IssueCollaborationTokenOptions as h, issueBatchScopedToken as i, unsafeDecodeToken as l, CollaborationTokenPayload as m, getTokenTTL as n, issueProjectScopedToken as o, CollaborationAccess as p, isTokenExpiringSoon as r, issueReadToken as s, ProductTokenIssuer as t, verifyToken as u, SessionScopedTokenPayload as v, TokenScope as y };
|
|
230
|
+
export { ReadTokenPayload as _, issueCollaborationToken as a, materializeCliAuthBundle as b, issueSessionScopedToken as c, AnyTokenPayload as d, BatchScopedTokenPayload as f, ProjectScopedTokenPayload as g, IssueCollaborationTokenOptions as h, issueBatchScopedToken as i, unsafeDecodeToken as l, CollaborationTokenPayload as m, getTokenTTL as n, issueProjectScopedToken as o, CollaborationAccess as p, isTokenExpiringSoon as r, issueReadToken as s, ProductTokenIssuer as t, verifyToken as u, SessionScopedTokenPayload as v, TokenScope as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as HttpClient, r as SandboxInstance } from "./sandbox-
|
|
2
|
-
import { R as CreateSandboxOptions } from "./types-
|
|
1
|
+
import { n as HttpClient, r as SandboxInstance } from "./sandbox-DWJixf9M.js";
|
|
2
|
+
import { R as CreateSandboxOptions } from "./types-DlRSEEnc.js";
|
|
3
3
|
|
|
4
4
|
//#region src/tangle/abi.d.ts
|
|
5
5
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { $ as SandboxMcpEndpoint, A as InterruptResult, B as InteractiveAttachRequest, C as InteractiveSessionHost, D as InteractiveSessionStartOptions, E as InteractiveSessionRef, F as InteractiveTerminalMetadata, G as SandboxInteractionConflict, H as InteractiveSessionControllerOptions, I as createInteractiveTerminalCapture, J as BuildControlPlaneMcpConfigOptions, K as SandboxInteractionResolution, L as createInteractiveTerminalSession, M as agentInteractiveSessionPromptRequestDigest, N as InteractiveTerminalCapture, O as InteractiveSessionStartResult, P as InteractiveTerminalFrameLog, Q as SandboxMcpConfig, R as BrowserInteractiveSessionController, S as InteractiveSessionHandleOptions, T as InteractiveSessionInfo, U as InteractiveSessionControllerTransport, V as InteractiveSessionController, W as SandboxInteractionCommandResult, X as CONTROL_PLANE_MCP_SERVER_NAME, Y as BuildSandboxMcpConfigOptions, Z as SANDBOX_MCP_SERVER_NAME, _ as AgentInteractiveTerminalSession, a as WorkspaceImagePublishRequestOptions, b as InteractiveSessionControlClaim, c as TraceExportFormat, d as buildTraceExportPayload, et as SandboxMcpServerEntry, f as exportTraceBundle, g as SandboxSession, h as SandboxTaskSession, i as WorkspaceImagePublishInput, j as RespondToPermissionOptions, k as InteractiveStopCommand, l as TraceExportResult, m as toOtelJson, nt as buildSandboxMcpConfig, o as WorkspaceImagePublishResult, p as otelTraceIdForTangleTrace, q as SandboxInteractionResult, r as SandboxInstance, s as WorkspaceImages, t as ForkAcknowledgement, tt as buildControlPlaneMcpConfig, u as TraceExportSink, v as InteractiveControlClaimRequest, w as InteractiveSessionIncarnationId, x as InteractiveSessionHandle, y as InteractivePromptCommand, z as BrowserInteractiveSessionControllerOptions } from "./sandbox-
|
|
2
|
-
import { c as MintScopedTokenOptions, d as TERMINAL_WS_ECHO_SUBPROTOCOL, f as TerminalExitInfo, g as TerminalStreamAuthFormat, h as TerminalReadyInfo, i as TerminalStreamOptions, l as ScopedToken, m as TerminalOutputMessage, n as TerminalStreamError, o as TerminalStreamToken, p as TerminalInteractiveSessionIdentity, r as TerminalStreamHandlers, s as MintInteractiveSessionTokenOptions, t as TerminalStream, u as ScopedTokenScope } from "./terminal-stream-
|
|
3
|
-
import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, d as InteractiveAttachOptions, f as InteractiveControlClaimAcknowledgement, h as InteractiveSessionStatus, i as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, l as createInteractiveControlHolderId, m as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, p as InteractiveControlClaimOptions, r as browserInteractiveControlHolderId, s as InteractiveSessionControlTransport, t as BrowserInteractiveSessionControlController, u as interactiveSessionIdentityDigest } from "./browser-interactive-control-controller-
|
|
4
|
-
import { $ as DurablePlanDecisionResult, $i as UploadProgress, $n as RolloutScorer, $r as SandboxTerminalManager, $t as GpuLeaseStatus, A as CommitTaskSessionOptions, Ai as SnapshotInfo, An as ProcessSpawnOptions, Ar as SandboxFleetToken, At as FleetDriveTurnRequest, B as CreateTaskSessionOptions, Bi as TaskSessionFileChange, Bn as PublicTemplateVersionInfo, Br as SandboxIdentity, Bt as GitAuth, C as BranchOptions, Ci as SessionMessage, Cn as PreviewLinkWaitOptions, Cr as SandboxFleetMachineMeteredUsage, Ct as FileUsageResult, Di as SnapshotDeleteAcknowledgement, Dn as ProcessLogEntry, Dr as SandboxFleetManifestMachine, Dt as FleetDispatchResultBufferOptions, Ei as SessionStatus, En as ProcessListOptions, Er as SandboxFleetManifest, Et as FleetDispatchResultBuffer, F as CreateSandboxFleetOptions, Fi as StartupOperation, Fn as ProvisionEvent, Fr as SandboxFleetUsage, G as DispatchedSession, Gi as TeeAttestationResponse, Gn as ReconcileSandboxFleetsOptions, Gr as SandboxResourceUsage, Gt as GitStatus, H as DevServerInfo, Hi as TaskSessionProfile, Hn as PublishPublicTemplateVersionOptions, Hr as SandboxIntelligenceEnvelope, Ht as GitCommit, Ii as StorageConfig, In as ProvisionResult, Ir as SandboxFleetWorkspace, It as ForkCounts, J as DriveTurnOptions, Ji as TokenRefreshHandler, Jr as SandboxRuntimeHealth, Jt as GpuLeaseCommandResult, K as DownloadOptions, Ki as TeePublicKey, Kn as ReconcileSandboxFleetsResult, Kr as SandboxResources, Kt as GpuLease, L as CreateSandboxFleetWithCoordinatorOptions, Li as SubscriptionInfo, Ln as ProvisionStatus, Lr as SandboxFleetWorkspaceReconcileResult, Lt as ForkIdempotency, M as CreateGpuLeaseOptions, Mi as SnapshotResult, Mn as PromptInputPart, Mr as SandboxFleetTraceEvent, N as CreateIntelligenceReportOptions, Nn as PromptOptions, Nr as SandboxFleetTraceExport, Nt as FleetMachineId, Oi as SnapshotDeleteOutcome, On as ProcessManager, Or as SandboxFleetOperationsSummary, Ot as FleetDispatchStreamOptions, P as CreateRequestOptions, Pi as StartupDiagnostics, Pn as PromptResult, Pr as SandboxFleetTraceOptions, Pt as FleetPromptDispatchOptions, Q as DurablePlan, Qi as UploadOptions, Qn as RolloutOptions, Qr as SandboxTerminalInfo, Qt as GpuLeaseProviderName, R as CreateSandboxOptions, Ri as TaskSessionChanges, Rn as ProvisionStep, Rr as SandboxFleetWorkspaceRestoreResult, Rt as ForkLookupOptions, S as BatchTaskResult, Si as SessionListOptions, Sn as PreviewLinkManager, Sr as SandboxFleetMachine, St as FileUsageOptions, T as ChunkedUploadResult, Ti as SessionResultOptions, Tn as ProcessInfo, Tr as SandboxFleetMachineSpec, Tt as FleetDispatchCancelResult, U as DirectoryPermission, Ui as TeeAttestationOptions, Un as ReapExpiredSandboxFleetsOptions, Ur as SandboxPortBinding, Ut as GitConfig, V as DeleteOptions, Vi as TaskSessionInfo, Vn as PublishPublicTemplateOptions, Vr as SandboxInfo, Vt as GitBranch, W as DispatchPromptOptions, Wi as TeeAttestationReport, Wn as ReapExpiredSandboxFleetsResult, Wr as SandboxPortPreviewLink, Wt as GitDiff, X as DriverInfo, Xi as TurnDriveResult, Xn as Rollout, Xr as SandboxTerminalAttachOptions, Xt as GpuLeaseExecResult, Y as DriverConfig, Yi as TokenUsage, Yr as SandboxStatus, Yt as GpuLeaseExecOptions, Z as DriverType, Zi as UpdateUserOptions, Zn as RolloutChildResult, Zr as SandboxTerminalCreateOptions, Zt as GpuLeaseManager, _ as BatchBackend, _i as SessionExecutionStatus, _n as NetworkManager, _r as SandboxFleetDispatchResponse, _t as FileRenameResult, aa as WriteManyFile, ai as SandboxTraceOptions, an as IntelligenceReportCompareTo, ar as SandboxConfig, at as EgressManager, b as BatchRunRequest, bi as SessionInfo, bn as PermissionsManager, br as SandboxFleetInfo, bt as FileTreeOptions, c as AttachGpuLeaseOptions, ca as BatchEvent, ci as SearchOptions, cr as SandboxCreateReceipt, ct as EventStreamOptions, d as BackendConfig, da as BatchTaskUsage, di as SendSessionMessageOptions, dn as ListSandboxFleetOptions, dr as SandboxEnvironment, dt as ExecResult, ea as UsageInfo, ei as SandboxTerminalRequestOptions, en as HostAgentDriverConfig, er as RolloutStartResult, f as BackendInfo, fa as PublicBatchRunRequest, fi as SendSessionMessageRequest, fn as ListSandboxOptions, fr as SandboxEvent, ft as FileInfo, g as BackendStatus, gi as SessionExecutionInfo, gn as NetworkConfig, gr as SandboxFleetDispatchFailureClass, gt as FileReadResult, h as BackendRuntimeConfigUpdate, hi as SessionEventStreamOptions, hn as MkdirOptions, hr as SandboxFleetCostEstimate, ht as FileReadError, ia as WriteFileOptions, ii as SandboxTraceExport, in as IntelligenceReportBudget, ir as SSHCredentials, it as EgressDenial, j as CompletedTurnResult, ji as SnapshotOptions, jn as ProcessStatus, jr as SandboxFleetTraceBundle, jt as FleetExecDispatchOptions, ki as SnapshotIdempotency, kn as ProcessSignal, kr as SandboxFleetPolicy, kt as FleetDriveTurnOutcome, l as AttachSandboxFleetMachineOptions, la as BatchEventDataMap, li as SecretInfo, ln as ListMessagesOptions, lr as SandboxDeleteAcknowledgement, lt as ExactProcessSpawnOptions, m as BackendMcpServerStatus, ma as parseBackendType, mi as SessionBackendCredentials, mn as McpServerConfig, mr as SandboxFleetArtifactSpec, mt as FileReadBatchResult, n as AccessPolicyRule, na as WaitForRolloutOptions, ni as SandboxTraceBundle, nn as InstalledTool, nr as RolloutTurnPart, nt as EffectiveBackendProfile, oa as WriteManyOptions, oi as SandboxUser, on as IntelligenceReportSubjectType, or as SandboxConnection, ot as EgressPolicy, p as BackendManager, pa as BackendType, pi as SentSessionMessage, pn as MAX_EGRESS_DENIALS_LIMIT, pr as SandboxFleetArtifact, pt as FileReadBatchOptions, q as DownloadProgress, qi as TeePublicKeyResponse, qn as RenameOptions, qr as SandboxRuntimeCapabilities, qt as GpuLeaseBilling, r as AddUserOptions, ra as WorkspaceOperationLookup, ri as SandboxTraceEvent, rn as IntelligenceReport, rr as SSHCommandDescriptor, rt as EffectiveBackendSource, sa as BatchBackendStats, si as SearchMatch, sn as IntelligenceReportWindow, sr as SandboxCreateOutcome, st as EnsureDevServerOptions, t as AcceleratorKind, ta as WaitForOptions, ti as SandboxTerminals, tn as HostAgentRuntimeBackend, tr as RolloutStatus, tt as EffectiveBackend, u as BackendCapabilities, ua as BatchSidecarGroup, ui as SecretsManager, un as ListOptions, ur as SandboxDeleteOutcome, ut as ExecOptions, v as BatchResult, vi as SessionFailureReason, vn as NonHostAgentDriverConfig, vr as SandboxFleetDriverCapability, vt as FileSystem, w as ChunkedUploadOptions, wi as SessionMessageInputPart, wn as Process, wr as SandboxFleetMachineRecord, wt as FileWriteResult, x as BatchTask, xi as SessionInterruptOptions, xn as PreviewLinkInfo, xr as SandboxFleetIntelligenceEnvelope, xt as FileTreeResult, y as BatchRunOptions, yi as SessionForkOptions, yn as PermissionLevel, yr as SandboxFleetDriverTimings, yt as FileTreeFile, z as CreateSessionOptions, zi as TaskSessionCommitResult, zn as PublicTemplateInfo, zr as SandboxFleetWorkspaceSnapshotResult, zt as GPU_LEASE_PROVIDER_NAMES } from "./types-
|
|
5
|
-
import { C as isBackendRegistryInteractionKind, S as backendRegistryResponseSchema, T as parseBackendRegistryResponseBody, _ as BackendRegistryInteractionKind, a as Team, b as backendRegistryEntrySchema, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, g as BackendRegistryEntry, h as BackendRegistryCapabilities, i as Sandbox, l as SessionBroadcastResult, m as parseSSEStream, n as IntelligenceClient, o as TeamInvitation, p as ParsedSSEEvent, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as SandboxFleet, v as BackendRegistryResponse, w as parseBackendRegistryResponse, x as backendRegistryInteractionKindSchema, y as backendRegistryCapabilitiesSchema } from "./client-
|
|
6
|
-
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-
|
|
7
|
-
import { _ as CollaborationTransportConfig, a as CollaborationClient, c as CollaborationClientConfig, d as CollaborationDocumentRef, f as CollaborationFileBridgeOptions, g as CollaborationTokenRefreshResponse, h as CollaborationTokenRefreshRequest, i as parseCollaborationDocumentId, l as CollaborationDocumentAdapter, m as CollaborationPermissions, n as buildCollaborationDocumentId, o as CollaborationBootstrapRequest, p as CollaborationFileEvent, r as normalizeCollaborationPath, s as CollaborationBootstrapResponse, t as CollaborationFileBridge, u as CollaborationDocumentChange, v as SaveCollaborationSnapshotRequest, y as SaveCollaborationSnapshotResponse } from "./index-
|
|
8
|
-
import { a as FileWriteConflictError, c as PartialFailureError, d as SandboxErrorJson, f as SandboxFailureDetail, g as ValidationError, h as TimeoutError, i as EgressProxyRecoveryError, l as QuotaError, m as StateError, n as CapabilityError, o as NetworkError, p as ServerError, r as EdgeNotReadyError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-
|
|
9
|
-
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-
|
|
10
|
-
import { o as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-
|
|
1
|
+
import { $ as SandboxMcpEndpoint, A as InterruptResult, B as InteractiveAttachRequest, C as InteractiveSessionHost, D as InteractiveSessionStartOptions, E as InteractiveSessionRef, F as InteractiveTerminalMetadata, G as SandboxInteractionConflict, H as InteractiveSessionControllerOptions, I as createInteractiveTerminalCapture, J as BuildControlPlaneMcpConfigOptions, K as SandboxInteractionResolution, L as createInteractiveTerminalSession, M as agentInteractiveSessionPromptRequestDigest, N as InteractiveTerminalCapture, O as InteractiveSessionStartResult, P as InteractiveTerminalFrameLog, Q as SandboxMcpConfig, R as BrowserInteractiveSessionController, S as InteractiveSessionHandleOptions, T as InteractiveSessionInfo, U as InteractiveSessionControllerTransport, V as InteractiveSessionController, W as SandboxInteractionCommandResult, X as CONTROL_PLANE_MCP_SERVER_NAME, Y as BuildSandboxMcpConfigOptions, Z as SANDBOX_MCP_SERVER_NAME, _ as AgentInteractiveTerminalSession, a as WorkspaceImagePublishRequestOptions, b as InteractiveSessionControlClaim, c as TraceExportFormat, d as buildTraceExportPayload, et as SandboxMcpServerEntry, f as exportTraceBundle, g as SandboxSession, h as SandboxTaskSession, i as WorkspaceImagePublishInput, j as RespondToPermissionOptions, k as InteractiveStopCommand, l as TraceExportResult, m as toOtelJson, nt as buildSandboxMcpConfig, o as WorkspaceImagePublishResult, p as otelTraceIdForTangleTrace, q as SandboxInteractionResult, r as SandboxInstance, s as WorkspaceImages, t as ForkAcknowledgement, tt as buildControlPlaneMcpConfig, u as TraceExportSink, v as InteractiveControlClaimRequest, w as InteractiveSessionIncarnationId, x as InteractiveSessionHandle, y as InteractivePromptCommand, z as BrowserInteractiveSessionControllerOptions } from "./sandbox-DWJixf9M.js";
|
|
2
|
+
import { c as MintScopedTokenOptions, d as TERMINAL_WS_ECHO_SUBPROTOCOL, f as TerminalExitInfo, g as TerminalStreamAuthFormat, h as TerminalReadyInfo, i as TerminalStreamOptions, l as ScopedToken, m as TerminalOutputMessage, n as TerminalStreamError, o as TerminalStreamToken, p as TerminalInteractiveSessionIdentity, r as TerminalStreamHandlers, s as MintInteractiveSessionTokenOptions, t as TerminalStream, u as ScopedTokenScope } from "./terminal-stream-CcaBTVg3.js";
|
|
3
|
+
import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, d as InteractiveAttachOptions, f as InteractiveControlClaimAcknowledgement, h as InteractiveSessionStatus, i as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, l as createInteractiveControlHolderId, m as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, p as InteractiveControlClaimOptions, r as browserInteractiveControlHolderId, s as InteractiveSessionControlTransport, t as BrowserInteractiveSessionControlController, u as interactiveSessionIdentityDigest } from "./browser-interactive-control-controller-BELrFH4f.js";
|
|
4
|
+
import { $ as DurablePlanDecisionResult, $i as UploadProgress, $n as RolloutScorer, $r as SandboxTerminalManager, $t as GpuLeaseStatus, A as CommitTaskSessionOptions, Ai as SnapshotInfo, An as ProcessSpawnOptions, Ar as SandboxFleetToken, At as FleetDriveTurnRequest, B as CreateTaskSessionOptions, Bi as TaskSessionFileChange, Bn as PublicTemplateVersionInfo, Br as SandboxIdentity, Bt as GitAuth, C as BranchOptions, Ci as SessionMessage, Cn as PreviewLinkWaitOptions, Cr as SandboxFleetMachineMeteredUsage, Ct as FileUsageResult, Di as SnapshotDeleteAcknowledgement, Dn as ProcessLogEntry, Dr as SandboxFleetManifestMachine, Dt as FleetDispatchResultBufferOptions, Ei as SessionStatus, En as ProcessListOptions, Er as SandboxFleetManifest, Et as FleetDispatchResultBuffer, F as CreateSandboxFleetOptions, Fi as StartupOperation, Fn as ProvisionEvent, Fr as SandboxFleetUsage, G as DispatchedSession, Gi as TeeAttestationResponse, Gn as ReconcileSandboxFleetsOptions, Gr as SandboxResourceUsage, Gt as GitStatus, H as DevServerInfo, Hi as TaskSessionProfile, Hn as PublishPublicTemplateVersionOptions, Hr as SandboxIntelligenceEnvelope, Ht as GitCommit, Ii as StorageConfig, In as ProvisionResult, Ir as SandboxFleetWorkspace, It as ForkCounts, J as DriveTurnOptions, Ji as TokenRefreshHandler, Jr as SandboxRuntimeHealth, Jt as GpuLeaseCommandResult, K as DownloadOptions, Ki as TeePublicKey, Kn as ReconcileSandboxFleetsResult, Kr as SandboxResources, Kt as GpuLease, L as CreateSandboxFleetWithCoordinatorOptions, Li as SubscriptionInfo, Ln as ProvisionStatus, Lr as SandboxFleetWorkspaceReconcileResult, Lt as ForkIdempotency, M as CreateGpuLeaseOptions, Mi as SnapshotResult, Mn as PromptInputPart, Mr as SandboxFleetTraceEvent, N as CreateIntelligenceReportOptions, Nn as PromptOptions, Nr as SandboxFleetTraceExport, Nt as FleetMachineId, Oi as SnapshotDeleteOutcome, On as ProcessManager, Or as SandboxFleetOperationsSummary, Ot as FleetDispatchStreamOptions, P as CreateRequestOptions, Pi as StartupDiagnostics, Pn as PromptResult, Pr as SandboxFleetTraceOptions, Pt as FleetPromptDispatchOptions, Q as DurablePlan, Qi as UploadOptions, Qn as RolloutOptions, Qr as SandboxTerminalInfo, Qt as GpuLeaseProviderName, R as CreateSandboxOptions, Ri as TaskSessionChanges, Rn as ProvisionStep, Rr as SandboxFleetWorkspaceRestoreResult, Rt as ForkLookupOptions, S as BatchTaskResult, Si as SessionListOptions, Sn as PreviewLinkManager, Sr as SandboxFleetMachine, St as FileUsageOptions, T as ChunkedUploadResult, Ti as SessionResultOptions, Tn as ProcessInfo, Tr as SandboxFleetMachineSpec, Tt as FleetDispatchCancelResult, U as DirectoryPermission, Ui as TeeAttestationOptions, Un as ReapExpiredSandboxFleetsOptions, Ur as SandboxPortBinding, Ut as GitConfig, V as DeleteOptions, Vi as TaskSessionInfo, Vn as PublishPublicTemplateOptions, Vr as SandboxInfo, Vt as GitBranch, W as DispatchPromptOptions, Wi as TeeAttestationReport, Wn as ReapExpiredSandboxFleetsResult, Wr as SandboxPortPreviewLink, Wt as GitDiff, X as DriverInfo, Xi as TurnDriveResult, Xn as Rollout, Xr as SandboxTerminalAttachOptions, Xt as GpuLeaseExecResult, Y as DriverConfig, Yi as TokenUsage, Yr as SandboxStatus, Yt as GpuLeaseExecOptions, Z as DriverType, Zi as UpdateUserOptions, Zn as RolloutChildResult, Zr as SandboxTerminalCreateOptions, Zt as GpuLeaseManager, _ as BatchBackend, _i as SessionExecutionStatus, _n as NetworkManager, _r as SandboxFleetDispatchResponse, _t as FileRenameResult, aa as WriteManyFile, ai as SandboxTraceOptions, an as IntelligenceReportCompareTo, ar as SandboxConfig, at as EgressManager, b as BatchRunRequest, bi as SessionInfo, bn as PermissionsManager, br as SandboxFleetInfo, bt as FileTreeOptions, c as AttachGpuLeaseOptions, ca as BatchEvent, ci as SearchOptions, cr as SandboxCreateReceipt, ct as EventStreamOptions, d as BackendConfig, da as BatchTaskUsage, di as SendSessionMessageOptions, dn as ListSandboxFleetOptions, dr as SandboxEnvironment, dt as ExecResult, ea as UsageInfo, ei as SandboxTerminalRequestOptions, en as HostAgentDriverConfig, er as RolloutStartResult, f as BackendInfo, fa as PublicBatchRunRequest, fi as SendSessionMessageRequest, fn as ListSandboxOptions, fr as SandboxEvent, ft as FileInfo, g as BackendStatus, gi as SessionExecutionInfo, gn as NetworkConfig, gr as SandboxFleetDispatchFailureClass, gt as FileReadResult, h as BackendRuntimeConfigUpdate, hi as SessionEventStreamOptions, hn as MkdirOptions, hr as SandboxFleetCostEstimate, ht as FileReadError, ia as WriteFileOptions, ii as SandboxTraceExport, in as IntelligenceReportBudget, ir as SSHCredentials, it as EgressDenial, j as CompletedTurnResult, ji as SnapshotOptions, jn as ProcessStatus, jr as SandboxFleetTraceBundle, jt as FleetExecDispatchOptions, ki as SnapshotIdempotency, kn as ProcessSignal, kr as SandboxFleetPolicy, kt as FleetDriveTurnOutcome, l as AttachSandboxFleetMachineOptions, la as BatchEventDataMap, li as SecretInfo, ln as ListMessagesOptions, lr as SandboxDeleteAcknowledgement, lt as ExactProcessSpawnOptions, m as BackendMcpServerStatus, ma as parseBackendType, mi as SessionBackendCredentials, mn as McpServerConfig, mr as SandboxFleetArtifactSpec, mt as FileReadBatchResult, n as AccessPolicyRule, na as WaitForRolloutOptions, ni as SandboxTraceBundle, nn as InstalledTool, nr as RolloutTurnPart, nt as EffectiveBackendProfile, oa as WriteManyOptions, oi as SandboxUser, on as IntelligenceReportSubjectType, or as SandboxConnection, ot as EgressPolicy, p as BackendManager, pa as BackendType, pi as SentSessionMessage, pn as MAX_EGRESS_DENIALS_LIMIT, pr as SandboxFleetArtifact, pt as FileReadBatchOptions, q as DownloadProgress, qi as TeePublicKeyResponse, qn as RenameOptions, qr as SandboxRuntimeCapabilities, qt as GpuLeaseBilling, r as AddUserOptions, ra as WorkspaceOperationLookup, ri as SandboxTraceEvent, rn as IntelligenceReport, rr as SSHCommandDescriptor, rt as EffectiveBackendSource, sa as BatchBackendStats, si as SearchMatch, sn as IntelligenceReportWindow, sr as SandboxCreateOutcome, st as EnsureDevServerOptions, t as AcceleratorKind, ta as WaitForOptions, ti as SandboxTerminals, tn as HostAgentRuntimeBackend, tr as RolloutStatus, tt as EffectiveBackend, u as BackendCapabilities, ua as BatchSidecarGroup, ui as SecretsManager, un as ListOptions, ur as SandboxDeleteOutcome, ut as ExecOptions, v as BatchResult, vi as SessionFailureReason, vn as NonHostAgentDriverConfig, vr as SandboxFleetDriverCapability, vt as FileSystem, w as ChunkedUploadOptions, wi as SessionMessageInputPart, wn as Process, wr as SandboxFleetMachineRecord, wt as FileWriteResult, x as BatchTask, xi as SessionInterruptOptions, xn as PreviewLinkInfo, xr as SandboxFleetIntelligenceEnvelope, xt as FileTreeResult, y as BatchRunOptions, yi as SessionForkOptions, yn as PermissionLevel, yr as SandboxFleetDriverTimings, yt as FileTreeFile, z as CreateSessionOptions, zi as TaskSessionCommitResult, zn as PublicTemplateInfo, zr as SandboxFleetWorkspaceSnapshotResult, zt as GPU_LEASE_PROVIDER_NAMES } from "./types-DlRSEEnc.js";
|
|
5
|
+
import { C as isBackendRegistryInteractionKind, S as backendRegistryResponseSchema, T as parseBackendRegistryResponseBody, _ as BackendRegistryInteractionKind, a as Team, b as backendRegistryEntrySchema, c as SessionBroadcastEvent, d as SandboxFleetClient, f as ParseSSEStreamOptions, g as BackendRegistryEntry, h as BackendRegistryCapabilities, i as Sandbox, l as SessionBroadcastResult, m as parseSSEStream, n as IntelligenceClient, o as TeamInvitation, p as ParsedSSEEvent, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as SandboxFleet, v as BackendRegistryResponse, w as parseBackendRegistryResponse, x as backendRegistryInteractionKindSchema, y as backendRegistryCapabilitiesSchema } from "./client-D0wfbjMF.js";
|
|
6
|
+
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-CS-t6tPU.js";
|
|
7
|
+
import { _ as CollaborationTransportConfig, a as CollaborationClient, c as CollaborationClientConfig, d as CollaborationDocumentRef, f as CollaborationFileBridgeOptions, g as CollaborationTokenRefreshResponse, h as CollaborationTokenRefreshRequest, i as parseCollaborationDocumentId, l as CollaborationDocumentAdapter, m as CollaborationPermissions, n as buildCollaborationDocumentId, o as CollaborationBootstrapRequest, p as CollaborationFileEvent, r as normalizeCollaborationPath, s as CollaborationBootstrapResponse, t as CollaborationFileBridge, u as CollaborationDocumentChange, v as SaveCollaborationSnapshotRequest, y as SaveCollaborationSnapshotResponse } from "./index-BzAxTiqF.js";
|
|
8
|
+
import { a as FileWriteConflictError, c as PartialFailureError, d as SandboxErrorJson, f as SandboxFailureDetail, g as ValidationError, h as TimeoutError, i as EgressProxyRecoveryError, l as QuotaError, m as StateError, n as CapabilityError, o as NetworkError, p as ServerError, r as EdgeNotReadyError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-rp1GiVzL.js";
|
|
9
|
+
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-DYdwjCOf.js";
|
|
10
|
+
import { o as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-H0L9SOXd.js";
|
|
11
11
|
import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
|
|
12
12
|
import { AgentProfile, AgentProfile as AgentProfile$1, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileConfigValue, AgentProfileConnection, AgentProfileFileMount, AgentProfileFileMount as AgentProfileFileMount$1, AgentProfileMcpServer, AgentProfileModelHints, AgentProfilePermissionValue, AgentProfilePrompt, AgentProfileResourceRef, AgentProfileResources, AgentProfileSecurityPolicy, AgentProfileValidationIssue, AgentProfileValidationResult, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, AgentSubagentProfile, Capability, SANDBOX_SIZE_PRESET_NAMES, SandboxSizePreset } from "@tangle-network/agent-interface";
|
|
13
|
-
import * as _$zod from "zod";
|
|
14
13
|
import { z } from "zod";
|
|
15
14
|
|
|
16
15
|
//#region src/attestation-heartbeat.d.ts
|
|
@@ -578,7 +577,7 @@ declare const manageSandboxesInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
578
577
|
}>;
|
|
579
578
|
}, z.core.$strict>], "type">>;
|
|
580
579
|
backend: z.ZodOptional<z.ZodObject<{
|
|
581
|
-
type:
|
|
580
|
+
type: z.ZodEnum<{
|
|
582
581
|
"claude-code": "claude-code";
|
|
583
582
|
nanoclaw: "nanoclaw";
|
|
584
583
|
codex: "codex";
|
|
@@ -839,7 +838,7 @@ declare const manageSandboxesInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
839
838
|
depth: z.ZodOptional<z.ZodNumber>;
|
|
840
839
|
sparse: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
841
840
|
}, z.core.$strict>>;
|
|
842
|
-
cwd:
|
|
841
|
+
cwd: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
843
842
|
resources: z.ZodOptional<z.ZodObject<{
|
|
844
843
|
cpuCores: z.ZodOptional<z.ZodNumber>;
|
|
845
844
|
memoryMB: z.ZodOptional<z.ZodNumber>;
|
|
@@ -907,7 +906,7 @@ declare const manageSandboxesInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
907
906
|
}>;
|
|
908
907
|
}, z.core.$strict>], "type">>;
|
|
909
908
|
backend: z.ZodOptional<z.ZodObject<{
|
|
910
|
-
type:
|
|
909
|
+
type: z.ZodEnum<{
|
|
911
910
|
"claude-code": "claude-code";
|
|
912
911
|
nanoclaw: "nanoclaw";
|
|
913
912
|
codex: "codex";
|
|
@@ -1168,7 +1167,7 @@ declare const manageSandboxesInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1168
1167
|
depth: z.ZodOptional<z.ZodNumber>;
|
|
1169
1168
|
sparse: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1170
1169
|
}, z.core.$strict>>;
|
|
1171
|
-
cwd:
|
|
1170
|
+
cwd: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1172
1171
|
resources: z.ZodOptional<z.ZodObject<{
|
|
1173
1172
|
cpuCores: z.ZodOptional<z.ZodNumber>;
|
|
1174
1173
|
memoryMB: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1246,7 +1245,7 @@ declare const manageSandboxesInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1246
1245
|
}>;
|
|
1247
1246
|
}, z.core.$strict>], "type">>;
|
|
1248
1247
|
backend: z.ZodOptional<z.ZodObject<{
|
|
1249
|
-
type:
|
|
1248
|
+
type: z.ZodEnum<{
|
|
1250
1249
|
"claude-code": "claude-code";
|
|
1251
1250
|
nanoclaw: "nanoclaw";
|
|
1252
1251
|
codex: "codex";
|
|
@@ -1507,7 +1506,7 @@ declare const manageSandboxesInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1507
1506
|
depth: z.ZodOptional<z.ZodNumber>;
|
|
1508
1507
|
sparse: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1509
1508
|
}, z.core.$strict>>;
|
|
1510
|
-
cwd:
|
|
1509
|
+
cwd: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1511
1510
|
resources: z.ZodOptional<z.ZodObject<{
|
|
1512
1511
|
cpuCores: z.ZodOptional<z.ZodNumber>;
|
|
1513
1512
|
memoryMB: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1570,7 +1569,7 @@ declare const manageSandboxesInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1570
1569
|
}>;
|
|
1571
1570
|
}, z.core.$strict>], "type">>;
|
|
1572
1571
|
backend: z.ZodOptional<z.ZodObject<{
|
|
1573
|
-
type:
|
|
1572
|
+
type: z.ZodEnum<{
|
|
1574
1573
|
"claude-code": "claude-code";
|
|
1575
1574
|
nanoclaw: "nanoclaw";
|
|
1576
1575
|
codex: "codex";
|
|
@@ -1831,7 +1830,7 @@ declare const manageSandboxesInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1831
1830
|
depth: z.ZodOptional<z.ZodNumber>;
|
|
1832
1831
|
sparse: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1833
1832
|
}, z.core.$strict>>;
|
|
1834
|
-
cwd:
|
|
1833
|
+
cwd: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1835
1834
|
resources: z.ZodOptional<z.ZodObject<{
|
|
1836
1835
|
cpuCores: z.ZodOptional<z.ZodNumber>;
|
|
1837
1836
|
memoryMB: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1899,7 +1898,7 @@ declare const manageSandboxesInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1899
1898
|
}>;
|
|
1900
1899
|
}, z.core.$strict>], "type">>;
|
|
1901
1900
|
backend: z.ZodOptional<z.ZodObject<{
|
|
1902
|
-
type:
|
|
1901
|
+
type: z.ZodEnum<{
|
|
1903
1902
|
"claude-code": "claude-code";
|
|
1904
1903
|
nanoclaw: "nanoclaw";
|
|
1905
1904
|
codex: "codex";
|
|
@@ -2160,7 +2159,7 @@ declare const manageSandboxesInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2160
2159
|
depth: z.ZodOptional<z.ZodNumber>;
|
|
2161
2160
|
sparse: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2162
2161
|
}, z.core.$strict>>;
|
|
2163
|
-
cwd:
|
|
2162
|
+
cwd: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
2164
2163
|
resources: z.ZodOptional<z.ZodObject<{
|
|
2165
2164
|
cpuCores: z.ZodOptional<z.ZodNumber>;
|
|
2166
2165
|
memoryMB: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2333,7 +2332,7 @@ declare const MANAGE_SANDBOXES_PARAMETERS: z.core.ZodStandardJSONSchemaPayload<z
|
|
|
2333
2332
|
}>;
|
|
2334
2333
|
}, z.core.$strict>], "type">>;
|
|
2335
2334
|
backend: z.ZodOptional<z.ZodObject<{
|
|
2336
|
-
type:
|
|
2335
|
+
type: z.ZodEnum<{
|
|
2337
2336
|
"claude-code": "claude-code";
|
|
2338
2337
|
nanoclaw: "nanoclaw";
|
|
2339
2338
|
codex: "codex";
|
|
@@ -2594,7 +2593,7 @@ declare const MANAGE_SANDBOXES_PARAMETERS: z.core.ZodStandardJSONSchemaPayload<z
|
|
|
2594
2593
|
depth: z.ZodOptional<z.ZodNumber>;
|
|
2595
2594
|
sparse: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2596
2595
|
}, z.core.$strict>>;
|
|
2597
|
-
cwd:
|
|
2596
|
+
cwd: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
2598
2597
|
resources: z.ZodOptional<z.ZodObject<{
|
|
2599
2598
|
cpuCores: z.ZodOptional<z.ZodNumber>;
|
|
2600
2599
|
memoryMB: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2662,7 +2661,7 @@ declare const MANAGE_SANDBOXES_PARAMETERS: z.core.ZodStandardJSONSchemaPayload<z
|
|
|
2662
2661
|
}>;
|
|
2663
2662
|
}, z.core.$strict>], "type">>;
|
|
2664
2663
|
backend: z.ZodOptional<z.ZodObject<{
|
|
2665
|
-
type:
|
|
2664
|
+
type: z.ZodEnum<{
|
|
2666
2665
|
"claude-code": "claude-code";
|
|
2667
2666
|
nanoclaw: "nanoclaw";
|
|
2668
2667
|
codex: "codex";
|
|
@@ -2923,7 +2922,7 @@ declare const MANAGE_SANDBOXES_PARAMETERS: z.core.ZodStandardJSONSchemaPayload<z
|
|
|
2923
2922
|
depth: z.ZodOptional<z.ZodNumber>;
|
|
2924
2923
|
sparse: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2925
2924
|
}, z.core.$strict>>;
|
|
2926
|
-
cwd:
|
|
2925
|
+
cwd: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
2927
2926
|
resources: z.ZodOptional<z.ZodObject<{
|
|
2928
2927
|
cpuCores: z.ZodOptional<z.ZodNumber>;
|
|
2929
2928
|
memoryMB: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3001,7 +3000,7 @@ declare const MANAGE_SANDBOXES_PARAMETERS: z.core.ZodStandardJSONSchemaPayload<z
|
|
|
3001
3000
|
}>;
|
|
3002
3001
|
}, z.core.$strict>], "type">>;
|
|
3003
3002
|
backend: z.ZodOptional<z.ZodObject<{
|
|
3004
|
-
type:
|
|
3003
|
+
type: z.ZodEnum<{
|
|
3005
3004
|
"claude-code": "claude-code";
|
|
3006
3005
|
nanoclaw: "nanoclaw";
|
|
3007
3006
|
codex: "codex";
|
|
@@ -3262,7 +3261,7 @@ declare const MANAGE_SANDBOXES_PARAMETERS: z.core.ZodStandardJSONSchemaPayload<z
|
|
|
3262
3261
|
depth: z.ZodOptional<z.ZodNumber>;
|
|
3263
3262
|
sparse: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3264
3263
|
}, z.core.$strict>>;
|
|
3265
|
-
cwd:
|
|
3264
|
+
cwd: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
3266
3265
|
resources: z.ZodOptional<z.ZodObject<{
|
|
3267
3266
|
cpuCores: z.ZodOptional<z.ZodNumber>;
|
|
3268
3267
|
memoryMB: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3325,7 +3324,7 @@ declare const MANAGE_SANDBOXES_PARAMETERS: z.core.ZodStandardJSONSchemaPayload<z
|
|
|
3325
3324
|
}>;
|
|
3326
3325
|
}, z.core.$strict>], "type">>;
|
|
3327
3326
|
backend: z.ZodOptional<z.ZodObject<{
|
|
3328
|
-
type:
|
|
3327
|
+
type: z.ZodEnum<{
|
|
3329
3328
|
"claude-code": "claude-code";
|
|
3330
3329
|
nanoclaw: "nanoclaw";
|
|
3331
3330
|
codex: "codex";
|
|
@@ -3586,7 +3585,7 @@ declare const MANAGE_SANDBOXES_PARAMETERS: z.core.ZodStandardJSONSchemaPayload<z
|
|
|
3586
3585
|
depth: z.ZodOptional<z.ZodNumber>;
|
|
3587
3586
|
sparse: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3588
3587
|
}, z.core.$strict>>;
|
|
3589
|
-
cwd:
|
|
3588
|
+
cwd: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
3590
3589
|
resources: z.ZodOptional<z.ZodObject<{
|
|
3591
3590
|
cpuCores: z.ZodOptional<z.ZodNumber>;
|
|
3592
3591
|
memoryMB: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3654,7 +3653,7 @@ declare const MANAGE_SANDBOXES_PARAMETERS: z.core.ZodStandardJSONSchemaPayload<z
|
|
|
3654
3653
|
}>;
|
|
3655
3654
|
}, z.core.$strict>], "type">>;
|
|
3656
3655
|
backend: z.ZodOptional<z.ZodObject<{
|
|
3657
|
-
type:
|
|
3656
|
+
type: z.ZodEnum<{
|
|
3658
3657
|
"claude-code": "claude-code";
|
|
3659
3658
|
nanoclaw: "nanoclaw";
|
|
3660
3659
|
codex: "codex";
|
|
@@ -3915,7 +3914,7 @@ declare const MANAGE_SANDBOXES_PARAMETERS: z.core.ZodStandardJSONSchemaPayload<z
|
|
|
3915
3914
|
depth: z.ZodOptional<z.ZodNumber>;
|
|
3916
3915
|
sparse: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3917
3916
|
}, z.core.$strict>>;
|
|
3918
|
-
cwd:
|
|
3917
|
+
cwd: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
3919
3918
|
resources: z.ZodOptional<z.ZodObject<{
|
|
3920
3919
|
cpuCores: z.ZodOptional<z.ZodNumber>;
|
|
3921
3920
|
memoryMB: z.ZodOptional<z.ZodNumber>;
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { a as FileWriteConflictError, c as PartialFailureError, d as ServerError, f as StateError, i as EgressProxyRecoveryError, l as QuotaError, m as ValidationError, n as CapabilityError, o as NetworkError, p as TimeoutError, r as EdgeNotReadyError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-
|
|
3
|
-
import { _ as parseBackendRegistryResponse, a as splitInlineProfileSkills, c as SandboxFleetClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as splitInlineProfileFileMounts, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, o as validateDeferredProfileFileMounts, p as backendRegistryEntrySchema, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-
|
|
1
|
+
import { _ as deriveAgentRunOutcome, g as deriveAgentResultOutcome, h as createAgentRunOutcomeTracker, m as normalizeRuntimeBackendConfig, u as parseSSEStream, v as backendTypeSchema, y as parseBackendType } from "./runtime-api-B8uIpISe.js";
|
|
2
|
+
import { a as FileWriteConflictError, c as PartialFailureError, d as ServerError, f as StateError, i as EgressProxyRecoveryError, l as QuotaError, m as ValidationError, n as CapabilityError, o as NetworkError, p as TimeoutError, r as EdgeNotReadyError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-DrJySZQG.js";
|
|
3
|
+
import { _ as parseBackendRegistryResponse, a as splitInlineProfileSkills, c as SandboxFleetClient, d as validateBatchRunRequest, f as backendRegistryCapabilitiesSchema, g as isBackendRegistryInteractionKind, h as backendRegistryResponseSchema, i as splitInlineProfileFileMounts, l as runtimeWorkspaceCwdSchema, m as backendRegistryInteractionKindSchema, n as Sandbox, o as validateDeferredProfileFileMounts, p as backendRegistryEntrySchema, r as materializeProfileFileMounts, s as SandboxFleet, t as IntelligenceClient, u as createBatchResultAccumulator, v as parseBackendRegistryResponseBody } from "./client-D7m-EvDD.js";
|
|
4
4
|
import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, c as createInteractiveControlHolderId, l as interactiveSessionIdentityDigest, n as browserInteractiveControlHolderId, o as InteractiveSessionControlController, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-Dv0gbFMu.js";
|
|
5
|
-
import { A as toOtelJson, C as collectAgentResponseText, D as buildTraceExportPayload, O as exportTraceBundle, S as collectAgentFinalMessageText, T as isToolBearingEvent, _ as TerminalStream, a as WorkspaceImages, c as SandboxTaskSession, d as agentInteractiveSessionPromptRequestDigest, f as InteractiveTerminalFrameLog, g as InteractiveSessionController, h as BrowserInteractiveSessionController, k as otelTraceIdForTangleTrace, l as SandboxSession, m as createInteractiveTerminalSession, o as GPU_LEASE_PROVIDER_NAMES, p as createInteractiveTerminalCapture, s as MAX_EGRESS_DENIALS_LIMIT, t as SandboxInstance, u as InteractiveSessionHandle, v as TerminalStreamError, w as getSandboxEventText, x as applySandboxEventText, y as TERMINAL_WS_ECHO_SUBPROTOCOL } from "./sandbox-
|
|
6
|
-
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-
|
|
7
|
-
import { t as TangleSandboxClient } from "./tangle-
|
|
5
|
+
import { A as toOtelJson, C as collectAgentResponseText, D as buildTraceExportPayload, O as exportTraceBundle, S as collectAgentFinalMessageText, T as isToolBearingEvent, _ as TerminalStream, a as WorkspaceImages, c as SandboxTaskSession, d as agentInteractiveSessionPromptRequestDigest, f as InteractiveTerminalFrameLog, g as InteractiveSessionController, h as BrowserInteractiveSessionController, k as otelTraceIdForTangleTrace, l as SandboxSession, m as createInteractiveTerminalSession, o as GPU_LEASE_PROVIDER_NAMES, p as createInteractiveTerminalCapture, s as MAX_EGRESS_DENIALS_LIMIT, t as SandboxInstance, u as InteractiveSessionHandle, v as TerminalStreamError, w as getSandboxEventText, x as applySandboxEventText, y as TERMINAL_WS_ECHO_SUBPROTOCOL } from "./sandbox-B6ac3lK0.js";
|
|
6
|
+
import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-BKHF1SP8.js";
|
|
7
|
+
import { t as TangleSandboxClient } from "./tangle-DXgX-BpB.js";
|
|
8
8
|
import { SANDBOX_SIZE_PRESET_NAMES, agentProfileConfidentialSchema, agentProfileSchema } from "@tangle-network/agent-interface";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/confidential.ts
|
|
@@ -1098,10 +1098,6 @@ function buildTangleRouterSearchProfile(config, options = {}) {
|
|
|
1098
1098
|
return {
|
|
1099
1099
|
name: options.name ?? "tangle-router-web-search",
|
|
1100
1100
|
model: { default: options.model ?? config.tcloud.sandboxBackend.model.model },
|
|
1101
|
-
permissions: {
|
|
1102
|
-
network: "allow",
|
|
1103
|
-
mcp: "allow"
|
|
1104
|
-
},
|
|
1105
1101
|
mcp: { tangle_web_search: {
|
|
1106
1102
|
transport: "http",
|
|
1107
1103
|
url: config.mcp.streamable_http_url,
|
|
@@ -1250,10 +1246,6 @@ function buildSandboxBackend(options) {
|
|
|
1250
1246
|
const profile = {
|
|
1251
1247
|
name: options.profile?.name ?? options.profile?.id ?? "tangle-router-benchmark",
|
|
1252
1248
|
model: { default: options.profile?.model ?? model.model },
|
|
1253
|
-
permissions: {
|
|
1254
|
-
network: "allow",
|
|
1255
|
-
mcp: "allow"
|
|
1256
|
-
},
|
|
1257
1249
|
mcp: { tangle_web_search: searchProvider === "off" ? { enabled: false } : {
|
|
1258
1250
|
transport: "http",
|
|
1259
1251
|
url: options.config.mcp.streamable_http_url,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as parseErrorResponse, o as NetworkError, p as TimeoutError } from "../errors-
|
|
1
|
+
import { h as parseErrorResponse, o as NetworkError, p as TimeoutError } from "../errors-DrJySZQG.js";
|
|
2
2
|
//#region src/intelligence/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* `@tangle-network/sandbox/intelligence` — browser-safe typed client for the
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as InteractiveSessionIdentity, n as BrowserInteractiveSessionControlControllerOptions, r as browserInteractiveControlHolderId, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-
|
|
1
|
+
import { c as InteractiveSessionIdentity, n as BrowserInteractiveSessionControlControllerOptions, r as browserInteractiveControlHolderId, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-BELrFH4f.js";
|
|
2
2
|
export { BrowserInteractiveSessionControlController, type BrowserInteractiveSessionControlControllerOptions, type InteractiveSessionIdentity, browserInteractiveControlHolderId };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-DUsK57rK.js";
|
|
1
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
3
|
import { homedir } from "node:os";
|
|
3
4
|
import { join } from "node:path";
|
|
4
|
-
//#region
|
|
5
|
+
//#region ../../../packages/cli-agent-registry/dist/local-cli-auth.mjs
|
|
5
6
|
const DEFAULT_MODE = 384;
|
|
6
7
|
function readAuthFile(sourcePath, targetPath) {
|
|
7
8
|
if (!existsSync(sourcePath)) return null;
|
|
@@ -12,18 +13,19 @@ function readAuthFile(sourcePath, targetPath) {
|
|
|
12
13
|
};
|
|
13
14
|
}
|
|
14
15
|
function discoverCodexAuthFiles(homeDir) {
|
|
15
|
-
const auth = readAuthFile(join(homeDir,
|
|
16
|
+
const auth = readAuthFile(join(homeDir, AUTH_BUNDLE_PATHS.codex), AUTH_BUNDLE_PATHS.codex);
|
|
16
17
|
return auth ? [auth] : [];
|
|
17
18
|
}
|
|
18
19
|
function discoverClaudeAuthFiles(homeDir) {
|
|
19
20
|
return [
|
|
20
|
-
readAuthFile(join(homeDir, "
|
|
21
|
+
readAuthFile(join(homeDir, AUTH_BUNDLE_PATHS["claude-code"]), AUTH_BUNDLE_PATHS["claude-code"]),
|
|
21
22
|
readAuthFile(join(homeDir, ".claude", "settings.json"), ".claude/settings.json"),
|
|
22
23
|
readAuthFile(join(homeDir, ".claude", "settings.local.json"), ".claude/settings.local.json")
|
|
23
24
|
].filter((entry) => entry !== null);
|
|
24
25
|
}
|
|
25
|
-
function discoverLocalCliAuthFiles(backendType) {
|
|
26
|
-
const
|
|
26
|
+
function discoverLocalCliAuthFiles(backendType, options = {}) {
|
|
27
|
+
const homeDir = options.homeDir ?? homedir();
|
|
28
|
+
const authFiles = backendType === "codex" ? discoverCodexAuthFiles(homeDir) : discoverClaudeAuthFiles(homeDir);
|
|
27
29
|
return authFiles.length > 0 ? authFiles : void 0;
|
|
28
30
|
}
|
|
29
31
|
function describeLocalCliAuthExpectation(backendType) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as ServerError, h as parseErrorResponse, l as QuotaError, m as ValidationError, n as CapabilityError, o as NetworkError, p as TimeoutError, u as SandboxError } from "./errors-
|
|
1
|
+
import { d as ServerError, h as parseErrorResponse, l as QuotaError, m as ValidationError, n as CapabilityError, o as NetworkError, p as TimeoutError, u as SandboxError } from "./errors-DrJySZQG.js";
|
|
2
2
|
import { n as combineAbortSignals } from "./abort-signal-si1WMfJb.js";
|
|
3
|
-
import { AgentExactRunControlRefSchema, AgentExecutionOutcomeSchema, DurablePlanSchema, InteractionRequestSchema, agentProfileSchema, harnessTypeSchema } from "@tangle-network/agent-interface";
|
|
3
|
+
import { AgentExactRunControlRefSchema, AgentExecutionOutcomeSchema, AgentRuntimeAttachmentsSchema, DurablePlanSchema, InteractionRequestSchema, agentProfileSchema, harnessTypeSchema } from "@tangle-network/agent-interface";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region ../../../packages/runtime-contracts/dist/backend-types.js
|
|
6
6
|
/**
|
|
@@ -475,6 +475,20 @@ function applyRequestedModel(backend, requestedModel) {
|
|
|
475
475
|
}
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
|
+
/** Per-turn backend fields override matching defaults; profiles and runtime maps stay whole. */
|
|
479
|
+
function mergeRuntimeBackendConfig(defaults, override) {
|
|
480
|
+
if (!defaults) return override;
|
|
481
|
+
if (!override) return defaults;
|
|
482
|
+
if (override.type !== void 0 && override.type !== defaults.type || override.model?.provider !== void 0 && override.model.provider !== defaults.model?.provider || override.model?.baseUrl !== void 0 && override.model.baseUrl !== defaults.model?.baseUrl) return override;
|
|
483
|
+
return {
|
|
484
|
+
...defaults,
|
|
485
|
+
...override,
|
|
486
|
+
...Object.hasOwn(override, "model") && override.model === void 0 ? { model: void 0 } : defaults.model || override.model ? { model: {
|
|
487
|
+
...defaults.model,
|
|
488
|
+
...override.model
|
|
489
|
+
} } : {}
|
|
490
|
+
};
|
|
491
|
+
}
|
|
478
492
|
/**
|
|
479
493
|
* Normalize runtime backend config for the wire format.
|
|
480
494
|
*
|
|
@@ -483,11 +497,21 @@ function applyRequestedModel(backend, requestedModel) {
|
|
|
483
497
|
*/
|
|
484
498
|
function normalizeRuntimeBackendConfig(backend) {
|
|
485
499
|
if (!backend) return void 0;
|
|
500
|
+
if (backend.runtimeAttachments !== void 0) {
|
|
501
|
+
const parsed = AgentRuntimeAttachmentsSchema.safeParse(backend.runtimeAttachments);
|
|
502
|
+
if (!parsed.success) throw new Error("[sandbox-sdk] invalid runtimeAttachments");
|
|
503
|
+
const attachments = parsed.data;
|
|
504
|
+
for (const alias of Object.keys(attachments.mcp)) {
|
|
505
|
+
if (attachments.mcp[alias]?.enabled === false) throw new Error(`[sandbox-sdk] runtime MCP attachment cannot be disabled: ${alias}`);
|
|
506
|
+
if (Object.hasOwn(backend.profile?.mcp ?? {}, alias)) throw new Error(`[sandbox-sdk] runtime MCP attachment conflicts with profile: ${alias}`);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
486
509
|
if (backend.type !== void 0) assertCurrentBackendType(backend.type);
|
|
487
510
|
if (backend.profile !== void 0 && !agentProfileSchema.safeParse(backend.profile).success) throw new Error("[sandbox-sdk] backend.profile must be an AgentProfile object");
|
|
488
511
|
return {
|
|
489
512
|
...backend?.type ? { type: backend.type } : {},
|
|
490
513
|
...backend?.profile !== void 0 ? { profile: backend.profile } : {},
|
|
514
|
+
...backend.runtimeAttachments !== void 0 ? { runtimeAttachments: structuredClone(backend.runtimeAttachments) } : {},
|
|
491
515
|
...backend?.model ? { model: backend.model } : {},
|
|
492
516
|
...backend?.server ? { server: backend.server } : {},
|
|
493
517
|
...backend?.interactions !== void 0 ? { interactions: backend.interactions } : {},
|
|
@@ -1520,4 +1544,4 @@ function normalizeSessionInfo(raw) {
|
|
|
1520
1544
|
};
|
|
1521
1545
|
}
|
|
1522
1546
|
//#endregion
|
|
1523
|
-
export {
|
|
1547
|
+
export { deriveAgentRunOutcome as _, uploadChunked as a, encodePromptForWire as c, applyRequestedModel as d, assertCurrentBackendType as f, deriveAgentResultOutcome as g, createAgentRunOutcomeTracker as h, sessionHeaders as i, encodeTextForWire as l, normalizeRuntimeBackendConfig as m, normalizeSessionInfo as n, SANDBOX_PROXY_REQUEST_MAX_BYTES as o, mergeRuntimeBackendConfig as p, appendSessionIdQuery as r, FILE_DECODED_WRITE_MAX_BYTES as s, SandboxRuntimeApi as t, parseSSEStream as u, backendTypeSchema as v, parseBackendType as y };
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $i as UploadProgress, $r as SandboxTerminalManager, A as CommitTaskSessionOptions, B as CreateTaskSessionOptions, Ci as SessionMessage, Ct as FileUsageResult, Jr as SandboxRuntimeHealth, Qr as SandboxTerminalInfo, Ri as TaskSessionChanges, St as FileUsageOptions, T as ChunkedUploadResult, Ur as SandboxPortBinding, Vi as TaskSessionInfo, Zr as SandboxTerminalCreateOptions, _i as SessionExecutionStatus, _t as FileRenameResult, bi as SessionInfo, bt as FileTreeOptions, di as SendSessionMessageOptions, ei as SandboxTerminalRequestOptions, fi as SendSessionMessageRequest, fr as SandboxEvent, gi as SessionExecutionInfo, hi as SessionEventStreamOptions, ia as WriteFileOptions, ln as ListMessagesOptions, mt as FileReadBatchResult, pi as SentSessionMessage, pt as FileReadBatchOptions, qn as RenameOptions, w as ChunkedUploadOptions, wt as FileWriteResult, xt as FileTreeResult, z as CreateSessionOptions, zi as TaskSessionCommitResult } from "./types-
|
|
2
|
-
import { a as FileWriteConflictError, c as PartialFailureError, d as SandboxErrorJson, f as SandboxFailureDetail, g as ValidationError, h as TimeoutError, l as QuotaError, m as StateError, n as CapabilityError, o as NetworkError, p as ServerError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-
|
|
3
|
-
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-
|
|
1
|
+
import { $i as UploadProgress, $r as SandboxTerminalManager, A as CommitTaskSessionOptions, B as CreateTaskSessionOptions, Ci as SessionMessage, Ct as FileUsageResult, Jr as SandboxRuntimeHealth, Qr as SandboxTerminalInfo, Ri as TaskSessionChanges, St as FileUsageOptions, T as ChunkedUploadResult, Ur as SandboxPortBinding, Vi as TaskSessionInfo, Zr as SandboxTerminalCreateOptions, _i as SessionExecutionStatus, _t as FileRenameResult, bi as SessionInfo, bt as FileTreeOptions, di as SendSessionMessageOptions, ei as SandboxTerminalRequestOptions, fi as SendSessionMessageRequest, fr as SandboxEvent, gi as SessionExecutionInfo, hi as SessionEventStreamOptions, ia as WriteFileOptions, ln as ListMessagesOptions, mt as FileReadBatchResult, pi as SentSessionMessage, pt as FileReadBatchOptions, qn as RenameOptions, w as ChunkedUploadOptions, wt as FileWriteResult, xt as FileTreeResult, z as CreateSessionOptions, zi as TaskSessionCommitResult } from "./types-DlRSEEnc.js";
|
|
2
|
+
import { a as FileWriteConflictError, c as PartialFailureError, d as SandboxErrorJson, f as SandboxFailureDetail, g as ValidationError, h as TimeoutError, l as QuotaError, m as StateError, n as CapabilityError, o as NetworkError, p as ServerError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-rp1GiVzL.js";
|
|
3
|
+
import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-DYdwjCOf.js";
|
|
4
4
|
|
|
5
5
|
//#region src/lib/chunked-upload.d.ts
|
|
6
6
|
/** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
|
package/dist/runtime.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as FileWriteConflictError, c as PartialFailureError, d as ServerError, f as StateError, l as QuotaError, m as ValidationError, n as CapabilityError, o as NetworkError, p as TimeoutError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-
|
|
1
|
+
import { _ as deriveAgentRunOutcome, a as uploadChunked, g as deriveAgentResultOutcome, h as createAgentRunOutcomeTracker, t as SandboxRuntimeApi } from "./runtime-api-B8uIpISe.js";
|
|
2
|
+
import { a as FileWriteConflictError, c as PartialFailureError, d as ServerError, f as StateError, l as QuotaError, m as ValidationError, n as CapabilityError, o as NetworkError, p as TimeoutError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-DrJySZQG.js";
|
|
3
3
|
import { n as combineAbortSignals } from "./abort-signal-si1WMfJb.js";
|
|
4
4
|
//#region src/runtime-client.ts
|
|
5
5
|
const DEFAULT_RUNTIME_TIMEOUT_MS = 3e4;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as uploadChunked, c as encodePromptForWire, d as applyRequestedModel, f as assertCurrentBackendType,
|
|
2
|
-
import { d as ServerError, f as StateError, h as parseErrorResponse, l as QuotaError, m as ValidationError, n as CapabilityError, o as NetworkError, p as TimeoutError, r as EdgeNotReadyError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-
|
|
1
|
+
import { a as uploadChunked, c as encodePromptForWire, d as applyRequestedModel, f as assertCurrentBackendType, g as deriveAgentResultOutcome, h as createAgentRunOutcomeTracker, i as sessionHeaders, m as normalizeRuntimeBackendConfig, n as normalizeSessionInfo, o as SANDBOX_PROXY_REQUEST_MAX_BYTES, p as mergeRuntimeBackendConfig, r as appendSessionIdQuery, t as SandboxRuntimeApi, u as parseSSEStream } from "./runtime-api-B8uIpISe.js";
|
|
2
|
+
import { d as ServerError, f as StateError, h as parseErrorResponse, l as QuotaError, m as ValidationError, n as CapabilityError, o as NetworkError, p as TimeoutError, r as EdgeNotReadyError, s as NotFoundError, t as AuthError, u as SandboxError } from "./errors-DrJySZQG.js";
|
|
3
3
|
import { c as createInteractiveControlHolderId, d as interactiveSessionControlReleaseResponseSchema, f as interactiveSessionControlValidationResponseSchema, i as createBrowserInteractiveSessionControlTransport, o as InteractiveSessionControlController, p as interactiveSessionStatusResponseSchema, r as browserInteractiveTerminalEndpoint, s as assertInteractiveSessionRef, u as interactiveSessionControlClaimResponseSchema } from "./browser-interactive-control-controller-Dv0gbFMu.js";
|
|
4
4
|
import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-si1WMfJb.js";
|
|
5
5
|
import { AgentExactRunControlRefSchema, AgentInteractiveSessionAttachSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimRequestSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionPromptCommandSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStartSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentInteractiveSessionStopCommandSchema, AgentRunCancellationAcknowledgementSchema, AgentRunCancellationRequestSchema, InteractionAcknowledgementSchema, InteractionBindingSchema, InteractionRequestSchema, InteractionResponseCommandSchema, InteractionResponseSchema, TerminalInputSchema, TerminalOutputEventSchema, TerminalReplayWindowSchema, TerminalResizeSchema, TerminalSessionRefSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimIsNewer, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionPromptRequestDigest, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionStatusMatchesRef, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentRunCancellationAcknowledgementMatchesRequest, canonicalCandidateDigest, exactAgentInteractiveSessionStart, sha256DigestSchema, terminalSessionUsable } from "@tangle-network/agent-interface";
|
|
@@ -4379,7 +4379,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
4379
4379
|
* content references by hash, changed content sends inline.
|
|
4380
4380
|
*/
|
|
4381
4381
|
buildRunBackendBody(overrideBackend, forceFullProfile, requestedModel) {
|
|
4382
|
-
const normalized = normalizeRuntimeBackendConfig(applyRequestedModel(
|
|
4382
|
+
const normalized = normalizeRuntimeBackendConfig(applyRequestedModel(mergeRuntimeBackendConfig(this.defaultRuntimeBackend, overrideBackend), requestedModel));
|
|
4383
4383
|
if (!normalized) return normalized;
|
|
4384
4384
|
const deferred = this.deferredProfileReference;
|
|
4385
4385
|
if (!forceFullProfile && deferred !== void 0 && normalized.profile !== void 0 && serializeProfileSnapshot(normalized.profile) === deferred.snapshot) {
|
|
@@ -5213,28 +5213,18 @@ var SandboxInstance = class SandboxInstance {
|
|
|
5213
5213
|
}
|
|
5214
5214
|
async fsUpload(localPath, remotePath, options) {
|
|
5215
5215
|
await this.ensureRunning();
|
|
5216
|
-
const
|
|
5217
|
-
const path = await import("node:path");
|
|
5218
|
-
const fileBuffer = await fs.readFile(localPath);
|
|
5219
|
-
const fileName = path.basename(localPath);
|
|
5216
|
+
const fileBuffer = await (await import("node:fs/promises")).readFile(localPath);
|
|
5220
5217
|
if (options?.onProgress) options.onProgress({
|
|
5221
5218
|
bytesUploaded: 0,
|
|
5222
5219
|
totalBytes: fileBuffer.length,
|
|
5223
5220
|
percentage: 0
|
|
5224
5221
|
});
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
method: "POST",
|
|
5231
|
-
body: formData,
|
|
5232
|
-
headers: {}
|
|
5222
|
+
await this.fsUploadData(remotePath, fileBuffer, {
|
|
5223
|
+
mode: options?.permissions,
|
|
5224
|
+
onProgress: options?.onProgress ? (progress) => {
|
|
5225
|
+
if (progress.percentage < 100) options.onProgress?.(progress);
|
|
5226
|
+
} : void 0
|
|
5233
5227
|
});
|
|
5234
|
-
if (!response.ok) {
|
|
5235
|
-
const body = await response.text();
|
|
5236
|
-
throw parseErrorResponse(response.status, body, void 0, response.headers);
|
|
5237
|
-
}
|
|
5238
5228
|
if (options?.onProgress) options.onProgress({
|
|
5239
5229
|
bytesUploaded: fileBuffer.length,
|
|
5240
5230
|
totalBytes: fileBuffer.length,
|
|
@@ -7659,7 +7649,7 @@ var SandboxInstance = class SandboxInstance {
|
|
|
7659
7649
|
if (turn) return settleTurnDrive(turn.result);
|
|
7660
7650
|
const info = await this._sessionStatus(opts.sessionId);
|
|
7661
7651
|
const hasExplicitBackend = opts.backend !== void 0 || opts.model !== void 0;
|
|
7662
|
-
const backend = applyRequestedModel(
|
|
7652
|
+
const backend = applyRequestedModel(mergeRuntimeBackendConfig(this.defaultRuntimeBackend, opts.backend), opts.model);
|
|
7663
7653
|
if (info?.status === "queued" && hasExplicitBackend) await this.createSession({
|
|
7664
7654
|
sessionId: opts.sessionId,
|
|
7665
7655
|
...backend !== void 0 ? { backend } : {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as TerminalStreamReconnectAuthority, c as MintScopedTokenOptions, h as TerminalReadyInfo, l as ScopedToken, r as TerminalStreamHandlers, t as TerminalStream } from "./terminal-stream-
|
|
2
|
-
import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, d as InteractiveAttachOptions, f as InteractiveControlClaimAcknowledgement, h as InteractiveSessionStatus, m as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, p as InteractiveControlClaimOptions, s as InteractiveSessionControlTransport } from "./browser-interactive-control-controller-
|
|
3
|
-
import { $ as DurablePlanDecisionResult, A as CommitTaskSessionOptions, Ai as SnapshotInfo, B as CreateTaskSessionOptions, C as BranchOptions, Ci as SessionMessage, D as CodeExecutionResult, Di as SnapshotDeleteAcknowledgement, E as CodeExecutionOptions, Fn as ProvisionEvent, G as DispatchedSession, Gi as TeeAttestationResponse, Gr as SandboxResourceUsage, Gt as GitStatus, Ht as GitCommit, In as ProvisionResult, It as ForkCounts, J as DriveTurnOptions, Jn as RestoreSnapshotOptions, Jr as SandboxRuntimeHealth, Kt as GpuLease, Lt as ForkIdempotency, Mi as SnapshotResult, Mn as PromptInputPart, Nn as PromptOptions, O as CodeLanguage, On as ProcessManager, Pi as StartupDiagnostics, Pn as PromptResult, Q as DurablePlan, Qn as RolloutOptions, Ri as TaskSessionChanges, Rt as ForkLookupOptions, Si as SessionListOptions, Sn as PreviewLinkManager, Ti as SessionResultOptions, Ui as TeeAttestationOptions, Ur as SandboxPortBinding, Vi as TaskSessionInfo, Vr as SandboxInfo, Vt as GitBranch, W as DispatchPromptOptions, Wt as GitDiff, X as DriverInfo, Xi as TurnDriveResult, Xn as Rollout, Xr as SandboxTerminalAttachOptions, Yn as ResumeOptions, Yr as SandboxStatus, Zt as GpuLeaseManager, _n as NetworkManager, aa as WriteManyFile, ai as SandboxTraceOptions, an as IntelligenceReportCompareTo, at as EgressManager, bi as SessionInfo, bn as PermissionsManager, ci as SearchOptions, cn as JsonValue, cr as SandboxCreateReceipt, ct as EventStreamOptions, d as BackendConfig, di as SendSessionMessageOptions, dt as ExecResult, er as RolloutStartResult, fi as SendSessionMessageRequest, fr as SandboxEvent, gi as SessionExecutionInfo, hi as SessionEventStreamOptions, ia as WriteFileOptions, in as IntelligenceReportBudget, ir as SSHCredentials, j as CompletedTurnResult, ji as SnapshotOptions, jr as SandboxFleetTraceBundle, ln as ListMessagesOptions, lr as SandboxDeleteAcknowledgement, na as WaitForRolloutOptions, ni as SandboxTraceBundle, nn as InstalledTool, oa as WriteManyOptions, or as SandboxConnection, p as BackendManager, pi as SentSessionMessage, qi as TeePublicKeyResponse, qr as SandboxRuntimeCapabilities, ra as WorkspaceOperationLookup, rn as IntelligenceReport, rr as SSHCommandDescriptor, si as SearchMatch, sn as IntelligenceReportWindow, ta as WaitForOptions, ti as SandboxTerminals, ut as ExecOptions, vt as FileSystem, wt as FileWriteResult, xi as SessionInterruptOptions, yi as SessionForkOptions, z as CreateSessionOptions, zi as TaskSessionCommitResult } from "./types-
|
|
1
|
+
import { a as TerminalStreamReconnectAuthority, c as MintScopedTokenOptions, h as TerminalReadyInfo, l as ScopedToken, r as TerminalStreamHandlers, t as TerminalStream } from "./terminal-stream-CcaBTVg3.js";
|
|
2
|
+
import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, d as InteractiveAttachOptions, f as InteractiveControlClaimAcknowledgement, h as InteractiveSessionStatus, m as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, p as InteractiveControlClaimOptions, s as InteractiveSessionControlTransport } from "./browser-interactive-control-controller-BELrFH4f.js";
|
|
3
|
+
import { $ as DurablePlanDecisionResult, A as CommitTaskSessionOptions, Ai as SnapshotInfo, B as CreateTaskSessionOptions, C as BranchOptions, Ci as SessionMessage, D as CodeExecutionResult, Di as SnapshotDeleteAcknowledgement, E as CodeExecutionOptions, Fn as ProvisionEvent, G as DispatchedSession, Gi as TeeAttestationResponse, Gr as SandboxResourceUsage, Gt as GitStatus, Ht as GitCommit, In as ProvisionResult, It as ForkCounts, J as DriveTurnOptions, Jn as RestoreSnapshotOptions, Jr as SandboxRuntimeHealth, Kt as GpuLease, Lt as ForkIdempotency, Mi as SnapshotResult, Mn as PromptInputPart, Nn as PromptOptions, O as CodeLanguage, On as ProcessManager, Pi as StartupDiagnostics, Pn as PromptResult, Q as DurablePlan, Qn as RolloutOptions, Ri as TaskSessionChanges, Rt as ForkLookupOptions, Si as SessionListOptions, Sn as PreviewLinkManager, Ti as SessionResultOptions, Ui as TeeAttestationOptions, Ur as SandboxPortBinding, Vi as TaskSessionInfo, Vr as SandboxInfo, Vt as GitBranch, W as DispatchPromptOptions, Wt as GitDiff, X as DriverInfo, Xi as TurnDriveResult, Xn as Rollout, Xr as SandboxTerminalAttachOptions, Yn as ResumeOptions, Yr as SandboxStatus, Zt as GpuLeaseManager, _n as NetworkManager, aa as WriteManyFile, ai as SandboxTraceOptions, an as IntelligenceReportCompareTo, at as EgressManager, bi as SessionInfo, bn as PermissionsManager, ci as SearchOptions, cn as JsonValue, cr as SandboxCreateReceipt, ct as EventStreamOptions, d as BackendConfig, di as SendSessionMessageOptions, dt as ExecResult, er as RolloutStartResult, fi as SendSessionMessageRequest, fr as SandboxEvent, gi as SessionExecutionInfo, hi as SessionEventStreamOptions, ia as WriteFileOptions, in as IntelligenceReportBudget, ir as SSHCredentials, j as CompletedTurnResult, ji as SnapshotOptions, jr as SandboxFleetTraceBundle, ln as ListMessagesOptions, lr as SandboxDeleteAcknowledgement, na as WaitForRolloutOptions, ni as SandboxTraceBundle, nn as InstalledTool, oa as WriteManyOptions, or as SandboxConnection, p as BackendManager, pi as SentSessionMessage, qi as TeePublicKeyResponse, qr as SandboxRuntimeCapabilities, ra as WorkspaceOperationLookup, rn as IntelligenceReport, rr as SSHCommandDescriptor, si as SearchMatch, sn as IntelligenceReportWindow, ta as WaitForOptions, ti as SandboxTerminals, ut as ExecOptions, vt as FileSystem, wt as FileWriteResult, xi as SessionInterruptOptions, yi as SessionForkOptions, z as CreateSessionOptions, zi as TaskSessionCommitResult } from "./types-DlRSEEnc.js";
|
|
4
4
|
import { AgentInteractiveSessionAttach, AgentInteractiveSessionControlClaim, AgentInteractiveSessionControlClaimAcknowledgement, AgentInteractiveSessionControlClaimRequest, AgentInteractiveSessionPromptAcknowledgement, AgentInteractiveSessionPromptCommand, AgentInteractiveSessionRef, AgentInteractiveSessionStart, AgentInteractiveSessionStopAcknowledgement, AgentInteractiveSessionStopCommand, AgentInteractiveTerminalSession, AgentInteractiveTerminalSession as AgentInteractiveTerminalSession$1, AgentRunCancellationAcknowledgement, AgentRunCancellationRequest, InteractionAcknowledgement, InteractionData, InteractionRequest, InteractionResponseCommand, TerminalOutputEvent, TerminalReplayWindow, agentInteractiveSessionPromptRequestDigest } from "@tangle-network/agent-interface";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
@@ -142,13 +142,13 @@ declare const interactionResolutionAcknowledgementSchema: z.ZodObject<{
|
|
|
142
142
|
delivered: z.ZodBoolean;
|
|
143
143
|
resolvedAt: z.ZodString;
|
|
144
144
|
binding: z.ZodOptional<z.ZodObject<{
|
|
145
|
-
requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
146
145
|
runId: z.ZodString;
|
|
147
146
|
provider: z.ZodString;
|
|
148
147
|
environmentId: z.ZodString;
|
|
149
148
|
sessionId: z.ZodString;
|
|
150
149
|
executionId: z.ZodString;
|
|
151
150
|
interactionId: z.ZodString;
|
|
151
|
+
requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
152
152
|
}, z.core.$strict>>;
|
|
153
153
|
}, z.core.$strict>;
|
|
154
154
|
type InteractionResolutionAcknowledgement = z.infer<typeof interactionResolutionAcknowledgementSchema>;
|
package/dist/tangle/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TANGLE_JOBS_CONTRACT, c as ITangleJobsAbi, d as SandboxCreateResponseParamTypes, f as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as JsonResponseParamTypes, n as JOB_SANDBOX_CREATE, o as TangleSandboxClientConfig, r as JOB_SANDBOX_DELETE, s as AgentSandboxBlueprintAbi, t as TangleSandboxClient, u as SandboxCreateParamTypes } from "../index-
|
|
1
|
+
import { a as TANGLE_JOBS_CONTRACT, c as ITangleJobsAbi, d as SandboxCreateResponseParamTypes, f as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as JsonResponseParamTypes, n as JOB_SANDBOX_CREATE, o as TangleSandboxClientConfig, r as JOB_SANDBOX_DELETE, s as AgentSandboxBlueprintAbi, t as TangleSandboxClient, u as SandboxCreateParamTypes } from "../index-H0L9SOXd.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient, TangleSandboxClientConfig };
|
package/dist/tangle/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TANGLE_JOBS_CONTRACT, c as JsonResponseParamTypes, d as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as SandboxCreateParamTypes, n as JOB_SANDBOX_CREATE, o as AgentSandboxBlueprintAbi, r as JOB_SANDBOX_DELETE, s as ITangleJobsAbi, t as TangleSandboxClient, u as SandboxCreateResponseParamTypes } from "../tangle-
|
|
1
|
+
import { a as TANGLE_JOBS_CONTRACT, c as JsonResponseParamTypes, d as SandboxIdParamTypes, i as TANGLE_CHAIN_ID, l as SandboxCreateParamTypes, n as JOB_SANDBOX_CREATE, o as AgentSandboxBlueprintAbi, r as JOB_SANDBOX_DELETE, s as ITangleJobsAbi, t as TangleSandboxClient, u as SandboxCreateResponseParamTypes } from "../tangle-DXgX-BpB.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as parseErrorResponse } from "./errors-
|
|
2
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
1
|
+
import { h as parseErrorResponse } from "./errors-DrJySZQG.js";
|
|
2
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-B6ac3lK0.js";
|
|
3
3
|
//#region src/tangle/abi.ts
|
|
4
4
|
/**
|
|
5
5
|
* Tangle Contract ABI Definitions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as TerminalStreamHandlers, t as TerminalStream } from "./terminal-stream-
|
|
1
|
+
import { r as TerminalStreamHandlers, t as TerminalStream } from "./terminal-stream-CcaBTVg3.js";
|
|
2
2
|
import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
|
|
3
|
-
import { AgentExactRunControlRef, AgentProfile, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileValidationResult, HarnessType, ReasoningEffort } from "@tangle-network/agent-interface";
|
|
3
|
+
import { AgentExactRunControlRef, AgentProfile, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileValidationResult, AgentRuntimeAttachments, HarnessType, ReasoningEffort } from "@tangle-network/agent-interface";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
6
6
|
//#region ../../../packages/runtime-contracts/dist/backend-types.d.ts
|
|
@@ -2537,6 +2537,8 @@ interface PromptOptions {
|
|
|
2537
2537
|
*
|
|
2538
2538
|
* Set `backend.model` for a model override and `backend.profile` for an
|
|
2539
2539
|
* inline provider-neutral `AgentProfile`.
|
|
2540
|
+
* Same-runtime overrides retain unspecified defaults. Changing the harness,
|
|
2541
|
+
* provider, or base URL replaces the default backend configuration.
|
|
2540
2542
|
*/
|
|
2541
2543
|
backend?: Partial<BackendConfig>;
|
|
2542
2544
|
/** Timeout in milliseconds */
|
|
@@ -4600,6 +4602,8 @@ interface McpServerConfig {
|
|
|
4600
4602
|
* ```
|
|
4601
4603
|
*/
|
|
4602
4604
|
interface BackendConfig {
|
|
4605
|
+
/** Runtime MCP bindings, separate from the authored profile. Headers may use secret references. */
|
|
4606
|
+
runtimeAttachments?: AgentRuntimeAttachments;
|
|
4603
4607
|
/** Backend type identifier. Defaults to the platform's configured backend. */
|
|
4604
4608
|
type?: BackendType;
|
|
4605
4609
|
/**
|
|
@@ -6045,8 +6049,9 @@ interface FileSystem {
|
|
|
6045
6049
|
search(query: string, options?: SearchOptions): AsyncIterable<SearchMatch>;
|
|
6046
6050
|
/**
|
|
6047
6051
|
* Upload a local file to the sandbox.
|
|
6048
|
-
*
|
|
6052
|
+
* Uses checksum-verified chunked upload through gateway or direct connections.
|
|
6049
6053
|
* Creates parent directories as needed.
|
|
6054
|
+
* The upload session limit also applies to local files.
|
|
6050
6055
|
*
|
|
6051
6056
|
* @param localPath - Path to local file
|
|
6052
6057
|
* @param remotePath - Destination path in sandbox
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.1",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
98
|
"@tangle-network/agent-core": "^0.9.6",
|
|
99
|
-
"@tangle-network/agent-interface": "^2.
|
|
99
|
+
"@tangle-network/agent-interface": "^2.6.1",
|
|
100
100
|
"zod": "4.5.4"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
@@ -135,10 +135,11 @@
|
|
|
135
135
|
"vitest": "^4.1.5",
|
|
136
136
|
"ws": "^8.20.0",
|
|
137
137
|
"yjs": "13.6.30",
|
|
138
|
-
"@tangle-network/cli-agent-registry": "0.3.15",
|
|
139
138
|
"@repo/shared": "0.0.0",
|
|
140
|
-
"@tangle-network/
|
|
141
|
-
"@tangle-network/
|
|
139
|
+
"@tangle-network/cli-agent-registry": "0.4.0",
|
|
140
|
+
"@tangle-network/runtime-contracts": "0.6.6",
|
|
141
|
+
"@tangle-network/sse-core": "0.0.0",
|
|
142
|
+
"@tangle-network/agent-profile-materialize": "0.20.0"
|
|
142
143
|
},
|
|
143
144
|
"scripts": {
|
|
144
145
|
"build": "node scripts/build-dist.mjs",
|
|
File without changes
|
|
File without changes
|