chore(mcp): phase 9 — changeset + docs + dead-code cleanup#35
Merged
Conversation
Final pass on the provider-agnostic refactor. No runtime behaviour
changes — this commit cuts one indirection, documents what landed
across phases 0–8, and ships the changeset so the next Release PR
rolls @contentrain/mcp to a minor.
Changeset:
- .changeset/refactor-provider-agnostic-engine.md
Minor bump for @contentrain/mcp. Summarises what now ships:
HTTP transport, GitHubProvider, GitLabProvider, reader-backed
remote reads, explicit capability gates. No tool-surface
changes — stdio + LocalProvider behave identically.
Dead-code removal:
- packages/mcp/src/util/serializer.ts — deleted. The file was a
one-line re-export of @contentrain/types' canonicalStringify,
kept from an earlier layout. Phase 1 moved the canonical path
into core/serialization/, so this indirection had no purpose.
- packages/mcp/src/util/fs.ts and
packages/mcp/tests/util/serializer.test.ts now import directly
from @contentrain/types.
- packages/mcp/package.json build targets drop src/util/serializer.ts.
The file was never listed under exports so no public surface
changes.
Docs:
- README.md (top-level)
- "Why teams use it" gets a "Provider-agnostic engine" bullet
calling out Local + GitHub + GitLab behind the same tool
surface, plus the HTTP transport for remote drivers.
- Packages table row for @contentrain/mcp updated to reflect the
stdio / HTTP transports and the three providers.
- RELEASING.md
- New section documenting the optional peer deps
(@octokit/rest for GitHubProvider, @gitbeaker/rest for
GitLabProvider) and that stdio + LocalProvider flows do not
need either. Factory errors point at the install command when
the peer is missing.
Verification:
- pnpm typecheck (monorepo, 8 packages) → 0 errors.
- npx oxlint (monorepo, 396 files) → 0 warnings.
- pnpm --filter @contentrain/mcp build → clean. Dist now contains
dist/providers/gitlab/ (15 kB), dist/providers/github/ (13.7 kB)
and no longer ships dist/util/serializer.*.
- npm pack --dry-run → 127 files, 2.2 MB packed / 10.7 MB unpacked.
Verified providers/gitlab + providers/github in the tarball;
util/serializer absent as expected.
- vitest run tests/core tests/conformance tests/serialization-parity
tests/git tests/providers tests/server tests/util
→ 413/413 green, 2 skipped.
Phase 9 acceptance checklist:
- [x] Changeset created.
- [x] READMEs updated (root + package).
- [x] All quality gates green.
- [x] Build artifacts contain the expected exports
(providers/gitlab, providers/github, server/http).
- [x] npm pack --dry-run clean.
Refactor complete. next-mcp → main merge is a separate maintainer
action that ships the changeset and triggers the release PR.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Final pass on the provider-agnostic refactor. No runtime behaviour changes — this PR:
@contentrain/mcpminor) describing what landed across phases 0–8.packages/mcp/src/util/serializer.ts— a one-line re-export that became dead weight after Phase 1 moved canonical serialization intocore/serialization/. Two call sites updated to import from@contentrain/typesdirectly.After merge:
next-mcp → mainis a separate maintainer action that ships the changeset and kicks off the Release PR.What shipped in the refactor (for the changeset audit trail)
providers/local/migration.tsTest plan
pnpm typecheck(monorepo, 8 packages) → 0 errorsnpx oxlint(monorepo, 396 files) → 0 warningspnpm --filter @contentrain/mcp build→ clean. Dist now containsdist/providers/gitlab/(15 kB) anddist/providers/github/(13.7 kB).dist/util/serializer.*no longer shipped.npm pack --dry-run→ 127 files, 2.2 MB packed / 10.7 MB unpacked. GitLab + GitHub providers present; serializer absent as expected.tests/core tests/conformance tests/serialization-parity tests/git tests/providers tests/server tests/util) → 413/413 green, 2 skipped.changeset/fix-scanner-prefilter-noise.mdstyle🤖 Generated with Claude Code