@tangle-network/sandbox 1.0.328 → 1.0.330

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 (51) hide show
  1. package/dist/agent/index.d.ts +4 -4
  2. package/dist/agent/index.js +5 -5
  3. package/dist/agent/preview.d.ts +1 -1
  4. package/dist/agent/preview.js +1 -1
  5. package/dist/{agent-run-outcome-qMD5AsOn.d.ts → agent-run-outcome-Cybd-m28.d.ts} +1 -1
  6. package/dist/{api-request-DJowwdYM.js → api-request-bikIuoUt.js} +2 -2
  7. package/dist/{browser-interactive-control-controller-DfMKWRi2.js → browser-interactive-control-controller-Di6IqrVJ.js} +1 -1
  8. package/dist/{browser-interactive-control-controller-BCk4F3KE.d.ts → browser-interactive-control-controller-o_LzX2TC.d.ts} +1 -1
  9. package/dist/{chunked-upload-ChZB-dYE.js → chunked-upload-PC8BNzoP.js} +1 -1
  10. package/dist/{chunked-upload-file-BGaOS3iK.js → chunked-upload-file-C4IP7e-e.js} +1 -1
  11. package/dist/{client-DQZP6WU9.d.ts → client-Cv3Uslvn.d.ts} +5 -5
  12. package/dist/{client-Vochu6QF.js → client-FypuRYpv.js} +5 -5
  13. package/dist/collaboration/index.js +1 -1
  14. package/dist/{collaboration-CDRXKm1C.js → collaboration-CYFthUkf.js} +2 -2
  15. package/dist/core.d.ts +6 -6
  16. package/dist/core.js +5 -5
  17. package/dist/{error-catalog-GS97N-Cm.js → error-catalog-DPxKJnpi.js} +1 -0
  18. package/dist/{errors-D44qyFpy.js → errors-CHMFBW4p.js} +1 -1
  19. package/dist/{file-download-BO-Hmn3x.js → file-download-DMk59Y2d.js} +1 -1
  20. package/dist/gpu-lease/index.js +1 -1
  21. package/dist/{index-CBhRTzYs.d.ts → index-CuUyy_-_.d.ts} +5 -5
  22. package/dist/index.d.ts +9 -9
  23. package/dist/index.js +11 -149
  24. package/dist/intelligence/index.js +3 -3
  25. package/dist/interactive-control.d.ts +1 -1
  26. package/dist/interactive-control.js +1 -1
  27. package/dist/{interactive-controller-p8hogRIV.d.ts → interactive-controller-Bvi5m77Z.d.ts} +3 -3
  28. package/dist/{interactive-controller-Bgl0vQtg.js → interactive-controller-wIlfEoBC.js} +4 -4
  29. package/dist/{lines-DA3pwKuT.d.ts → lines-BVWdK4Gb.d.ts} +1 -1
  30. package/dist/{lines-DwJ7AKx7.js → lines-lpmGFgOZ.js} +1 -1
  31. package/dist/lines.d.ts +1 -1
  32. package/dist/lines.js +1 -1
  33. package/dist/{mcp-local-Dn69MpOz.js → mcp-local-D19y7AyU.js} +2 -2
  34. package/dist/{preview-DQ6lBsP-.d.ts → preview-Bwfuk4YU.d.ts} +3 -3
  35. package/dist/{public-templates-Ba5iV17u.d.ts → public-templates-zphoMOzL.d.ts} +2 -2
  36. package/dist/public-templates.d.ts +1 -1
  37. package/dist/public-templates.js +1 -1
  38. package/dist/{raw-evidence-archive-BJ1cA-sP.js → raw-evidence-archive-C1-BRfUA.js} +1 -1
  39. package/dist/runtime.d.ts +5 -5
  40. package/dist/runtime.js +5 -5
  41. package/dist/{sandbox-BPFFVdv6.js → sandbox-DNw2sZci.js} +150 -11
  42. package/dist/{select-seat-V4GysL74.js → select-seat-CFbaliNa.js} +1 -1
  43. package/dist/select-seat-command.d.ts +2 -2
  44. package/dist/select-seat-command.js +2 -2
  45. package/dist/session-gateway/index.js +1 -1
  46. package/dist/tangle/index.d.ts +1 -1
  47. package/dist/tangle/index.js +1 -1
  48. package/dist/{tangle-D4zmQiy9.js → tangle-CU65Gr2F.js} +3 -3
  49. package/dist/{terminal-stream-types-BMGTVpuf.d.ts → terminal-stream-types-PYRsYyUN.d.ts} +1 -0
  50. package/dist/{types-DMTiHZW_.d.ts → types-59X83OFN.d.ts} +1 -1
  51. 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-Bgl0vQtg.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-wIlfEoBC.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-DfMKWRi2.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-BPFFVdv6.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-Vochu6QF.js";
