📜 Version 4.x History
[v4.1.0] - 2026-09-04
🚀 Key Highlights & Architectural Enhancements
Tempo v4.1.0 expands enterprise configuration governance and developer ergonomics with Remote & Cascading Configuration Resolution ("extends"), a dedicated pluginOptions Configuration Slot, and Overloaded Tempo.create() with Deterministic Resource Disposal (TC39 using).
🌟 New Features & Improvements
1. Remote & Cascading Configuration Resolution (resolveConfig)
- Remote URL Config Fetching: Enhanced
resolveConfig()andTempo.bootstrap()to fetchtempo.config.jsoncandtempo.config.jsonoverhttp://andhttps://URLs (includinghttp://localhost:...orhttp://127.0.0.1:...for dev servers, container environments, and central governance APIs). file://URL Support: Added native support forfile://URLs in Node.js environments viafileURLToPath.- Cascading Inheritance (
"extends"): Introduced recursive"extends"resolution in configuration files (string URL/path or array of URLs/paths). Parent configurations are resolved and merged under child local overrides. - Security Boundaries & Loop Protection: HTTP requests are bounded by a 3-second timeout and 128KB payload size cap to prevent hangs and DoS attacks. Remote configs are restricted to static data-only JSON/JSONC payloads. Circular inheritance is detected and prevented.
2. Dedicated pluginOptions Configuration Slot
- Introduced
pluginOptions?: Record<string, any>acrossBaseOptions,Discovery, andConfig. - Enforces clean architectural separation:
plugins: Strictly reserved for executable code registration (plugins, terms, modules).pluginOptions: Dedicated dictionary holding serializable runtime options and defaults for plugins.
- Deep, recursive namespace merging across
extendsinheritance layers. - Supplying plain configuration dictionaries directly under
pluginsis marked@deprecatedin favor ofpluginOptions.
3. Overloaded Tempo.create() & Deterministic Resource Disposal
- Explicit Resource Management (TC39
using):Tempo.create()returnsSandboxTemposubclasses that implement the TC39Disposableprotocol (Symbol.dispose) and expose anisDisposedgetter. Disposing a sandbox clears its discovery slot fromglobalThisand cleans up internal registry state (ClassStates). - Scoped Callback Mode (
Tempo.create(fn)/Tempo.create(options, fn)): OverloadedTempo.create()to accept an execution callback, automatically disposing the ephemeral sandbox upon completion (supporting both synchronous results and async Promises viatry...finally). - Native
usingBlock Scoping: Full support for TypeScript 5.2+ block-scoped disposable sandboxes:{ using sb = Tempo.create({ ... }); ... }.
4. Architectural Separation of extends and plugins
extends: Strictly reserved for configuration inheritance via URLs or file paths (string | string[]), mirroringtsconfig.jsonand ESLint conventions.plugins: Dedicated for registering executable plugins and terms ((Plugin | Term)[]).Tempo.use()& Deprecation ofTempo.extend(): StandardizedTempo.use(...)as the runtime registration method. MarkedTempo.extend()as@deprecated Use Tempo.use(...) instead.while preserving backwards compatibility.
🐛 Bug Fixes
- Sandbox
Symbol.disposeGlobal State Leakage: Fixed a critical bug where invoking[Symbol.dispose]()on a sandbox class (e.g., via the TC39usingkeyword or scoped callback mode) inheritedTempo[Symbol.dispose]()via the prototype chain and inadvertently executedTempo.init(), wiping the global library configuration and registered plugins. Sandboxed classes now implement an isolated[Symbol.dispose]()that strictly cleans up local sandbox state and discovery slots without mutating global defaults.
[v4.0.0] - 2026-08-27
🚀 Key Highlights & Paradigm Shifts
Tempo v4.0.0 is a major architectural milestone introducing Dynamic Functional Context (DFC), a 100% Open-Source Community Core, zero-await Synchronous JSONC Config Discovery, standardized Plugin SDK Facade, and unified {Term: Value} Mutation Payloads.
🚨 Major Breaking Changes
- 100% Open-Source Community Core: Completely removed commercial licensing enforcement, JWT verification, JWS claims validation, domain-locking, and premium plugin gating (
license.manager.ts,license.validator.ts,Tempo.license,#formatLicense,#isBlocked,validateLicenseState,LICENSEenum,$updateScopeStatus, and#tempo/licenseexport subpath). - Commercial Package Decoupling: Relocated all enterprise licensing hooks and commercial plugin management to the
@magmacomputing/tempo-prowrapper package. - Config Auto-Discovery Modernization: Dropped
.cjsconfiguration discovery support in favor of modern ES-preferred module extensions (.mts,.ts,.mjs,.js,.jsonc,.json). Tempo.ready()Return Signature: SimplifiedTempo.ready()return value to a static'none'status for community core compatibility.- Configuration Namespace Enforcement: Fully excised legacy root-level property access that was deprecated during
v3.x.formatsconfiguration key has been entirely removed from top-levelOptionsandDiscovery. Useregistry: { formats: ... }instead.numbersconfiguration key has been entirely removed from top-levelOptions. Useregistry: { numbers: ... }instead.
🌟 New Features & Architectural Modernizations
1. Dynamic Functional Context (DFC) & Options Evaluation
- Upgraded
BaseOptionsandTempooptions (timeZone,locale,calendar,sphere) to supportEvaluable<T>suppliers (T | (() => T)). - Context options are dynamically evaluated on a per-request basis without requiring instantiation or re-building configuration state, perfect for multi-tenant applications (e.g., dynamic request headers or per-tenant session resolvers).
2. Synchronous JSON & JSONC Config Discovery (resolveConfigSync)
- Introduced zero-
awaitstatic startup configuration discovery (resolveConfigSync()) utilizingparseJSONCfor.jsoncand.jsonfiles. - ESM and TypeScript config modules (
.mts,.ts,.mjs,.js) continue to utilize the asynchronousresolveConfig()path. - Automatically executed inside
Tempo'sstatic { ... }initialization block at module load time.
3. Standardized Plugin SDK Facade (@magmacomputing/tempo/plugin/sdk)
- Standardized plugin development on
@magmacomputing/tempo/plugin/sdk, replacing legacyplugin-apiimports. - Exposes
definePlugin,defineTerm,defineModule,defineNamespace,defineRange, and internal evaluation utilities via a single, CDN-friendly facade.
4. Expanded Utility Stack Exports (@magmacomputing/tempo/library)
- Re-exported core evaluation and runtime primitives (
Evaluable,AsyncEvaluable,evaluate,evaluateAsync,evaluateConfig,evaluateConfigAsync,dynamicProxy,Pledge,cipher,webToken,enumify) from the#librarysurface for downstream plugins and custom extensions.
5. API Standardization for Boundary & Mutation Payloads ({Term: Value})
- Standardized mutation object signatures across
.set(),.add(), and plugin payloads to follow the unified{Term: Value}pattern (e.g.,.set({ year: 'start' }),.set({ month: 'end' }),.set({ '#qtr': 1 })). - Legacy positional syntax (e.g.,
.set({ start: 'year' })) remains supported transparently for backwards compatibility.
🗑️ API Removals & Cleanups
- Removed Static Accessors: Removed
Tempo.formatsaccessor; useTempo.registry.formatsinstead. - Removed Deprecated Subpaths: Removed
#tempo/licenseexport mapping.