Skip to content

Share one package-version constant and test the MCP handshake version - #12

Open
coderyaz856 wants to merge 1 commit into
KellisLab:mainfrom
coderyaz856:Yazid-The-Tech-Alchemist
Open

coderyaz856 wants to merge 1 commit into
KellisLab:mainfrom
coderyaz856:Yazid-The-Tech-Alchemist

Conversation

@coderyaz856

@coderyaz856 coderyaz856 commented Sep 14, 2026 •

Copy link
Copy Markdown

Follow-up to #11

Context

Issue #11 identified that the MCP client reported the hardcoded version 3.1.0 instead of the installed package version.

Since this pull request was opened, PR #14 updated main so that the MCP client reads its version from package.json. After rebasing onto the latest main, this pull request is now a cleanup and regression-testing contribution.

Change

  • Export PACKAGE_VERSION from lib/utils/package-root.js.
  • Use that shared constant in both bin/mantis.js and lib/impl/mcp-client-service.js.
  • Remove the duplicated package.json reading logic.
  • Add a regression test that captures the MCP initialize request and verifies that clientInfo.version matches the package version.

This gives the CLI and MCP client one source of truth for the package version and protects the handshake behavior against regression.

Testing

  • node --test: 22 of 22 tests pass.
  • The test suite includes the latest upstream drive-command tests.
  • node bin/mantis.js --version returns 3.7.0.
  • node bin/mantis.js --help works correctly.
  • git diff --check origin/main...HEAD passes.
  • PR rebased onto commit 8a5163a with no remaining conflicts.

Scope

No commands, configuration, authentication behavior, MCP headers, URLs, or user-facing output are changed.

@coderyaz856
coderyaz856 force-pushed the Yazid-The-Tech-Alchemist branch from 8655a8d to 058b74a Compare October 10, 2026 22:38
@coderyaz856

Copy link
Copy Markdown
Author

@MantisCartography Please review this change

@coderyaz856 coderyaz856 changed the title Report the package version in the MCP client handshake Share one package-version constant and test the MCP handshake version Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant