@tangle-network/agent-runtime 2.3.7 → 2.3.8
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-BAUOO9T-.d.ts → activation-Cks1h3Nw.d.ts} +2 -2
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{delegate-oqIu6L-E.js → delegate-CHdWyLz9.js} +2 -2
- package/dist/{delegate-oqIu6L-E.js.map → delegate-CHdWyLz9.js.map} +1 -1
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +2 -2
- package/dist/{graph-FLVwpg79.js → graph-oOdDpXFH.js} +3 -3
- package/dist/graph-oOdDpXFH.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/intelligence.d.ts +2 -2
- package/dist/kernel.d.ts +1 -1
- package/dist/kernel.js +4 -4
- package/dist/{loop-runner-t4qfcieO.d.ts → loop-runner-Bkvx4Saw.d.ts} +2 -2
- package/dist/{loop-runner-BV0n-WTM.js → loop-runner-Cy1K7f-A.js} +2 -2
- package/dist/{loop-runner-BV0n-WTM.js.map → loop-runner-Cy1K7f-A.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 +2 -2
- package/dist/profiles.d.ts +1 -1
- package/dist/{runtime-BlAFJYEs.js → runtime-CWZ9q7lU.js} +4 -4
- package/dist/{runtime-BlAFJYEs.js.map → runtime-CWZ9q7lU.js.map} +1 -1
- package/dist/{server-DxaNVGx-.js → server-DyTbsg7n.js} +2 -2
- package/dist/{server-DxaNVGx-.js.map → server-DyTbsg7n.js.map} +1 -1
- package/dist/{supervise-Dm0Goys6.js → supervise-D1eYde7p.js} +45 -6
- package/dist/supervise-D1eYde7p.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +10 -10
- package/dist/tui/index.d.ts +1 -1
- package/dist/{types-BGGZDz0I.d.ts → types-DzS0kBeK.d.ts} +4 -2
- package/package.json +1 -1
- package/dist/graph-FLVwpg79.js.map +0 -1
- package/dist/supervise-Dm0Goys6.js.map +0 -1
|
@@ -1667,6 +1667,16 @@ function graphSubtaskOf(profile) {
|
|
|
1667
1667
|
return raw === void 0 ? void 0 : parseGraphSubtaskTopology(raw);
|
|
1668
1668
|
}
|
|
1669
1669
|
// src/runtime/supervise/graph-flow.ts
|
|
1670
|
+
/**
|
|
1671
|
+
* Flow graphs: an `AgentGraph` with `entry`. Runtime spawns the entries and traverses `routes`
|
|
1672
|
+
* edges itself, so a fixed pipeline, a conditional branch, a bounded repair loop, a stop rule and a
|
|
1673
|
+
* human gate run from graph data with no model root and no caller brain.
|
|
1674
|
+
*
|
|
1675
|
+
* This module owns what a flow adds to `runGraph`: every refusal a flow earns before compute, the
|
|
1676
|
+
* coordination form of the flow (`RouteFlow`, which the manager's route routing runs), the
|
|
1677
|
+
* runtime-owned root that hosts it, and the graph-owned finalizer that turns the flow's outputs
|
|
1678
|
+
* into the run's result. `runGraph` stays the one team executor; `supervise()` stays its substrate.
|
|
1679
|
+
*/
|
|
1670
1680
|
/** A flow node's usable settle matched no routes edge leaving it (`unrouted`), or a fired edge named
|
|
1671
1681
|
* a node that still had a running worker (`target-live`). The flow spawned nothing more; the full
|
|
1672
1682
|
* evidence rides on the error, shaped like `GraphEdgeCapError`. */
|
|
@@ -2097,13 +2107,18 @@ function flowOfSubtask(flow, mapItem) {
|
|
|
2097
2107
|
*/
|
|
2098
2108
|
function createFlowRun() {
|
|
2099
2109
|
const outputs = /* @__PURE__ */ new Map();
|
|
2110
|
+
const nodeOf = /* @__PURE__ */ new Map();
|
|
2111
|
+
let settled = {};
|
|
2100
2112
|
let stopped;
|
|
2101
2113
|
let unrouted;
|
|
2102
2114
|
const observe = (event) => {
|
|
2103
2115
|
if (event.type !== "route") return;
|
|
2104
2116
|
const step = event.route;
|
|
2105
|
-
if (step.kind === "
|
|
2106
|
-
|
|
2117
|
+
if (step.kind === "traversal" && step.workerId !== void 0) nodeOf.set(step.workerId, step.to);
|
|
2118
|
+
if (step.kind === "output") {
|
|
2119
|
+
nodeOf.set(step.workerId, step.node);
|
|
2120
|
+
outputs.set(step.node, step.result);
|
|
2121
|
+
} else if (step.kind === "stopped") stopped ??= {
|
|
2107
2122
|
...step.edge === void 0 ? {} : { edge: step.edge },
|
|
2108
2123
|
at: step.at,
|
|
2109
2124
|
workerId: step.workerId,
|
|
@@ -2111,7 +2126,13 @@ function createFlowRun() {
|
|
|
2111
2126
|
};
|
|
2112
2127
|
else if (step.kind === "unrouted") unrouted ??= step;
|
|
2113
2128
|
};
|
|
2114
|
-
const finalizer = () =>
|
|
2129
|
+
const finalizer = ({ delivered }) => {
|
|
2130
|
+
settled = Object.fromEntries(delivered.flatMap((worker) => {
|
|
2131
|
+
const node = nodeOf.get(worker.id);
|
|
2132
|
+
return node === void 0 || !("out" in worker) ? [] : [[node, worker.out]];
|
|
2133
|
+
}));
|
|
2134
|
+
return stopped !== void 0 || unrouted !== void 0 || outputs.size === 0 ? void 0 : Object.fromEntries(outputs);
|
|
2135
|
+
};
|
|
2115
2136
|
const conclude = (result) => {
|
|
2116
2137
|
if (unrouted !== void 0) return {
|
|
2117
2138
|
kind: "unrouted",
|
|
@@ -2136,11 +2157,29 @@ function createFlowRun() {
|
|
|
2136
2157
|
};
|
|
2137
2158
|
};
|
|
2138
2159
|
const failure = () => unrouted !== void 0 ? `${unrouted.reason} at '${unrouted.node}': ${unrouted.detail}` : stopped !== void 0 ? `stopped at '${stopped.at}': ${stopped.reason}` : void 0;
|
|
2160
|
+
/** Every delivered node's latest usable output, terminal or not, as of the last finalize. */
|
|
2161
|
+
const settledOutputs = () => settled;
|
|
2139
2162
|
return {
|
|
2140
2163
|
observe,
|
|
2141
2164
|
finalizer,
|
|
2142
2165
|
conclude,
|
|
2143
|
-
failure
|
|
2166
|
+
failure,
|
|
2167
|
+
settledOutputs
|
|
2168
|
+
};
|
|
2169
|
+
}
|
|
2170
|
+
/**
|
|
2171
|
+
* A stored route check may name any flow node, not only a terminal one: its conditions read each
|
|
2172
|
+
* delivered node's latest usable output, under the terminal outputs. The deliverable the run
|
|
2173
|
+
* returns stays `{ [terminal node]: result }`. Run 6f167e9e checked fetch-pr's merge_sha and
|
|
2174
|
+
* review-pr's approval; with only terminal outputs in view it was false whatever fetch-pr found.
|
|
2175
|
+
*/
|
|
2176
|
+
function flowRouteDeliverable(deliverable, flow) {
|
|
2177
|
+
return {
|
|
2178
|
+
...deliverable,
|
|
2179
|
+
check: ((out, context) => deliverable.check(context === void 0 && isRecord(out) ? {
|
|
2180
|
+
...flow.settledOutputs(),
|
|
2181
|
+
...out
|
|
2182
|
+
} : out, context))
|
|
2144
2183
|
};
|
|
2145
2184
|
}
|
|
2146
2185
|
// src/runtime/supervise/graph-overlay.ts
|
|
@@ -9418,6 +9457,6 @@ function superviseWithContext(profile, task, opts, brain) {
|
|
|
9418
9457
|
...signal === void 0 ? {} : { signal }
|
|
9419
9458
|
}, brain));
|
|
9420
9459
|
}
|
|
9421
|
-
export {
|
|
9460
|
+
export { validateGraphTopology as A, allWorkersStalled as B, flowRootProfile as C, validateFlowGraph as D, routeFlowOf as E, dumbContinuationPassPrompt as F, areaUnderCurve as G, noProgressFor as H, formatPromptHandle as I, renderAnytimeTable as J, bestSoFar as K, kernelPromptRegistry as L, createPromptRegistry as M, delegatesWorkerBriefPrompt as N, defaultEdgeTraversalCap as O, dumbContinuationFailPrompt as P, naiveContinuationPrompt as R, createFlowRun as S, journaledGateDecider as T, plateau as U, anyOf as V, anytimeReport as W, createSupervisorSpanRecorder as Y, coordinationControlToolNames as _, superviseRootProfile as a, createGraphOverlay as b, retryPreSpawnRefusals as c, supervisorAgent as d, supervisorAgentWithTestBrain as f, serveCoordinationMcp as g, composeReentryTask as h, profileGuidanceComposer as i, analyzesFindingsReportPrompt as j, graphRootProfile as k, withWorkerSpawnRetry as l, UNPROVEN_CONTINUITY as m, superviseFleetCapabilities as n, isPreSpawnExecutorFailure as o, runToolSpans as p, plateauLength as q, superviseWithTestBrain as r, resolveWorkerSpawnRetry as s, supervise as t, workerFromBackend as u, driverAgent as v, flowRouteDeliverable as w, GraphRouteError as x, runBrainLoop as y, promptHandle as z };
|
|
9422
9461
|
|
|
9423
|
-
//# sourceMappingURL=supervise-
|
|
9462
|
+
//# sourceMappingURL=supervise-D1eYde7p.js.map
|