/** * MCP-hook target verification — the cross-referencing moat applied to a * `type: "mcp_tool"` HOOK action. Claude Code hooks support five action types * (command / http / mcp_tool / prompt / agent); an `mcp_tool` action calls a tool * on an already-connected MCP server and REQUIRES a `server` + `tool` field. Two * ways it silently never fires: * * 1. it omits `server` or `tool` — malformed, can't dispatch (unambiguous, like * mcp-config; always flagged); * 2. its `server` isn't one the plugin declares — can't resolve (gated on the * plugin shipping a declared `mcpServers` set, exactly like mcp-tool-resolves; * built-in servers such as `ide` are allowlisted). * * Pure + high-precision. ONE detector reused by scan + the * `mcp-hook-target-resolves` lint rule. The dialect is injected (core ⊄ adapter). * * Scope note: the matcher surface (a `mcp__server__.*` matcher naming an * undeclared server) is a DIFFERENT, regex-shaped check left to a future * `hook-matcher` rule — this one is the literal `mcp_tool` action target only. */ import type { HarnessDialect } from "./dialect.js"; export type McpHookIssueKind = "incomplete" | "undeclared-server"; export interface McpHookIssue { readonly server: string | null; readonly kind: McpHookIssueKind; readonly message: string; } /** * Verify every `type: "mcp_tool"` hook action against the plugin's declared MCP * servers. Returns an {@link McpHookIssue} for each incomplete action (no * `server`/`tool`) and — when the plugin declares a server set — each action * whose `server` is neither declared nor a known built-in. */ export declare function verifyMcpHookTargets(hooks: unknown, declaredServers: readonly string[], dialect: HarnessDialect): McpHookIssue[]; //# sourceMappingURL=mcp-hook.d.ts.map