LifecycleManager class

Registers lifecycle callbacks as hooks with a HookExecutor.

Translates the typed lifecycle callback interfaces into generic HookRegistrations so that all lifecycle events flow through the unified hook system.

Constructors

LifecycleManager({required HookExecutor executor})

Properties

events Stream<LifecycleEvent>
Stream of lifecycle events for observation.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Dispose the lifecycle manager and close the event stream.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerAgent(AgentLifecycle lifecycle) → void
Register agent lifecycle callbacks.
registerAll({SessionLifecycle? session, ConversationLifecycle? conversation, ToolLifecycle? tool, AgentLifecycle? agent}) → void
Register all lifecycle types at once.
registerConversation(ConversationLifecycle lifecycle) → void
Register conversation lifecycle callbacks.
registerSession(SessionLifecycle lifecycle) → void
Register session lifecycle callbacks.
registerTool(ToolLifecycle lifecycle) → void
Register tool lifecycle callbacks.
toString() String
A string representation of this object.
inherited
unregisterAll() → void
Unregister all lifecycle hooks.

Operators

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