Uses of Record Class
com.tnsai.hooks.HookContext
Packages that use HookContext
-
Uses of HookContext in com.tnsai.hooks
Methods in com.tnsai.hooks that return HookContextModifier and TypeMethodDescriptionHookContext.Builder.build()static HookContextConvenience for tests / sample contexts where only the agent identity matters and every other field is empty. -
Uses of HookContext in com.tnsai.hooks.events
Methods in com.tnsai.hooks.events that return HookContextModifier and TypeMethodDescriptionAgentInit.context()Returns the value of thecontextrecord component.AgentStart.context()Returns the value of thecontextrecord component.AgentStop.context()Returns the value of thecontextrecord component.HookEvent.context()Surrounding context — tenant / agent / role / group / trace / etc.OnActionError.context()Returns the value of thecontextrecord component.OnCapabilityDispatch.context()Returns the value of thecontextrecord component.OnChunk.context()Returns the value of thecontextrecord component.OnNotification.context()Returns the value of thecontextrecord component.OnSessionIdle.context()Returns the value of thecontextrecord component.OnSPILoad.context()Returns the value of thecontextrecord component.OnStateTransition.context()Returns the value of thecontextrecord component.PostAction.context()Returns the value of thecontextrecord component.PostChat.context()Returns the value of thecontextrecord component.PreAction.context()Returns the value of thecontextrecord component.PreChat.context()Returns the value of thecontextrecord component.SessionEnd.context()Returns the value of thecontextrecord component.SessionStart.context()Returns the value of thecontextrecord component.Constructors in com.tnsai.hooks.events with parameters of type HookContextModifierConstructorDescriptionAgentInit(String eventId, Instant timestamp, HookContext context) Creates an instance of aAgentInitrecord class.AgentStart(String eventId, Instant timestamp, HookContext context) Creates an instance of aAgentStartrecord class.AgentStop(String eventId, Instant timestamp, HookContext context, StopReason reason, Optional<Throwable> cause) Creates an instance of aAgentStoprecord class.OnActionError(String eventId, Instant timestamp, HookContext context, ActionRequest request, Throwable cause, ActionType type, int attempt, boolean retryable) Creates an instance of aOnActionErrorrecord class.OnCapabilityDispatch(String eventId, Instant timestamp, HookContext context, String capabilityInterface, String methodName, List<Object> args, ActionType dispatchType) Creates an instance of aOnCapabilityDispatchrecord class.OnChunk(String eventId, Instant timestamp, HookContext context, ChatChunk chunk, long chunkIndex) Creates an instance of aOnChunkrecord class.OnNotification(String eventId, Instant timestamp, HookContext context, NotificationKind kind, String message, Optional<Duration> expectedWait) Creates an instance of aOnNotificationrecord class.OnSessionIdle(String eventId, Instant timestamp, HookContext context, String sessionId, Duration idleFor, IdleAction suggestedAction) Creates an instance of aOnSessionIdlerecord class.OnSPILoad(String eventId, Instant timestamp, HookContext context, String spiInterface, String providerClass, ClassLoader classLoader, Optional<String> providingJar, boolean trusted) Creates an instance of aOnSPILoadrecord class.OnStateTransition(String eventId, Instant timestamp, HookContext context, AgentState from, AgentState to, String trigger) Creates an instance of aOnStateTransitionrecord class.PostAction(String eventId, Instant timestamp, HookContext context, ActionRequest request, ActionResponse response, ActionType type, Duration elapsed) Creates an instance of aPostActionrecord class.PostChat(String eventId, Instant timestamp, HookContext context, String userMessage, String assistantResponse, Duration elapsed) Creates an instance of aPostChatrecord class.PreAction(String eventId, Instant timestamp, HookContext context, ActionRequest request, ActionType type) Creates an instance of aPreActionrecord class.PreChat(String eventId, Instant timestamp, HookContext context, String userMessage, List<Map<String, Object>> history, Map<String, Object> metadata) Creates an instance of aPreChatrecord class.SessionEnd(String eventId, Instant timestamp, HookContext context, String sessionId, SessionCloseReason reason, Duration lifetime, long messageCount, Optional<Throwable> cause) Creates an instance of aSessionEndrecord class.SessionStart(String eventId, Instant timestamp, HookContext context, String sessionId, String clientAddress, Map<String, String> headers, Optional<String> authToken, SessionProtocol protocol) Creates an instance of aSessionStartrecord class.