This site describes solve-engine as it is on main: 2.43.0, which npm does not have yet. npm installs 2.40.0, so a page may show an answer that version does not give yet.
LINES_PACKAGE
const LINES_PACKAGE: IEnginePackage;Defined in: packages/engine/src/packages/lines/LinesPackage.ts:62
Cross-line data access, reading another line’s cached result from
inside an expression. Confirmed by FOUR independent competitor apps
wanting the exact same underlying capability (Numi’s prev, Notes
Calculator’s line<N>, Numbr’s sum/total-to-header, NumPad’s
line<N> plus range aggregation). See the internal parity notes’
“Confirmed engine limitations” item 1, now closed.
Built entirely on vm/VM.ts’s LineExecutionContext, threaded
optionally through CALL_PLUGIN, every handler here explicitly checks
for Pending/Error/unevaluated lines before doing arithmetic (see
LinesPluginFunctions.ts’s module doc) rather than silently coercing
via .toNumber() (which returns 0 for both Pending and Error).
Trigger-word collision decisions (this codebase’s established
phrase-fusion-vs-bare-keyword policy, see ARCHITECTURE.md §5.1):
prev, bare keyword (nothing to phrase-fuse against, same shape asclamp). Accepted risk.line1/line 1, normalizer-fused intoLINE_REF, never claims barelineas a keyword (:line = 5stays untouched). Thel1/l 1short alias documented by some competitors is deliberately NOT implemented in this pass,lis too common a variable name; shipline<N>first, add a narrowerl<N>form later if real usage wants it.line deleted, normalizer-fused into the sameLINE_REFtoken, is what a reference becomes when its line is deleted and a host keeps references in step (LanguageService.shiftLineReferences). It answers with the namedLINE_REFERENCE_DELETEDerror. Two identifiers side by side had no reading before, so it takes nothing that already meant something.sum(/total(/average(, normalizer-fused ONLY when immediately followed byLPAREN, so:sum = 100and MathPhrases’ existing"total of X, Y"phrase (no paren after “of”) are both unaffected.- “aggregate everything above until a blank line/heading”
phrase-fused as
"total above"/"sum above"/"average above"(deliberately NOT Numi/Numbr’s baretotal/sumwording, that’s exactly the bare-keyword collision class this codebase already regressed on once, seeMathPhrasesPackage.ts’s “total” note). - “aggregate the block under a named heading”, normalizer-fused as
total of section "Travel"(andsum of/average of/count of) only when the wordsectionand a quoted name both follow, sosectionis never a keyword and a variable of that name still reads.