@se-studio/contentful-cms 3.15.2 → 3.15.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/HOSTED.md +20 -0
- package/dist/commands/host-scaffold.d.ts.map +1 -1
- package/dist/commands/host-scaffold.js +5 -3
- package/dist/commands/host-scaffold.js.map +1 -1
- package/dist/contentful/cma-user-agent.d.ts +1 -1
- package/dist/editor-pack/capabilities.js +1 -1
- package/dist/editor-pack/capabilities.js.map +1 -1
- package/dist/editor-pack/generate.d.ts.map +1 -1
- package/dist/editor-pack/generate.js +1 -1
- package/dist/editor-pack/generate.js.map +1 -1
- package/dist/editor-pack/load.d.ts.map +1 -1
- package/dist/editor-pack/load.js +14 -2
- package/dist/editor-pack/load.js.map +1 -1
- package/dist/generated/help-topics.d.ts.map +1 -1
- package/dist/generated/help-topics.js +1 -1
- package/dist/generated/help-topics.js.map +1 -1
- package/dist/generated/hosted-guide.d.ts +1 -1
- package/dist/generated/hosted-guide.d.ts.map +1 -1
- package/dist/generated/hosted-guide.js +1 -1
- package/dist/generated/hosted-guide.js.map +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/hosted/index.d.ts +1 -1
- package/dist/hosted/index.d.ts.map +1 -1
- package/dist/hosted/index.js +1 -1
- package/dist/hosted/index.js.map +1 -1
- package/dist/hosted/next/pages/CmsEditPage.d.ts.map +1 -1
- package/dist/hosted/next/pages/CmsEditPage.js +1 -1
- package/dist/hosted/next/pages/CmsEditPage.js.map +1 -1
- package/dist/hosted/next/pages/HomePage.d.ts.map +1 -1
- package/dist/hosted/next/pages/HomePage.js +1 -1
- package/dist/hosted/next/pages/HomePage.js.map +1 -1
- package/dist/hosted/next/routes/mcp.d.ts +1 -0
- package/dist/hosted/next/routes/mcp.d.ts.map +1 -1
- package/dist/hosted/next/routes/mcp.js +6 -1
- package/dist/hosted/next/routes/mcp.js.map +1 -1
- package/dist/hosted/next/routes/oauth-authorization-server.d.ts +1 -0
- package/dist/hosted/next/routes/oauth-authorization-server.d.ts.map +1 -1
- package/dist/hosted/next/routes/oauth-authorization-server.js +5 -1
- package/dist/hosted/next/routes/oauth-authorization-server.js.map +1 -1
- package/dist/hosted/next/routes/oauth-protected-resource-path.d.ts +13 -0
- package/dist/hosted/next/routes/oauth-protected-resource-path.d.ts.map +1 -0
- package/dist/hosted/next/routes/oauth-protected-resource-path.js +17 -0
- package/dist/hosted/next/routes/oauth-protected-resource-path.js.map +1 -0
- package/dist/hosted/next/routes/oauth-protected-resource.d.ts +1 -0
- package/dist/hosted/next/routes/oauth-protected-resource.d.ts.map +1 -1
- package/dist/hosted/next/routes/oauth-protected-resource.js +5 -1
- package/dist/hosted/next/routes/oauth-protected-resource.js.map +1 -1
- package/dist/hosted/oauth/cimd.d.ts +17 -0
- package/dist/hosted/oauth/cimd.d.ts.map +1 -0
- package/dist/hosted/oauth/cimd.js +300 -0
- package/dist/hosted/oauth/cimd.js.map +1 -0
- package/dist/hosted/oauth/complete.d.ts +1 -0
- package/dist/hosted/oauth/complete.d.ts.map +1 -1
- package/dist/hosted/oauth/complete.js +4 -0
- package/dist/hosted/oauth/complete.js.map +1 -1
- package/dist/hosted/oauth/config.d.ts +2 -0
- package/dist/hosted/oauth/config.d.ts.map +1 -1
- package/dist/hosted/oauth/config.js +4 -0
- package/dist/hosted/oauth/config.js.map +1 -1
- package/dist/hosted/oauth/cors.d.ts +4 -0
- package/dist/hosted/oauth/cors.d.ts.map +1 -0
- package/dist/hosted/oauth/cors.js +23 -0
- package/dist/hosted/oauth/cors.js.map +1 -0
- package/dist/hosted/oauth/handlers.d.ts.map +1 -1
- package/dist/hosted/oauth/handlers.js +57 -7
- package/dist/hosted/oauth/handlers.js.map +1 -1
- package/dist/hosted/oauth/log.d.ts +2 -0
- package/dist/hosted/oauth/log.d.ts.map +1 -1
- package/dist/hosted/oauth/log.js +4 -0
- package/dist/hosted/oauth/log.js.map +1 -1
- package/dist/hosted/oauth/redirect-hosts.d.ts +4 -0
- package/dist/hosted/oauth/redirect-hosts.d.ts.map +1 -0
- package/dist/hosted/oauth/redirect-hosts.js +47 -0
- package/dist/hosted/oauth/redirect-hosts.js.map +1 -0
- package/dist/hosted/oauth/refresh.d.ts +1 -0
- package/dist/hosted/oauth/refresh.d.ts.map +1 -1
- package/dist/hosted/oauth/refresh.js +2 -0
- package/dist/hosted/oauth/refresh.js.map +1 -1
- package/dist/hosted/oauth/scopes.d.ts +15 -0
- package/dist/hosted/oauth/scopes.d.ts.map +1 -0
- package/dist/hosted/oauth/scopes.js +21 -0
- package/dist/hosted/oauth/scopes.js.map +1 -0
- package/dist/hosted/oauth/store.d.ts +4 -0
- package/dist/hosted/oauth/store.d.ts.map +1 -1
- package/dist/hosted/oauth/store.js +3 -0
- package/dist/hosted/oauth/store.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +2 -0
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools/client-tools.d.ts +11 -0
- package/dist/mcp/tools/client-tools.d.ts.map +1 -0
- package/dist/mcp/tools/client-tools.js +215 -0
- package/dist/mcp/tools/client-tools.js.map +1 -0
- package/dist/mcp/tools/cms-edit.d.ts +1 -1
- package/dist/mcp/tools/cms-edit.d.ts.map +1 -1
- package/dist/mcp/tools/cms-edit.js +3 -0
- package/dist/mcp/tools/cms-edit.js.map +1 -1
- package/dist/staged-upload/store.d.ts +18 -0
- package/dist/staged-upload/store.d.ts.map +1 -1
- package/dist/staged-upload/store.js +73 -0
- package/dist/staged-upload/store.js.map +1 -1
- package/dist/staged-upload/types.d.ts +2 -0
- package/dist/staged-upload/types.d.ts.map +1 -1
- package/docs/editor-tasks/publish-handoff.md +1 -0
- package/docs/help/publish.md +1 -1
- package/docs/mcp/hosted-guide.md +8 -0
- package/package.json +1 -1
- package/skills/core/SKILL.md +10 -3
- package/skills/editor-tasks/SKILL.md +1 -1
- package/skills/manifest.json +1 -1
- package/skills/setup/SKILL.md +23 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-tools.js","sourceRoot":"","sources":["../../../src/mcp/tools/client-tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAGpE,MAAM,SAAS,GAAG;IAChB,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,IAAI;CACX,CAAC;AAEX,MAAM,WAAW,GAAG;IAClB,YAAY,EAAE,KAAK;IACnB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,KAAK;IACrB,aAAa,EAAE,IAAI;CACX,CAAC;AAEX,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;KAClE,CAAC;AACJ,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,oBAAoB,CAAC,GAAW;IAC9C,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,IAAI,GAAG,OAAO,CAAC;IACnB,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3C,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAA+B,CAAC;QA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QACD,IAAI,CAAC;YACH,IAAI,EAAE,GAAG,QAAQ,CAAC;YAClB,IAAI,CAAC,EAAE,EAAE,CAAC;gBACR,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;oBACpC,OAAO,UAAU,CAAC;wBAChB,EAAE,EAAE,KAAK;wBACT,KAAK,EAAE,gEAAgE;qBACxE,CAAC,CAAC;gBACL,CAAC;gBACD,EAAE,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC;oBAC7B,MAAM;oBACN,QAAQ;oBACR,QAAQ;oBACR,IAAI,EAAE,IAAwB;iBAC/B,CAAC,CAAC;YACL,CAAC;YACD,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,UAAU,CAAC;gBACpC,MAAM;gBACN,QAAQ,EAAE,EAAE;gBACZ,KAAK;gBACL,KAAK;gBACL,MAAM;aACP,CAAC,CAAC;YACH,OAAO,UAAU,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;QAC7C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,OAAO,UAAU,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;QACnD,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import type { HostedMcpInfo } from '../guide.js';
|
|
3
3
|
import type { RunCmsEditFn } from '../types.js';
|
|
4
|
-
export declare const TOOL_DESCRIPTION = "Run any cms-edit command. Saves create Contentful drafts. Publish, unpublish, archive, and revalidate are separate plan commands and run only after the user says yes.\n\nUse hosted MCP only for content. Do not run a local cms-edit binary, --file, or stdin for pages.\n\nJSON-first (preferred for a whole page):\n [\"schema\", \"component\"] then [\"schema\", \"types\", \"component\"] \u2014 field ids and enums for THIS space\n [\"help\", \"create-from-json\"] or cms_edit_help {topic:\"create-from-json\"}\n Hosted payloads over 8192 bytes MUST use staged upload (kind=json), not --json / --json-base64.\n Filesystem client: write JSON on disk, cms_edit_request_staged_upload kind=json, curl, then\n [\"create\", \"from-json\", \"--staged\", \"<id>\", \"--dry-run\", \"--strict\"]\n Tiny JSON only: [\"create\", \"from-json\", \"--json\", \"{...}\", \"--dry-run\", \"--strict\"]\n Then the same command without --dry-run. That writes drafts. Do not publish them in the same step.\n Edit existing: [\"open\", \"--page-slug\", \"/x\"] \u2192 [\"export\", \"from-json\"] \u2192 staged json \u2192 [\"apply\", \"from-json\", \"--staged\", \"<id>\"]\n Tiny patches only: set / rtf / add. Long Text (rawHtml/customCss/customJs): kind=text then set --staged.\n Object JSON, rtf --content, batch run, person/taxonomy imports: --staged when over 8k (kind=json or kind=text).\n\nUse cms_edit_version (no args) to check the installed version.\nUse cms_edit_help to read the getting-started guide or playbooks (including create-from-json).\n Topic \"workflow\" is the playbook; use topic \"guide/workflow\" for the short hosted-guide section.\nOutput: command JSON, then a last line {\"cma_requests\":N,\"cpa_requests\":N} (parse the last line for CMA counts; JSON.parse the command body separately).\nUse cms_edit_customer to read site-specific playbooks (articles, routing, blog-tag-matrix, etc.).\nIf Integrations only exposes cms_edit, use [\"customer\", \"index\"] or [\"customer\", \"resource=index\"] instead.\nRead the cms-edit://guide resource for the full guide.\n\nWorkflow (patches): open \u2192 snapshot \u2192 read/set/rtf/add/remove \u2192 diff \u2192 save\nSaves create drafts. To go live: publish plan \u2192 if the plan asks all vs mine, ask the user and publish choose \u2192 publish apply only after the user says yes.\nThe Contentful role must allow publish. AI Editor cannot. Same plan-then-yes rule for unpublish, archive, and revalidate.\n\nCRITICAL \u2014 sessions and open:\n set/rtf field edits are staged until save. Plain open while dirty HARD-FAILS (does not wipe silently).\n [\"open\", \"--resume\"] \u2014 re-print current session; keeps all staged edits (no Contentful refetch)\n [\"open\", \"--overwrite\", \"--confirm-discard\", \"--id\", \"<id>\"] \u2014 abandon staged work and load a new entry\n [\"discard\"] then open \u2014 also valid abandon path\n Never re-open the same article mid-edit without save/discard \u2014 use --resume if you only need the tree again.\n\nCommon command sequences:\n [\"open\", \"--page-slug\", \"/\"] \u2014 homepage (CMS slug index; /index is equivalent)\n [\"open\", \"--page-slug\", \"/pricing\"] \u2014 load a page by slug (skips template menu/footer)\n [\"open\", \"--include-chrome\", \"--page-slug\", \"/pricing\"] \u2014 also fetch template nav chrome\n [\"open\", \"--id\", \"<entry-id>\"] \u2014 load by Contentful entry ID\n [\"open\", \"--resume\"] \u2014 keep staged work; re-print snapshot\n [\"snapshot\"] \u2014 print content tree with @refs\n [\"read\", \"@c0\"] \u2014 read all fields of a component (requires open session)\n [\"read\", \"@c0\", \"heading\"] \u2014 read a specific field (requires open session)\n [\"read\", \"@root\"] \u2014 read root entry fields (requires open session)\n [\"read\", \"<entry-id>\", \"--id\"] \u2014 read entry by ID (no session)\n [\"read\", \"<entry-id>\", \"--id\", \"heading\"] \u2014 read one field by entry ID (no session)\n [\"peek\", \"--page-slug\", \"/pricing\"] \u2014 preview tree + root fields (no session)\n [\"peek\", \"--id\", \"<entry-id>\"] \u2014 preview by entry ID with rootFields in JSON\n [\"set\", \"@c0\", \"heading\", \"New heading\"] \u2014 set a scalar field\n [\"set\", \"<entry-id>\", \"autoplay\", \"true\"] \u2014 mid-session scalar by ID (e.g. media; no re-open)\n [\"set\", \"<entry-id>:autoplay=true\"] \u2014 same, batch-shaped token on page session\n [\"set\", \"@c1\", \"visual\", \"<media-id>\", \"--link\"] \u2014 single Entry link field only\n [\"set\", \"@c2\", \"contents\", \"<id1>,<id2>\", \"--links\"] \u2014 array of links (full replace); never --link on arrays\n [\"rtf\", \"@c0\", \"body\", \"--content\", \"# H1\\n\\nBody.\"] \u2014 set rich text (preferred for AI)\n [\"rtf\", \"@c0\", \"body\", \"--base64\", \"<encoded>\"] \u2014 set rich text via base64 (no filesystem)\n [\"set\", \"@c1\", \"rawHtml\", \"--staged\", \"<id>\"] \u2014 long Text from staged upload (kind=text)\n [\"read\", \"@c0\", \"--hash\"] \u2014 byte lengths + sha256 (no bodies)\n [\"diff\"] \u2014 pending changes; long Text is bytes/sha256/head only\n [\"save\"] \u2014 write drafts to Contentful\n [\"discard\"] \u2014 discard unsaved changes\n [\"links\", \"set\", \"@c0\", \"0\", \"variant\", \"link\"] \u2014 set scalar field on link at index 0\n [\"batch\", \"set\", \"<entry-id>:variant=link\"] \u2014 scalar by ID (OK mid-page session; then save)\n [\"batch\", \"diff\"] \u2014 show pending batch edits\n [\"batch\", \"save\"] \u2014 save all batch edits as drafts\n [\"health\"] \u2014 verify config and connectivity\n [\"diagnose\"] \u2014 session/MCP diagnostics (store, userId, active session)\n [\"version\"] \u2014 print installed cms-edit version\n [\"guide\"] \u2014 print getting-started guide\n [\"guide\", \"workflow\"] \u2014 print a guide section\n [\"customer\", \"index\"] \u2014 list site editor playbooks\n [\"customer\", \"articles\"] \u2014 read articles playbook\n [\"customer\", \"resource=index\"] \u2014 same as index (Integrations fallback)\n [\"list\", \"--type\", \"article\", \"--sort\", \"date\", \"-n\", \"10\"] \u2014 recent articles by publication date\n [\"list\", \"--type\", \"article\", \"--sort\", \"date\"] \u2014 list articles (preview index includes drafts)\n [\"peek\", \"--article-slug\", \"<slug>\"] \u2014 preview draft or published article (CMA)\n [\"preview\", \"url\", \"/pricing\"] \u2014 staging page URL (open in browser MCP)\n [\"preview\", \"urls\", \"/pricing\"] \u2014 all preview targets; slug wins over leftover session root\n [\"nav\", \"open\", \"--nav-id\", \"<id>\"] \u2014 persist a navigation session (not --id)\n [\"nav\", \"open\", \"--nav-name\", \"Main menu\"] \u2014 same by navigation name\n [\"preview\", \"showcase\", \"--component\", \"HeroSimple\"] \u2014 component showcase URL (mock data)\n [\"preview\", \"showcase\", \"--collection\", \"CardGrid\", \"--param\", \"backgroundColour=Navy\"]\n\nDiscovery notes:\n Visual checks: use preview url / preview showcase, then open the returned URL with a browser MCP (cms-edit does not capture screenshots).\n peek/open/read --id load draft content via CMA \u2014 NOT published-only.\n Only list --published / resolve --published use the published-only Delivery API index.\n Articles: use --article-slug (not --page-slug). search --type article sorts by publication date.\n\nSessions persist between MCP calls (Redis on hosted, disk locally). MCP auto-uses session \"_mcp\" unless you pass --session.\nUse --session <name> before the subcommand to isolate concurrent workflows, e.g. [\"--session\", \"my-work\", \"open\", \"--page-slug\", \"/\"].\nUse --space <name> to target a specific Contentful space (local MCP only \u2014 omit for hosted Integrations).\nStateless read (no open required): [\"read\", \"<entry-id>\", \"--id\"] or [\"read\", \"<entry-id>\", \"--id\", \"heading\"].\npeek is one-shot (no session). open / nav open persist. preview urls /slug follows that slug even if _mcp is another page (JSON may include sessionRootIgnored).\nBefore set on a nested nav item (often a shared header CTA): ask whether the change is global or page-specific. Page-specific \u2192 new NavigationItem + page.menu (or a cloned menu), do not mutate the shared entry.\nTemplate menu is site-wide; page.menu overrides one page. nav clone is shallow for nested navigationItems.\nOutput is always JSON (CMS_EDIT_JSON=1 is forced by the MCP server).\n\n\nRich text tips:\n --content \"<markdown>\" preferred named flag for inline content (hosted: max 8192 bytes)\n --base64 \"<encoded>\" fully environment-agnostic, no filesystem needed\n --staged \"<id>\" kind=text (or kind=json with --rtf-json)\n\nJSON bulk input (create/apply from-json, batch run, taxonomy/person/article-tags imports, set object fields, rtf patch):\n --json \"<string>\" inline JSON (hosted: max 8192 bytes)\n --json-base64 \"<b64>\" base64-encoded JSON (hosted: max 8192 decoded bytes)\n --staged \"<id>\" after cms_edit_request_staged_upload kind=json\n\nAsset upload (hosted MCP):\n Raster/video: cms_edit_request_staged_upload \u2192 curl \u2192 cms_edit_media prepare (stagedUploadIds, or httpsUrls when intake is direct) \u2192 wait \u2192 catalog \u2192 import (video: import only; overrides[].alt required). Video and an image master over 4MB return a presigned PUT (100MB) and must not POST through the function. Never asset upload --staged/--url/--base64 for jpeg/png/webp/gif/mp4. Never ffmpeg/convert GIF or PNG locally \u2014 leave the original file; the pipeline encodes (animated GIF \u2192 gif-converted MP4, mute-loop Media, not featuredImage). Replace an existing id with asset replace --url of the processed \u2026/packs/\u2026/ready/\u2026 file (dry-run first). That keeps the id and the file name. Alt is asset set-description. Title is asset set-title. Concepts are asset concept assign, not taxonomy-from-json.\n SVG/PDF/Lottie: [\"staged-upload\", \"request\", ...] then curl, then [\"asset\", \"upload\", \"--staged\", \"<id>\", ...].\n Long Text / large page JSON: cms_edit_request_staged_upload kind=text|json \u2192 curl \u2192 set --staged or create from-json --staged.\n Pipeline ready **image** URLs may use import or asset upload --url on a Blob pack host.";
|
|
4
|
+
export declare const TOOL_DESCRIPTION = "Run any cms-edit command. Saves create Contentful drafts. Publish, unpublish, archive, and revalidate are separate plan commands and run only after the user says yes.\n\nUse hosted MCP only for content. Do not run a local cms-edit binary, --file, or stdin for pages.\n\nJSON-first (preferred for a whole page):\n [\"schema\", \"component\"] then [\"schema\", \"types\", \"component\"] \u2014 field ids and enums for THIS space\n [\"help\", \"create-from-json\"] or cms_edit_help {topic:\"create-from-json\"}\n Hosted payloads over 8192 bytes MUST use staged upload (kind=json), not --json / --json-base64.\n Filesystem client: write JSON on disk, cms_edit_request_staged_upload kind=json, curl, then\n [\"create\", \"from-json\", \"--staged\", \"<id>\", \"--dry-run\", \"--strict\"]\n Tiny JSON only: [\"create\", \"from-json\", \"--json\", \"{...}\", \"--dry-run\", \"--strict\"]\n Then the same command without --dry-run. That writes drafts. Do not publish them in the same step.\n Edit existing: [\"open\", \"--page-slug\", \"/x\"] \u2192 [\"export\", \"from-json\"] \u2192 staged json \u2192 [\"apply\", \"from-json\", \"--staged\", \"<id>\"]\n Tiny patches only: set / rtf / add. Long Text (rawHtml/customCss/customJs): kind=text then set --staged.\n Object JSON, rtf --content, batch run, person/taxonomy imports: --staged when over 8k (kind=json or kind=text).\n\nUse cms_edit_version (no args) to check the installed version.\nUse cms_edit_help to read the getting-started guide or playbooks (including create-from-json).\n Topic \"workflow\" is the playbook; use topic \"guide/workflow\" for the short hosted-guide section.\nOutput: command JSON, then a last line {\"cma_requests\":N,\"cpa_requests\":N} (parse the last line for CMA counts; JSON.parse the command body separately).\nUse cms_edit_customer to read site-specific playbooks (articles, routing, blog-tag-matrix, etc.).\nIf Integrations only exposes cms_edit, use [\"customer\", \"index\"] or [\"customer\", \"resource=index\"] instead.\nRead the cms-edit://guide resource for the full guide.\n\nWorkflow (patches): open \u2192 snapshot \u2192 read/set/rtf/add/remove \u2192 diff \u2192 save\nSaves create drafts. To go live: publish plan \u2192 if the plan asks all vs mine, ask the user and publish choose \u2192 publish apply only after the user says yes.\npublish plan --id publishes only those ids (no parent/listing republish). If a parent or listing page must go live so production is not stale, pass --with-parents, or open that page / --from-session and publish plan without --id.\nThe Contentful role must allow publish. AI Editor cannot. Same plan-then-yes rule for unpublish, archive, and revalidate.\n\nCRITICAL \u2014 sessions and open:\n set/rtf field edits are staged until save. Plain open while dirty HARD-FAILS (does not wipe silently).\n [\"open\", \"--resume\"] \u2014 re-print current session; keeps all staged edits (no Contentful refetch)\n [\"open\", \"--overwrite\", \"--confirm-discard\", \"--id\", \"<id>\"] \u2014 abandon staged work and load a new entry\n [\"discard\"] then open \u2014 also valid abandon path\n Never re-open the same article mid-edit without save/discard \u2014 use --resume if you only need the tree again.\n\nCommon command sequences:\n [\"open\", \"--page-slug\", \"/\"] \u2014 homepage (CMS slug index; /index is equivalent)\n [\"open\", \"--page-slug\", \"/pricing\"] \u2014 load a page by slug (skips template menu/footer)\n [\"open\", \"--include-chrome\", \"--page-slug\", \"/pricing\"] \u2014 also fetch template nav chrome\n [\"open\", \"--id\", \"<entry-id>\"] \u2014 load by Contentful entry ID\n [\"open\", \"--resume\"] \u2014 keep staged work; re-print snapshot\n [\"snapshot\"] \u2014 print content tree with @refs\n [\"read\", \"@c0\"] \u2014 read all fields of a component (requires open session)\n [\"read\", \"@c0\", \"heading\"] \u2014 read a specific field (requires open session)\n [\"read\", \"@root\"] \u2014 read root entry fields (requires open session)\n [\"read\", \"<entry-id>\", \"--id\"] \u2014 read entry by ID (no session)\n [\"read\", \"<entry-id>\", \"--id\", \"heading\"] \u2014 read one field by entry ID (no session)\n [\"peek\", \"--page-slug\", \"/pricing\"] \u2014 preview tree + root fields (no session)\n [\"peek\", \"--id\", \"<entry-id>\"] \u2014 preview by entry ID with rootFields in JSON\n [\"set\", \"@c0\", \"heading\", \"New heading\"] \u2014 set a scalar field\n [\"set\", \"<entry-id>\", \"autoplay\", \"true\"] \u2014 mid-session scalar by ID (e.g. media; no re-open)\n [\"set\", \"<entry-id>:autoplay=true\"] \u2014 same, batch-shaped token on page session\n [\"set\", \"@c1\", \"visual\", \"<media-id>\", \"--link\"] \u2014 single Entry link field only\n [\"set\", \"@c2\", \"contents\", \"<id1>,<id2>\", \"--links\"] \u2014 array of links (full replace); never --link on arrays\n [\"rtf\", \"@c0\", \"body\", \"--content\", \"# H1\\n\\nBody.\"] \u2014 set rich text (preferred for AI)\n [\"rtf\", \"@c0\", \"body\", \"--base64\", \"<encoded>\"] \u2014 set rich text via base64 (no filesystem)\n [\"set\", \"@c1\", \"rawHtml\", \"--staged\", \"<id>\"] \u2014 long Text from staged upload (kind=text)\n [\"read\", \"@c0\", \"--hash\"] \u2014 byte lengths + sha256 (no bodies)\n [\"diff\"] \u2014 pending changes; long Text is bytes/sha256/head only\n [\"save\"] \u2014 write drafts to Contentful\n [\"discard\"] \u2014 discard unsaved changes\n [\"links\", \"set\", \"@c0\", \"0\", \"variant\", \"link\"] \u2014 set scalar field on link at index 0\n [\"batch\", \"set\", \"<entry-id>:variant=link\"] \u2014 scalar by ID (OK mid-page session; then save)\n [\"batch\", \"diff\"] \u2014 show pending batch edits\n [\"batch\", \"save\"] \u2014 save all batch edits as drafts\n [\"health\"] \u2014 verify config and connectivity\n [\"diagnose\"] \u2014 session/MCP diagnostics (store, userId, active session)\n [\"version\"] \u2014 print installed cms-edit version\n [\"guide\"] \u2014 print getting-started guide\n [\"guide\", \"workflow\"] \u2014 print a guide section\n [\"customer\", \"index\"] \u2014 list site editor playbooks\n [\"customer\", \"articles\"] \u2014 read articles playbook\n [\"customer\", \"resource=index\"] \u2014 same as index (Integrations fallback)\n [\"list\", \"--type\", \"article\", \"--sort\", \"date\", \"-n\", \"10\"] \u2014 recent articles by publication date\n [\"list\", \"--type\", \"article\", \"--sort\", \"date\"] \u2014 list articles (preview index includes drafts)\n [\"peek\", \"--article-slug\", \"<slug>\"] \u2014 preview draft or published article (CMA)\n [\"preview\", \"url\", \"/pricing\"] \u2014 staging page URL (open in browser MCP)\n [\"preview\", \"urls\", \"/pricing\"] \u2014 all preview targets; slug wins over leftover session root\n [\"nav\", \"open\", \"--nav-id\", \"<id>\"] \u2014 persist a navigation session (not --id)\n [\"nav\", \"open\", \"--nav-name\", \"Main menu\"] \u2014 same by navigation name\n [\"preview\", \"showcase\", \"--component\", \"HeroSimple\"] \u2014 component showcase URL (mock data)\n [\"preview\", \"showcase\", \"--collection\", \"CardGrid\", \"--param\", \"backgroundColour=Navy\"]\n [\"publish\", \"plan\", \"--id\", \"<entry-id>\"] \u2014 named ids only; listing/parent stays as published\n [\"publish\", \"plan\", \"--id\", \"<entry-id>\", \"--with-parents\"] \u2014 also walk linked drafts and parent pages\n\nDiscovery notes:\n Visual checks: use preview url / preview showcase, then open the returned URL with a browser MCP (cms-edit does not capture screenshots).\n peek/open/read --id load draft content via CMA \u2014 NOT published-only.\n Only list --published / resolve --published use the published-only Delivery API index.\n Articles: use --article-slug (not --page-slug). search --type article sorts by publication date.\n\nSessions persist between MCP calls (Redis on hosted, disk locally). MCP auto-uses session \"_mcp\" unless you pass --session.\nUse --session <name> before the subcommand to isolate concurrent workflows, e.g. [\"--session\", \"my-work\", \"open\", \"--page-slug\", \"/\"].\nUse --space <name> to target a specific Contentful space (local MCP only \u2014 omit for hosted Integrations).\nStateless read (no open required): [\"read\", \"<entry-id>\", \"--id\"] or [\"read\", \"<entry-id>\", \"--id\", \"heading\"].\npeek is one-shot (no session). open / nav open persist. preview urls /slug follows that slug even if _mcp is another page (JSON may include sessionRootIgnored).\nBefore set on a nested nav item (often a shared header CTA): ask whether the change is global or page-specific. Page-specific \u2192 new NavigationItem + page.menu (or a cloned menu), do not mutate the shared entry.\nTemplate menu is site-wide; page.menu overrides one page. nav clone is shallow for nested navigationItems.\nOutput is always JSON (CMS_EDIT_JSON=1 is forced by the MCP server).\n\n\nRich text tips:\n --content \"<markdown>\" preferred named flag for inline content (hosted: max 8192 bytes)\n --base64 \"<encoded>\" fully environment-agnostic, no filesystem needed\n --staged \"<id>\" kind=text (or kind=json with --rtf-json)\n\nJSON bulk input (create/apply from-json, batch run, taxonomy/person/article-tags imports, set object fields, rtf patch):\n --json \"<string>\" inline JSON (hosted: max 8192 bytes)\n --json-base64 \"<b64>\" base64-encoded JSON (hosted: max 8192 decoded bytes)\n --staged \"<id>\" after cms_edit_request_staged_upload kind=json\n\nAsset upload (hosted MCP):\n Raster/video: cms_edit_request_staged_upload \u2192 curl \u2192 cms_edit_media prepare (stagedUploadIds, or httpsUrls when intake is direct) \u2192 wait \u2192 catalog \u2192 import (video: import only; overrides[].alt required). Video and an image master over 4MB return a presigned PUT (100MB) and must not POST through the function. Never asset upload --staged/--url/--base64 for jpeg/png/webp/gif/mp4. Never ffmpeg/convert GIF or PNG locally \u2014 leave the original file; the pipeline encodes (animated GIF \u2192 gif-converted MP4, mute-loop Media, not featuredImage). Replace an existing id with asset replace --url of the processed \u2026/packs/\u2026/ready/\u2026 file (dry-run first). That keeps the id and the file name. Alt is asset set-description. Title is asset set-title. Concepts are asset concept assign, not taxonomy-from-json.\n SVG/PDF/Lottie: [\"staged-upload\", \"request\", ...] then curl, then [\"asset\", \"upload\", \"--staged\", \"<id>\", ...].\n Long Text / large page JSON: cms_edit_request_staged_upload kind=text|json \u2192 curl \u2192 set --staged or create from-json --staged.\n Pipeline ready **image** URLs may use import or asset upload --url on a Blob pack host.";
|
|
5
5
|
export declare function registerCmsEditTools(server: McpServer, runCmsEdit: RunCmsEditFn, hosted?: HostedMcpInfo): void;
|
|
6
6
|
export declare function getMcpServerInfo(hosted?: HostedMcpInfo): {
|
|
7
7
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cms-edit.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/cms-edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAOjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"cms-edit.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/cms-edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAOjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,gBAAgB,8xXAoH6D,CAAC;AAE3F,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,YAAY,EACxB,MAAM,CAAC,EAAE,aAAa,GACrB,IAAI,CAmEN;AAED,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAE1F"}
|
|
@@ -29,6 +29,7 @@ Read the cms-edit://guide resource for the full guide.
|
|
|
29
29
|
|
|
30
30
|
Workflow (patches): open → snapshot → read/set/rtf/add/remove → diff → save
|
|
31
31
|
Saves create drafts. To go live: publish plan → if the plan asks all vs mine, ask the user and publish choose → publish apply only after the user says yes.
|
|
32
|
+
publish plan --id publishes only those ids (no parent/listing republish). If a parent or listing page must go live so production is not stale, pass --with-parents, or open that page / --from-session and publish plan without --id.
|
|
32
33
|
The Contentful role must allow publish. AI Editor cannot. Same plan-then-yes rule for unpublish, archive, and revalidate.
|
|
33
34
|
|
|
34
35
|
CRITICAL — sessions and open:
|
|
@@ -85,6 +86,8 @@ Common command sequences:
|
|
|
85
86
|
["nav", "open", "--nav-name", "Main menu"] — same by navigation name
|
|
86
87
|
["preview", "showcase", "--component", "HeroSimple"] — component showcase URL (mock data)
|
|
87
88
|
["preview", "showcase", "--collection", "CardGrid", "--param", "backgroundColour=Navy"]
|
|
89
|
+
["publish", "plan", "--id", "<entry-id>"] — named ids only; listing/parent stays as published
|
|
90
|
+
["publish", "plan", "--id", "<entry-id>", "--with-parents"] — also walk linked drafts and parent pages
|
|
88
91
|
|
|
89
92
|
Discovery notes:
|
|
90
93
|
Visual checks: use preview url / preview showcase, then open the returned URL with a browser MCP (cms-edit does not capture screenshots).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cms-edit.js","sourceRoot":"","sources":["../../../src/mcp/tools/cms-edit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEpE,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,MAAM,CAAC,MAAM,gBAAgB,GAAG
|
|
1
|
+
{"version":3,"file":"cms-edit.js","sourceRoot":"","sources":["../../../src/mcp/tools/cms-edit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,O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,EAAE,MAAe,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IACxD,CAAC,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAAsB;IACrD,OAAO,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC7E,CAAC"}
|
|
@@ -18,6 +18,24 @@ export declare class StagedUploadStore {
|
|
|
18
18
|
consume(userId: string, uploadId: string): Promise<StagedUploadConsumeResult>;
|
|
19
19
|
/** Read staged bytes without deleting (pipeline fetch). */
|
|
20
20
|
peekFile(userId: string, uploadId: string): Promise<StagedUploadConsumeResult>;
|
|
21
|
+
private withSlotLock;
|
|
22
|
+
/**
|
|
23
|
+
* Append a text or JSON chunk into a pending slot. `final` marks the slot ready
|
|
24
|
+
* for `--staged` consume. Binary assets stay on the curl / direct intake path.
|
|
25
|
+
* `offset` is the byte length already stored. A retry of the same offset and
|
|
26
|
+
* chunk is a no-op.
|
|
27
|
+
*/
|
|
28
|
+
appendText(params: {
|
|
29
|
+
userId: string;
|
|
30
|
+
uploadId: string;
|
|
31
|
+
chunk: string;
|
|
32
|
+
final: boolean;
|
|
33
|
+
offset?: number;
|
|
34
|
+
}): Promise<{
|
|
35
|
+
uploadId: string;
|
|
36
|
+
bytes: number;
|
|
37
|
+
complete: boolean;
|
|
38
|
+
}>;
|
|
21
39
|
getRecord(userId: string, uploadId: string): Promise<StagedUploadRecord | null>;
|
|
22
40
|
}
|
|
23
41
|
//# sourceMappingURL=store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/staged-upload/store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAM/D,OAAO,EAGL,KAAK,gBAAgB,EAEtB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,yBAAyB,EAAE,kBA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,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,gBAAgB,CAAC;QACxB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,GAAG,OAAO,CAAC,MAAM,CAAC,CAqClB;IAEK,SAAS,CACb,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,kBAAkB,CAAC,CAiC7B;IAEK,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAsBlF;IAED,2DAA2D;IACrD,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAiBnF;YAEa,YAAY;IAiB1B;;;;;OAKG;IACG,UAAU,CAAC,MAAM,EAAE;QACvB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,OAAO,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC,CAkElE;IAEK,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAEpF;CACF"}
|
|
@@ -98,6 +98,7 @@ export class StagedUploadStore {
|
|
|
98
98
|
mimeType: resolvedMime,
|
|
99
99
|
byteLength: buffer.length,
|
|
100
100
|
dataBase64: buffer.toString('base64'),
|
|
101
|
+
partialText: undefined,
|
|
101
102
|
};
|
|
102
103
|
await this.redis.set(key, JSON.stringify(record), { ex: STAGED_UPLOAD_TTL_SECONDS });
|
|
103
104
|
return record;
|
|
@@ -141,6 +142,78 @@ export class StagedUploadStore {
|
|
|
141
142
|
kind: stagedKindOrAsset(existing.kind),
|
|
142
143
|
};
|
|
143
144
|
}
|
|
145
|
+
async withSlotLock(userId, uploadId, fn) {
|
|
146
|
+
const lockKey = `${this.fullKey(userId, uploadId)}:lock`;
|
|
147
|
+
const acquired = await this.redis.set(lockKey, '1', { nx: true, ex: 30 });
|
|
148
|
+
if (acquired !== true) {
|
|
149
|
+
throw new Error('Staged upload is being updated. Retry this chunk.');
|
|
150
|
+
}
|
|
151
|
+
try {
|
|
152
|
+
return await fn();
|
|
153
|
+
}
|
|
154
|
+
finally {
|
|
155
|
+
await this.redis.del(lockKey);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Append a text or JSON chunk into a pending slot. `final` marks the slot ready
|
|
160
|
+
* for `--staged` consume. Binary assets stay on the curl / direct intake path.
|
|
161
|
+
* `offset` is the byte length already stored. A retry of the same offset and
|
|
162
|
+
* chunk is a no-op.
|
|
163
|
+
*/
|
|
164
|
+
async appendText(params) {
|
|
165
|
+
return this.withSlotLock(params.userId, params.uploadId, async () => {
|
|
166
|
+
const key = this.fullKey(params.userId, params.uploadId);
|
|
167
|
+
const existing = parseRecord(await this.redis.get(key));
|
|
168
|
+
if (!existing || existing.userId !== params.userId || existing.uploadId !== params.uploadId) {
|
|
169
|
+
throw new Error('Staged upload slot not found or expired.');
|
|
170
|
+
}
|
|
171
|
+
const kind = stagedKindOrAsset(existing.kind);
|
|
172
|
+
if (kind === 'asset') {
|
|
173
|
+
throw new Error('append_text only accepts kind=text or kind=json slots.');
|
|
174
|
+
}
|
|
175
|
+
const stored = existing.status === 'ready'
|
|
176
|
+
? Buffer.from(existing.dataBase64 ?? '', 'base64').toString('utf8')
|
|
177
|
+
: (existing.partialText ?? '');
|
|
178
|
+
const storedBytes = Buffer.byteLength(stored);
|
|
179
|
+
const chunkBytes = Buffer.byteLength(params.chunk);
|
|
180
|
+
const offset = params.offset ?? (storedBytes === 0 ? 0 : undefined);
|
|
181
|
+
if (offset === undefined) {
|
|
182
|
+
throw new Error('Pass offset from the previous append_text bytes value. Use 0 on the first chunk.');
|
|
183
|
+
}
|
|
184
|
+
if (offset < storedBytes) {
|
|
185
|
+
const storedBuf = Buffer.from(stored);
|
|
186
|
+
const chunkBuf = Buffer.from(params.chunk);
|
|
187
|
+
const slice = storedBuf.subarray(offset, offset + chunkBuf.length);
|
|
188
|
+
if (slice.length !== chunkBuf.length || !slice.equals(chunkBuf)) {
|
|
189
|
+
throw new Error('Staged upload chunk does not match the bytes already stored at that offset.');
|
|
190
|
+
}
|
|
191
|
+
return {
|
|
192
|
+
uploadId: params.uploadId,
|
|
193
|
+
bytes: storedBytes,
|
|
194
|
+
complete: existing.status === 'ready',
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
if (offset > storedBytes) {
|
|
198
|
+
throw new Error('Staged upload offset is past the stored text. Pass the bytes value from the previous append_text call.');
|
|
199
|
+
}
|
|
200
|
+
if (existing.status === 'ready') {
|
|
201
|
+
throw new Error('Staged upload already received.');
|
|
202
|
+
}
|
|
203
|
+
const next = `${stored}${params.chunk}`;
|
|
204
|
+
const bytes = storedBytes + chunkBytes;
|
|
205
|
+
if (bytes > hostedStagedMaxBytes()) {
|
|
206
|
+
throw new Error(`File exceeds hosted staged upload limit (${String(hostedStagedMaxBytes())} bytes).`);
|
|
207
|
+
}
|
|
208
|
+
if (!params.final) {
|
|
209
|
+
const record = { ...existing, partialText: next, byteLength: bytes };
|
|
210
|
+
await this.redis.set(key, JSON.stringify(record), { ex: STAGED_UPLOAD_TTL_SECONDS });
|
|
211
|
+
return { uploadId: params.uploadId, bytes, complete: false };
|
|
212
|
+
}
|
|
213
|
+
await this.storeFile(params.userId, params.uploadId, Buffer.from(next), existing.mimeType);
|
|
214
|
+
return { uploadId: params.uploadId, bytes, complete: true };
|
|
215
|
+
});
|
|
216
|
+
}
|
|
144
217
|
async getRecord(userId, uploadId) {
|
|
145
218
|
return parseRecord(await this.redis.get(this.fullKey(userId, uploadId)));
|
|
146
219
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/staged-upload/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EACL,oBAAoB,EACpB,iCAAiC,EACjC,yBAAyB,GAC1B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EAEvB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAGnB,MAAM,UAAU,GAAG,kBAAkB,CAAC;AACtC,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAE5C,SAAS,OAAO,CAAC,MAAc,EAAE,UAAkB;IACjD,OAAO,GAAG,WAAW,GAAG,MAAM,IAAI,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;AACzD,CAAC;AAED,SAAS,WAAW,CAAC,GAAY;IAC/B,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAuB,CAAC;QAC/C,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,GAAyB,CAAC;IACnC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,OAAO,iBAAiB;IAET,KAAK;IACL,SAAS;IAF5B,YACmB,KAAkB,EAClB,SAAS,GAAG,UAAU;qBADtB,KAAK;yBACL,SAAS;IACzB,CAAC;IAEI,O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AAC,SAAS,CAAC,MAAc,EAAE,QAAgB;QAC9C,OAAO,WAAW,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC3E,CAAC;CACF"}
|
|
@@ -10,6 +10,8 @@ export interface StagedUploadRecord {
|
|
|
10
10
|
byteLength?: number;
|
|
11
11
|
status: StagedUploadStatus;
|
|
12
12
|
dataBase64?: string;
|
|
13
|
+
/** UTF-8 text accumulated by append_text before the slot is marked ready. */
|
|
14
|
+
partialText?: string;
|
|
13
15
|
createdAt: number;
|
|
14
16
|
}
|
|
15
17
|
export interface StagedUploadRequestResult {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/staged-upload/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,OAAO,CAAC;AAErD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,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IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,gBAAgB,CAAC;CACxB"}
|
|
@@ -27,6 +27,7 @@ The signed-in Contentful user must have the matching role permission. AI Editor
|
|
|
27
27
|
- `schema`, `template`, `navigation`, and the other webhook types can be the target (`--content-type schema`, `--id`, or `--from-session`). Publishing them refreshes caches through their own webhook. Do not republish every page that uses them.
|
|
28
28
|
- A schema linked only from an unpublished page is named in the plan. Publishing the schema does not add that link to the live page.
|
|
29
29
|
- `publish plan --id` publishes only those ids. It does not pull in linked drafts or parent pages. Repeat `--id` to name more than one. `--with-parents` opts into the parent walk.
|
|
30
|
+
- When publishing a page (or a nested entry) with `--id` and the listing or parent page must go live too, pass `--with-parents`. Equivalent: open the parent/listing page or use `--from-session`, then `publish plan` without `--id`. Do not rely on `--id` alone to refresh listings.
|
|
30
31
|
- An open page, `--from-session`, or `--id --with-parents` publishes the draft and what it needs. A component on that path publishes its own changes, then the pages that use it. The parent walk climbs through components and collections and stops at the first root. A template on that path is republished itself, because its webhook refreshes the pages that use it. The walk does not continue into those pages.
|
|
31
32
|
- `location` is a root only when the site's `project.json` lists it under `publish.extraRootContentTypes` and the editor pack has been regenerated.
|
|
32
33
|
- Unpublish and archive affect the named entries only, not their children. A published entry is unpublished before it is archived.
|
package/docs/help/publish.md
CHANGED
|
@@ -18,7 +18,7 @@ cms-edit publish apply --plan <id>
|
|
|
18
18
|
|
|
19
19
|
Open a page, then `publish plan` publishes that page's draft and changed assets and components, then the page. `--from-session` does the same for the open session. On that path, a component plan climbs through other components and stops at the first page, article, or other root. A template on that path is republished itself.
|
|
20
20
|
|
|
21
|
-
`publish plan --id <entryId>` publishes only the ids you name. Repeat `--id` for more than one. It does not publish linked drafts or the pages that use those entries. `--with-parents` opts into that parent republish.
|
|
21
|
+
`publish plan --id <entryId>` publishes only the ids you name. Repeat `--id` for more than one. It does not publish linked drafts or the pages that use those entries. `--with-parents` opts into that parent republish. Use `--with-parents` (or open the parent/listing page and `publish plan` without `--id`) whenever those parent pages must go live; otherwise listings stay stale.
|
|
22
22
|
|
|
23
23
|
```
|
|
24
24
|
cms-edit publish plan --content-type schema
|
package/docs/mcp/hosted-guide.md
CHANGED
|
@@ -294,6 +294,14 @@ Replace the server name and host with your site's deployment. The URL **must** e
|
|
|
294
294
|
|
|
295
295
|
OAuth is two steps: Grok obtains an MCP token, then you sign in with Contentful to link your account. If the browser flashes and closes immediately, reconnect after upgrading cms-edit (loopback redirect handling).
|
|
296
296
|
|
|
297
|
+
## Other clients
|
|
298
|
+
|
|
299
|
+
Paste the same `/api/mcp` URL. ChatGPT: Settings → Apps & Connectors → custom MCP server → OAuth → Contentful. Draft saves need a Business, Enterprise, or Edu workspace. Recreate the connector after a tool change.
|
|
300
|
+
|
|
301
|
+
Cursor and VS Code: remote HTTP MCP, then OAuth. Gemini CLI: `url` under `mcpServers`.
|
|
302
|
+
|
|
303
|
+
If the client has no shell, use `search`, `fetch`, `get_editor_guide`, `set_field`, `diff_draft`, `save_draft`, and `append_text` (chunks of at most 8192 bytes). `save_draft` writes drafts only.
|
|
304
|
+
|
|
297
305
|
## Hosted connector rules
|
|
298
306
|
|
|
299
307
|
{{HOSTED_RULES}}
|
package/package.json
CHANGED
package/skills/core/SKILL.md
CHANGED
|
@@ -21,7 +21,7 @@ Use this skill when you need to read or edit content in Contentful using **hoste
|
|
|
21
21
|
|
|
22
22
|
**Edit a tree:** `open` → `export from-json` → edit JSON → `apply from-json` (`--staged` when over 8k). Tiny patches: `set` / `rtf` / `add` then `diff` → `save`. Long HtmlComponent fields: `kind=text` then `set --staged`.
|
|
23
23
|
|
|
24
|
-
**Do not publish while saving.** Hosted MCP cannot see your disk — send JSON in the tool call **only if under 8192 bytes**. Publish is a later plan, and only after the user says yes.
|
|
24
|
+
**Do not publish while saving.** Hosted MCP cannot see your disk — send JSON in the tool call **only if under 8192 bytes**. Publish is a later plan, and only after the user says yes. `publish plan --id` publishes **only those ids** (no parent/listing republish). If a parent or listing page must go live so production is not stale, pass `--with-parents`, or open that page / `--from-session` and `publish plan` without `--id`.
|
|
25
25
|
|
|
26
26
|
## Safety Rules
|
|
27
27
|
|
|
@@ -834,7 +834,7 @@ Use `"components"` not `"content"`. Nested discriminator is `"type"` not `"compo
|
|
|
834
834
|
- String `fields` values become Rich Text when they auto-detect as Markdown (same heuristic), HTML (tag-like), or Rich Text JSON (`nodeType: document`). Otherwise strings stay as-is — use `{ "value": "…", "format": "text"|"markdown"|"html"|"json" }` or `cms-edit rtf` with `--text|--markdown|--html|--rtf-json`.
|
|
835
835
|
- `target` sets which content array to use: `topContent`, `content` (default), or `bottomContent`.
|
|
836
836
|
- Slugs must not have a trailing slash — `from-json` strips it with a warning, but avoid it in source JSON.
|
|
837
|
-
- All entries are created as **drafts**. Publish later with `publish plan`, then `publish apply` only after the user says yes.
|
|
837
|
+
- All entries are created as **drafts**. Publish later with `publish plan`, then `publish apply` only after the user says yes. With `--id`, add `--with-parents` when parent/listing pages must republish.
|
|
838
838
|
- `--dry-run` prints the full plan without writing anything.
|
|
839
839
|
|
|
840
840
|
## Find Existing Entries (for existingId)
|
|
@@ -863,7 +863,14 @@ cms-edit list --type article --sort date -n 20
|
|
|
863
863
|
cms-edit index dump --reference-only # Full catalog snapshot in terminal
|
|
864
864
|
```
|
|
865
865
|
|
|
866
|
-
**Note on publish:** Saves create drafts. `publish plan
|
|
866
|
+
**Note on publish:** Saves create drafts. Then `publish plan`, then `publish apply --plan <id>` only after the user says yes.
|
|
867
|
+
|
|
868
|
+
- **Open page** or `--from-session`: publishes that page's draft and what it needs (linked drafts, then the page). The page publish is what refreshes the live URL.
|
|
869
|
+
- **`--id`**: publishes **only the named ids**. Repeat `--id` for more than one. It does **not** walk linked drafts or parent/listing pages, so those live pages can stay stale.
|
|
870
|
+
- **`--id` + `--with-parents`**: opts into the parent walk (linked drafts and upstream pages). Use this whenever a parent or listing page must republish. Equivalent: open the parent/listing and `publish plan` without `--id`.
|
|
871
|
+
- **`--content-type schema`** (and other webhook types): publishes those entries; pages that use them are not republished.
|
|
872
|
+
|
|
873
|
+
If someone else also changed an entry, ask all versus mine and `publish choose`. The Contentful role must allow it. Unpublish, archive, and revalidate use the same plan-then-yes rule. Do not apply a plan on your own.
|
|
867
874
|
|
|
868
875
|
## Concurrent Sessions
|
|
869
876
|
|
|
@@ -60,7 +60,7 @@ Capability playbooks require:
|
|
|
60
60
|
1. **Propose** scope to the user — wait for approval
|
|
61
61
|
2. **Dry-run** when available (`--dry-run`, `bulk-rtf-replace --dry-run`, etc.)
|
|
62
62
|
3. **`diff`** before every `save`
|
|
63
|
-
4. **Summarize** what changed; remind that publish is
|
|
63
|
+
4. **Summarize** what changed; remind that publish is a later `publish plan` after an explicit yes. `publish plan --id` is exact ids only — if a parent or listing page must go live, use `--with-parents` (or open that page and `publish plan`). See `task-publish-handoff`.
|
|
64
64
|
|
|
65
65
|
## Media default
|
|
66
66
|
|
package/skills/manifest.json
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
"core": "Edit Contentful drafts via hosted cms-edit MCP (open → snapshot → read → set/rtf → diff → save). Local CLI content commands are disabled.",
|
|
3
3
|
"editor-tasks": "Route CMS editing intents to site task playbooks via tasks-index (hosted MCP resources or local editor-pack files).",
|
|
4
4
|
"templates": "Create or edit templates (preContent, postContent, menu, footer, colours) in Contentful via cms-edit.",
|
|
5
|
-
"setup": "Guide a user through connecting hosted cms-edit MCP for Claude
|
|
5
|
+
"setup": "Guide a user through connecting hosted cms-edit MCP for Claude, ChatGPT, Grok, Cursor, or Gemini (OAuth)."
|
|
6
6
|
}
|
package/skills/setup/SKILL.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: contentful-cms-setup
|
|
3
|
-
description: "Guide a user through connecting hosted cms-edit MCP for Claude
|
|
3
|
+
description: "Guide a user through connecting hosted cms-edit MCP for Claude, ChatGPT, Grok, Cursor, or Gemini (OAuth)."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Skill: cms-edit Setup
|
|
7
7
|
|
|
8
|
-
Use this skill when the user wants to connect Claude
|
|
8
|
+
Use this skill when the user wants to connect Claude, ChatGPT, Grok, Cursor, VS Code, or Gemini CLI to their Contentful site via **hosted cms-edit MCP**.
|
|
9
9
|
|
|
10
10
|
Local stdio MCP and the setup wizard are **not supported**. Editors connect through the site's `/cms-edit` onboarding flow.
|
|
11
11
|
|
|
@@ -68,6 +68,27 @@ Full guide: `packages/contentful-cms/docs/mcp/hosted-guide.md` (Grok Build secti
|
|
|
68
68
|
|
|
69
69
|
---
|
|
70
70
|
|
|
71
|
+
## Hosted setup (ChatGPT and other remote MCP clients)
|
|
72
|
+
|
|
73
|
+
The MCP URL is the same URL as Claude (`https://<host>/api/mcp`). The client must speak remote Streamable HTTP and OAuth. There is no local stdio server and no OpenAPI Action.
|
|
74
|
+
|
|
75
|
+
### ChatGPT
|
|
76
|
+
|
|
77
|
+
1. Settings → **Apps & Connectors** → create a custom MCP server
|
|
78
|
+
2. Paste the MCP URL and choose **OAuth**
|
|
79
|
+
3. Sign in with **Contentful**
|
|
80
|
+
4. Ask it to call `search` or `cms_edit_version`
|
|
81
|
+
|
|
82
|
+
Draft writes (`set_field`, `save_draft`) need a Business, Enterprise, or Edu workspace. Pro can be read-only. ChatGPT freezes the tool list at connect time: after a cms-edit upgrade, remove the connector and add it again.
|
|
83
|
+
|
|
84
|
+
Clients that cannot run a shell use `append_text` for bodies over 8192 bytes, then `cms_edit` with `--staged`. `save_draft` does not publish.
|
|
85
|
+
|
|
86
|
+
### Cursor, VS Code, Gemini CLI
|
|
87
|
+
|
|
88
|
+
Add the MCP URL as a remote HTTP server and complete OAuth. Cursor: `~/.cursor/mcp.json` `url`. VS Code: `.vscode/mcp.json` `servers` with `type: http`. Gemini CLI: `mcpServers.<name>.url`.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
71
92
|
## Developers (CLI + skills, not local MCP)
|
|
72
93
|
|
|
73
94
|
For engineering work in a site repo (Cursor, Grok, terminal):
|