contentrain@0.6.0
Minor Changes
-
bcca7bd: feat(mcp): normalize media paths to absolute delivery URLs on cloud writes
External-agent writes through MCP Cloud go straight through
planContentSave
rather than Studio's content-engine, so relativemedia/...references used to
land in git verbatim. They now resolve the same way Studio's own write path
resolves them.- @contentrain/types:
RepoProvidergains optionalmediaBaseUrl(the
per-project public delivery base, project segment included) and
ContentrainConfiggains optionalcdn.url. - @contentrain/mcp: when the provider supplies
mediaBaseUrl(cloud mode),
contentrain_content_savenormalizes relativemedia/...references — in
image/video/file fields (incl. nested object/array) and markdown bodies — to
absolute{base}/{path}delivery URLs before commit. Idempotent: external
URLs (http(s)://,//,data:) and already-absolute URLs pass through. In
local mode (no base) paths are kept verbatim — the OSS file model. - @contentrain/query:
generateacceptscdnBaseUrl(or reads
config.cdn.url) and bakes amedia()resolver into the generated local
client —media('media/...') → {base}/{path}— the local-mode counterpart of
CDN mode'sMediaAccessor.url(). - contentrain (CLI):
generate --cdnBaseUrl <base>flag. - @contentrain/rules, @contentrain/skills: document the two media storage
models (local-file vs Studio-CDN) and themedia()resolver.
- @contentrain/types:
Patch Changes
- Updated dependencies [bcca7bd]
- @contentrain/types@0.6.0
- @contentrain/mcp@1.6.0
- @contentrain/query@6.1.0
- @contentrain/rules@0.5.3
- @contentrain/skills@0.5.3