titan 1.0.0
titan: ^1.0.0 copied to clipboard
Titan - Total Integrated Transfer Architecture Network. A powerful reactive state management engine with Pillars, Cores, and fine-grained auto-tracking.
Changelog #
All notable changes to this package will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2026-03-02 #
๐ Stable Release #
Titan Core reaches 1.0.0 โ the reactive engine, all Pillar features, and the full public API are now considered stable. No breaking changes are planned for the 1.x series.
Added #
- useStream โ
Sparkhook for reactive stream consumption withAsyncValueintegration
Changed #
- Performance optimizations across the reactive engine:
- Nullable
_conduitsโ zero allocation when no Conduits are attached to a Core - Lazy
isReadyโPillar.isReadygetter allocated only wheninitAsync()is overridden - Sentinel
Futureโ completed_initAsyncFuture pre-allocated to avoid async overhead ReactiveNode.notifyDependents()fast-path โ skips iteration when no dependents or listenersTitanObserver.notifyStateChanged()fast-path โ skips notification when no observers registeredSagapre-allocated step results โList.filled()replaces growable list allocation
- Nullable
- Benchmark infrastructure:
- Noise floor support in benchmark tracker (default 0.100ยตs, configurable via
--noise-floor) - Mermaid
xychart-betatrend charts auto-generated in CI benchmark reports (6 chart groups, 17 metrics) - Forward-fill interpolation for missing historical data points
- Noise floor support in benchmark tracker (default 0.100ยตs, configurable via
- 811 tests passing
0.2.0 - 2026-03-02 #
Added #
- Conduit โ Core-level middleware pipeline for intercepting value changes
Conduit<T>abstract class withpipe()andonPiped()hooks- Built-in:
ClampConduit,TransformConduit,ValidateConduit,FreezeConduit,ThrottleConduit ConduitRejectedExceptionfor blocking invalid state changesCore<T>now acceptsconduits:parameter in constructor andPillar.core()- Dynamic management:
addConduit(),removeConduit(),clearConduits() - 25 new tests, benchmark #28 added
- Prism โ Fine-grained, memoized state projections
Prism<T>extendsTitanComputed<T>for read-only reactive sub-value views- Type-safe static factories:
Prism.of<S,R>,Prism.combine2/3/4,Prism.fromDerived PrismEqualsabstract final class withlist<T>(),set<T>(),map<K,V>()comparatorsPrismCoreExtension<T>โ.prism()extension method onTitanState<T>- Pillar factory:
prism<S,R>(source, selector)with managed lifecycle - 25 new tests, benchmark #29 added
- Nexus โ Reactive collections with in-place mutation and granular change tracking
NexusList<T>โ reactive list withadd,addAll,insert,remove,removeAt,sort,swap,moveNexusMap<K,V>โ reactive map with[]=,putIfChanged,putIfAbsent,addAll,remove,removeWhereNexusSet<T>โ reactive set withadd,remove,toggle,intersection,union,differenceNexusChange<T>sealed class hierarchy for pattern-matching change records- Pillar factories:
nexusList(),nexusMap(),nexusSet()with managed lifecycle - Zero copy-on-write overhead โ O(1) amortized mutations vs O(n) spread copies
- 90 new tests, benchmark #30 added
0.1.1 - 2026-03-02 #
Added #
- Screenshots and banner image for pub.dev
- Logo and banner assets in package
0.1.0 - 2026-03-02 #
Added #
- Atlas.go() navigation support โ declarative stack-based navigation
- Pub.dev publish preparation โ example file, topics, analysis fixes
- 20 additional tests (gap coverage: Relic, Codex, Quarry, Scroll, Epoch, API)
Removed #
- TitanMiddleware โ dead code removed (use TitanObserver/Oracle instead)
- StateChangeEvent โ removed alongside middleware
Fixed #
dart formatapplied across all source files- CHANGELOG headers standardized to Keep a Changelog format
0.0.3 - 2025-07-12 #
Added #
- Herald โ Cross-domain event bus for decoupled Pillar-to-Pillar communication
Herald.emit<T>()โ Broadcast events by typeHerald.on<T>()โ Subscribe to events (returnsStreamSubscription)Herald.once<T>()โ One-shot listener (auto-cancels after first event)Herald.stream<T>()โ BroadcastStream<T>for advanced compositionHerald.last<T>()โ Replay the most recently emitted eventHerald.hasListeners<T>()โ Check for active listenersHerald.reset()โ Clear all listeners and history (for tests)
- Pillar.listen โ Managed Herald subscription (auto-cancelled on dispose)
- Pillar.listenOnce โ Managed one-shot Herald subscription
- Pillar.emit โ Convenience to emit Herald events from a Pillar
- Vigil โ Centralized error tracking with pluggable handlers
Vigil.capture()โ Capture errors with severity, context, and stack tracesVigil.addHandler()/Vigil.removeHandler()โ Pluggable error sinksConsoleErrorHandlerโ Built-in formatted console outputFilteredErrorHandlerโ Route errors by conditionVigil.guard()/Vigil.guardAsync()โ Execute with automatic captureVigil.captureAndRethrow()โ Capture then propagateVigil.history/Vigil.lastErrorโ Error history with configurable maxVigil.bySeverity()/Vigil.bySource()โ Query errorsVigil.errorsโ Real-time error stream
- Pillar.captureError() โ Managed Vigil capture with automatic Pillar context
- Pillar.strikeAsync now auto-captures errors via Vigil before rethrowing
- Chronicle โ Structured logging system with named loggers
Chronicle('name')โ Named logger instances- Log levels:
trace,debug,info,warning,error,fatal LogSinkโ Pluggable output destinationsConsoleLogSinkโ Built-in formatted console output with iconsChronicle.levelโ Global minimum log levelChronicle.addSink()/Chronicle.removeSink()โ Manage sinks
- Pillar.log โ Auto-named Chronicle logger per Pillar
- Epoch โ Core with undo/redo history (time-travel state)
Epoch<T>โ TitanState with undo/redo stacksundo()/redo()โ Navigate historycanUndo/canRedoโ Check capabilityhistoryโ Read-only list of past valuesclearHistory()โ Wipe history, keep current value- Configurable
maxHistorydepth (default 100)
- Pillar.epoch() โ Create managed Epoch (Core with history)
- Flux โ Stream-like operators for reactive Cores
core.debounce(duration)โ Debounced state propagationcore.throttle(duration)โ Throttled state propagationcore.asStream()โ Convert Core to typedStream<T>node.onChangeโ Stream of change signals for any ReactiveNode
- Relic โ Persistence & hydration for Cores
RelicAdapterโ Pluggable storage backend interfaceInMemoryRelicAdapterโ Built-in adapter for testingRelicEntry<T>โ Typed serialization config per CoreRelic.hydrate()/Relic.hydrateKey()โ Restore from storageRelic.persist()/Relic.persistKey()โ Save to storageRelic.enableAutoSave()/Relic.disableAutoSave()โ Auto-persist on changesRelic.clear()/Relic.clearKey()โ Remove persisted data- Configurable key prefix (default
'titan:')
- Scroll โ Form field validation with dirty/touch tracking
Scroll<T>โ Validated form field extendingTitanState<T>validate(),touch(),reset(),setError(),clearError()- Properties:
error,isDirty,isPristine,isTouched,isValid ScrollGroupโ Aggregate form state (validateAll(),resetAll(),touchAll())
- Pillar.scroll() โ Create managed Scroll (form field with validation)
- Codex โ Paginated data management
Codex<T>โ Generic paginator supporting offset and cursor modesloadFirst(),loadNext(),refresh()- Reactive state:
items,isLoading,hasMore,currentPage,error CodexPage<T>,CodexRequestโ Typed page/request models
- Pillar.codex() โ Create managed Codex (paginated data)
- Quarry โ Data fetching with stale-while-revalidate, retry, and deduplication
Quarry<T>โ Managed data fetcher with SWR semanticsfetch(),refetch(),invalidate(),setData(),reset()- Reactive state:
data,isLoading,isFetching,error,isStale,hasData QuarryRetryโ Exponential backoff config (maxAttempts,baseDelay)- Request deduplication via
Completer<T>
- Pillar.quarry() โ Create managed Quarry (data fetching)
- Herald.allEvents โ Global event stream for debug tooling
HeraldEventโ Typed wrapper withtype,payload,timestamp
- Titan.registeredTypes โ Set of all registered types (instances + factories)
- Titan.instances โ Unmodifiable map of active instances (debug introspection)
Fixed #
- Top-level function shadowing: Removed top-level
strike()andstrikeAsync()fromapi.dartโ Dart resolves top-level functions over inherited instance methods in ALL contexts (not justlate finalinitializers), causing_assertNotDisposed()and auto-capture to be bypassed. UsetitanBatch()/titanBatchAsync()for standalone batching.
0.0.2 - 2025-07-12 #
Added #
Titan.forge()โ Register a Pillar by its runtime type for dynamic registration (e.g., Atlas DI integration)Titan.removeByType()โ Remove a Pillar by runtime Type without needing a generic parameter
0.0.1 - 2025-07-11 #
Added #
- Pillar โ Structured state module with lifecycle (
onInit,onDispose) - Core โ Fine-grained reactive mutable state (
core(0)/Core(0)) - Derived โ Auto-computed values from Cores, cached and lazy (
derived(() => ...)/Derived(() => ...)) - Strike โ Batched state mutations (
strike(() { ... })) - Watch โ Managed reactive side effects (
watch(() { ... })) - Titan โ Global Pillar registry (
Titan.put(),Titan.get(),Titan.lazy()) - TitanObserver (Oracle) โ Global state change observer
- TitanContainer (Vault) โ Hierarchical DI container
- TitanModule (Forge) โ Dependency assembly modules
- AsyncValue (Ether) โ Loading / error / data async wrapper
- TitanConfig (Edict) โ Global configuration