rulvar API reference / @rulvar/core / JournalMatcher
Class: JournalMatcher
Defined in: packages/core/src/journal/matching.ts:89
The matching engine over a loaded journal. Consumption is per logical operation (running/terminal pairs count once); candidates are consumed in journal order, first unconsumed match wins (this also resolves cross-version double matches deterministically).
Constructors
Constructor
new JournalMatcher(entries, options?): JournalMatcher;Defined in: packages/core/src/journal/matching.ts:104
Parameters
| Parameter | Type |
|---|---|
entries | readonly JournalEntry[] |
options? | { disposition?: (op) => OperationDisposition; keyRing?: KeyRing; } |
options.disposition? | (op) => OperationDisposition |
options.keyRing? | KeyRing |
Returns
JournalMatcher
Methods
consume()
consume(runningSeq): void;Defined in: packages/core/src/journal/matching.ts:291
Marks an operation consumed without matching (fold-driven paths).
Parameters
| Parameter | Type |
|---|---|
runningSeq | number |
Returns
void
match()
match(
scope,
identity,
mode): MatchResult;Defined in: packages/core/src/journal/matching.ts:219
Forward-matches one live call. A miss does not advance any cursor and does not extinguish future hits: the scan always starts at the scope head and skips consumed operations, so insertion stability holds by construction.
Parameters
| Parameter | Type |
|---|---|
scope | string |
identity | IdentityInput |
mode | "scoped" | "cache" | "never" |
Returns
registerAlias()
registerAlias(donorPrefix, targetPrefix): void;Defined in: packages/core/src/journal/matching.ts:160
Registers a scope-prefix rewrite (node.link, DEF-5): donorPrefix maps to targetPrefix for forward-matching purposes; the per-scope cursors work unchanged at every nested level, so partial subtree reuse falls out for free at any depth.
Parameters
| Parameter | Type |
|---|---|
donorPrefix | string |
targetPrefix | string |
Returns
void
report()
report(): ResumeReport;Defined in: packages/core/src/journal/matching.ts:295
Returns
setAliasDisposition()
setAliasDisposition(disposition): void;Defined in: packages/core/src/journal/matching.ts:150
The disposition applied to alias-sourced candidates (DEF-5): the skipped overlay from abandon is bypassed ONLY through the alias, so entries regain their pre-abandon terminal status for matching in the NEW scope; the standalone old scope stays skipped.
Parameters
| Parameter | Type |
|---|---|
disposition | (op) => OperationDisposition |
Returns
void
setDisposition()
setDisposition(disposition): void;Defined in: packages/core/src/journal/matching.ts:140
M2-T06 swaps in the full DEF-1 predicate after folds are built.
Parameters
| Parameter | Type |
|---|---|
disposition | (op) => OperationDisposition |
Returns
void