@tangle-network/sandbox 0.60.69 → 0.60.74

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 (46) hide show
  1. package/dist/agent/index.d.ts +4 -4
  2. package/dist/agent/index.js +4 -4
  3. package/dist/agent/preview.d.ts +1 -1
  4. package/dist/{agent-run-outcome-BBk2-5vp.d.ts → agent-run-outcome-eZF8RuUN.d.ts} +1 -1
  5. package/dist/auth/index.d.ts +1 -1
  6. package/dist/auth/index.js +1 -1
  7. package/dist/backend-types-D6bYbvMB.js +42 -0
  8. package/dist/{browser-interactive-control-controller-JUW3gOGH.d.ts → browser-interactive-control-controller-rpTbyvAS.d.ts} +1 -1
  9. package/dist/{chunked-upload-BklCn3Li.js → chunked-upload-CDrLMO8N.js} +1 -1
  10. package/dist/{chunked-upload-file-Cp-iWsWN.js → chunked-upload-file-BwbqHWUX.js} +1 -1
  11. package/dist/{cli-auth-bundle-D61iX68d.js → cli-auth-bundle-cSJjPeFF.js} +2 -2
  12. package/dist/{client-DVouBFPR.d.ts → client-BujziOIc.d.ts} +10 -6
  13. package/dist/{client-DUDqUYDG.js → client-C7Y6waVg.js} +20 -9
  14. package/dist/collaboration/index.d.ts +1 -1
  15. package/dist/collaboration/index.js +1 -1
  16. package/dist/{collaboration-B2g1j2ey.js → collaboration-CTbq2OYh.js} +1 -1
  17. package/dist/core.d.ts +6 -6
  18. package/dist/core.js +3 -3
  19. package/dist/{errors-5j_Hlkm-.d.ts → errors-Bj5DL2ge.d.ts} +61 -2
  20. package/dist/{errors-iWIsey1D.js → errors-C8YcR1BL.js} +31 -1
  21. package/dist/{index-DaJrtipt.d.ts → index-CP9a77KP.d.ts} +2 -2
  22. package/dist/index.d.ts +14 -15
  23. package/dist/index.js +9 -9
  24. package/dist/intelligence/index.js +1 -1
  25. package/dist/interactive-control.d.ts +1 -1
  26. package/dist/{interactive-controller-DaYmUCO_.js → interactive-controller-BFbCkMq4.js} +213 -21
  27. package/dist/{lines-D07bn-mu.d.ts → lines-_rRdwxof.d.ts} +1 -1
  28. package/dist/lines.d.ts +1 -1
  29. package/dist/lines.js +1 -1
  30. package/dist/{local-cli-auth-t8KUbrfI.js → local-cli-auth-CBV7Vjk5.js} +1 -1
  31. package/dist/{managed-process-RMyVq_du.d.ts → managed-process-CPHeQONO.d.ts} +1 -1
  32. package/dist/{preview-dIOd13_U.d.ts → preview-n41aOXde.d.ts} +3 -3
  33. package/dist/runtime.d.ts +5 -6
  34. package/dist/runtime.js +3 -3
  35. package/dist/{sandbox-Dg0WI1ZF.js → sandbox-DGoQMthD.js} +678 -69
  36. package/dist/{sandbox-C7wOeFZB.d.ts → sandbox-DfSqEr3f.d.ts} +70 -17
  37. package/dist/tangle/index.d.ts +1 -1
  38. package/dist/tangle/index.js +1 -1
  39. package/dist/{tangle-CaY9_VGA.js → tangle-vyeLQFFg.js} +2 -2
  40. package/dist/{terminal-stream-CV1pMSKC.d.ts → terminal-stream-jdYomM1m.d.ts} +123 -4
  41. package/dist/{types-BLCY5T4s.d.ts → types-Mi83KD0D.d.ts} +155 -21
  42. package/package.json +5 -5
  43. package/dist/backend-types-C7b_Gpa0.js +0 -59
  44. package/dist/interactive-controller-DNbLzamS.d.ts +0 -40
  45. /package/dist/{index-BgmgfYZZ.d.ts → index-DO7GVpk_.d.ts} +0 -0
  46. /package/dist/{index-DHuHjNie.d.ts → index-DZ27pdB8.d.ts} +0 -0
@@ -1,25 +1,39 @@
1
1
  import { t as CliAuthReference } from "./cli-auth-bundle-ODe06Ts7.js";
2
- import { r as TerminalStreamHandlers, t as TerminalStream } from "./terminal-stream-CV1pMSKC.js";
3
- import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
4
- import { AgentExactRunControlRef, AgentProfile, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileValidationResult, AgentRuntimeAttachments, HarnessType, ReasoningEffort, SandboxSizePreset } from "@tangle-network/agent-interface";
2
+ import { n as TerminalStream, o as TerminalStreamHandlers } from "./terminal-stream-jdYomM1m.js";
5
3
  import { z } from "zod";
4
+ import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
5
+ import { AgentExactRunControlRef, AgentProfile, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileValidationResult, AgentRuntimeAttachments, ReasoningEffort, SandboxSizePreset } from "@tangle-network/agent-interface";
6
6
  //#region ../../../packages/runtime-contracts/dist/backend-types.d.ts
