From dd923be1e632e90e6fdda278875a86d6d0149d40 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 12:11:08 +0000 Subject: [PATCH] chore(release): version packages --- .changeset/cli-init-framework-wiring.md | 5 --- ...mcp-branch-lifecycle-context-validators.md | 29 ---------------- ...y-document-sort-include-generator-fixes.md | 17 ---------- .changeset/rules-skills-branch-tools-docs.md | 11 ------ packages/cli/CHANGELOG.md | 14 ++++++++ packages/cli/package.json | 2 +- packages/mcp/CHANGELOG.md | 34 +++++++++++++++++++ packages/mcp/package.json | 2 +- packages/rules/CHANGELOG.md | 11 ++++++ packages/rules/package.json | 2 +- packages/sdk/js/CHANGELOG.md | 23 +++++++++++++ packages/sdk/js/package.json | 2 +- packages/skills/CHANGELOG.md | 11 ++++++ packages/skills/package.json | 2 +- packages/types/CHANGELOG.md | 29 ++++++++++++++++ packages/types/package.json | 2 +- 16 files changed, 128 insertions(+), 68 deletions(-) delete mode 100644 .changeset/cli-init-framework-wiring.md delete mode 100644 .changeset/mcp-branch-lifecycle-context-validators.md delete mode 100644 .changeset/query-document-sort-include-generator-fixes.md delete mode 100644 .changeset/rules-skills-branch-tools-docs.md diff --git a/.changeset/cli-init-framework-wiring.md b/.changeset/cli-init-framework-wiring.md deleted file mode 100644 index 111e709..0000000 --- a/.changeset/cli-init-framework-wiring.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"contentrain": patch ---- - -`contentrain init` now prints stack-aware SDK wiring guidance after setup: for bundler stacks (Nuxt/Next/Vite/etc.) it shows the `#contentrain` subpath import, points to the `contentrain-sdk` bundler-alias skill, and recommends a `prebuild`/`predev` generate step (because `.contentrain/client/` is git-ignored and must be regenerated on fresh clones / CI). Nuxt projects also get a server-only reminder. diff --git a/.changeset/mcp-branch-lifecycle-context-validators.md b/.changeset/mcp-branch-lifecycle-context-validators.md deleted file mode 100644 index b46fa3e..0000000 --- a/.changeset/mcp-branch-lifecycle-context-validators.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -"@contentrain/mcp": minor -"@contentrain/types": patch ---- - -Harden the git/branch lifecycle, redesign context.json handling, and fix validator false positives. - -**Git & branches** - -- Machine-generated `[contentrain]` commits now pass `--no-verify`, so repos with commitlint / husky / lefthook `commit-msg` hooks no longer reject Contentrain writes. -- Feature branches are pruned automatically: a failed save no longer leaks a dangling `cr/*` branch, and merged branches (auto-merge or `contentrain_merge`) are deleted after landing. -- Branch-health thresholds are now configurable via `config.json` — `branchWarnLimit` (default 50) and `branchBlockLimit` (default 80) — instead of being hardcoded. -- **New tools:** `contentrain_branch_list` (pending `cr/*` branches + merge status) and `contentrain_branch_delete` (remove a stale/failed branch; the `contentrain` branch is protected). -- `contentrain_merge` can now target a branch by `model` (+ optional `locale`/`latest`), not just the exact timestamped branch name. -- `contentrain_submit` with no git remote now guides you to `contentrain_merge` (local landing) instead of failing with a bare "configure a remote". -- Git/hook failures are returned as structured, ANSI-stripped errors (`{ error, stage, hook?, code?, agent_hint? }`) instead of a raw escaped color blob. - -**context.json** - -- `context.json` is no longer committed on feature branches; it is regenerated deterministically on the `contentrain` branch after merge (single-threaded). This removes the merge-conflict class that hit parallel content saves on different branches. -- `contentrain_status` now derives `stats.models`/`stats.entries` live instead of echoing a possibly-stale `context.json`. - -**Validation** - -- Non-i18n models are validated against a single locale, eliminating phantom per-locale "orphan content" warnings (and the wrong-locale meta files `--fix` used to write) in multi-locale projects. -- Polymorphic multi-relations (`relations` targeting multiple models) accept `{ model, ref }` items, matching the generated SDK type instead of being rejected as "must be a string". -- Relation-integrity resolves targets at the target model's own storage locale (with a default-locale fallback for i18n:true targets), removing false "broken relation" errors. -- `contentrain_content_save`'s inline validation now evaluates the committed/overlaid state, so freshly created locale files are no longer reported as "missing". -- `contentrain_validate --fix` lands cosmetic structural fixes via auto-merge instead of spawning a pending review branch. diff --git a/.changeset/query-document-sort-include-generator-fixes.md b/.changeset/query-document-sort-include-generator-fixes.md deleted file mode 100644 index e0db2aa..0000000 --- a/.changeset/query-document-sort-include-generator-fixes.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"@contentrain/query": major ---- - -Fix generated client correctness and align with the platform. - -**Breaking:** the generated document body field is now `body` (was `content`), matching `@contentrain/types` `DocumentEntry.body` and the MCP `document_save` schema. Update consumers reading `.content` on document entries to `.body`, and regenerate the client. - -Also fixed in the generated runtime + types: - -- **Dictionary interpolation was broken** in generated output — the param regex lost its escaping during emit, so `dictionary('ui').get('key', { name })` returned the raw `{name}` template. Now interpolates correctly. -- **`DocumentQuery.sort()` added** — documents can now be ordered (e.g. by `published_at`); previously only collections could sort, and calling `.sort()` on a document query threw. -- **`include()` now resolves relations across i18n boundaries** — an i18n:false relation target (e.g. `author`) is resolved whether or not `.locale()` was set, and i18n:true targets resolve when no explicit locale is passed. Previously one side silently stayed an unresolved id string. -- **Generated types corrected** — no more duplicate `slug` member when a document model declares a `slug` field; relation fields are typed as `id | ResolvedTarget` (and `include(...)` arguments are constrained to model keys) so resolved relations are no longer plain `string`. -- **String frontmatter is no longer numerically coerced** — a string-typed field like `"007"` keeps its value instead of becoming `7`. -- **`where(field, 'ne', x)` on array fields** is now the complement of `eq` (membership), matching `eq` semantics. -- Removed dead/misleading CJS proxy code; documented the required `await init()` for CommonJS. diff --git a/.changeset/rules-skills-branch-tools-docs.md b/.changeset/rules-skills-branch-tools-docs.md deleted file mode 100644 index 94c1910..0000000 --- a/.changeset/rules-skills-branch-tools-docs.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@contentrain/rules": minor -"@contentrain/skills": minor ---- - -Document the new `contentrain_branch_list` / `contentrain_branch_delete` MCP tools and fix SDK wiring guidance. - -- `MCP_TOOLS` / the essential guardrails / the MCP tool reference now include the two new branch tools (19 tools total) and the model/locale/latest selector for `contentrain_merge`. -- Bundler-config snippets for Vite and Nuxt use `import.meta.url` + `fileURLToPath` instead of `__dirname` (which is undefined in ESM `vite.config.ts` / `nuxt.config.ts`), and now cover Nuxt 4's `app/` + `server/` layout. -- The generate skill documents wiring `contentrain generate` into a `prebuild`/`predev` step, since `.contentrain/client/` is git-ignored and must be regenerated on fresh clones / CI. -- Clarified the two generator invocations: `contentrain generate` (CLI) vs `npx contentrain-query generate` (the `@contentrain/query` bin). diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 3d9d9f7..67641bd 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,19 @@ # contentrain +## 0.5.2 + +### Patch Changes + +- 149fa6b: `contentrain init` now prints stack-aware SDK wiring guidance after setup: for bundler stacks (Nuxt/Next/Vite/etc.) it shows the `#contentrain` subpath import, points to the `contentrain-sdk` bundler-alias skill, and recommends a `prebuild`/`predev` generate step (because `.contentrain/client/` is git-ignored and must be regenerated on fresh clones / CI). Nuxt projects also get a server-only reminder. +- Updated dependencies [149fa6b] +- Updated dependencies [149fa6b] +- Updated dependencies [149fa6b] + - @contentrain/mcp@1.5.0 + - @contentrain/types@0.5.1 + - @contentrain/query@6.0.0 + - @contentrain/rules@0.5.0 + - @contentrain/skills@0.5.0 + ## 0.5.1 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 13eb616..7184438 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "contentrain", - "version": "0.5.1", + "version": "0.5.2", "license": "MIT", "description": "CLI for Contentrain — AI content governance infrastructure", "type": "module", diff --git a/packages/mcp/CHANGELOG.md b/packages/mcp/CHANGELOG.md index db86c7c..c934487 100644 --- a/packages/mcp/CHANGELOG.md +++ b/packages/mcp/CHANGELOG.md @@ -1,5 +1,39 @@ # @contentrain/mcp +## 1.5.0 + +### Minor Changes + +- 149fa6b: Harden the git/branch lifecycle, redesign context.json handling, and fix validator false positives. + + **Git & branches** + + - Machine-generated `[contentrain]` commits now pass `--no-verify`, so repos with commitlint / husky / lefthook `commit-msg` hooks no longer reject Contentrain writes. + - Feature branches are pruned automatically: a failed save no longer leaks a dangling `cr/*` branch, and merged branches (auto-merge or `contentrain_merge`) are deleted after landing. + - Branch-health thresholds are now configurable via `config.json` — `branchWarnLimit` (default 50) and `branchBlockLimit` (default 80) — instead of being hardcoded. + - **New tools:** `contentrain_branch_list` (pending `cr/*` branches + merge status) and `contentrain_branch_delete` (remove a stale/failed branch; the `contentrain` branch is protected). + - `contentrain_merge` can now target a branch by `model` (+ optional `locale`/`latest`), not just the exact timestamped branch name. + - `contentrain_submit` with no git remote now guides you to `contentrain_merge` (local landing) instead of failing with a bare "configure a remote". + - Git/hook failures are returned as structured, ANSI-stripped errors (`{ error, stage, hook?, code?, agent_hint? }`) instead of a raw escaped color blob. + + **context.json** + + - `context.json` is no longer committed on feature branches; it is regenerated deterministically on the `contentrain` branch after merge (single-threaded). This removes the merge-conflict class that hit parallel content saves on different branches. + - `contentrain_status` now derives `stats.models`/`stats.entries` live instead of echoing a possibly-stale `context.json`. + + **Validation** + + - Non-i18n models are validated against a single locale, eliminating phantom per-locale "orphan content" warnings (and the wrong-locale meta files `--fix` used to write) in multi-locale projects. + - Polymorphic multi-relations (`relations` targeting multiple models) accept `{ model, ref }` items, matching the generated SDK type instead of being rejected as "must be a string". + - Relation-integrity resolves targets at the target model's own storage locale (with a default-locale fallback for i18n:true targets), removing false "broken relation" errors. + - `contentrain_content_save`'s inline validation now evaluates the committed/overlaid state, so freshly created locale files are no longer reported as "missing". + - `contentrain_validate --fix` lands cosmetic structural fixes via auto-merge instead of spawning a pending review branch. + +### Patch Changes + +- Updated dependencies [149fa6b] + - @contentrain/types@0.5.1 + ## 1.4.0 ### Minor Changes diff --git a/packages/mcp/package.json b/packages/mcp/package.json index 540b7f8..39fec6f 100644 --- a/packages/mcp/package.json +++ b/packages/mcp/package.json @@ -1,6 +1,6 @@ { "name": "@contentrain/mcp", - "version": "1.4.0", + "version": "1.5.0", "mcpName": "io.github.Contentrain/contentrain", "license": "MIT", "description": "Local-first MCP server for AI-generated content governance — 17 deterministic tools, stdio + HTTP transports, Local / GitHub / GitLab providers", diff --git a/packages/rules/CHANGELOG.md b/packages/rules/CHANGELOG.md index 5a9f519..bf744dc 100644 --- a/packages/rules/CHANGELOG.md +++ b/packages/rules/CHANGELOG.md @@ -1,5 +1,16 @@ # @contentrain/rules +## 0.5.0 + +### Minor Changes + +- 149fa6b: Document the new `contentrain_branch_list` / `contentrain_branch_delete` MCP tools and fix SDK wiring guidance. + + - `MCP_TOOLS` / the essential guardrails / the MCP tool reference now include the two new branch tools (19 tools total) and the model/locale/latest selector for `contentrain_merge`. + - Bundler-config snippets for Vite and Nuxt use `import.meta.url` + `fileURLToPath` instead of `__dirname` (which is undefined in ESM `vite.config.ts` / `nuxt.config.ts`), and now cover Nuxt 4's `app/` + `server/` layout. + - The generate skill documents wiring `contentrain generate` into a `prebuild`/`predev` step, since `.contentrain/client/` is git-ignored and must be regenerated on fresh clones / CI. + - Clarified the two generator invocations: `contentrain generate` (CLI) vs `npx contentrain-query generate` (the `@contentrain/query` bin). + ## 0.4.0 ### Minor Changes diff --git a/packages/rules/package.json b/packages/rules/package.json index f515937..7286341 100644 --- a/packages/rules/package.json +++ b/packages/rules/package.json @@ -1,6 +1,6 @@ { "name": "@contentrain/rules", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "description": "AI agent rules for Contentrain — quality standards, architecture conventions, IDE integration", "type": "module", diff --git a/packages/sdk/js/CHANGELOG.md b/packages/sdk/js/CHANGELOG.md index b556a08..4a9c449 100644 --- a/packages/sdk/js/CHANGELOG.md +++ b/packages/sdk/js/CHANGELOG.md @@ -1,5 +1,28 @@ # @contentrain/query +## 6.0.0 + +### Major Changes + +- 149fa6b: Fix generated client correctness and align with the platform. + + **Breaking:** the generated document body field is now `body` (was `content`), matching `@contentrain/types` `DocumentEntry.body` and the MCP `document_save` schema. Update consumers reading `.content` on document entries to `.body`, and regenerate the client. + + Also fixed in the generated runtime + types: + + - **Dictionary interpolation was broken** in generated output — the param regex lost its escaping during emit, so `dictionary('ui').get('key', { name })` returned the raw `{name}` template. Now interpolates correctly. + - **`DocumentQuery.sort()` added** — documents can now be ordered (e.g. by `published_at`); previously only collections could sort, and calling `.sort()` on a document query threw. + - **`include()` now resolves relations across i18n boundaries** — an i18n:false relation target (e.g. `author`) is resolved whether or not `.locale()` was set, and i18n:true targets resolve when no explicit locale is passed. Previously one side silently stayed an unresolved id string. + - **Generated types corrected** — no more duplicate `slug` member when a document model declares a `slug` field; relation fields are typed as `id | ResolvedTarget` (and `include(...)` arguments are constrained to model keys) so resolved relations are no longer plain `string`. + - **String frontmatter is no longer numerically coerced** — a string-typed field like `"007"` keeps its value instead of becoming `7`. + - **`where(field, 'ne', x)` on array fields** is now the complement of `eq` (membership), matching `eq` semantics. + - Removed dead/misleading CJS proxy code; documented the required `await init()` for CommonJS. + +### Patch Changes + +- Updated dependencies [149fa6b] + - @contentrain/types@0.5.1 + ## 5.1.5 ### Patch Changes diff --git a/packages/sdk/js/package.json b/packages/sdk/js/package.json index 7440a5f..0e5db71 100644 --- a/packages/sdk/js/package.json +++ b/packages/sdk/js/package.json @@ -1,6 +1,6 @@ { "name": "@contentrain/query", - "version": "5.1.5", + "version": "6.0.0", "license": "MIT", "description": "Optional type-safe query SDK for Contentrain — generated TypeScript client for platform-independent JSON content", "type": "module", diff --git a/packages/skills/CHANGELOG.md b/packages/skills/CHANGELOG.md index ad432a6..ca79c5b 100644 --- a/packages/skills/CHANGELOG.md +++ b/packages/skills/CHANGELOG.md @@ -1,5 +1,16 @@ # @contentrain/skills +## 0.5.0 + +### Minor Changes + +- 149fa6b: Document the new `contentrain_branch_list` / `contentrain_branch_delete` MCP tools and fix SDK wiring guidance. + + - `MCP_TOOLS` / the essential guardrails / the MCP tool reference now include the two new branch tools (19 tools total) and the model/locale/latest selector for `contentrain_merge`. + - Bundler-config snippets for Vite and Nuxt use `import.meta.url` + `fileURLToPath` instead of `__dirname` (which is undefined in ESM `vite.config.ts` / `nuxt.config.ts`), and now cover Nuxt 4's `app/` + `server/` layout. + - The generate skill documents wiring `contentrain generate` into a `prebuild`/`predev` step, since `.contentrain/client/` is git-ignored and must be regenerated on fresh clones / CI. + - Clarified the two generator invocations: `contentrain generate` (CLI) vs `npx contentrain-query generate` (the `@contentrain/query` bin). + ## 0.4.0 ### Minor Changes diff --git a/packages/skills/package.json b/packages/skills/package.json index 18d69fb..c95498e 100644 --- a/packages/skills/package.json +++ b/packages/skills/package.json @@ -1,6 +1,6 @@ { "name": "@contentrain/skills", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "description": "AI agent skills for Contentrain — workflow procedures, framework integration guides", "type": "module", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 96d8279..97c9859 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,34 @@ # @contentrain/types +## 0.5.1 + +### Patch Changes + +- 149fa6b: Harden the git/branch lifecycle, redesign context.json handling, and fix validator false positives. + + **Git & branches** + + - Machine-generated `[contentrain]` commits now pass `--no-verify`, so repos with commitlint / husky / lefthook `commit-msg` hooks no longer reject Contentrain writes. + - Feature branches are pruned automatically: a failed save no longer leaks a dangling `cr/*` branch, and merged branches (auto-merge or `contentrain_merge`) are deleted after landing. + - Branch-health thresholds are now configurable via `config.json` — `branchWarnLimit` (default 50) and `branchBlockLimit` (default 80) — instead of being hardcoded. + - **New tools:** `contentrain_branch_list` (pending `cr/*` branches + merge status) and `contentrain_branch_delete` (remove a stale/failed branch; the `contentrain` branch is protected). + - `contentrain_merge` can now target a branch by `model` (+ optional `locale`/`latest`), not just the exact timestamped branch name. + - `contentrain_submit` with no git remote now guides you to `contentrain_merge` (local landing) instead of failing with a bare "configure a remote". + - Git/hook failures are returned as structured, ANSI-stripped errors (`{ error, stage, hook?, code?, agent_hint? }`) instead of a raw escaped color blob. + + **context.json** + + - `context.json` is no longer committed on feature branches; it is regenerated deterministically on the `contentrain` branch after merge (single-threaded). This removes the merge-conflict class that hit parallel content saves on different branches. + - `contentrain_status` now derives `stats.models`/`stats.entries` live instead of echoing a possibly-stale `context.json`. + + **Validation** + + - Non-i18n models are validated against a single locale, eliminating phantom per-locale "orphan content" warnings (and the wrong-locale meta files `--fix` used to write) in multi-locale projects. + - Polymorphic multi-relations (`relations` targeting multiple models) accept `{ model, ref }` items, matching the generated SDK type instead of being rejected as "must be a string". + - Relation-integrity resolves targets at the target model's own storage locale (with a default-locale fallback for i18n:true targets), removing false "broken relation" errors. + - `contentrain_content_save`'s inline validation now evaluates the committed/overlaid state, so freshly created locale files are no longer reported as "missing". + - `contentrain_validate --fix` lands cosmetic structural fixes via auto-merge instead of spawning a pending review branch. + ## 0.5.0 ### Minor Changes diff --git a/packages/types/package.json b/packages/types/package.json index 66ebc5c..e32a416 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@contentrain/types", - "version": "0.5.0", + "version": "0.5.1", "license": "MIT", "description": "Shared TypeScript types for Contentrain ecosystem", "type": "module",