@tangle-network/sandbox 1.0.264 → 1.0.266

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.
Files changed (73) hide show
  1. package/README.md +17 -7
  2. package/dist/abi-pcDt2Adp.js +136 -0
  3. package/dist/agent/index.d.ts +4 -4
  4. package/dist/agent/index.js +5 -5
  5. package/dist/agent/preview.d.ts +1 -1
  6. package/dist/agent/preview.js +2 -2
  7. package/dist/{agent-run-outcome-DLLvOkbe.d.ts → agent-run-outcome-DThM9ULE.d.ts} +2 -2
  8. package/dist/{api-request-SBaqnuZB.js → api-request-gkPDymqn.js} +2 -2
  9. package/dist/auth/index.d.ts +2 -2
  10. package/dist/auth/index.js +2 -2
  11. package/dist/{browser-interactive-control-controller-Bg7mWDLX.d.ts → browser-interactive-control-controller-ClykJB9N.d.ts} +1 -1
  12. package/dist/{browser-interactive-control-controller-PiCGGheb.js → browser-interactive-control-controller-S_Uo-Zy7.js} +1 -1
  13. package/dist/{chunked-upload-D2S7tOJO.js → chunked-upload-ChZB-dYE.js} +1 -1
  14. package/dist/{chunked-upload-file-CfuaCSja.js → chunked-upload-file-BGaOS3iK.js} +1 -1
  15. package/dist/cli-auth-bundle-DXKH215p.js +2 -0
  16. package/dist/{cli-auth-bundle-C6DtK7GX-D8681c7j.js → cli-auth-bundle-DcxhAW23-C22MMIvx.js} +36 -36
  17. package/dist/{client-CkpH8MsM.js → client-BWD7-uaL.js} +40 -57
  18. package/dist/{client-DaZwQeOS.d.ts → client-BYGLoEiU.d.ts} +153 -198
  19. package/dist/collaboration/index.d.ts +1 -1
  20. package/dist/collaboration/index.js +1 -1
  21. package/dist/{collaboration-Corlo5N0.js → collaboration-Bqk4jYQe.js} +2 -2
  22. package/dist/core.d.ts +6 -6
  23. package/dist/core.js +5 -5
  24. package/dist/{error-catalog-CWtp7Yg1.js → error-catalog-GS97N-Cm.js} +1 -1
  25. package/dist/{errors-C0S3TzhR.js → errors-D44qyFpy.js} +1 -1
  26. package/dist/{file-download-7lcgh1LR.js → file-download-BO-Hmn3x.js} +1 -1
  27. package/dist/gpu-lease/index.d.ts +192 -184
  28. package/dist/gpu-lease/index.js +390 -281
  29. package/dist/{index-dxhLhM8L.d.ts → index-DkB8WbjK.d.ts} +43 -99
  30. package/dist/index.d.ts +13 -13
  31. package/dist/index.js +178 -61
  32. package/dist/intelligence/index.d.ts +1 -1
  33. package/dist/intelligence/index.js +4 -4
  34. package/dist/interactive-control.d.ts +1 -1
  35. package/dist/interactive-control.js +1 -1
  36. package/dist/{interactive-controller-CRp4VQKD.d.ts → interactive-controller-DSYQTRwh.d.ts} +3 -3
  37. package/dist/{interactive-controller-CqJX-LcO.js → interactive-controller-llj6EdlZ.js} +4 -4
  38. package/dist/lib/prepared-evidence.js +1 -1
  39. package/dist/{lines-BTStaSM2.d.ts → lines-D7lE49lV.d.ts} +1 -1
  40. package/dist/{lines-NECw0OhS.js → lines-DwJ7AKx7.js} +1 -1
  41. package/dist/lines.d.ts +1 -1
  42. package/dist/lines.js +1 -1
  43. package/dist/{local-cli-auth-wyO74fdb.js → local-cli-auth-C2cETxK4.js} +1 -1
  44. package/dist/{mcp-local-CpQncJsf.js → mcp-local-DVzsBlqX.js} +3 -3
  45. package/dist/{preview-D6bMarHf.d.ts → preview-DsHoo8BC.d.ts} +3 -3
  46. package/dist/{public-templates-3diq9yKD.d.ts → public-templates-DRqOkshE.d.ts} +2 -2
  47. package/dist/public-templates.d.ts +1 -1
  48. package/dist/public-templates.js +1 -1
  49. package/dist/{raw-evidence-archive-B0oCpHY3.js → raw-evidence-archive-BJ1cA-sP.js} +3 -3
  50. package/dist/runtime.d.ts +5 -5
  51. package/dist/runtime.js +5 -5
  52. package/dist/{sandbox-BVN_aNT1.js → sandbox-C3PqmwfU.js} +136 -196
  53. package/dist/{secp256k1-ZiYFbGjz.js → secp256k1-DIwypP5B.js} +1 -1
  54. package/dist/{select-seat-Cu-9jRO-.js → select-seat-Dc7cQ8To.js} +3 -3
  55. package/dist/select-seat-command.d.ts +2 -2
  56. package/dist/select-seat-command.js +2 -2
  57. package/dist/session-gateway/index.js +1 -1
  58. package/dist/tangle/index.d.ts +1 -1
  59. package/dist/tangle/index.js +2 -1
  60. package/dist/{tangle-Bpv3pIjM.js → tangle-BP8F3ZN0.js} +58 -185
  61. package/dist/{terminal-stream-types-DLaXWiSA.d.ts → terminal-stream-types-Cdz3xrux.d.ts} +1 -1
  62. package/dist/{types-COnts0u7.d.ts → types-BikjtQi3.d.ts} +202 -224
  63. package/package.json +11 -11
  64. package/dist/cli-auth-bundle-D5ZBMpZ7.js +0 -2
  65. /package/dist/{cli-auth-bundle-eUl7Sa1x.d.ts → cli-auth-bundle-CQCt2mcZ.d.ts} +0 -0
  66. /package/dist/{direct-http2-zLxsvF44.js → direct-http2-CzeIT93P.js} +0 -0
  67. /package/dist/{index-ClusTWYM.d.ts → index-B6aMEMDR.d.ts} +0 -0
  68. /package/dist/{index-BTXyTVq4.d.ts → index-BsT3M4X-.d.ts} +0 -0
  69. /package/dist/{prepared-evidence-ibAysmX8.js → prepared-evidence-DIFfn4Ki.js} +0 -0
  70. /package/dist/{preview-operations-DWL78boI.js → preview-operations-BTHZR1w2.js} +0 -0
  71. /package/dist/{raw-evidence-export-C0ieFpi2.d.ts → raw-evidence-export-C-TDdAgC.d.ts} +0 -0
  72. /package/dist/{raw-evidence-export-C6Xdl3nC.js → raw-evidence-export-Dog7W5zP.js} +0 -0
  73. /package/dist/{utils-BT2q9nkO.js → utils-BvN0Mk3j.js} +0 -0
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
- import { A as requestedPublicProfileDigest, B as ALL_BACKEND_TYPES, F as createAgentRunOutcomeTracker, H as isolationPrincipalSchema, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, V as backendTypeSchema, W as parseBackendType, i as terminalUpgradeHeadersSupported, k as normalizeRuntimeBackendConfig, n as InteractiveSessionController, r as TerminalStream, t as BrowserInteractiveSessionController, z as TERMINAL_WS_ECHO_SUBPROTOCOL } from "./interactive-controller-CqJX-LcO.js";
1
+ import { A as requestedPublicProfileDigest, B as ALL_BACKEND_TYPES, F as createAgentRunOutcomeTracker, H as isolationPrincipalSchema, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, V as backendTypeSchema, W as parseBackendType, i as terminalUpgradeHeadersSupported, k as normalizeRuntimeBackendConfig, n as InteractiveSessionController, r as TerminalStream, t as BrowserInteractiveSessionController, z as TERMINAL_WS_ECHO_SUBPROTOCOL } from "./interactive-controller-llj6EdlZ.js";
2
2
  import { i as SANDBOX_SIZE_PRESET_NAMES, r as agentProfileSchema, t as agentProfileConfidentialSchema } from "./profile-schema-B11dRfGB.js";
