@tangle-network/agent-runtime 0.81.0 → 0.82.0

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.
@@ -8,7 +8,7 @@ import {
8
8
  DELEGATION_STATUS_DESCRIPTION,
9
9
  DELEGATION_STATUS_INPUT_SCHEMA,
10
10
  DELEGATION_STATUS_TOOL_NAME
11
- } from "./chunk-QWLUOITV.js";
11
+ } from "./chunk-CO2KBPRE.js";
12
12
 
13
13
  // src/mcp/openai-tools.ts
14
14
  function buildTool(name, description, parameters) {
@@ -45,4 +45,4 @@ export {
45
45
  mcpToolsForRuntimeMcp,
46
46
  mcpToolsForRuntimeMcpSubset
47
47
  };
48
- //# sourceMappingURL=chunk-CA43KLZW.js.map
48
+ //# sourceMappingURL=chunk-DJQFJEOD.js.map
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  InMemoryResultBlobStore,
3
3
  InMemorySpawnJournal,
4
+ createExecutor,
4
5
  createExecutorRegistry,
5
6
  createSandboxLineage,
6
7
  createSupervisor,
@@ -14,7 +15,7 @@ import {
14
15
  settledToIteration,
15
16
  supervise,
16
17
  withDriverExecutor
17
- } from "./chunk-QWLUOITV.js";
18
+ } from "./chunk-CO2KBPRE.js";
18
19
  import {
19
20
  addTokenUsage,
20
21
  isAbortError,
@@ -2219,6 +2220,51 @@ function promotionGate(opts) {
2219
2220
  };
2220
2221
  }
2221
2222
 
2223
+ // src/runtime/resolve-sandbox-client.ts
2224
+ function resolveSandboxClient(opts) {
2225
+ switch (opts.backend) {
2226
+ case "sandbox": {
2227
+ if (!opts.sandboxClient) {
2228
+ throw new Error("resolveSandboxClient: backend 'sandbox' requires opts.sandboxClient");
2229
+ }
2230
+ return opts.sandboxClient;
2231
+ }
2232
+ case "bridge": {
2233
+ const bridge = opts.bridge;
2234
+ if (!bridge?.bearer || !bridge.model) {
2235
+ throw new Error(
2236
+ "resolveSandboxClient: backend 'bridge' requires bridge.bearer and bridge.model"
2237
+ );
2238
+ }
2239
+ return inlineSandboxClient(
2240
+ createExecutor({
2241
+ backend: "bridge",
2242
+ bridgeUrl: bridge.url ?? "http://127.0.0.1:3355",
2243
+ bridgeBearer: bridge.bearer,
2244
+ model: bridge.model,
2245
+ timeoutMs: bridge.timeoutMs
2246
+ })
2247
+ );
2248
+ }
2249
+ case "router": {
2250
+ const router = opts.router;
2251
+ if (!router?.baseUrl || !router.key || !router.model) {
2252
+ throw new Error(
2253
+ "resolveSandboxClient: backend 'router' requires router.baseUrl, router.key and router.model"
2254
+ );
2255
+ }
2256
+ return inlineSandboxClient(
2257
+ createExecutor({
2258
+ backend: "router",
2259
+ routerBaseUrl: router.baseUrl,
2260
+ routerKey: router.key,
2261
+ model: router.model
2262
+ })
2263
+ );
2264
+ }
2265
+ }
2266
+ }
2267
+
2222
2268
  // src/runtime/run-benchmark.ts
2223
2269
  import { pairedBootstrap as pairedBootstrap2, paretoFrontier } from "@tangle-network/agent-eval";
2224
2270
 
@@ -4663,6 +4709,7 @@ export {
4663
4709
  trajectoryReport,
4664
4710
  equalKOnCost,
4665
4711
  promotionGate,
4712
+ resolveSandboxClient,
4666
4713
  depthStrategy,
4667
4714
  breadthStrategy,
4668
4715
  sample,
@@ -4704,4 +4751,4 @@ export {
4704
4751
  computeFindingId,
4705
4752
  makeFinding2 as makeFinding
4706
4753
  };
4707
- //# sourceMappingURL=chunk-SN3XBTTH.js.map
4754
+ //# sourceMappingURL=chunk-JYURIKPF.js.map