LifecycleObserver
Defined in: src/types/lifecycle-observer.ts:10
Implementors are given the agent at registration time so they can subscribe to hook events of their choice via LocalAgent.addHook. This is the extension point for components that need to observe arbitrary lifecycle events. Each observer method is optional — implementors define only the surfaces they care about, and the agent probes for each at registration.
Properties
Section titled “Properties”readonly name: string;Defined in: src/types/lifecycle-observer.ts:12
Stable identifier for this observer. Used for logging and duplicate detection.
Methods
Section titled “Methods”observeAgent()?
Section titled “observeAgent()?”optional observeAgent(agent): void | Promise<void>;Defined in: src/types/lifecycle-observer.ts:18
Called once when the observer is registered with an agent. Implementations
typically subscribe to one or more events via agent.addHook.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
agent | LocalAgent |
Returns
Section titled “Returns”void | Promise<void>