import type { HookableEvent } from './events.js'; /** * Type for a constructor function that creates HookableEvent instances. */ export type HookableEventConstructor = new (...args: any[]) => T; /** * Type for callback functions that handle hookable events. * Callbacks can be synchronous or asynchronous. * * @example * ```typescript * const callback: HookCallback = (event) => { * console.log('Agent invocation started') * } * ``` */ export type HookCallback = (event: T) => void | Promise; /** * Options for registering a hook callback. */ export interface HookCallbackOptions { order?: number; } /** * Function that removes a previously registered hook callback. * Safe to call multiple times (idempotent). * No-op if the callback is no longer registered. */ export type HookCleanup = () => void; /** * Presets for hook execution order. Lower values run first. * Any number is a valid order — these presets are not bounds, just convenient * reference points. SDK_FIRST/SDK_LAST mark where the SDK's own hooks run, * so you can position yours relative to them. * * @example * ```typescript * agent.addHook(BeforeToolCallEvent, callback, { order: HookOrder.SDK_FIRST }) // run with the SDK's earliest hooks * agent.addHook(BeforeToolCallEvent, callback, { order: HookOrder.SDK_FIRST - 1 }) // run before the SDK's earliest hooks * ``` */ export declare const HookOrder: { readonly SDK_FIRST: -100; readonly INTERVENTION_OUTPUT: -90; readonly DEFAULT: 0; readonly INTERVENTION_INPUT: 90; readonly SDK_LAST: 100; }; //# sourceMappingURL=types.d.ts.map