/** * Exact package-pin parsing for MCP package resolvers. * * A version-shaped argument alone is not evidence that a server will execute that * package. Keep the resolver grammar here so generated catalog metadata, runtime * verification, and incoming-config attestation agree about the launch operand. */ export interface ExactNpmPackagePin { packageName: string; version: string; spec: string; } export type McpPackageResolver = "npx" | "uvx"; export declare function mcpResolverLike(command: string): McpPackageResolver | undefined; export declare function mcpPackageResolver(command: string): McpPackageResolver | undefined; export declare function hasExactPackagePin(value: string): boolean; /** * Returns the npm packages that an `npx` launch explicitly resolves. An empty * result means the command has no exact package evidence and must be treated as * unpinned. Only npx's direct package operand is accepted: `--package` / `--call` * modes can execute a different or arbitrary command and need separate provenance. */ export declare function npxLaunchPins(args: readonly string[]): ExactNpmPackagePin[]; export interface ExactUvxPackagePin { packageName: string; version: string; spec: string; } /** * The exact PRIMARY package pin behind a `uvx` launch — the distribution whose * running server self-reports `serverInfo.version` — returned only when the whole * launch is exactly pinned (primary AND every `--with`) with no source-changing * option. `undefined` means the launch carries no attestable exact-pin evidence. */ export declare function uvxPrimaryPin(args: readonly string[]): ExactUvxPackagePin | undefined; /** * `undefined` means this is not a package resolver. For npx/uvx, return a * fail-closed supply-chain classification based only on their actual launch * operands. */ export declare function mcpResolverPinState(command: string, args: readonly string[], env?: Readonly>): "pinned" | "unpinned" | undefined; /** * Repo-local MCP configs whose servers carry pin evidence. Both `.mcp.json` (Claude/Kimi) * and `.kiro/settings/mcp.json` use the identical `mcpServers` → `{command,args,env}` * shape, so pin attestation and currency read both without normalization. Kiro was absent * here while `aih policy project` was writing governed servers into it — the two most * security-relevant doctor flags had no Kiro coverage at all. * * Deliberately NOT the full `MCP_CONFIG_FILES` set: `.vscode/mcp.json` and `opencode.json` * use different shapes and would need the normalization `baseline/attestation.ts` carries. */ export declare const MCP_PIN_CONFIG_FILES: readonly string[]; /** * Qualify a server name with its config file so same-named servers across configs stay * distinguishable in reports. `.mcp.json` keeps the bare name, so existing Claude-only * output is unchanged. */ export declare function mcpLaunchLabel(server: string, configRel: string): string; /** Inverse of {@link mcpLaunchLabel}: the bare server name for catalog/name-keyed lookups. */ export declare function mcpLaunchServerName(label: string): string;