From 137a8f5550bebf0fd61fbf99fcc4d1b65f123861 Mon Sep 17 00:00:00 2001 From: Steve Calvert Date: Fri, 31 Jul 2026 16:18:19 -0700 Subject: [PATCH] rename(vnext): local-mcp source dir + glean_plugin server key sources/glean-vnext -> sources/local-mcp: the folder name described where the code came from (a folded-in "glean vnext" plugin), not what it is (the local stdio MCP server, its glean_run skill, and the auto-approve hook). Every sibling sources/* dir is named by host/purpose; this one wasn't. .mcp.json server key "glean-local" -> "glean_plugin": snake_case and glean-namespaced to match the convention used for client-side Glean MCP aliases (e.g. glean_default), distinct from the "plugin-mcp" name Glean's Admin console will use for the managed remote proxy server per the Dynamic Tools decision log (Decision 4) - those are two different namespaces and shouldn't collide. The auto-approve hook's legacy-key lookup now falls back through glean_plugin -> glean-local -> glean so a transitional install (only one of hook/.mcp.json updated yet) doesn't stop auto-approving. Updated every path/string reference across config, CI workflows, the CI shell-script guard, and docs/skill-reconciliation.md. CHANGELOG.md files are left untouched as historical release records. --- .github/workflows/publish.yml | 2 +- .github/workflows/test.yml | 2 +- .gitignore | 6 +++--- package.json | 6 +++--- pluginpack.config.ts | 4 ++-- scripts/check-no-shell-scripts.mjs | 12 ++++++------ sources/{glean-vnext => local-mcp}/.mcp.json | 2 +- sources/{glean-vnext => local-mcp}/build.mjs | 4 ++-- .../hooks/auto-approve-run-tool.mjs | 15 ++++++++++----- .../{glean-vnext => local-mcp}/hooks/hooks.json | 0 sources/{glean-vnext => local-mcp}/package.json | 0 .../plugin.pluginpack.json | 2 +- .../skills/glean_run/SKILL.md | 0 .../src/auth-callback-server.ts | 0 .../src/auth-provider.ts | 0 .../src/config-search.ts | 0 sources/{glean-vnext => local-mcp}/src/index.ts | 0 .../src/remote-client.ts | 0 .../src/remote-tools-cache-store.ts | 0 .../{glean-vnext => local-mcp}/src/session-id.ts | 0 .../src/skill-writer.ts | 0 .../{glean-vnext => local-mcp}/src/token-store.ts | 0 .../src/tools/approval-args.ts | 0 .../src/tools/find-skills.ts | 0 .../src/tools/remote-passthrough.ts | 0 .../src/tools/run-tool.ts | 0 sources/{glean-vnext => local-mcp}/src/types.ts | 0 .../src/url-config-store.ts | 0 sources/{glean-vnext => local-mcp}/start.mjs | 0 .../targets/codex/.mcp.json | 2 +- .../tests/auth-callback-server.test.ts | 0 .../tests/auth-provider.test.ts | 0 .../tests/auto-approve-hook.test.ts | 4 ++-- .../tests/config-search.test.ts | 0 .../tests/find-skills.test.ts | 0 .../tests/open-browser.test.ts | 0 .../tests/remote-client.test.ts | 0 .../tests/remote-passthrough.test.ts | 0 .../tests/remote-tools-cache-store.test.ts | 0 .../tests/run-tool.test.ts | 0 .../tests/session-id.test.ts | 0 .../tests/skill-writer.test.ts | 0 .../tests/token-store.test.ts | 0 .../tests/url-config-store.test.ts | 0 sources/{glean-vnext => local-mcp}/tsconfig.json | 0 45 files changed, 33 insertions(+), 28 deletions(-) rename sources/{glean-vnext => local-mcp}/.mcp.json (90%) rename sources/{glean-vnext => local-mcp}/build.mjs (95%) rename sources/{glean-vnext => local-mcp}/hooks/auto-approve-run-tool.mjs (85%) rename sources/{glean-vnext => local-mcp}/hooks/hooks.json (100%) rename sources/{glean-vnext => local-mcp}/package.json (100%) rename sources/{glean-vnext => local-mcp}/plugin.pluginpack.json (87%) rename sources/{glean-vnext => local-mcp}/skills/glean_run/SKILL.md (100%) rename sources/{glean-vnext => local-mcp}/src/auth-callback-server.ts (100%) rename sources/{glean-vnext => local-mcp}/src/auth-provider.ts (100%) rename sources/{glean-vnext => local-mcp}/src/config-search.ts (100%) rename sources/{glean-vnext => local-mcp}/src/index.ts (100%) rename sources/{glean-vnext => local-mcp}/src/remote-client.ts (100%) rename sources/{glean-vnext => local-mcp}/src/remote-tools-cache-store.ts (100%) rename sources/{glean-vnext => local-mcp}/src/session-id.ts (100%) rename sources/{glean-vnext => local-mcp}/src/skill-writer.ts (100%) rename sources/{glean-vnext => local-mcp}/src/token-store.ts (100%) rename sources/{glean-vnext => local-mcp}/src/tools/approval-args.ts (100%) rename sources/{glean-vnext => local-mcp}/src/tools/find-skills.ts (100%) rename sources/{glean-vnext => local-mcp}/src/tools/remote-passthrough.ts (100%) rename sources/{glean-vnext => local-mcp}/src/tools/run-tool.ts (100%) rename sources/{glean-vnext => local-mcp}/src/types.ts (100%) rename sources/{glean-vnext => local-mcp}/src/url-config-store.ts (100%) rename sources/{glean-vnext => local-mcp}/start.mjs (100%) rename sources/{glean-vnext => local-mcp}/targets/codex/.mcp.json (89%) rename sources/{glean-vnext => local-mcp}/tests/auth-callback-server.test.ts (100%) rename sources/{glean-vnext => local-mcp}/tests/auth-provider.test.ts (100%) rename sources/{glean-vnext => local-mcp}/tests/auto-approve-hook.test.ts (97%) rename sources/{glean-vnext => local-mcp}/tests/config-search.test.ts (100%) rename sources/{glean-vnext => local-mcp}/tests/find-skills.test.ts (100%) rename sources/{glean-vnext => local-mcp}/tests/open-browser.test.ts (100%) rename sources/{glean-vnext => local-mcp}/tests/remote-client.test.ts (100%) rename sources/{glean-vnext => local-mcp}/tests/remote-passthrough.test.ts (100%) rename sources/{glean-vnext => local-mcp}/tests/remote-tools-cache-store.test.ts (100%) rename sources/{glean-vnext => local-mcp}/tests/run-tool.test.ts (100%) rename sources/{glean-vnext => local-mcp}/tests/session-id.test.ts (100%) rename sources/{glean-vnext => local-mcp}/tests/skill-writer.test.ts (100%) rename sources/{glean-vnext => local-mcp}/tests/token-store.test.ts (100%) rename sources/{glean-vnext => local-mcp}/tests/url-config-store.test.ts (100%) rename sources/{glean-vnext => local-mcp}/tsconfig.json (100%) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cd33b65..de090cd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -72,7 +72,7 @@ jobs: - name: PrePluginPack # The pluginpack-action runs `npx pluginpack diff/build` directly (not # `npm run build`), so the repo's prebuild esbuild step never fires. - # sources/glean-vnext/dist/index.js is gitignored, so build it here or + # sources/local-mcp/dist/index.js is gitignored, so build it here or # pluginpack's additionalFiles source read fails for every target. run: npm run build:bundle diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b716b81..af8e64a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,7 @@ name: Test # Guard the source on every PR (and pushes to main): the transplanted -# glean-vnext server suite + typecheck, and a full build/validate of all +# local-mcp server suite + typecheck, and a full build/validate of all # targets. publish.yml only runs on release, so without this nothing catches # regressions before merge. on: diff --git a/.gitignore b/.gitignore index 4a892f8..91b36b9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,10 +3,10 @@ node_modules/ # Generated build output (published to the target repos by CI) dist/ -# glean-vnext runtime MCP server bundle (regenerated by build:bundle / prebuild) -sources/glean-vnext/dist/ +# local-mcp runtime MCP server bundle (regenerated by build:bundle / prebuild) +sources/local-mcp/dist/ -# Claude Code runtime cache (glean-vnext skills cache written during local runs) +# Claude Code runtime cache (local-mcp skills cache written during local runs) .claude/tmp/ # OS files diff --git a/package.json b/package.json index 726271c..c993925 100644 --- a/package.json +++ b/package.json @@ -11,12 +11,12 @@ "type": "module", "scripts": { "build": "pluginpack build", - "build:bundle": "node sources/glean-vnext/build.mjs", + "build:bundle": "node sources/local-mcp/build.mjs", "clean": "pluginpack clean", "check:no-shell": "node scripts/check-no-shell-scripts.mjs", "prune": "pluginpack prune", - "typecheck:bundle": "tsc --noEmit -p sources/glean-vnext/tsconfig.json", - "test:bundle": "vitest run --root sources/glean-vnext", + "typecheck:bundle": "tsc --noEmit -p sources/local-mcp/tsconfig.json", + "test:bundle": "vitest run --root sources/local-mcp", "validate": "pluginpack validate --target claude --dir dist/claude && pluginpack validate --target cursor --dir dist/cursor && pluginpack validate --target codex --dir dist/codex", "test": "npm run build && npm run validate", "prebuild": "node scripts/sync-changelog.mjs && npm run build:bundle", diff --git a/pluginpack.config.ts b/pluginpack.config.ts index 61ebd89..5a0bdf9 100644 --- a/pluginpack.config.ts +++ b/pluginpack.config.ts @@ -34,7 +34,7 @@ export default defineConfig({ }, plugins: { glean: { - from: ["glean-lib", "shared", "claude", "glean-vnext"], + from: ["glean-lib", "shared", "claude", "local-mcp"], components: ["skills", "agents", "hooks"], displayName: "Glean", description: @@ -95,7 +95,7 @@ export default defineConfig({ }, plugins: { glean: { - from: ["glean-lib", "codex", "codex-assets", "glean-vnext"], + from: ["glean-lib", "codex", "codex-assets", "local-mcp"], components: ["skills", "assets"], description: "Official Glean plugin — search documents, Slack, and email; explore code across repos; find experts and stakeholders; prep for meetings and onboarding.", diff --git a/scripts/check-no-shell-scripts.mjs b/scripts/check-no-shell-scripts.mjs index eb6b494..04ef0e9 100644 --- a/scripts/check-no-shell-scripts.mjs +++ b/scripts/check-no-shell-scripts.mjs @@ -1,8 +1,8 @@ #!/usr/bin/env node -// CI guard: fail if any shell/bash script is added under the glean-vnext +// CI guard: fail if any shell/bash script is added under the local-mcp // source tree. // -// Why: the glean-vnext plugin ships and runs on end-user machines, including +// Why: the local-mcp plugin ships and runs on end-user machines, including // Windows, where POSIX shell (.sh / bash) is not available. We already // migrated the launcher from start.sh to start.mjs for exactly this reason. // Every executable helper the plugin relies on must be cross-platform, so the @@ -15,9 +15,9 @@ import fs from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; -// Scope: the glean-vnext plugin source. Broaden this list if the rule should +// Scope: the local-mcp plugin source. Broaden this list if the rule should // cover other source trees too. -const SCAN_ROOTS = ["sources/glean-vnext"]; +const SCAN_ROOTS = ["sources/local-mcp"]; // Never descend into generated/vendored trees. const SKIP_DIRS = new Set(["node_modules", "dist", ".git"]); @@ -69,11 +69,11 @@ if (offenders.length > 0) { .sort() .join("\n"); console.error( - `\n\u274c Shell/bash scripts are not allowed in the glean-vnext plugin source.\n\n` + + `\n\u274c Shell/bash scripts are not allowed in the local-mcp plugin source.\n\n` + `Found ${offenders.length} shell script(s):\n${rel}\n\n` + `The plugin runs on end-user machines including Windows, where POSIX shell\n` + `is unavailable. Use a cross-platform Node.js script instead:\n\n` + - ` - Write it as a .mjs file (see sources/glean-vnext/start.mjs).\n` + + ` - Write it as a .mjs file (see sources/local-mcp/start.mjs).\n` + ` - Use Node built-ins (node:fs, node:path, node:child_process) instead of\n` + ` shell utilities, and avoid shell-only syntax.\n` + ` - Invoke it with "node