@tangle-network/agent-runtime 10.0.11 → 10.0.12
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/CHANGELOG.md +4 -0
- package/dist/{activation-B9c5eSla.d.ts → activation-BmdINnh5.d.ts} +2 -2
- package/dist/{activation-DikG4Nxq.js → activation-zUNFNlNv.js} +2 -2
- package/dist/{activation-DikG4Nxq.js.map → activation-zUNFNlNv.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{delegate-BEBd1qxi.js → delegate--YvqtF0p.js} +2 -2
- package/dist/{delegate-BEBd1qxi.js.map → delegate--YvqtF0p.js.map} +1 -1
- package/dist/{driver-control-acknowledgers-C80hsHbs.js → driver-control-acknowledgers-o88fvQcq.js} +2 -2
- package/dist/{driver-control-acknowledgers-C80hsHbs.js.map → driver-control-acknowledgers-o88fvQcq.js.map} +1 -1
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +4 -4
- package/dist/{graph-BP927YH9.js → graph-5b9UtR5E.js} +4 -4
- package/dist/{graph-BP927YH9.js.map → graph-5b9UtR5E.js.map} +1 -1
- package/dist/{improve-CaYHi8P-.js → improve-DNO2U69i.js} +5 -5
- package/dist/{improve-CaYHi8P-.js.map → improve-DNO2U69i.js.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -8
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +1 -1
- package/dist/kernel.js +10 -10
- package/dist/{loop-runner-kGLe3PSM.d.ts → loop-runner-AQcWx9uu.d.ts} +2 -2
- package/dist/{loop-runner-9OJItBqr.js → loop-runner-D-oI6FUI.js} +2 -2
- package/dist/{loop-runner-9OJItBqr.js.map → loop-runner-D-oI6FUI.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +2 -2
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +4 -4
- package/dist/profiles.d.ts +1 -1
- package/dist/{provision-supervisor-m_kRnNQf.js → provision-supervisor-C_sePBrX.js} +3 -3
- package/dist/{provision-supervisor-m_kRnNQf.js.map → provision-supervisor-C_sePBrX.js.map} +1 -1
- package/dist/{run-state-Cd_Gvsjw.js → run-state-BjM79-9H.js} +2 -2
- package/dist/{run-state-Cd_Gvsjw.js.map → run-state-BjM79-9H.js.map} +1 -1
- package/dist/{runtime-CZc-cMrk.js → runtime-C4hWti_g.js} +10 -10
- package/dist/{runtime-CZc-cMrk.js.map → runtime-C4hWti_g.js.map} +1 -1
- package/dist/{search-executor-BHypQDeY.js → search-executor-B_xLH8Yq.js} +2 -2
- package/dist/{search-executor-BHypQDeY.js.map → search-executor-B_xLH8Yq.js.map} +1 -1
- package/dist/{server-D7Mq2Bn1.js → server-BzBOnewO.js} +2 -2
- package/dist/{server-D7Mq2Bn1.js.map → server-BzBOnewO.js.map} +1 -1
- package/dist/{structural-rollout-BfFEGl9Q.js → structural-rollout-mKdhfxlJ.js} +20 -4
- package/dist/structural-rollout-mKdhfxlJ.js.map +1 -0
- package/dist/{supervise-BX3fLhUS.js → supervise-C-mQSV-1.js} +3 -3
- package/dist/{supervise-BX3fLhUS.js.map → supervise-C-mQSV-1.js.map} +1 -1
- package/dist/{supervisor-CNE2g7Wz.js → supervisor-1csecp8d.js} +15 -4
- package/dist/supervisor-1csecp8d.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +11 -11
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-CTeyeXgz.d.ts → types-Br9sWTWk.d.ts} +2 -2
- package/package.json +1 -1
- package/dist/structural-rollout-BfFEGl9Q.js.map +0 -1
- package/dist/supervisor-CNE2g7Wz.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as captureReusableExecutorConfig, b as InMemorySpawnJournal, en as projectSandboxOutcome, n as createSupervisor, tn as readSandboxOutcome, v as withDriverExecutor, w as createExecutor, x as createExecutorRegistry, y as InMemoryResultBlobStore } from "./supervisor-
|
|
1
|
+
import { C as captureReusableExecutorConfig, b as InMemorySpawnJournal, en as projectSandboxOutcome, n as createSupervisor, tn as readSandboxOutcome, v as withDriverExecutor, w as createExecutor, x as createExecutorRegistry, y as InMemoryResultBlobStore } from "./supervisor-1csecp8d.js";
|
|
2
2
|
import { c as profileModelExecutionSettings, g as observedModelMatchesDeclared, i as concreteModelId, l as profileProviderModel, o as enforceTokenLimits, s as profileBridgeWireModel, t as assertExecutableAgentProfile } from "./model-policy-DTbTFyOG.js";
|
|
3
3
|
import { m as ValidationError, p as SessionMismatchError, r as BackendTransportError } from "./errors-DG8yufqX.js";
|
|
4
4
|
import { Fr as authoredProfileDigest, Jr as runtimeOwnedExecutorExecutionBinding, Rr as knownExecutionBindingReceipt, Yr as runtimeOwnedExecutorMaterialization, Zr as runtimeOwnedPendingExecutorMaterialization, _i as providerMessageText, ei as unknownExecutionBindingReceipt, gi as promptOptionsFromAgentTurnInput, hi as promptFromAgentTurnInput, ni as executableAgentProfileSnapshot, ti as unknownMaterializationReceipt, ui as awaitAbortable, zr as knownMaterializationReceipt } from "./supervisor-accounting-CgipDzYg.js";
|
|
@@ -1262,15 +1262,20 @@ function terminalDurationMs(events, measuredWallMs) {
|
|
|
1262
1262
|
* `toolChoice` has no per-call channel at all — `routerInlineExecutor` reads it from
|
|
1263
1263
|
* `AgentProfile.model.metadata.toolChoice` — so a request may restate the profile's policy and
|
|
1264
1264
|
* never change it. The error names both sides, because declaring it on the profile is the fix.
|
|
1265
|
+
* `none` is the one choice that is meaningful without tools: it asks for a text-only completion,
|
|
1266
|
+
* so restating it on a tool-free request is accepted when the profile declares it too.
|
|
1265
1267
|
*/
|
|
1266
1268
|
function toolCarryingExecutor(binding, req) {
|
|
1267
1269
|
const tools = req.tools ?? [];
|
|
1268
1270
|
if (req.toolChoice !== void 0) {
|
|
1269
|
-
if (tools.length === 0) throw new Error(`${binding.context}: request sets toolChoice with no tools; tool choice is meaningful only with tools`);
|
|
1270
1271
|
if (typeof req.toolChoice !== "string") throw new Error(`${binding.context}: request toolChoice names one function; Runtime's router turn expresses only auto, required, or none`);
|
|
1271
1272
|
if (req.toolChoice !== binding.settings.toolChoice) throw new Error(`${binding.context}: request toolChoice ${JSON.stringify(req.toolChoice)} conflicts with AgentProfile.model.metadata.toolChoice ${JSON.stringify(binding.settings.toolChoice ?? null)}`);
|
|
1273
|
+
if (tools.length === 0 && req.toolChoice !== "none") throw new Error(`${binding.context}: request sets toolChoice ${JSON.stringify(req.toolChoice)} with no tools; only "none" is meaningful without tools`);
|
|
1274
|
+
}
|
|
1275
|
+
if (tools.length === 0) {
|
|
1276
|
+
assertBackendCarriesToolChoicePolicy(binding);
|
|
1277
|
+
return binding.executor;
|
|
1272
1278
|
}
|
|
1273
|
-
if (tools.length === 0) return binding.executor;
|
|
1274
1279
|
if (binding.executor.backend !== "router") throw new Error(`${binding.context}: backend ${JSON.stringify(binding.executor.backend)} cannot pass tools through; refusing a tool-carrying request rather than answering without its tools`);
|
|
1275
1280
|
const declared = binding.executor.tools;
|
|
1276
1281
|
if (declared !== void 0 && JSON.stringify(declared) !== JSON.stringify(tools)) throw new Error(`${binding.context}: request tools conflict with the tools already declared on the executor config`);
|
|
@@ -1279,6 +1284,17 @@ function toolCarryingExecutor(binding, req) {
|
|
|
1279
1284
|
tools
|
|
1280
1285
|
}, binding.context);
|
|
1281
1286
|
}
|
|
1287
|
+
/** The backends that lower `AgentProfile.model.metadata.toolChoice` onto a provider request. */
|
|
1288
|
+
const TOOL_CHOICE_CARRYING_BACKENDS = /* @__PURE__ */ new Set(["router", "router-tools"]);
|
|
1289
|
+
/**
|
|
1290
|
+
* Refuse a profile-declared `toolChoice` the injected executor cannot carry. A backend that
|
|
1291
|
+
* never reads the policy would run the completion without it, and the caller cannot tell a
|
|
1292
|
+
* policy-ignored answer from a policy-enforced one — the same contaminated evidence a dropped
|
|
1293
|
+
* tool array produces, so it is refused by name before any transport runs.
|
|
1294
|
+
*/
|
|
1295
|
+
function assertBackendCarriesToolChoicePolicy(binding) {
|
|
1296
|
+
if (binding.settings.toolChoice !== void 0 && !TOOL_CHOICE_CARRYING_BACKENDS.has(binding.executor.backend)) throw new Error(`${binding.context}: backend ${JSON.stringify(binding.executor.backend)} cannot carry AgentProfile.model.metadata.toolChoice ${JSON.stringify(binding.settings.toolChoice)}; refusing the call rather than silently dropping the policy`);
|
|
1297
|
+
}
|
|
1282
1298
|
/** Caller headers are a lowercase token map. Runtime overwrites its own connection headers later. */
|
|
1283
1299
|
function callerRequestHeaders(headers, context) {
|
|
1284
1300
|
if (headers === void 0) return void 0;
|
|
@@ -3056,4 +3072,4 @@ function structuralRollout(config = {}) {
|
|
|
3056
3072
|
}
|
|
3057
3073
|
export { defaultAnalystInstruction as A, InMemoryRuntimeSessionStore as B, optimizerMethod as C, runAgentic as D, refine as E, collectAgentTurn as F, nowIso as H, streamAgentTurn as I, createIterableBackend as L, renderReport as M, profileChatClient as N, sample as O, profileOptimizerModelCall as P, createSandboxPromptBackend as R, strategyAuthorSystemPrompt as S, depthStrategy as T, startOrResumeRuntimeSession as U, newRuntimeSession as V, touchSession as W, defineStrategy as _, defaultStructuralRolloutPolicy as a, sampleThenRefine as b, officialChecksFromMeta as c, selectBestIndex as d, structuralRollout as f, authorStrategy as g, assertStrategyContract as h, defaultExtractCandidate as i, observe as j, ObservationError as k, resolveEntrySymbol as l, adaptiveRefine as m, compareCheckOutcomes as n, filterAuthoredAsserts as o, visibleCheckScore as p, composeCheckSources as r, modelAuthoredChecks as s, canDisplace as t, sandboxCheckRunner as u, loadAuthoredStrategy as v, breadthStrategy as w, strategyAuthorContract as x, requestStrategySource as y, normalizeBackendStreamEvent as z };
|
|
3058
3074
|
|
|
3059
|
-
//# sourceMappingURL=structural-rollout-
|
|
3075
|
+
//# sourceMappingURL=structural-rollout-mKdhfxlJ.js.map
|