Skip to content

[PASO 2.14] Add EventBus module (CORE #16)#38

Merged
mfg1986 merged 6 commits into
developfrom
feature/PASO-2.14_event-bus-module
May 22, 2026
Merged

[PASO 2.14] Add EventBus module (CORE #16)#38
mfg1986 merged 6 commits into
developfrom
feature/PASO-2.14_event-bus-module

Conversation

@mfg1986
Copy link
Copy Markdown
Contributor

@mfg1986 mfg1986 commented May 22, 2026

Summary

  • Add EventBus module — internal pub/sub system for inter-feature communication
  • provideEventBus(options?) factory with configurable queue and history
  • EventBusService — typed DomainEvent<T> publish/subscribe with wildcard pattern matching, stream() (Observable) and signal() (Signal) APIs
  • EventQueueService — persistent event queue backed by StorageService (localStorage)
  • EventHistoryService — in-memory ring buffer with filtered queries (type, source, since)
  • Version bump: core 0.14.0 → 0.15.0

STEPs included

STEP Description
STEP-2.14-001 Types, interfaces, config token
STEP-2.14-002 EventBusService (pub/sub, pattern matching, signal)
STEP-2.14-003 EventQueueService (persistent queue)
STEP-2.14-004 EventHistoryService (ring buffer)
STEP-2.14-005 provideEventBus() + barrel exports + build
STEP-2.14-006 Version bump 0.15.0 + CHANGELOG

Test plan

  • CI passes (build + lint + test)
  • 832 tests pass, 0 failures (54 new tests for event-bus)
  • No regressions in existing modules
  • dist/packages/core/package.json shows version 0.15.0
  • All EventBus symbols exported from @fireflyframework/core

mfg1986 added 6 commits May 23, 2026 00:59
Define the public contract for the EventBus module (CORE #16):
DomainEvent<T>, EventHandler<T>, EventFilter, QueueStatus,
FlushResult, EventBusOptions, EventBusConfig, EVENT_BUS_CONFIG.
…d signal support

Implement central event bus service with publish, subscribe,
subscribePattern (wildcard/RegExp), stream (Observable), signal
(via runInInjectionContext), history (stub) and destroy methods.
19 unit tests covering all API surface.
…geService

Implement event queue with enqueue (bounded by maxQueueSize),
flush (delivers all pending via EventBusService), status and
pending as reactive Signals. Persists to localStorage via
StorageService. 14 unit tests.
Implement event history service with add (bounded by historySize),
query (filter by type, source, since with AND logic), clear and
size methods. Default capacity 100 events. 15 unit tests.
- Create provideEventBus(options?) with makeEnvironmentProviders()
- Resolve EventBusOptions → EventBusConfig with sensible defaults
- Register EVENT_BUS_CONFIG, EventBusService, EventQueueService, EventHistoryService
- Add event-bus/index.ts barrel with typed exports
- Re-export event-bus module from packages/core/src/index.ts
- 6 new tests (832 total, 0 failures)
- Version bump 0.14.0 → 0.15.0 in package.json
- Add CHANGELOG entry for 0.15.0 documenting EventBus module (CORE #16)
- Update compare links for [Unreleased] and [0.15.0]
@mfg1986 mfg1986 merged commit c442b7f into develop May 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant