@tangle-network/sandbox 1.0.336 → 1.0.338

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 (52) hide show
  1. package/README.md +1 -1
  2. package/dist/agent/index.d.ts +4 -4
  3. package/dist/agent/index.js +5 -5
  4. package/dist/agent/preview.d.ts +1 -1
  5. package/dist/agent/preview.js +1 -1
  6. package/dist/{agent-run-outcome-Cybd-m28.d.ts → agent-run-outcome-rT05CaY9.d.ts} +1 -1
  7. package/dist/{api-request-wlhgtcea.js → api-request-B39znP4S.js} +2 -2
  8. package/dist/{browser-interactive-control-controller-o_LzX2TC.d.ts → browser-interactive-control-controller-45o0sl7B.d.ts} +1 -1
  9. package/dist/{browser-interactive-control-controller-MU7_6ULe.js → browser-interactive-control-controller-GiKyz9b6.js} +1 -1
  10. package/dist/{chunked-upload-file-C4IP7e-e.js → chunked-upload-file-CWBAcU-r.js} +1 -1
  11. package/dist/{chunked-upload-PC8BNzoP.js → chunked-upload-wSXiVX7I.js} +1 -1
  12. package/dist/{client-5hw0MqBq.js → client-DhObw7SH.js} +5 -5
  13. package/dist/{client-Cv3Uslvn.d.ts → client-H_cy-nPd.d.ts} +5 -5
  14. package/dist/collaboration/index.js +1 -1
  15. package/dist/{collaboration-DCg_W9Kn.js → collaboration-COmBft2M.js} +2 -2
  16. package/dist/core.d.ts +6 -6
  17. package/dist/core.js +5 -5
  18. package/dist/{error-catalog-DPxKJnpi.js → error-catalog-CNOtcM0v.js} +1 -1
  19. package/dist/{errors-CHMFBW4p.js → errors-vuyhjefs.js} +1 -1
  20. package/dist/{file-download-DMk59Y2d.js → file-download-CdYQq4-A.js} +1 -1
  21. package/dist/gpu-lease/index.js +1 -1
  22. package/dist/{index-CuUyy_-_.d.ts → index-BOBO9J8y.d.ts} +5 -5
  23. package/dist/index.d.ts +9 -9
  24. package/dist/index.js +149 -11
  25. package/dist/intelligence/index.js +3 -3
  26. package/dist/interactive-control.d.ts +1 -1
  27. package/dist/interactive-control.js +1 -1
  28. package/dist/{interactive-controller-Bvi5m77Z.d.ts → interactive-controller-DGChFmrO.d.ts} +3 -3
  29. package/dist/{interactive-controller-D44tnoy7.js → interactive-controller-DJWylpzc.js} +4 -4
  30. package/dist/{lines-BVWdK4Gb.d.ts → lines-D1YpNgeL.d.ts} +1 -1
  31. package/dist/{lines-lpmGFgOZ.js → lines-vZDk8YYb.js} +1 -1
  32. package/dist/lines.d.ts +1 -1
  33. package/dist/lines.js +1 -1
  34. package/dist/{mcp-local-CW_v3696.js → mcp-local-CJ40CC4w.js} +2 -2
  35. package/dist/{preview-Bwfuk4YU.d.ts → preview-B45MzEE6.d.ts} +3 -3
  36. package/dist/{public-templates-zphoMOzL.d.ts → public-templates-mpkfRTBh.d.ts} +2 -2
  37. package/dist/public-templates.d.ts +1 -1
  38. package/dist/public-templates.js +1 -1
  39. package/dist/{raw-evidence-archive-C1-BRfUA.js → raw-evidence-archive-DM5sTcFG.js} +1 -1
  40. package/dist/runtime.d.ts +5 -5
  41. package/dist/runtime.js +5 -5
  42. package/dist/{sandbox-DN8Qk8p1.js → sandbox-Z_3IiMtP.js} +12 -150
  43. package/dist/{select-seat-CFbaliNa.js → select-seat-LICdfnzm.js} +1 -1
  44. package/dist/select-seat-command.d.ts +2 -2
  45. package/dist/select-seat-command.js +2 -2
  46. package/dist/session-gateway/index.js +1 -1
  47. package/dist/tangle/index.d.ts +1 -1
  48. package/dist/tangle/index.js +1 -1
  49. package/dist/{tangle-CJmK3uL3.js → tangle-BD647PcB.js} +3 -3
  50. package/dist/{terminal-stream-types-PYRsYyUN.d.ts → terminal-stream-types-CygV-MYy.d.ts} +1 -1
  51. package/dist/{types-59X83OFN.d.ts → types-CGw0JyYZ.d.ts} +1 -1
  52. package/package.json +5 -5
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-D44tnoy7.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-DJWylpzc.js";
2
2
  import { i as SANDBOX_SIZE_PRESET_NAMES, r as agentProfileSchema, t as agentProfileConfidentialSchema } from "./profile-schema-C_MbI9mE.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-MU7_6ULe.js";
