@se-studio/contentful-cms 3.9.2 → 3.9.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/dist/contentful/cma-user-agent.d.ts +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/docs/editor-tasks/create-from-document.md +10 -3
- package/docs/editor-tasks/source-readiness-review.md +4 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @se-studio/contentful-cms Changelog
|
|
2
2
|
|
|
3
|
+
## 3.9.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6eea7fc: Teach create-from-document and source-readiness to fork designer HTML / custom interaction onto htmlComponent (mixed pages) instead of always mapping copy onto registered card types.
|
|
8
|
+
|
|
9
|
+
## 3.9.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Bump zod 4.5.4 and tsx 4.23.13 on packages that declare them.
|
|
14
|
+
|
|
3
15
|
## 3.9.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** SDK `application` value. Becomes `app cms-edit/<version>` in X-Contentful-User-Agent. */
|
|
2
|
-
export declare const CMA_APPLICATION = "cms-edit/3.9.
|
|
2
|
+
export declare const CMA_APPLICATION = "cms-edit/3.9.4";
|
|
3
3
|
export declare function cmaClientOptions(accessToken: string): {
|
|
4
4
|
accessToken: string;
|
|
5
5
|
application: string;
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
|
|
15
15
|
## Prerequisites
|
|
16
16
|
|
|
17
|
-
- Fetch package materials (Google Drive MCP, paste, Figma link, zip, production ref, or
|
|
17
|
+
- Fetch package materials (Google Drive MCP, paste, Figma link, zip, production ref, **or designer HTML**)
|
|
18
18
|
- Read `cms-edit://customer/components-index`, `routing`, and for articles **`articles`**
|
|
19
|
+
- **Designer HTML / interactive prototype:** if `cms-edit://customer/task-create-html-component` (or another site HtmlComponent playbook) exists, **switch to that playbook** and stop this one. Otherwise follow the HtmlComponent fork in Phase 2 — do not flatten custom CSS/JS/scroll into registered cards.
|
|
19
20
|
- **Non-trivial packages:** complete **`task-source-readiness-review`** first (inventory → beat sheet → verdict → light human yes)
|
|
20
21
|
|
|
21
22
|
## Steps
|
|
@@ -38,8 +39,12 @@
|
|
|
38
39
|
### Phase 2 — Plan and create
|
|
39
40
|
|
|
40
41
|
1. Read `cms-edit://customer/tasks-index` and relevant playbooks (`articles` / `pages`).
|
|
41
|
-
2.
|
|
42
|
-
|
|
42
|
+
2. **Per-section mapping:**
|
|
43
|
+
- If **layout and interaction** match a registered type (e.g. FAQ accordion → FAQs), use that type.
|
|
44
|
+
- If the source is custom HTML/JS, sticky/scroll, diagrams, or a private layout shell, and this space has `htmlComponent`, map that beat to **`htmlComponent`** — not cards/lists that only match the copy.
|
|
45
|
+
- Mixed pages are expected. Merge consecutive custom sections that share CSS/JS/sticky into **one** HtmlComponent. Do not emit one HtmlComponent per `<section>`.
|
|
46
|
+
- Prefer **source order** over CMS convenience (do not invent side-by-side pairs unless the source is a true pair).
|
|
47
|
+
3. **Propose plan** (can reuse the soft-proof): slug, title, template/article type, ordered component list (registered **and** `htmlComponent` where needed), gap/placeholder list, **asset map** — **ask user to confirm** with a light **yes** if not already confirmed. For HtmlComponent beats: extract `data:` media first; run `schema htmlComponent` for this space’s field IDs (`html` vs `htmlContent`).
|
|
43
48
|
4. For pages: `list --type template` — pick template; check template `preContent` / `postContent` so heroes are not duplicated.
|
|
44
49
|
5. For articles: resolve `articleType`; apply site SEO and lab rules from `articles` playbook.
|
|
45
50
|
6. Build `create from-json` payload **or** prefer incremental `open` → `add` / `set` / `rtf` for large multi-block work. Link visuals using the pack map from Phase 1.
|
|
@@ -64,6 +69,7 @@ Use MCP prompts `cms_edit_create_from_doc` or `cms_edit_create_article_from_doc`
|
|
|
64
69
|
- Asset upload without reuse check (see **Media** capability)
|
|
65
70
|
- Mid-article ffmpeg / Drive size thrash — use **`task-media-pipeline-prepare`** first
|
|
66
71
|
- Inventing layout, section titles, or pair collections absent from the source
|
|
72
|
+
- Flattening designer HTML / custom interaction into registered cards because the copy looks like a card grid
|
|
67
73
|
|
|
68
74
|
## Related resources
|
|
69
75
|
|
|
@@ -75,3 +81,4 @@ Use MCP prompts `cms_edit_create_from_doc` or `cms_edit_create_article_from_doc`
|
|
|
75
81
|
- `task-create-page`
|
|
76
82
|
- `task-media-reuse-and-upload`
|
|
77
83
|
- `task-preview-verify`
|
|
84
|
+
- Site HtmlComponent playbook when present (`cms-edit://customer/task-create-html-component`)
|
|
@@ -45,11 +45,11 @@ If title, order, or hero asset **conflict** and the user has not decided → **N
|
|
|
45
45
|
|---|------|-------------------|-----------------------------------|----------------------|
|
|
46
46
|
| 1 | … | … | … | … |
|
|
47
47
|
|
|
48
|
-
3. **Build beat sheet** — ordered narrative + visual beats
|
|
48
|
+
3. **Build beat sheet** — ordered narrative + visual beats. For each beat: use a **registered** component/collection type when **layout and interaction** match (`components-index` / site playbook). If the source is designer HTML, custom CSS/JS, sticky/scroll, or a diagram that no registered type can reproduce, map to **`htmlComponent`** when that type exists in the space (and follow a site `task-create-html-component` playbook if present). Mixed stacks are valid. Merge consecutive custom HTML beats that share CSS/JS. Prefer **source order** over CMS convenience.
|
|
49
49
|
4. **Score verdict** using the threshold below.
|
|
50
50
|
5. **Post one-screen soft-proof** — numbered final `content` (or page stack) order + gap list + verdict.
|
|
51
51
|
6. **Ask for a light human confirm** — accept **yes** / **go** / **proceed** (or equivalent). Do not build on silence if the package is non-trivial.
|
|
52
|
-
7. On **GO** or **GO-WITH-GAPS** + yes → hand off to `task-create-from-document` / `task-create-article` / `task-create-page` with the soft-proof as the plan.
|
|
52
|
+
7. On **GO** or **GO-WITH-GAPS** + yes → hand off to `task-create-html-component` (if the site has it and the source is designer HTML), otherwise `task-create-from-document` / `task-create-article` / `task-create-page` with the soft-proof as the plan.
|
|
53
53
|
8. On **NO-GO** → stop; list what is blocking (do not invent structure to unblock).
|
|
54
54
|
|
|
55
55
|
## Gap threshold
|
|
@@ -75,7 +75,7 @@ If title, order, or hero asset **conflict** and the user has not decided → **N
|
|
|
75
75
|
## Faithful structure rules
|
|
76
76
|
|
|
77
77
|
1. **Do not rewrite copy** — structure and place only; flag issues for the human.
|
|
78
|
-
2. **Design sequence beats CMS convenience** — do not invent pair/side-by-side collections unless the source is a true pair.
|
|
78
|
+
2. **Design sequence beats CMS convenience** — do not invent pair/side-by-side collections unless the source is a true pair. If a beat is custom HTML/JS/scroll/diagram and `htmlComponent` exists, **remap that beat to `htmlComponent` and continue** (GO / GO-WITH-GAPS) — do not NO-GO the package and do not flatten it onto cards.
|
|
79
79
|
3. **Placeholders beat reordering** — keep the slot; label the gap (do not drop missing beats and renumber silently).
|
|
80
80
|
4. **Merge continuous prose** — do not split body-only blocks without a layout reason (art, quote, or design break between).
|
|
81
81
|
5. **Hero / template owns page H1** when the site template provides it — body headings only when the source has section titles.
|
|
@@ -114,3 +114,4 @@ Copy: unchanged from source (list any human decisions only)
|
|
|
114
114
|
- `task-media-pipeline-prepare`
|
|
115
115
|
- `task-media-reuse-and-upload`
|
|
116
116
|
- `task-preview-verify`
|
|
117
|
+
- Site `task-create-html-component` when present
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@se-studio/contentful-cms",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.4",
|
|
4
4
|
"description": "CLI tool for AI agents to read and edit Contentful draft content without publish permissions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"dotenv": "^17.4.2",
|
|
69
69
|
"jose": "^6.2.10",
|
|
70
70
|
"picocolors": "^1.1.1",
|
|
71
|
-
"zod": "^4.5.
|
|
71
|
+
"zod": "^4.5.4"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@biomejs/biome": "^2.5.11",
|