@rulvar/core 1.105.0 → 1.106.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/dist/index.js +10 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17623,7 +17623,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
17623
17623
|
}, { childScope });
|
|
17624
17624
|
const dispatched = internals.replayer.snapshot().find((entry) => entry.seq === record.handle);
|
|
17625
17625
|
if (dispatched !== void 0) {
|
|
17626
|
-
for (const prior of internals.replayer.snapshot()) if (prior.kind === "agent" && prior.status === "running" && prior.seq !== record.handle && prior.scope === dispatched.scope && prior.key === dispatched.key &&
|
|
17626
|
+
for (const prior of internals.replayer.snapshot()) if (prior.kind === "agent" && prior.status === "running" && prior.seq !== record.handle && prior.scope === dispatched.scope && prior.key === dispatched.key && !records.has(prior.seq)) records.set(prior.seq, record);
|
|
17627
17627
|
}
|
|
17628
17628
|
}
|
|
17629
17629
|
for (const entry of internals.replayer.snapshot()) {
|
|
@@ -17700,7 +17700,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
17700
17700
|
extension?.onWake?.(digest);
|
|
17701
17701
|
};
|
|
17702
17702
|
const buildDigest = (ordinal) => {
|
|
17703
|
-
const undelivered = [...
|
|
17703
|
+
const undelivered = [...byOrdinal.values()].filter((record) => record.settled !== void 0 && !deliveredNodeIds.has(record.nodeId)).sort((a, b) => a.spawnOrdinal - b.spawnOrdinal);
|
|
17704
17704
|
const escalations = [];
|
|
17705
17705
|
for (const record of undelivered) {
|
|
17706
17706
|
const settled = record.settled;
|
|
@@ -17891,7 +17891,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
17891
17891
|
})) throw new ConfigError("child_terminal can never fire: every referenced child already settled and was delivered in a prior digest");
|
|
17892
17892
|
}
|
|
17893
17893
|
if (trigger.kind === "escalation") {
|
|
17894
|
-
if (![...
|
|
17894
|
+
if (![...byOrdinal.values()].some((record) => record.settled === void 0 || record.settled.status === "escalated" && !deliveredNodeIds.has(record.nodeId))) throw new ConfigError("escalation can never fire: no live or undelivered escalated children");
|
|
17895
17895
|
}
|
|
17896
17896
|
}
|
|
17897
17897
|
const ordinal = wakeOrdinal;
|
|
@@ -17902,9 +17902,9 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
17902
17902
|
await internals.replayer.flush();
|
|
17903
17903
|
const entryRef = external.pending().find((item) => item.key === wakeKey && item.scope === wakeScope)?.entryRef;
|
|
17904
17904
|
const isReady = (trigger) => {
|
|
17905
|
-
const undelivered = [...
|
|
17905
|
+
const undelivered = [...byOrdinal.values()].filter((record) => record.settled !== void 0 && !deliveredNodeIds.has(record.nodeId));
|
|
17906
17906
|
switch (trigger.kind) {
|
|
17907
|
-
case "quiescence": return [...
|
|
17907
|
+
case "quiescence": return [...byOrdinal.values()].every((record) => record.settled !== void 0) && (extension?.quiescent?.() ?? true);
|
|
17908
17908
|
case "child_terminal":
|
|
17909
17909
|
if (trigger.handles === void 0) return undelivered.length > 0;
|
|
17910
17910
|
return trigger.handles.some((handle) => undelivered.some((record) => record.handle === handle));
|
|
@@ -18142,7 +18142,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
18142
18142
|
*/
|
|
18143
18143
|
const validationChildren = () => {
|
|
18144
18144
|
const salvageOutputOn = opts?.acceptance?.acceptValidatedTerminalOutputOnLimit === true;
|
|
18145
|
-
return [...
|
|
18145
|
+
return [...byOrdinal.values()].sort((a, b) => a.spawnOrdinal - b.spawnOrdinal).map((record) => ({
|
|
18146
18146
|
handle: record.handle,
|
|
18147
18147
|
nodeId: record.nodeId,
|
|
18148
18148
|
status: record.settled?.status ?? "running",
|
|
@@ -18378,7 +18378,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
18378
18378
|
return {
|
|
18379
18379
|
forcedFinishFallback: true,
|
|
18380
18380
|
planHash: capValue?.snapshot?.planHash ?? "",
|
|
18381
|
-
completed: [...
|
|
18381
|
+
completed: [...byOrdinal.values()].filter((record) => record.settled !== void 0).sort((a, b) => a.spawnOrdinal - b.spawnOrdinal).map((record) => digestOf(record, record.settled))
|
|
18382
18382
|
};
|
|
18383
18383
|
};
|
|
18384
18384
|
/**
|
|
@@ -18453,7 +18453,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
18453
18453
|
*/
|
|
18454
18454
|
const reconcileIncremental = async (draft, spec) => {
|
|
18455
18455
|
synthesisSettleFrozen = true;
|
|
18456
|
-
const settledRecords = [...
|
|
18456
|
+
const settledRecords = [...byOrdinal.values()].filter((record) => record.settled !== void 0).sort((a, b) => a.spawnOrdinal - b.spawnOrdinal);
|
|
18457
18457
|
const sections = [];
|
|
18458
18458
|
for (const record of settledRecords) {
|
|
18459
18459
|
const settled = record.settled;
|
|
@@ -18646,7 +18646,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
18646
18646
|
const fullContext = spec.context === "full";
|
|
18647
18647
|
const synthesisToolNames = /* @__PURE__ */ new Set([FINISH_TOOL_NAME, ...exposeTools ? [GET_CHILD_RESULT_TOOL_NAME, READ_CHILD_ARTIFACT_TOOL_NAME] : []]);
|
|
18648
18648
|
const synthesisTools = buildOrchestratorTools(orchestratorRuntime, fullCardText, { childResultTools: exposeTools }).filter((tool) => synthesisToolNames.has(tool.name));
|
|
18649
|
-
const settledEntries = [...
|
|
18649
|
+
const settledEntries = [...byOrdinal.values()].filter((record) => record.settled !== void 0).sort((a, b) => a.spawnOrdinal - b.spawnOrdinal).map((record) => [record.handle, record]);
|
|
18650
18650
|
const settledDigests = settledEntries.map(([handle, record]) => ({
|
|
18651
18651
|
...exposeTools ? { handle } : {},
|
|
18652
18652
|
...digestOf(record, record.settled)
|
|
@@ -18899,7 +18899,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
18899
18899
|
let hardDegraded = 0;
|
|
18900
18900
|
const acceptPartial = opts.acceptance.acceptPartialChildren === true;
|
|
18901
18901
|
const acceptOutput = opts.acceptance.acceptValidatedTerminalOutputOnLimit === true;
|
|
18902
|
-
const sortedRecords = [...
|
|
18902
|
+
const sortedRecords = [...byOrdinal.values()].sort((a, b) => a.spawnOrdinal - b.spawnOrdinal);
|
|
18903
18903
|
for (const record of sortedRecords) {
|
|
18904
18904
|
const status = record.settled?.status ?? "running";
|
|
18905
18905
|
childStatusCounts[status] = (childStatusCounts[status] ?? 0) + 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulvar/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.106.0",
|
|
4
4
|
"description": "Rulvar core: L0 contracts, journal kernel, ctx primitives, agent runtime, model router, tool system, dynamic orchestrator, InMemory and JSONL stores, event stream.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|