7
7
  /**
8
- * Canonical harnesses this repo ships no provider adapter for.
8
+ * This distribution's backend vocabulary, declared positively. The shared
9
+ * Interface vocabulary also contains historical and differently hosted harnesses;
10
+ * knowing one upstream must not require installing it here or make this module
11
+ * throw at import time. Keep old wire identities readable when retiring execution.
9
12
  *
10
- * `gemini` reaches a workspace only as an openclaw/acp sub-agent CLI and through
11
- * `agent-profile-materialize`; there is no `packages/sdk-provider-gemini`, so naming it as a
12
- * backend must keep failing closed rather than dispatching to a runner that cannot start.
13
- */
14
- declare const NON_BACKEND_HARNESSES: readonly ["gemini"];
15
- /** The runners this repo can actually dispatch: the canonical harness set minus what has no
16
- * adapter here. */
17
- type BackendType = Exclude<HarnessType, (typeof NON_BACKEND_HARNESSES)[number]>;
18
- /**
19
- * Order mirrors `CLI_AGENT_SPECS` — a backend without a spec has no install/launch definition and
20
- * cannot run, so the registry's order is the contract (`packages/cli-agent-registry`), not an
21
- * arbitrary list.
22
- */
13
+ * Gemini is not a direct Sandbox backend; it is available only through a backing
14
+ * transport. Adding it upstream never implicitly makes it dispatchable here.
15
+ * The spec/adapter composition must still prove every backend it actually enables.
16
+ */
17
+ declare const BACKEND_TYPE: {
18
+ readonly OPENCODE: "opencode";
19
+ readonly CLAUDE_CODE: "claude-code";
20
+ readonly KIMI_CODE: "kimi-code";
21
+ readonly CODEX: "codex";
22
+ readonly AMP: "amp";
23
+ readonly FACTORY_DROIDS: "factory-droids";
24
+ readonly PI: "pi";
25
+ readonly PRIME: "prime";
26
+ readonly HERMES: "hermes";
27
+ readonly FORGE: "forge";
28
+ readonly OPENCLAW: "openclaw";
29
+ readonly NANOCLAW: "nanoclaw";
30
+ readonly ACP: "acp";
31
+ readonly CURSOR: "cursor";
32
+ readonly CLI_BASE: "cli-base";
33
+ };
34
+ /** Derived from the local declaration, not the complement of the upstream enum. */
35
+ type BackendType = (typeof BACKEND_TYPE)[keyof typeof BACKEND_TYPE];
36
+ /** Stable declaration order; registry tests check the shipped spec composition. */
23
37
  declare const ALL_BACKEND_TYPES: [BackendType, ...BackendType[]];
24
38
  declare function parseBackendType(value: string): BackendType;
25
39
  //#endregion
@@ -1482,7 +1496,61 @@ interface SandboxCreateReceipt {
1482
1496
  };
1483
1497
  }
1484
1498
  //#endregion
1499
+ //#region src/lib/keep-alive-fetch.d.ts
1500
+ /** Phases of one request, in milliseconds. A phase that did not happen is absent. */
1501
+ interface SdkRequestPhases {
1502
+ /** Name lookup. Absent on a reused socket and for an IP literal. */
1503
+ dnsMs?: number;
1504
+ /** TCP connect. Absent on a reused socket. */
1505
+ connectMs?: number;
1506
+ /** TLS handshake. Absent on a reused socket and on plain HTTP. */
1507
+ tlsMs?: number;
1508
+ /** Request written to response headers: the network round trip plus the server's work. */
1509
+ ttfbMs: number;
1510
+ /** Response headers to the end of the body. */
1511
+ bodyMs?: number;
1512
+ }
1513
+ /**
1514
+ * One timed span the SDK reports through `SandboxConfig.onTiming`.
1515
+ *
1516
+ * - `sdk.ensureRunning`: the status check before a runtime call. `desc` says
1517
+ * why a status read happened (`unobserved`, `not-running`) or `cached` when
1518
+ * none did.
1519
+ * - `sdk.refresh`: one status read. `desc` is the reason it was sent, the same
1520
+ * value the `x-tangle-refresh-reason` header carries.
1521
+ * - `sdk.request`: one HTTP request. `durMs` runs from the call to the end of
1522
+ * the body, or to the response headers when the body is not read here.
1523
+ */
1524
+ interface SdkTimingEntry {
1525
+ name: "sdk.ensureRunning" | "sdk.refresh" | "sdk.request";
1526
+ durMs: number;
1527
+ desc: string;
1528
+ /** `sdk.request` only. */
1529
+ method?: string;
1530
+ /** `sdk.request` only: the SDK path of the call, not the wire URL. */
1531
+ path?: string;
1532
+ /** `sdk.request` only; absent when the request failed before a response. */
1533
+ status?: number;
1534
+ /** `sdk.request` only; absent when the runtime exposes no socket events. */
1535
+ socket?: "new" | "reused";
1536
+ /** `sdk.request` only; absent when the runtime exposes no socket events. */
1537
+ phases?: SdkRequestPhases;
1538
+ }
1539
+ type SdkTimingHook = (entry: SdkTimingEntry) => void;
1540
+ //#endregion
1485
1541
  //#region src/types.d.ts
1542
+ /**
1543
+ * HTTP client interface for making requests.
1544
+ */
1545
+ interface HttpClient {
1546
+ fetch(path: string, options?: RequestInit, fetchOptions?: {
1547
+ timeoutMs?: number;
1548
+ }): Promise<Response>;
1549
+ getApiKey?(): string | undefined;
1550
+ getBaseUrl?(): string | undefined;
1551
+ /** Receives the SDK's timing spans; see `SandboxConfig.onTiming`. */
1552
+ readonly onTiming?: SdkTimingHook;
1553
+ }
1486
1554
  type JsonValue = string | number | boolean | null | JsonValue[] | {
1487
1555
  [key: string]: JsonValue;
1488
1556
  };
@@ -1659,6 +1727,21 @@ interface SandboxConfig {
1659
1727
  * files for remote endpoints.
1660
1728
  */
1661
1729
  trustLocalCliAuth?: boolean;
1730
+ /**
1731
+ * Receives the SDK's own timing spans, so a call's wall time can be split
1732
+ * into what the SDK, the network and the server each spent:
1733
+ *
1734
+ * - `sdk.ensureRunning`: the status check before a runtime call; `desc` is
1735
+ * `cached` when no status read was needed.
1736
+ * - `sdk.refresh`: one status read; `desc` is why it was sent, the value of
1737
+ * the `x-tangle-refresh-reason` request header.
1738
+ * - `sdk.request`: one HTTP request, with `socket` (`new` or `reused`) and
1739
+ * `phases` (dns, connect, tls, ttfb, body) where the runtime exposes them
1740
+ * (Node).
1741
+ *
1742
+ * A hook that throws is ignored. With no hook the SDK measures nothing.
1743
+ */
1744
+ onTiming?: SdkTimingHook;
1662
1745
  }
