@tangle-network/agent-runtime 0.131.2 → 0.131.3
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/{activation-rl1Dx7jw.js → activation-CrVCSWLi.js} +2 -2
- package/dist/{activation-rl1Dx7jw.js.map → activation-CrVCSWLi.js.map} +1 -1
- package/dist/agent.js +2 -2
- package/dist/{authoring-f3ldLlMH.js → authoring-tkyJHE0o.js} +2 -2
- package/dist/{authoring-f3ldLlMH.js.map → authoring-tkyJHE0o.js.map} +1 -1
- package/dist/{graph-Cavjt5PV.js → graph-RVorX4TM.js} +2 -2
- package/dist/{graph-Cavjt5PV.js.map → graph-RVorX4TM.js.map} +1 -1
- package/dist/{improvement-cycle-DameJBHT.js → improvement-cycle-CSprJl2t.js} +3 -3
- package/dist/{improvement-cycle-DameJBHT.js.map → improvement-cycle-CSprJl2t.js.map} +1 -1
- package/dist/index.js +7 -7
- package/dist/intelligence.js +3 -3
- package/dist/kernel.js +6 -6
- package/dist/{knowledge-BoWyEh3G.js → knowledge-DqcVhYYF.js} +3 -3
- package/dist/{knowledge-BoWyEh3G.js.map → knowledge-DqcVhYYF.js.map} +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-CRUMo1-y.js → loop-runner-bin-BXdUq87C.js} +3 -3
- package/dist/{loop-runner-bin-CRUMo1-y.js.map → loop-runner-bin-BXdUq87C.js.map} +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.js +4 -4
- package/dist/{openai-tools-DKjfR1g-.js → openai-tools-CPhN7uKC.js} +2 -2
- package/dist/{openai-tools-DKjfR1g-.js.map → openai-tools-CPhN7uKC.js.map} +1 -1
- package/dist/{runtime-vhKaBA0X.js → runtime-B4z0Z1sM.js} +6 -6
- package/dist/{runtime-vhKaBA0X.js.map → runtime-B4z0Z1sM.js.map} +1 -1
- package/dist/{structural-rollout-MCQU3KCv.js → structural-rollout-UO3ue9OI.js} +2 -2
- package/dist/{structural-rollout-MCQU3KCv.js.map → structural-rollout-UO3ue9OI.js.map} +1 -1
- package/dist/{supervise-D9Tivk-p.js → supervise-BVNSL3N0.js} +2 -2
- package/dist/{supervise-D9Tivk-p.js.map → supervise-BVNSL3N0.js.map} +1 -1
- package/dist/{supervisor-BI6Z-8Yi.js → supervisor-D4G47raS.js} +91 -7
- package/dist/{supervisor-BI6Z-8Yi.js.map → supervisor-D4G47raS.js.map} +1 -1
- package/dist/testing.js +11 -11
- package/package.json +1 -1
|
@@ -7591,12 +7591,7 @@ function assertBridgeProfileMaterialization(value, profile, wireModel) {
|
|
|
7591
7591
|
const missing = requiredKeys.filter((key) => !presentKeys.includes(key));
|
|
7592
7592
|
const unknown = presentKeys.filter((key) => !requiredKeys.includes(key) && !optionalKeys.includes(key));
|
|
7593
7593
|
if (missing.length > 0 || unknown.length > 0) throw new ValidationError("bridgeExecutor: profile materialization receipt has missing or unknown fields" + (missing.length > 0 ? ` (missing: ${missing.sort().join(", ")})` : "") + (unknown.length > 0 ? ` (unknown: ${unknown.sort().join(", ")})` : ""));
|
|
7594
|
-
|
|
7595
|
-
const inference = raw.inference;
|
|
7596
|
-
if (typeof inference !== "object" || inference === null || Array.isArray(inference)) throw new ValidationError("bridgeExecutor: profile materialization receipt has an invalid inference block");
|
|
7597
|
-
const endpoint = inference.effectiveEndpoint;
|
|
7598
|
-
if (typeof endpoint !== "string" || endpoint.length === 0) throw new ValidationError("bridgeExecutor: profile materialization inference block has no effectiveEndpoint");
|
|
7599
|
-
}
|
|
7594
|
+
const inference = raw.inference === void 0 ? void 0 : parseBridgeInferenceReceipt(raw.inference);
|
|
7600
7595
|
if (raw.schema !== bridgeProfileMaterializationSchema) throw new ValidationError(`bridgeExecutor: profile materialization receipt is not ${bridgeProfileMaterializationSchema}`);
|
|
7601
7596
|
const effectiveProfileDigest = raw.effectiveProfileDigest;
|
|
7602
7597
|
if (typeof effectiveProfileDigest !== "string" || !/^sha256:[a-f0-9]{64}$/u.test(effectiveProfileDigest)) throw new ValidationError("bridgeExecutor: profile materialization receipt has an invalid effectiveProfileDigest");
|
|
@@ -7655,11 +7650,100 @@ function assertBridgeProfileMaterialization(value, profile, wireModel) {
|
|
|
7655
7650
|
requested,
|
|
7656
7651
|
applied
|
|
7657
7652
|
},
|
|
7653
|
+
...inference === void 0 ? {} : { inference },
|
|
7658
7654
|
workspacePlanDigest: raw.workspacePlanDigest,
|
|
7659
7655
|
files: Object.freeze(files),
|
|
7660
7656
|
unsupported: Object.freeze(unsupported)
|
|
7661
7657
|
});
|
|
7662
7658
|
}
|
|
7659
|
+
function parseBridgeInferenceReceipt(value) {
|
|
7660
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) throw new ValidationError("bridgeExecutor: profile materialization receipt has an invalid inference block");
|
|
7661
|
+
const raw = value;
|
|
7662
|
+
assertBridgeReceiptKeys(raw, [
|
|
7663
|
+
"apiMode",
|
|
7664
|
+
"effectiveEndpoint",
|
|
7665
|
+
"transport"
|
|
7666
|
+
], ["observation"], "profile materialization inference block");
|
|
7667
|
+
const effectiveEndpoint = raw.effectiveEndpoint;
|
|
7668
|
+
if (typeof effectiveEndpoint !== "string" || effectiveEndpoint.length === 0) throw new ValidationError("bridgeExecutor: profile materialization inference block has no effectiveEndpoint");
|
|
7669
|
+
const apiMode = raw.apiMode;
|
|
7670
|
+
if (typeof apiMode !== "string" || apiMode.length === 0) throw new ValidationError("bridgeExecutor: profile materialization inference block has no apiMode");
|
|
7671
|
+
if (raw.transport !== "scoped-loopback") throw new ValidationError("bridgeExecutor: profile materialization inference block has invalid transport");
|
|
7672
|
+
const observation = raw.observation === void 0 ? void 0 : parseBridgeInferenceObservation(raw.observation);
|
|
7673
|
+
return detachedSnapshot({
|
|
7674
|
+
effectiveEndpoint,
|
|
7675
|
+
apiMode,
|
|
7676
|
+
transport: "scoped-loopback",
|
|
7677
|
+
...observation === void 0 ? {} : { observation }
|
|
7678
|
+
}, "bridgeExecutor: profile materialization inference block");
|
|
7679
|
+
}
|
|
7680
|
+
function parseBridgeInferenceObservation(value) {
|
|
7681
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) throw new ValidationError("bridgeExecutor: profile materialization inference observation must be an object");
|
|
7682
|
+
const raw = value;
|
|
7683
|
+
assertBridgeReceiptKeys(raw, [
|
|
7684
|
+
"accountingMatched",
|
|
7685
|
+
"auxiliaryRequests",
|
|
7686
|
+
"failedRequests",
|
|
7687
|
+
"generationRequests",
|
|
7688
|
+
"inFlightRequests",
|
|
7689
|
+
"rejectedRequests",
|
|
7690
|
+
"requests",
|
|
7691
|
+
"usage",
|
|
7692
|
+
"usageReceipts"
|
|
7693
|
+
], [], "profile materialization inference observation");
|
|
7694
|
+
return detachedSnapshot({
|
|
7695
|
+
requests: bridgeInferenceCount(raw.requests, "requests"),
|
|
7696
|
+
generationRequests: bridgeInferenceCount(raw.generationRequests, "generationRequests"),
|
|
7697
|
+
auxiliaryRequests: bridgeInferenceCount(raw.auxiliaryRequests, "auxiliaryRequests"),
|
|
7698
|
+
usageReceipts: bridgeInferenceCount(raw.usageReceipts, "usageReceipts"),
|
|
7699
|
+
rejectedRequests: bridgeInferenceCount(raw.rejectedRequests, "rejectedRequests"),
|
|
7700
|
+
failedRequests: bridgeInferenceCount(raw.failedRequests, "failedRequests"),
|
|
7701
|
+
inFlightRequests: bridgeInferenceCount(raw.inFlightRequests, "inFlightRequests"),
|
|
7702
|
+
accountingMatched: bridgeInferenceBoolean(raw.accountingMatched, "accountingMatched"),
|
|
7703
|
+
usage: parseBridgeInferenceUsage(raw.usage)
|
|
7704
|
+
}, "bridgeExecutor: profile materialization inference observation");
|
|
7705
|
+
}
|
|
7706
|
+
function parseBridgeInferenceUsage(value) {
|
|
7707
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) throw new ValidationError("bridgeExecutor: profile materialization inference usage must be an object");
|
|
7708
|
+
const raw = value;
|
|
7709
|
+
assertBridgeReceiptKeys(raw, ["costKnown"], [
|
|
7710
|
+
"cacheReadInputTokens",
|
|
7711
|
+
"cacheWriteInputTokens",
|
|
7712
|
+
"estimatedCost",
|
|
7713
|
+
"freshInputTokens",
|
|
7714
|
+
"inputTokens",
|
|
7715
|
+
"outputTokens"
|
|
7716
|
+
], "profile materialization inference usage");
|
|
7717
|
+
if (raw.costKnown !== false) throw new ValidationError("bridgeExecutor: profile materialization inference usage must report costKnown=false");
|
|
7718
|
+
return detachedSnapshot({
|
|
7719
|
+
...raw.inputTokens === void 0 ? {} : { inputTokens: bridgeInferenceCount(raw.inputTokens, "usage.inputTokens") },
|
|
7720
|
+
...raw.freshInputTokens === void 0 ? {} : { freshInputTokens: bridgeInferenceCount(raw.freshInputTokens, "usage.freshInputTokens") },
|
|
7721
|
+
...raw.cacheReadInputTokens === void 0 ? {} : { cacheReadInputTokens: bridgeInferenceCount(raw.cacheReadInputTokens, "usage.cacheReadInputTokens") },
|
|
7722
|
+
...raw.cacheWriteInputTokens === void 0 ? {} : { cacheWriteInputTokens: bridgeInferenceCount(raw.cacheWriteInputTokens, "usage.cacheWriteInputTokens") },
|
|
7723
|
+
...raw.outputTokens === void 0 ? {} : { outputTokens: bridgeInferenceCount(raw.outputTokens, "usage.outputTokens") },
|
|
7724
|
+
costKnown: false,
|
|
7725
|
+
...raw.estimatedCost === void 0 ? {} : { estimatedCost: bridgeInferenceMoney(raw.estimatedCost, "usage.estimatedCost") }
|
|
7726
|
+
}, "bridgeExecutor: profile materialization inference usage");
|
|
7727
|
+
}
|
|
7728
|
+
function assertBridgeReceiptKeys(value, required, optional, context) {
|
|
7729
|
+
const requiredSet = new Set(required);
|
|
7730
|
+
const optionalSet = new Set(optional);
|
|
7731
|
+
const missing = required.filter((key) => !Object.hasOwn(value, key));
|
|
7732
|
+
const unknown = Object.keys(value).filter((key) => !requiredSet.has(key) && !optionalSet.has(key));
|
|
7733
|
+
if (missing.length > 0 || unknown.length > 0) throw new ValidationError(`bridgeExecutor: ${context} has missing or unknown fields` + (missing.length > 0 ? ` (missing: ${missing.sort().join(", ")})` : "") + (unknown.length > 0 ? ` (unknown: ${unknown.sort().join(", ")})` : ""));
|
|
7734
|
+
}
|
|
7735
|
+
function bridgeInferenceCount(value, field) {
|
|
7736
|
+
if (!Number.isSafeInteger(value) || value < 0) throw new ValidationError(`bridgeExecutor: profile materialization inference ${field} must be a nonnegative safe integer`);
|
|
7737
|
+
return value;
|
|
7738
|
+
}
|
|
7739
|
+
function bridgeInferenceBoolean(value, field) {
|
|
7740
|
+
if (typeof value !== "boolean") throw new ValidationError(`bridgeExecutor: profile materialization inference ${field} must be boolean`);
|
|
7741
|
+
return value;
|
|
7742
|
+
}
|
|
7743
|
+
function bridgeInferenceMoney(value, field) {
|
|
7744
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) throw new ValidationError(`bridgeExecutor: profile materialization inference ${field} must be finite and nonnegative`);
|
|
7745
|
+
return value;
|
|
7746
|
+
}
|
|
7663
7747
|
/** Expected native control for the bridge backends that can emit the v2 acknowledgement. These
|
|
7664
7748
|
* mappings mirror the actual cli-bridge argv functions, so the acknowledgement is checked against
|
|
7665
7749
|
* what the process must have received rather than merely echoing the canonical request. */
|
|
@@ -11936,4 +12020,4 @@ function isNonEmptySpend(s) {
|
|
|
11936
12020
|
//#endregion
|
|
11937
12021
|
export { createSandboxLineage as $, bindReusableExecutorExecutionId as A, removeWorktree as At, workerTraceSeamKey as B, defineProfileMaterializationContract as Bt, queueOf as C, sanitizeAgentRuntimeEvent as Ct, assertValidBudget as D, runWorktreeHarness as Dt, teardownExecutor as E, runSettledCommand as Et, snapshotExecutorConfig as F, parseCodexTokenUsage as Ft, sandboxSessionTraceSource as G, promptOnlyProfileMaterialization as Gt, createSteerableSandboxSession as H, profileMaterializationAxes$1 as Ht, createWorktreeCliExecutor as I, CodexExecutionDiagnosticError as It, readWorkerProgress as J, sandboxActProfileMaterialization as Jt, DEFAULT_STALL_AFTER_MS as K, promptResourceProfileMaterialization as Kt, WORKER_TRACE_PROPAGATION as L, AGENT_PROFILE_MATERIALIZATION_AXES as Lt, cliWorktreeExecutor as M, LOCAL_HARNESSES as Mt, createExecutor as N, harnessSupportsReasoningEffort as Nt, createBudgetPool as O, captureWorktreeDiff as Ot, createExecutorRegistry as P, localHarnessExecutable as Pt, runAgentRounds as Q, readWorkerTraceContext as R, assertProfileMaterialization as Rt, freeSlots as S, createRuntimeStreamEventCollector as St, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as T, sanitizeRuntimeStreamEvent as Tt, createPushTraceSource as U, promptControlProfileMaterialization as Ut, DEFAULT_SANDBOX_STEERING_MAX_TURNS as V, fullProfileMaterialization as Vt, decodeToolPart as W, promptModelProfileMaterialization as Wt, createSandboxForSpec as X, worktreeCliProfileMaterialization as Xt, createInbox as Y, validateProfileMaterialization as Yt, defaultSelectWinner as Z, pollFor as _, loopEventToOtelSpan as _t, pickBestDelivered as a, mergeTraceEnv as at, waitUntil as b, toOtelAttributes as bt, driverChild as c, INTELLIGENCE_WIRE_VERSION as ct, deriveNodeExecutionIdentity as d, buildRuntimeEventOtelSpans as dt, probeSandboxCapabilities as et, recordScopeOwnerMaterialization as f, createOpenInferenceFileExporter as ft, isWaitOutcome as g, generateSpanId as gt, createWaitProbes as h, flatOtelSpan as ht, collectDelivered as i, createPropagatingTraceEmitter as it, captureReusableExecutorConfig as j, DEFAULT_LOCAL_HARNESS as jt, spendFromUsageEvents as k, createWorktree as kt, withDriverExecutor as l, buildLoopOtelSpans as lt, settledToIteration as m, exportEvalRuns as mt, createSupervisor as n, routerBrain as nt, runFinalizer as o, readTraceContextFromEnv as ot, scopeOwnerExecutorNodeContext as p, createOtelExporter as pt, createActivityLog as q, renderProfileMaterializationIssues as qt, bestDelivered as r, runBrainLoop as rt, runTree as s, traceContextToEnv as st, createRootHandle as t, acquireSandbox as tt, createScope as u, buildLoopSpanNodes as ut, timerAt as v, padSpanId as vt, rollingDispatch as w, sanitizeKnowledgeReadinessReport as wt, effectiveConcurrency as x, createRuntimeEventCollector as xt, validateWaitSpec as y, padTraceId as yt, workerTraceEnv as z, controlProfileMaterialization as zt };
|
|
11938
12022
|
|
|
11939
|
-
//# sourceMappingURL=supervisor-
|
|
12023
|
+
//# sourceMappingURL=supervisor-D4G47raS.js.map
|