export type ToolRegistrationDriftReason = 'not-installed' | 'no-mcpServers-manifest' | 'dist-missing'; /** The generated-manifest disposition of one tool-plugin on disk. A tool-plugin * declares tools and ships an mcp/ directory (an mcpServers descriptor in the * tool surface) — the plugins whose server must mount for their tools to be * callable, whether admin- or specialist-facing. */ export interface ToolPluginManifestState { manifestPresent: boolean; hasMcpServers: boolean; distPresent: boolean; } export interface ToolRegistrationDriftDefect { accountId: string; /** Tool-plugin dir name as it appears in account.json enabledPlugins. */ plugin: string; /** The MCP server the mounted plugin would expose (== plugin dir name). */ expectedServer: string; reason: ToolRegistrationDriftReason; } export interface ToolRegistrationDriftResult { ok: boolean; defects: ToolRegistrationDriftDefect[]; /** Count of (account, tool-plugin) pairs checked. */ inspected: number; } /** Classify one tool-plugin's manifest state into a drift reason, or null when * the server would mount (manifest present, carries mcpServers, dist on disk). */ export declare function classifyToolRegistration(state: ToolPluginManifestState): ToolRegistrationDriftReason | null; /** Cross-check each account's enabled tool-plugins against their generated * manifests. `toolPlugins` maps a tool-plugin dir name to its on-disk manifest * state; an enabledPlugins entry absent from that map is not a tool-plugin * (platform non-tool plugin, skill-only premium sub, leaked foreign sub) and is * out of scope here. */ export declare function assertToolRegistrationDrift(accounts: ReadonlyArray<{ accountId: string; enabledPlugins: readonly string[]; }>, toolPlugins: ReadonlyMap): ToolRegistrationDriftResult; /** Index plugin dirs across the roots, keyed by dir basename — the same key * loadToolSurface and account.json enabledPlugins use. Platform plugins live at * `/`; premium subs at `//plugins/`; * standalone premium bundles at `/`. */ export declare function indexPluginDirs(pluginRoots: readonly string[]): Map; /** Read the generated-manifest state of every named tool-plugin. A name with no * dir on disk is reported as manifestPresent:false (→ not-installed), so a * tool-plugin that vanished from disk is still surfaced rather than skipped. A * present-but-corrupt manifest reads as manifestPresent:true, hasMcpServers: * false (→ no-mcpServers-manifest). * * A tool-plugin whose `mcp:` server is a shared `platform/lib/` binary * rather than a plugin-local `mcp/` dir (e.g. `graph`, served by * `platform/lib/graph-mcp`) is IN scope (Task 1576). The generator now emits an * `mcpServers` block for it via the `shared-lib` disposition, so it is judged by * the same generated-manifest criterion: `dist-missing` resolves the shared * server arg (the last `args` entry) via `${PLATFORM_ROOT}` from the boot env * and checks that file, rather than a plugin-local `mcp/dist/index.js`. A * no-local-`mcp/` plugin with no `mcp:` block is skills-only and stays out of * scope. */ export declare function readToolPluginManifestStates(pluginRoots: readonly string[], toolPluginNames: Iterable): Map; //# sourceMappingURL=tool-registration-drift.d.ts.map