1663
1746
  /**
1664
1747
  * Status of a sandbox instance.
@@ -2531,8 +2614,9 @@ interface SandboxTerminalAttachOptions {
2531
2614
  }
2532
2615
  /**
2533
2616
  * `box.terminals` — the REST terminal manager plus the live PTY attach
2534
- * surface. `attach()` opens the terminal WebSocket (through the secured
2535
- * sidecar proxy, with a short-lived scoped token minted per dial) as a
2617
+ * surface. `attach()` opens the terminal WebSocket through the secured
2618
+ * sidecar proxy — a Node caller sends its API key on the upgrade, a browser a
2619
+ * short-lived scoped token minted per dial — as a
2536
2620
  * {@link TerminalStream}: reusing a connection id reattaches the existing
2537
2621
  * PTY and replays its history; a new id spawns a fresh shell (or `command`).
2538
2622
  */
@@ -4226,6 +4310,14 @@ interface SnapshotOptions {
4226
4310
  * directly and keeps no operation ledger, so the key would guard nothing.
4227
4311
  */
4228
4312
  idempotencyKey?: string;
4313
+ /**
4314
+ * `false` answers as soon as the capture is durably accepted and returns a
4315
+ * {@link SandboxOperation} whose result names the snapshot. Writes made
4316
+ * before the call are in it; writes made after it returns may or may not
4317
+ * be — wait for the operation when nothing later may land in it. Default
4318
+ * `true`. Not supported with `storage`.
4319
+ */
4320
+ wait?: boolean;
4229
4321
  }
4230
4322
  /**
4231
4323
  * How a keyed snapshot resolved.
@@ -4291,6 +4383,47 @@ interface SnapshotProvenance {
4291
4383
  /** When the profile was materialized into the sandbox. */
4292
4384
  materializedAt: string;
4293
4385
  }
4386
+ /** A verb that can finish in the background (`wait: false`). */
4387
+ type SandboxOperationKind = "stop" | "snapshot" | "delete";
4388
+ /** `accepted` and `running` are open; `succeeded` and `failed` are terminal. */
4389
+ type SandboxOperationState = "accepted" | "running" | "succeeded" | "failed";
4390
+ /** An operation as last read from the API. */
4391
+ interface SandboxOperationInfo {
4392
+ /** Empty for a verb the API finished synchronously. */
4393
+ id: string;
4394
+ kind: SandboxOperationKind;
4395
+ sandboxId: string;
4396
+ state: SandboxOperationState;
4397
+ /** What an open operation is doing now, when the API reports it. */
4398
+ phase?: string;
4399
+ acceptedAt: Date;
4400
+ completedAt?: Date;
4401
+ /** Where to poll it; empty for a verb that finished synchronously. */
4402
+ statusUrl: string;
4403
+ /** Present once succeeded. */
4404
+ result?: {
4405
+ /** stop: where the final workspace generation was durable when it finished. */durability?: "local" | "remote"; /** snapshot: the snapshot it took. */
4406
+ snapshot?: SnapshotResult; /** stop: the sandbox record when it finished, in the API's shape. */
4407
+ sandbox?: Record<string, unknown>;
4408
+ };
4409
+ /** Present once failed. */
4410
+ error?: {
4411
+ code: string;
4412
+ message: string;
4413
+ };
4414
+ }
4415
+ /** Options for a stop. */
4416
+ interface StopOptions {
4417
+ /**
4418
+ * `false` answers as soon as the stop is durably accepted and returns a
4419
+ * {@link SandboxOperation}; the stop finishes in the background, billing
4420
+ * runs until the runtime actually stops, and a resume issued meanwhile
4421
+ * waits for it. Default `true`: resolve once the sandbox is stopped.
4422
+ */
4423
+ wait?: boolean;
4424
+ /** Retry identity: a retry with the same key answers the same operation. */
4425
+ idempotencyKey?: string;
4426
+ }
4294
4427
  /**
4295
4428
  * Outcome of deleting a snapshot.
4296
4429
  *
@@ -4444,7 +4577,8 @@ interface WorkspaceOperationLookup {
4444
4577
  failure?: {
4445
4578
  status: number;
4446
4579
  error: string;
4447
- code?: string;
4580
+ code?: string; /** Refusal fields beyond `error` and `code`, e.g. `maxChildren`. */
4581
+ details?: Record<string, unknown>;
4448
4582
  };
4449
4583
  }