7
- import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-DJowwdYM.js";
8
- import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-CDRXKm1C.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-Di6IqrVJ.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-DNw2sZci.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-FypuRYpv.js";
7
+ import { i as fetchSandboxApi, n as SDK_TIMEOUTS } from "./api-request-bikIuoUt.js";
8
+ import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "./collaboration-CYFthUkf.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-DwJ7AKx7.js";
12
- import { t as downloadFile } from "./file-download-BO-Hmn3x.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";
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-V4GysL74.js";
16
- import { s as BlueprintSandboxClient } from "./tangle-D4zmQiy9.js";
15
+ import { a as createSelectSeat, i as SeatSelectionError, o as gatewaySeatTransport } from "./select-seat-CFbaliNa.js";
16
+ import { s as BlueprintSandboxClient } from "./tangle-CU65Gr2F.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,144 +318,6 @@ 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
459
321
  //#region src/image.ts
460
322
  function isFetchClient(client) {
461
323
  return typeof client.fetch === "function";
@@ -1,6 +1,6 @@
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-DJowwdYM.js";
3
- import { n as verifyDownload } from "../file-download-BO-Hmn3x.js";
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-bikIuoUt.js";
3
+ import { n as verifyDownload } from "../file-download-DMk59Y2d.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-BCk4F3KE.js";
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";
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-DfMKWRi2.js";
1
+ import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError, t as BrowserInteractiveSessionControlController } from "./browser-interactive-control-controller-Di6IqrVJ.js";
2
2
  export { BrowserInteractiveSessionControlController, InteractiveSessionNotRunningError, browserInteractiveControlHolderId };
@@ -1,7 +1,7 @@
1
- import { o as TerminalStreamReconnectAuthority, u as ScopedToken } from "./terminal-stream-types-BMGTVpuf.js";
1
+ import { o as TerminalStreamReconnectAuthority, u as ScopedToken } from "./terminal-stream-types-PYRsYyUN.js";
2
2
  import { u as AgentInteractiveSessionRef } from "./index-Dxxq7J79.js";
3
- import { en as TerminalStream } from "./types-DMTiHZW_.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-BCk4F3KE.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";
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-DfMKWRi2.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";
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-Di6IqrVJ.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";
5
5
  import { n as combineAbortSignals, t as awaitWithAbort } from "./abort-signal-BsriwJ8L.js";
6
- import { n as SDK_TIMEOUTS } from "./api-request-DJowwdYM.js";
7
- import { c as awaitSdkResend, s as uploadChunked } from "./chunked-upload-ChZB-dYE.js";
6
+ import { n as SDK_TIMEOUTS } from "./api-request-bikIuoUt.js";
7
+ import { c as awaitSdkResend, s as uploadChunked } from "./chunked-upload-PC8BNzoP.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-DMTiHZW_.js";
1
+ import { nn as CreateSandboxOptions, pa as BackendConfig } from "./types-59X83OFN.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-D44qyFpy.js";
1
+ import { O as ValidationError, r as parseErrorResponse } from "./errors-CHMFBW4p.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-DA3pwKuT.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-BVWdK4Gb.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-DwJ7AKx7.js";
1
+ import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-lpmGFgOZ.js";
2
2
  export { LinesClient, SandboxLines, lineInstanceKey, profileChannelReference };
