import { Finding, McpServerConfig, RuleCategory, ToolSurface } from '../types.js'; export interface Rule { id: string; category: RuleCategory; description: string; /** Check a configured MCP server entry (static scan). */ checkServer?(server: McpServerConfig): Finding[]; /** Check a tool surface (live scan or lockfile audit). */ checkTool?(tool: ToolSurface, serverName: string): Finding[]; /** Check the whole tool surface of one server at once. */ checkToolset?(tools: ToolSurface[], serverName: string): Finding[]; /** Check a source file (repo scan). */ checkSource?(file: string, content: string): Finding[]; /** Check an agent skill file (SKILL.md; repo scan). */ checkSkill?(file: string, content: string): Finding[]; /** Check every configured server's tool surface together (cross-server analysis). */ checkConfiguration?(surfaces: Record): Finding[]; } export declare function finding(rule: Rule, partial: Omit): Finding; /** * Matched-content excerpt safe to embed in a finding message: runs of * whitespace (including newlines from multi-line matches) collapse to single * spaces so messages stay one line in tables, annotations, and SARIF. */ export declare function snippet(text: string, max: number): string; export declare function toolText(tool: ToolSurface): string; /** * Regex fragment matching any of `verbs` in their common English forms * ("execute" also matches "executes", "executing", "executed"). Tool * descriptions are usually written in third person ("Executes shell commands"), * so bare infinitive matching silently misses them. */ export declare function verbAlt(verbs: string[]): string;