4450
4584
  interface RestoreSnapshotOptions {
@@ -7656,4 +7790,4 @@ interface ManagedProcessJobs {
7656
7790
  cancel(id: string, options?: ManagedProcessOptions): Promise<ManagedProcessRecord | null>;
7657
7791
  }
7658
7792
  //#endregion
7659
- export { DownloadOptions as $, InteractionResolutionAcknowledgement as $a, SessionInterruptOptions as $i, PromptOptions as $n, SandboxFleetPlacement as $r, GPU_LEASE_PROVIDER_NAMES as $t, CommitTaskSessionOptions as A, TokenUsage as Aa, SandboxTerminalInfo as Ai, ManagedProcessRecord as An, SandboxDeleteOutcome as Ar, FileUsageOptions as At, CreateSandboxOptions as B, WriteManyFile as Ba, SearchOptions as Bi, PermissionsManager as Bn, SandboxFleetDispatchResponse as Br, FleetDispatchStreamOptions as Bt, BranchOptions as C, TaskSessionProfile as Ca, SandboxRuntimeHealth as Ci, ListMessagesOptions as Cn, RolloutTurnPart as Cr, FileReadError as Ct, CodeExecutionResult as D, TeePublicKey as Da, SandboxStatus as Di, MAX_EGRESS_DENIALS_LIMIT as Dn, SandboxConnection as Dr, FileTreeFile as Dt, CodeExecutionOptions as E, TeeAttestationResponse as Ea, SandboxShapesInfo as Ei, ListSandboxOptions as En, SandboxConfig as Er, FileSystem as Et, CreateIntelligenceReportOptions as F, UsageInfo as Fa, SandboxTraceEvent as Fi, MkdirOptions as Fn, SandboxFleetAgentSpec as Fr, FleetAgentResult as Ft, DeleteMatchingSandboxesFilter as G, SandboxEnvRecoveryView as Ga, SentSessionMessage as Gi, ProcessInfo as Gn, SandboxFleetMachine as Gr, FleetMachineId as Gt, CreateTaskSessionOptions as H, SandboxCreateOutcome as Ha, SecretsManager as Hi, PreviewLinkManager as Hn, SandboxFleetDriverTimings as Hr, FleetDriveTurnRequest as Ht, CreateRequestOptions as I, WaitForOptions as Ia, SandboxTraceExport as Ii, NetworkConfig as In, SandboxFleetArtifact as Ir, FleetAgentRunStatus as It, DeleteOptions as J, RawEvidenceExportOptions as Ja, SessionExecutionInfo as Ji, ProcessManager as Jn, SandboxFleetMachineSpec as Jr, FleetRunEvent as Jt, DeleteMatchingSandboxesOptions as K, RawEvidenceArchiveManifest as Ka, SessionBackendCredentials as Ki, ProcessListOptions as Kn, SandboxFleetMachineMeteredUsage as Kr, FleetPromptDispatchOptions as Kt, CreateSandboxFleetOptions as L, WaitForRolloutOptions as La, SandboxTraceOptions as Li, NetworkManager as Ln, SandboxFleetArtifactSpec as Lr, FleetDispatchCancelResult as Lt, ConversationTurnOptions as M, UpdateUserOptions as Ma, SandboxTerminalRequestOptions as Mi, ManagedProcessSpec as Mn, SandboxEnvironment as Mr, FileWriteResult as Mt, ConversationTurnResult as N, UploadOptions as Na, SandboxTerminals as Ni, ManagedProcessState as Nn, SandboxEvent as Nr, FleetAgentId as Nt, CodeLanguage as O, TeePublicKeyResponse as Oa, SandboxTerminalAttachOptions as Oi, ManagedProcessJobs as On, SandboxDeleteAcknowledgement as Or, FileTreeOptions as Ot, CreateGpuLeaseOptions as P, UploadProgress as Pa, SandboxTraceBundle as Pi, McpServerConfig as Pn, SandboxFleetAgent as Pr, FleetAgentPlacement as Pt, DispatchedSession as Q, WorkspaceImagePublishResult as Qa, SessionInfo as Qi, PromptInputPart as Qn, SandboxFleetParent as Qr, ForkLookupOptions as Qt, CreateSandboxFleetTokenOptions as R, WorkspaceOperationLookup as Ra, SandboxUser as Ri, NonHostAgentDriverConfig as Rn, SandboxFleetCostEstimate as Rr, FleetDispatchResultBuffer as Rt, BatchTaskResult as S, TaskSessionInfo as Sa, SandboxRuntimeCapabilities as Si, JsonValue as Sn, RolloutStatus as Sr, FileReadBatchResult as St, ChunkedUploadResult as T, TeeAttestationReport as Ta, SandboxShapePreset as Ti, ListSandboxFleetOptions as Tn, SSHCredentials as Tr, FileRenameResult as Tt, DeleteMatchingSandboxOutcome as U, SandboxCreateReceipt as Ua, SendSessionMessageOptions as Ui, PreviewLinkWaitOptions as Un, SandboxFleetInfo as Ur, FleetExecDispatchOptions as Ut, CreateSessionOptions as V, WriteManyOptions as Va, SecretInfo as Vi, PreviewLinkInfo as Vn, SandboxFleetDriverCapability as Vr, FleetDriveTurnOutcome as Vt, DeleteMatchingSandboxResult as W, SandboxEnvRecovery as Wa, SendSessionMessageRequest as Wi, Process as Wn, SandboxFleetIntelligenceEnvelope as Wr, FleetExecDispatchResult as Wt, DirectoryPermission as X, RawEvidencePayloadFile as Xa, SessionFailureReason as Xi, ProcessSpawnOptions as Xn, SandboxFleetManifestMachine as Xr, ForkCounts as Xt, DevServerInfo as Y, RawEvidenceNativeFile as Ya, SessionExecutionStatus as Yi, ProcessSignal as Yn, SandboxFleetManifest as Yr, FleetRunOptions as Yt, DispatchPromptOptions as Z, RawEvidenceRecordsFile as Za, SessionForkOptions as Zi, ProcessStatus as Zn, SandboxFleetOperationsSummary as Zr, ForkIdempotency as Zt, BatchBackend as _, StorageConfig as _a, SandboxPortPreviewLink as _i, IntelligenceReport as _n, Rollout as _r, ExactProcessSpawnOptions as _t, AgentQuestionRequest as a, SessionStatus as aa, SandboxFleetTraceEvent as ai, GitStatus as an, BatchTaskUsage as ao, PublicProfileConflict as ar, DriverType as at, BatchRunRequest as b, TaskSessionCommitResult as ba, SandboxResources as bi, IntelligenceReportSubjectType as bn, RolloutScorer as br, FileInfo as bt, AttachGpuLeaseOptions as c, SnapshotIdempotency as ca, SandboxFleetUsage as ci, GpuLeaseCommandResult as cn, parseBackendType as co, PublishPublicTemplateOptions as cr, DurablePlanSnapshot as ct, BackendConfig as d, SnapshotProvenance as da, SandboxFleetWorkspaceRestoreResult as di, GpuLeaseManager as dn, ReapExpiredSandboxFleetsResult as dr, EffectiveBackendSource as dt, SessionListOptions as ea, SandboxFleetPolicy as ei, GitAuth as en, PublicBatchRunRequest as eo, PromptResult as er, DownloadProgress as et, BackendInfo as f, SnapshotRemoteSync as fa, SandboxFleetWorkspaceSnapshotResult as fi, GpuLeaseProviderName as fn, ReconcileSandboxFleetsOptions as fr, EgressDenial as ft, BackendStatus as g, StartupOperation as ga, SandboxPortBinding as gi, InstalledTool as gn, ResumeOptions as gr, EventStreamOptions as gt, BackendRuntimeConfigUpdate as h, StartupDiagnostics as ha, SandboxIntelligenceEnvelope as hi, HostAgentRuntimeBackend as hn, RestoreSnapshotOptions as hr, EnsureDevServerOptions as ht, AgentApprovalRequirement as i, SessionResultOptions as ia, SandboxFleetTraceBundle as ii, GitDiff as in, BatchSidecarGroup as io, ProvisionStep as ir, DriverInfo as it, CompletedTurnResult as j, TurnDriveResult as ja, SandboxTerminalManager as ji, ManagedProcessResumeOptions as jn, SandboxEgressUsage as jr, FileUsageResult as jt, CodeResultPart as k, TokenRefreshHandler as ka, SandboxTerminalCreateOptions as ki, ManagedProcessOptions as kn, SandboxDeleteOptions as kr, FileTreeResult as kt, AttachSandboxFleetMachineOptions as l, SnapshotInfo as la, SandboxFleetWorkspace as li, GpuLeaseExecOptions as ln, PublishPublicTemplateVersionOptions as lr, EffectiveBackend as lt, BackendMcpServerStatus as m, SshKeysManager as ma, SandboxInfo as mi, HostAgentDriverConfig as mn, RenameOptions as mr, EgressPolicy as mt, AccessPolicyRule as n, SessionMessageAdmission as na, SandboxFleetSpend as ni, GitCommit as nn, BatchEvent as no, ProvisionResult as nr, DriveTurnOptions as nt, AgentRunStatus as o, SnapshotDeleteAcknowledgement as oa, SandboxFleetTraceExport as oi, GpuLease as on, ALL_BACKEND_TYPES as oo, PublicTemplateInfo as or, DurablePlan as ot, BackendManager as p, SnapshotResult as pa, SandboxIdentity as pi, GpuLeaseStatus as pn, ReconcileSandboxFleetsResult as pr, EgressManager as pt, DeleteMatchingSandboxesResult as q, RawEvidenceDirectoryExport as qa, SessionEventStreamOptions as qi, ProcessLogEntry as qn, SandboxFleetMachineRecord as qr, FleetPromptDispatchResult as qt, AddUserOptions as r, SessionMessageInputPart as ra, SandboxFleetToken as ri, GitConfig as rn, BatchEventDataMap as ro, ProvisionStatus as rr, DriverConfig as rt, AgentToolInvocation as s, SnapshotDeleteOutcome as sa, SandboxFleetTraceOptions as si, GpuLeaseBilling as sn, BackendType as so, PublicTemplateVersionInfo as sr, DurablePlanDecisionResult as st, AcceleratorKind as t, SessionMessage as ta, SandboxFleetProfileRef as ti, GitBranch as tn, BatchBackendStats as to, ProvisionEvent as tr, DownloadResult as tt, BackendCapabilities as u, SnapshotOptions as ua, SandboxFleetWorkspaceReconcileResult as ui, GpuLeaseExecResult as un, ReapExpiredSandboxFleetsOptions as ur, EffectiveBackendProfile as ut, BatchResult as v, SubscriptionInfo as va, SandboxRemovalState as vi, IntelligenceReportBudget as vn, RolloutChildResult as vr, ExecOptions as vt, ChunkedUploadOptions as w, TeeAttestationOptions as wa, SandboxShape as wi, ListOptions as wn, SSHCommandDescriptor as wr, FileReadResult as wt, BatchTask as x, TaskSessionFileChange as xa, SandboxRunGeneration as xi, IntelligenceReportWindow as xn, RolloutStartResult as xr, FileReadBatchOptions as xt, BatchRunOptions as y, TaskSessionChanges as ya, SandboxResourceUsage as yi, IntelligenceReportCompareTo as yn, RolloutOptions as yr, ExecResult as yt, CreateSandboxFleetWithCoordinatorOptions as z, WriteFileOptions as za, SearchMatch as zi, PermissionLevel as zn, SandboxFleetDispatchFailureClass as zr, FleetDispatchResultBufferOptions as zt };
7793
+ export { DownloadOptions as $, RawEvidenceDirectoryExport as $a, SessionExecutionStatus as $i, PromptInputPart as $n, SandboxFleetParent as $r, GPU_LEASE_PROVIDER_NAMES as $t, CommitTaskSessionOptions as A, TeeAttestationReport as Aa, SandboxShapesInfo as Ai, ManagedProcessOptions as An, SandboxDeleteOptions as Ar, FileUsageOptions as At, CreateSandboxOptions as B, UsageInfo as Ba, SandboxTraceExport as Bi, PermissionLevel as Bn, SandboxFleetDispatchFailureClass as Br, FleetDispatchStreamOptions as Bt, BranchOptions as C, SubscriptionInfo as Ca, SandboxResourceUsage as Ci, JsonValue as Cn, RolloutStatus as Cr, FileReadError as Ct, CodeExecutionResult as D, TaskSessionInfo as Da, SandboxRuntimeHealth as Di, ListSandboxOptions as Dn, SandboxConfig as Dr, FileTreeFile as Dt, CodeExecutionOptions as E, TaskSessionFileChange as Ea, SandboxRuntimeCapabilities as Ei, ListSandboxFleetOptions as En, SSHCredentials as Er, FileSystem as Et, CreateIntelligenceReportOptions as F, TokenUsage as Fa, SandboxTerminalManager as Fi, McpServerConfig as Fn, SandboxFleetAgent as Fr, FleetAgentResult as Ft, DeleteMatchingSandboxesFilter as G, WriteManyFile as Ga, SecretInfo as Gi, Process as Gn, SandboxFleetIntelligenceEnvelope as Gr, FleetMachineId as Gt, CreateTaskSessionOptions as H, WaitForRolloutOptions as Ha, SandboxUser as Hi, PreviewLinkInfo as Hn, SandboxFleetDriverCapability as Hr, FleetDriveTurnRequest as Ht, CreateRequestOptions as I, TurnDriveResult as Ia, SandboxTerminalRequestOptions as Ii, MkdirOptions as In, SandboxFleetAgentSpec as Ir, FleetAgentRunStatus as It, DeleteOptions as J, SandboxCreateOutcome as Ja, SendSessionMessageRequest as Ji, ProcessLogEntry as Jn, SandboxFleetMachineRecord as Jr, FleetRunEvent as Jt, DeleteMatchingSandboxesOptions as K, WriteManyOptions as Ka, SecretsManager as Ki, ProcessInfo as Kn, SandboxFleetMachine as Kr, FleetPromptDispatchOptions as Kt, CreateSandboxFleetOptions as L, UpdateUserOptions as La, SandboxTerminals as Li, NetworkConfig as Ln, SandboxFleetArtifact as Lr, FleetDispatchCancelResult as Lt, ConversationTurnOptions as M, TeePublicKey as Ma, SandboxTerminalAttachOptions as Mi, ManagedProcessResumeOptions as Mn, SandboxEgressUsage as Mr, FileWriteResult as Mt, ConversationTurnResult as N, TeePublicKeyResponse as Na, SandboxTerminalCreateOptions as Ni, ManagedProcessSpec as Nn, SandboxEnvironment as Nr, FleetAgentId as Nt, CodeLanguage as O, TaskSessionProfile as Oa, SandboxShape as Oi, MAX_EGRESS_DENIALS_LIMIT as On, SandboxConnection as Or, FileTreeOptions as Ot, CreateGpuLeaseOptions as P, TokenRefreshHandler as Pa, SandboxTerminalInfo as Pi, ManagedProcessState as Pn, SandboxEvent as Pr, FleetAgentPlacement as Pt, DispatchedSession as Q, RawEvidenceArchiveManifest as Qa, SessionExecutionInfo as Qi, ProcessStatus as Qn, SandboxFleetOperationsSummary as Qr, ForkLookupOptions as Qt, CreateSandboxFleetTokenOptions as R, UploadOptions as Ra, SandboxTraceBundle as Ri, NetworkManager as Rn, SandboxFleetArtifactSpec as Rr, FleetDispatchResultBuffer as Rt, BatchTaskResult as S, StorageConfig as Sa, SandboxRemovalState as Si, IntelligenceReportWindow as Sn, RolloutStartResult as Sr, FileReadBatchResult as St, ChunkedUploadResult as T, TaskSessionCommitResult as Ta, SandboxRunGeneration as Ti, ListOptions as Tn, SSHCommandDescriptor as Tr, FileRenameResult as Tt, DeleteMatchingSandboxOutcome as U, WorkspaceOperationLookup as Ua, SearchMatch as Ui, PreviewLinkManager as Un, SandboxFleetDriverTimings as Ur, FleetExecDispatchOptions as Ut, CreateSessionOptions as V, WaitForOptions as Va, SandboxTraceOptions as Vi, PermissionsManager as Vn, SandboxFleetDispatchResponse as Vr, FleetDriveTurnOutcome as Vt, DeleteMatchingSandboxResult as W, WriteFileOptions as Wa, SearchOptions as Wi, PreviewLinkWaitOptions as Wn, SandboxFleetInfo as Wr, FleetExecDispatchResult as Wt, DirectoryPermission as X, SandboxEnvRecovery as Xa, SessionBackendCredentials as Xi, ProcessSignal as Xn, SandboxFleetManifest as Xr, ForkCounts as Xt, DevServerInfo as Y, SandboxCreateReceipt as Ya, SentSessionMessage as Yi, ProcessManager as Yn, SandboxFleetMachineSpec as Yr, FleetRunOptions as Yt, DispatchPromptOptions as Z, SandboxEnvRecoveryView as Za, SessionEventStreamOptions as Zi, ProcessSpawnOptions as Zn, SandboxFleetManifestMachine as Zr, ForkIdempotency as Zt, BatchBackend as _, SnapshotResult as _a, SandboxOperationInfo as _i, InstalledTool as _n, ResumeOptions as _r, ExactProcessSpawnOptions as _t, AgentQuestionRequest as a, SessionMessage as aa, SandboxFleetTraceBundle as ai, GitStatus as an, InteractionResolutionAcknowledgement as ao, ProvisionStep as ar, DriverType as at, BatchRunRequest as b, StartupOperation as ba, SandboxPortBinding as bi, IntelligenceReportCompareTo as bn, RolloutOptions as br, FileInfo as bt, AttachGpuLeaseOptions as c, SessionResultOptions as ca, SandboxFleetTraceOptions as ci, GpuLeaseCommandResult as cn, BatchEvent as co, PublicTemplateVersionInfo as cr, DurablePlanSnapshot as ct, BackendConfig as d, SnapshotDeleteOutcome as da, SandboxFleetWorkspaceReconcileResult as di, GpuLeaseManager as dn, BatchTaskUsage as do, ReapExpiredSandboxFleetsOptions as dr, EffectiveBackendSource as dt, SessionFailureReason as ea, SandboxFleetPlacement as ei, GitAuth as en, RawEvidenceExportOptions as eo, PromptOptions as er, DownloadProgress as et, BackendInfo as f, SnapshotIdempotency as fa, SandboxFleetWorkspaceRestoreResult as fi, GpuLeaseProviderName as fn, ALL_BACKEND_TYPES as fo, ReapExpiredSandboxFleetsResult as fr, EgressDenial as ft, BackendStatus as g, SnapshotRemoteSync as ga, SandboxIntelligenceEnvelope as gi, HttpClient as gn, RestoreSnapshotOptions as gr, EventStreamOptions as gt, BackendRuntimeConfigUpdate as h, SnapshotProvenance as ha, SandboxInfo as hi, HostAgentRuntimeBackend as hn, RenameOptions as hr, EnsureDevServerOptions as ht, AgentApprovalRequirement as i, SessionListOptions as ia, SandboxFleetToken as ii, GitDiff as in, WorkspaceImagePublishResult as io, ProvisionStatus as ir, DriverInfo as it, CompletedTurnResult as j, TeeAttestationResponse as ja, SandboxStatus as ji, ManagedProcessRecord as jn, SandboxDeleteOutcome as jr, FileUsageResult as jt, CodeResultPart as k, TeeAttestationOptions as ka, SandboxShapePreset as ki, ManagedProcessJobs as kn, SandboxDeleteAcknowledgement as kr, FileTreeResult as kt, AttachSandboxFleetMachineOptions as l, SessionStatus as la, SandboxFleetUsage as li, GpuLeaseExecOptions as ln, BatchEventDataMap as lo, PublishPublicTemplateOptions as lr, EffectiveBackend as lt, BackendMcpServerStatus as m, SnapshotOptions as ma, SandboxIdentity as mi, HostAgentDriverConfig as mn, parseBackendType as mo, ReconcileSandboxFleetsResult as mr, EgressPolicy as mt, AccessPolicyRule as n, SessionInfo as na, SandboxFleetProfileRef as ni, GitCommit as nn, RawEvidencePayloadFile as no, ProvisionEvent as nr, DriveTurnOptions as nt, AgentRunStatus as o, SessionMessageAdmission as oa, SandboxFleetTraceEvent as oi, GpuLease as on, PublicBatchRunRequest as oo, PublicProfileConflict as or, DurablePlan as ot, BackendManager as p, SnapshotInfo as pa, SandboxFleetWorkspaceSnapshotResult as pi, GpuLeaseStatus as pn, BackendType as po, ReconcileSandboxFleetsOptions as pr, EgressManager as pt, DeleteMatchingSandboxesResult as q, SdkTimingHook as qa, SendSessionMessageOptions as qi, ProcessListOptions as qn, SandboxFleetMachineMeteredUsage as qr, FleetPromptDispatchResult as qt, AddUserOptions as r, SessionInterruptOptions as ra, SandboxFleetSpend as ri, GitConfig as rn, RawEvidenceRecordsFile as ro, ProvisionResult as rr, DriverConfig as rt, AgentToolInvocation as s, SessionMessageInputPart as sa, SandboxFleetTraceExport as si, GpuLeaseBilling as sn, BatchBackendStats as so, PublicTemplateInfo as sr, DurablePlanDecisionResult as st, AcceleratorKind as t, SessionForkOptions as ta, SandboxFleetPolicy as ti, GitBranch as tn, RawEvidenceNativeFile as to, PromptResult as tr, DownloadResult as tt, BackendCapabilities as u, SnapshotDeleteAcknowledgement as ua, SandboxFleetWorkspace as ui, GpuLeaseExecResult as un, BatchSidecarGroup as uo, PublishPublicTemplateVersionOptions as ur, EffectiveBackendProfile as ut, BatchResult as v, SshKeysManager as va, SandboxOperationKind as vi, IntelligenceReport as vn, Rollout as vr, ExecOptions as vt, ChunkedUploadOptions as w, TaskSessionChanges as wa, SandboxResources as wi, ListMessagesOptions as wn, RolloutTurnPart as wr, FileReadResult as wt, BatchTask as x, StopOptions as xa, SandboxPortPreviewLink as xi, IntelligenceReportSubjectType as xn, RolloutScorer as xr, FileReadBatchOptions as xt, BatchRunOptions as y, StartupDiagnostics as ya, SandboxOperationState as yi, IntelligenceReportBudget as yn, RolloutChildResult as yr, ExecResult as yt, CreateSandboxFleetWithCoordinatorOptions as z, UploadProgress as za, SandboxTraceEvent as zi, NonHostAgentDriverConfig as zn, SandboxFleetCostEstimate as zr, FleetDispatchResultBufferOptions as zt };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox",
3
- "version": "0.60.69",
3
+ "version": "0.60.74",
4
4
  "description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -155,11 +155,11 @@
155
155
  "ws": "^8.20.0",
156
156
  "yjs": "13.6.30",
157
157
  "@products/sandbox-test-utils": "0.0.0",
158
- "@tangle-network/agent-profile-materialize": "0.25.4",
159
- "@tangle-network/cli-agent-registry": "0.9.1",
160
158
  "@repo/shared": "0.0.0",
161
- "@tangle-network/runtime-contracts": "0.18.0",
162
- "@tangle-network/sdk": "4.0.13",
159
+ "@tangle-network/agent-profile-materialize": "0.25.4",
160
+ "@tangle-network/cli-agent-registry": "0.10.0",
161
+ "@tangle-network/runtime-contracts": "0.18.1",
162
+ "@tangle-network/sdk": "4.0.14",
163
163
  "@tangle-network/sse-core": "0.0.0"
164
164
  },
