diff --git a/AGENTS.md b/AGENTS.md index 483f049..2c06868 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,4 +1,4 @@ - + # AGENTS.md diff --git a/CLAUDE.md b/CLAUDE.md index ce29770..9301ba7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,4 +1,4 @@ - + # CLAUDE.md diff --git a/src/tools/__tests__/tools.test.ts b/src/tools/__tests__/tools.test.ts index 291da33..a40407a 100644 --- a/src/tools/__tests__/tools.test.ts +++ b/src/tools/__tests__/tools.test.ts @@ -120,7 +120,7 @@ describe("devtools_getFleetStatus happy path", () => { "fetch", makeFetchMock({ "registry.json": REGISTRY_FIXTURE, - "VERSION": VERSION_FIXTURE, + "STANDARDS_VERSION": VERSION_FIXTURE, "releases/latest": JSON.stringify({ tag_name: "v1.0.0" }), }), ); @@ -142,13 +142,13 @@ describe("devtools_getFleetStatus happy path", () => { }); describe("devtools_checkDrift happy path", () => { - it("returns summary with metaVersion and results array", async () => { + it("returns summary with standardsVersion and results array", async () => { vi.stubGlobal( "fetch", makeFetchMock({ "drift-checker.config.json": DRIFT_CONFIG_FIXTURE, "registry.json": REGISTRY_FIXTURE, - "VERSION": VERSION_FIXTURE, + "STANDARDS_VERSION": VERSION_FIXTURE, "CLAUDE.md": CLAUDE_MD_FIXTURE, "contents/.github/workflows": JSON.stringify([ { name: "drift-check.yml", type: "file" }, @@ -169,7 +169,7 @@ describe("devtools_checkDrift happy path", () => { const result = await tool.handler({ slug: "steam-mcp", verbose: false }); expect(result.isError).toBeUndefined(); const parsed = JSON.parse(result.content[0].text); - expect(parsed).toHaveProperty("metaVersion"); + expect(parsed).toHaveProperty("standardsVersion"); expect(parsed).toHaveProperty("results"); }); }); diff --git a/src/tools/checkDrift.ts b/src/tools/checkDrift.ts index 77416b2..5f0dc7e 100644 --- a/src/tools/checkDrift.ts +++ b/src/tools/checkDrift.ts @@ -2,7 +2,7 @@ import { z } from "zod"; import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { fetchRegistry, - fetchMetaVersion, + fetchStandardsVersion, rawFetch, githubFetch, extractStandardsVersion, @@ -35,10 +35,10 @@ function parseSemver(v: string): [number, number, number] { function applySignalPolicy( policy: string, repoVersion: string, - metaVersion: string, + standardsVersion: string, ): Severity { const [rm, rn, rp] = parseSemver(repoVersion); - const [mm, mn, mp] = parseSemver(metaVersion); + const [mm, mn, mp] = parseSemver(standardsVersion); // Repo is ahead of meta - unexpected, surface as warning if ( @@ -92,14 +92,14 @@ export function register(server: McpServer): void { inputSchema, async ({ slug, verbose }) => { try { - const [configRaw, registry, metaVersion] = await Promise.all([ + const [configRaw, registry, standardsVersion] = await Promise.all([ rawFetch( "TMHSDigital", "Developer-Tools-Directory", "standards/drift-checker.config.json", ), fetchRegistry(), - fetchMetaVersion(), + fetchStandardsVersion(), ]); const config = JSON.parse(configRaw) as DriftConfig; @@ -154,12 +154,12 @@ export function register(server: McpServer): void { message: "standards-version marker not found in CLAUDE.md or AGENTS.md", }); } else { - const severity = applySignalPolicy(policy, standardsVersion, metaVersion); + const severity = applySignalPolicy(policy, standardsVersion, standardsVersion); if (severity !== "ok") { repoFindings.push({ check: "version-signal", severity, - message: `standards-version ${standardsVersion} vs meta ${metaVersion}`, + message: `standards-version ${standardsVersion} vs meta ${standardsVersion}`, }); } } @@ -191,7 +191,7 @@ export function register(server: McpServer): void { })); const summary = { - metaVersion, + standardsVersion, signalPolicy: policy, checkedRepos: filtered.length, errors: filtered.flatMap((r) => diff --git a/src/tools/getFleetStatus.ts b/src/tools/getFleetStatus.ts index a869548..754c1ab 100644 --- a/src/tools/getFleetStatus.ts +++ b/src/tools/getFleetStatus.ts @@ -2,7 +2,7 @@ import { z } from "zod"; import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { fetchRegistry, - fetchMetaVersion, + fetchStandardsVersion, rawFetch, githubFetch, extractStandardsVersion, @@ -46,9 +46,9 @@ export function register(server: McpServer): void { inputSchema, async ({ include_standards_version }) => { try { - const [registry, metaVersion] = await Promise.all([ + const [registry, metaStandardsVersion] = await Promise.all([ fetchRegistry(), - fetchMetaVersion(), + fetchStandardsVersion(), ]); const results = await Promise.all( @@ -83,7 +83,7 @@ export function register(server: McpServer): void { latestReleaseTag: latestTag, versionSignal: versionSignal(entry.version, latestTag), ...(include_standards_version - ? { standardsVersion, metaVersion } + ? { standardsVersion, metaStandardsVersion } : {}), }; }), diff --git a/src/utils/github.ts b/src/utils/github.ts index c35b15c..3d3b751 100644 --- a/src/utils/github.ts +++ b/src/utils/github.ts @@ -127,7 +127,7 @@ export async function fetchRegistry(): Promise { return JSON.parse(raw) as RegistryEntry[]; } -export async function fetchMetaVersion(): Promise { - const raw = await rawFetch(META_OWNER, META_REPO, "VERSION"); +export async function fetchStandardsVersion(): Promise { + const raw = await rawFetch(META_OWNER, META_REPO, "STANDARDS_VERSION"); return raw.trim(); }