Repository navigation
fix(bootstrap): resolve MCP through the installed project CLI - #408
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bootstrap currently writes an unpinned
npx @stackbilt/cliMCP entry even when the project pins Charter locally. Generated MCP entries now resolve the installed project CLI through npm (exec --no --package=@stackbilt/cli -- charter), pnpm (exec charter), or Yarn (run charter), selected from the root package-manager declaration and existing lockfile detection. No entry uses an implicit npx install.Existing MCP entries remain byte-for-byte unchanged without
--force, including legacy npx entries and custom AI directories. Forced upgrades retain the existing backup-first behavior and other servers/settings. README and CLI-reference examples now match the generated npm configuration.Closes #399.
Validation on Windows Node 24.19.0 / pnpm 9.15.9 in the isolated issue-399 worktree:
pnpm install --frozen-lockfile: passed.pnpm run buildandpnpm run typecheck: passed.pnpm exec vitest run packages/cli/src/__tests__/bootstrap-mcp-local.test.ts packages/cli/src/__tests__/no-silent-overwrite.test.ts packages/cli/src/__tests__/workflow-mcp-backup.test.ts: 154/154 passed. Includes 12 new cases: manager/lock selection, malformed package metadata, legacy entry preservation, forced backup/custom config, rerun idempotence, and executing the generated npm command with an empty offline cache and no installed CLI (fails without installing one).pnpm run docs:check: papers lint passed; docs-sync explicitly skipped because no .docsync.json exists.git diff --check, smart-commit preview, pre-commit TypeScript and ADF evidence gates: passed. All touched source/docs retain LF.pnpm run test: 1,937 passed, four failed (1,941 total). The failures match the four known Windows baseline cases listed below. Log:.release-399-full-tests.login this worktree.Main CI currently fails its unchanged dependency audit before build/tests. Separate PR #404 and the approved major Zod migration #310 address that release blocker. Known Windows baseline full-suite failures cover the POSIX bootstrap fixture premise, context-refresh and serve-context path separators, and Ctrl-D fake-TTY behavior. Audit/tests have not been weakened. No merges, publication, tags, deployment, production data changes, or remote branch deletion performed.