@tangle-network/sandbox 1.0.235 → 1.0.237
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +5 -5
- package/dist/agent/preview.d.ts +1 -1
- package/dist/agent/preview.js +1 -1
- package/dist/{agent-run-outcome-CEf6hJYp.d.ts → agent-run-outcome-DkEeNhH6.d.ts} +2 -2
- package/dist/{api-request-DY_5Hnyl.js → api-request-Cm1H_xsv.js} +1 -1
- package/dist/{browser-interactive-control-controller-DJGhiJCm.js → browser-interactive-control-controller-CrBx8ETe.js} +1 -1
- package/dist/{browser-interactive-control-controller-CcUjQEfa.d.ts → browser-interactive-control-controller-JSGfFeNB.d.ts} +1 -1
- package/dist/{chunked-upload-BlvgxPWx.js → chunked-upload-B1kuuezC.js} +1 -1
- package/dist/{chunked-upload-file-DOeLpMO0.js → chunked-upload-file-JfRw6PRf.js} +1 -1
- package/dist/{client-DN1BxvDF.js → client-Crwo3vqo.js} +5 -5
- package/dist/{client-OYkwBKG2.d.ts → client-Cy6Zlb3W.d.ts} +5 -5
- package/dist/collaboration/index.js +1 -1
- package/dist/{collaboration-CdPAEN0W.js → collaboration-k3yUVGgP.js} +2 -2
- package/dist/core.d.ts +7 -7
- package/dist/core.js +6 -6
- package/dist/{errors-nXGKGVFe.js → errors-DQEu-Q7s.js} +20 -21
- package/dist/{file-download-BjkrYzy_.js → file-download-DXgIe-CV.js} +1 -1
- package/dist/{index-C8YpXh5N.d.ts → index-DYxmMGbU.d.ts} +12 -87
- package/dist/index.d.ts +10 -10
- package/dist/index.js +12 -12
- package/dist/intelligence/index.js +3 -3
- package/dist/interactive-control.d.ts +1 -1
- package/dist/interactive-control.js +1 -1
- package/dist/{interactive-controller-CJ7BBRpv.d.ts → interactive-controller-DaBe9oR5.d.ts} +3 -3
- package/dist/{interactive-controller-D4aEHlv_.js → interactive-controller-mqraKMkh.js} +4 -4
- package/dist/{lines-CSGBHEjR.js → lines-Bsp1TFBM.js} +1 -1
- package/dist/{lines-CCJZUrBP.d.ts → lines-DfKFyMTA.d.ts} +1 -1
- package/dist/lines.d.ts +1 -1
- package/dist/lines.js +1 -1
- package/dist/{mcp-local-X2JhwaO9.js → mcp-local-DV-BvoUI.js} +2 -2
- package/dist/{preview-zpWYtsDJ.d.ts → preview-BqicYuSJ.d.ts} +3 -3
- package/dist/{public-templates-DCFFPDEB.d.ts → public-templates-Bk843Kqc.d.ts} +2 -2
- package/dist/public-templates.d.ts +1 -1
- package/dist/public-templates.js +1 -1
- package/dist/{raw-evidence-archive-Cz4j8VMw.js → raw-evidence-archive-XEDh0VUj.js} +1 -1
- package/dist/runtime.d.ts +5 -5
- package/dist/runtime.js +5 -5
- package/dist/{sandbox-hH0ULBcR.js → sandbox-DnuEGRn4.js} +44 -90
- package/dist/{select-seat-B4Y-7vIq.js → select-seat-CntQ4bko.js} +1 -1
- package/dist/select-seat-command.d.ts +2 -2
- package/dist/select-seat-command.js +2 -2
- package/dist/session-gateway/index.js +1 -1
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-CGi0LnU1.js → tangle-DjcPKCqo.js} +3 -3
- package/dist/{terminal-stream-types-eE97lZ-5.d.ts → terminal-stream-types-DBQuAsmB.d.ts} +13 -7
- package/dist/{types-B5GAxo6l.d.ts → types-C8aazs-y.d.ts} +297 -1178
- package/package.json +6 -6
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as SandboxTaskSession, O as SandboxInstance, R as SandboxSession } from "../index-
|
|
2
|
-
import { Bt as SandboxFleetParent, Ha as CodeExecutionResult, Ua as CodeLanguage, Ur as CodeExecutionOptions, Wa as CodeResultPart, ga as BackendConfig, ia as SessionListOptions, mo as BackendType, na as SessionInfo } from "../types-
|
|
3
|
-
import { t as Sandbox } from "../client-
|
|
4
|
-
import { u as PreviewAuthorizer } from "../preview-
|
|
1
|
+
import { I as SandboxTaskSession, O as SandboxInstance, R as SandboxSession } from "../index-DYxmMGbU.js";
|
|
2
|
+
import { Bt as SandboxFleetParent, Ha as CodeExecutionResult, Ua as CodeLanguage, Ur as CodeExecutionOptions, Wa as CodeResultPart, ga as BackendConfig, ia as SessionListOptions, mo as BackendType, na as SessionInfo } from "../types-C8aazs-y.js";
|
|
3
|
+
import { t as Sandbox } from "../client-Cy6Zlb3W.js";
|
|
4
|
+
import { u as PreviewAuthorizer } from "../preview-BqicYuSJ.js";
|
|
5
5
|
import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
|
|
6
6
|
import { JSONSchema } from "zod/v4/core";
|
|
7
7
|
import { ToolSet } from "ai";
|
package/dist/agent/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-
|
|
2
|
-
import { D as assertCurrentBackendType } from "../interactive-controller-
|
|
3
|
-
import { t as SandboxInstance } from "../sandbox-
|
|
4
|
-
import {
|
|
5
|
-
import { t as Sandbox } from "../client-
|
|
1
|
+
import { a as TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-DV-BvoUI.js";
|
|
2
|
+
import { D as assertCurrentBackendType } from "../interactive-controller-mqraKMkh.js";
|
|
3
|
+
import { t as SandboxInstance } from "../sandbox-DnuEGRn4.js";
|
|
4
|
+
import { O as ValidationError, T as StateError, v as NotFoundError } from "../errors-DQEu-Q7s.js";
|
|
5
|
+
import { t as Sandbox } from "../client-Crwo3vqo.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/agent/instances.ts
|
|
8
8
|
const managers = /* @__PURE__ */ new WeakMap();
|
package/dist/agent/preview.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as publishAgentPreview, a as previewOperationTool, c as AgentPreviewOptions, d as PreviewExecutionContext, f as PublishAgentPreviewOptions, g as listAgentPreviews, h as getAgentPreview, i as PreviewTool, l as PreviewAuthorizationRequest, m as ensureAgentPreview, n as PREVIEW_MCP_ALIAS, o as previewToolsForProfile, p as assertPreviewId, r as PREVIEW_TOOLS, s as AgentPreviewError, t as servePreviewMcp, u as PreviewAuthorizer, v as removeAgentPreview, y as resolveSelfSandbox } from "../preview-
|
|
1
|
+
import { _ as publishAgentPreview, a as previewOperationTool, c as AgentPreviewOptions, d as PreviewExecutionContext, f as PublishAgentPreviewOptions, g as listAgentPreviews, h as getAgentPreview, i as PreviewTool, l as PreviewAuthorizationRequest, m as ensureAgentPreview, n as PREVIEW_MCP_ALIAS, o as previewToolsForProfile, p as assertPreviewId, r as PREVIEW_TOOLS, s as AgentPreviewError, t as servePreviewMcp, u as PreviewAuthorizer, v as removeAgentPreview, y as resolveSelfSandbox } from "../preview-BqicYuSJ.js";
|
|
2
2
|
export { AgentPreviewError, AgentPreviewOptions, PREVIEW_MCP_ALIAS, PREVIEW_TOOLS, PreviewAuthorizationRequest, PreviewAuthorizer, PreviewExecutionContext, PreviewTool, PublishAgentPreviewOptions, assertPreviewId, ensureAgentPreview, getAgentPreview, listAgentPreviews, previewOperationTool, previewToolsForProfile, publishAgentPreview, removeAgentPreview, resolveSelfSandbox, servePreviewMcp };
|
package/dist/agent/preview.js
CHANGED
|
@@ -66,7 +66,7 @@ async function servePreviewMcp(request, config) {
|
|
|
66
66
|
if (typeof config.authorize !== "function") throw new Error("Preview MCP requires a host authorization callback");
|
|
67
67
|
const tools = config.tools ?? PREVIEW_TOOLS;
|
|
68
68
|
if (!tools.length || tools.some((tool) => !PREVIEW_TOOLS.includes(tool))) throw new Error("Preview MCP requires an explicit nonempty preview-only tool grant");
|
|
69
|
-
const [{ createMcpServer }, { WebStandardStreamableHTTPServerTransport }] = await Promise.all([import("../mcp-local-
|
|
69
|
+
const [{ createMcpServer }, { WebStandardStreamableHTTPServerTransport }] = await Promise.all([import("../mcp-local-DV-BvoUI.js").then((n) => n.n), import("@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js")]);
|
|
70
70
|
const handle = await createMcpServer(config.box, {
|
|
71
71
|
name: "tangle-previews",
|
|
72
72
|
sessionId: config.sessionId,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Di as SandboxEvent, _i as DurablePlanSnapshot, ci as AgentApprovalRequirement, di as AgentToolInvocation, li as AgentQuestionRequest, ui as AgentRunStatus } from "./types-
|
|
1
|
+
import { Tt as InteractionRequest } from "./terminal-stream-types-DBQuAsmB.js";
|
|
2
|
+
import { Di as SandboxEvent, _i as DurablePlanSnapshot, ci as AgentApprovalRequirement, di as AgentToolInvocation, li as AgentQuestionRequest, ui as AgentRunStatus } from "./types-C8aazs-y.js";
|
|
3
3
|
|
|
4
4
|
//#region src/agent-run-outcome.d.ts
|
|
5
5
|
interface AgentRunOutcome {
|
|
@@ -30,7 +30,7 @@ function rewrapResponse(original, headers, body = original.body) {
|
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region src/lib/api-request.mjs
|
|
32
32
|
/** The package version tsdown.config.ts defines; unbuilt source reports 0.0.0. */
|
|
33
|
-
const SDK_VERSION = "1.0.
|
|
33
|
+
const SDK_VERSION = "1.0.237";
|
|
34
34
|
function withRequestContextHeaders(response, path, method, body = response.body) {
|
|
35
35
|
const headers = new Headers(response.headers);
|
|
36
36
|
headers.set("x-tangle-request-path", path);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as boundedIdentifierSchema, D as isBoundedEventContentJson, E as boundedStringSchema, S as boundedEventContentStringSchema, T as boundedJsonSchema, _ as CONTRACT_MAX_ARRAY_LENGTH, b as boundedEventContentJsonSchema, g as sha256DigestSchema, o as canonicalCandidateDigest, w as boundedJsonRecordSchema, x as boundedEventContentRecordSchema, y as CONTRACT_MAX_STRING_LENGTH } from "./harness-DMaNgn0S.js";
|
|
2
2
|
import { t as agentExecutionPreparationReceiptSchema } from "./agent-execution-preparation-receipt-BIFxqyr5.js";
|
|
3
3
|
import { t as awaitWithAbort } from "./abort-signal-CRxC2dlT.js";
|
|
4
|
-
import { i as fetchSandboxApi } from "./api-request-
|
|
4
|
+
import { i as fetchSandboxApi } from "./api-request-Cm1H_xsv.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.13/node_modules/@tangle-network/agent-interface/dist/native-session-event.js
|
|
7
7
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ct as AgentInteractiveSessionControlClaim, i as TerminalStreamHandlers, lt as AgentInteractiveSessionControlClaimAcknowledgement, mt as AgentInteractiveSessionStatus, pt as AgentInteractiveSessionRef, st as AgentInteractiveSessionAttach, ut as AgentInteractiveSessionControlClaimRequest } from "./terminal-stream-types-DBQuAsmB.js";
|
|
2
2
|
|
|
3
3
|
//#region src/interactive-types.d.ts
|
|
4
4
|
/** Cancellation for an interactive SDK request. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as SandboxError, n as isTransientWrite, r as parseErrorResponse } from "./errors-DQEu-Q7s.js";
|
|
2
2
|
import { c as retryBudget, i as awaitResend, n as SANDBOX_API_RETRY_SCOPE, r as abortableSleep } from "./retry-policy-oW3_ljoc.js";
|
|
3
3
|
import { i as FILE_UPLOAD_SESSION_MAX_BYTES, n as isFileTooLargeErrorBody, r as isPayloadTooLargeErrorBody } from "./file-transfer-DOSTbUSR.js";
|
|
4
4
|
//#region src/lib/sdk-retry.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as FILE_UPLOAD_SESSION_MAX_BYTES } from "./file-transfer-DOSTbUSR.js";
|
|
2
|
-
import { a as planCompression, i as partCount, n as commitSession, o as putPart, r as initUploadSession, t as abortSession } from "./chunked-upload-
|
|
2
|
+
import { a as planCompression, i as partCount, n as commitSession, o as putPart, r as initUploadSession, t as abortSession } from "./chunked-upload-B1kuuezC.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { open } from "node:fs/promises";
|
|
5
5
|
//#region src/lib/chunked-upload-file.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { D as assertCurrentBackendType, E as applyRequestedModel, M as withProfileHarness, N as withoutCreateOnlyModelFields, T as isBrowserRuntime, V as backendTypeSchema, k as normalizeRuntimeBackendConfig, o as requestInteractiveSessionToken, x as encodePromptForWire } from "./interactive-controller-
|
|
1
|
+
import { D as assertCurrentBackendType, E as applyRequestedModel, M as withProfileHarness, N as withoutCreateOnlyModelFields, T as isBrowserRuntime, V as backendTypeSchema, k as normalizeRuntimeBackendConfig, o as requestInteractiveSessionToken, x as encodePromptForWire } from "./interactive-controller-mqraKMkh.js";
|
|
2
2
|
import { r as agentProfileSchema } from "./profile-schema-C1KpT-wS.js";
|
|
3
|
-
import { $ as isRateLimitCreateError, B as normalizeConnection, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, F as normalizeSandboxCreateReceipt, G as CAPACITY_ETA_WAIT_MAX_MS, H as normalizeProxySecretReceipt, I as normalizeStartupDiagnostics, J as createRetryDelayMs, K as DEPLOY_WINDOW_RETRY_MS, O as isRetryableProfileFileMaterializeFailure, P as normalizeCaptureProof, Q as isDeployWindowCreateError, R as dateOf, T as splitInlineProfileFileMounts, U as normalizeSandboxShape, V as normalizeEgressPolicyFields, W as CAPACITY_ETA_MARGIN_MS, X as generateIdempotencyKey, Y as extendableDeadline, Z as isCapacityShortageCreateError, d as sandboxLedgerUsd, et as isRetryableCreateError, n as createSandboxInstanceFromResponse, o as exportTraceBundle, q as awaitCreateResend, z as parseLifecycleTimes } from "./sandbox-
|
|
4
|
-
import { C as
|
|
3
|
+
import { $ as isRateLimitCreateError, B as normalizeConnection, D as validateDeferredProfileFileMounts, E as splitInlineProfileSkills, F as normalizeSandboxCreateReceipt, G as CAPACITY_ETA_WAIT_MAX_MS, H as normalizeProxySecretReceipt, I as normalizeStartupDiagnostics, J as createRetryDelayMs, K as DEPLOY_WINDOW_RETRY_MS, O as isRetryableProfileFileMaterializeFailure, P as normalizeCaptureProof, Q as isDeployWindowCreateError, R as dateOf, T as splitInlineProfileFileMounts, U as normalizeSandboxShape, V as normalizeEgressPolicyFields, W as CAPACITY_ETA_MARGIN_MS, X as generateIdempotencyKey, Y as extendableDeadline, Z as isCapacityShortageCreateError, d as sandboxLedgerUsd, et as isRetryableCreateError, n as createSandboxInstanceFromResponse, o as exportTraceBundle, q as awaitCreateResend, z as parseLifecycleTimes } from "./sandbox-DnuEGRn4.js";
|
|
4
|
+
import { C as SandboxError, D as TimeoutError, O as ValidationError, _ as NetworkError, a as readResponseJson, c as AuthError, i as parseResponseError, r as parseErrorResponse, v as NotFoundError, w as ServerError, y as PartialFailureError } from "./errors-DQEu-Q7s.js";
|
|
5
5
|
import { n as combineAbortSignals } from "./abort-signal-CRxC2dlT.js";
|
|
6
6
|
import { r as abortableSleep, t as RETRY_POLICY } from "./retry-policy-oW3_ljoc.js";
|
|
7
|
-
import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-
|
|
7
|
+
import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-Cm1H_xsv.js";
|
|
8
8
|
import { l as SANDBOX_AGENT_HOME, t as isInsideReservedDir } from "./file-transfer-DOSTbUSR.js";
|
|
9
9
|
import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-sGVP8skk.js";
|
|
10
10
|
import { t as parseSSEStream } from "./sse-parser-BCG3iL9j.js";
|
|
11
|
-
import { t as LinesClient } from "./lines-
|
|
11
|
+
import { t as LinesClient } from "./lines-Bsp1TFBM.js";
|
|
12
12
|
import { PublicTemplatesClient } from "./public-templates.js";
|
|
13
13
|
import { z } from "zod";
|
|
14
14
|
//#region ../../../packages/runtime-contracts/dist/git-policy.js
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as TraceExportResult, H as MaterializeProfileFileMountsOptions, O as SandboxInstance, U as MaterializeProfileFileMountsResult, W as ProfileFileMountBox, j as TraceExportSink } from "./index-
|
|
2
|
-
import {
|
|
3
|
-
import { $ as CreateSandboxFleetOptions, $t as SandboxFleetWorkspaceRestoreResult, A as SandboxIdentity, Bt as SandboxFleetParent, Ci as IntelligenceReportWindow, Di as SandboxEvent, Dn as SandboxResources, Ei as PromptResult, En as SandboxConfig, Et as SandboxFleetCostEstimate, Ft as SandboxFleetMachineRecord, Ga as ExecResult, Gr as ManagedProcessOptions, Gt as SandboxFleetToken, Ht as SandboxFleetPolicy, It as SandboxFleetMachineSpec, Jr as ManagedProcessRecord, Kr as ManagedProcessResumeOptions, Kt as SandboxFleetTraceBundle, Lt as SandboxFleetManifest, M as UsageInfo, Ma as GpuLeaseProviderName, Nt as SandboxFleetMachine, On as SandboxShapesInfo, Ot as SandboxFleetDispatchResponse, Pi as TurnBackendConfig, Q as AttachSandboxFleetMachineOptions, Qt as SandboxFleetWorkspaceReconcileResult, Ri as ConversationTurnOptions, St as SandboxFleetAgent, T as SshKeysManager, Ti as PromptOptions, Tn as CreateSandboxOptions, Tt as SandboxFleetArtifactSpec, Wr as ManagedProcessJobs, Wt as SandboxFleetSpend, X as FleetDriveTurnRequest, Xr as HttpClient, Xt as SandboxFleetUsage, Y as FleetDriveTurnOutcome, Yn as DownloadResult, Yr as ManagedProcessSpec, Yt as SandboxFleetTraceOptions, Z as TokenRefreshHandler, Zr as SdkTimingHook, _t as ListSandboxFleetOptions, a as DeleteMatchingSandboxesResult, an as SandboxInfo, bi as IntelligenceReportBudget, bn as TeeAttestationResponse, bt as ReconcileSandboxFleetsOptions, cn as SandboxRunGeneration, ct as FleetDispatchResultBufferOptions, dt as FleetExecDispatchResult, en as SandboxFleetWorkspaceSnapshotResult, et as CreateSandboxFleetTokenOptions, fi as CreateIntelligenceReportOptions, ft as FleetMachineId, ga as BackendConfig, gt as FleetRunOptions, ht as FleetRunEvent, i as DeleteMatchingSandboxesOptions, it as FleetAgentResult, j as SubscriptionInfo, jn as SandboxShapePreset, jt as SandboxFleetInfo, kt as SandboxFleetDriverCapability, lt as FleetDispatchStreamOptions, mt as FleetPromptDispatchResult, nt as FleetAgentId, ot as FleetDispatchCancelResult, pt as FleetPromptDispatchOptions, qn as DownloadOptions, r as DeleteMatchingSandboxesFilter, si as BatchRunOptions, st as FleetDispatchResultBuffer, tn as ListSandboxOptions, tt as CreateSandboxFleetWithCoordinatorOptions, ut as FleetExecDispatchOptions, vt as ReapExpiredSandboxFleetsOptions, w as SecretsManager, wa as SecretBindingOptions, wi as PromptInputPart, wn as CreateRequestOptions, wr as SandboxEnvironment, wt as SandboxFleetArtifact, xi as IntelligenceReportCompareTo, xt as ReconcileSandboxFleetsResult, yi as IntelligenceReport, yn as TeeAttestationReport, yr as ExecOptions, yt as ReapExpiredSandboxFleetsResult, zi as ConversationTurnResult, zt as SandboxFleetOperationsSummary } from "./types-
|
|
4
|
-
import { t as LinesClient } from "./lines-
|
|
5
|
-
import { a as PublicTemplatesClient } from "./public-templates-
|
|
1
|
+
import { A as TraceExportResult, H as MaterializeProfileFileMountsOptions, O as SandboxInstance, U as MaterializeProfileFileMountsResult, W as ProfileFileMountBox, j as TraceExportSink } from "./index-DYxmMGbU.js";
|
|
2
|
+
import { At as AgentProfileConfigValue, Dt as AgentProfile, Ht as BatchEvent, Lt as HarnessType, Mt as AgentProfileMcpServer, Nt as AgentProfileMetadata, Pt as AgentProfileSeat, R as SandboxError, X as BatchCustody, Z as BatchResult, at as AgentRuntimeAttachments, c as MintInteractiveSessionTokenOptions, it as SandboxSizePreset, jt as AgentProfileFileMount, kt as AgentProfileConfidential, nt as PublicBatchRunRequestInput, pt as AgentInteractiveSessionRef, tt as PublicBatchRunRequest, u as ScopedToken } from "./terminal-stream-types-DBQuAsmB.js";
|
|
3
|
+
import { $ as CreateSandboxFleetOptions, $t as SandboxFleetWorkspaceRestoreResult, A as SandboxIdentity, Bt as SandboxFleetParent, Ci as IntelligenceReportWindow, Di as SandboxEvent, Dn as SandboxResources, Ei as PromptResult, En as SandboxConfig, Et as SandboxFleetCostEstimate, Ft as SandboxFleetMachineRecord, Ga as ExecResult, Gr as ManagedProcessOptions, Gt as SandboxFleetToken, Ht as SandboxFleetPolicy, It as SandboxFleetMachineSpec, Jr as ManagedProcessRecord, Kr as ManagedProcessResumeOptions, Kt as SandboxFleetTraceBundle, Lt as SandboxFleetManifest, M as UsageInfo, Ma as GpuLeaseProviderName, Nt as SandboxFleetMachine, On as SandboxShapesInfo, Ot as SandboxFleetDispatchResponse, Pi as TurnBackendConfig, Q as AttachSandboxFleetMachineOptions, Qt as SandboxFleetWorkspaceReconcileResult, Ri as ConversationTurnOptions, St as SandboxFleetAgent, T as SshKeysManager, Ti as PromptOptions, Tn as CreateSandboxOptions, Tt as SandboxFleetArtifactSpec, Wr as ManagedProcessJobs, Wt as SandboxFleetSpend, X as FleetDriveTurnRequest, Xr as HttpClient, Xt as SandboxFleetUsage, Y as FleetDriveTurnOutcome, Yn as DownloadResult, Yr as ManagedProcessSpec, Yt as SandboxFleetTraceOptions, Z as TokenRefreshHandler, Zr as SdkTimingHook, _t as ListSandboxFleetOptions, a as DeleteMatchingSandboxesResult, an as SandboxInfo, bi as IntelligenceReportBudget, bn as TeeAttestationResponse, bt as ReconcileSandboxFleetsOptions, cn as SandboxRunGeneration, ct as FleetDispatchResultBufferOptions, dt as FleetExecDispatchResult, en as SandboxFleetWorkspaceSnapshotResult, et as CreateSandboxFleetTokenOptions, fi as CreateIntelligenceReportOptions, ft as FleetMachineId, ga as BackendConfig, gt as FleetRunOptions, ht as FleetRunEvent, i as DeleteMatchingSandboxesOptions, it as FleetAgentResult, j as SubscriptionInfo, jn as SandboxShapePreset, jt as SandboxFleetInfo, kt as SandboxFleetDriverCapability, lt as FleetDispatchStreamOptions, mt as FleetPromptDispatchResult, nt as FleetAgentId, ot as FleetDispatchCancelResult, pt as FleetPromptDispatchOptions, qn as DownloadOptions, r as DeleteMatchingSandboxesFilter, si as BatchRunOptions, st as FleetDispatchResultBuffer, tn as ListSandboxOptions, tt as CreateSandboxFleetWithCoordinatorOptions, ut as FleetExecDispatchOptions, vt as ReapExpiredSandboxFleetsOptions, w as SecretsManager, wa as SecretBindingOptions, wi as PromptInputPart, wn as CreateRequestOptions, wr as SandboxEnvironment, wt as SandboxFleetArtifact, xi as IntelligenceReportCompareTo, xt as ReconcileSandboxFleetsResult, yi as IntelligenceReport, yn as TeeAttestationReport, yr as ExecOptions, yt as ReapExpiredSandboxFleetsResult, zi as ConversationTurnResult, zt as SandboxFleetOperationsSummary } from "./types-C8aazs-y.js";
|
|
4
|
+
import { t as LinesClient } from "./lines-DfKFyMTA.js";
|
|
5
|
+
import { a as PublicTemplatesClient } from "./public-templates-Bk843Kqc.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
//#region src/backend-registry.d.ts
|
|
@@ -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-k3yUVGgP.js";
|
|
2
2
|
export { CollaborationClient, CollaborationFileBridge, buildCollaborationDocumentId, normalizeCollaborationPath, parseCollaborationDocumentId };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as fetchSandboxApi } from "./api-request-
|
|
1
|
+
import { D as TimeoutError, _ as NetworkError, r as parseErrorResponse } from "./errors-DQEu-Q7s.js";
|
|
2
|
+
import { i as fetchSandboxApi } from "./api-request-Cm1H_xsv.js";
|
|
3
3
|
//#region src/collaboration/client.ts
|
|
4
4
|
function normalizeBaseUrl(url) {
|
|
5
5
|
return url.replace(/\/+$/, "");
|
package/dist/core.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as WorkspaceImages, O as SandboxInstance, V as ProfileFileDeliveryReport, z as WorkspaceImagePublishRequestOptions } from "./index-
|
|
2
|
-
import {
|
|
3
|
-
import { En as SandboxConfig, Ga as ExecResult, Gr as ManagedProcessOptions, H as PreviewLinkInfo, Ia as WorkspaceImagePublishInput, In as NetworkConfig, Ja as SandboxEnvRecoveryView, Jr as ManagedProcessRecord, Kr as ManagedProcessResumeOptions, La as WorkspaceImagePublishResult, Ri as ConversationTurnOptions, Tn as CreateSandboxOptions, U as PreviewLinkManager, W as PreviewLinkWaitOptions, Wr as ManagedProcessJobs, Yr as ManagedProcessSpec, an as SandboxInfo, kn as SandboxStatus, oa as SessionMessageAdmission, qa as SandboxEnvRecovery, qr as ManagedProcessState, wi as PromptInputPart, yr as ExecOptions, zi as ConversationTurnResult } from "./types-
|
|
4
|
-
import { D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, G as LineApplicationRequest, H as LINE_APPLICATION_REPLY_MAX_CHARS, I as LineSenderVerificationStart, J as LineApplicationView, K as LineApplicationResult, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, T as LineProvider, U as LINE_APPLICATION_REQUEST_MAX_BYTES, W as LineApplication, X as parseLineApplicationResult, Y as parseLineApplicationRequest, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, l as LineApplicationAttachOptions, o as LineAgentRolePolicy, p as LineExecutionKey, q as LineApplicationState, r as lineInstanceKey, t as LinesClient, w as LineNumberInventory, y as LineMember } from "./lines-
|
|
5
|
-
import { At as sandboxFailureKind, Ct as HostedInstance, Et as InstanceRestartingError, Ot as InstancesClient, St as EnsureInstanceOptions, Tt as InstanceRecord, _t as SeatSelectionError, an as BackendRegistryInteractionKind, bt as gatewaySeatTransport, cn as backendRegistryEntrySchema, dn as isBackendRegistryInteractionKind, dt as SandboxResolvedSeat, fn as parseBackendRegistryResponse, ft as SandboxSeatCredentials, gt as SeatResolutionObservation, ht as SeatOwnerTransport, in as BackendRegistryEntry, kt as SandboxFailureKind, ln as backendRegistryInteractionKindSchema, lt as ISOLATED_CREATION_ATTESTATION_VERSION, mt as SeatOwnerReply, on as BackendRegistryResponse, pn as parseBackendRegistryResponseBody, pt as SandboxSeatSelectionInput, rn as BackendRegistryCapabilities, sn as backendRegistryCapabilitiesSchema, t as Sandbox, un as backendRegistryResponseSchema, ut as CreateSelectSeatOptions, vt as SeatSelectionRequest, wt as InstanceProfile, xt as ManagedProcessClient, yt as createSelectSeat } from "./client-
|
|
6
|
-
import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-
|
|
7
|
-
export { AuthError, BackendRegistryCapabilities, BackendRegistryEntry, BackendRegistryInteractionKind, BackendRegistryResponse, CapabilityError, ConversationTurnOptions, ConversationTurnResult, CreateSandboxOptions, CreateSelectSeatOptions, EnsureInstanceOptions, ExecOptions, ExecResult, FileWriteConflictError, HostedInstance, ISOLATED_CREATION_ATTESTATION_VERSION, InstanceProfile, InstanceRecord, InstanceRestartingError, InstancesClient, LINE_APPLICATION_REPLY_MAX_CHARS, LINE_APPLICATION_REQUEST_MAX_BYTES, Line, LineAgentRolePolicy, LineApplication, LineApplicationAttachOptions, LineApplicationRequest, LineApplicationResult, LineApplicationState, LineApplicationView, LineAttachment, LineAttachmentReauthorization, LineExecutionKey, LineImage, LineInstanceAttachOptions, LineInstanceCreate, LineMember, LineMemberInstance, LineNumberInventory, LineProvider, LineReminderPreferences, LineReplyCode, LineReplyCodeInput, LineSendInput, LineSendReceipt, LineSenderVerification, LineSenderVerificationStart, LinesClient, ManagedProcessClient, ManagedProcessJobs, ManagedProcessOptions, ManagedProcessRecord, ManagedProcessResumeOptions, ManagedProcessSpec, ManagedProcessState, NetworkConfig, NetworkError, NotFoundError, PartialFailureError, PreviewLinkInfo, PreviewLinkManager, PreviewLinkWaitOptions, ProfileFileDeliveryReport, ProfileFileMountPathError, PromptInputPart, PublicTemplatePublishArtifact, PublicTemplatePublishError, PublicTemplatePublishJob, PublicTemplatePublishRequestOptions, PublicTemplatesClient, QuotaError, Sandbox, SandboxConfig, SandboxEnvRecovery, SandboxEnvRecoveryView, SandboxError, SandboxErrorJson, SandboxFailureDetail, SandboxFailureKind, SandboxInfo, SandboxInstance, SandboxResolvedSeat, SandboxSeatCredentials, SandboxSeatSelectionInput, SandboxStatus, SeatOwnerReply, SeatOwnerTransport, SeatResolutionObservation, SeatSelectionError, SeatSelectionRequest, ServerError, SessionMessageAdmission, StateError, TimeoutError, ValidationError, WorkspaceImagePublishInput, WorkspaceImagePublishRequestOptions, WorkspaceImagePublishResult, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, createSelectSeat, gatewaySeatTransport, isBackendRegistryInteractionKind, lineInstanceKey, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseErrorResponse, parseLineApplicationRequest, parseLineApplicationResult, profileChannelReference, sandboxFailureKind };
|
|
1
|
+
import { B as WorkspaceImages, O as SandboxInstance, V as ProfileFileDeliveryReport, z as WorkspaceImagePublishRequestOptions } from "./index-DYxmMGbU.js";
|
|
2
|
+
import { F as ProfileFileMountPathError, H as ServerError, I as QuotaError, K as TimeoutError, M as NetworkError, N as NotFoundError, O as FileWriteConflictError, P as PartialFailureError, R as SandboxError, S as AuthError, U as StateError, V as SandboxFailureDetail, b as parseErrorResponse, q as ValidationError, w as CapabilityError, x as responseMetadata, z as SandboxErrorJson } from "./terminal-stream-types-DBQuAsmB.js";
|
|
3
|
+
import { En as SandboxConfig, Ga as ExecResult, Gr as ManagedProcessOptions, H as PreviewLinkInfo, Ia as WorkspaceImagePublishInput, In as NetworkConfig, Ja as SandboxEnvRecoveryView, Jr as ManagedProcessRecord, Kr as ManagedProcessResumeOptions, La as WorkspaceImagePublishResult, Ri as ConversationTurnOptions, Tn as CreateSandboxOptions, U as PreviewLinkManager, W as PreviewLinkWaitOptions, Wr as ManagedProcessJobs, Yr as ManagedProcessSpec, an as SandboxInfo, kn as SandboxStatus, oa as SessionMessageAdmission, qa as SandboxEnvRecovery, qr as ManagedProcessState, wi as PromptInputPart, yr as ExecOptions, zi as ConversationTurnResult } from "./types-C8aazs-y.js";
|
|
4
|
+
import { D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, G as LineApplicationRequest, H as LINE_APPLICATION_REPLY_MAX_CHARS, I as LineSenderVerificationStart, J as LineApplicationView, K as LineApplicationResult, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, T as LineProvider, U as LINE_APPLICATION_REQUEST_MAX_BYTES, W as LineApplication, X as parseLineApplicationResult, Y as parseLineApplicationRequest, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, l as LineApplicationAttachOptions, o as LineAgentRolePolicy, p as LineExecutionKey, q as LineApplicationState, r as lineInstanceKey, t as LinesClient, w as LineNumberInventory, y as LineMember } from "./lines-DfKFyMTA.js";
|
|
5
|
+
import { At as sandboxFailureKind, Ct as HostedInstance, Et as InstanceRestartingError, Ot as InstancesClient, St as EnsureInstanceOptions, Tt as InstanceRecord, _t as SeatSelectionError, an as BackendRegistryInteractionKind, bt as gatewaySeatTransport, cn as backendRegistryEntrySchema, dn as isBackendRegistryInteractionKind, dt as SandboxResolvedSeat, fn as parseBackendRegistryResponse, ft as SandboxSeatCredentials, gt as SeatResolutionObservation, ht as SeatOwnerTransport, in as BackendRegistryEntry, kt as SandboxFailureKind, ln as backendRegistryInteractionKindSchema, lt as ISOLATED_CREATION_ATTESTATION_VERSION, mt as SeatOwnerReply, on as BackendRegistryResponse, pn as parseBackendRegistryResponseBody, pt as SandboxSeatSelectionInput, rn as BackendRegistryCapabilities, sn as backendRegistryCapabilitiesSchema, t as Sandbox, un as backendRegistryResponseSchema, ut as CreateSelectSeatOptions, vt as SeatSelectionRequest, wt as InstanceProfile, xt as ManagedProcessClient, yt as createSelectSeat } from "./client-Cy6Zlb3W.js";
|
|
6
|
+
import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-Bk843Kqc.js";
|
|
7
|
+
export { AuthError, BackendRegistryCapabilities, BackendRegistryEntry, BackendRegistryInteractionKind, BackendRegistryResponse, CapabilityError, ConversationTurnOptions, ConversationTurnResult, CreateSandboxOptions, CreateSelectSeatOptions, EnsureInstanceOptions, ExecOptions, ExecResult, FileWriteConflictError, HostedInstance, ISOLATED_CREATION_ATTESTATION_VERSION, InstanceProfile, InstanceRecord, InstanceRestartingError, InstancesClient, LINE_APPLICATION_REPLY_MAX_CHARS, LINE_APPLICATION_REQUEST_MAX_BYTES, Line, LineAgentRolePolicy, LineApplication, LineApplicationAttachOptions, LineApplicationRequest, LineApplicationResult, LineApplicationState, LineApplicationView, LineAttachment, LineAttachmentReauthorization, LineExecutionKey, LineImage, LineInstanceAttachOptions, LineInstanceCreate, LineMember, LineMemberInstance, LineNumberInventory, LineProvider, LineReminderPreferences, LineReplyCode, LineReplyCodeInput, LineSendInput, LineSendReceipt, LineSenderVerification, LineSenderVerificationStart, LinesClient, ManagedProcessClient, ManagedProcessJobs, ManagedProcessOptions, ManagedProcessRecord, ManagedProcessResumeOptions, ManagedProcessSpec, ManagedProcessState, NetworkConfig, NetworkError, NotFoundError, PartialFailureError, PreviewLinkInfo, PreviewLinkManager, PreviewLinkWaitOptions, ProfileFileDeliveryReport, ProfileFileMountPathError, PromptInputPart, PublicTemplatePublishArtifact, PublicTemplatePublishError, PublicTemplatePublishJob, PublicTemplatePublishRequestOptions, PublicTemplatesClient, QuotaError, Sandbox, SandboxConfig, SandboxEnvRecovery, SandboxEnvRecoveryView, SandboxError, SandboxErrorJson, SandboxFailureDetail, SandboxFailureKind, SandboxInfo, SandboxInstance, SandboxResolvedSeat, SandboxSeatCredentials, SandboxSeatSelectionInput, SandboxStatus, SeatOwnerReply, SeatOwnerTransport, SeatResolutionObservation, SeatSelectionError, SeatSelectionRequest, ServerError, SessionMessageAdmission, StateError, TimeoutError, ValidationError, WorkspaceImagePublishInput, WorkspaceImagePublishRequestOptions, WorkspaceImagePublishResult, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, createSelectSeat, gatewaySeatTransport, isBackendRegistryInteractionKind, lineInstanceKey, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseErrorResponse, parseLineApplicationRequest, parseLineApplicationResult, profileChannelReference, responseMetadata, sandboxFailureKind };
|
package/dist/core.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-
|
|
2
|
-
import { C as
|
|
3
|
-
import { a as InstancesClient, d as backendRegistryInteractionKindSchema, f as backendRegistryResponseSchema, h as parseBackendRegistryResponseBody, i as InstanceRestartingError, l as backendRegistryCapabilitiesSchema, m as parseBackendRegistryResponse, p as isBackendRegistryInteractionKind, r as HostedInstance, t as Sandbox, u as backendRegistryEntrySchema } from "./client-
|
|
4
|
-
import { i as profileChannelReference, r as lineInstanceKey, t as LinesClient } from "./lines-
|
|
1
|
+
import { r as WorkspaceImages, t as SandboxInstance, x as ManagedProcessClient } from "./sandbox-DnuEGRn4.js";
|
|
2
|
+
import { C as SandboxError, D as TimeoutError, O as ValidationError, T as StateError, _ as NetworkError, b as ProfileFileMountPathError, c as AuthError, m as FileWriteConflictError, o as responseMetadata, r as parseErrorResponse, u as CapabilityError, v as NotFoundError, w as ServerError, x as QuotaError, y as PartialFailureError } from "./errors-DQEu-Q7s.js";
|
|
3
|
+
import { a as InstancesClient, d as backendRegistryInteractionKindSchema, f as backendRegistryResponseSchema, h as parseBackendRegistryResponseBody, i as InstanceRestartingError, l as backendRegistryCapabilitiesSchema, m as parseBackendRegistryResponse, p as isBackendRegistryInteractionKind, r as HostedInstance, t as Sandbox, u as backendRegistryEntrySchema } from "./client-Crwo3vqo.js";
|
|
4
|
+
import { i as profileChannelReference, r as lineInstanceKey, t as LinesClient } from "./lines-Bsp1TFBM.js";
|
|
5
5
|
import { PublicTemplatePublishError, PublicTemplatesClient } from "./public-templates.js";
|
|
6
6
|
import { a as parseLineApplicationResult, i as parseLineApplicationRequest, n as LINE_APPLICATION_REPLY_MAX_CHARS, o as sandboxFailureKind, r as LINE_APPLICATION_REQUEST_MAX_BYTES, t as ISOLATED_CREATION_ATTESTATION_VERSION } from "./core-CUZyz-U8.js";
|
|
7
|
-
import { a as gatewaySeatTransport, i as createSelectSeat, r as SeatSelectionError } from "./select-seat-
|
|
8
|
-
export { AuthError, CapabilityError, FileWriteConflictError, HostedInstance, ISOLATED_CREATION_ATTESTATION_VERSION, InstanceRestartingError, InstancesClient, LINE_APPLICATION_REPLY_MAX_CHARS, LINE_APPLICATION_REQUEST_MAX_BYTES, LinesClient, ManagedProcessClient, NetworkError, NotFoundError, PartialFailureError, ProfileFileMountPathError, PublicTemplatePublishError, PublicTemplatesClient, QuotaError, Sandbox, SandboxError, SandboxInstance, SeatSelectionError, ServerError, StateError, TimeoutError, ValidationError, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, createSelectSeat, gatewaySeatTransport, isBackendRegistryInteractionKind, lineInstanceKey, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseErrorResponse, parseLineApplicationRequest, parseLineApplicationResult, profileChannelReference, sandboxFailureKind };
|
|
7
|
+
import { a as gatewaySeatTransport, i as createSelectSeat, r as SeatSelectionError } from "./select-seat-CntQ4bko.js";
|
|
8
|
+
export { AuthError, CapabilityError, FileWriteConflictError, HostedInstance, ISOLATED_CREATION_ATTESTATION_VERSION, InstanceRestartingError, InstancesClient, LINE_APPLICATION_REPLY_MAX_CHARS, LINE_APPLICATION_REQUEST_MAX_BYTES, LinesClient, ManagedProcessClient, NetworkError, NotFoundError, PartialFailureError, ProfileFileMountPathError, PublicTemplatePublishError, PublicTemplatesClient, QuotaError, Sandbox, SandboxError, SandboxInstance, SeatSelectionError, ServerError, StateError, TimeoutError, ValidationError, WorkspaceImages, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, createSelectSeat, gatewaySeatTransport, isBackendRegistryInteractionKind, lineInstanceKey, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseErrorResponse, parseLineApplicationRequest, parseLineApplicationResult, profileChannelReference, responseMetadata, sandboxFailureKind };
|
|
@@ -198,10 +198,7 @@ const ALIAS_CODE = new Map(ALIASES.map(([alias, code]) => [alias, code]));
|
|
|
198
198
|
*
|
|
199
199
|
* The one parse point from an error response to a `SandboxError`.
|
|
200
200
|
*/
|
|
201
|
-
/**
|
|
202
|
-
* The one retry rule: retry a failure when the catalog marks its code
|
|
203
|
-
* retryable. A loop adds only its own deliberate exception.
|
|
204
|
-
*/
|
|
201
|
+
/** Catalog retryability owns retry decisions; loops state their deliberate exceptions. */
|
|
205
202
|
function retryWhen(error) {
|
|
206
203
|
return error instanceof SandboxError && error.retryable;
|
|
207
204
|
}
|
|
@@ -257,21 +254,13 @@ function parseRetryAfterMs(rawValue, data) {
|
|
|
257
254
|
if (typeof data.retryAfterMs === "number" && Number.isFinite(data.retryAfterMs)) return Math.max(0, data.retryAfterMs);
|
|
258
255
|
return parseSandboxRetryAfterHeader(rawValue);
|
|
259
256
|
}
|
|
260
|
-
/**
|
|
261
|
-
* The server's published wait, in seconds. Only a positive finite number is
|
|
262
|
-
* a wait; anything else is absent. Never derived from `Retry-After` — that
|
|
263
|
-
* header is a pacing hint every refusal carries, while `etaSeconds` is a
|
|
264
|
-
* measurement the cell only publishes when it has one.
|
|
265
|
-
*/
|
|
257
|
+
/** Positive cell-measured ETA; independent of Retry-After pacing. */
|
|
266
258
|
function parseEtaSeconds(data) {
|
|
267
259
|
const raw = data.etaSeconds;
|
|
268
260
|
if (typeof raw !== "number" || !Number.isFinite(raw) || raw <= 0) return;
|
|
269
261
|
return raw;
|
|
270
262
|
}
|
|
271
|
-
/**
|
|
272
|
-
* What a capacity refusal publishes: the cell's measured wait, and whether its
|
|
273
|
-
* customer floor refused an internal create (SandboxError.capacityHold).
|
|
274
|
-
*/
|
|
263
|
+
/** Capacity refusal ETA and explicit internal-create customer-floor hold. */
|
|
275
264
|
function capacityRefusalMetadata(data) {
|
|
276
265
|
return {
|
|
277
266
|
etaSeconds: parseEtaSeconds(data),
|
|
@@ -305,12 +294,7 @@ function readFailures(data, errorObj) {
|
|
|
305
294
|
}
|
|
306
295
|
if (typeof errorObj === "object" && errorObj !== null && Array.isArray(errorObj.failures)) return errorObj.failures.filter(isFailureDetail);
|
|
307
296
|
}
|
|
308
|
-
/**
|
|
309
|
-
* Parse an error response from the API.
|
|
310
|
-
* @param status - HTTP status code
|
|
311
|
-
* @param body - Response body text
|
|
312
|
-
* @param context - Optional request context for better error messages
|
|
313
|
-
*/
|
|
297
|
+
/** Parse HTTP refusals into catalog-owned errors with response context. */
|
|
314
298
|
function parseErrorResponse(status, body, context, headers) {
|
|
315
299
|
let data;
|
|
316
300
|
try {
|
|
@@ -339,6 +323,7 @@ function parseErrorResponse(status, body, context, headers) {
|
|
|
339
323
|
const messageWithReason = `${prefix}${reason && !composedMessage.includes(reason) ? `${composedMessage}: ${reason}` : composedMessage}`;
|
|
340
324
|
const message = logTail && !messageWithReason.includes(logTail) ? `${messageWithReason}\n${logTail}` : messageWithReason;
|
|
341
325
|
const metadata = {
|
|
326
|
+
...responseMetadata(status, headers),
|
|
342
327
|
origin: inferOrigin(headers, context),
|
|
343
328
|
endpoint: context?.path ?? headers?.get("x-tangle-request-path") ?? void 0,
|
|
344
329
|
retryAfterMs: parseRetryAfterMs(headers?.get("retry-after") ?? void 0, data),
|
|
@@ -359,6 +344,20 @@ function parseErrorResponse(status, body, context, headers) {
|
|
|
359
344
|
currentState: source.currentState ?? (Alias === StateError ? "unknown" : void 0)
|
|
360
345
|
});
|
|
361
346
|
}
|
|
347
|
+
/** Allowlisted response identity; absent headers never acquire synthetic ids. */
|
|
348
|
+
function responseMetadata(status, headers) {
|
|
349
|
+
const id = (name) => {
|
|
350
|
+
const value = headers?.get(name);
|
|
351
|
+
return value && /^[A-Za-z0-9_.:-]{1,200}$/.test(value) ? value : void 0;
|
|
352
|
+
};
|
|
353
|
+
return {
|
|
354
|
+
status,
|
|
355
|
+
requestId: id("x-request-id"),
|
|
356
|
+
traceId: id("x-tangle-trace-id"),
|
|
357
|
+
method: headers?.get("x-tangle-request-method") ?? void 0,
|
|
358
|
+
endpoint: headers?.get("x-tangle-request-path") ?? void 0
|
|
359
|
+
};
|
|
360
|
+
}
|
|
362
361
|
/** Read a failed HTTP response without changing its typed error or retry metadata. */
|
|
363
362
|
async function parseResponseError(response) {
|
|
364
363
|
const body = await response.text();
|
|
@@ -379,4 +378,4 @@ function readResponseJson(response) {
|
|
|
379
378
|
*/
|
|
380
379
|
var TerminalStreamError = class extends SandboxError {};
|
|
381
380
|
//#endregion
|
|
382
|
-
export {
|
|
381
|
+
export { SandboxError as C, TimeoutError as D, StreamInterruptedError as E, ValidationError as O, ResumeEnvRequiredError as S, StateError as T, NetworkError as _, readResponseJson as a, ProfileFileMountPathError as b, AuthError as c, CompliancePlacementError as d, EdgeNotReadyError as f, KeyBudgetExhaustedError as g, GpuProviderNotConfiguredError as h, parseResponseError as i, BranchFanoutExceedsHostError as l, FileWriteConflictError as m, isTransientWrite as n, responseMetadata as o, EgressProxyRecoveryError as p, parseErrorResponse as r, retryWhen as s, TerminalStreamError as t, CapabilityError as u, NotFoundError as v, ServerError as w, QuotaError as x, PartialFailureError as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as bytesToHex, t as sha256 } from "./sha2-vu4U-x2L.js";
|
|
2
|
-
import {
|
|
2
|
+
import { O as ValidationError } from "./errors-DQEu-Q7s.js";
|
|
3
3
|
//#region src/lib/file-download.ts
|
|
4
4
|
function downloadBounds(options) {
|
|
5
5
|
for (const [name, value] of Object.entries({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Ct as
|
|
2
|
-
import { $a as RawEvidenceBoxDirectoryExport, $r as ForkCounts, An as SandboxShape, Ar as DriverInfo, Bi as CreateSessionOptions, C as WorkspaceOperationLookup, Ci as IntelligenceReportWindow, Cn as TerminalStream, D as ProvisionResult, Di as SandboxEvent, E as ProvisionEvent, Ei as PromptResult, Fi as CommitTaskSessionOptions, Fn as EgressManager, G as GitBranch, Ga as ExecResult, Gi as ListMessagesOptions, Ha as CodeExecutionResult, Hi as DispatchPromptOptions, Ia as WorkspaceImagePublishInput, J as GitStatus, Ja as SandboxEnvRecoveryView, Ji as SendSessionMessageRequest, K as GitCommit, Ka as WriteFileRequest, Ki as PublicProfileConflict, Kt as SandboxFleetTraceBundle, La as WorkspaceImagePublishResult, Li as CompletedTurnResult, Ln as NetworkManager, Lr as GpuLeaseManager, Mi as SandboxTraceOptions, Mn as SandboxResourceUsage, Mr as GpuLease, N as WaitForOptions, Nn as SandboxRuntimeCapabilities, Pi as TurnBackendConfig, Qi as SessionExecutionInfo, Qr as BranchOptions, Ri as ConversationTurnOptions, S as StopOptions, Sn as TeePublicKeyResponse, Ti as PromptOptions, Tn as CreateSandboxOptions, U as PreviewLinkManager, Ua as CodeLanguage, Ui as DispatchedSession, Ur as CodeExecutionOptions, Vi as CreateTaskSessionOptions, Wi as DriveTurnOptions, Xa as RawEvidenceArchiveManifest, Xr as HttpClient, Yi as SentSessionMessage, Zi as SessionEventStreamOptions, _ as SnapshotInfo, _r as SearchMatch, aa as SessionMessage, ai as WaitForRolloutOptions, an as SandboxInfo, bi as IntelligenceReportBudget, bn as TeeAttestationResponse, c as SandboxDeleteOptions, ca as SessionResultOptions, co as InteractionResolutionAcknowledgement, cr as FileWriteResult, d as SandboxOperationKind, ei as ForkIdempotency, eo as RawEvidenceBoxExportOptions, f as SandboxOperationState, fa as TaskSessionInfo, ga as BackendConfig, gn as StartupDiagnostics, gr as WriteManyOptions, hi as DurablePlanDecisionResult, hn as SandboxTerminals, hr as WriteManyFile, ia as SessionListOptions, ii as RolloutStartResult, in as SandboxConnection, k as ResumeOptions, ki as SandboxTraceBundle, kn as SandboxStatus, la as TaskSessionChanges, ln as SandboxRuntimeHealth, m as SnapshotDeleteAcknowledgement, ma as TurnDriveResult, mi as DurablePlanDecisionOptions, mr as WriteFileOptions, na as SessionInfo, ni as Rollout, nn as SSHCommandDescriptor, no as RawEvidenceExportOptions, nr as FileSystem, o as RestoreSnapshotOptions, oa as SessionMessageAdmission, on as SandboxPortBinding, oo as RawEvidenceUnavailable, pi as DurablePlan, q as GitDiff, qa as SandboxEnvRecovery, qi as SendSessionMessageOptions, ra as SessionInterruptOptions, ri as RolloutOptions, rn as SSHCredentials, s as SandboxDeleteAcknowledgement, ta as SessionForkOptions, ti as ForkLookupOptions, to as RawEvidenceDirectoryExport, u as SandboxOperationInfo, ua as TaskSessionCommitResult, un as SandboxTerminalAttachOptions, v as SnapshotOptions, va as BackendManager, vi as EventStreamOptions, vn as TeeAttestationOptions, vr as SearchOptions, wi as PromptInputPart, x as SnapshotResult, xi as IntelligenceReportCompareTo, y as SnapshotProvenance, yi as IntelligenceReport, yr as ExecOptions, z as ProcessManager, zi as ConversationTurnResult } from "./types-
|
|
1
|
+
import { Ct as AgentRunCancellationRequest, Dt as AgentProfile, Et as InteractionResponseCommand, R as SandboxError, Rt as ProxySecretReceipt, St as AgentRunCancellationAcknowledgement, Tt as InteractionRequest, Y as SandboxCreateReceipt, _t as AgentInteractiveTerminalSession, bt as TerminalReplayWindow, ct as AgentInteractiveSessionControlClaim, dt as AgentInteractiveSessionPromptAcknowledgement, ft as AgentInteractiveSessionPromptCommand, g as TerminalReadyInfo, gt as AgentInteractiveSessionStopCommand, ht as AgentInteractiveSessionStopAcknowledgement, i as TerminalStreamHandlers, jt as AgentProfileFileMount, l as MintScopedTokenOptions, lt as AgentInteractiveSessionControlClaimAcknowledgement, o as TerminalStreamReconnectAuthority, ot as AgentInteractiveSessionStart, pt as AgentInteractiveSessionRef, st as AgentInteractiveSessionAttach, u as ScopedToken, ut as AgentInteractiveSessionControlClaimRequest, wt as InteractionAcknowledgement, yt as TerminalOutputEvent, zt as InteractionData } from "./terminal-stream-types-DBQuAsmB.js";
|
|
2
|
+
import { $a as RawEvidenceBoxDirectoryExport, $r as ForkCounts, An as SandboxShape, Ar as DriverInfo, Bi as CreateSessionOptions, C as WorkspaceOperationLookup, Ci as IntelligenceReportWindow, Cn as TerminalStream, D as ProvisionResult, Di as SandboxEvent, E as ProvisionEvent, Ei as PromptResult, Fi as CommitTaskSessionOptions, Fn as EgressManager, G as GitBranch, Ga as ExecResult, Gi as ListMessagesOptions, Ha as CodeExecutionResult, Hi as DispatchPromptOptions, Ia as WorkspaceImagePublishInput, J as GitStatus, Ja as SandboxEnvRecoveryView, Ji as SendSessionMessageRequest, K as GitCommit, Ka as WriteFileRequest, Ki as PublicProfileConflict, Kt as SandboxFleetTraceBundle, La as WorkspaceImagePublishResult, Li as CompletedTurnResult, Ln as NetworkManager, Lr as GpuLeaseManager, Mi as SandboxTraceOptions, Mn as SandboxResourceUsage, Mr as GpuLease, N as WaitForOptions, Nn as SandboxRuntimeCapabilities, Pi as TurnBackendConfig, Qi as SessionExecutionInfo, Qr as BranchOptions, Ri as ConversationTurnOptions, S as StopOptions, Sn as TeePublicKeyResponse, Ti as PromptOptions, Tn as CreateSandboxOptions, U as PreviewLinkManager, Ua as CodeLanguage, Ui as DispatchedSession, Ur as CodeExecutionOptions, Vi as CreateTaskSessionOptions, Wi as DriveTurnOptions, Xa as RawEvidenceArchiveManifest, Xr as HttpClient, Yi as SentSessionMessage, Zi as SessionEventStreamOptions, _ as SnapshotInfo, _r as SearchMatch, aa as SessionMessage, ai as WaitForRolloutOptions, an as SandboxInfo, bi as IntelligenceReportBudget, bn as TeeAttestationResponse, c as SandboxDeleteOptions, ca as SessionResultOptions, co as InteractionResolutionAcknowledgement, cr as FileWriteResult, d as SandboxOperationKind, ei as ForkIdempotency, eo as RawEvidenceBoxExportOptions, f as SandboxOperationState, fa as TaskSessionInfo, ga as BackendConfig, gn as StartupDiagnostics, gr as WriteManyOptions, hi as DurablePlanDecisionResult, hn as SandboxTerminals, hr as WriteManyFile, ia as SessionListOptions, ii as RolloutStartResult, in as SandboxConnection, k as ResumeOptions, ki as SandboxTraceBundle, kn as SandboxStatus, la as TaskSessionChanges, ln as SandboxRuntimeHealth, m as SnapshotDeleteAcknowledgement, ma as TurnDriveResult, mi as DurablePlanDecisionOptions, mr as WriteFileOptions, na as SessionInfo, ni as Rollout, nn as SSHCommandDescriptor, no as RawEvidenceExportOptions, nr as FileSystem, o as RestoreSnapshotOptions, oa as SessionMessageAdmission, on as SandboxPortBinding, oo as RawEvidenceUnavailable, pi as DurablePlan, q as GitDiff, qa as SandboxEnvRecovery, qi as SendSessionMessageOptions, ra as SessionInterruptOptions, ri as RolloutOptions, rn as SSHCredentials, s as SandboxDeleteAcknowledgement, ta as SessionForkOptions, ti as ForkLookupOptions, to as RawEvidenceDirectoryExport, u as SandboxOperationInfo, ua as TaskSessionCommitResult, un as SandboxTerminalAttachOptions, v as SnapshotOptions, va as BackendManager, vi as EventStreamOptions, vn as TeeAttestationOptions, vr as SearchOptions, wi as PromptInputPart, x as SnapshotResult, xi as IntelligenceReportCompareTo, y as SnapshotProvenance, yi as IntelligenceReport, yr as ExecOptions, z as ProcessManager, zi as ConversationTurnResult } from "./types-C8aazs-y.js";
|
|
3
3
|
import { t as CliAuthReference } from "./cli-auth-bundle-B91fSxkR.js";
|
|
4
|
-
import { n as SandboxLines } from "./lines-
|
|
5
|
-
import { _ as InteractiveSessionStatus, f as InteractiveAttachOptions, g as InteractiveRequestOptions, h as InteractiveObserveOptions, m as InteractiveControlClaimOptions, p as InteractiveControlClaimAcknowledgement } from "./browser-interactive-control-controller-
|
|
6
|
-
import { r as InteractiveAttachRequest } from "./interactive-controller-
|
|
4
|
+
import { n as SandboxLines } from "./lines-DfKFyMTA.js";
|
|
5
|
+
import { _ as InteractiveSessionStatus, f as InteractiveAttachOptions, g as InteractiveRequestOptions, h as InteractiveObserveOptions, m as InteractiveControlClaimOptions, p as InteractiveControlClaimAcknowledgement } from "./browser-interactive-control-controller-JSGfFeNB.js";
|
|
6
|
+
import { r as InteractiveAttachRequest } from "./interactive-controller-DaBe9oR5.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { OtlpTraceExport } from "@tangle-network/agent-trace-contract/otlp";
|
|
9
9
|
|
|
@@ -1783,13 +1783,7 @@ interface SnapshotRestoreJobStatusResponse {
|
|
|
1783
1783
|
};
|
|
1784
1784
|
createdAt: string;
|
|
1785
1785
|
completedAt?: string;
|
|
1786
|
-
/**
|
|
1787
|
-
* The sandbox as `GET /v1/sandboxes/{id}` answers it, carried on the poll
|
|
1788
|
-
* that observes a successful completion. A restore suspends, swaps the
|
|
1789
|
-
* filesystem and resumes, so the box the caller holds is stale in status,
|
|
1790
|
-
* incarnation and connection until it is read again; this is that read,
|
|
1791
|
-
* answered by the same poll. Present on every successful completion.
|
|
1792
|
-
*/
|
|
1786
|
+
/** Fresh sandbox status/incarnation/connection, returned by every successful restore completion. */
|
|
1793
1787
|
sandbox?: Record<string, unknown>;
|
|
1794
1788
|
}
|
|
1795
1789
|
declare abstract class SandboxSnapshotCapabilities extends SandboxTurnCapabilities {
|
|
@@ -1798,57 +1792,13 @@ declare abstract class SandboxSnapshotCapabilities extends SandboxTurnCapabiliti
|
|
|
1798
1792
|
wait: false;
|
|
1799
1793
|
}): Promise<SandboxOperation>;
|
|
1800
1794
|
snapshot(options?: SnapshotOptions): Promise<SnapshotResult>;
|
|
1801
|
-
/**
|
|
1802
|
-
* List all snapshots for this sandbox.
|
|
1803
|
-
*
|
|
1804
|
-
* If `storage` is provided (BYOS3), lists snapshots from customer-provided
|
|
1805
|
-
* S3 storage.
|
|
1806
|
-
*
|
|
1807
|
-
* @param storage - Optional customer storage config for BYOS3
|
|
1808
|
-
* @returns Array of snapshot metadata
|
|
1809
|
-
*
|
|
1810
|
-
* @example List from our storage
|
|
1811
|
-
* ```typescript
|
|
1812
|
-
* const snapshots = await box.listSnapshots();
|
|
1813
|
-
* for (const snap of snapshots) {
|
|
1814
|
-
* console.log(`${snap.snapshotId}: ${snap.createdAt}`);
|
|
1815
|
-
* }
|
|
1816
|
-
* ```
|
|
1817
|
-
*
|
|
1818
|
-
* @example List from customer S3 (BYOS3)
|
|
1819
|
-
* ```typescript
|
|
1820
|
-
* const snapshots = await box.listSnapshots({
|
|
1821
|
-
* type: "s3",
|
|
1822
|
-
* bucket: "my-snapshots",
|
|
1823
|
-
* credentials: { accessKeyId: "...", secretAccessKey: "..." },
|
|
1824
|
-
* });
|
|
1825
|
-
* ```
|
|
1826
|
-
*/
|
|
1795
|
+
/** List snapshots; storage selects the direct customer-S3 path. */
|
|
1827
1796
|
listSnapshots(storage?: SnapshotOptions["storage"]): Promise<SnapshotInfo[]>;
|
|
1828
|
-
/**
|
|
1829
|
-
* Delete a snapshot.
|
|
1830
|
-
*
|
|
1831
|
-
* Deleting a snapshot that is already gone succeeds and reports
|
|
1832
|
-
* `already_absent`, so a retry after an uncertain failure does not raise. A
|
|
1833
|
-
* 404 means this sandbox is unknown, not that the snapshot was missing.
|
|
1834
|
-
*/
|
|
1797
|
+
/** Delete returns already_absent for a missing snapshot; 404 means the sandbox itself is unknown. */
|
|
1835
1798
|
deleteSnapshot(snapshotId: string, options?: {
|
|
1836
|
-
/**
|
|
1837
|
-
* Deadline for this one request. The client aborts the request itself at
|
|
1838
|
-
* the deadline, so a caller retrying a stalled delete does not leave the
|
|
1839
|
-
* previous attempt in flight. Omit it to use the client's own timeout;
|
|
1840
|
-
* a supplied value that no timer can hold (not a positive integer of at
|
|
1841
|
-
* most 2,147,483,647ms) throws `RangeError` rather than silently
|
|
1842
|
-
* widening to that default.
|
|
1843
|
-
*/
|
|
1844
|
-
timeoutMs?: number;
|
|
1799
|
+
/** Per-call request deadline; invalid timer bounds throw RangeError. Omitted uses the client timeout. */timeoutMs?: number;
|
|
1845
1800
|
}): Promise<SnapshotDeleteAcknowledgement>;
|
|
1846
|
-
/**
|
|
1847
|
-
* Ask whether the snapshot bound to an idempotency key is decided.
|
|
1848
|
-
*
|
|
1849
|
-
* Pass the same options the create carried for an exact-body lookup. Omit
|
|
1850
|
-
* options to read the operation bound to this owner-scoped key.
|
|
1851
|
-
*/
|
|
1801
|
+
/** Read the checkpoint operation by key; options request an exact-body lookup. */
|
|
1852
1802
|
getSnapshotOperation(idempotencyKey: string, options?: Pick<SnapshotOptions, "tags">): Promise<WorkspaceOperationLookup>;
|
|
1853
1803
|
revertToSnapshot(snapshotId: string): Promise<SnapshotResult>;
|
|
1854
1804
|
/**
|
|
@@ -1858,35 +1808,10 @@ declare abstract class SandboxSnapshotCapabilities extends SandboxTurnCapabiliti
|
|
|
1858
1808
|
restorePaths(snapshotId: string, paths: string[]): Promise<SnapshotResult>;
|
|
1859
1809
|
/** One keyed restore: a transport re-send joins its job; a 202 settles from that job. */
|
|
1860
1810
|
private restoreSnapshot;
|
|
1861
|
-
/**
|
|
1862
|
-
* Settle a restore from its job's status. The restore's own 202, held to
|
|
1863
|
-
* the job's end, is the first status read; only an unfinished one polls.
|
|
1864
|
-
*/
|
|
1811
|
+
/** Read the accepted restore job first; poll only while unfinished. */
|
|
1865
1812
|
protected waitForSnapshotRestore(snapshotId: string, accepted: SnapshotRestoreJobStatusResponse): Promise<SnapshotResult>;
|
|
1866
1813
|
protected waitForSnapshotVisible(snapshotId: string, fallback?: Partial<SnapshotResult>): Promise<SnapshotResult>;
|
|
1867
|
-
/**
|
|
1868
|
-
* Restore from the latest snapshot in customer-provided storage.
|
|
1869
|
-
* Only available when using BYOS3 (calls the runtime directly).
|
|
1870
|
-
*
|
|
1871
|
-
* @param storage - Customer storage config (required)
|
|
1872
|
-
* @param destinationPath - Optional path to restore to
|
|
1873
|
-
* @returns Snapshot info if restored, null if no snapshot found
|
|
1874
|
-
*
|
|
1875
|
-
* @example Restore from customer S3
|
|
1876
|
-
* ```typescript
|
|
1877
|
-
* const result = await box.restoreFromStorage({
|
|
1878
|
-
* type: "s3",
|
|
1879
|
-
* bucket: "my-snapshots",
|
|
1880
|
-
* credentials: { accessKeyId: "...", secretAccessKey: "..." },
|
|
1881
|
-
* });
|
|
1882
|
-
*
|
|
1883
|
-
* if (result) {
|
|
1884
|
-
* console.log(`Restored from ${result.snapshotId}`);
|
|
1885
|
-
* } else {
|
|
1886
|
-
* console.log("No snapshot found");
|
|
1887
|
-
* }
|
|
1888
|
-
* ```
|
|
1889
|
-
*/
|
|
1814
|
+
/** Restore the latest customer-storage snapshot directly; null means none found. */
|
|
1890
1815
|
restoreFromStorage(storage: SnapshotOptions["storage"], options?: RestoreSnapshotOptions): Promise<SnapshotResult | null>;
|
|
1891
1816
|
}
|
|
1892
1817
|
//#endregion
|