Pure helpers for plugin enablement decisions: default-enabled
detection, base enablement from RuntimeSettings, dependency
cascading, and cycle detection. Owned by PluginRuntime; cleanly
isolated so each helper is callable without runtime mutable state.
Intermediate handle returned by PluginId.namespace: a plugin paired
with a namespace, ready to produce a Pin for any leaf service id
inside that namespace.
Policy for handling RuntimeSettings entries that reference an id
the runtime does not know about. Covers every reference shape that
can drift across app versions:
Declarative session-event listener mixin for pure-Dart hosts (cubits,
controllers, services). The host supplies the session it listens to
and the list of subscriptions (a List<EventBinding>) it wants
attached. The mixin materializes them through attachSubscriptions and
cancels them through detachSubscriptions, both idempotent.
Typed namespace identifier. Wraps the namespace name as a String. Like
PluginId and ServiceId, a zero-cost extension type -- at runtime,
it IS the underlying String, so == against a String literal works
and Map<Namespace, ...> keys hash and compare by the wrapped String.
A typed key identifying "the serviceId registered by pluginId".
The map key type used by RuntimeSettings.services and any other
place that needs to address a single plugin's service slot.
Typed plugin identifier. Wraps the plugin id as a String. Like
Namespace and ServiceId, a zero-cost extension type -- at runtime,
it IS the underlying String. Because PluginId declares
implements String, it flows directly into any String-typed
parameter, JSON serialization key, or comparison without needing to
reach for value. Equality and toString() delegate to the
underlying String, so == against a String literal works.
Thrown by EventBus.request / EventBus.requestSync when every
registered handler ran and returned null (conceded), and the
Response type is non-nullable.
Aggregates multiple step failures within a single plugin's attach or
detach pass. Thrown only when more than one step (e.g. a service's
attach() AND the plugin's user attach()) raised during the same
_runAttach / _runDetach invocation.