SessionHooksManager class

Session hooks state manager. Uses a Map for O(1) mutations (same pattern as TS: Map not Record, to avoid O(N^2) copies).

Constructors

SessionHooksManager()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addFunctionHook({required String sessionId, required HookEvent event, required String matcher, required Future<bool> callback(List, {Object? signal}), required String errorMessage, int? timeout, String? id}) String
Add a function hook to the session. Returns the hook ID.
addSessionHook({required String sessionId, required HookEvent event, required String matcher, required HookCommand hook, void onHookSuccess(HookCommand, AggregatedHookResult)?, String? skillRoot}) → void
Add a command or prompt hook to the session.
clearSessionHooks(String sessionId) → void
Clear all session hooks for a specific session.
getSessionFunctionHooks(String sessionId, {HookEvent? event}) Map<HookEvent, List<FunctionHookMatcher>>
Get all session function hooks for a specific event.
getSessionHookCallback({required String sessionId, required HookEvent event, required String matcher, required HookCommand hook}) SessionHookEntry?
Get callback info for a specific session hook.
getSessionHooks(String sessionId, {HookEvent? event}) Map<HookEvent, List<SessionDerivedHookMatcher>>
Get all session hooks for a specific event (excluding function hooks).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeFunctionHook({required String sessionId, required HookEvent event, required String hookId}) → void
Remove a function hook by ID from the session.
removeSessionHook({required String sessionId, required HookEvent event, required HookCommand hook}) → void
Remove a specific hook from the session.
toString() String
A string representation of this object.
inherited

Operators

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