import { type FrontMcpLogger } from '../../common'; import type { SkillSessionManager } from '../session/skill-session.manager'; /** * Options for configuring the SkillToolGuardHook. */ export interface SkillToolGuardHookOptions { /** * Logger instance for debugging and audit logging. */ logger?: FrontMcpLogger; /** * Callback invoked when tool approval is required in 'approval' mode. * Should return true if approved, false if denied. * If not provided, ToolApprovalRequiredError will be thrown. */ onApprovalRequired?: (toolName: string, skillId: string) => Promise; /** * Whether to track tool calls for rate limiting. * @default true */ trackToolCalls?: boolean; } /** * Base interface for the skill tool guard hook class. */ export interface SkillToolGuardHookClass { new (): { checkSkillToolAuthorization(): Promise; }; } /** * Creates a skill-based tool authorization guard hook. * * This hook integrates with the call-tool flow to enforce tool allowlists * when a skill is active. It runs BEFORE the existing checkToolAuthorization * stage to provide skill-level security. * * @example * ```typescript * const sessionManager = new SkillSessionManager({ defaultPolicyMode: 'strict' }); * const hook = createSkillToolGuardHook(sessionManager, { logger }); * * // Register with hook registry * scope.hooks.register(hook); * ``` * * @param sessionManager - The skill session manager instance * @param options - Configuration options * @returns Hook class that can be registered with the hook registry */ export declare function createSkillToolGuardHook(sessionManager: SkillSessionManager, options?: SkillToolGuardHookOptions): SkillToolGuardHookClass; //# sourceMappingURL=skill-tool.hook.d.ts.map