@@ -1,4 +1,4 @@
1
- import "./api-request-DJowwdYM.js";
1
+ import "./api-request-bikIuoUt.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.328"
399
+ version: options.version ?? "1.0.330"
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-CBhRTzYs.js";
2
- import { f as EnsureDevServerOptions, y as PreviewLinkInfo } from "./types-DMTiHZW_.js";
3
- import { t as Sandbox } from "./client-DQZP6WU9.js";
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";
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-BMGTVpuf.js";
2
- import { Jn as PublicTemplateInfo, Xn as PublishPublicTemplateOptions, Yn as PublicTemplateVersionInfo, Zn as PublishPublicTemplateVersionOptions, br as HttpClient } from "./types-DMTiHZW_.js";
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";
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-Ba5iV17u.js";
1
+ import { a as PublicTemplatesClient, i as PublicTemplatePublishRequestOptions, n as PublicTemplatePublishError, r as PublicTemplatePublishJob, t as PublicTemplatePublishArtifact } from "./public-templates-zphoMOzL.js";
2
2
  export { PublicTemplatePublishArtifact, PublicTemplatePublishError, PublicTemplatePublishJob, PublicTemplatePublishRequestOptions, PublicTemplatesClient };
@@ -1,4 +1,4 @@
1
- import { C as SandboxError, a as readResponseJson } from "./errors-D44qyFpy.js";
1
+ import { C as SandboxError, a as readResponseJson } from "./errors-CHMFBW4p.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-BO-Hmn3x.js";
1
+ import { n as verifyDownload } from "./file-download-DMk59Y2d.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-BMGTVpuf.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-DMTiHZW_.js";
3
- import { c as InteractiveSessionIdentity, l as InteractiveSessionNotRunningError, r as browserInteractiveControlHolderId } from "./browser-interactive-control-controller-BCk4F3KE.js";
4
- import { t as BrowserInteractiveSessionController } from "./interactive-controller-p8hogRIV.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-qMD5AsOn.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-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";
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-Bgl0vQtg.js";
2
- import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-DfMKWRi2.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-DJowwdYM.js";
5
- import { s as uploadChunked } from "./chunked-upload-ChZB-dYE.js";
1
+ import { F as createAgentRunOutcomeTracker, I as deriveAgentResultOutcome, L as deriveAgentRunOutcome, R as projectAgentTerminalRecord, c as SandboxRuntimeApi, t as BrowserInteractiveSessionController } from "./interactive-controller-wIlfEoBC.js";
2
+ import { n as browserInteractiveControlHolderId, s as InteractiveSessionNotRunningError } from "./browser-interactive-control-controller-Di6IqrVJ.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-bikIuoUt.js";
5
+ import { s as uploadChunked } from "./chunked-upload-PC8BNzoP.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-Bgl0vQtg.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-wIlfEoBC.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-DfMKWRi2.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-Di6IqrVJ.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-D44qyFpy.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";
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-DJowwdYM.js";
11
+ import { a as isReplayableBody, i as fetchSandboxApi, n as SDK_TIMEOUTS, o as rewrapResponse, t as IDEMPOTENT_METHODS } from "./api-request-bikIuoUt.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-ChZB-dYE.js";
13
+ import { c as awaitSdkResend, l as takeSdkTurn, s as uploadChunked } from "./chunked-upload-PC8BNzoP.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-DwJ7AKx7.js";
21
- import { t as downloadFile } from "./file-download-BO-Hmn3x.js";
20
+ import { n as SandboxLines } from "./lines-lpmGFgOZ.js";
21
+ import { t as downloadFile } from "./file-download-DMk59Y2d.js";
22
22
  import { z } from "zod";
23
23
  import { createHash } from "node:crypto";
24
24
  import { constants } from "node:fs";
