split EventBus into DaemonBus + MessageBus
DaemonBus (was EventBus): typed events for system/IPC layer. MessageBus: channel-based pub/sub for UI/extension coordination. Messages carry publisher (auto-stamped from extension ID), channel (required), timestamp, and payload. Subscribe by publisher, channel, or both — zero collision across extensions. Extension context gains publish() and subscribe() convenience methods that auto-stamp the extension's ID as publisher. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,10 +2,10 @@ import 'package:clide/kernel/kernel.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
group('EventBus', () {
|
||||
late EventBus bus;
|
||||
group('DaemonBus', () {
|
||||
late DaemonBus bus;
|
||||
|
||||
setUp(() => bus = EventBus());
|
||||
setUp(() => bus = DaemonBus());
|
||||
tearDown(() => bus.dispose());
|
||||
|
||||
test('emit delivers to stream subscribers', () async {
|
||||
|
||||
Reference in New Issue
Block a user