Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/cli-init-framework-wiring.md

This file was deleted.

29 changes: 0 additions & 29 deletions .changeset/mcp-branch-lifecycle-context-validators.md

This file was deleted.

17 changes: 0 additions & 17 deletions .changeset/query-document-sort-include-generator-fixes.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/rules-skills-branch-tools-docs.md

This file was deleted.

14 changes: 14 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
34 changes: 34 additions & 0 deletions packages/mcp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
11 changes: 11 additions & 0 deletions packages/rules/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/rules/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
23 changes: 23 additions & 0 deletions packages/sdk/js/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/js/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
11 changes: 11 additions & 0 deletions packages/skills/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/skills/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
29 changes: 29 additions & 0 deletions packages/types/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Loading