@tangle-network/sandbox 0.60.61 → 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.
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +4 -4
- package/dist/agent/preview.d.ts +1 -1
- package/dist/{agent-run-outcome-jmKaXys4.d.ts → agent-run-outcome-eZF8RuUN.d.ts} +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/backend-types-D6bYbvMB.js +42 -0
- package/dist/{browser-interactive-control-controller-JUW3gOGH.d.ts → browser-interactive-control-controller-rpTbyvAS.d.ts} +1 -1
- package/dist/{chunked-upload-BklCn3Li.js → chunked-upload-CDrLMO8N.js} +1 -1
- package/dist/{chunked-upload-file-Cp-iWsWN.js → chunked-upload-file-BwbqHWUX.js} +1 -1
- package/dist/cli-auth-bundle-cSJjPeFF.js +1543 -0
- package/dist/{client-4G99U4L2.d.ts → client-BujziOIc.d.ts} +10 -6
- package/dist/{client-BuWj2tMd.js → client-C7Y6waVg.js} +29 -10
- package/dist/collaboration/index.d.ts +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/{collaboration-B2g1j2ey.js → collaboration-CTbq2OYh.js} +1 -1
- package/dist/core.d.ts +7 -7
- package/dist/core.js +3 -3
- package/dist/{errors-CBy-dqOv.d.ts → errors-Bj5DL2ge.d.ts} +61 -2
- package/dist/{errors-iWIsey1D.js → errors-C8YcR1BL.js} +31 -1
- package/dist/{index-ClxFpHIl.d.ts → index-CP9a77KP.d.ts} +2 -2
- package/dist/index.d.ts +14 -15
- package/dist/index.js +9 -9
- package/dist/intelligence/index.js +1 -1
- package/dist/interactive-control.d.ts +1 -1
- package/dist/{interactive-controller-DaYmUCO_.js → interactive-controller-BFbCkMq4.js} +213 -21
- package/dist/{lines-Bm8NULkl.d.ts → lines-_rRdwxof.d.ts} +10 -2
- package/dist/lines.d.ts +2 -2
- package/dist/lines.js +1 -1
- package/dist/{local-cli-auth-CZjO7FeG.js → local-cli-auth-CBV7Vjk5.js} +1 -1
- package/dist/{managed-process-Ddx8dULu.d.ts → managed-process-CPHeQONO.d.ts} +1 -1
- package/dist/{preview-DqKY0kxQ.d.ts → preview-n41aOXde.d.ts} +3 -3
- package/dist/runtime.d.ts +5 -6
- package/dist/runtime.js +3 -3
- package/dist/{sandbox-C6BLOrcg.js → sandbox-DGoQMthD.js} +678 -69
- package/dist/{sandbox-CIK4LMS-.d.ts → sandbox-DfSqEr3f.d.ts} +70 -17
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-CvB_QTGV.js → tangle-vyeLQFFg.js} +2 -2
- package/dist/{terminal-stream-CV1pMSKC.d.ts → terminal-stream-jdYomM1m.d.ts} +123 -4
- package/dist/{types-CS_FytQM.d.ts → types-Mi83KD0D.d.ts} +194 -21
- package/package.json +5 -5
- package/dist/backend-types-C7b_Gpa0.js +0 -59
- package/dist/cli-auth-bundle-BWNakb5F.js +0 -1007
- package/dist/interactive-controller-DNbLzamS.d.ts +0 -40
- /package/dist/{index-BgmgfYZZ.d.ts → index-DO7GVpk_.d.ts} +0 -0
- /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 {
|
|
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
|
-
*
|
|
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
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*/
|
|
14
|
-
declare const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
|
2535
|
-
* sidecar proxy
|
|
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 {
|
|
@@ -6881,6 +7015,45 @@ interface FileUsageResult {
|
|
|
6881
7015
|
complete: boolean;
|
|
6882
7016
|
/** Entries skipped because their metadata could not be read. */
|
|
6883
7017
|
skippedEntries: number;
|
|
7018
|
+
/** Reserved platform bytes on the workspace filesystem; omitted for subpaths. */
|
|
7019
|
+
reserved?: {
|
|
7020
|
+
sizeBytes: number; /** Allocated bytes, suitable for comparison with filesystem usage. */
|
|
7021
|
+
allocatedBytes: number;
|
|
7022
|
+
complete: boolean; /** Includes separately mounted platform roots; inspect sameFilesystem. */
|
|
7023
|
+
roots: Array<{
|
|
7024
|
+
path: string;
|
|
7025
|
+
sizeBytes: number;
|
|
7026
|
+
allocatedBytes: number;
|
|
7027
|
+
fileCount: number;
|
|
7028
|
+
complete: boolean;
|
|
7029
|
+
sameFilesystem: boolean;
|
|
7030
|
+
entries: Array<{
|
|
7031
|
+
path: string;
|
|
7032
|
+
sizeBytes: number;
|
|
7033
|
+
allocatedBytes: number;
|
|
7034
|
+
fileCount: number;
|
|
7035
|
+
}>;
|
|
7036
|
+
}>;
|
|
7037
|
+
settledRetention: {
|
|
7038
|
+
reason: string;
|
|
7039
|
+
startedAt: string;
|
|
7040
|
+
durationMs: number;
|
|
7041
|
+
attempts: number;
|
|
7042
|
+
retainedFiles: number;
|
|
7043
|
+
retainedBytes: number;
|
|
7044
|
+
releasedFiles: number;
|
|
7045
|
+
reclaimedBytes: number;
|
|
7046
|
+
removedAttempts: number;
|
|
7047
|
+
removedStaging: number;
|
|
7048
|
+
orphanRemovalSkipped?: string;
|
|
7049
|
+
} | null;
|
|
7050
|
+
};
|
|
7051
|
+
/** Physical capacity of the customer filesystem; omitted when unavailable. */
|
|
7052
|
+
filesystem?: {
|
|
7053
|
+
totalBytes: number;
|
|
7054
|
+
usedBytes: number;
|
|
7055
|
+
availableBytes: number;
|
|
7056
|
+
};
|
|
6884
7057
|
}
|
|
6885
7058
|
/** File content and metadata returned by a batch read. */
|
|
6886
7059
|
interface FileReadResult {
|
|
@@ -7617,4 +7790,4 @@ interface ManagedProcessJobs {
|
|
|
7617
7790
|
cancel(id: string, options?: ManagedProcessOptions): Promise<ManagedProcessRecord | null>;
|
|
7618
7791
|
}
|
|
7619
7792
|
//#endregion
|
|
7620
|
-
export { DownloadOptions as $,
|
|
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.
|
|
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": [
|
|
@@ -154,12 +154,12 @@
|
|
|
154
154
|
"vitest": "^4.1.11",
|
|
155
155
|
"ws": "^8.20.0",
|
|
156
156
|
"yjs": "13.6.30",
|
|
157
|
-
"@repo/shared": "0.0.0",
|
|
158
|
-
"@tangle-network/cli-agent-registry": "0.7.1",
|
|
159
157
|
"@products/sandbox-test-utils": "0.0.0",
|
|
160
|
-
"@
|
|
161
|
-
"@tangle-network/sdk": "4.0.10",
|
|
158
|
+
"@repo/shared": "0.0.0",
|
|
162
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 };
|