@tangle-network/sandbox 0.60.84 → 0.60.86
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 +3 -3
- package/dist/agent/preview.d.ts +1 -1
- package/dist/{agent-run-outcome-t4YB-M3R.d.ts → agent-run-outcome-CIlpTZNU.d.ts} +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +4 -4
- package/dist/{browser-interactive-control-controller-rpTbyvAS.d.ts → browser-interactive-control-controller-Cu6J3TUP.d.ts} +1 -1
- package/dist/{client-8qpE2rDI.d.ts → client-CUxfURSp.d.ts} +13 -12
- package/dist/{client-DM4i5RSw.js → client-D9OomGmE.js} +16 -15
- package/dist/collaboration/index.d.ts +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/{collaboration-DaJU5O0E.js → collaboration-YxqL5cZY.js} +4 -4
- package/dist/core.d.ts +6 -6
- package/dist/core.js +2 -2
- package/dist/{errors-DtQPTnqm.d.ts → errors-B7i6lxHc.d.ts} +3 -3
- package/dist/{index-DZ27pdB8.d.ts → index-7_-RzCh9.d.ts} +1 -1
- package/dist/{index-CrOKqIcs.d.ts → index-BFW3FzJG.d.ts} +4 -5
- package/dist/{index-DO7GVpk_.d.ts → index-Vr-2tNP3.d.ts} +1 -1
- package/dist/index.d.ts +16 -15
- package/dist/index.js +8 -8
- package/dist/interactive-control.d.ts +1 -1
- package/dist/{interactive-controller-CJ24g8Va.js → interactive-controller-CPtHnjrz.js} +65 -21
- package/dist/{lines-EGmJbdDU.d.ts → lines-DosoSbnD.d.ts} +1 -1
- package/dist/lines.d.ts +1 -1
- package/dist/{managed-process-C4hYjOOD.d.ts → managed-process-CP-geV3k.d.ts} +1 -1
- package/dist/{preview-HePhtWQw.d.ts → preview-B-h5p2LF.d.ts} +3 -3
- package/dist/runtime.d.ts +6 -6
- package/dist/runtime.js +4 -4
- package/dist/{sandbox-AeLQuwb4.d.ts → sandbox-Bcs4w1RE.d.ts} +5 -8
- package/dist/{sandbox-BcCe13Ws.js → sandbox-DyoFguBU.js} +133 -125
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-CoNOTxcu.js → tangle-yvuD9HP_.js} +33 -32
- package/dist/{terminal-stream-jdYomM1m.d.ts → terminal-stream-BANlVD4Q.d.ts} +1 -2
- package/dist/{types-Zl7vIatu.d.ts → types-H3SX7E33.d.ts} +23 -2
- package/package.json +5 -5
package/dist/tangle/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as ITangleJobsAbi, T as SandboxCreateResponseParamTypes, _ as JOB_SANDBOX_DELETE, a as fetchQuote, b as TangleSandboxClientConfig, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as JOB_SANDBOX_CREATE, h as TangleSandboxClient, i as SignedQuote, l as validateQuote, m as SignMessage, n as QuoteDomain, o as inputsHashOf, p as OperatorSessionToken, r as QuoteError, s as jobQuoteDigest, t as JobQuoteDetails, u as OperatorChallenge, v as TANGLE_CHAIN_ID, w as SandboxCreateParamTypes, x as AgentSandboxBlueprintAbi, y as TANGLE_JOBS_CONTRACT } from "../index-
|
|
1
|
+
import { C as JsonResponseParamTypes, E as SandboxIdParamTypes, S as ITangleJobsAbi, T as SandboxCreateResponseParamTypes, _ as JOB_SANDBOX_DELETE, a as fetchQuote, b as TangleSandboxClientConfig, c as parseQuoteResponse, d as OperatorSession, f as OperatorSessionError, g as JOB_SANDBOX_CREATE, h as TangleSandboxClient, i as SignedQuote, l as validateQuote, m as SignMessage, n as QuoteDomain, o as inputsHashOf, p as OperatorSessionToken, r as QuoteError, s as jobQuoteDigest, t as JobQuoteDetails, u as OperatorChallenge, v as TANGLE_CHAIN_ID, w as SandboxCreateParamTypes, x as AgentSandboxBlueprintAbi, y as TANGLE_JOBS_CONTRACT } from "../index-BFW3FzJG.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JobQuoteDetails, JsonResponseParamTypes, OperatorChallenge, OperatorSession, OperatorSessionError, OperatorSessionToken, QuoteDomain, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, SignMessage, SignedQuote, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient, TangleSandboxClientConfig, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
|
package/dist/tangle/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as JOB_SANDBOX_DELETE, f as TANGLE_CHAIN_ID, g as JsonResponseParamTypes, h as ITangleJobsAbi, i as jobQuoteDigest, l as OperatorSessionError, m as AgentSandboxBlueprintAbi, n as fetchQuote, o as validateQuote, p as TANGLE_JOBS_CONTRACT, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as JOB_SANDBOX_CREATE, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-
|
|
1
|
+
import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as JOB_SANDBOX_DELETE, f as TANGLE_CHAIN_ID, g as JsonResponseParamTypes, h as ITangleJobsAbi, i as jobQuoteDigest, l as OperatorSessionError, m as AgentSandboxBlueprintAbi, n as fetchQuote, o as validateQuote, p as TANGLE_JOBS_CONTRACT, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as JOB_SANDBOX_CREATE, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-yvuD9HP_.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, OperatorSession, OperatorSessionError, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as readResponseJson } from "./errors-DSJBKmGZ.js";
|
|
2
|
-
import { n as createSandboxInstanceFromResponse } from "./sandbox-
|
|
2
|
+
import { n as createSandboxInstanceFromResponse } from "./sandbox-DyoFguBU.js";
|
|
3
3
|
import { _ as rotlBH, a as anumber, b as rotlSL, d as createXOFer, g as u32, h as toBytes$1, l as createHasher, m as swap32IfBE, n as abytes, o as aoutput, r as aexists, s as clean, t as Hash, v as rotlBL, x as split, y as rotlSH } from "./utils-B7_9Hl_z.js";
|
|
4
4
|
//#region src/tangle/abi.ts
|
|
5
5
|
/**
|
|
@@ -413,19 +413,19 @@ function teeCreateValues(options) {
|
|
|
413
413
|
];
|
|
414
414
|
}
|
|
415
415
|
var TangleChainClient = class {
|
|
416
|
-
config;
|
|
416
|
+
#config;
|
|
417
417
|
publicClient = null;
|
|
418
418
|
walletClient = null;
|
|
419
419
|
account = null;
|
|
420
420
|
constructor(config) {
|
|
421
|
-
this
|
|
421
|
+
this.#config = config;
|
|
422
422
|
}
|
|
423
423
|
async ensureInitialized() {
|
|
424
424
|
if (this.publicClient && this.walletClient) return {
|
|
425
425
|
publicClient: this.publicClient,
|
|
426
426
|
walletClient: this.walletClient
|
|
427
427
|
};
|
|
428
|
-
const rpcUrl = this
|
|
428
|
+
const rpcUrl = this.#config.rpcUrl;
|
|
429
429
|
if (typeof rpcUrl !== "string" || rpcUrl.trim().length === 0) throw new Error("TangleSandboxClient requires rpcUrl: the SDK has no default Tangle RPC endpoint");
|
|
430
430
|
let viem;
|
|
431
431
|
try {
|
|
@@ -448,16 +448,16 @@ var TangleChainClient = class {
|
|
|
448
448
|
chain,
|
|
449
449
|
transport
|
|
450
450
|
});
|
|
451
|
-
if (this
|
|
451
|
+
if (this.#config.privateKey) {
|
|
452
452
|
const { privateKeyToAccount } = await import("viem/accounts");
|
|
453
|
-
this.account = privateKeyToAccount(this
|
|
453
|
+
this.account = privateKeyToAccount(this.#config.privateKey);
|
|
454
454
|
this.walletClient = viem.createWalletClient({
|
|
455
455
|
account: this.account,
|
|
456
456
|
chain,
|
|
457
457
|
transport
|
|
458
458
|
});
|
|
459
|
-
} else if (this
|
|
460
|
-
const wallet = this
|
|
459
|
+
} else if (this.#config.wallet) {
|
|
460
|
+
const wallet = this.#config.wallet;
|
|
461
461
|
this.walletClient = wallet;
|
|
462
462
|
this.account = wallet.account ?? null;
|
|
463
463
|
} else throw new Error("TangleSandboxClient requires either privateKey or wallet");
|
|
@@ -502,8 +502,8 @@ var TangleChainClient = class {
|
|
|
502
502
|
async submitJobAndWait(jobIndex, encoded) {
|
|
503
503
|
const { publicClient, walletClient } = await this.ensureInitialized();
|
|
504
504
|
const viem = await import("viem");
|
|
505
|
-
const contractAddress = this
|
|
506
|
-
const serviceId = this
|
|
505
|
+
const contractAddress = this.#config.contractAddress ?? "0x0000000000000000000000000000000000000808";
|
|
506
|
+
const serviceId = this.#config.serviceId;
|
|
507
507
|
const inputs = viem.encodeAbiParameters(encoded.types, encoded.values);
|
|
508
508
|
const hash = await walletClient.writeContract({
|
|
509
509
|
address: contractAddress,
|
|
@@ -533,8 +533,8 @@ var TangleChainClient = class {
|
|
|
533
533
|
data: jobSubmittedEvent.data,
|
|
534
534
|
topics: jobSubmittedEvent.topics
|
|
535
535
|
}).args.callId;
|
|
536
|
-
const timeoutMs = this
|
|
537
|
-
const pollIntervalMs = this
|
|
536
|
+
const timeoutMs = this.#config.jobTimeoutMs ?? 144e5;
|
|
537
|
+
const pollIntervalMs = this.#config.pollIntervalMs ?? 5e3;
|
|
538
538
|
const deadline = Date.now() + timeoutMs;
|
|
539
539
|
while (Date.now() < deadline) {
|
|
540
540
|
await new Promise((resolve) => setTimeout(resolve, pollIntervalMs));
|
|
@@ -555,12 +555,12 @@ var TangleChainClient = class {
|
|
|
555
555
|
async getJobResult(callId, fromBlock) {
|
|
556
556
|
const { publicClient } = await this.ensureInitialized();
|
|
557
557
|
const viem = await import("viem");
|
|
558
|
-
const contractAddress = this
|
|
558
|
+
const contractAddress = this.#config.contractAddress ?? "0x0000000000000000000000000000000000000808";
|
|
559
559
|
const logs = await publicClient.getLogs({
|
|
560
560
|
address: contractAddress,
|
|
561
561
|
event: viem.parseAbiItem("event JobResultSubmitted(uint64 indexed serviceId, uint64 indexed callId, address indexed operator, bytes result)"),
|
|
562
562
|
args: {
|
|
563
|
-
serviceId: this
|
|
563
|
+
serviceId: this.#config.serviceId,
|
|
564
564
|
callId
|
|
565
565
|
},
|
|
566
566
|
fromBlock: fromBlock ?? "earliest"
|
|
@@ -570,9 +570,9 @@ var TangleChainClient = class {
|
|
|
570
570
|
}
|
|
571
571
|
async getAvailableCapacity() {
|
|
572
572
|
const { publicClient } = await this.ensureInitialized();
|
|
573
|
-
if (!this
|
|
573
|
+
if (!this.#config.blueprintContractAddress) throw new Error("blueprintContractAddress is required for getAvailableCapacity");
|
|
574
574
|
const result = await publicClient.readContract({
|
|
575
|
-
address: this
|
|
575
|
+
address: this.#config.blueprintContractAddress,
|
|
576
576
|
abi: AgentSandboxBlueprintAbi,
|
|
577
577
|
functionName: "getAvailableCapacity"
|
|
578
578
|
});
|
|
@@ -580,9 +580,9 @@ var TangleChainClient = class {
|
|
|
580
580
|
}
|
|
581
581
|
async getServiceStats() {
|
|
582
582
|
const { publicClient } = await this.ensureInitialized();
|
|
583
|
-
if (!this
|
|
583
|
+
if (!this.#config.blueprintContractAddress) throw new Error("blueprintContractAddress is required for getServiceStats");
|
|
584
584
|
const [totalSandboxes, totalCapacity] = await publicClient.readContract({
|
|
585
|
-
address: this
|
|
585
|
+
address: this.#config.blueprintContractAddress,
|
|
586
586
|
abi: AgentSandboxBlueprintAbi,
|
|
587
587
|
functionName: "getServiceStats"
|
|
588
588
|
});
|
|
@@ -607,7 +607,7 @@ var TangleChainClient = class {
|
|
|
607
607
|
await this.ensureInitialized();
|
|
608
608
|
const account = this.account;
|
|
609
609
|
if (!account) throw new Error("TangleChainClient has no account to sign with; privateKey or wallet is required");
|
|
610
|
-
if (this
|
|
610
|
+
if (this.#config.privateKey) {
|
|
611
611
|
if (typeof account.signMessage !== "function") throw new Error("Configured account cannot sign messages; an EIP-191 signer is required for operator sessions");
|
|
612
612
|
return account.signMessage({ message });
|
|
613
613
|
}
|
|
@@ -635,10 +635,11 @@ var OperatorSessionError = class extends Error {
|
|
|
635
635
|
* the caller retries with a fresh session on 401.
|
|
636
636
|
*/
|
|
637
637
|
var OperatorSession = class OperatorSession {
|
|
638
|
+
#token;
|
|
638
639
|
constructor(token, address, expiresAtMs) {
|
|
639
|
-
this.token = token;
|
|
640
640
|
this.address = address;
|
|
641
641
|
this.expiresAtMs = expiresAtMs;
|
|
642
|
+
this.#token = token;
|
|
642
643
|
}
|
|
643
644
|
get signerAddress() {
|
|
644
645
|
return this.address;
|
|
@@ -648,7 +649,7 @@ var OperatorSession = class OperatorSession {
|
|
|
648
649
|
return nowMs >= this.expiresAtMs - SESSION_REFRESH_MARGIN_MS;
|
|
649
650
|
}
|
|
650
651
|
authorizationHeader() {
|
|
651
|
-
return `Bearer ${this
|
|
652
|
+
return `Bearer ${this.#token}`;
|
|
652
653
|
}
|
|
653
654
|
/**
|
|
654
655
|
* Run the challenge-response flow against an operator API base URL.
|
|
@@ -846,15 +847,15 @@ function sandboxEntryFromWire(fallbackId, raw) {
|
|
|
846
847
|
}
|
|
847
848
|
var TangleSandboxClient = class {
|
|
848
849
|
chain;
|
|
849
|
-
sandboxes = /* @__PURE__ */ new Map();
|
|
850
|
+
#sandboxes = /* @__PURE__ */ new Map();
|
|
850
851
|
operatorApiUrl;
|
|
851
|
-
operatorApiToken;
|
|
852
|
+
#operatorApiToken;
|
|
852
853
|
operatorSession = null;
|
|
853
854
|
constructor(config) {
|
|
854
855
|
if (!config.privateKey && !config.wallet) throw new Error("TangleSandboxClient requires either privateKey or wallet");
|
|
855
856
|
this.chain = new TangleChainClient(config);
|
|
856
857
|
this.operatorApiUrl = config.operatorApiUrl?.replace(/\/+$/, "");
|
|
857
|
-
this
|
|
858
|
+
this.#operatorApiToken = config.operatorApiToken;
|
|
858
859
|
}
|
|
859
860
|
/**
|
|
860
861
|
* Create a sandbox via on-chain job submission.
|
|
@@ -905,7 +906,7 @@ var TangleSandboxClient = class {
|
|
|
905
906
|
teePublicKeyJson: wireEntry.teePublicKeyJson ?? responseJson.teePublicKeyJson,
|
|
906
907
|
attestationNonce: attestationNonceFromOptions(createOptions) ?? wireEntry.attestationNonce
|
|
907
908
|
};
|
|
908
|
-
this
|
|
909
|
+
this.#sandboxes.set(sandboxId, entry);
|
|
909
910
|
if (tangleSecrets && Object.keys(tangleSecrets).length > 0) await this.injectSecrets(sandboxId, tangleSecrets);
|
|
910
911
|
return createSandboxInstanceFromResponse(this, sandboxInfoFromEntry(entry));
|
|
911
912
|
}
|
|
@@ -939,12 +940,12 @@ var TangleSandboxClient = class {
|
|
|
939
940
|
const getMatch = path.match(/^\/v1\/sandboxes\/([^/]+)$/);
|
|
940
941
|
if (getMatch && method === "GET") {
|
|
941
942
|
const id = decodeURIComponent(requirePathGroup(getMatch, 1));
|
|
942
|
-
let entry = this
|
|
943
|
+
let entry = this.#sandboxes.get(id);
|
|
943
944
|
if (this.operatorApiUrl) {
|
|
944
945
|
const operatorResponse = await this.fetchOperatorApi(`/api/sandboxes/${encodeURIComponent(id)}`, { method: "GET" });
|
|
945
946
|
if (!operatorResponse.ok) return operatorResponse;
|
|
946
947
|
entry = sandboxEntryFromWire(id, await operatorResponse.json());
|
|
947
|
-
this
|
|
948
|
+
this.#sandboxes.set(entry.id, entry);
|
|
948
949
|
}
|
|
949
950
|
if (!entry) return new Response(JSON.stringify({ error: "Not found" }), { status: 404 });
|
|
950
951
|
const info = sandboxInfoFromEntry(entry);
|
|
@@ -1012,20 +1013,20 @@ var TangleSandboxClient = class {
|
|
|
1012
1013
|
const id = decodeURIComponent(requirePathGroup(deleteMatch, 1));
|
|
1013
1014
|
const encoded = this.chain.encodeSandboxIdInputs(id);
|
|
1014
1015
|
await this.chain.submitJobAndWait(1, encoded);
|
|
1015
|
-
const entry = this
|
|
1016
|
+
const entry = this.#sandboxes.get(id);
|
|
1016
1017
|
if (entry) entry.status = "deleted";
|
|
1017
|
-
this
|
|
1018
|
+
this.#sandboxes.delete(id);
|
|
1018
1019
|
return new Response(null, { status: 204 });
|
|
1019
1020
|
}
|
|
1020
1021
|
throw new Error(`Operation not supported via on-chain client: ${method} ${path}`);
|
|
1021
1022
|
}
|
|
1022
1023
|
async fetchRuntime(sandboxId, runtimePath, options) {
|
|
1023
|
-
let entry = this
|
|
1024
|
+
let entry = this.#sandboxes.get(sandboxId);
|
|
1024
1025
|
if (this.operatorApiUrl) {
|
|
1025
1026
|
const operatorResponse = await this.fetchOperatorApi(`/api/sandboxes/${encodeURIComponent(sandboxId)}`, { method: "GET" });
|
|
1026
1027
|
if (!operatorResponse.ok) return operatorResponse;
|
|
1027
1028
|
entry = sandboxEntryFromWire(sandboxId, await operatorResponse.json());
|
|
1028
|
-
this
|
|
1029
|
+
this.#sandboxes.set(entry.id, entry);
|
|
1029
1030
|
}
|
|
1030
1031
|
const incarnation = entry ? classifyFilesystemIncarnation(entry) : void 0;
|
|
1031
1032
|
if (!entry || !incarnation || !runtimeCredentialsAllowed(incarnation) || !entry.runtimeUrl || !entry.runtimeToken) return new Response(JSON.stringify({ error: "Sandbox runtime unavailable" }), {
|
|
@@ -1131,7 +1132,7 @@ var TangleSandboxClient = class {
|
|
|
1131
1132
|
headers: { "Content-Type": "application/json" }
|
|
1132
1133
|
});
|
|
1133
1134
|
const headers = new Headers(options?.headers);
|
|
1134
|
-
if (this
|
|
1135
|
+
if (this.#operatorApiToken && !headers.has("Authorization")) headers.set("Authorization", `Bearer ${this.#operatorApiToken}`);
|
|
1135
1136
|
if (options?.body && !headers.has("Content-Type")) headers.set("Content-Type", "application/json");
|
|
1136
1137
|
return fetch(`${this.operatorApiUrl}${path}`, {
|
|
1137
1138
|
...options,
|
|
@@ -304,10 +304,9 @@ declare function terminalUpgradeHeadersSupported(): boolean;
|
|
|
304
304
|
* `handlers.onData`).
|
|
305
305
|
*/
|
|
306
306
|
declare class TerminalStream {
|
|
307
|
+
#private;
|
|
307
308
|
private readonly ws;
|
|
308
|
-
private readonly options;
|
|
309
309
|
private readonly interactiveIdentity;
|
|
310
|
-
private readonly initMessage;
|
|
311
310
|
private readonly handlers;
|
|
312
311
|
private readonly attachTraceId;
|
|
313
312
|
private readonly initOnUpgrade;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as CliAuthReference } from "./cli-auth-bundle-ODe06Ts7.js";
|
|
2
|
-
import { n as TerminalStream, o as TerminalStreamHandlers } from "./terminal-stream-
|
|
2
|
+
import { n as TerminalStream, o as TerminalStreamHandlers } from "./terminal-stream-BANlVD4Q.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import * as _$_tangle_network_agent_interface0 from "@tangle-network/agent-interface";
|
|
5
5
|
import { AgentExactRunControlRef, AgentProfile, AgentProfileCapabilities, AgentProfileConfidential, AgentProfileValidationResult, AgentRuntimeAttachments, PlanContinuation, ReasoningEffort, SandboxSizePreset } from "@tangle-network/agent-interface";
|
|
@@ -5801,6 +5801,19 @@ interface McpServerConfig {
|
|
|
5801
5801
|
/** Headers for remote connections */
|
|
5802
5802
|
headers?: Record<string, string>;
|
|
5803
5803
|
}
|
|
5804
|
+
/**
|
|
5805
|
+
* Tangle Router provider routing for every model call of a Router-backed
|
|
5806
|
+
* OpenCode sandbox. Set at creation; the Sandbox API refuses it for any other
|
|
5807
|
+
* harness or endpoint rather than ignoring it.
|
|
5808
|
+
*/
|
|
5809
|
+
interface RouterRoutingOptions {
|
|
5810
|
+
/** Router provider ids the calls may use, e.g. `["zai"]`. */
|
|
5811
|
+
only?: string[];
|
|
5812
|
+
/** `false`: the Router does not fall back to another candidate provider. */
|
|
5813
|
+
allowFallbacks?: boolean;
|
|
5814
|
+
/** `true`: fail rather than substitute another model. */
|
|
5815
|
+
requireModel?: boolean;
|
|
5816
|
+
}
|
|
5804
5817
|
/**
|
|
5805
5818
|
* Nested model routing and auth. The role-named fields on
|
|
5806
5819
|
* {@link BackendConfig} (`modelId`, `provider`, `apiKey`, `baseUrl`, ...)
|
|
@@ -5838,6 +5851,8 @@ interface ModelRoutingConfig {
|
|
|
5838
5851
|
content: string;
|
|
5839
5852
|
mode?: number;
|
|
5840
5853
|
}>;
|
|
5854
|
+
/** Tangle Router provider routing; see {@link RouterRoutingOptions}. */
|
|
5855
|
+
routing?: RouterRoutingOptions;
|
|
5841
5856
|
}
|
|
5842
5857
|
/**
|
|
5843
5858
|
* AI coding agent backend configuration.
|
|
@@ -5914,6 +5929,12 @@ interface BackendConfig {
|
|
|
5914
5929
|
content: string;
|
|
5915
5930
|
mode?: number;
|
|
5916
5931
|
}>;
|
|
5932
|
+
/**
|
|
5933
|
+
* Tangle Router provider routing for every model call, e.g.
|
|
5934
|
+
* `{ only: ["zai"], allowFallbacks: false, requireModel: true }`.
|
|
5935
|
+
* Creation only, Router-backed OpenCode only.
|
|
5936
|
+
*/
|
|
5937
|
+
routing?: RouterRoutingOptions;
|
|
5917
5938
|
/**
|
|
5918
5939
|
* Model routing and auth, nested. Deprecated: the same fields now sit
|
|
5919
5940
|
* role-named directly on the backend (`modelId`, `provider`, `apiKey`,
|
|
@@ -7896,4 +7917,4 @@ interface ManagedProcessJobs {
|
|
|
7896
7917
|
cancel(id: string, options?: ManagedProcessOptions): Promise<ManagedProcessRecord | null>;
|
|
7897
7918
|
}
|
|
7898
7919
|
//#endregion
|
|
7899
|
-
export { DownloadOptions as $,
|
|
7920
|
+
export { DownloadOptions as $, WriteManyFile as $a, SecretsManager as $i, ProcessListOptions as $n, SandboxFleetMachine as $r, ForkIdempotency as $t, CommitTaskSessionOptions as A, SubscriptionInfo as Aa, SandboxResourceUsage as Ai, ListMessagesOptions as An, RolloutTurnPart as Ar, FileTreeOptions as At, CreateSandboxOptions as B, TeePublicKeyResponse as Ba, SandboxTerminalCreateOptions as Bi, ManagedProcessState as Bn, SandboxEnvironment as Br, FleetDispatchResultBuffer as Bt, BranchOptions as C, SnapshotRemoteSync as Ca, SandboxIntelligenceEnvelope as Ci, InstalledTool as Cn, parseBackendType as Co, ResumeOptions as Cr, FileReadBatchOptions as Ct, CodeExecutionResult as D, StartupOperation as Da, SandboxPortBinding as Di, IntelligenceReportSubjectType as Dn, RolloutScorer as Dr, FileRenameResult as Dt, CodeExecutionOptions as E, StartupDiagnostics as Ea, SandboxOperationState as Ei, IntelligenceReportCompareTo as En, RolloutOptions as Er, FileReadResult as Et, CreateIntelligenceReportOptions as F, TaskSessionProfile as Fa, SandboxShape as Fi, ManagedProcessJobs as Fn, SandboxConnection as Fr, FleetAgentId as Ft, DeleteMatchingSandboxesFilter as G, UpdateUserOptions as Ga, SandboxTraceBundle as Gi, NonHostAgentDriverConfig as Gn, SandboxFleetArtifactSpec as Gr, FleetExecDispatchOptions as Gt, CreateTaskSessionOptions as H, TokenUsage as Ha, SandboxTerminalManager as Hi, MkdirOptions as Hn, SandboxFleetAgent as Hr, FleetDispatchStreamOptions as Ht, CreateRequestOptions as I, TeeAttestationOptions as Ia, SandboxShapePreset as Ii, ManagedProcessOptions as In, SandboxDeleteAcknowledgement as Ir, FleetAgentPlacement as It, DeleteOptions as J, UsageInfo as Ja, SandboxTraceOptions as Ji, PreviewLinkInfo as Jn, SandboxFleetDispatchResponse as Jr, FleetPromptDispatchOptions as Jt, DeleteMatchingSandboxesOptions as K, UploadOptions as Ka, SandboxTraceEvent as Ki, PermissionLevel as Kn, SandboxFleetCostEstimate as Kr, FleetExecDispatchResult as Kt, CreateSandboxFleetOptions as L, TeeAttestationReport as La, SandboxShapesInfo as Li, ManagedProcessRecord as Ln, SandboxDeleteOptions as Lr, FleetAgentResult as Lt, ConversationTurnOptions as M, TaskSessionCommitResult as Ma, SandboxRunGeneration as Mi, ListSandboxFleetOptions as Mn, SSHCommandDescriptor as Mr, FileUsageOptions as Mt, ConversationTurnResult as N, TaskSessionFileChange as Na, SandboxRuntimeCapabilities as Ni, ListSandboxOptions as Nn, SSHCredentials as Nr, FileUsageResult as Nt, CodeLanguage as O, StopOptions as Oa, SandboxPortPreviewLink as Oi, IntelligenceReportWindow as On, RolloutStartResult as Or, FileSystem as Ot, CreateGpuLeaseOptions as P, TaskSessionInfo as Pa, SandboxRuntimeHealth as Pi, MAX_EGRESS_DENIALS_LIMIT as Pn, SandboxConfig as Pr, FileWriteResult as Pt, DispatchedSession as Q, WriteFileOptions as Qa, SecretInfo as Qi, ProcessInfo as Qn, SandboxFleetIntelligenceEnvelope as Qr, ForkCounts as Qt, CreateSandboxFleetTokenOptions as R, TeeAttestationResponse as Ra, SandboxStatus as Ri, ManagedProcessResumeOptions as Rn, SandboxDeleteOutcome as Rr, FleetAgentRunStatus as Rt, BatchTaskResult as S, SnapshotProvenance as Sa, SandboxInfo as Si, HttpClient as Sn, BackendType as So, RestoreSnapshotOptions as Sr, FileInfo as St, ChunkedUploadResult as T, SshKeysManager as Ta, SandboxOperationKind as Ti, IntelligenceReportBudget as Tn, RolloutChildResult as Tr, FileReadError as Tt, DeleteMatchingSandboxOutcome as U, TurnBackendConfig as Ua, SandboxTerminalRequestOptions as Ui, NetworkConfig as Un, SandboxFleetAgentSpec as Ur, FleetDriveTurnOutcome as Ut, CreateSessionOptions as V, TokenRefreshHandler as Va, SandboxTerminalInfo as Vi, McpServerConfig as Vn, SandboxEvent as Vr, FleetDispatchResultBufferOptions as Vt, DeleteMatchingSandboxResult as W, TurnDriveResult as Wa, SandboxTerminals as Wi, NetworkManager as Wn, SandboxFleetArtifact as Wr, FleetDriveTurnRequest as Wt, DirectoryPermission as X, WaitForRolloutOptions as Xa, SearchMatch as Xi, PreviewLinkWaitOptions as Xn, SandboxFleetDriverTimings as Xr, FleetRunEvent as Xt, DevServerInfo as Y, WaitForOptions as Ya, SandboxUser as Yi, PreviewLinkManager as Yn, SandboxFleetDriverCapability as Yr, FleetPromptDispatchResult as Yt, DispatchPromptOptions as Z, WorkspaceOperationLookup as Za, SearchOptions as Zi, Process as Zn, SandboxFleetInfo as Zr, FleetRunOptions as Zt, BatchBackend as _, SnapshotDeleteAcknowledgement as _a, SandboxFleetWorkspace as _i, GpuLeaseProviders as _n, BatchEvent as _o, ReapExpiredSandboxFleetsOptions as _r, EnsureDevServerOptions as _t, AgentQuestionRequest as a, SessionExecutionInfo as aa, SandboxFleetOperationsSummary as ai, GitConfig as an, SandboxEnvRecoveryView as ao, PromptInputPart as ar, DriverType as at, BatchRunRequest as b, SnapshotInfo as ba, SandboxFleetWorkspaceSnapshotResult as bi, HostAgentDriverConfig as bn, BatchTaskUsage as bo, ReconcileSandboxFleetsResult as br, ExecOptions as bt, AttachGpuLeaseOptions as c, SessionForkOptions as ca, SandboxFleetPolicy as ci, GpuLease as cn, RawEvidenceDirectoryExport as co, ProvisionEvent as cr, DurablePlanDecisionResult as ct, BackendConfig as d, SessionListOptions as da, SandboxFleetToken as di, GpuLeaseExecOptions as dn, RawEvidencePayloadFile as do, ProvisionStep as dr, EffectiveBackend as dt, SendSessionMessageOptions as ea, SandboxFleetMachineMeteredUsage as ei, ForkLookupOptions as en, WriteManyOptions as eo, ProcessLogEntry as er, DownloadProgress as et, BackendInfo as f, SessionMessage as fa, SandboxFleetTraceBundle as fi, GpuLeaseExecResult as fn, RawEvidenceRecordsFile as fo, PublicProfileConflict as fr, EffectiveBackendProfile as ft, BackendStatus as g, SessionStatus as ga, SandboxFleetUsage as gi, GpuLeaseProviderStatus as gn, BatchBackendStats as go, PublishPublicTemplateVersionOptions as gr, EgressPolicy as gt, BackendRuntimeConfigUpdate as h, SessionResultOptions as ha, SandboxFleetTraceOptions as hi, GpuLeaseProviderState as hn, PublicBatchRunRequest as ho, PublishPublicTemplateOptions as hr, EgressManager as ht, AgentApprovalRequirement as i, SessionEventStreamOptions as ia, SandboxFleetManifestMachine as ii, GitCommit as in, SandboxEnvRecovery as io, ProcessStatus as ir, DriverInfo as it, CompletedTurnResult as j, TaskSessionChanges as ja, SandboxResources as ji, ListOptions as jn, RouterRoutingOptions as jr, FileTreeResult as jt, CodeResultPart as k, StorageConfig as ka, SandboxRemovalState as ki, JsonValue as kn, RolloutStatus as kr, FileTreeFile as kt, AttachSandboxFleetMachineOptions as l, SessionInfo as la, SandboxFleetProfileRef as li, GpuLeaseBilling as ln, RawEvidenceExportOptions as lo, ProvisionResult as lr, DurablePlanFollowUpResume as lt, BackendMcpServerStatus as m, SessionMessageInputPart as ma, SandboxFleetTraceExport as mi, GpuLeaseProviderName as mn, InteractionResolutionAcknowledgement as mo, PublicTemplateVersionInfo as mr, EgressDenial as mt, AccessPolicyRule as n, SentSessionMessage as na, SandboxFleetMachineSpec as ni, GitAuth as nn, SandboxCreateOutcome as no, ProcessSignal as nr, DriveTurnOptions as nt, AgentRunStatus as o, SessionExecutionStatus as oa, SandboxFleetParent as oi, GitDiff as on, RawEvidenceArchiveManifest as oo, PromptOptions as or, DurablePlan as ot, BackendManager as p, SessionMessageAdmission as pa, SandboxFleetTraceEvent as pi, GpuLeaseManager as pn, WorkspaceImagePublishResult as po, PublicTemplateInfo as pr, EffectiveBackendSource as pt, DeleteMatchingSandboxesResult as q, UploadProgress as qa, SandboxTraceExport as qi, PermissionsManager as qn, SandboxFleetDispatchFailureClass as qr, FleetMachineId as qt, AddUserOptions as r, SessionBackendCredentials as ra, SandboxFleetManifest as ri, GitBranch as rn, SandboxCreateReceipt as ro, ProcessSpawnOptions as rr, DriverConfig as rt, AgentToolInvocation as s, SessionFailureReason as sa, SandboxFleetPlacement as si, GitStatus as sn, RawEvidenceArchiveManifestNative as so, PromptResult as sr, DurablePlanDecisionOptions as st, AcceleratorKind as t, SendSessionMessageRequest as ta, SandboxFleetMachineRecord as ti, GPU_LEASE_PROVIDER_NAMES as tn, SdkTimingHook as to, ProcessManager as tr, DownloadResult as tt, BackendCapabilities as u, SessionInterruptOptions as ua, SandboxFleetSpend as ui, GpuLeaseCommandResult as un, RawEvidenceNativeFile as uo, ProvisionStatus as ur, DurablePlanSnapshot as ut, BatchResult as v, SnapshotDeleteOutcome as va, SandboxFleetWorkspaceReconcileResult as vi, GpuLeaseProvidersOptions as vn, BatchEventDataMap as vo, ReapExpiredSandboxFleetsResult as vr, EventStreamOptions as vt, ChunkedUploadOptions as w, SnapshotResult as wa, SandboxOperationInfo as wi, IntelligenceReport as wn, Rollout as wr, FileReadBatchResult as wt, BatchTask as x, SnapshotOptions as xa, SandboxIdentity as xi, HostAgentRuntimeBackend as xn, ALL_BACKEND_TYPES as xo, RenameOptions as xr, ExecResult as xt, BatchRunOptions as y, SnapshotIdempotency as ya, SandboxFleetWorkspaceRestoreResult as yi, GpuLeaseStatus as yn, BatchSidecarGroup as yo, ReconcileSandboxFleetsOptions as yr, ExactProcessSpawnOptions as yt, CreateSandboxFleetWithCoordinatorOptions as z, TeePublicKey as za, SandboxTerminalAttachOptions as zi, ManagedProcessSpec as zn, SandboxEgressUsage as zr, FleetDispatchCancelResult 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.86",
|
|
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,16 +155,16 @@
|
|
|
155
155
|
"ws": "^8.20.0",
|
|
156
156
|
"yjs": "13.6.30",
|
|
157
157
|
"@repo/shared": "0.0.0",
|
|
158
|
-
"@products/sandbox-test-utils": "0.0.0",
|
|
159
158
|
"@tangle-network/agent-profile-materialize": "0.26.0",
|
|
160
|
-
"@tangle-network/runtime-contracts": "0.19.0",
|
|
161
159
|
"@tangle-network/sdk": "4.0.16",
|
|
162
160
|
"@tangle-network/cli-agent-registry": "0.10.2",
|
|
161
|
+
"@products/sandbox-test-utils": "0.0.0",
|
|
162
|
+
"@tangle-network/runtime-contracts": "0.19.0",
|
|
163
163
|
"@tangle-network/sse-core": "0.0.0"
|
|
164
164
|
},
|
|
165
165
|
"tangleRelease": {
|
|
166
|
-
"sourceSha": "
|
|
167
|
-
"mergedAt": "2026-10-
|
|
166
|
+
"sourceSha": "1a9ee694d3b41675e5f7903f097b0aafd91e5479",
|
|
167
|
+
"mergedAt": "2026-10-18T13:09:41-06:00"
|
|
168
168
|
},
|
|
169
169
|
"scripts": {
|
|
170
170
|
"build": "node scripts/build-dist.mjs",
|