@@ -5196,6 +5196,7 @@ const ERROR_CATALOG = {
5196
5196
  NOT_MANAGED: "404 final | This host does not manage the named container. | Check the sandbox id; the platform resolves its host again on retry.",
5197
5197
  SNAPSHOT_NOT_FOUND: "404 final | The snapshot does not exist or this account cannot see it. | List the sandbox snapshots and use an id from that list.",
5198
5198
  BRANCH_PARENT_NOT_RUNNING: "409 final | The branch parent is not running. | Resume the parent sandbox, then branch again.",
5199
+ BRANCH_NOT_MATERIALIZED: "409 final | The branch parent was removed before any child materialized. | Branch a live sandbox with a new idempotency key.",
5199
5200
  CONTAINER_RESERVATION_CONFLICT: "409 retry | Another lifecycle operation holds this sandbox. | Wait for that operation to finish, then retry.",
5200
5201
  CONTAINER_NETWORK_MISSING: "409 final | The stopped sandbox lost its network, so it cannot start in place; its files remain. | Resume the sandbox so the platform recreates it.",
5201
5202
  EGRESS_DISABLED: "409 final | Egress is not enabled on this host. | Place the sandbox on a host with egress enabled.",
@@ -11935,7 +11936,7 @@ var SandboxInteractiveCapabilities = class extends SandboxPromptCapabilities {
11935
11936
  var SandboxSessionEvidenceCapabilities = class extends SandboxInteractiveCapabilities {
11936
11937
  /** @internal — invoked before the sandbox is deleted. */
11937
11938
  async _sessionExportRawEvidence(id, destination, options) {
11938
- const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-BJ1cA-sP.js");
11939
+ const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-C1-BRfUA.js");
11939
11940
  await this.ensureRunning();
11940
11941
  await this.refresh();
11941
11942
  return exportRawEvidenceDirectory((signal, archiveId, cancel) => this.runtimeFetch(`/agents/sessions/${encodeURIComponent(id)}/raw-evidence/archive?${new URLSearchParams([
@@ -11966,7 +11967,7 @@ var SandboxSessionEvidenceCapabilities = class extends SandboxInteractiveCapabil
11966
11967
  * and the byte and file bounds are verified before the directory appears.
11967
11968
  */
11968
11969
  async exportRawEvidence(destination, options) {
11969
- const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-BJ1cA-sP.js");
11970
+ const { exportRawEvidenceDirectory } = await import("./raw-evidence-archive-C1-BRfUA.js");
11970
11971
  await this.ensureRunning();
11971
11972
  await this.refresh();
11972
11973
  return exportRawEvidenceDirectory((signal, archiveId, cancel) => this.runtimeFetch(`/agents/raw-evidence/archive?${new URLSearchParams({
@@ -13775,6 +13776,144 @@ var SandboxEgressCapabilities = class extends SandboxTraceCapabilities {
13775
13776
  }
13776
13777
  };
13777
13778
  //#endregion
13779
+ //#region ../../../packages/runtime-contracts/dist/gpu-lease.js
13780
+ const GPU_LEASE_PROVIDER_NAMES = [
13781
+ "runpod",
13782
+ "vast-ai",
13783
+ "lambda-labs",
13784
+ "modal"
13785
+ ];
13786
+ const gpuLeaseProviderSchema = z.string().trim().toLowerCase().min(1).max(64).regex(/^[a-z][a-z0-9-]*$/);
13787
+ const gpuAcceleratorKindSchema = z.string().trim().toLowerCase().min(1).max(128).regex(/^[a-z0-9][a-z0-9._-]*$/);
13788
+ const gpuAcceleratorSchema = z.object({
13789
+ kind: gpuAcceleratorKindSchema,
13790
+ count: z.number().int().positive().default(1),
13791
+ vramGb: z.number().positive().optional()
13792
+ }).strict();
13793
+ const gpuLeaseCommandSchema = z.object({
13794
+ command: z.string().min(1).max(8192),
13795
+ timeoutMs: z.number().int().positive().max(2147453647).optional(),
13796
+ env: z.record(z.string(), z.string()).optional(),
13797
+ cwd: z.string().min(1).max(2048).optional()
13798
+ }).strict();
13799
+ z.object({
13800
+ refresh: z.enum(["true", "false"]).optional(),
13801
+ acceleratorKind: gpuAcceleratorKindSchema.optional(),
13802
+ acceleratorCount: z.coerce.number().pipe(gpuAcceleratorSchema.shape.count.unwrap()).optional(),
13803
+ acceleratorVramGb: z.coerce.number().positive().optional()
13804
+ }).strict();
13805
+ z.object({
13806
+ maxSpendUsd: z.number().positive().max(1e4).optional(),
13807
+ maxLifetimeSeconds: z.number().int().positive().max(1440 * 60).optional()
13808
+ }).strict().refine((value) => value.maxSpendUsd !== void 0 || value.maxLifetimeSeconds !== void 0, "Renewal requires a lifetime or spend cap");
13809
+ const gpuLeaseOptionsSchema = z.object({
13810
+ provider: gpuLeaseProviderSchema.optional(),
13811
+ image: z.string().min(1).max(512).optional(),
13812
+ env: z.record(z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/), z.string()).optional(),
13813
+ diskGb: z.number().int().positive().optional(),
13814
+ volumeGb: z.number().int().nonnegative().optional(),
13815
+ volumeMountPath: z.string().startsWith("/").max(2048).optional(),
13816
+ region: z.string().min(1).max(128).optional(),
13817
+ manifest: z.record(z.string(), z.unknown()).optional(),
13818
+ command: z.array(z.string().max(8192)).min(1).max(256).optional(),
13819
+ ports: z.array(z.number().int().min(1).max(65535)).max(32).optional(),
13820
+ endpoint: z.object({
13821
+ port: z.number().int().min(1).max(65535),
13822
+ healthPath: z.string().regex(/^\/(?![/\\])/).refine((path) => ![
13823
+ "\r",
13824
+ "\n",
13825
+ " "
13826
+ ].some((char) => path.includes(char))).max(2048).optional()
13827
+ }).strict().optional(),
13828
+ allowSpot: z.boolean().optional(),
13829
+ maxHourlyUsd: z.number().positive().optional(),
13830
+ weights: z.object({
13831
+ manifestSha: z.string().regex(/^[a-f0-9]{64}$/),
13832
+ sizeBytes: z.number().int().positive().safe()
13833
+ }).strict().optional(),
13834
+ arms: z.array(z.unknown()).min(1).max(256).optional(),
13835
+ maxSpendUsd: z.number().positive().max(1e4),
13836
+ maxLifetimeSeconds: z.number().int().positive().max(1440 * 60),
13837
+ idleTimeoutSeconds: z.number().int().positive().optional()
13838
+ }).strict();
13839
+ const gpuLeaseAttachSchema = gpuLeaseOptionsSchema.extend({ accelerator: gpuAcceleratorSchema });
13840
+ const acceleratorSchema = gpuAcceleratorSchema;
13841
+ const providerSchema = gpuLeaseProviderSchema;
13842
+ z.object({
13843
+ ...gpuLeaseOptionsSchema.omit({ env: true }).shape,
13844
+ id: z.string(),
13845
+ projectRef: z.string(),
13846
+ ownerUserId: z.string(),
13847
+ productId: z.string().optional(),
13848
+ provider: providerSchema,
13849
+ providerLeaseId: z.string().optional(),
13850
+ providerInstanceType: z.string().optional(),
13851
+ workerUrl: z.string().optional(),
13852
+ endpointUrl: z.string().optional(),
13853
+ status: z.enum([
13854
+ "provisioning",
13855
+ "ready",
13856
+ "detaching",
13857
+ "destroyed",
13858
+ "failed"
13859
+ ]),
13860
+ accelerator: acceleratorSchema,
13861
+ providerCostPerHourUsd: z.number().optional(),
13862
+ customerPricePerHourUsd: z.number().optional(),
13863
+ estimatedProviderCostUsd: z.number().optional(),
13864
+ estimatedCustomerCostUsd: z.number().optional(),
13865
+ providerSelection: z.object({
13866
+ strategy: z.enum([
13867
+ "explicit",
13868
+ "cheapest",
13869
+ "ranked"
13870
+ ]),
13871
+ selectedProvider: providerSchema,
13872
+ requestedProvider: providerSchema.optional(),
13873
+ candidates: z.array(z.object({
13874
+ provider: providerSchema,
13875
+ accelerator: acceleratorSchema,
13876
+ providerInstanceType: z.string().optional(),
13877
+ region: z.string().optional(),
13878
+ pricingSource: z.enum(["live", "configured"]).optional(),
13879
+ providerCostPerHourUsd: z.number(),
13880
+ customerPricePerHourUsd: z.number(),
13881
+ maxLifetimeSeconds: z.number(),
13882
+ estimatedProviderCostUsd: z.number(),
13883
+ estimatedCustomerCostUsd: z.number()
13884
+ })),
13885
+ rejected: z.array(z.object({
13886
+ provider: providerSchema,
13887
+ error: z.string()
13888
+ }))
13889
+ }).optional(),
13890
+ createdAt: z.string(),
13891
+ updatedAt: z.string(),
13892
+ readyAt: z.string().optional(),
13893
+ startedAt: z.string().optional(),
13894
+ lastUsedAt: z.string().optional(),
13895
+ destroyedAt: z.string().optional(),
13896
+ failure: z.string().optional(),
13897
+ billing: z.object({
13898
+ seconds: z.number(),
13899
+ providerCostUsd: z.number(),
13900
+ customerCostUsd: z.number(),
13901
+ providerCostPerHourUsd: z.number(),
13902
+ customerPricePerHourUsd: z.number(),
13903
+ startedAt: z.string(),
13904
+ stoppedAt: z.string()
13905
+ }).optional()
13906
+ });
13907
+ //#endregion
13908
+ //#region ../../../packages/runtime-contracts/dist/runtime-backend.js
13909
+ /**
13910
+ * The runtime a sandbox runs on, which a create names as `runtime`: a Docker
13911
+ * container on the host kernel, or a Firecracker microVM with its own kernel.
13912
+ * It is also what a provisioned host runs and the autoscaler buys.
13913
+ */
13914
+ const SANDBOX_RUNTIMES = ["docker", "firecracker"];
13915
+ [...SANDBOX_RUNTIMES];
13916
+ //#endregion
13778
13917
  //#region ../../../packages/runtime-contracts/dist/egress-activity.js
13779
13918
  /**
13780
13919
  * The egress activity record a sandbox's proxy log is read into, shared by the
@@ -14051,7 +14190,7 @@ var SandboxFilesystemOperations = class extends DeclaredFilesystemOperations {
14051
14190
  totalBytes: size,
14052
14191
  percentage: 0
14053
14192
  });
14054
- const { uploadChunkedFromFile } = await import("./chunked-upload-file-BGaOS3iK.js");
14193
+ const { uploadChunkedFromFile } = await import("./chunked-upload-file-C4IP7e-e.js");
14055
14194
  await uploadChunkedFromFile({ fetch: (path, init) => this.host.runtimeFetch(path, init) }, remotePath, localPath, {
14056
14195
  mode: options?.permissions,
14057
14196
  onProgress: options?.onProgress ? (progress) => {
@@ -14953,4 +15092,4 @@ var SandboxInstance = class SandboxInstance extends SandboxEgressCapabilities {
14953
15092
  }
14954
15093
  };
14955
15094
  //#endregion
14956
- 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 };
15095
+ 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 };
@@ -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-D44qyFpy.js";
3
+ import { C as SandboxError, O as ValidationError, u as CapabilityError } from "./errors-CHMFBW4p.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-BMGTVpuf.js";
2
- import { _t as SeatOwnerTransport, bt as SeatSelectionRequest, ft as SEAT_COMMAND_TIMEOUT_MS } from "./client-DQZP6WU9.js";
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";
3
3
 
4
4
  //#region src/select-seat-command.d.ts
5
5
  /** Public reply bound; the owner prints one metadata object. */