4
- import { A as splitInlineProfileSkills, C as collectAgentResponseText, D as ManagedProcessClient, F as isMaterializerHarness, I as materializeProfile, L as SandboxOperation, M as HARNESS_LAUNCH_MATERIALIZE_OPTIONS, N as ProfileUnsupportedError, O as materializeProfileFileMounts, P as enforceWorkspacePlanSupport, R as SandboxOperationFailedError, S as collectAgentFinalMessageText, T as isToolBearingEvent, _ as InteractiveSessionHandle, a as SANDBOX_RUNTIMES, b as createInteractiveTerminalSession, c as gpuLeaseAttachSchema, d as exportTraceBundle, f as otelTraceIdForTangleTrace, h as SandboxSession, i as MAX_EGRESS_DENIALS_LIMIT, j as validateDeferredProfileFileMounts, k as splitInlineProfileFileMounts, l as gpuLeaseCommandSchema, m as SandboxTaskSession, o as GPU_LEASE_PROVIDER_NAMES, p as toOtelJson, r as WorkspaceImages, s as gpuAcceleratorSchema, t as SandboxInstance, u as buildTraceExportPayload, v as InteractiveTerminalFrameLog, w as getSandboxEventText, x as applySandboxEventText, y as createInteractiveTerminalCapture } from "./sandbox-DN8Qk8p1.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-CHMFBW4p.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-5hw0MqBq.js";
7
- import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-wlhgtcea.js";
8
- import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-DCg_W9Kn.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-GiKyz9b6.js";
4
+ import { A as isMaterializerHarness, C as materializeProfileFileMounts, D as HARNESS_LAUNCH_MATERIALIZE_OPTIONS, E as validateDeferredProfileFileMounts, M as SandboxOperation, N as SandboxOperationFailedError, O as ProfileUnsupportedError, S as ManagedProcessClient, T as splitInlineProfileSkills, _ 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 materializeProfile, k as enforceWorkspacePlanSupport, 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 splitInlineProfileFileMounts, y as getSandboxEventText } from "./sandbox-Z_3IiMtP.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-vuyhjefs.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-DhObw7SH.js";
7
+ import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-B39znP4S.js";
8
+ import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-COmBft2M.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-lpmGFgOZ.js";
12
- import { t as downloadFile } from "./file-download-DMk59Y2d.js";
11
+ import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-vZDk8YYb.js";
12
+ import { t as downloadFile } from "./file-download-CdYQq4-A.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-CBWUEURz.js";
15
- import { a as createSelectSeat, i as SeatSelectionError, o as gatewaySeatTransport } from "./select-seat-CFbaliNa.js";
16
- import { s as BlueprintSandboxClient } from "./tangle-CJmK3uL3.js";
15
+ import { a as createSelectSeat, i as SeatSelectionError, o as gatewaySeatTransport } from "./select-seat-LICdfnzm.js";
16
+ import { s as BlueprintSandboxClient } from "./tangle-BD647PcB.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";
@@ -318,6 +318,144 @@ function startTeeAttestationHeartbeat(sandbox, options = {}) {
318
318
  };
319
319
  }
320
320
  //#endregion
321
+ //#region ../../../packages/runtime-contracts/dist/gpu-lease.js
322
+ const GPU_LEASE_PROVIDER_NAMES = [
323
+ "runpod",
324
+ "vast-ai",
325
+ "lambda-labs",
326
+ "modal"
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];
458
+ //#endregion
321
459
  //#region src/image.ts
