/** * PreToolUse Hook * * P2-11: 工具调用前拦截器 * * 功能: * 1. 注入当前工作流上下文到工具调用 * 2. 验证工具调用是否符合当前阶段规则 * 3. 在 explore 阶段阻止写操作 * 4. 提供工具调用前的上下文增强 */ import type { HookHandler, HookContext, HookResult, WorkflowStage } from './hook-types.js'; interface StageRule { allowedTools: string[]; blockedTools: string[]; description: string; } export declare class PreToolUseHook implements HookHandler { event: "PreToolUse"; handle(context: HookContext): Promise; } /** * 检查工具是否在指定阶段被允许 */ export declare function isToolAllowedInStage(toolName: string, stage: WorkflowStage): boolean; /** * 获取阶段的工具规则 */ export declare function getStageToolRules(stage: WorkflowStage): StageRule; export {}; //# sourceMappingURL=pre-tool-call-hook.d.ts.map