@tangle-network/agent-runtime 0.301.0 → 0.306.2
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-V6aaOlZV.js → activation-kaJzXM7Y.js} +3 -3
- package/dist/{activation-V6aaOlZV.js.map → activation-kaJzXM7Y.js.map} +1 -1
- package/dist/{activation-CRgEJutr.d.ts → activation-wZ-8vOjV.d.ts} +88 -13
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +2 -2
- package/dist/{bundle-C9v5TH_H.js → bundle-E6mbRX2P.js} +2 -2
- package/dist/{bundle-C9v5TH_H.js.map → bundle-E6mbRX2P.js.map} +1 -1
- package/dist/candidate-execution/index.d.ts +3 -26
- package/dist/candidate-execution/index.js +6 -6
- package/dist/{coordination-driver-vNrdQBSH.js → coordination-driver-Y2gf8pBT.js} +9 -16
- package/dist/coordination-driver-Y2gf8pBT.js.map +1 -0
- package/dist/{delegate-B-jFJcbW.js → delegate-B7bwEFQl.js} +2 -2
- package/dist/{delegate-B-jFJcbW.js.map → delegate-B7bwEFQl.js.map} +1 -1
- package/dist/durable.d.ts +3 -15
- package/dist/durable.js +158 -124
- package/dist/durable.js.map +1 -1
- package/dist/{graph-Dwv_hQB_.js → graph-VUwNFYff.js} +4 -5
- package/dist/graph-VUwNFYff.js.map +1 -0
- package/dist/{improvement-cycle-Cf37Kexd.js → improvement-cycle-DuIGusyA.js} +1129 -10
- package/dist/improvement-cycle-DuIGusyA.js.map +1 -0
- package/dist/{index-CxBVmgqL.d.ts → index-DflDZq_I.d.ts} +50 -688
- package/dist/index.d.ts +378 -12
- package/dist/index.js +223 -320
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +5 -5
- package/dist/intelligence.js +7 -8
- package/dist/intelligence.js.map +1 -1
- package/dist/kernel.d.ts +4 -4
- package/dist/kernel.js +9 -9
- package/dist/{loop-runner-bin-DiTNiJNs.d.ts → loop-runner-bin-DZfRUVWy.d.ts} +3 -3
- package/dist/{loop-runner-bin-C8MI8N1A.js → loop-runner-bin-Dp1V3P2W.js} +3 -3
- package/dist/{loop-runner-bin-C8MI8N1A.js.map → loop-runner-bin-Dp1V3P2W.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 +3 -3
- package/dist/mcp/index.d.ts +6 -35
- package/dist/mcp/index.js +311 -364
- package/dist/mcp/index.js.map +1 -1
- package/dist/model-policy-DydyWTQg.js.map +1 -1
- package/dist/{openai-tools-BeogJ6V8.d.ts → openai-tools-YO30D2s3.d.ts} +2 -2
- package/dist/{prepare-CGVNMb1o.js → prepare-CulUz6Wm.js} +7 -13
- package/dist/prepare-CulUz6Wm.js.map +1 -0
- package/dist/{profile-BetOB4_Q.js → profile-DY9lT3gH.js} +2 -2
- package/dist/{profile-BetOB4_Q.js.map → profile-DY9lT3gH.js.map} +1 -1
- package/dist/profiles.d.ts +2 -94
- package/dist/profiles.js +2 -451
- package/dist/profiles.js.map +1 -1
- package/dist/{protected-model-port-CuVHkhti.js → protected-model-port-BT2iYAsU.js} +4 -4
- package/dist/{protected-model-port-CuVHkhti.js.map → protected-model-port-BT2iYAsU.js.map} +1 -1
- package/dist/{protected-model-port-CAa0t1MT.d.ts → protected-model-port-C9QtEf3y.d.ts} +2 -2
- package/dist/{provision-supervisor-CS0fBIhp.js → provision-supervisor-CfK8fla-.js} +4 -3
- package/dist/{provision-supervisor-CS0fBIhp.js.map → provision-supervisor-CfK8fla-.js.map} +1 -1
- package/dist/{runtime-6VPSJVeg.js → runtime-D452tieK.js} +67 -469
- package/dist/runtime-D452tieK.js.map +1 -0
- package/dist/{search-method-wTTS7mGG.js → search-executor-D3AT8_hb.js} +239 -1132
- package/dist/search-executor-D3AT8_hb.js.map +1 -0
- package/dist/{server-BfHD5iLD.js → server-D1Tfxo-v.js} +5 -12
- package/dist/server-D1Tfxo-v.js.map +1 -0
- package/dist/{stream-agent-turn-B1ipFtOc.d.ts → stream-agent-turn-B1giFgOg.d.ts} +2 -2
- package/dist/{substrate-DKBMd0Dl.d.ts → substrate-L_sC7jCD.d.ts} +2 -2
- package/dist/{supervise-BJrEC2Mh.js → supervise-CtewGpxh.js} +14 -24
- package/dist/supervise-CtewGpxh.js.map +1 -0
- package/dist/{supervisor-DA_nvF-h.js → supervisor-DYKPbcZa.js} +488 -1407
- package/dist/supervisor-DYKPbcZa.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +14 -14
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-jD9mNnJM.d.ts → types-DeuEkBhI.d.ts} +114 -258
- package/dist/{workspace-archive-pz8YJ1fr.d.ts → workspace-streams-CpSmt3zx.d.ts} +67 -3
- package/dist/{workspace-streams-D5gHJdTb.js → workspace-streams-DaQceg2p.js} +699 -2
- package/dist/workspace-streams-DaQceg2p.js.map +1 -0
- package/package.json +8 -8
- package/skills/generate-eval/SKILL.md +1 -1
- package/skills/profile-authoring/SKILL.md +2 -2
- package/dist/coordination-driver-vNrdQBSH.js.map +0 -1
- package/dist/graph-Dwv_hQB_.js.map +0 -1
- package/dist/improvement-cycle-Cf37Kexd.js.map +0 -1
- package/dist/prepare-CGVNMb1o.js.map +0 -1
- package/dist/runtime-6VPSJVeg.js.map +0 -1
- package/dist/search-method-wTTS7mGG.js.map +0 -1
- package/dist/server-BfHD5iLD.js.map +0 -1
- package/dist/supervise-BJrEC2Mh.js.map +0 -1
- package/dist/supervisor-DA_nvF-h.js.map +0 -1
- package/dist/workspace-streams-D5gHJdTb.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Di as providerAttemptEvidence, Dn as FileSpawnJournal, Dr as resolveRedactor, Dt as createRouterTranscript, En as FileResultBlobStore, Fn as prepareJsonlAppend, Hn as workerTraceAnalysisStore, In as readCommittedJsonLines, Jt as isTerminalNodeStatus, Kn as assertValidBudget, Ln as writeAllBytes, On as InMemoryResultBlobStore, R as meterRuntimeOwnedProviderAttempt, Rt as createInbox, St as createExecutorRegistry, T as failedItems, Ut as createPeerMailbox, Vn as parseWorkerToolTraceArtifact, _ as CheckUnavailableError, br as contentAddress, c as runTree, er as errMessage, et as scopeRetainedOwnerResourceReader, i as bestDelivered, j as withDriverExecutor, kn as InMemorySpawnJournal, o as pickBestDelivered, pn as runBrainLoop, qt as isLiveNodeStatus, s as runFinalizer, st as resolveSpawnResourcePaths, x as checkVerdictOf, zi as detachedFrozen } from "./supervisor-DYKPbcZa.js";
|
|
2
2
|
import { f as RuntimeRunStateError, m as ValidationError } from "./errors-DodWX-cb.js";
|
|
3
|
+
import { V as chargedTokens, Z as promptCacheTokenClasses, at as unmeteredSpend, ft as withBudgetResources, lt as addResourceSpend } from "./workspace-streams-DaQceg2p.js";
|
|
3
4
|
import { A as writeWorkerCancellation, M as writeWorkerSteerAcknowledgement, b as workerCancellationsDir, c as readWorkerCancelRequests, d as readWorkerSteerRequests, k as writeRunCancellation, l as readWorkerCancellation, o as readRunCancelRequest, r as claimWorkerSteerDelivery, s as readRunCancellation, u as readWorkerSteerAcknowledgement } from "./run-layout-DSCWdbX2.js";
|
|
4
5
|
import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest } from "@tangle-network/agent-interface";
|
|
5
6
|
import { argHash, errorStreakDetector, observeAll, repeatedActionDetector } from "@tangle-network/agent-eval";
|
|
@@ -1878,7 +1879,7 @@ function createCoordinationToolsForManager(opts, lifetime) {
|
|
|
1878
1879
|
const received = new Set(ledger.map((worker) => worker.id));
|
|
1879
1880
|
const nodes = opts.scope.view?.nodes ?? [];
|
|
1880
1881
|
return {
|
|
1881
|
-
running: nodes.filter((node) => isLiveNodeStatus(node.status)
|
|
1882
|
+
running: nodes.filter((node) => isLiveNodeStatus(node.status)),
|
|
1882
1883
|
unqueued: nodes.filter((node) => !isLiveNodeStatus(node.status) && !received.has(node.id) && !flushedAnalystRuns.has(node.id)),
|
|
1883
1884
|
queued: bus.queued([
|
|
1884
1885
|
"settled",
|
|
@@ -3720,7 +3721,7 @@ function renderAnytimeTable(report) {
|
|
|
3720
3721
|
* A stop rule reads the run's own PROGRESS and decides. Three signals feed it:
|
|
3721
3722
|
* - the objective curve over settled work (best-so-far, from `anytime.ts` — see below),
|
|
3722
3723
|
* - the LIVE worker feed (`WorkerProgress`: `idleMs`, `stalled`, `turns`, `tokens`),
|
|
3723
|
-
* - tree-level shape (how many are in flight,
|
|
3724
|
+
* - tree-level shape (how many are in flight, when the last settle landed).
|
|
3724
3725
|
*
|
|
3725
3726
|
* ── Two boundaries this module holds deliberately ───────────────────────────────────────────────
|
|
3726
3727
|
*
|
|
@@ -3778,7 +3779,6 @@ function createProgressTracker(opts = {}) {
|
|
|
3778
3779
|
const workers = [];
|
|
3779
3780
|
if (scope && treeView) for (const node of treeView.nodes) {
|
|
3780
3781
|
if (isTerminalNodeStatus(node.status)) continue;
|
|
3781
|
-
if (node.status === "waiting") continue;
|
|
3782
3782
|
const p = scope.progress(node.id, viewOpts?.stallAfterMs !== void 0 ? {
|
|
3783
3783
|
now: now(),
|
|
3784
3784
|
stallAfterMs: viewOpts.stallAfterMs
|
|
@@ -3796,8 +3796,7 @@ function createProgressTracker(opts = {}) {
|
|
|
3796
3796
|
lastImprovementAt,
|
|
3797
3797
|
settlesSinceImprovement: lastImprovementIdx < 0 ? recorded.length : recorded.length - 1 - lastImprovementIdx,
|
|
3798
3798
|
workers,
|
|
3799
|
-
inFlight: treeView?.inFlight ?? 0
|
|
3800
|
-
waiting: treeView?.waiting ?? 0
|
|
3799
|
+
inFlight: treeView?.inFlight ?? 0
|
|
3801
3800
|
};
|
|
3802
3801
|
},
|
|
3803
3802
|
evaluate(rule, scope, viewOpts) {
|
|
@@ -3839,7 +3838,7 @@ function noProgressFor(opts) {
|
|
|
3839
3838
|
stop: true,
|
|
3840
3839
|
reason: `no-progress: ${v.settlesSinceImprovement} settles with no improvement (limit ${opts.settles}), best=${v.best}`
|
|
3841
3840
|
};
|
|
3842
|
-
if (opts.ms !== void 0 && v.
|
|
3841
|
+
if (opts.ms !== void 0 && v.lastSettleAt > 0) {
|
|
3843
3842
|
const idle = v.now - v.lastSettleAt;
|
|
3844
3843
|
if (idle >= opts.ms) return {
|
|
3845
3844
|
stop: true,
|
|
@@ -3881,7 +3880,6 @@ function plateau(opts) {
|
|
|
3881
3880
|
function allWorkersStalled(opts = {}) {
|
|
3882
3881
|
const minWorkers = opts.minWorkers ?? 1;
|
|
3883
3882
|
return (v) => {
|
|
3884
|
-
if (v.waiting > 0) return CONTINUE;
|
|
3885
3883
|
if (v.workers.length < minWorkers) return CONTINUE;
|
|
3886
3884
|
if (!v.workers.every((w) => w.stalled)) return CONTINUE;
|
|
3887
3885
|
const worst = Math.max(...v.workers.map((w) => w.idleMs));
|
|
@@ -4047,7 +4045,7 @@ function formatOverspend(violation) {
|
|
|
4047
4045
|
* overspend usd up to the turn tripwire). */
|
|
4048
4046
|
function poolStarved(scope, perWorker, preserveOwnerTurns = false) {
|
|
4049
4047
|
const b = scope.budget;
|
|
4050
|
-
if (scope.view.inFlight > 0
|
|
4048
|
+
if (scope.view.inFlight > 0) return false;
|
|
4051
4049
|
const tokenStarved = preserveOwnerTurns ? b.tokensLeft <= 0 : b.tokensLeft < perWorker.maxTokens;
|
|
4052
4050
|
const iterationStarved = b.iterationsLeft <= 0;
|
|
4053
4051
|
const usdStarved = b.usdCapped && (b.usdLeft <= 0 || !preserveOwnerTurns && perWorker.maxUsd !== void 0 && b.usdLeft < perWorker.maxUsd);
|
|
@@ -4542,10 +4540,6 @@ function driverAgent(opts) {
|
|
|
4542
4540
|
signal: scope.signal,
|
|
4543
4541
|
...opts.controlScope === "subtree" ? {} : { deliverRoot: inbox.deliver }
|
|
4544
4542
|
});
|
|
4545
|
-
for (const w of scope.resume?.waits ?? []) {
|
|
4546
|
-
const rearmed = scope.wait(w.spec, { label: w.label });
|
|
4547
|
-
if (!rearmed.ok) throw new RuntimeRunStateError(`driverAgent: cannot re-arm resumed wait '${w.label}' (${rearmed.reason})`);
|
|
4548
|
-
}
|
|
4549
4543
|
const byName = new Map(modelTools.map((tool) => [tool.name, tool]));
|
|
4550
4544
|
const toolSpecs = selectedTools.map((selected) => selected.kind === "descriptor" ? {
|
|
4551
4545
|
type: "function",
|
|
@@ -4819,7 +4813,6 @@ function resumeBrief(resume, current, prior) {
|
|
|
4819
4813
|
if (recovered.length > 0) lines.push("", "Recovered keys are attached to this scope. Their results arrive when you are woken; coordinate with their original workers:", ...recovered.map(([key, value]) => `- ${key} → ${value.id} (${value.label})`));
|
|
4820
4814
|
if (inDoubt.length > 0) lines.push("", "Keys IN DOUBT — a prior process recorded them as started but never recorded a terminal receipt. Do NOT spawn a replacement under these keys; inspect or recover each exact prior execution first:", ...inDoubt.map(([k, v]) => `- ${k} (prior attempt ${v.id}, ${v.label})`));
|
|
4821
4815
|
if (failed.length > 0) lines.push("", "Keys whose prior attempt FAILED (settled down) — spawn_worker with the same key retries:", ...failed.map(([k, v]) => `- ${k} (prior attempt ${v.id}, ${v.label})`));
|
|
4822
|
-
if (resume.waits.length > 0) lines.push("", "Pending waits RE-ARMED on their original deadlines (they settle into your next wake):", ...resume.waits.map((w) => `- ${w.label} (${w.spec.kind})`));
|
|
4823
4816
|
appendPriorCoordination(lines, prior);
|
|
4824
4817
|
const spent = resume.priorSpend;
|
|
4825
4818
|
lines.push("", "Budget the run ALREADY spent before this process (it counts toward the run total):", `- child work: tokens charged=${chargedTokens(spent.childWork.tokens)} (in=${spent.childWork.tokens.input} out=${spent.childWork.tokens.output}), usd=${spent.childWork.usd}, iterations=${spent.childWork.iterations}`, `- driver inference: tokens charged=${chargedTokens(spent.driverInference.tokens)} (in=${spent.driverInference.tokens.input} out=${spent.driverInference.tokens.output}), usd=${spent.driverInference.usd}`);
|
|
@@ -4890,6 +4883,6 @@ function safeJson(v) {
|
|
|
4890
4883
|
}
|
|
4891
4884
|
}
|
|
4892
4885
|
//#endregion
|
|
4893
|
-
export {
|
|
4886
|
+
export { analystToolGroupNames as A, defaultToolDetectors as B, createInMemoryRunContext as C, applyRunCancellation as D, foldCoordinationRecords as E, downMessageRefusalReasons as F, normalizeAnalyzeOnSettle as I, parseAuthoredAnalystDefinition as L, coordinationVerbNames as M, createCoordinationTools as N, watchRunCancellation as O, createCoordinationToolsForManager as P, questionEscalationTargets as R, createFileRunContext as S, FileCoordinationLog as T, watchTrace as V, anytimeReport as _, DEFAULT_DEADLINE_WARNING_MS as a, plateauLength as b, resolveWakePolicy as c, anyOf as d, createProgressTracker as f, sampleFromSettled as g, progressStop as h, finalizeBestDelivered as i, canonicalFindingEvent as j, ANALYST_DEFINITION_BOUNDS as k, allOf as l, plateau as m, createSteerAcknowledger as n, composeWakeInput as o, noProgressFor as p, driverAgent as r, deadlineWarningAt as s, createCancelAcknowledger as t, allWorkersStalled as u, areaUnderCurve as v, withRunContext as w, renderAnytimeTable as x, bestSoFar as y, createEventBus as z };
|
|
4894
4887
|
|
|
4895
|
-
//# sourceMappingURL=coordination-driver-
|
|
4888
|
+
//# sourceMappingURL=coordination-driver-Y2gf8pBT.js.map
|