ExtensionRegistry class
Registry that owns extension lifecycle dispatch for the host binding.
Enforces:
- namespace shape (
^[a-z][a-z0-9_]*$) and uniqueness, - mandatory
<namespace>.<tool>prefixing and bare-token tool names, - registration-order preservation across every dispatch,
- per-method exception isolation with 3-strikes auto-disable (PRD §17).
Diagnostics are emitted through the injected logger (the Flutter host
passes debugPrint); pure-Dart hosts may pass print or a no-op.
Constructors
- ExtensionRegistry({void logger(String message)?})
Properties
-
extensions
→ List<
LeonardExtension> -
All registered extensions, in registration order. Read by the binding's
single observation loop, which gates on
is PerceptionExtension.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
manifest
→ List<
({String namespace, List< String> tools})> -
Extension manifest: ordered
(namespace, bare tool names)records, one per registered extension (post de-duplication). Read by the binding'score.handshakeextension to build the handshakeextensionsarray. Does not finalize the registry.no setter -
namespaces
→ List<
String> -
Extension namespaces in registration order (post de-duplication).
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
busyStateAll(
) → Future< List< MapEntry< >String, BusyState> > -
Dispatch
busyStateacross every (non-disabled) extension in registration order. Failures yield BusyState.idle for the affected extension. -
disposeAll(
) → Future< void> - Call LeonardExtension.dispose on every registered extension in registration order. Each call is exception-isolated; every extension is disposed even if earlier ones throw.
-
finalize(
) → Map< String, LeonardTool> - Alias for mergedTools.
-
initializeAll(
) → Future< void> - Call LeonardExtension.initialize on every registered extension in registration order. Failures are logged and mark the extension as failed; the call never rethrows.
-
mergedTools(
) → Map< String, LeonardTool> - Compute the merged tool list keyed by fully-qualified name.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onActionExecutedAll(
ExecutedAction action) → Future< void> -
Dispatch
onActionExecutedacross every (non-disabled) extension in registration order. -
register(
LeonardExtension p) → void -
Register
p. Order is preserved across every dispatch. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited