titan 1.1.3
titan: ^1.1.3 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.1.3 - 2026-03-05 #
Performance #
- Omen — Replaced per-execution
_OmenExecutionobject allocation with monotonic version counter. Added_executeInitial()fast path skipping redundant state/dependency work on first eager run. Made_executionCountlazy. Usedpeek()to skiptrack()overhead (~49% faster eager creation). - Chronicle — Made
LogEntry.timestamplazy (DateTime.now()only called on first access). Eliminates syscall overhead when sinks don't read timestamps (~73% throughput improvement).
1.1.2 - 2026-03-05 #
Performance #
- Herald — Reordered
emit()hot path: listener dispatch now runs before last-event caching; cached_globalControllerin local variable to avoid repeated static field reads. - Mandate — Lazy
List<WritViolation>allocation in_evaluate(): violations list is only created when a writ actually fails, avoiding heap allocation on the common all-pass path (~2.7× faster re-evaluation).
1.1.1 - 2026-03-04 #
Changed #
- Assert → Runtime Errors: All debug-only
assertstatements converted to runtime errors that fire in release builds:ClampConduit:ArgumentErrorfor invalid min/max rangePillar._assertNotDisposed():StateErrorfor use-after-disposeTitanStore._assertNotDisposed():StateErrorfor use-after-disposeTitanContainer._assertNotDisposed():StateErrorfor use-after-disposeRelic._assertNotDisposed():StateErrorfor use-after-disposeAegis.run():ArgumentErrorformaxAttempts <= 0Aegis.runWithConfig():ArgumentErrorforconfig.maxAttempts <= 0Herald:StateErrorfor emit-after-dispose
1.1.0 - 2026-03-04 #
Added #
- ReadCore<T> — Read-only abstract interface for
Core<T>(compile-time type narrowing)- Exposes only:
valuegetter,previousValue,name,isDisposed,peek(),listen(),select() - Hides
.valuesetter at compile time — all mutations go through Pillar methods TitanState<T>implementsReadCore<T>— any Core can be returned as ReadCore- Recommended convention: private Core fields + public
ReadCore<T>getters
- Exposes only:
- Omen — Reactive async derived with automatic dependency tracking (
Omen<T>)- Auto-tracks Core reads inside async compute function
AsyncValuelifecycle: loading → data, refreshing, errorkeepPreviousDatastale-while-revalidate pattern- Debounce coalesces rapid dependency changes
refresh(),cancel(),reset()manual controls- Reactive
executionCounttracking - Pillar integration via
omen()factory method
- Mandate — Reactive policy evaluation engine with declarative writ rules (
Mandate,Writ)MandateStrategy:allOf(AND),anyOf(OR),majority(weighted)MandateVerdictsealed class:MandateGrant,MandateDenialwithWritViolationdetails- Reactive
verdict,isGranted,violationsviaTitanComputed can(name)per-writ reactive query- Dynamic management:
addWrit(),addWrits(),removeWrit(),replaceWrit(),updateStrategy() - Inspection API:
writNames,writCount,hasWrit(),strategy - Pillar integration via
mandate()factory method
- Ledger — Reactive state transaction manager with atomic commit/rollback (
Ledger,LedgerTransaction)transact()async andtransactSync()with auto-commit/rollbackbegin()/commit()/rollback()manual transaction controlcapture()snapshots Core values before mutation- Reactive state:
activeCount,commitCount,rollbackCount,failCount,hasActive LedgerRecordaudit history withmaxHistoryretentionLedgerStatus:active,committed,rolledBack,failed- Pillar integration via
ledger()factory method
Pillar.registerNodes()— Public API for satellite packages to register lifecycle-managed reactive nodes
Changed #
- Moved to
titan_basalt: Trove, Moat, Portcullis, Anvil, Pyre, Codex, Quarry, Bulwark, Saga, Volley, Tether, Annals (infrastructure/resilience features)
1.0.1 - 2026-03-02 #
- No API changes. Version bump to align with workspace release.
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
