@tangle-network/agent-runtime 0.174.1 → 0.177.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.
- package/README.md +4 -0
- package/dist/{activation-CsdJWRXX.js → activation-XVI_z1g3.js} +3 -3
- package/dist/{activation-CsdJWRXX.js.map → activation-XVI_z1g3.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{authoring-DsLNInAz.js → authoring-bXmPNfCI.js} +2 -2
- package/dist/{authoring-DsLNInAz.js.map → authoring-bXmPNfCI.js.map} +1 -1
- package/dist/candidate-execution/index.js +4 -4
- package/dist/{candidate-execution-BbMbyhgC.js → candidate-execution-fBNUyWyE.js} +10 -4
- package/dist/candidate-execution-fBNUyWyE.js.map +1 -0
- package/dist/{conversation-7XGKoDM6.js → conversation-BREx2hi-.js} +3 -3
- package/dist/{conversation-7XGKoDM6.js.map → conversation-BREx2hi-.js.map} +1 -1
- package/dist/conversation.d.ts +1 -1
- package/dist/conversation.js +1 -1
- package/dist/coordination-driver-xO1tkxy-.js +3063 -0
- package/dist/coordination-driver-xO1tkxy-.js.map +1 -0
- package/dist/durable-file-g3YdfEh4.js +131 -0
- package/dist/durable-file-g3YdfEh4.js.map +1 -0
- package/dist/durable.d.ts +2 -2
- package/dist/durable.js +1 -1
- package/dist/{environment-provider-DWjbGH8W.d.ts → environment-provider-5E82esWE.d.ts} +6 -3
- package/dist/{environment-provider-Bn3652YU.js → environment-provider-DKyMWQJd.js} +121 -17
- package/dist/environment-provider-DKyMWQJd.js.map +1 -0
- package/dist/environment-provider.d.ts +1 -1
- package/dist/environment-provider.js +1 -1
- package/dist/{graph-BbeHgLXH.js → graph-DwJXa1Ph.js} +3 -3
- package/dist/graph-DwJXa1Ph.js.map +1 -0
- package/dist/graph.d.ts +11 -3
- package/dist/graph.js +35 -4
- package/dist/graph.js.map +1 -1
- package/dist/{improvement-cycle-DKGDCukL.js → improvement-cycle-eiSv6aH4.js} +5 -5
- package/dist/{improvement-cycle-DKGDCukL.js.map → improvement-cycle-eiSv6aH4.js.map} +1 -1
- package/dist/{index-CIhkH7mq.d.ts → index-BnAiQVLD.d.ts} +290 -29
- package/dist/{index-CFMB9ux3.d.ts → index-Bs0uhf-y.d.ts} +2 -2
- package/dist/{index-Dk5X9eKg.d.ts → index-C9XTLVP1.d.ts} +4 -4
- package/dist/index.d.ts +7 -7
- package/dist/index.js +13 -13
- package/dist/intelligence.d.ts +4 -4
- package/dist/intelligence.js +6 -6
- package/dist/kernel.d.ts +6 -6
- package/dist/kernel.js +13 -11
- package/dist/{knowledge-BaAX0HVu.js → knowledge-Bmtj_7u7.js} +5 -5
- package/dist/{knowledge-BaAX0HVu.js.map → knowledge-Bmtj_7u7.js.map} +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-DRYApMiu.d.ts → loop-runner-bin-ChS5deJ0.d.ts} +3 -3
- package/dist/{loop-runner-bin-D63Tytdk.js → loop-runner-bin-GTN5wqCt.js} +3 -3
- package/dist/{loop-runner-bin-D63Tytdk.js.map → loop-runner-bin-GTN5wqCt.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/{materialization-Ct3I4wu3.js → materialization-CekWK6OO.js} +5 -3
- package/dist/materialization-CekWK6OO.js.map +1 -0
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +3 -3
- package/dist/mcp/index.js +5 -4
- package/dist/mcp/index.js.map +1 -1
- package/dist/{openai-tools-BBgjWYNw.js → openai-tools-BBj1QGJp.js} +2 -2
- package/dist/{openai-tools-BBgjWYNw.js.map → openai-tools-BBj1QGJp.js.map} +1 -1
- package/dist/{prepare-BAyaNoZu.js → prepare-Tip-2ZoZ.js} +2 -2
- package/dist/{prepare-BAyaNoZu.js.map → prepare-Tip-2ZoZ.js.map} +1 -1
- package/dist/primeintellect/index.d.ts +1 -1
- package/dist/{protected-model-port-T2UWrDNQ.js → protected-model-port-Dd3a1SRm.js} +2 -2
- package/dist/{protected-model-port-T2UWrDNQ.js.map → protected-model-port-Dd3a1SRm.js.map} +1 -1
- package/dist/provision-supervisor-zA__ayUX.js +1020 -0
- package/dist/provision-supervisor-zA__ayUX.js.map +1 -0
- package/dist/{redact-DvLf4x1m.d.ts → redact-DkRLcSiE.d.ts} +3 -3
- package/dist/run-layout-Cd_l2XWV.js +645 -0
- package/dist/run-layout-Cd_l2XWV.js.map +1 -0
- package/dist/{runtime-D5u1M6T5.d.ts → runtime-B2eZ76kG.d.ts} +3 -3
- package/dist/{runtime-CojgP-hr.js → runtime-CJNlF5wM.js} +16 -1095
- package/dist/runtime-CJNlF5wM.js.map +1 -0
- package/dist/{spawn-journal-Tgvp5VS5.js → spawn-journal--N8Ten1q.js} +3 -1
- package/dist/{spawn-journal-Tgvp5VS5.js.map → spawn-journal--N8Ten1q.js.map} +1 -1
- package/dist/{stream-agent-turn-DxQ3GOuR.d.ts → stream-agent-turn-ByY8po9W.d.ts} +2 -2
- package/dist/{stream-agent-turn-CKIpCbSq.js → stream-agent-turn-CPj9SqVm.js} +2 -2
- package/dist/{stream-agent-turn-CKIpCbSq.js.map → stream-agent-turn-CPj9SqVm.js.map} +1 -1
- package/dist/{structural-rollout-BUYA61iV.js → structural-rollout-BeAUK7Ta.js} +4 -4
- package/dist/{structural-rollout-BUYA61iV.js.map → structural-rollout-BeAUK7Ta.js.map} +1 -1
- package/dist/{supervise-Ci0RfWQF.js → supervise-HsRKOlKY.js} +405 -3374
- package/dist/supervise-HsRKOlKY.js.map +1 -0
- package/dist/{supervisor-Bt1XLCVq.js → supervisor-ChLgoYhG.js} +1620 -33
- package/dist/supervisor-ChLgoYhG.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +13 -12
- package/dist/testing.js.map +1 -1
- package/dist/{top-app-3rYfFPTW.js → top-app-DIBApkt1.js} +25 -9
- package/dist/top-app-DIBApkt1.js.map +1 -0
- package/dist/tui/bin.js +1 -1
- package/dist/tui/index.d.ts +9 -1
- package/dist/tui/index.js +3 -2
- package/dist/{types-DjVO-p7R.d.ts → types-a2ZZUl80.d.ts} +25 -2
- package/dist/{workspace-archive-B0Hqp2eJ.js → workspace-archive-DOZAeeKU.js} +2 -2
- package/dist/{workspace-archive-B0Hqp2eJ.js.map → workspace-archive-DOZAeeKU.js.map} +1 -1
- package/package.json +5 -4
- package/dist/candidate-execution-BbMbyhgC.js.map +0 -1
- package/dist/environment-provider-Bn3652YU.js.map +0 -1
- package/dist/graph-BbeHgLXH.js.map +0 -1
- package/dist/materialization-Ct3I4wu3.js.map +0 -1
- package/dist/run-layout-C2jgwsCq.js +0 -393
- package/dist/run-layout-C2jgwsCq.js.map +0 -1
- package/dist/runtime-CojgP-hr.js.map +0 -1
- package/dist/supervise-Ci0RfWQF.js.map +0 -1
- package/dist/supervisor-Bt1XLCVq.js.map +0 -1
- package/dist/top-app-3rYfFPTW.js.map +0 -1
package/dist/graph.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { m as ValidationError } from "./errors-CDZ8XsVj.js";
|
|
2
|
-
import { d as replaySpawnTree, i as InMemorySpawnJournal, l as materializeTreeView, o as closesCursorSlot, r as InMemoryResultBlobStore, u as pendingWaits, x as contentAddress } from "./spawn-journal
|
|
2
|
+
import { d as replaySpawnTree, i as InMemorySpawnJournal, l as materializeTreeView, o as closesCursorSlot, r as InMemoryResultBlobStore, u as pendingWaits, x as contentAddress } from "./spawn-journal--N8Ten1q.js";
|
|
3
3
|
import { t as addSpend } from "./util-D6ZEuBMi.js";
|
|
4
|
-
import {
|
|
5
|
-
import { i as workerFromBackend, s as supervisorAgent } from "./supervise-
|
|
4
|
+
import { J as createBudgetPool, a as uncertainSpawnBudgets, at as createExecutorRegistry, i as sumMeasuredSpendFromEvents, l as runFinalizer, o as bestDelivered, p as createScope, r as maxSeqOf, s as collectDelivered } from "./supervisor-ChLgoYhG.js";
|
|
5
|
+
import { i as workerFromBackend, s as supervisorAgent } from "./supervise-HsRKOlKY.js";
|
|
6
6
|
import { t as assertAuthoredCode } from "./authored-code-DzYtiflw.js";
|
|
7
|
-
import { t as GraphEdgeCapError } from "./graph-
|
|
7
|
+
import { t as GraphEdgeCapError } from "./graph-DwJXa1Ph.js";
|
|
8
8
|
//#region src/runtime/graph/condition.ts
|
|
9
9
|
/**
|
|
10
10
|
* The ONE predicate tree: every guard in a graph — an edge `guard`, a filter projection's
|
|
@@ -725,6 +725,8 @@ function applyGraphFoldEvent(state, ev, compiled) {
|
|
|
725
725
|
return;
|
|
726
726
|
}
|
|
727
727
|
case "join-state": {
|
|
728
|
+
const released = instanceOf(state, ev.instance);
|
|
729
|
+
if (released) released.waveConsumed = true;
|
|
728
730
|
for (const edgeId of ev.satisfiedBy) {
|
|
729
731
|
const folded = state.edges.get(edgeId);
|
|
730
732
|
if (!folded) continue;
|
|
@@ -1750,6 +1752,34 @@ async function runGraphLoop(engine, compiled, task, options, wakes, onWakeSignal
|
|
|
1750
1752
|
});
|
|
1751
1753
|
await spawnInstance(label);
|
|
1752
1754
|
};
|
|
1755
|
+
/**
|
|
1756
|
+
* Journal the `join-state` a crashed release never wrote. The consuming set
|
|
1757
|
+
* is re-derived from the SAME decision the crashed process made: its gating
|
|
1758
|
+
* edges are still folded exactly as they were when it released (their
|
|
1759
|
+
* verdicts were journaled first), so `decideJoin` answers identically.
|
|
1760
|
+
*/
|
|
1761
|
+
const consumeWaveAfterCrash = async (instance) => {
|
|
1762
|
+
const node = compiled.nodes.get(instance.node);
|
|
1763
|
+
if (!node) return;
|
|
1764
|
+
const gating = node.inbound.map((edge) => ({
|
|
1765
|
+
edge,
|
|
1766
|
+
folded: state.edges.get(edge.id)
|
|
1767
|
+
}));
|
|
1768
|
+
const decision = decideJoin(node.join, gating);
|
|
1769
|
+
if (!decision.release) return;
|
|
1770
|
+
const consumedPending = gating.filter((entry) => entry.folded?.state === "pending").map((entry) => entry.edge.id);
|
|
1771
|
+
await emit({
|
|
1772
|
+
kind: "join-state",
|
|
1773
|
+
id: instance.instance,
|
|
1774
|
+
node: instance.node,
|
|
1775
|
+
rule: node.join,
|
|
1776
|
+
satisfiedBy: decision.consuming.map(({ edge }) => edge.id),
|
|
1777
|
+
consumedPending,
|
|
1778
|
+
instance: instance.instance,
|
|
1779
|
+
seq: engineSeq++,
|
|
1780
|
+
at: stamp()
|
|
1781
|
+
});
|
|
1782
|
+
};
|
|
1753
1783
|
const tryRelease = async (nodeId) => {
|
|
1754
1784
|
const node = compiled.nodes.get(nodeId);
|
|
1755
1785
|
const folded = state.nodes.get(nodeId);
|
|
@@ -1963,6 +1993,7 @@ async function runGraphLoop(engine, compiled, task, options, wakes, onWakeSignal
|
|
|
1963
1993
|
async function reenterAfterCrash() {
|
|
1964
1994
|
for (const instance of [...state.instances.values()]) {
|
|
1965
1995
|
if (instance.status === "released") {
|
|
1996
|
+
if (instance.waveConsumed !== true) await consumeWaveAfterCrash(instance);
|
|
1966
1997
|
await spawnInstance(instance.instance);
|
|
1967
1998
|
continue;
|
|
1968
1999
|
}
|