Release history
Contentrain/ai releases
Local-first MCP server for AI content governance — 13 tools for model/content CRUD, validation, normalization, and i18n across any framework.
All releases
102 shown
Routine maintenance and dependency updates.
Field constraint enforcement
Routine maintenance and dependency updates.
Enforced field validation
- Update code that previously accessed `entry.body` from `all()` results to first retrieve the full document with `bySlug(slug)`, then read `body` from the returned object.
- `CdnDocumentQuery.all()` now returns `DocumentIndexEntry[]` (omitting `body`) and `first()` returns `DocumentIndexEntry | undefined`; reading `.body` is a compile error. Use `bySlug(slug)` to fetch the full document including `body`.
Full changelog
Major Changes
-
d617dab: feat(sdk)!: CDN
document().all()returns index entries, so reading.bodyno longer compilesOn the CDN,
document(model).all()reads the model's_index, which carries
frontmatter only — the body lives in the per-slug document and is reachable via
bySlug(). Butall()was typedPromise<T[]>, and the generated document type
declaresbody: string. Soentry.bodytype-checked, returnedundefinedat
runtime, and pages rendered their headings and dropped their prose — with no
error, no warning, and a passing typecheck.The trap is that the bundled runtime's
all()does carry bodies. Code written
and tested against bundled delivery compiled and passed, then quietly rendered
empty on CDN. The two modes genuinely differ in shape, so they no longer share
one return type.BREAKING:
CdnDocumentQuery.all()now returnsDocumentIndexEntry<T>[]
(Omit<T, 'body'>), andfirst()returnsDocumentIndexEntry<T> | undefined.
Reading.bodyoff either is now a compile error. Fetch the body with
bySlug(slug), which returns{ frontmatter, body, html }. Runtime behaviour is
unchanged — this only makes the types tell the truth about what was already
being returned.// before — compiled, rendered nothing const sections = await client.document<GuideSections>("guide-sections").all(); sections.map((s) => renderMarkdown(s.body)); // undefined at runtime // after — the first line is a compile error; fetch bodies explicitly const index = await client.document<GuideSections>("guide-sections").all(); const full = await Promise.all(index.map((s) => q.bySlug(s.slug))); full.map((d) => renderMarkdown(d!.body));Type-level contracts are now asserted in
*.test-d.tsviavitest --typecheck,
sincetsconfig.jsononly coverssrcand never type-checked the tests.
Media management tools
Media provider facet + tools
Routine maintenance and dependency updates.
MCP capability‑awareness + session binding
Auto-delete remote cr/* branches
GitHub optimizations + local write batching
Routine maintenance and dependency updates.
Media path normalization + config
Stop committing context.json
Routine maintenance and dependency updates.
Routine maintenance and dependency updates.
- Update code that accesses `.content` on document entries to use `.body`.
- Regenerate the client after updating dependencies.
- Ensure CommonJS usage includes the required `await init()` call.
- The generated document body field is now `body` (was `content`). Update consumers reading `.content` to use `.body` and regenerate the client.
- `DocumentQuery.sort()` added — documents can now be ordered (e.g., by `published_at`).
- `include()` now resolves relations across i18n boundaries, resolving both i18n:false and i18n:true targets regardless of explicit locale.
- Generated types corrected: duplicate `slug` member removed; relation fields typed as `id | ResolvedTarget`; string frontmatter no longer numerically coerced; `where(field, 'ne', x)` on array fields now acts as the complement of `eq` (membership).
Full changelog
Major Changes
-
149fa6b: Fix generated client correctness and align with the platform.
Breaking: the generated document body field is now
body(wascontent), matching@contentrain/typesDocumentEntry.bodyand the MCPdocument_saveschema. Update consumers reading.contenton 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. bypublished_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
slugmember when a document model declares aslugfield; relation fields are typed asid | ResolvedTarget(andinclude(...)arguments are constrained to model keys) so resolved relations are no longer plainstring. - String frontmatter is no longer numerically coerced — a string-typed field like
"007"keeps its value instead of becoming7. where(field, 'ne', x)on array fields is now the complement ofeq(membership), matchingeqsemantics.- Removed dead/misleading CJS proxy code; documented the required
await init()for CommonJS.
- Dictionary interpolation was broken in generated output — the param regex lost its escaping during emit, so
Patch Changes
- Updated dependencies [149fa6b]
- @contentrain/[email protected]
Multi-tenant MCP + GitHub App auth
Provider‑agnostic engine + GitHub/GitLab
CLI tips + MCP redesign + Agent Skills
CLI tips, MCP redesign, Agent Skills integration
CLI tips + MCP redesign + Agent Skills
CLI tips + Scan redesign + Agent Skills integration
Routine maintenance and dependency updates.
Routine maintenance and dependency updates.
Routine maintenance and dependency updates.
Routine maintenance and dependency updates.
Routine maintenance and dependency updates.
Git transaction rewrite
Worktree‑isolated git transaction rewrite
Dedicated contentrain branch + worktree isolation
Routine maintenance and dependency updates.
Routine maintenance and dependency updates.
Routine maintenance and dependency updates.
Routine maintenance and dependency updates.
Routine maintenance and dependency updates.
- @contentrain/query and @contentrain/mcp versions below the new minimum are deprecated and will be removed in a future release
- Minimum required version of @contentrain/query is now 5.0.0 (previous versions are deprecated)
- Minimum required version of @contentrain/mcp is now 1.0.0 (previous versions are deprecated)
Full changelog
Published packages:
- @contentrain/[email protected]
- @contentrain/[email protected]
- [email protected]
- @contentrain/[email protected]
- @contentrain/[email protected]
- @contentrain/[email protected]
Deprecated:
- @contentrain/query < 5.0.0
- @contentrain/mcp < 1.0.0