Skip to content

chore(mcp): phase 9 — changeset + docs + dead-code cleanup#35

Merged
ABB65 merged 1 commit into
next-mcpfrom
refactor/phase-9-cleanup-and-release
Apr 17, 2026
Merged

chore(mcp): phase 9 — changeset + docs + dead-code cleanup#35
ABB65 merged 1 commit into
next-mcpfrom
refactor/phase-9-cleanup-and-release

Conversation

@ABB65

@ABB65 ABB65 commented Apr 17, 2026

Copy link
Copy Markdown
Member

Summary

Final pass on the provider-agnostic refactor. No runtime behaviour changes — this PR:

  1. Ships the changeset (@contentrain/mcp minor) describing what landed across phases 0–8.
  2. Deletes packages/mcp/src/util/serializer.ts — a one-line re-export that became dead weight after Phase 1 moved canonical serialization into core/serialization/. Two call sites updated to import from @contentrain/types directly.
  3. Updates the top-level README and RELEASING.md to document the new shape (three providers, stdio + HTTP transports, optional peer deps).

After merge: next-mcp → main is a separate maintainer action that ships the changeset and kicks off the Release PR.

What shipped in the refactor (for the changeset audit trail)

  • Phase 0 — CLA + conformance harness
  • Phase 1 — contracts + serialization layer
  • Phase 2 — plan/apply dönüşümü + reader injection
  • Phase 3 — LocalProvider extraction
  • Phase 4 — validator unification (entry + relation-integrity + schedule + project)
  • Phase 5.1–5.5 — GitHubProvider, HTTP transport, provider threading, remote write path, reader-backed remote reads (countEntries, checkReferences, validateProject)
  • Phase 6+7 — explicit capability gates + providers/local/migration.ts
  • Phase 8 — GitLabProvider (full integration, Bitbucket coming-soon)
  • Phase 9 — this PR

Test plan

  • 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) and dist/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.
  • fast suite (tests/core tests/conformance tests/serialization-parity tests/git tests/providers tests/server tests/util) → 413/413 green, 2 skipped
  • Changeset format matches existing .changeset/fix-scanner-prefilter-noise.md style

🤖 Generated with Claude Code

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>
@ABB65 ABB65 merged commit 278dbeb into next-mcp Apr 17, 2026
1 check passed
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