HostToolRegistry class

Constructors

HostToolRegistry({required KernelServerHost endpoint, required DispatcherAttach attachToDispatcher, required DispatcherDetach detachFromDispatcher})

Properties

attachToDispatcher DispatcherAttach
Host-supplied dispatcher attach callback — runs once per registerExposed. The registry passes the already-prefixed exposed name and the handler; the host stores them in whatever in-process map its scripts hit on dispatch.
final
detachFromDispatcher DispatcherDetach
Pair of attachToDispatcher — the host removes the same key on unregisterExposed.
final
endpoint KernelServerHost
Endpoint that receives the same handler (mirrored for external transports tools/list + tools/call).
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerExposed({required String bundleId, required String rawName, required String description, required KernelToolHandler handler, Map<String, dynamic>? inputSchema}) String
Register a general tool — dispatcher + endpoint in one call, prefixed with <bundleId>.<rawName> so two bundles can share the same raw name without colliding.
toString() String
A string representation of this object.
inherited
unregisterExposed({required String bundleId, required String rawName}) String?
Remove a previously registered tool from both layers. Returns the (<bundleId>.<rawName>) exposed name that was removed, or null when no entry existed.

Operators

operator ==(Object other) bool
The equality operator.
inherited