build: add canonical product catalog and docs drift checks

Derive package, tool-family, provider, setup-client, schema-version, and CLI facts from the runtime contract sources into a deterministic checked-in catalog.

Add non-mutating generated-file checks, exact TypeDoc regenerate-and-compare validation, caller-visible documentation fact checks, and CI enforcement through docs:check.

Cover command-router parity, source-derived catalog values, deliberate documentation drift, and stale generated artifacts while preserving runtime behavior.
This commit is contained in:
N0zoM1z0
2026-07-15 17:43:52 +08:00
parent addc208f12
commit beb9ece7d1
109 changed files with 1878 additions and 281 deletions
+43 -20
View File
@@ -8,46 +8,69 @@ export interface SetupClient {
readonly format?: "json" | "toml" | "unsupported";
}
/** Describe every client location that setup, doctor, or uninstall may inspect. */
export const supportedClients = (home: string): readonly SetupClient[] => [
/** Stable product metadata used to derive setup discovery and documentation. */
export const SUPPORTED_CLIENT_DEFINITIONS = [
{
name: "claude_code",
configPath: join(home, ".claude.json"),
markerPath: join(home, ".claude"),
displayName: "Claude Code",
configPath: [".claude.json"],
markerPath: [".claude"],
format: "json",
},
{
name: "claude_desktop",
configPath: join(
home,
"Library/Application Support/Claude/claude_desktop_config.json",
),
markerPath: join(home, "Library/Application Support/Claude"),
displayName: "Claude Desktop",
configPath: [
"Library",
"Application Support",
"Claude",
"claude_desktop_config.json",
],
markerPath: ["Library", "Application Support", "Claude"],
format: "json",
},
{
name: "codex",
configPath: join(home, ".codex/config.toml"),
markerPath: join(home, ".codex"),
displayName: "Codex",
configPath: [".codex", "config.toml"],
markerPath: [".codex"],
format: "toml",
},
{
name: "cursor",
configPath: join(home, ".cursor/mcp.json"),
markerPath: join(home, ".cursor"),
displayName: "Cursor",
configPath: [".cursor", "mcp.json"],
markerPath: [".cursor"],
format: "json",
},
{
name: "gemini_cli",
configPath: join(home, ".gemini/settings.json"),
markerPath: join(home, ".gemini"),
displayName: "Gemini CLI",
configPath: [".gemini", "settings.json"],
markerPath: [".gemini"],
format: "json",
},
{
name: "windsurf",
configPath: join(home, ".codeium/windsurf/mcp_config.json"),
markerPath: join(home, ".codeium/windsurf"),
displayName: "Windsurf",
configPath: [".codeium", "windsurf", "mcp_config.json"],
markerPath: [".codeium", "windsurf"],
format: "json",
},
{
name: "devin",
configPath: join(home, ".devin"),
markerPath: join(home, ".devin"),
displayName: "Devin",
configPath: [".devin"],
markerPath: [".devin"],
format: "unsupported",
},
];
] as const;
/** Describe every client location that setup, doctor, or uninstall may inspect. */
export const supportedClients = (home: string): readonly SetupClient[] =>
SUPPORTED_CLIENT_DEFINITIONS.map((definition) => ({
name: definition.name,
configPath: join(home, ...definition.configPath),
markerPath: join(home, ...definition.markerPath),
format: definition.format,
}));