/** * Audit of the names a lexicon's MCP contributions are registered under (#1341). * * Core namespaces every contribution — `:` for a tool, * `chant:///` for a resource — but core is not the only place * that applies a prefix. `createDiffTool`/`createCatalogResource` * (../../lexicon-plugin-helpers.ts) emit `:diff` and * `:resource-catalog`, eleven lexicons write the prefix into the name * by hand, and `lexicon-authoring/lsp-mcp.mdx` taught a third form for URIs. * Applying the namespace unconditionally shipped `gitlab:gitlab:diff`, * `aws:aws:diff`, and `chant://azure/chant://lexicon/azure/catalog` in every * `chant serve mcp` session, while every doc named the single-prefixed form. * * The rule this checks is the one an agent experiences, not the one a lexicon * author typed: whatever the declaration style, the registered name must be a * single well-formed namespaced identifier. That keeps the check indifferent to * which of the three authored forms a lexicon uses, and still fails the moment a * name doubles or carries an embedded scheme. */ export interface McpNameAudit { /** How many tools + resources were examined. */ checked: number; /** One human-readable line per malformed registered name. */ violations: string[]; /** False when the lexicon could not be loaded — the audit is then vacuous. */ loaded: boolean; } /** `@intentius/chant-lexicon-aws` → `aws`; falls back to the directory name. */ export declare function lexiconNameFor(dir: string): string; /** * The malformed registered names among a lexicon's contributions. Pure, so the * rule can be tested without loading a lexicon package. */ export declare function mcpNameViolations(lexicon: string, tools: Array<{ name: string; }>, resources: Array<{ uri: string; }>): string[]; /** * Register this lexicon's MCP contributions the way the server does and check * the resulting names. */ export declare function auditMcpNames(dir: string): Promise; //# sourceMappingURL=check-lexicon-mcp.d.ts.map