@rulvar/core 1.182.0 → 1.183.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.d.ts +7 -3
- package/dist/index.js +8 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -10724,15 +10724,19 @@ interface DecisionChainRow {
|
|
|
10724
10724
|
status: EntryStatus;
|
|
10725
10725
|
/** Present when the journaled value names its decision type. */
|
|
10726
10726
|
decisionType?: string;
|
|
10727
|
-
/** Present on resolutions: who resolved. */
|
|
10727
|
+
/** Present on resolutions: who resolved (canonical `entry.resolution.by` first). */
|
|
10728
10728
|
by?: ResolutionBy;
|
|
10729
10729
|
/** Present on resolutions and abandons: the referenced seq. */
|
|
10730
10730
|
target?: number;
|
|
10731
|
-
/** Present on abandons: the seq of the sanctioning entry. */
|
|
10731
|
+
/** Present on abandons: the seq of the sanctioning entry (canonical `entry.abandon`). */
|
|
10732
10732
|
authorizedBy?: number;
|
|
10733
10733
|
/** Present on class-decision resolutions: the class decision's seq. */
|
|
10734
10734
|
decisionRef?: number;
|
|
10735
|
-
/**
|
|
10735
|
+
/**
|
|
10736
|
+
* The journaled value verbatim when the entry carries one; on a
|
|
10737
|
+
* canonical resolution with no entry value, the resolution's own
|
|
10738
|
+
* decision value (what the ask was resolved WITH).
|
|
10739
|
+
*/
|
|
10736
10740
|
value?: Json;
|
|
10737
10741
|
}
|
|
10738
10742
|
/**
|
package/dist/index.js
CHANGED
|
@@ -2777,11 +2777,14 @@ function reduceDecisionChain(entries) {
|
|
|
2777
2777
|
const rows = [];
|
|
2778
2778
|
for (const entry of entries) {
|
|
2779
2779
|
if (!DECISION_CHAIN_KINDS.includes(entry.kind)) continue;
|
|
2780
|
+
const resolution = entry.kind === "resolution" ? entry.resolution : void 0;
|
|
2781
|
+
const abandon = entry.kind === "abandon" ? entry.abandon : void 0;
|
|
2780
2782
|
const decisionType = stringField(entry.value, "decisionType");
|
|
2781
|
-
const by = stringField(entry.value, "by");
|
|
2782
|
-
const target = numberField(entry.value, "target") ?? entry.ref;
|
|
2783
|
-
const authorizedBy = numberField(entry.value, "authorizedBy");
|
|
2784
|
-
const decisionRef = numberField(entry.value, "decisionRef");
|
|
2783
|
+
const by = resolution?.by ?? stringField(entry.value, "by");
|
|
2784
|
+
const target = resolution?.target ?? abandon?.target ?? numberField(entry.value, "target") ?? entry.ref;
|
|
2785
|
+
const authorizedBy = abandon?.authorizedBy ?? numberField(entry.value, "authorizedBy");
|
|
2786
|
+
const decisionRef = resolution?.decisionRef ?? numberField(entry.value, "decisionRef");
|
|
2787
|
+
const value = entry.value ?? resolution?.value;
|
|
2785
2788
|
rows.push({
|
|
2786
2789
|
seq: entry.seq,
|
|
2787
2790
|
kind: entry.kind,
|
|
@@ -2793,7 +2796,7 @@ function reduceDecisionChain(entries) {
|
|
|
2793
2796
|
...target === void 0 ? {} : { target },
|
|
2794
2797
|
...authorizedBy === void 0 ? {} : { authorizedBy },
|
|
2795
2798
|
...decisionRef === void 0 ? {} : { decisionRef },
|
|
2796
|
-
...
|
|
2799
|
+
...value === void 0 ? {} : { value }
|
|
2797
2800
|
});
|
|
2798
2801
|
}
|
|
2799
2802
|
return rows.sort((a, b) => a.seq - b.seq);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulvar/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.183.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",
|