Skip to main content
A hook callback with an optional tool matcher, deadline and asynchronous-notification flag.

Type Parameters

Event

Event extends HookEventName = HookEventName

Properties

async?


callback

The SDK-local event handler. Decision fields are honored only for supported event types. Handle an event in the SDK process.

Parameters

payload
HookEventPayload<Event> Event data and cancellation signal.

Returns

| void | HookResult | Promise<void | HookResult> Optional event-specific modifications or decisions.

matcher?


timeoutMs?