@mushi-mushi/mcp-ci 0.6.5 → 0.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -192,4 +192,4 @@ MIT
|
|
|
192
192
|
<!-- mushi-readme-stats-footer -->
|
|
193
193
|
---
|
|
194
194
|
|
|
195
|
-
<sub>Monorepo scale (July 2026): 65 edge functions ·
|
|
195
|
+
<sub>Monorepo scale (July 2026): 65 edge functions · 472 SQL migrations · 13 outbound plugins · 11 inbound adapters · 19 pipeline agents. Canonical counts: <a href="https://github.com/kensaurus/mushi-mushi/blob/master/docs/stats.md">docs/stats.md</a> · <code>pnpm docs-stats</code></sub>
|
|
@@ -123,8 +123,7 @@ async function walk(dir, onFile) {
|
|
|
123
123
|
}
|
|
124
124
|
export {
|
|
125
125
|
discoverRoutes,
|
|
126
|
-
fetchSupabaseOpenApi,
|
|
127
126
|
parseOpenApiFile,
|
|
128
127
|
walkNextAppRouter
|
|
129
128
|
};
|
|
130
|
-
//# sourceMappingURL=api-contract-
|
|
129
|
+
//# sourceMappingURL=api-contract-XM5KONXQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/api-contract.ts"],"sourcesContent":["/**\n * API Contract adapter (whitepaper §5 Gate 3).\n *\n * Walks a customer repo for the THREE most common API surface\n * declarations and returns a normalised `${METHOD}:${path}` set:\n *\n * 1. Next.js App Router — `app/**\\/route.ts` exports (GET / POST / …).\n * 2. OpenAPI document — `openapi.yaml` / `openapi.json` paths.\n * 3. Supabase introspection — server URL hand-supplied; we GET\n * `/rest/v1/?apikey=` and pull the OpenAPI Postgrest exposes.\n *\n * The function is intentionally pure-Node + zero-dep so the GitHub\n * Action that wraps it stays tiny. It POSTs the discovered set into\n * the same `inventory-gates` endpoint via a `discovered_apis` payload\n * which Gate 3 already knows how to consume (it currently reads from\n * the crawl summary; this adapter widens the source).\n */\n\nimport { promises as fs } from 'node:fs'\nimport path from 'node:path'\n\ntype DiscoveredRoute = string // \"METHOD:path\"\n\nconst HTTP_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'] as const\n\n/**\n * Walk Next.js App Router route handlers — `app/**\\/route.{ts,js,tsx,jsx}`\n * exports.\n *\n * Heuristic: scan each `route.*` file for `export async function GET|POST|…`.\n * We don't full-AST parse: a string match keeps the script dependency-free\n * and false positives are low (the file name is the safety net). The path\n * is derived from the directory structure relative to `app/`.\n * @internal Exported for tests only.\n */\nexport async function walkNextAppRouter(rootDir: string): Promise<DiscoveredRoute[]> {\n const out = new Set<DiscoveredRoute>()\n const appDir = path.join(rootDir, 'app')\n try {\n await walk(appDir, async (filePath) => {\n const base = path.basename(filePath)\n if (!/^route\\.(ts|tsx|js|jsx)$/.test(base)) return\n const content = await fs.readFile(filePath, 'utf-8').catch(() => '')\n const relative = path.relative(appDir, path.dirname(filePath)).split(path.sep).join('/')\n // Strip Next.js App Router URL-invisible segments before deriving\n // the route. Without this filter the discovery output leaks\n // file-system organisation into the API contract:\n // - `(group)` → route groups (URL-invisible bucket)\n // - `@slot` → parallel-route slots (rendered into a slot, no URL)\n // - `_private` → private/co-located files (never routable)\n // Leaving these in produces phony entries like `GET:/(marketing)/api/foo`\n // that never exist as real URLs and create false API-contract failures\n // for repos that use these standard conventions.\n const segments = relative === '' ? [] : relative.split('/').filter((seg) => {\n if (!seg) return false\n if (seg.startsWith('(') && seg.endsWith(')')) return false\n if (seg.startsWith('@')) return false\n if (seg.startsWith('_')) return false\n return true\n })\n // Convert `[id]` and `[...slug]` → `{id}` / `{slug}` and prefix with `/`.\n const routePath = '/' + segments.join('/').replace(/\\[(\\.{3})?([^\\]]+)\\]/g, '{$2}')\n for (const method of HTTP_METHODS) {\n const re = new RegExp(`export\\\\s+(?:async\\\\s+)?function\\\\s+${method}\\\\b`)\n if (re.test(content)) out.add(`${method}:${routePath || '/'}`)\n }\n })\n } catch {\n // app/ doesn't exist or is unreadable — caller falls back to OpenAPI\n }\n return Array.from(out)\n}\n\n/**\n * Parse an OpenAPI document (`openapi.yaml` / `.json`) and emit one\n * route per (method, path) entry. We use a lightweight Yaml fallback —\n * if `yaml` isn't installed in the consumer repo we just JSON.parse.\n * @internal Exported for tests only.\n */\nexport async function parseOpenApiFile(filePath: string): Promise<DiscoveredRoute[]> {\n const out: DiscoveredRoute[] = []\n try {\n const content = await fs.readFile(filePath, 'utf-8')\n let doc: unknown\n if (filePath.endsWith('.json')) {\n doc = JSON.parse(content)\n } else {\n try {\n // `yaml` is an optional peer-dep here — the consumer repo may or may\n // not have it installed. Cast to `any` so TS doesn't require us to\n // declare it as a hard dep just for the dynamic-import fallback path.\n const yaml = (await import('yaml' as string)) as { parse: (s: string) => unknown }\n doc = yaml.parse(content)\n } catch {\n return []\n }\n }\n const paths = (doc as { paths?: Record<string, Record<string, unknown>> }).paths ?? {}\n for (const [p, ops] of Object.entries(paths)) {\n for (const m of Object.keys(ops)) {\n const upper = m.toUpperCase()\n if ((HTTP_METHODS as readonly string[]).includes(upper)) {\n out.push(`${upper}:${p}`)\n }\n }\n }\n } catch {\n return []\n }\n return out\n}\n\n/**\n * Fetch the Supabase Postgrest OpenAPI doc — every Supabase project\n * exposes one at `/rest/v1/?apikey=…`.\n */\nasync function fetchSupabaseOpenApi(\n supabaseUrl: string,\n apiKey: string,\n): Promise<DiscoveredRoute[]> {\n try {\n const res = await fetch(`${supabaseUrl.replace(/\\/$/, '')}/rest/v1/?apikey=${apiKey}`, {\n headers: { Accept: 'application/json' },\n })\n if (!res.ok) return []\n const doc = await res.json()\n const paths = (doc as { paths?: Record<string, Record<string, unknown>> }).paths ?? {}\n const out: DiscoveredRoute[] = []\n for (const [p, ops] of Object.entries(paths)) {\n for (const m of Object.keys(ops)) {\n const upper = m.toUpperCase()\n if ((HTTP_METHODS as readonly string[]).includes(upper)) {\n out.push(`${upper}:/rest/v1${p}`)\n }\n }\n }\n return out\n } catch {\n return []\n }\n}\n\n/**\n * Aggregate every adapter for a single repo + optional Supabase target\n * and return a deduplicated, sorted list.\n */\nexport async function discoverRoutes(opts: {\n repoRoot: string\n openapiFile?: string\n supabaseUrl?: string\n supabaseAnonKey?: string\n}): Promise<DiscoveredRoute[]> {\n const all = new Set<DiscoveredRoute>()\n\n const next = await walkNextAppRouter(opts.repoRoot)\n for (const r of next) all.add(r)\n\n if (opts.openapiFile) {\n const oas = await parseOpenApiFile(opts.openapiFile)\n for (const r of oas) all.add(r)\n } else {\n // Convention: `openapi.yaml` at repo root.\n for (const candidate of ['openapi.yaml', 'openapi.json', 'openapi.yml']) {\n const full = path.join(opts.repoRoot, candidate)\n try {\n await fs.access(full)\n const oas = await parseOpenApiFile(full)\n for (const r of oas) all.add(r)\n break\n } catch {\n // not present\n }\n }\n }\n\n if (opts.supabaseUrl && opts.supabaseAnonKey) {\n const supa = await fetchSupabaseOpenApi(opts.supabaseUrl, opts.supabaseAnonKey)\n for (const r of supa) all.add(r)\n }\n\n return Array.from(all).sort()\n}\n\nasync function walk(dir: string, onFile: (p: string) => Promise<void>): Promise<void> {\n let entries\n try {\n entries = await fs.readdir(dir, { withFileTypes: true })\n } catch {\n return\n }\n for (const entry of entries) {\n if (entry.name === 'node_modules' || entry.name === '.next' || entry.name.startsWith('.')) continue\n const full = path.join(dir, entry.name)\n if (entry.isDirectory()) {\n await walk(full, onFile)\n } else if (entry.isFile()) {\n await onFile(full)\n }\n }\n}\n"],"mappings":";AAkBA,SAAS,YAAY,UAAU;AAC/B,OAAO,UAAU;AAIjB,IAAM,eAAe,CAAC,OAAO,QAAQ,OAAO,SAAS,QAAQ;AAY7D,eAAsB,kBAAkB,SAA6C;AACnF,QAAM,MAAM,oBAAI,IAAqB;AACrC,QAAM,SAAS,KAAK,KAAK,SAAS,KAAK;AACvC,MAAI;AACF,UAAM,KAAK,QAAQ,OAAO,aAAa;AACrC,YAAM,OAAO,KAAK,SAAS,QAAQ;AACnC,UAAI,CAAC,2BAA2B,KAAK,IAAI,EAAG;AAC5C,YAAM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,GAAG;AACvE,YAAM,OAAO,KAAK,KAAK,KAAK,UAAU,SAAS;AAC/C,UAAI;AACF,cAAM,GAAG,OAAO,IAAI;AACpB,cAAM,MAAM,MAAM,iBAAiB,IAAI;AACvC,mBAAW,KAAK,IAAK,KAAI,IAAI,CAAC;AAC9B;AAAA,MACF,QAAQ;AAAA,MAER;AAAA,IACF;AAAA,EACF;AAEA,MAAI,KAAK,eAAe,KAAK,iBAAiB;AAC5C,UAAM,OAAO,MAAM,qBAAqB,KAAK,aAAa,KAAK,eAAe;AAC9E,eAAW,KAAK,KAAM,KAAI,IAAI,CAAC;AAAA,EACjC;AAEA,SAAO,MAAM,KAAK,GAAG,EAAE,KAAK;AAC9B;AAEA,eAAe,KAAK,KAAa,QAAqD;AACpF,MAAI;AACJ,MAAI;AACF,cAAU,MAAM,GAAG,QAAQ,KAAK,EAAE,eAAe,KAAK,CAAC;AAAA,EACzD,QAAQ;AACN;AAAA,EACF;AACA,aAAW,SAAS,SAAS;AAC3B,QAAI,MAAM,SAAS,kBAAkB,MAAM,SAAS,WAAW,MAAM,KAAK,WAAW,GAAG,EAAG;AAC3F,UAAM,OAAO,KAAK,KAAK,KAAK,MAAM,IAAI;AACtC,QAAI,MAAM,YAAY,GAAG;AACvB,YAAM,KAAK,MAAM,MAAM;AAAA,IACzB,WAAW,MAAM,OAAO,GAAG;AACzB,YAAM,OAAO,IAAI;AAAA,IACnB;AAAA,EACF;AACF;","names":[]}
|
package/dist/cli.js
CHANGED
|
@@ -86,7 +86,7 @@ async function main() {
|
|
|
86
86
|
break;
|
|
87
87
|
}
|
|
88
88
|
case "discover-api": {
|
|
89
|
-
const { discoverRoutes } = await import("./api-contract-
|
|
89
|
+
const { discoverRoutes } = await import("./api-contract-XM5KONXQ.js");
|
|
90
90
|
const repoRoot = core.getInput("repo-root") || process.cwd();
|
|
91
91
|
const openapiFile = core.getInput("openapi-file") || void 0;
|
|
92
92
|
const supabaseUrl = core.getInput("supabase-url") || void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mushi-mushi/mcp-ci",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"description": "GitHub Action entrypoint for running Mushi Mushi MCP tools in CI — trigger judge, dispatch fixes, gate merges on classification coverage.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api-contract.ts"],"sourcesContent":["/**\n * API Contract adapter (whitepaper §5 Gate 3).\n *\n * Walks a customer repo for the THREE most common API surface\n * declarations and returns a normalised `${METHOD}:${path}` set:\n *\n * 1. Next.js App Router — `app/**\\/route.ts` exports (GET / POST / …).\n * 2. OpenAPI document — `openapi.yaml` / `openapi.json` paths.\n * 3. Supabase introspection — server URL hand-supplied; we GET\n * `/rest/v1/?apikey=` and pull the OpenAPI Postgrest exposes.\n *\n * The function is intentionally pure-Node + zero-dep so the GitHub\n * Action that wraps it stays tiny. It POSTs the discovered set into\n * the same `inventory-gates` endpoint via a `discovered_apis` payload\n * which Gate 3 already knows how to consume (it currently reads from\n * the crawl summary; this adapter widens the source).\n */\n\nimport { promises as fs } from 'node:fs'\nimport path from 'node:path'\n\ntype DiscoveredRoute = string // \"METHOD:path\"\n\nconst HTTP_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'] as const\n\n/**\n * Walk Next.js App Router route handlers — `app/**\\/route.{ts,js,tsx,jsx}`\n * exports.\n *\n * Heuristic: scan each `route.*` file for `export async function GET|POST|…`.\n * We don't full-AST parse: a string match keeps the script dependency-free\n * and false positives are low (the file name is the safety net). The path\n * is derived from the directory structure relative to `app/`.\n */\nexport async function walkNextAppRouter(rootDir: string): Promise<DiscoveredRoute[]> {\n const out = new Set<DiscoveredRoute>()\n const appDir = path.join(rootDir, 'app')\n try {\n await walk(appDir, async (filePath) => {\n const base = path.basename(filePath)\n if (!/^route\\.(ts|tsx|js|jsx)$/.test(base)) return\n const content = await fs.readFile(filePath, 'utf-8').catch(() => '')\n const relative = path.relative(appDir, path.dirname(filePath)).split(path.sep).join('/')\n // Strip Next.js App Router URL-invisible segments before deriving\n // the route. Without this filter the discovery output leaks\n // file-system organisation into the API contract:\n // - `(group)` → route groups (URL-invisible bucket)\n // - `@slot` → parallel-route slots (rendered into a slot, no URL)\n // - `_private` → private/co-located files (never routable)\n // Leaving these in produces phony entries like `GET:/(marketing)/api/foo`\n // that never exist as real URLs and create false API-contract failures\n // for repos that use these standard conventions.\n const segments = relative === '' ? [] : relative.split('/').filter((seg) => {\n if (!seg) return false\n if (seg.startsWith('(') && seg.endsWith(')')) return false\n if (seg.startsWith('@')) return false\n if (seg.startsWith('_')) return false\n return true\n })\n // Convert `[id]` and `[...slug]` → `{id}` / `{slug}` and prefix with `/`.\n const routePath = '/' + segments.join('/').replace(/\\[(\\.{3})?([^\\]]+)\\]/g, '{$2}')\n for (const method of HTTP_METHODS) {\n const re = new RegExp(`export\\\\s+(?:async\\\\s+)?function\\\\s+${method}\\\\b`)\n if (re.test(content)) out.add(`${method}:${routePath || '/'}`)\n }\n })\n } catch {\n // app/ doesn't exist or is unreadable — caller falls back to OpenAPI\n }\n return Array.from(out)\n}\n\n/**\n * Parse an OpenAPI document (`openapi.yaml` / `.json`) and emit one\n * route per (method, path) entry. We use a lightweight Yaml fallback —\n * if `yaml` isn't installed in the consumer repo we just JSON.parse.\n */\nexport async function parseOpenApiFile(filePath: string): Promise<DiscoveredRoute[]> {\n const out: DiscoveredRoute[] = []\n try {\n const content = await fs.readFile(filePath, 'utf-8')\n let doc: unknown\n if (filePath.endsWith('.json')) {\n doc = JSON.parse(content)\n } else {\n try {\n // `yaml` is an optional peer-dep here — the consumer repo may or may\n // not have it installed. Cast to `any` so TS doesn't require us to\n // declare it as a hard dep just for the dynamic-import fallback path.\n const yaml = (await import('yaml' as string)) as { parse: (s: string) => unknown }\n doc = yaml.parse(content)\n } catch {\n return []\n }\n }\n const paths = (doc as { paths?: Record<string, Record<string, unknown>> }).paths ?? {}\n for (const [p, ops] of Object.entries(paths)) {\n for (const m of Object.keys(ops)) {\n const upper = m.toUpperCase()\n if ((HTTP_METHODS as readonly string[]).includes(upper)) {\n out.push(`${upper}:${p}`)\n }\n }\n }\n } catch {\n return []\n }\n return out\n}\n\n/**\n * Fetch the Supabase Postgrest OpenAPI doc — every Supabase project\n * exposes one at `/rest/v1/?apikey=…`.\n */\nexport async function fetchSupabaseOpenApi(\n supabaseUrl: string,\n apiKey: string,\n): Promise<DiscoveredRoute[]> {\n try {\n const res = await fetch(`${supabaseUrl.replace(/\\/$/, '')}/rest/v1/?apikey=${apiKey}`, {\n headers: { Accept: 'application/json' },\n })\n if (!res.ok) return []\n const doc = await res.json()\n const paths = (doc as { paths?: Record<string, Record<string, unknown>> }).paths ?? {}\n const out: DiscoveredRoute[] = []\n for (const [p, ops] of Object.entries(paths)) {\n for (const m of Object.keys(ops)) {\n const upper = m.toUpperCase()\n if ((HTTP_METHODS as readonly string[]).includes(upper)) {\n out.push(`${upper}:/rest/v1${p}`)\n }\n }\n }\n return out\n } catch {\n return []\n }\n}\n\n/**\n * Aggregate every adapter for a single repo + optional Supabase target\n * and return a deduplicated, sorted list.\n */\nexport async function discoverRoutes(opts: {\n repoRoot: string\n openapiFile?: string\n supabaseUrl?: string\n supabaseAnonKey?: string\n}): Promise<DiscoveredRoute[]> {\n const all = new Set<DiscoveredRoute>()\n\n const next = await walkNextAppRouter(opts.repoRoot)\n for (const r of next) all.add(r)\n\n if (opts.openapiFile) {\n const oas = await parseOpenApiFile(opts.openapiFile)\n for (const r of oas) all.add(r)\n } else {\n // Convention: `openapi.yaml` at repo root.\n for (const candidate of ['openapi.yaml', 'openapi.json', 'openapi.yml']) {\n const full = path.join(opts.repoRoot, candidate)\n try {\n await fs.access(full)\n const oas = await parseOpenApiFile(full)\n for (const r of oas) all.add(r)\n break\n } catch {\n // not present\n }\n }\n }\n\n if (opts.supabaseUrl && opts.supabaseAnonKey) {\n const supa = await fetchSupabaseOpenApi(opts.supabaseUrl, opts.supabaseAnonKey)\n for (const r of supa) all.add(r)\n }\n\n return Array.from(all).sort()\n}\n\nasync function walk(dir: string, onFile: (p: string) => Promise<void>): Promise<void> {\n let entries\n try {\n entries = await fs.readdir(dir, { withFileTypes: true })\n } catch {\n return\n }\n for (const entry of entries) {\n if (entry.name === 'node_modules' || entry.name === '.next' || entry.name.startsWith('.')) continue\n const full = path.join(dir, entry.name)\n if (entry.isDirectory()) {\n await walk(full, onFile)\n } else if (entry.isFile()) {\n await onFile(full)\n }\n }\n}\n"],"mappings":";AAkBA,SAAS,YAAY,UAAU;AAC/B,OAAO,UAAU;AAIjB,IAAM,eAAe,CAAC,OAAO,QAAQ,OAAO,SAAS,QAAQ;AAW7D,eAAsB,kBAAkB,SAA6C;AACnF,QAAM,MAAM,oBAAI,IAAqB;AACrC,QAAM,SAAS,KAAK,KAAK,SAAS,KAAK;AACvC,MAAI;AACF,UAAM,KAAK,QAAQ,OAAO,aAAa;AACrC,YAAM,OAAO,KAAK,SAAS,QAAQ;AACnC,UAAI,CAAC,2BAA2B,KAAK,IAAI,EAAG;AAC5C,YAAM,UAAU,MAAM,GAAG,SAAS,UAAU,OAAO,EAAE,MAAM,MAAM,EAAE;AACnE,YAAM,WAAW,KAAK,SAAS,QAAQ,KAAK,QAAQ,QAAQ,CAAC,EAAE,MAAM,KAAK,GAAG,EAAE,KAAK,GAAG;AAUvF,YAAM,WAAW,aAAa,KAAK,CAAC,IAAI,SAAS,MAAM,GAAG,EAAE,OAAO,CAAC,QAAQ;AAC1E,YAAI,CAAC,IAAK,QAAO;AACjB,YAAI,IAAI,WAAW,GAAG,KAAK,IAAI,SAAS,GAAG,EAAG,QAAO;AACrD,YAAI,IAAI,WAAW,GAAG,EAAG,QAAO;AAChC,YAAI,IAAI,WAAW,GAAG,EAAG,QAAO;AAChC,eAAO;AAAA,MACT,CAAC;AAED,YAAM,YAAY,MAAM,SA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