1# app-bus — in-proc event bus for Llimphi apps23A typed, synchronous, in-memory **publish/subscribe** bus to coordinate apps
4within the same process. It covers three families of cross-cutting events: **focus**
5(which app/window holds it), **navigation** (open/close/focus an app or route)
6and ephemeral **notifications**.
78## What it exposes910- `AppBus` — shareable handle (`Clone`, internally `Arc<RwLock<…>>`).
11- `Event` — cross-cutting enum: `FocusChanged` / `Navigate` / `CloseApp` / `Notify`.
12- `NotifyLevel` — `Info` / `Warn` / `Error`.
13- `Subscription` — RAII guard: dropping it cancels the subscription.
14- `publish(Event)` delivers synchronously to all subscribers; nested delivery
15 if a callback publishes from its own handler.
1617## Non-goals1819- It is not an inter-process or network bus (that is Akasha / app-channel).
20- It does not persist events nor guarantee delivery after restart.
21- It does not order by priority.
2223## Status (2026-05-31)2425### Done26- Complete pub/sub bus: `publish`, `subscribe`, cancellation via RAII guard.
27- `Event` enum with focus/navigation/close/notifications.
28- Consumed by `launcher-llimphi` (fires navigation/launch).
2930### Pending31- Multi-process adapter (today strictly in-proc).
32- Deferred delivery / queue (today synchronous nested reentrancy).
33- Filtering by event type in `subscribe` (today the callback filters).
3435## Place in the repo3637`shared/app-bus` — fine-grained in-proc channel. The higher-level control plane
38is `shared/sandokan` (see its SDD.md).
README.md
app-bus — in-proc event bus for Llimphi apps
A typed, synchronous, in-memory publish/subscribe bus to coordinate apps
within the same process. It covers three families of cross-cutting events: focus
(which app/window holds it), navigation (open/close/focus an app or route)
and ephemeral notifications.