3
- import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, k as agentInteractiveSessionPromptRequestDigest, l as createInteractiveControlHolderId, n as browserInteractiveControlHolderId, o as InteractiveSessionControlController, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController, u as interactiveSessionIdentityDigest } from "./browser-interactive-control-controller-PiCGGheb.js";
4
- import { A as HARNESS_LAUNCH_MATERIALIZE_OPTIONS, C as SandboxOperation, D as splitInlineProfileSkills, E as splitInlineProfileFileMounts, M as enforceWorkspacePlanSupport, N as isMaterializerHarness, O as validateDeferredProfileFileMounts, P as materializeProfile, S as ManagedProcessClient, T as materializeProfileFileMounts, _ as collectAgentFinalMessageText, a as buildTraceExportPayload, b as isToolBearingEvent, c as toOtelJson, f as InteractiveSessionHandle, g as applySandboxEventText, h as createInteractiveTerminalSession, i as MAX_EGRESS_DENIALS_LIMIT, j as ProfileUnsupportedError, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as exportTraceBundle, p as InteractiveTerminalFrameLog, r as WorkspaceImages, s as otelTraceIdForTangleTrace, t as SandboxInstance, u as SandboxSession, v as collectAgentResponseText, w as SandboxOperationFailedError, y as getSandboxEventText } from "./sandbox-BVN_aNT1.js";
5
- import { C as SandboxError, D as TimeoutError, E as StreamInterruptedError, O as ValidationError, S as ResumeEnvRequiredError, T as StateError, _ as NetworkError, b as ProfileFileMountPathError, c as AuthError, d as CompliancePlacementError, f as EdgeNotReadyError, g as KeyBudgetExhaustedError, h as GpuProviderNotConfiguredError, l as BranchFanoutExceedsHostError, m as FileWriteConflictError, o as responseMetadata, p as EgressProxyRecoveryError, r as parseErrorResponse, t as TerminalStreamError, u as CapabilityError, v as NotFoundError, w as ServerError, x as QuotaError, y as PartialFailureError } from "./errors-C0S3TzhR.js";
6
- import { _ as createBatchResultAccumulator, a as InstancesClient, c as runtimeWorkspaceCwdSchema, d as backendRegistryInteractionKindSchema, f as backendRegistryResponseSchema, g as IntelligenceClient, h as parseBackendRegistryResponseBody, i as InstanceRestartingError, l as backendRegistryCapabilitiesSchema, m as parseBackendRegistryResponse, n as RunsClient, o as SandboxFleetClient, p as isBackendRegistryInteractionKind, r as HostedInstance, s as SandboxFleet, t as Sandbox, u as backendRegistryEntrySchema, v as validateBatchRunRequest } from "./client-CkpH8MsM.js";
7
- import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-SBaqnuZB.js";
8
- import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-Corlo5N0.js";
3
+ import { a as INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, k as agentInteractiveSessionPromptRequestDigest, l as createInteractiveControlHolderId, n as browserInteractiveControlHolderId, o as InteractiveSessionControlController, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController, u as interactiveSessionIdentityDigest } from "./browser-interactive-control-controller-S_Uo-Zy7.js";
4
+ import { A as ProfileUnsupportedError, C as SandboxOperation, D as splitInlineProfileSkills, E as splitInlineProfileFileMounts, M as isMaterializerHarness, N as materializeProfile, O as validateDeferredProfileFileMounts, S as ManagedProcessClient, T as materializeProfileFileMounts, _ as collectAgentFinalMessageText, a as buildTraceExportPayload, b as isToolBearingEvent, c as toOtelJson, f as InteractiveSessionHandle, g as applySandboxEventText, h as createInteractiveTerminalSession, i as MAX_EGRESS_DENIALS_LIMIT, j as enforceWorkspacePlanSupport, k as HARNESS_LAUNCH_MATERIALIZE_OPTIONS, l as SandboxTaskSession, m as createInteractiveTerminalCapture, o as exportTraceBundle, p as InteractiveTerminalFrameLog, r as WorkspaceImages, s as otelTraceIdForTangleTrace, t as SandboxInstance, u as SandboxSession, v as collectAgentResponseText, w as SandboxOperationFailedError, y as getSandboxEventText } from "./sandbox-C3PqmwfU.js";
5
+ import { C as SandboxError, D as TimeoutError, E as StreamInterruptedError, O as ValidationError, S as ResumeEnvRequiredError, T as StateError, _ as NetworkError, b as ProfileFileMountPathError, c as AuthError, d as CompliancePlacementError, f as EdgeNotReadyError, g as KeyBudgetExhaustedError, h as GpuProviderNotConfiguredError, l as BranchFanoutExceedsHostError, m as FileWriteConflictError, o as responseMetadata, p as EgressProxyRecoveryError, r as parseErrorResponse, t as TerminalStreamError, u as CapabilityError, v as NotFoundError, w as ServerError, x as QuotaError, y as PartialFailureError } from "./errors-D44qyFpy.js";
6
+ import { _ as createBatchResultAccumulator, a as InstancesClient, c as runtimeWorkspaceCwdSchema, d as backendRegistryInteractionKindSchema, f as backendRegistryResponseSchema, g as IntelligenceClient, h as parseBackendRegistryResponseBody, i as InstanceRestartingError, l as backendRegistryCapabilitiesSchema, m as parseBackendRegistryResponse, n as RunsClient, o as SandboxFleetClient, p as isBackendRegistryInteractionKind, r as HostedInstance, s as SandboxFleet, t as Sandbox, u as backendRegistryEntrySchema, v as validateBatchRunRequest } from "./client-BWD7-uaL.js";
7
+ import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-gkPDymqn.js";
8
+ import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-Bqk4jYQe.js";
9
9
  import "./file-transfer-DOSTbUSR.js";
10
10
  import { t as parseSSEStream } from "./sse-parser-BCG3iL9j.js";
11
- import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-NECw0OhS.js";
12
- import { t as downloadFile } from "./file-download-7lcgh1LR.js";
11
+ import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-DwJ7AKx7.js";
12
+ import { t as downloadFile } from "./file-download-BO-Hmn3x.js";
13
13
  import { PublicTemplatePublishError, PublicTemplatesClient } from "./public-templates.js";
14
14
  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-CTkHtpap.js";
15
- import { a as createSelectSeat, i as SeatSelectionError, o as gatewaySeatTransport } from "./select-seat-Cu-9jRO-.js";
16
- import { s as BlueprintSandboxClient } from "./tangle-Bpv3pIjM.js";
15
+ import { a as createSelectSeat, i as SeatSelectionError, o as gatewaySeatTransport } from "./select-seat-Dc7cQ8To.js";
16
+ import { s as BlueprintSandboxClient } from "./tangle-BP8F3ZN0.js";
17
17
  import { z } from "zod";
18
18
  //#region ../../../packages/runtime-contracts/dist/model-key-proxy.js
19
19
  const MANAGED_MODEL_KEY_SENTINEL = "proxy-managed-per-request";
