@tangle-network/agent-runtime 10.0.13 → 10.0.14
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/agent.js +1 -1
- package/dist/{delegate-BKD8kvLL.js → delegate-BCilDCSO.js} +2 -2
- package/dist/{delegate-BKD8kvLL.js.map → delegate-BCilDCSO.js.map} +1 -1
- package/dist/durable.js +2 -2
- package/dist/{graph-CWtb5mlR.js → graph-CDegLFf5.js} +2 -2
- package/dist/{graph-CWtb5mlR.js.map → graph-CDegLFf5.js.map} +1 -1
- package/dist/index.js +3 -3
- package/dist/kernel.js +4 -4
- package/dist/{loop-runner-TFs-O4vJ.js → loop-runner-D1JzSiLo.js} +2 -2
- package/dist/{loop-runner-TFs-O4vJ.js.map → loop-runner-D1JzSiLo.js.map} +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +2 -2
- package/dist/mcp/index.js +2 -2
- package/dist/{runtime-4UPWxjjq.js → runtime-_AK9P7qx.js} +4 -4
- package/dist/{runtime-4UPWxjjq.js.map → runtime-_AK9P7qx.js.map} +1 -1
- package/dist/{server-BPYmJQvn.js → server-C4IwVj_Z.js} +2 -2
- package/dist/{server-BPYmJQvn.js.map → server-C4IwVj_Z.js.map} +1 -1
- package/dist/{supervise-aJRMwxRm.js → supervise-CJLO16hM.js} +12 -4
- package/dist/supervise-CJLO16hM.js.map +1 -0
- package/dist/testing.js +10 -10
- package/package.json +1 -1
- package/dist/supervise-aJRMwxRm.js.map +0 -1
|
@@ -5096,6 +5096,13 @@ function budgetStop(budget, atMs) {
|
|
|
5096
5096
|
if (budget.deadlineMs > 0 && atMs >= budget.deadlineMs) return "deadline";
|
|
5097
5097
|
return budget.tokensCapped !== false && budget.tokensLeft <= 0 || budget.iterationsCapped !== false && budget.iterationsLeft <= 0 || budget.usdCapped && (budget.usdLeft <= 0 || budget.usdKnown === false) || Object.values(budget.resources ?? {}).some((r) => !r.known || r.remaining <= 0) ? "budget-exhausted" : void 0;
|
|
5098
5098
|
}
|
|
5099
|
+
/** A spent channel that nothing can refill. A live run regains budget only from a settling child's
|
|
5100
|
+
* refund, so a spent token or known resource channel with nothing reserved stays spent until a
|
|
5101
|
+
* cancel or the deadline; pausing on it only holds the root for an operator. */
|
|
5102
|
+
function budgetCannotRefill(budget) {
|
|
5103
|
+
if (budget.tokensCapped !== false && budget.tokensLeft <= 0 && budget.reservedTokens <= 0) return true;
|
|
5104
|
+
return Object.values(budget.resources ?? {}).some((r) => r.known && r.remaining <= 0 && r.reserved <= 0);
|
|
5105
|
+
}
|
|
5099
5106
|
/** The cause an admission or continuation refusal carries: it has no failure of its own. */
|
|
5100
5107
|
function admissionError(stop) {
|
|
5101
5108
|
return new ValidationError(`driver admission: ${stop}`);
|
|
@@ -5213,11 +5220,11 @@ var DriverRetryLoop = class {
|
|
|
5213
5220
|
madeProgress: false
|
|
5214
5221
|
});
|
|
5215
5222
|
}
|
|
5216
|
-
/** True when `stop` becomes a pause: the caller opted in, the stop is one the header names,
|
|
5217
|
-
* neither the run nor the manager's own stop has fired. */
|
|
5223
|
+
/** True when `stop` becomes a pause: the caller opted in, the stop is one the header names, a
|
|
5224
|
+
* spent budget could still be refunded, and neither the run nor the manager's own stop has fired. */
|
|
5218
5225
|
pausesStop(stop) {
|
|
5219
5226
|
const { run } = this;
|
|
5220
|
-
return run.stopPause !== void 0 && PAUSED_STOPS.has(stop) && !run.signal.aborted && run.stopSignal?.aborted !== true;
|
|
5227
|
+
return run.stopPause !== void 0 && PAUSED_STOPS.has(stop) && !(stop === "budget-exhausted" && budgetCannotRefill(run.budget())) && !run.signal.aborted && run.stopSignal?.aborted !== true;
|
|
5221
5228
|
}
|
|
5222
5229
|
/** End the loop on `stop` with `record` (when the stop has one), or pause an opted-in root. */
|
|
5223
5230
|
async stopOrPause(error, stop, record) {
|
|
@@ -5660,6 +5667,7 @@ var DriverRetryLoop = class {
|
|
|
5660
5667
|
* open workers, and counts barren drives only after a model event in this process.
|
|
5661
5668
|
*
|
|
5662
5669
|
* Root stop-pauses wait on recoverable stops; they cannot reset an unchanged failure streak.
|
|
5670
|
+
* A spent budget pauses only while a reservation could refund it.
|
|
5663
5671
|
* Cancellation ends the wait; a steer wakes it but grants no admission.
|
|
5664
5672
|
*/
|
|
5665
5673
|
function assertContinuationPolicy(continuation) {
|
|
@@ -9502,4 +9510,4 @@ function superviseWithContext(profile, task, opts, brain) {
|
|
|
9502
9510
|
}
|
|
9503
9511
|
export { validateGraphTopology as A, allWorkersStalled as B, createFlowRun 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, GraphRouteError as S, journaledGateDecider as T, plateau as U, anyOf as V, anytimeReport as W, createSupervisorSpanRecorder as Y, graphFlowSpawnProfile as _, bridgeProfileRefusal as a, serveCoordinationMcp as b, ASSISTANT_REASONING_SPAN as c, runToolSpans as d, UNPROVEN_CONTINUITY as f, createGraphOverlay as g, runBrainLoop as h, workerFromBackend as i, analyzesFindingsReportPrompt as j, graphRootProfile as k, ASSISTANT_TEXT_SPAN as l, driverAgent as m, superviseFleetCapabilities as n, supervisorAgent as o, composeReentryTask as p, plateauLength as q, superviseWithTestBrain as r, supervisorAgentWithTestBrain as s, supervise as t, rootStreamToolSpans as u, profileGuidanceComposer as v, flowRootProfile as w, coordinationControlToolNames as x, superviseRootProfile as y, promptHandle as z };
|
|
9504
9512
|
|
|
9505
|
-
//# sourceMappingURL=supervise-
|
|
9513
|
+
//# sourceMappingURL=supervise-CJLO16hM.js.map
|