322
460
  function isFetchClient(client) {
323
461
  return typeof client.fetch === "function";
@@ -1,6 +1,6 @@
1
- import { D as TimeoutError, _ as NetworkError, r as parseErrorResponse, u as CapabilityError } from "../errors-CHMFBW4p.js";
2
- import { i as fetchSandboxApi } from "../api-request-wlhgtcea.js";
3
- import { n as verifyDownload } from "../file-download-DMk59Y2d.js";
1
+ import { D as TimeoutError, _ as NetworkError, r as parseErrorResponse, u as CapabilityError } from "../errors-vuyhjefs.js";
2
+ import { i as fetchSandboxApi } from "../api-request-B39znP4S.js";
3
+ import { n as verifyDownload } from "../file-download-CdYQq4-A.js";
4
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
@@ -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-o_LzX2TC.js";
1
+ import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, n as BrowserInteractiveSessionControlControllerOptions, r as browserInteractiveControlHolderId, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-45o0sl7B.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-MU7_6ULe.js";
1
+ import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-GiKyz9b6.js";
2
2
  export { BrowserInteractiveSessionControlController, InteractiveSessionNotRunningError, browserInteractiveControlHolderId };
@@ -1,7 +1,7 @@
1
- import { o as TerminalStreamReconnectAuthority, u as ScopedToken } from "./terminal-stream-types-PYRsYyUN.js";
1
+ import { o as TerminalStreamReconnectAuthority, u as ScopedToken } from "./terminal-stream-types-CygV-MYy.js";
2
2
  import { u as AgentInteractiveSessionRef } from "./index-Dxxq7J79.js";
3
- import { en as TerminalStream } from "./types-59X83OFN.js";
4
- 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-o_LzX2TC.js";
3
+ import { en as TerminalStream } from "./types-CGw0JyYZ.js";
4
+ 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-45o0sl7B.js";
5
5
 
6
6
  //#region src/interactive-controller.d.ts
7
7
  /** 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-DW2I_kp7.js";
2
2
  import { r as agentProfileSchema } from "./profile-schema-C_MbI9mE.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-MU7_6ULe.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-CHMFBW4p.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-GiKyz9b6.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-vuyhjefs.js";
5
5
  import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-BsriwJ8L.js";
6
- import { n as SDK_TIMEOUTS } from "./api-request-wlhgtcea.js";
7
- import { c as awaitSdkResend, s as uploadChunked } from "./chunked-upload-PC8BNzoP.js";
6
+ import { n as SDK_TIMEOUTS } from "./api-request-B39znP4S.js";
7
+ import { c as awaitSdkResend, s as uploadChunked } from "./chunked-upload-wSXiVX7I.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,4 +1,4 @@
1
- import { nn as CreateSandboxOptions, pa as BackendConfig } from "./types-59X83OFN.js";
1
+ import { nn as CreateSandboxOptions, pa as BackendConfig } from "./types-CGw0JyYZ.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-CHMFBW4p.js";
1
+ import { O as ValidationError, r as parseErrorResponse } from "./errors-vuyhjefs.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-BVWdK4Gb.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-D1YpNgeL.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-lpmGFgOZ.js";
1
+ import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-vZDk8YYb.js";
2
2
  export { LinesClient, SandboxLines, lineInstanceKey, profileChannelReference };
@@ -1,4 +1,4 @@
1
- import "./api-request-wlhgtcea.js";
1
+ import "./api-request-B39znP4S.js";
2
2
  import { u as SANDBOX_FILE_API_ABSOLUTE_ROOTS } from "./file-transfer-DOSTbUSR.js";
3
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
@@ -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.336"
399
+ version: options.version ?? "1.0.338"
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-CuUyy_-_.js";
2
- import { f as EnsureDevServerOptions, y as PreviewLinkInfo } from "./types-59X83OFN.js";
3
- import { t as Sandbox } from "./client-Cv3Uslvn.js";
1
+ import { O as SandboxInstance } from "./index-BOBO9J8y.js";
2
+ import { f as EnsureDevServerOptions, y as PreviewLinkInfo } from "./types-CGw0JyYZ.js";
3
+ import { t as Sandbox } from "./client-H_cy-nPd.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-PYRsYyUN.js";
2
- import { Jn as PublicTemplateInfo, Xn as PublishPublicTemplateOptions, Yn as PublicTemplateVersionInfo, Zn as PublishPublicTemplateVersionOptions, br as HttpClient } from "./types-59X83OFN.js";
1
+ import { R as SandboxError } from "./terminal-stream-types-CygV-MYy.js";
2
+ import { Jn as PublicTemplateInfo, Xn as PublishPublicTemplateOptions, Yn as PublicTemplateVersionInfo, Zn as PublishPublicTemplateVersionOptions, br as HttpClient } from "./types-CGw0JyYZ.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-zphoMOzL.js";
1
+ import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-mpkfRTBh.js";
2
2
  export { PublicTemplatePublishArtifact, PublicTemplatePublishError, PublicTemplatePublishJob, PublicTemplatePublishRequestOptions, PublicTemplatesClient };
@@ -1,4 +1,4 @@
1
- import { C as SandboxError, a as readResponseJson } from "./errors-CHMFBW4p.js";
1
+ import { C as SandboxError, a as readResponseJson } from "./errors-vuyhjefs.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,4 +1,4 @@
1
- import { n as verifyDownload } from "./file-download-DMk59Y2d.js";
1
+ import { n as verifyDownload } from "./file-download-CdYQq4-A.js";
2
2
  import { t as runPreparedEvidence } from "./prepared-evidence-DIFfn4Ki.js";
3
3
  import { t as rawEvidenceArchiveAttemptSchema } from "./raw-evidence-export-Dog7W5zP.js";
4
4
  import { z } from "zod";
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-PYRsYyUN.js";
2
- import { $i as SessionInfo, Bt as SandboxRuntimeHealth, Ci as SandboxEvent, En as FileReadBatchResult, Fn as FileUsageResult, Gi as SendSessionMessageRequest, Gt as SandboxTerminalRequestOptions, Hi as ListMessagesOptions, Hn as WriteFileOptions, Ht as SandboxTerminalCreateOptions, In as FileWriteResult, Ji as SessionEventStreamOptions, Ki as SentSessionMessage, Li as CreateSessionOptions, Lt as SandboxPortBinding, Mi as CommitTaskSessionOptions, Mn as FileTreeOptions, Nn as FileTreeResult, Pn as FileUsageOptions, Ri as CreateTaskSessionOptions, Tn as FileReadBatchOptions, Ut as SandboxTerminalInfo, Vn as UploadProgress, Wi as SendSessionMessageOptions, Wt as SandboxTerminalManager, Xi as SessionExecutionStatus, Yi as SessionExecutionInfo, br as HttpClient, en as TerminalStream, kn as FileRenameResult, la as TaskSessionInfo, na as SessionMessage, oa as TaskSessionChanges, ra as SessionMessageAdmission, sa as TaskSessionCommitResult, vn as ChunkedUploadOptions, yn as ChunkedUploadResult, zn as RenameOptions } from "./types-59X83OFN.js";
3
- import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-o_LzX2TC.js";
4
- import { t as BrowserInteractiveSessionController } from "./interactive-controller-Bvi5m77Z.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-Cybd-m28.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-CygV-MYy.js";
2
+ import { $i as SessionInfo, Bt as SandboxRuntimeHealth, Ci as SandboxEvent, En as FileReadBatchResult, Fn as FileUsageResult, Gi as SendSessionMessageRequest, Gt as SandboxTerminalRequestOptions, Hi as ListMessagesOptions, Hn as WriteFileOptions, Ht as SandboxTerminalCreateOptions, In as FileWriteResult, Ji as SessionEventStreamOptions, Ki as SentSessionMessage, Li as CreateSessionOptions, Lt as SandboxPortBinding, Mi as CommitTaskSessionOptions, Mn as FileTreeOptions, Nn as FileTreeResult, Pn as FileUsageOptions, Ri as CreateTaskSessionOptions, Tn as FileReadBatchOptions, Ut as SandboxTerminalInfo, Vn as UploadProgress, Wi as SendSessionMessageOptions, Wt as SandboxTerminalManager, Xi as SessionExecutionStatus, Yi as SessionExecutionInfo, br as HttpClient, en as TerminalStream, kn as FileRenameResult, la as TaskSessionInfo, na as SessionMessage, oa as TaskSessionChanges, ra as SessionMessageAdmission, sa as TaskSessionCommitResult, vn as ChunkedUploadOptions, yn as ChunkedUploadResult, zn as RenameOptions } from "./types-CGw0JyYZ.js";
3
+ import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-45o0sl7B.js";
4
+ import { t as BrowserInteractiveSessionController } from "./interactive-controller-DGChFmrO.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-rT05CaY9.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-D44tnoy7.js";
2
- import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-MU7_6ULe.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-CHMFBW4p.js";
4
- import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-wlhgtcea.js";
5
- import { s as uploadChunked } from "./chunked-upload-PC8BNzoP.js";
1
+ import { F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController } from "./interactive-controller-DJWylpzc.js";
2
+ import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-GiKyz9b6.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-vuyhjefs.js";
4
+ import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-B39znP4S.js";
5
+ import { s as uploadChunked } from "./chunked-upload-wSXiVX7I.js";
6
6
  //#region src/runtime-client.ts
7
7
  function requireToken(token) {
8
8
  const value = token.trim();
@@ -1,24 +1,24 @@
1
- import { A as requestedPublicProfileDigest, C as runtimeFilesystemPath, D as assertCurrentBackendType, E as applyRequestedModel, F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, O as mergeRuntimeBackendConfig, P as withoutRuntimeSecrets, S as encodeTextForWire, U as normalizeEffectiveBackend, _ as mintTraceId, a as assertScopedTokenActive, b as validateAcceptedDispatchRunRef, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as callHeaders, g as isTraceId, h as TRACE_ID_HEADER, i as terminalUpgradeHeadersSupported, j as requestedSecretProfilePublicDigest, k as normalizeRuntimeBackendConfig, l as normalizeSessionInfo, m as assertFileWritePreconditions, n as InteractiveSessionController, p as sessionHeaders, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as resolveTraceId, w as canUseNodeHttp2, x as encodePromptForWire, y as resolveDispatchRunIdentity } from "./interactive-controller-D44tnoy7.js";
1
+ import { A as requestedPublicProfileDigest, C as runtimeFilesystemPath, D as assertCurrentBackendType, E as applyRequestedModel, F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, O as mergeRuntimeBackendConfig, P as withoutRuntimeSecrets, S as encodeTextForWire, U as normalizeEffectiveBackend, _ as mintTraceId, a as assertScopedTokenActive, b as validateAcceptedDispatchRunRef, c as SandboxRuntimeApi, d as appendSessionIdQuery, f as callHeaders, g as isTraceId, h as TRACE_ID_HEADER, i as terminalUpgradeHeadersSupported, j as requestedSecretProfilePublicDigest, k as normalizeRuntimeBackendConfig, l as normalizeSessionInfo, m as assertFileWritePreconditions, n as InteractiveSessionController, p as sessionHeaders, r as TerminalStream, s as requestScopedToken, u as sessionMessageRequestBody, v as resolveTraceId, w as canUseNodeHttp2, x as encodePromptForWire, y as resolveDispatchRunIdentity } from "./interactive-controller-DJWylpzc.js";
2
2
  import { C as boundedIdentifierSchema$1, E as boundedStringSchema$1, g as sha256DigestSchema$1, o as canonicalCandidateDigest$1, s as canonicalCandidateJson$1 } from "./harness-DW2I_kp7.js";
3
3
  import { a as ProxySecretReceiptSchema$1, r as agentProfileSchema$1 } from "./profile-schema-C_MbI9mE.js";
4
4
  import { t as sha256$1 } from "./sha2-BIoWepwn.js";
5
- import { A as agentInteractiveSessionStatusMatchesRef, B as PlanContinuationSchema, C as AgentInteractiveSessionStopAcknowledgementSchema, D as agentInteractiveSessionControlClaimMatchesRef, E as agentInteractiveSessionControlClaimIsNewer, F as AgentRunCancellationAcknowledgementSchema, G as InteractionResponseSchema, H as InteractionBindingSchema, I as AgentRunCancellationRequestSchema, L as agentRunCancellationAcknowledgementMatchesRequest, M as agentInteractiveDimensionSchema, N as sameAgentExactRun, O as agentInteractiveSessionPromptAcknowledgementMatchesCommand, P as AgentExactRunControlRefSchema, S as AgentInteractiveSessionStatusSchema, T as agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, U as InteractionRequestSchema, V as InteractionAcknowledgementSchema, W as InteractionResponseCommandSchema, _ as AgentInteractiveSessionControlClaimRequestSchema, b as AgentInteractiveSessionPromptCommandSchema, d as interactiveSessionControlClaimResponseSchema, f as interactiveSessionControlReleaseResponseSchema, g as AgentInteractiveSessionControlClaimAcknowledgementSchema, h as AgentInteractiveSessionAttachSchema, j as agentInteractiveSessionStopAcknowledgementMatchesCommand, l as createInteractiveControlHolderId, m as interactiveSessionStatusResponseSchema, p as interactiveSessionControlValidationResponseSchema, v as AgentInteractiveSessionControlClaimSchema, w as AgentInteractiveSessionStopCommandSchema, x as AgentInteractiveSessionRefSchema, y as AgentInteractiveSessionPromptAcknowledgementSchema } from "./browser-interactive-control-controller-MU7_6ULe.js";
5
+ import { A as agentInteractiveSessionStatusMatchesRef, B as PlanContinuationSchema, C as AgentInteractiveSessionStopAcknowledgementSchema, D as agentInteractiveSessionControlClaimMatchesRef, E as agentInteractiveSessionControlClaimIsNewer, F as AgentRunCancellationAcknowledgementSchema, G as InteractionResponseSchema, H as InteractionBindingSchema, I as AgentRunCancellationRequestSchema, L as agentRunCancellationAcknowledgementMatchesRequest, M as agentInteractiveDimensionSchema, N as sameAgentExactRun, O as agentInteractiveSessionPromptAcknowledgementMatchesCommand, P as AgentExactRunControlRefSchema, S as AgentInteractiveSessionStatusSchema, T as agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, U as InteractionRequestSchema, V as InteractionAcknowledgementSchema, W as InteractionResponseCommandSchema, _ as AgentInteractiveSessionControlClaimRequestSchema, b as AgentInteractiveSessionPromptCommandSchema, d as interactiveSessionControlClaimResponseSchema, f as interactiveSessionControlReleaseResponseSchema, g as AgentInteractiveSessionControlClaimAcknowledgementSchema, h as AgentInteractiveSessionAttachSchema, j as agentInteractiveSessionStopAcknowledgementMatchesCommand, l as createInteractiveControlHolderId, m as interactiveSessionStatusResponseSchema, p as interactiveSessionControlValidationResponseSchema, v as AgentInteractiveSessionControlClaimSchema, w as AgentInteractiveSessionStopCommandSchema, x as AgentInteractiveSessionRefSchema, y as AgentInteractiveSessionPromptAcknowledgementSchema } from "./browser-interactive-control-controller-GiKyz9b6.js";
6
6
  import { t as canonicalAgentProfileDigest } from "./agent-execution-preparation-CatenlMs.js";
7
- import { C as SandboxError, D as TimeoutError, E as StreamInterruptedError, O as ValidationError, T as StateError, _ as NetworkError, a as readResponseJson, b as ProfileFileMountPathError, c as AuthError, f as EdgeNotReadyError, i as parseResponseError, n as isTransientWrite, o as responseMetadata, r as parseErrorResponse, s as retryWhen, t as TerminalStreamError, u as CapabilityError, v as NotFoundError, w as ServerError, y as PartialFailureError } from "./errors-CHMFBW4p.js";
7
+ import { C as SandboxError, D as TimeoutError, E as StreamInterruptedError, O as ValidationError, T as StateError, _ as NetworkError, a as readResponseJson, b as ProfileFileMountPathError, c as AuthError, f as EdgeNotReadyError, i as parseResponseError, n as isTransientWrite, o as responseMetadata, r as parseErrorResponse, s as retryWhen, t as TerminalStreamError, u as CapabilityError, v as NotFoundError, w as ServerError, y as PartialFailureError } from "./errors-vuyhjefs.js";
8
8
  import { t as parseSandboxRetryAfterHeader } from "./retry-after-header-BZbs5rig.js";
9
9
  import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-BsriwJ8L.js";
10
10
  import { a as backoffDelayMs, o as isUndelivered, r as abortableSleep } from "./retry-policy-oW3_ljoc.js";
11
- import { a as isReplayableBody, i as fetchSandboxApi, n as SDK_TIMEOUTS, o as rewrapResponse, t as IDEMPOTENT_METHODS } from "./api-request-wlhgtcea.js";
11
+ import { a as isReplayableBody, i as fetchSandboxApi, n as SDK_TIMEOUTS, o as rewrapResponse, t as IDEMPOTENT_METHODS } from "./api-request-B39znP4S.js";
12
12
  import { a as SANDBOX_PROXY_REQUEST_MAX_BYTES, c as PROFILE_FILE_MOUNT_OUTSIDE_ROOTS_CODE, d as isProfileFileMountOutsideRoots, f as profileFileMountOutsideRootsMessage, l as SANDBOX_AGENT_HOME, o as FILE_OPERATION_LIMITS, u as SANDBOX_FILE_API_ABSOLUTE_ROOTS } from "./file-transfer-DOSTbUSR.js";
13
- import { c as awaitSdkResend, l as takeSdkTurn, s as uploadChunked } from "./chunked-upload-PC8BNzoP.js";
13
+ import { c as awaitSdkResend, l as takeSdkTurn, s as uploadChunked } from "./chunked-upload-wSXiVX7I.js";
14
14
  import { n as fetchWithKeepAlive, t as emitTiming } from "./keep-alive-fetch-sGVP8skk.js";
15
15
  import { t as SIDECAR_PROXY_ERROR_HEADER } from "./sidecar-proxy-error-DTdbCbUM.js";
16
16
  import { t as parseSSEStream } from "./sse-parser-BCG3iL9j.js";
17
17
  import { t as runPreparedProcess } from "./prepared-process-DQ_68Ofg.js";
18
18
  import { a as isBackendType, r as cliAuthReferenceSchema } from "./cli-auth-bundle-B4SGUcYM-B5SuPHb_.js";
19
19
  import "./cli-auth-bundle-vWBeEFSk.js";
20
- import { n as SandboxLines } from "./lines-lpmGFgOZ.js";
21
- import { t as downloadFile } from "./file-download-DMk59Y2d.js";
20
+ import { n as SandboxLines } from "./lines-vZDk8YYb.js";
21
+ import { t as downloadFile } from "./file-download-CdYQq4-A.js";
22
22
  import { z } from "zod";
23
23
  import { createHash } from "node:crypto";
24
24
  import { constants } from "node:fs";
@@ -5226,7 +5226,7 @@ const ERROR_CATALOG = {
5226
5226
  PLACEMENT_WARMING: "503 retry | The cell's controller has just started and has not heard a host yet. | Retry after the Retry-After interval.",
5227
5227
  HOST_UNAVAILABLE: "503 retry | The host did not answer; the sandbox and its files remain. | Retry after the Retry-After interval.",
5228
5228
  HOST_PRESSURE: "503 retry | The host was too busy to create the sandbox and created nothing. | Retry after the Retry-After interval.",
5229
- HOST_AGENT_RESTARTING: "503 retry | The sandbox's host agent is inside a planned restart; the sandbox and its files remain. | Retry after the Retry-After interval.",
5229
+ HOST_AGENT_RESTARTING: "503 retry | The sandbox's host agent is inside a planned restart and this request reached nothing; the sandbox and its files remain. | Resend it, whatever its method, after the Retry-After interval until the body's retryUntil.",
5230
5230
  IN_BOX_DOCKER_UNAVAILABLE: "503 retry | Docker inside the sandbox is not available. | Retry, or create the sandbox with in-box Docker enabled.",
5231
5231
  NO_IP: "503 retry | The sandbox has no network address yet. | Retry after the Retry-After interval.",
5232
5232
  ROUTE_LOOKUP_FAILED: "503 retry | The host could not look up the sandbox route. | Retry after the Retry-After interval.",
@@ -11937,7 +11937,7 @@ var SandboxInteractiveCapabilities = class extends SandboxPromptCapabilities {
11937
11937
  var SandboxSessionEvidenceCapabilities = class extends SandboxInteractiveCapabilities {
11938
11938
  /** @internal — invoked before the sandbox is deleted. */
11939
11939
  async _sessionExportRawEvidence(id, destination, options) {
11940
- const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-C1-BRfUA.js");
11940
+ const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-DM5sTcFG.js");
11941
11941
  await this.ensureRunning();
11942
11942
  await this.refresh();
11943
11943
  return exportRawEvidenceDirectory((signal, archiveId, cancel) => this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}/raw-evidence/archive?${new URLSearchParams([
@@ -11968,7 +11968,7 @@ var SandboxSessionEvidenceCapabilities = class extends SandboxInteractiveCapabil
11968
11968
  * and the byte and file bounds are verified before the directory appears.
11969
11969
  */
11970
11970
  async exportRawEvidence(destination, options) {
11971
- const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-C1-BRfUA.js");
11971
+ const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-DM5sTcFG.js");
11972
11972
  await this.ensureRunning();
11973
11973
  await this.refresh();
11974
11974
  return exportRawEvidenceDirectory((signal, archiveId, cancel) => this.runtimeFetch(`/agents/raw-evidence/archive?${new URLSearchParams({
@@ -13777,144 +13777,6 @@ var SandboxEgressCapabilities = class extends SandboxTraceCapabilities {
13777
13777
  }
13778
13778
  };
13779
13779
  //#endregion
13780
- //#region ../../../packages/runtime-contracts/dist/gpu-lease.js
13781
- const GPU_LEASE_PROVIDER_NAMES = [
13782
- "runpod",
13783
- "vast-ai",
13784
- "lambda-labs",
13785
- "modal"
13786
- ];
13787
- const gpuLeaseProviderSchema = z.string().trim().toLowerCase().min(1).max(64).regex(/^[a-z][a-z0-9-]*$/);
13788
- const gpuAcceleratorKindSchema = z.string().trim().toLowerCase().min(1).max(128).regex(/^[a-z0-9][a-z0-9._-]*$/);
13789
- const gpuAcceleratorSchema = z.object({
13790
- kind: gpuAcceleratorKindSchema,
13791
- count: z.number().int().positive().default(1),
13792
- vramGb: z.number().positive().optional()
13793
- }).strict();
13794
- const gpuLeaseCommandSchema = z.object({
13795
- command: z.string().min(1).max(8192),
13796
- timeoutMs: z.number().int().positive().max(2147453647).optional(),
13797
- env: z.record(z.string(), z.string()).optional(),
13798
- cwd: z.string().min(1).max(2048).optional()
13799
- }).strict();
13800
- z.object({
13801
- refresh: z.enum(["true", "false"]).optional(),
13802
- acceleratorKind: gpuAcceleratorKindSchema.optional(),
13803
- acceleratorCount: z.coerce.number().pipe(gpuAcceleratorSchema.shape.count.unwrap()).optional(),
13804
- acceleratorVramGb: z.coerce.number().positive().optional()
13805
- }).strict();
13806
- z.object({
13807
- maxSpendUsd: z.number().positive().max(1e4).optional(),
13808
- maxLifetimeSeconds: z.number().int().positive().max(1440 * 60).optional()
13809
- }).strict().refine((value) => value.maxSpendUsd !== void 0 || value.maxLifetimeSeconds !== void 0, "Renewal requires a lifetime or spend cap");
13810
- const gpuLeaseOptionsSchema = z.object({
13811
- provider: gpuLeaseProviderSchema.optional(),
13812
- image: z.string().min(1).max(512).optional(),
13813
- env: z.record(z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/), z.string()).optional(),
13814
- diskGb: z.number().int().positive().optional(),
13815
- volumeGb: z.number().int().nonnegative().optional(),
13816
- volumeMountPath: z.string().startsWith("/").max(2048).optional(),
13817
- region: z.string().min(1).max(128).optional(),
13818
- manifest: z.record(z.string(), z.unknown()).optional(),
13819
- command: z.array(z.string().max(8192)).min(1).max(256).optional(),
13820
- ports: z.array(z.number().int().min(1).max(65535)).max(32).optional(),
13821
- endpoint: z.object({
13822
- port: z.number().int().min(1).max(65535),
13823
- healthPath: z.string().regex(/^\/(?![/\\])/).refine((path) => ![
13824
- "\r",
13825
- "\n",
13826
- " "
13827
- ].some((char) => path.includes(char))).max(2048).optional()
13828
- }).strict().optional(),
13829
- allowSpot: z.boolean().optional(),
13830
- maxHourlyUsd: z.number().positive().optional(),
13831
- weights: z.object({
13832
- manifestSha: z.string().regex(/^[a-f0-9]{64}$/),
13833
- sizeBytes: z.number().int().positive().safe()
13834
- }).strict().optional(),
13835
- arms: z.array(z.unknown()).min(1).max(256).optional(),
13836
- maxSpendUsd: z.number().positive().max(1e4),
13837
- maxLifetimeSeconds: z.number().int().positive().max(1440 * 60),
13838
- idleTimeoutSeconds: z.number().int().positive().optional()
13839
- }).strict();
13840
- const gpuLeaseAttachSchema = gpuLeaseOptionsSchema.extend({ accelerator: gpuAcceleratorSchema });
13841
- const acceleratorSchema = gpuAcceleratorSchema;
13842
- const providerSchema = gpuLeaseProviderSchema;
13843
- z.object({
13844
- ...gpuLeaseOptionsSchema.omit({ env: true }).shape,
13845
- id: z.string(),
13846
- projectRef: z.string(),
13847
- ownerUserId: z.string(),
13848
- productId: z.string().optional(),
13849
- provider: providerSchema,
13850
- providerLeaseId: z.string().optional(),
13851
- providerInstanceType: z.string().optional(),
13852
- workerUrl: z.string().optional(),
13853
- endpointUrl: z.string().optional(),
13854
- status: z.enum([
13855
- "provisioning",
13856
- "ready",
13857
- "detaching",
13858
- "destroyed",
13859
- "failed"
13860
- ]),
13861
- accelerator: acceleratorSchema,
13862
- providerCostPerHourUsd: z.number().optional(),
13863
- customerPricePerHourUsd: z.number().optional(),
13864
- estimatedProviderCostUsd: z.number().optional(),
13865
- estimatedCustomerCostUsd: z.number().optional(),
13866
- providerSelection: z.object({
13867
- strategy: z.enum([
13868
- "explicit",
13869
- "cheapest",
13870
- "ranked"
13871
- ]),
13872
- selectedProvider: providerSchema,
13873
- requestedProvider: providerSchema.optional(),
13874
- candidates: z.array(z.object({
13875
- provider: providerSchema,
13876
- accelerator: acceleratorSchema,
13877
- providerInstanceType: z.string().optional(),
13878
- region: z.string().optional(),
13879
- pricingSource: z.enum(["live", "configured"]).optional(),
13880
- providerCostPerHourUsd: z.number(),
13881
- customerPricePerHourUsd: z.number(),
13882
- maxLifetimeSeconds: z.number(),
13883
- estimatedProviderCostUsd: z.number(),
13884
- estimatedCustomerCostUsd: z.number()
13885
- })),
13886
- rejected: z.array(z.object({
13887
- provider: providerSchema,
13888
- error: z.string()
13889
- }))
13890
- }).optional(),
13891
- createdAt: z.string(),
13892
- updatedAt: z.string(),
13893
- readyAt: z.string().optional(),
13894
- startedAt: z.string().optional(),
13895
- lastUsedAt: z.string().optional(),
13896
- destroyedAt: z.string().optional(),
13897
- failure: z.string().optional(),
13898
- billing: z.object({
13899
- seconds: z.number(),
13900
- providerCostUsd: z.number(),
13901
- customerCostUsd: z.number(),
13902
- providerCostPerHourUsd: z.number(),
13903
- customerPricePerHourUsd: z.number(),
13904
- startedAt: z.string(),
13905
- stoppedAt: z.string()
13906
- }).optional()
13907
- });
13908
- //#endregion
13909
- //#region ../../../packages/runtime-contracts/dist/runtime-backend.js
13910
- /**
13911
- * The runtime a sandbox runs on, which a create names as `runtime`: a Docker
13912
- * container on the host kernel, or a Firecracker microVM with its own kernel.
13913
- * It is also what a provisioned host runs and the autoscaler buys.
13914
- */
13915
- const SANDBOX_RUNTIMES = ["docker", "firecracker"];
13916
- [...SANDBOX_RUNTIMES];
13917
- //#endregion
13918
13780
  //#region ../../../packages/runtime-contracts/dist/egress-activity.js
13919
13781
  /**
13920
13782
  * The egress activity record a sandbox's proxy log is read into, shared by the
@@ -14191,7 +14053,7 @@ var SandboxFilesystemOperations = class extends DeclaredFilesystemOperations {
14191
14053
  totalBytes: size,
14192
14054
  percentage: 0
14193
14055
  });
14194
- const { uploadChunkedFromFile } = await import("./chunked-upload-file-C4IP7e-e.js");
14056
+ const { uploadChunkedFromFile } = await import("./chunked-upload-file-CWBAcU-r.js");
14195
14057
  await uploadChunkedFromFile({ fetch: (path, init) => this.host.runtimeFetch(path, init) }, remotePath, localPath, {
14196
14058
  mode: options?.permissions,
14197
14059
  onProgress: options?.onProgress ? (progress) => {
@@ -15093,4 +14955,4 @@ var SandboxInstance = class SandboxInstance extends SandboxEgressCapabilities {
15093
14955
  }
15094
14956
  };
15095
14957
  //#endregion
15096
- export { createRetryDelayMs as $, splitInlineProfileSkills as A, normalizeSandboxCreateReceipt as B, collectAgentResponseText as C, ManagedProcessClient as D, deleteSandbox as E, isMaterializerHarness as F, normalizeConnection as G, readFilesystemIncarnationTuple as H, materializeProfile as I, normalizeSandboxShape as J, normalizeEgressPolicyFields as K, SandboxOperation as L, HARNESS_LAUNCH_MATERIALIZE_OPTIONS as M, ProfileUnsupportedError as N, materializeProfileFileMounts as O, enforceWorkspacePlanSupport as P, awaitCreateResend as Q, SandboxOperationFailedError as R, collectAgentFinalMessageText as S, isToolBearingEvent as T, dateOf as U, normalizeStartupDiagnostics as V, parseLifecycleTimes as W, CAPACITY_ETA_WAIT_MAX_MS as X, CAPACITY_ETA_MARGIN_MS as Y, DEPLOY_WINDOW_RETRY_MS as Z, InteractiveSessionHandle as _, SANDBOX_RUNTIMES as a, isRetryableCreateError as at, createInteractiveTerminalSession as b, gpuLeaseAttachSchema as c, exportTraceBundle as d, extendableDeadline as et, otelTraceIdForTangleTrace as f, sandboxLedgerUsd as g, SandboxSession as h, MAX_EGRESS_DENIALS_LIMIT as i, isRateLimitCreateError as it, validateDeferredProfileFileMounts as j, splitInlineProfileFileMounts as k, gpuLeaseCommandSchema as l, SandboxTaskSession as m, createSandboxInstanceFromResponse as n, isCapacityShortageCreateError as nt, GPU_LEASE_PROVIDER_NAMES as o, toOtelJson as p, normalizeProxySecretReceipt as q, WorkspaceImages as r, isDeployWindowCreateError as rt, gpuAcceleratorSchema as s, SandboxInstance as t, generateIdempotencyKey as tt, buildTraceExportPayload as u, InteractiveTerminalFrameLog as v, getSandboxEventText as w, applySandboxEventText as x, createInteractiveTerminalCapture as y, normalizeCaptureProof as z };
14958
+ export { isRateLimitCreateError as $, isMaterializerHarness as A, normalizeConnection as B, materializeProfileFileMounts as C, HARNESS_LAUNCH_MATERIALIZE_OPTIONS as D, validateDeferredProfileFileMounts as E, normalizeSandboxCreateReceipt as F, CAPACITY_ETA_WAIT_MAX_MS as G, normalizeProxySecretReceipt as H, normalizeStartupDiagnostics as I, createRetryDelayMs as J, DEPLOY_WINDOW_RETRY_MS as K, readFilesystemIncarnationTuple as L, SandboxOperation as M, SandboxOperationFailedError as N, ProfileUnsupportedError as O, normalizeCaptureProof as P, isDeployWindowCreateError as Q, dateOf as R, ManagedProcessClient as S, splitInlineProfileSkills as T, normalizeSandboxShape as U, normalizeEgressPolicyFields as V, CAPACITY_ETA_MARGIN_MS as W, generateIdempotencyKey as X, extendableDeadline as Y, isCapacityShortageCreateError as Z, collectAgentFinalMessageText as _, buildTraceExportPayload as a, isToolBearingEvent as b, toOtelJson as c, sandboxLedgerUsd as d, isRetryableCreateError as et, InteractiveSessionHandle as f, applySandboxEventText as g, createInteractiveTerminalSession as h, MAX_EGRESS_DENIALS_LIMIT as i, materializeProfile as j, enforceWorkspacePlanSupport as k, SandboxTaskSession as l, createInteractiveTerminalCapture as m, createSandboxInstanceFromResponse as n, exportTraceBundle as o, InteractiveTerminalFrameLog as p, awaitCreateResend as q, WorkspaceImages as r, otelTraceIdForTangleTrace as s, SandboxInstance as t, SandboxSession as u, collectAgentResponseText as v, splitInlineProfileFileMounts as w, deleteSandbox as x, getSandboxEventText as y, parseLifecycleTimes as z };
@@ -1,6 +1,6 @@
1
1
  import { r as agentProfileSchema } from "./profile-schema-C_MbI9mE.js";
2
2
  import { t as canonicalAgentProfileDigest } from "./agent-execution-preparation-CatenlMs.js";
3
- import { C as SandboxError, O as ValidationError, u as CapabilityError } from "./errors-CHMFBW4p.js";
3
+ import { C as SandboxError, O as ValidationError, u as CapabilityError } from "./errors-vuyhjefs.js";
4
4
  import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-BsriwJ8L.js";
5
5
  import { r as cliAuthReferenceSchema } from "./cli-auth-bundle-B4SGUcYM-B5SuPHb_.js";
6
6
  import "./cli-auth-bundle-vWBeEFSk.js";
@@ -1,5 +1,5 @@
1
- import { R as SandboxError } from "./terminal-stream-types-PYRsYyUN.js";
2
- import { _t as SeatOwnerTransport, bt as SeatSelectionRequest, ft as SEAT_COMMAND_TIMEOUT_MS } from "./client-Cv3Uslvn.js";
1
+ import { R as SandboxError } from "./terminal-stream-types-CygV-MYy.js";
2
+ import { _t as SeatOwnerTransport, bt as SeatSelectionRequest, ft as SEAT_COMMAND_TIMEOUT_MS } from "./client-H_cy-nPd.js";
3
3
 
4
4
  //#region src/select-seat-command.d.ts
5
5
  /** Public reply bound; the owner prints one metadata object. */