@@ -33,8 +33,9 @@ const MODEL_PROXY_TOKENS = {
33
33
  new Set(Object.values(MODEL_PROXY_TOKENS));
34
34
  //#endregion
35
35
  //#region ../../../packages/runtime-contracts/dist/declared-secrets.js
36
- /** Bound values stay at the proxy. Single-host (v1) declarations carry metadata only and are
37
- * revalidated at every rebuild; an unbound name keeps box delivery unless the store's policy binds it. */
36
+ /** Bound values stay at the proxy. Declarations carry metadata only and are
37
+ * revalidated at every rebuild; an unbound name keeps box delivery unless the store's policy binds it.
38
+ * A declaration may bind several hosts: one credential, one slot and placeholder, many vendor hosts. */
38
39
  /** Box env var holding a JSON array of {@link DeclaredSecret}. */
39
40
  const DECLARED_SECRET_HOSTS_ENV_VAR = "TANGLE_EGRESS_DECLARED_HOSTS";
40
41
  /** The header a declaration swaps in when it names none. */
@@ -115,29 +116,42 @@ function normalizeDeclaredHeader(input) {
115
116
  if (FRAMING_HEADERS.has(input.toLowerCase())) throw new DeclaredSecretError(`a secret cannot be carried in the ${input} header`);
116
117
  return input;
117
118
  }
118
- /** Validate one declaration. Throws {@link DeclaredSecretError}. */
119
+ /** Validate one declaration into its canonical multi-host form. Throws {@link DeclaredSecretError}.
120
+ * The single-host `{ host }` form is accepted ONLY because box env vars and
121
+ * stored project records written before multi-host still carry it; it is
122
+ * normalized to `hosts: [host]` here — the one place v1 exists — so every
123
+ * reader downstream sees the canonical array. Remove when no v1 writer remains. */
119
124
  function validateDeclaredSecret(input) {
120
125
  if (typeof input !== "object" || input === null || Array.isArray(input)) throw new DeclaredSecretError("a declared secret must be an object");
121
- const { name, host, header, ...extra } = input;
122
- if (Object.keys(extra).length > 0) throw new DeclaredSecretError(`a declared secret takes name, host and header only; got ${Object.keys(extra).sort().join(", ")}`);
126
+ const { name, hosts, host, header, ...extra } = input;
127
+ if (Object.keys(extra).length > 0) throw new DeclaredSecretError(`a declared secret takes name, hosts and header only; got ${Object.keys(extra).sort().join(", ")}`);
128
+ const declaredHosts = hosts !== void 0 && host === void 0 ? hosts : hosts === void 0 && host !== void 0 ? [host] : void 0;
129
+ if (!Array.isArray(declaredHosts) || declaredHosts.length === 0) throw new DeclaredSecretError("a declared secret needs the hosts its value is for, such as [\"huggingface.co\"]");
130
+ if (declaredHosts.length > 8) throw new DeclaredSecretError(`a declared secret can name at most 8 hosts`);
123
131
  if (typeof name !== "string" || name.length > SECRET_NAME_MAX_LENGTH || !SECRET_NAME_RE.test(name)) throw new DeclaredSecretError("a declared secret needs the name of a stored secret");
124
132
  if (isReservedDeclaredSecretName(name)) throw new DeclaredSecretError(`${name} is a platform credential name and cannot declare a host`);
133
+ const normalizedHosts = declaredHosts.map(normalizeDeclaredHost);
134
+ if (new Set(normalizedHosts).size !== normalizedHosts.length) throw new DeclaredSecretError(`${name} declares the same host more than once`);
125
135
  return {
126
136
  name,
127
- host: normalizeDeclaredHost(host),
137
+ hosts: normalizedHosts,
128
138
  header: normalizeDeclaredHeader(header)
129
139
  };
130
140
  }
131
- /** Validate a set of declarations: at most {@link MAX_DECLARED_SECRETS}, one per name. */
141
+ /** Validate a set of declarations: at most {@link MAX_DECLARED_SECRETS}, one
142
+ * per name, and at most {@link MAX_DECLARED_SECRET_HOSTS} host bindings in
143
+ * total across the set. */
132
144
  function validateDeclaredSecrets(inputs) {
133
- if (inputs.length > 16) throw new DeclaredSecretError(`at most 16 secrets can declare a host`);
145
+ if (inputs.length > 16) throw new DeclaredSecretError(`at most 16 secrets can declare hosts`);
134
146
  const seen = /* @__PURE__ */ new Set();
135
- return inputs.map((input) => {
136
- const declared = validateDeclaredSecret(input);
137
- if (seen.has(declared.name)) throw new DeclaredSecretError(`${declared.name} declares a host more than once`);
138
- seen.add(declared.name);
139
- return declared;
147
+ const declared = inputs.map((input) => {
148
+ const entry = validateDeclaredSecret(input);
149
+ if (seen.has(entry.name)) throw new DeclaredSecretError(`${entry.name} declares a host more than once`);
150
+ seen.add(entry.name);
151
+ return entry;
140
152
  });
153
+ if (declared.reduce((n, { hosts }) => n + hosts.length, 0) > 16) throw new DeclaredSecretError(`declarations can bind at most 16 hosts in total`);
154
+ return declared;
141
155
  }
142
156
  /** Absent/empty env means no declarations; malformed declarations throw rather than allow a real value into the box. */
143
157
  function parseDeclaredSecretsEnv(raw) {
@@ -305,17 +319,142 @@ function startTeeAttestationHeartbeat(sandbox, options = {}) {
305
319
  }
306
320
  //#endregion
307
321
  //#region ../../../packages/runtime-contracts/dist/gpu-lease.js
308
- /**
309
- * GPU lease wire vocabulary shared by the orchestrator's GPU lease service,
310
- * sandbox-api's charge recording and the sandbox SDK's customer-facing GPU
311
- * lease types.
312
- */
313
322
  const GPU_LEASE_PROVIDER_NAMES = [
314
323
  "runpod",
315
324
  "vast-ai",
316
325
  "lambda-labs",
317
326
  "modal"
318
327
  ];
328
+ const gpuLeaseProviderSchema = z.string().trim().toLowerCase().min(1).max(64).regex(/^[a-z][a-z0-9-]*$/);
329
+ const gpuAcceleratorKindSchema = z.string().trim().toLowerCase().min(1).max(128).regex(/^[a-z0-9][a-z0-9._-]*$/);
330
+ const gpuAcceleratorSchema = z.object({
331
+ kind: gpuAcceleratorKindSchema,
332
+ count: z.number().int().positive().default(1),
333
+ vramGb: z.number().positive().optional()
334
+ }).strict();
335
+ const gpuLeaseCommandSchema = z.object({
336
+ command: z.string().min(1).max(8192),
337
+ timeoutMs: z.number().int().positive().max(2147453647).optional(),
338
+ env: z.record(z.string(), z.string()).optional(),
339
+ cwd: z.string().min(1).max(2048).optional()
340
+ }).strict();
341
+ z.object({
342
+ refresh: z.enum(["true", "false"]).optional(),
343
+ acceleratorKind: gpuAcceleratorKindSchema.optional(),
344
+ acceleratorCount: z.coerce.number().pipe(gpuAcceleratorSchema.shape.count.unwrap()).optional(),
345
+ acceleratorVramGb: z.coerce.number().positive().optional()
346
+ }).strict();
347
+ z.object({
348
+ maxSpendUsd: z.number().positive().max(1e4).optional(),
349
+ maxLifetimeSeconds: z.number().int().positive().max(1440 * 60).optional()
350
+ }).strict().refine((value) => value.maxSpendUsd !== void 0 || value.maxLifetimeSeconds !== void 0, "Renewal requires a lifetime or spend cap");
351
+ const gpuLeaseOptionsSchema = z.object({
352
+ provider: gpuLeaseProviderSchema.optional(),
353
+ image: z.string().min(1).max(512).optional(),
354
+ env: z.record(z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/), z.string()).optional(),
355
+ diskGb: z.number().int().positive().optional(),
356
+ volumeGb: z.number().int().nonnegative().optional(),
357
+ volumeMountPath: z.string().startsWith("/").max(2048).optional(),
358
+ region: z.string().min(1).max(128).optional(),
359
+ manifest: z.record(z.string(), z.unknown()).optional(),
360
+ command: z.array(z.string().max(8192)).min(1).max(256).optional(),
361
+ ports: z.array(z.number().int().min(1).max(65535)).max(32).optional(),
362
+ endpoint: z.object({
363
+ port: z.number().int().min(1).max(65535),
364
+ healthPath: z.string().regex(/^\/(?![/\\])/).refine((path) => ![
365
+ "\r",
366
+ "\n",
367
+ " "
368
+ ].some((char) => path.includes(char))).max(2048).optional()
369
+ }).strict().optional(),
370
+ allowSpot: z.boolean().optional(),
371
+ maxHourlyUsd: z.number().positive().optional(),
372
+ weights: z.object({
373
+ manifestSha: z.string().regex(/^[a-f0-9]{64}$/),
374
+ sizeBytes: z.number().int().positive().safe()
375
+ }).strict().optional(),
376
+ arms: z.array(z.unknown()).min(1).max(256).optional(),
377
+ maxSpendUsd: z.number().positive().max(1e4),
378
+ maxLifetimeSeconds: z.number().int().positive().max(1440 * 60),
379
+ idleTimeoutSeconds: z.number().int().positive().optional()
380
+ }).strict();
381
+ const gpuLeaseAttachSchema = gpuLeaseOptionsSchema.extend({ accelerator: gpuAcceleratorSchema });
382
+ const acceleratorSchema$1 = gpuAcceleratorSchema;
383
+ const providerSchema = gpuLeaseProviderSchema;
384
+ z.object({
385
+ ...gpuLeaseOptionsSchema.omit({ env: true }).shape,
386
+ id: z.string(),
387
+ projectRef: z.string(),
388
+ ownerUserId: z.string(),
389
+ productId: z.string().optional(),
390
+ provider: providerSchema,
391
+ providerLeaseId: z.string().optional(),
392
+ providerInstanceType: z.string().optional(),
393
+ workerUrl: z.string().optional(),
394
+ endpointUrl: z.string().optional(),
395
+ status: z.enum([
396
+ "provisioning",
397
+ "ready",
398
+ "detaching",
399
+ "destroyed",
400
+ "failed"
401
+ ]),
402
+ accelerator: acceleratorSchema$1,
403
+ providerCostPerHourUsd: z.number().optional(),
404
+ customerPricePerHourUsd: z.number().optional(),
405
+ estimatedProviderCostUsd: z.number().optional(),
406
+ estimatedCustomerCostUsd: z.number().optional(),
407
+ providerSelection: z.object({
408
+ strategy: z.enum([
409
+ "explicit",
410
+ "cheapest",
411
+ "ranked"
412
+ ]),
413
+ selectedProvider: providerSchema,
414
+ requestedProvider: providerSchema.optional(),
415
+ candidates: z.array(z.object({
416
+ provider: providerSchema,
417
+ accelerator: acceleratorSchema$1,
418
+ providerInstanceType: z.string().optional(),
419
+ region: z.string().optional(),
420
+ pricingSource: z.enum(["live", "configured"]).optional(),
421
+ providerCostPerHourUsd: z.number(),
422
+ customerPricePerHourUsd: z.number(),
423
+ maxLifetimeSeconds: z.number(),
424
+ estimatedProviderCostUsd: z.number(),
425
+ estimatedCustomerCostUsd: z.number()
426
+ })),
427
+ rejected: z.array(z.object({
428
+ provider: providerSchema,
429
+ error: z.string()
430
+ }))
431
+ }).optional(),
432
+ createdAt: z.string(),
433
+ updatedAt: z.string(),
434
+ readyAt: z.string().optional(),
435
+ startedAt: z.string().optional(),
436
+ lastUsedAt: z.string().optional(),
437
+ destroyedAt: z.string().optional(),
438
+ failure: z.string().optional(),
439
+ billing: z.object({
440
+ seconds: z.number(),
441
+ providerCostUsd: z.number(),
442
+ customerCostUsd: z.number(),
443
+ providerCostPerHourUsd: z.number(),
444
+ customerPricePerHourUsd: z.number(),
445
+ startedAt: z.string(),
446
+ stoppedAt: z.string()
447
+ }).optional()
448
+ });
449
+ //#endregion
450
+ //#region ../../../packages/runtime-contracts/dist/runtime-backend.js
451
+ /**
452
+ * The runtime a sandbox runs on, which a create names as `runtime`: a Docker
453
+ * container on the host kernel, or a Firecracker microVM with its own kernel.
454
+ * It is also what a provisioned host runs and the autoscaler buys.
455
+ */
456
+ const SANDBOX_RUNTIMES = ["docker", "firecracker"];
457
+ [...SANDBOX_RUNTIMES];
319
458
  //#endregion
320
459
  //#region src/image.ts
321
460
  function isFetchClient(client) {
@@ -824,33 +963,18 @@ const sandboxIdSchema = z.string().min(1).max(128);
824
963
  const leaseIdSchema = z.string().min(1).max(128);
825
964
  const envSchema = z.record(z.string(), z.string());
826
965
  const metadataSchema = z.record(z.string(), z.unknown());
827
- const acceleratorSchema = z.strictObject({
828
- kind: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]*$/).describe("Accelerator kind such as gpu, nvidia, nvidia-l4, or nvidia-h100."),
829
- count: z.number().int().min(1).max(16).optional(),
830
- memoryMB: z.number().int().positive().optional()
831
- });
966
+ const acceleratorSchema = gpuAcceleratorSchema;
832
967
  const resourcesSchema = z.strictObject({
833
968
  cpuCores: z.number().positive().optional(),
834
969
  memoryMB: z.number().int().positive().optional(),
835
970
  diskGB: z.number().int().positive().optional(),
836
971
  accelerator: acceleratorSchema.optional()
837
972
  });
838
- const driverBaseShape = {
973
+ const driverSchema = z.strictObject({
974
+ type: z.literal("tangle"),
839
975
  enableCriu: z.boolean().optional(),
840
976
  preferredRegion: nonEmptyStringSchema.optional()
841
- };
842
- const driverSchema = z.discriminatedUnion("type", [z.strictObject({
843
- type: z.literal("host-agent"),
844
- runtimeBackend: z.enum(["docker", "firecracker"]).optional(),
845
- ...driverBaseShape
846
- }), z.strictObject({
847
- type: z.enum([
848
- "docker",
849
- "firecracker",
850
- "tangle"
851
- ]),
852
- ...driverBaseShape
853
- })]);
977
+ });
854
978
  const backendModelSchema = z.strictObject({
855
979
  provider: nonEmptyStringSchema.optional(),
856
980
  model: nonEmptyStringSchema.optional(),
@@ -884,6 +1008,7 @@ const createFragmentSchema = z.strictObject({
884
1008
  bare: z.boolean().optional(),
885
1009
  agent: z.boolean().optional(),
886
1010
  driver: driverSchema.optional(),
1011
+ runtime: z.enum(SANDBOX_RUNTIMES).optional(),
887
1012
  backend: backendSchema.optional(),
888
1013
  confidential: agentProfileConfidentialSchema.optional(),
889
1014
  egressPolicy: egressPolicySchema.optional(),
@@ -979,18 +1104,10 @@ const attachMachineSchema = z.strictObject({
979
1104
  acceleratorCount: z.number().int().nonnegative().optional(),
980
1105
  driverTimings: driverTimingsSchema.optional()
981
1106
  });
982
- const gpuProviderSchema = z.enum(GPU_LEASE_PROVIDER_NAMES);
983
- const gpuLeaseAttachOptionsSchema = z.strictObject({
984
- provider: gpuProviderSchema.optional(),
985
- accelerator: acceleratorSchema,
986
- image: nonEmptyStringSchema.optional(),
987
- env: envSchema.optional()
988
- });
989
- const gpuLeaseCommandSchema = z.strictObject({
990
- command: nonEmptyStringSchema,
991
- timeoutMs: z.number().int().min(1).max(36e5).optional(),
992
- cwd: nonEmptyStringSchema.optional(),
993
- env: envSchema.optional()
1107
+ const gpuLeaseAttachOptionsSchema = gpuLeaseAttachSchema.omit({
1108
+ maxSpendUsd: true,
1109
+ maxLifetimeSeconds: true,
1110
+ idleTimeoutSeconds: true
994
1111
  });
995
1112
  const fleetReadActionSchema = z.strictObject({
996
1113
  action: z.enum([
@@ -1749,4 +1866,4 @@ function stripUndefined(value) {
1749
1866
  return Object.fromEntries(Object.entries(value).filter(([, v]) => v !== void 0).map(([k, v]) => [k, stripUndefined(v)]));
1750
1867
  }
1751
1868
  //#endregion
1752
- export { ALL_BACKEND_TYPES, AuthError, BlueprintSandboxClient, BranchFanoutExceedsHostError, BrowserInteractiveSessionControlController, BrowserInteractiveSessionController, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, CollaborationClient, CollaborationFileBridge, CompliancePlacementError, DECLARED_SECRET_HOSTS_ENV_VAR, DEFAULT_MAX_EXECUTION_TTL_MS, DEFAULT_SANDBOX_SIZE, EdgeNotReadyError, EgressProxyRecoveryError, FileWriteConflictError, GPU_LEASE_PROVIDER_NAMES, GpuProviderNotConfiguredError, HostedInstance, INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, ISOLATED_CREATION_ATTESTATION_VERSION, Image, ImageBuilder, InstanceRestartingError, InstancesClient, IntelligenceClient, InteractiveSessionControlController, InteractiveSessionController, InteractiveSessionHandle, InteractiveSessionNotRunningError, InteractiveTerminalFrameLog, KeyBudgetExhaustedError, LINE_APPLICATION_REPLY_MAX_CHARS, LINE_APPLICATION_REQUEST_MAX_BYTES, LinesClient, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, MAX_EGRESS_DENIALS_LIMIT, ManagedProcessClient, NetworkError, NotFoundError, PartialFailureError, ProfileFileMountPathError, PublicTemplatePublishError, PublicTemplatesClient, QuotaError, ResumeEnvRequiredError, RunsClient, SANDBOX_MCP_SERVER_NAME, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, SDK_TIMEOUTS, Sandbox, SandboxError, SandboxFleet, SandboxFleetClient, SandboxInstance, SandboxLines, SandboxOperation, SandboxOperationFailedError, SandboxSession, SandboxTaskSession, SeatSelectionError, ServerError, StateError, StreamInterruptedError, TERMINAL_WS_ECHO_SUBPROTOCOL, TerminalStream, TerminalStreamError, TimeoutError, ValidationError, WorkspaceImages, applySandboxEventText, assertDeclaredSecretsHeld, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, baseProxyToken, browserInteractiveControlHolderId, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentFinalMessageText, collectAgentResponseText, createAgentRunOutcomeTracker, createBatchResultAccumulator, createConfidentialSandbox, createInteractiveControlHolderId, createInteractiveTerminalCapture, createInteractiveTerminalSession, createManageSandboxesTool, createSelectSeat, declaredSecretBaseToken, deriveAgentResultOutcome, deriveAgentRunOutcome, downloadFile, exportTraceBundle, fetchTangleRouterSearchConfig, gatewaySeatTransport, generateAttestationNonce, generateDockerfile, getSandboxEventText, agentInteractiveSessionPromptRequestDigest as interactivePromptRequestDigest, interactiveSessionIdentityDigest, isBackendRegistryInteractionKind, isToolBearingEvent, lineInstanceKey, manageSandboxesInputSchema, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseBackendType, parseCollaborationDocumentId, parseDeclaredSecretsEnv, parseErrorResponse, parseLineApplicationRequest, parseLineApplicationResult, parseSSEStream, profileChannelReference, projectAgentTerminalRecord, requestedPublicProfileDigest, resolveSandboxResources, responseMetadata, runTangleRouterEvalMatrixInSandbox, sandboxFailureKind, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, terminalUpgradeHeadersSupported, toOtelJson, validateBatchRunRequest, validateDeferredProfileFileMounts, validateProfileForCreate };
1869
+ export { ALL_BACKEND_TYPES, AuthError, BlueprintSandboxClient, BranchFanoutExceedsHostError, BrowserInteractiveSessionControlController, BrowserInteractiveSessionController, CONTROL_PLANE_MCP_SERVER_NAME, CapabilityError, CollaborationClient, CollaborationFileBridge, CompliancePlacementError, DECLARED_SECRET_HOSTS_ENV_VAR, DEFAULT_MAX_EXECUTION_TTL_MS, DEFAULT_SANDBOX_SIZE, EdgeNotReadyError, EgressProxyRecoveryError, FileWriteConflictError, GPU_LEASE_PROVIDER_NAMES, GpuProviderNotConfiguredError, HostedInstance, INTERACTIVE_CONTROL_CLEANUP_TIMEOUT_MS, ISOLATED_CREATION_ATTESTATION_VERSION, Image, ImageBuilder, InstanceRestartingError, InstancesClient, IntelligenceClient, InteractiveSessionControlController, InteractiveSessionController, InteractiveSessionHandle, InteractiveSessionNotRunningError, InteractiveTerminalFrameLog, KeyBudgetExhaustedError, LINE_APPLICATION_REPLY_MAX_CHARS, LINE_APPLICATION_REQUEST_MAX_BYTES, LinesClient, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, MAX_EGRESS_DENIALS_LIMIT, ManagedProcessClient, NetworkError, NotFoundError, PartialFailureError, ProfileFileMountPathError, PublicTemplatePublishError, PublicTemplatesClient, QuotaError, ResumeEnvRequiredError, RunsClient, SANDBOX_MCP_SERVER_NAME, SANDBOX_RUNTIMES, SANDBOX_SIZE_PRESETS, SANDBOX_SIZE_PRESET_NAMES, SDK_TIMEOUTS, Sandbox, SandboxError, SandboxFleet, SandboxFleetClient, SandboxInstance, SandboxLines, SandboxOperation, SandboxOperationFailedError, SandboxSession, SandboxTaskSession, SeatSelectionError, ServerError, StateError, StreamInterruptedError, TERMINAL_WS_ECHO_SUBPROTOCOL, TerminalStream, TerminalStreamError, TimeoutError, ValidationError, WorkspaceImages, applySandboxEventText, assertDeclaredSecretsHeld, backendRegistryCapabilitiesSchema, backendRegistryEntrySchema, backendRegistryInteractionKindSchema, backendRegistryResponseSchema, baseProxyToken, browserInteractiveControlHolderId, buildCollaborationDocumentId, buildControlPlaneMcpConfig, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, collectAgentFinalMessageText, collectAgentResponseText, createAgentRunOutcomeTracker, createBatchResultAccumulator, createConfidentialSandbox, createInteractiveControlHolderId, createInteractiveTerminalCapture, createInteractiveTerminalSession, createManageSandboxesTool, createSelectSeat, declaredSecretBaseToken, deriveAgentResultOutcome, deriveAgentRunOutcome, downloadFile, exportTraceBundle, fetchTangleRouterSearchConfig, gatewaySeatTransport, generateAttestationNonce, generateDockerfile, getSandboxEventText, agentInteractiveSessionPromptRequestDigest as interactivePromptRequestDigest, interactiveSessionIdentityDigest, isBackendRegistryInteractionKind, isToolBearingEvent, lineInstanceKey, manageSandboxesInputSchema, materializeProfileFileMounts, normalizeCollaborationPath, normalizeRuntimeBackendConfig, otelTraceIdForTangleTrace, parseBackendRegistryResponse, parseBackendRegistryResponseBody, parseBackendType, parseCollaborationDocumentId, parseDeclaredSecretsEnv, parseErrorResponse, parseLineApplicationRequest, parseLineApplicationResult, parseSSEStream, profileChannelReference, projectAgentTerminalRecord, requestedPublicProfileDigest, resolveSandboxResources, responseMetadata, runTangleRouterEvalMatrixInSandbox, sandboxFailureKind, sandboxResourcesForSize, splitInlineProfileFileMounts, splitInlineProfileSkills, startTeeAttestationHeartbeat, terminalUpgradeHeadersSupported, toOtelJson, validateBatchRunRequest, validateDeferredProfileFileMounts, validateProfileForCreate };
@@ -1,4 +1,4 @@
1
- import { n as RawEvidenceArchiveAttempt } from "../raw-evidence-export-C0ieFpi2.js";
1
+ import { n as RawEvidenceArchiveAttempt } from "../raw-evidence-export-C-TDdAgC.js";
2
2
 
3
3
  //#region src/intelligence/run-session-capture.d.ts
4
4
  type RunSessionCaptureAttempt = Pick<RawEvidenceArchiveAttempt, "executionId" | "ordinal" | "nativeSessionIds" | "outcome" | "missingReasons"> & {
@@ -1,7 +1,7 @@
1
- import { D as TimeoutError, _ as NetworkError, r as parseErrorResponse, u as CapabilityError } from "../errors-C0S3TzhR.js";
2
- import { i as fetchSandboxApi } from "../api-request-SBaqnuZB.js";
3
- import { n as verifyDownload } from "../file-download-7lcgh1LR.js";
4
- import { t as rawEvidenceArchiveAttemptSchema } from "../raw-evidence-export-C6Xdl3nC.js";
1
+ import { D as TimeoutError, _ as NetworkError, r as parseErrorResponse, u as CapabilityError } from "../errors-D44qyFpy.js";
2
+ import { i as fetchSandboxApi } from "../api-request-gkPDymqn.js";
3
+ import { n as verifyDownload } from "../file-download-BO-Hmn3x.js";
4
+ import { t as rawEvidenceArchiveAttemptSchema } from "../raw-evidence-export-Dog7W5zP.js";
5
5
  import { z } from "zod";
6
6
  //#region src/intelligence/run-session-capture.ts
7
7
  const captureSchema = z.discriminatedUnion("schema", [z.object({
@@ -1,2 +1,2 @@
1
- import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, n as BrowserInteractiveSessionControlControllerOptions, r as browserInteractiveControlHolderId, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-Bg7mWDLX.js";
1
+ import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, n as BrowserInteractiveSessionControlControllerOptions, r as browserInteractiveControlHolderId, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-ClykJB9N.js";
2
2
  export { BrowserInteractiveSessionControlController, type BrowserInteractiveSessionControlControllerOptions, type InteractiveSessionIdentity, InteractiveSessionNotRunningError, browserInteractiveControlHolderId };
@@ -1,2 +1,2 @@
1
- import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-PiCGGheb.js";
1
+ import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-S_Uo-Zy7.js";
2
2
  export { BrowserInteractiveSessionControlController, InteractiveSessionNotRunningError, browserInteractiveControlHolderId };
@@ -1,6 +1,6 @@
1
- import { ft as AgentInteractiveSessionRef, o as TerminalStreamReconnectAuthority, u as ScopedToken } from "./terminal-stream-types-DLaXWiSA.js";
2
- import { Cn as TerminalStream } from "./types-COnts0u7.js";
3
- import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, f as InteractiveAttachOptions, g as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, s as InteractiveSessionControlTransport } from "./browser-interactive-control-controller-Bg7mWDLX.js";
1
+ import { ft as AgentInteractiveSessionRef, o as TerminalStreamReconnectAuthority, u as ScopedToken } from "./terminal-stream-types-Cdz3xrux.js";
2
+ import { Cn as TerminalStream } from "./types-BikjtQi3.js";
3
+ import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, f as InteractiveAttachOptions, g as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, s as InteractiveSessionControlTransport } from "./browser-interactive-control-controller-ClykJB9N.js";
4
4
 
5
5
  //#region src/interactive-controller.d.ts
6
6
  /** The request fields supplied by an attach caller before control is claimed. */
@@ -1,10 +1,10 @@
1
1
  import { C as boundedIdentifierSchema, T as boundedJsonSchema, o as canonicalCandidateDigest } from "./harness--g8UQ5TZ.js";
2
2
  import { r as agentProfileSchema } from "./profile-schema-B11dRfGB.js";
3
- import { B as PlanContinuationSchema, D as agentInteractiveSessionControlClaimMatchesRef, P as AgentExactRunControlRefSchema, R as AgentExecutionOutcomeSchema, U as InteractionRequestSchema, c as assertInteractiveSessionRef, h as AgentInteractiveSessionAttachSchema, i as createBrowserInteractiveSessionControlTransport, o as InteractiveSessionControlController, r as browserInteractiveTerminalEndpoint, v as AgentInteractiveSessionControlClaimSchema, x as AgentInteractiveSessionRefSchema, z as DurablePlanSchema } from "./browser-interactive-control-controller-PiCGGheb.js";
4
- import { O as ValidationError, _ as NetworkError, i as parseResponseError, s as retryWhen, t as TerminalStreamError, u as CapabilityError, w as ServerError } from "./errors-C0S3TzhR.js";
3
+ import { B as PlanContinuationSchema, D as agentInteractiveSessionControlClaimMatchesRef, P as AgentExactRunControlRefSchema, R as AgentExecutionOutcomeSchema, U as InteractionRequestSchema, c as assertInteractiveSessionRef, h as AgentInteractiveSessionAttachSchema, i as createBrowserInteractiveSessionControlTransport, o as InteractiveSessionControlController, r as browserInteractiveTerminalEndpoint, v as AgentInteractiveSessionControlClaimSchema, x as AgentInteractiveSessionRefSchema, z as DurablePlanSchema } from "./browser-interactive-control-controller-S_Uo-Zy7.js";
4
+ import { O as ValidationError, _ as NetworkError, i as parseResponseError, s as retryWhen, t as TerminalStreamError, u as CapabilityError, w as ServerError } from "./errors-D44qyFpy.js";
5
5
  import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-BsriwJ8L.js";
6
- import { n as SDK_TIMEOUTS } from "./api-request-SBaqnuZB.js";
7
- import { c as awaitSdkResend, s as uploadChunked } from "./chunked-upload-D2S7tOJO.js";
6
+ import { n as SDK_TIMEOUTS } from "./api-request-gkPDymqn.js";
7
+ import { c as awaitSdkResend, s as uploadChunked } from "./chunked-upload-ChZB-dYE.js";
8
8
  import { t as parseSSEStream } from "./sse-parser-BCG3iL9j.js";
9
9
  import { z } from "zod";
10
10
  import { PART_TEXT, PART_TEXT_SUFFIX } from "@tangle-network/agent-core/sse";
@@ -1,2 +1,2 @@
1
- import { t as runPreparedEvidence } from "../prepared-evidence-ibAysmX8.js";
1
+ import { t as runPreparedEvidence } from "../prepared-evidence-DIFfn4Ki.js";
2
2
  export { runPreparedEvidence };
@@ -1,4 +1,4 @@
1
- import { Tn as CreateSandboxOptions, ga as BackendConfig } from "./types-COnts0u7.js";
1
+ import { Tn as CreateSandboxOptions, fa as BackendConfig } from "./types-BikjtQi3.js";
2
2
 
3
3
  //#region src/line-application.d.ts
4
4
  /** Bounded callback request bytes after canonicalization, including JSON framing. */
@@ -1,4 +1,4 @@
1
- import { O as ValidationError, r as parseErrorResponse } from "./errors-C0S3TzhR.js";
1
+ import { O as ValidationError, r as parseErrorResponse } from "./errors-D44qyFpy.js";
2
2
  //#region src/line-identity.ts
3
3
  /**
4
4
  * The instance key that serves one member: `keyPrefix` plus the first 32 hex
package/dist/lines.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as LineRespondAgent, B as LineVoiceOptions, C as LineMessage, D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, I as LineSenderVerificationStart, L as LineThread, M as LineRole, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, R as LineTransport, S as LineMemberSpec, T as LineProvider, V as LinesHttpClient, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, c as LineAllowanceSubject, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, j as LineRespondView, k as LineReplyGate, l as LineApplicationAttachOptions, m as LineFromConnectionInput, n as SandboxLines, o as LineAgentRolePolicy, p as LineExecutionKey, r as lineInstanceKey, s as LineAllowance, t as LinesClient, u as LineAttachOptions, v as LineLimits, w as LineNumberInventory, x as LineMemberPatch, y as LineMember, z as LineVoice } from "./lines-BTStaSM2.js";
1
+ import { A as LineRespondAgent, B as LineVoiceOptions, C as LineMessage, D as LineReplyCode, E as LineReminderPreferences, F as LineSenderVerification, I as LineSenderVerificationStart, L as LineThread, M as LineRole, N as LineSendInput, O as LineReplyCodeInput, P as LineSendReceipt, R as LineTransport, S as LineMemberSpec, T as LineProvider, V as LinesHttpClient, _ as LineInstanceCreate, a as Line, b as LineMemberInstance, c as LineAllowanceSubject, d as LineAttachment, f as LineAttachmentReauthorization, g as LineInstanceAttachOptions, h as LineImage, i as profileChannelReference, j as LineRespondView, k as LineReplyGate, l as LineApplicationAttachOptions, m as LineFromConnectionInput, n as SandboxLines, o as LineAgentRolePolicy, p as LineExecutionKey, r as lineInstanceKey, s as LineAllowance, t as LinesClient, u as LineAttachOptions, v as LineLimits, w as LineNumberInventory, x as LineMemberPatch, y as LineMember, z as LineVoice } from "./lines-D7lE49lV.js";
2
2
  export { Line, LineAgentRolePolicy, LineAllowance, LineAllowanceSubject, LineApplicationAttachOptions, LineAttachOptions, LineAttachment, LineAttachmentReauthorization, LineExecutionKey, LineFromConnectionInput, LineImage, LineInstanceAttachOptions, LineInstanceCreate, LineLimits, LineMember, LineMemberInstance, LineMemberPatch, LineMemberSpec, LineMessage, LineNumberInventory, LineProvider, LineReminderPreferences, LineReplyCode, LineReplyCodeInput, LineReplyGate, LineRespondAgent, LineRespondView, LineRole, LineSendInput, LineSendReceipt, LineSenderVerification, LineSenderVerificationStart, LineThread, LineTransport, LineVoice, LineVoiceOptions, LinesClient, LinesHttpClient, SandboxLines, lineInstanceKey, profileChannelReference };
package/dist/lines.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-NECw0OhS.js";
1
+ import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-DwJ7AKx7.js";
2
2
  export { LinesClient, SandboxLines, lineInstanceKey, profileChannelReference };
@@ -1,4 +1,4 @@
1
- import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-C6DtK7GX-D8681c7j.js";
1
+ import { t as AUTH_BUNDLE_PATHS } from "./cli-auth-bundle-DcxhAW23-C22MMIvx.js";
2
2
  import { existsSync, readFileSync } from "node:fs";
3
3
  import { basename, dirname, join } from "node:path";
4
4
  import { homedir } from "node:os";
@@ -1,6 +1,6 @@
1
- import "./api-request-SBaqnuZB.js";
1
+ import "./api-request-gkPDymqn.js";
2
2
  import { u as SANDBOX_FILE_API_ABSOLUTE_ROOTS } from "./file-transfer-DOSTbUSR.js";
3
- import { a as listAgentPreviews, i as getAgentPreview, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "./preview-operations-DWL78boI.js";
3
+ import { a as listAgentPreviews, i as getAgentPreview, o as publishAgentPreview, r as ensureAgentPreview, s as removeAgentPreview, t as AgentPreviewError } from "./preview-operations-BTHZR1w2.js";
4
4
  //#region \0rolldown/runtime.js
5
5
  var __defProp = Object.defineProperty;
6
6
  var __exportAll = (all, no_symbols) => {
@@ -396,7 +396,7 @@ async function createMcpServer(box, options = {}) {
396
396
  const { bindings, handlers } = bindToolSpecs(box, options);
397
397
  const server = new serverModule.Server({
398
398
  name: options.name ?? "tangle-sandbox",
399
- version: options.version ?? "1.0.264"
399
+ version: options.version ?? "1.0.266"
400
400
  }, { capabilities: { tools: {} } });
401
401
  server.setRequestHandler(typesModule.ListToolsRequestSchema, async () => ({ tools: bindings.map(({ spec: s }) => ({
402
402
  name: s.name,
@@ -1,6 +1,6 @@
1
- import { O as SandboxInstance } from "./index-dxhLhM8L.js";
2
- import { F as EnsureDevServerOptions, H as PreviewLinkInfo } from "./types-COnts0u7.js";
3
- import { t as Sandbox } from "./client-DaZwQeOS.js";
1
+ import { O as SandboxInstance } from "./index-DkB8WbjK.js";
2
+ import { F as EnsureDevServerOptions, H as PreviewLinkInfo } from "./types-BikjtQi3.js";
3
+ import { t as Sandbox } from "./client-BYGLoEiU.js";
4
4
 
5
5
  //#region src/agent/preview-operations.d.ts
6
6
  type AgentPreviewOptions = Pick<EnsureDevServerOptions, "sessionId" | "cwd"> & {
@@ -1,5 +1,5 @@
1
- import { R as SandboxError } from "./terminal-stream-types-DLaXWiSA.js";
2
- import { Cr as PublishPublicTemplateVersionOptions, Sr as PublishPublicTemplateOptions, Xr as HttpClient, br as PublicTemplateInfo, xr as PublicTemplateVersionInfo } from "./types-COnts0u7.js";
1
+ import { R as SandboxError } from "./terminal-stream-types-Cdz3xrux.js";
2
+ import { Cr as PublishPublicTemplateVersionOptions, Kr as HttpClient, Sr as PublishPublicTemplateOptions, br as PublicTemplateInfo, xr as PublicTemplateVersionInfo } from "./types-BikjtQi3.js";
3
3
  import { z } from "zod";
4
4
 
5
5
  //#region src/public-templates.d.ts
@@ -1,2 +1,2 @@
1
- import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-3diq9yKD.js";
1
+ import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-DRqOkshE.js";
2
2
  export { PublicTemplatePublishArtifact, PublicTemplatePublishError, PublicTemplatePublishJob, PublicTemplatePublishRequestOptions, PublicTemplatesClient };
@@ -1,4 +1,4 @@
1
- import { C as SandboxError, a as readResponseJson } from "./errors-C0S3TzhR.js";
1
+ import { C as SandboxError, a as readResponseJson } from "./errors-D44qyFpy.js";
2
2
  import { n as combineAbortSignals } from "./abort-signal-BsriwJ8L.js";
3
3
  import { z } from "zod";
4
4
  //#region src/public-templates.ts
@@ -1,6 +1,6 @@
1
- import { n as verifyDownload } from "./file-download-7lcgh1LR.js";
2
- import { t as runPreparedEvidence } from "./prepared-evidence-ibAysmX8.js";
3
- import { t as rawEvidenceArchiveAttemptSchema } from "./raw-evidence-export-C6Xdl3nC.js";
1
+ import { n as verifyDownload } from "./file-download-BO-Hmn3x.js";
2
+ import { t as runPreparedEvidence } from "./prepared-evidence-DIFfn4Ki.js";
3
+ import { t as rawEvidenceArchiveAttemptSchema } from "./raw-evidence-export-Dog7W5zP.js";
4
4
  import { z } from "zod";
5
5
  //#region src/lib/raw-evidence-archive.ts
6
6
  const digest = z.string().regex(/^sha256:[a-f0-9]{64}$/).transform((value) => `sha256:${value.slice(7)}`);
package/dist/runtime.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- 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, q as ValidationError, u as ScopedToken, w as CapabilityError, z as SandboxErrorJson } from "./terminal-stream-types-DLaXWiSA.js";
2
- import { $i as SessionExecutionStatus, Bi as CreateSessionOptions, Cn as TerminalStream, Di as SandboxEvent, Fi as CommitTaskSessionOptions, Gi as ListMessagesOptions, Gn as ChunkedUploadResult, Ji as SendSessionMessageRequest, Qi as SessionExecutionInfo, Qn as FileReadBatchResult, Vi as CreateTaskSessionOptions, Wn as ChunkedUploadOptions, Xr as HttpClient, Yi as SentSessionMessage, Zi as SessionEventStreamOptions, Zn as FileReadBatchOptions, aa as SessionMessage, ar as FileTreeResult, cr as FileWriteResult, dn as SandboxTerminalCreateOptions, dr as RenameOptions, fa as TaskSessionInfo, fn as SandboxTerminalInfo, ir as FileTreeOptions, la as TaskSessionChanges, ln as SandboxRuntimeHealth, mn as SandboxTerminalRequestOptions, mr as WriteFileOptions, na as SessionInfo, oa as SessionMessageAdmission, on as SandboxPortBinding, or as FileUsageOptions, pn as SandboxTerminalManager, pr as UploadProgress, qi as SendSessionMessageOptions, sr as FileUsageResult, tr as FileRenameResult, ua as TaskSessionCommitResult } from "./types-COnts0u7.js";
3
- import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-Bg7mWDLX.js";
4
- import { t as BrowserInteractiveSessionController } from "./interactive-controller-CRp4VQKD.js";
5
- import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-DLLvOkbe.js";
1
+ 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, q as ValidationError, u as ScopedToken, w as CapabilityError, z as SandboxErrorJson } from "./terminal-stream-types-Cdz3xrux.js";
2
+ import { Ci as SandboxEvent, Cn as TerminalStream, Gi as SentSessionMessage, Gn as ChunkedUploadResult, Ii as CreateSessionOptions, Ji as SessionExecutionInfo, Kr as HttpClient, Li as CreateTaskSessionOptions, Qi as SessionInfo, Qn as FileReadBatchResult, Ui as SendSessionMessageOptions, Vi as ListMessagesOptions, Wi as SendSessionMessageRequest, Wn as ChunkedUploadOptions, Yi as SessionExecutionStatus, Zn as FileReadBatchOptions, aa as TaskSessionChanges, ar as FileTreeResult, ca as TaskSessionInfo, cr as FileWriteResult, dn as SandboxTerminalCreateOptions, dr as RenameOptions, fn as SandboxTerminalInfo, ir as FileTreeOptions, ji as CommitTaskSessionOptions, ln as SandboxRuntimeHealth, mn as SandboxTerminalRequestOptions, mr as WriteFileOptions, na as SessionMessageAdmission, oa as TaskSessionCommitResult, on as SandboxPortBinding, or as FileUsageOptions, pn as SandboxTerminalManager, pr as UploadProgress, qi as SessionEventStreamOptions, sr as FileUsageResult, ta as SessionMessage, tr as FileRenameResult } from "./types-BikjtQi3.js";
3
+ import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-ClykJB9N.js";
4
+ import { t as BrowserInteractiveSessionController } from "./interactive-controller-DSYQTRwh.js";
5
+ import { a as deriveAgentRunOutcome, i as deriveAgentResultOutcome, n as AgentRunOutcomeTracker, o as projectAgentTerminalRecord, r as createAgentRunOutcomeTracker, t as AgentRunOutcome } from "./agent-run-outcome-DThM9ULE.js";
6
6
 
7
7
  //#region src/lib/chunked-upload.d.ts
8
8
  /** The transport a caller wires this module to — {@link SandboxInstance.runtimeFetch}
package/dist/runtime.js CHANGED
@@ -1,8 +1,8 @@
1
- import { F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController } from "./interactive-controller-CqJX-LcO.js";
2
- import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-PiCGGheb.js";
3
- import { C as SandboxError, D as TimeoutError, O as ValidationError, T as StateError, _ as NetworkError, b as ProfileFileMountPathError, c as AuthError, m as FileWriteConflictError, u as CapabilityError, v as NotFoundError, w as ServerError, x as QuotaError, y as PartialFailureError } from "./errors-C0S3TzhR.js";
4
- import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-SBaqnuZB.js";
5
- import { s as uploadChunked } from "./chunked-upload-D2S7tOJO.js";
1
+ import { F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController } from "./interactive-controller-llj6EdlZ.js";
2
+ import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-S_Uo-Zy7.js";
3
+ import { C as SandboxError, D as TimeoutError, O as ValidationError, T as StateError, _ as NetworkError, b as ProfileFileMountPathError, c as AuthError, m as FileWriteConflictError, u as CapabilityError, v as NotFoundError, w as ServerError, x as QuotaError, y as PartialFailureError } from "./errors-D44qyFpy.js";
4
+ import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-gkPDymqn.js";
5
+ import { s as uploadChunked } from "./chunked-upload-ChZB-dYE.js";
6
6
  //#region src/runtime-client.ts
7
7
  function requireToken(token) {
8
8
  const value = token.trim();