feat(content-engine): align with @contentrain/mcp 1.5.0 / query 6 / types 0.5.1#55
Merged
Merged
Conversation
added 3 commits
June 4, 2026 22:26
…ypes 0.5.1 Bump Contentrain packages and align Studio with the new behaviour: - deps: @contentrain/types 0.5.0→0.5.1, @contentrain/mcp 1.4.0→1.5.0, @contentrain/query ^5.1.2→^6.0.0. query v6's content→body rename is a no-op for Studio (documents are read from brain-cache as .body; t() interpolates manually), client regenerated, typecheck clean. - context.json post-merge model (MCP 1.5.0): feature branches no longer carry context.json — removing the parallel-save merge-conflict surface. It is now regenerated deterministically on `contentrain` after a merge (branch-ops.ts:regenerateContextOnContentrain), best-effort with self-heal on the next merge. initProject still writes the seed. Path and consumer behaviour preserved (brain-cache only reads from contentrain). - branch-health: warn/block thresholds are now config-driven via `branchWarnLimit`/`branchBlockLimit` (default 50/80); contentRoot threaded through engine, health/cleanup endpoints, and the periodic cleanup plugin. - .mcp.json: pin the dev-time contentrain MCP server to @contentrain/mcp@1.5.0 (was unpinned `npx @contentrain/mcp`, floating to latest). - docs: update CLAUDE.md content-engine invariant + branch-health TODO. Verified: pnpm typecheck, pnpm lint, pnpm test (619 passed / 86 files).
…ocument server layer MCP's remote write path always reports `pending-review` and delegates the merge to Studio, so MCP Cloud writes landed as `cr/*` branches even on auto-merge projects — inconsistent with the native write paths. - reconcile: new `reconcileMcpCloudAutoMerge` (server/utils/mcp-cloud-automerge.ts) lands pending branches only when the project's effective workflow is auto-merge, resolved with the same rule as the native paths: review requires both the `workflow.review` plan feature AND `config.workflow` opt-in; otherwise auto-merge. Wired into the /api/mcp/v1 proxy fire-and-forget after a successful write tool call — can never affect the external caller's response; no-op on review-gated projects. - docs: add an MCP Cloud architecture section to CLAUDE.md (reduced tool surface via GitHubProvider localWorktree=false; pending-review contract + workflow-aware reconcile) and remove the stale "route implementation pending" TODO (the route is fully implemented). - tests: unit coverage for the reconcile decision matrix (auto-merge, review-gated no-op, plan-forced auto-merge, already-merged skip, unreadable-config default, invalid repo, best-effort merge failure) and for mcp-cloud-keys generation/hashing. Merged latest main (PR #54 chat tool trace persistence). Verified: typecheck, lint, pnpm test (633 passed / 88 files).
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.
Özet
Contentrain/aireleaselerindeki yeni sürümlere (mcp@1.5.0,query@6.0.0,types@0.5.1) Studio'yu hizalar. Analiz sonucu 4 fazda uygulandı.Değişiklikler
1. Sürüm bump'ları
@contentrain/types0.5.0 → 0.5.1@contentrain/mcp1.4.0 → 1.5.0@contentrain/query^5.1.2 → ^6.0.0query@6.0.0'ın breakingcontent→bodyrename'i Studio için no-op: dokümanlar brain-cache'ten zaten.bodyile okunuyor,t()interpolasyonunu kendi yapıyor. Client yeniden generate edildi, typecheck temiz.2. Cloud MCP proxy — doğrulanmış no-op
Yeni
branch_list/branch_delete/mergearaçlarının üçü delocalWorktreecapability istiyor; Studio'nunGitHubProvider'ında bufalse. Cloud üzerinden capability error dönüyorlar (tasarımca inert) →WRITE_TOOL_NAMESdoğru şekilde değişmedi.3. Branch-health config-driven
branchWarnLimit/branchBlockLimit(default 50/80) artıkconfig.json'dan okunuyor (MCP 1.5.0).contentRootengine + health/cleanup endpoint'leri + periyodik plugin'e geçirildi.4. context.json post-merge regeneration (asıl mimari hizalama)
branch-ops.ts:mergeBranchartık merge sonrasıcontentrainüzerinde context.json'ı deterministik yeniden üretiyor (best-effort, self-heal).initProjectseed'i korundu; path birebir aynı (CONTEXT_PATH). Brain-cache zaten yalnızcontentrain'den okuduğu için tüketici regresyonu yok.Ek
.mcp.json: dev-timecontentrainMCP server@contentrain/mcp@1.5.0'a pinlendi (pin'siznpx, latest'e kayıyordu).CLAUDE.md: content-engine invariant + branch-health TODO güncellendi.Doğrulama
pnpm typecheck✅pnpm lint✅pnpm test→ 619 passed / 86 files ✅ (unit + integration + nuxt)