165
165
  "scripts": {
@@ -1,59 +0,0 @@
1
- import { harnessTypeSchema } from "@tangle-network/agent-interface";
2
- import { z } from "zod";
3
- //#region ../../../packages/runtime-contracts/dist/backend-types.js
4
- /**
5
- * Canonical harnesses this repo ships no provider adapter for.
6
- *
7
- * `gemini` reaches a workspace only as an openclaw/acp sub-agent CLI and through
8
- * `agent-profile-materialize`; there is no `packages/sdk-provider-gemini`, so naming it as a
9
- * backend must keep failing closed rather than dispatching to a runner that cannot start.
10
- */
11
- const NON_BACKEND_HARNESSES = ["gemini"];
12
- const BACKEND_TYPE = {
13
- OPENCODE: "opencode",
14
- CLAUDE_CODE: "claude-code",
15
- KIMI_CODE: "kimi-code",
16
- CODEX: "codex",
17
- AMP: "amp",
18
- FACTORY_DROIDS: "factory-droids",
19
- PI: "pi",
20
- PRIME: "prime",
21
- HERMES: "hermes",
22
- FORGE: "forge",
23
- OPENCLAW: "openclaw",
24
- NANOCLAW: "nanoclaw",
25
- ACP: "acp",
26
- CURSOR: "cursor",
27
- CLI_BASE: "cli-base"
28
- };
29
- const nonBackendHarnesses = new Set(NON_BACKEND_HARNESSES);
30
- /**
31
- * Order mirrors `CLI_AGENT_SPECS` — a backend without a spec has no install/launch definition and
32
- * cannot run, so the registry's order is the contract (`packages/cli-agent-registry`), not an
33
- * arbitrary list.
34
- */
35
- const ALL_BACKEND_TYPES = Object.values(BACKEND_TYPE);
36
- /**
37
- * Bind the enum to `harnessTypeSchema` in both directions at import time, so the canonical set
38
- * stays the authority on membership while the spec registry keeps owning order. A harness added
39
- * upstream, or a backend here that no longer exists upstream, fails loud instead of leaving request
40
- * validation and the harness taxonomy quietly disagreeing.
41
- */
42
- const canonicalBackendHarnesses = harnessTypeSchema.options.filter((harness) => !nonBackendHarnesses.has(harness));
43
- const declaredBackendTypes = new Set(ALL_BACKEND_TYPES);
44
- const canonicalBackendHarnessSet = new Set(canonicalBackendHarnesses);
45
- const undeclaredCanonicalHarnesses = canonicalBackendHarnesses.filter((harness) => !declaredBackendTypes.has(harness));
46
- if (undeclaredCanonicalHarnesses.length > 0) throw new Error(`BACKEND_TYPE is missing canonical harnesses: ${undeclaredCanonicalHarnesses.join(", ")}. Add the named constant plus its CLI_AGENT_SPECS entry, or list it in NON_BACKEND_HARNESSES with a reason.`);
47
- const unrecognizedBackendTypes = ALL_BACKEND_TYPES.filter((backend) => !canonicalBackendHarnessSet.has(backend));
48
- if (unrecognizedBackendTypes.length > 0) throw new Error(`BACKEND_TYPE declares runners the canonical harness enum does not define: ${unrecognizedBackendTypes.join(", ")}. Reconcile them into @tangle-network/agent-interface.`);
49
- const backendTypeSchema = z.enum(ALL_BACKEND_TYPES);
50
- const BACKEND_TYPE_SET = new Set(ALL_BACKEND_TYPES);
51
- function isBackendType(value) {
52
- return BACKEND_TYPE_SET.has(value);
53
- }
54
- function parseBackendType(value) {
55
- if (!isBackendType(value)) throw new Error(`Unknown backend type "${value}". Expected one of: ${ALL_BACKEND_TYPES.join(", ")}`);
56
- return value;
57
- }
58
- //#endregion
59
- export { parseBackendType as i, BACKEND_TYPE as n, backendTypeSchema as r, ALL_BACKEND_TYPES as t };
@@ -1,40 +0,0 @@
1
- import { a as TerminalStreamReconnectAuthority, l as ScopedToken, t as TerminalStream } from "./terminal-stream-CV1pMSKC.js";
2
- import { a as InteractiveSessionControlController, c as InteractiveSessionIdentity, f as InteractiveAttachOptions, h as InteractiveRequestOptions, n as BrowserInteractiveSessionControlControllerOptions, o as InteractiveSessionControlControllerOptions, s as InteractiveSessionControlTransport } from "./browser-interactive-control-controller-JUW3gOGH.js";
3
- import { AgentInteractiveSessionRef } from "@tangle-network/agent-interface";
4
-
5
- //#region src/interactive-controller.d.ts
6
- /** The request fields supplied by an attach caller before control is claimed. */
7
- type InteractiveAttachRequest = Omit<InteractiveAttachOptions, "control">;
8
- /** Transport used by the status → claim → WebSocket controller. */
9
- interface InteractiveSessionControllerTransport extends InteractiveSessionControlTransport {
10
- attach(sessionId: string, ref: AgentInteractiveSessionRef, request: InteractiveAttachOptions, options?: InteractiveRequestOptions, reconnectAuthority?: TerminalStreamReconnectAuthority): Promise<TerminalStream>;
11
- }
12
- interface InteractiveSessionControllerOptions extends InteractiveSessionControlControllerOptions {}
13
- /**
14
- * Attach-capable controller for one exact interactive process.
15
- *
16
- * Control ownership lives in the dependency-light base controller. This layer
17
- * adds only the terminal attach operation after that ownership is resolved.
18
- */
19
- declare class InteractiveSessionController extends InteractiveSessionControlController {
20
- private readonly attachTransport;
21
- private attachInFlight?;
22
- constructor(attachTransport: InteractiveSessionControllerTransport, options: InteractiveSessionControllerOptions);
23
- attach(request: InteractiveAttachRequest, requestOptions?: InteractiveRequestOptions): Promise<TerminalStream>;
24
- /**
25
- * Open a stream for a claim returned by this controller's `resolve()`.
26
- * The controller releases that claim when the stream cannot be opened.
27
- */
28
- attachWithIdentity(identity: InteractiveSessionIdentity, request: InteractiveAttachRequest, requestOptions?: InteractiveRequestOptions): Promise<TerminalStream>;
29
- }
30
- /** Browser transport options for the attach-capable controller. */
31
- interface BrowserInteractiveSessionControllerOptions extends InteractiveSessionControllerOptions, BrowserInteractiveSessionControlControllerOptions {
32
- /** Mint a future session-runtime token for every browser terminal dial. */
33
- terminalTokenProvider?: (signal?: AbortSignal) => Promise<ScopedToken>;
34
- }
35
- /** Concrete controller for browser deep links and terminal attachment. */
36
- declare class BrowserInteractiveSessionController extends InteractiveSessionController {
37
- constructor(options: BrowserInteractiveSessionControllerOptions);
38
- }
39
- //#endregion
40
- export { InteractiveSessionControllerOptions as a, InteractiveSessionController as i, BrowserInteractiveSessionControllerOptions as n, InteractiveSessionControllerTransport as o, InteractiveAttachRequest as r, BrowserInteractiveSessionController as t };