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.
Subpath exports
The package exposes focused entry points so a bundler pulls in only what you use.
Public
Section titled “Public”Stable. Changes follow semantic versioning; versioning and support says exactly what that promises, including how deprecations are handled and which Node versions are tested.
| Entry | Contains |
|---|---|
solve-engine | ExpressionEngine, createEngine, IEnginePackage, common types |
solve-engine/engine | Engine internals for host integration |
solve-engine/vm | Value, ValueType, value construction |
solve-engine/format | formatValue and formatting settings |
solve-engine/language | Completions, token categories, highlighting |
solve-engine/packages | Built-in packages and their configuration |
solve-engine/constants | Configuration defaults (DEFAULT_CONFIG, ConfigManager) and ENGINE_VERSION |
solve-engine/errors | EngineError, the structured error type a failure throws, its taxonomy, and the result type |
solve-engine/worker | Off-main-thread evaluation: the worker proxy, transports and result DTO |
solve-engine/engine-worker | The worker entry the engine’s own offloaded compile and execute pools run, started by a host through setEngineWorkerFactory. Its own bundle, carrying every built-in package |
solve-engine/testing | A test kit for package authors: createTestEngine, expectExpression, expectPackage |
solve-engine/temporal | The Temporal calendar backend: createTemporalCalendar, passed as an engine’s calendar option |
Advanced
Section titled “Advanced”Also public, but they expose pipeline internals. Reach for them when writing a package or building tooling.
| Entry | Contains |
|---|---|
solve-engine/lexer | Tokeniser and vocabulary types |
solve-engine/parser | Parselets, binding powers, bytecode builder |
solve-engine/normalizer | Phrase fusion and normalisation rules |
solve-engine/resolvers | Async resolver contracts |
solve-engine/utilities | Shared helpers |
solve-engine/uom | Unit definitions and conversion |
solve-engine/services | Data query plumbing |
Internal
Section titled “Internal”Not exported and not covered by semantic versioning: telemetry, caching,
diagnostics, the internal compile/execute worker managers, and internal types.
(The public solve-engine/worker entry above is the supported way to move
evaluation off the main thread.) If you find yourself needing
one of these, that is worth raising as an issue, because it usually means a
public entry point is missing something.