/** * Hooks System - Lifecycle hooks for agent customization * * @example * ```typescript * import { HooksManager, HooksConfig } from '@compilr-dev/agents'; * * // Configure hooks * const hooks: HooksConfig = { * beforeTool: [ * async (ctx) => { * console.log(`Tool ${ctx.toolName} starting...`); * } * ], * afterTool: [ * async (ctx) => { * console.log(`Tool ${ctx.toolName} completed in ${ctx.durationMs}ms`); * } * ] * }; * * // Use with Agent * const agent = new Agent({ * provider, * hooks, * }); * ``` */ export { HooksManager } from './manager.js'; export type { HooksManagerOptions } from './manager.js'; export type { HooksConfig, HookRegistrationOptions, HookContext, IterationHookContext, LLMHookContext, AfterLLMHookContext, ToolHookContext, AfterToolHookContext, ErrorHookContext, BeforeIterationHook, AfterIterationHook, BeforeLLMHook, AfterLLMHook, BeforeToolHook, AfterToolHook, OnErrorHook, BeforeLLMHookResult, BeforeToolHookResult, AfterToolHookResult, ErrorHookResult, RegisteredHook, HookEventType, HookEvent, HookEventHandler, } from './types.js';