Remove the mutable `streamFallback` global state and instead pass the
`VariableStore` as an explicit argument to `getCombined` and related
functions. This ensures correctness by avoiding reliance on mutable
module state during reactivity calculations.
Introduce a distinction between base values (set via `/set` or
declarations) and active modifiers (applied via tags). This ensures
tag transitions and numeric modifiers are calculated correctly during
cascades.
- Refactor `VariableView` to use a flat list with hover popups for
declarations and active modifiers.
- Update `command-dispatcher` to use `getCombined` for accurate
value lookups and `setBase` for variable updates.
- Update `var-reactivity` to manage `baseValues`, `activeMods`, and
`sourceActivations` separately.
- Export new utility functions for accessing combined values,
modifiers, and declaration expressions.
Implement `computeInitialValues` to calculate the starting state of
declared variables and seed them into the journal stream store during
the completions initialization process.
Add support for `role=declare` blocks in markdown to allow for
dynamic variable declarations and tag-based modifiers.
- Implement `declare-parser` to parse CSV-formatted declaration blocks.
- Implement `var-reactivity` to manage dependency graphs, topological
sorting, and cascading updates when variables change.
- Implement `variable-expression` to evaluate arithmetic, dice rolls,
and math functions within expressions.