@se-studio/contentful-cms 2.6.0 → 2.7.0
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/audit/asset-usage.d.ts +14 -0
- package/dist/audit/asset-usage.d.ts.map +1 -1
- package/dist/audit/asset-usage.js +18 -0
- package/dist/audit/asset-usage.js.map +1 -1
- package/dist/audit/media-review.d.ts +4 -0
- package/dist/audit/media-review.d.ts.map +1 -1
- package/dist/audit/media-review.js.map +1 -1
- package/dist/commands/asset.d.ts.map +1 -1
- package/dist/commands/asset.js +19 -9
- package/dist/commands/asset.js.map +1 -1
- package/dist/commands/create-from-json.d.ts.map +1 -1
- package/dist/commands/create-from-json.js +11 -0
- package/dist/commands/create-from-json.js.map +1 -1
- package/dist/commands/create-taxonomy.d.ts.map +1 -1
- package/dist/commands/create-taxonomy.js +5 -3
- package/dist/commands/create-taxonomy.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +13 -3
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/nav.d.ts.map +1 -1
- package/dist/commands/nav.js +14 -0
- package/dist/commands/nav.js.map +1 -1
- package/dist/commands/save.d.ts.map +1 -1
- package/dist/commands/save.js +13 -0
- package/dist/commands/save.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 -0
- package/dist/hosted/index.d.ts.map +1 -1
- package/dist/hosted/index.js +1 -0
- package/dist/hosted/index.js.map +1 -1
- package/dist/hosted/next/redis.d.ts.map +1 -1
- package/dist/hosted/next/redis.js +11 -3
- package/dist/hosted/next/redis.js.map +1 -1
- package/dist/hosted/next/routes/mcp.d.ts.map +1 -1
- package/dist/hosted/next/routes/mcp.js +2 -1
- package/dist/hosted/next/routes/mcp.js.map +1 -1
- package/dist/index/blob.d.ts +5 -0
- package/dist/index/blob.d.ts.map +1 -0
- package/dist/index/blob.js +15 -0
- package/dist/index/blob.js.map +1 -0
- package/dist/index/cache-keys.d.ts +9 -0
- package/dist/index/cache-keys.d.ts.map +1 -0
- package/dist/index/cache-keys.js +13 -0
- package/dist/index/cache-keys.js.map +1 -0
- package/dist/index/cache-store.d.ts +31 -0
- package/dist/index/cache-store.d.ts.map +1 -0
- package/dist/index/cache-store.js +17 -0
- package/dist/index/cache-store.js.map +1 -0
- package/dist/index/distributed-sync-lock.d.ts +3 -0
- package/dist/index/distributed-sync-lock.d.ts.map +1 -0
- package/dist/index/distributed-sync-lock.js +22 -0
- package/dist/index/distributed-sync-lock.js.map +1 -0
- package/dist/index/file-index-cache.d.ts +16 -0
- package/dist/index/file-index-cache.d.ts.map +1 -0
- package/dist/index/file-index-cache.js +103 -0
- package/dist/index/file-index-cache.js.map +1 -0
- package/dist/index/hydrate.d.ts +4 -0
- package/dist/index/hydrate.d.ts.map +1 -0
- package/dist/index/hydrate.js +24 -0
- package/dist/index/hydrate.js.map +1 -0
- package/dist/index/invalidate.d.ts +24 -0
- package/dist/index/invalidate.d.ts.map +1 -0
- package/dist/index/invalidate.js +60 -0
- package/dist/index/invalidate.js.map +1 -0
- package/dist/index/patch-index.d.ts +12 -0
- package/dist/index/patch-index.d.ts.map +1 -0
- package/dist/index/patch-index.js +40 -0
- package/dist/index/patch-index.js.map +1 -0
- package/dist/index/publish-cache.d.ts +5 -0
- package/dist/index/publish-cache.d.ts.map +1 -0
- package/dist/index/publish-cache.js +26 -0
- package/dist/index/publish-cache.js.map +1 -0
- package/dist/index/redis-index-cache.d.ts +24 -0
- package/dist/index/redis-index-cache.d.ts.map +1 -0
- package/dist/index/redis-index-cache.js +83 -0
- package/dist/index/redis-index-cache.js.map +1 -0
- package/dist/index/require.d.ts +5 -4
- package/dist/index/require.d.ts.map +1 -1
- package/dist/index/require.js +17 -6
- package/dist/index/require.js.map +1 -1
- package/dist/index/run-sync.d.ts +2 -0
- package/dist/index/run-sync.d.ts.map +1 -1
- package/dist/index/run-sync.js +16 -9
- package/dist/index/run-sync.js.map +1 -1
- package/dist/index/sync.d.ts +9 -1
- package/dist/index/sync.d.ts.map +1 -1
- package/dist/index/sync.js +53 -0
- package/dist/index/sync.js.map +1 -1
- package/dist/runtime/context.d.ts +3 -0
- package/dist/runtime/context.d.ts.map +1 -1
- package/dist/runtime/context.js.map +1 -1
- package/dist/session/session-store.d.ts +2 -1
- package/dist/session/session-store.d.ts.map +1 -1
- package/docs/help/asset-review.md +4 -2
- package/docs/help/index-sync.md +9 -3
- package/docs/mcp/e2e-test-prompt.md +159 -0
- package/docs/mcp/hosted-guide.md +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Hosted MCP end-to-end test prompts
|
|
2
|
+
|
|
3
|
+
How to create and run **copy-paste QA prompts** for cms-edit hosted MCP (Claude Desktop Integrations + OAuth).
|
|
4
|
+
|
|
5
|
+
**Example instance:** [Brightline `MCP-E2E-TEST.md`](https://github.com/Brightline-Marketing/brightline-sites/blob/develop/docs/cms-edit/MCP-E2E-TEST.md) in `brightline-sites/docs/cms-edit/`.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## When to run
|
|
10
|
+
|
|
11
|
+
| Trigger | Action |
|
|
12
|
+
|---------|--------|
|
|
13
|
+
| Bumped `@se-studio/contentful-cms` in customer repo | Regen editor pack → push → run E2E prompt |
|
|
14
|
+
| Regenerated `editor-pack/` | Push → run E2E prompt |
|
|
15
|
+
| OAuth / Redis / session bugs reported | Run phases 0 + 4 + session tips in [hosted-guide.md](./hosted-guide.md) |
|
|
16
|
+
| Major cms-edit CLI prune (e.g. 2.6.0) | Include **phase 9** negative tests for removed commands |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Prerequisites
|
|
21
|
+
|
|
22
|
+
1. Claude Desktop with the site's **custom connector** connected (Contentful OAuth complete).
|
|
23
|
+
2. Editor has **AI Editor** role on the space.
|
|
24
|
+
3. Hosted deployment healthy: `curl -s https://<host>/api/health | jq` — `config`, `redis`, `oauth` ok.
|
|
25
|
+
4. Do **not** pass `--space` in `cms_edit` args on hosted MCP.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Where to store site-specific prompts
|
|
30
|
+
|
|
31
|
+
| Repo layout | Recommended path |
|
|
32
|
+
|-------------|------------------|
|
|
33
|
+
| Customer monorepo (Brightline, Pedestal, SE Studio) | `docs/cms-edit/MCP-E2E-TEST.md` |
|
|
34
|
+
| Optional per-site in multi-site repo | `docs/cms-edit/<site>/MCP-E2E-TEST.md` |
|
|
35
|
+
|
|
36
|
+
Link from:
|
|
37
|
+
|
|
38
|
+
- Customer `cms-edit/README.md`
|
|
39
|
+
- Customer `AGENTS.md` (under CMS editing section)
|
|
40
|
+
- `docs/CMS_EDIT_SETUP.md` customer table (this monorepo)
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## How to create a new site prompt
|
|
45
|
+
|
|
46
|
+
### 1. Gather site facts
|
|
47
|
+
|
|
48
|
+
Read the deployed editor pack (or regenerate locally):
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
cms-edit project doctor --project-config cms-edit/<site>/project.json
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
From `cms-edit://customer/routing` and `capabilities.json`, note:
|
|
55
|
+
|
|
56
|
+
- Homepage CMS slug (`index` vs `home`)
|
|
57
|
+
- Articles base path, tags enabled/disabled
|
|
58
|
+
- Which tasks in `tasks-index` are enabled
|
|
59
|
+
- Example page slug for peek/open (pick a stable page, not a campaign LP)
|
|
60
|
+
- One real `componentType` for `preview showcase`
|
|
61
|
+
|
|
62
|
+
### 2. Use the phase template
|
|
63
|
+
|
|
64
|
+
Every E2E prompt should cover these phases (trim for smoke tests):
|
|
65
|
+
|
|
66
|
+
| Phase | Purpose | Customize per site |
|
|
67
|
+
|-------|---------|-------------------|
|
|
68
|
+
| **0** Connector | version, health, guide, help | Expected version range |
|
|
69
|
+
| **1** Customer resources | tasks-index, capabilities, routing, indexes | Confirm routing bullets |
|
|
70
|
+
| **2** Discovery | index status, list, resolve, search | `index status` may show not built on a cold hosted instance before any sync; re-check after `list` or `open`. Article/tag types if enabled |
|
|
71
|
+
| **3** Peek | Tree without session | Fallback slug if `/about` missing |
|
|
72
|
+
| **4** Session | open → snapshot → read → diff | Homepage slug from routing |
|
|
73
|
+
| **5** Schema | `schema colours`, `schema types`, `schema fields` | Any site-specific content types |
|
|
74
|
+
| **6** Media | `asset review`, optional `--include-usage --usage-limit 5` | Skip if index empty; do not combine `--include-passing` + `--include-usage` without a limit on hosted MCP |
|
|
75
|
+
| **7** Dry-run writes | set+discard, bulk-rtf dry-run, create from-json dry-run | Skip taxonomy if disabled |
|
|
76
|
+
| **8** Preview | `preview url`, `preview showcase` | Real component type name |
|
|
77
|
+
| **9** Negatives | Removed commands (sitemap, ensure, run, …) | Update when CLI changes |
|
|
78
|
+
|
|
79
|
+
### 3. Safety rules (always include)
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
- Do NOT pass --space on hosted MCP.
|
|
83
|
+
- Do NOT save or create without --dry-run.
|
|
84
|
+
- If you set fields, run discard before finishing.
|
|
85
|
+
- Report PASS / FAIL / SKIP per step.
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 4. Final report format
|
|
89
|
+
|
|
90
|
+
Require a markdown results table and P0/P1/P2 fix list so runs are comparable across releases.
|
|
91
|
+
|
|
92
|
+
### 5. Ship with the customer repo
|
|
93
|
+
|
|
94
|
+
1. Add `docs/cms-edit/MCP-E2E-TEST.md` with site name, MCP URL, health URL, expected version.
|
|
95
|
+
2. Link from `cms-edit/README.md` and `AGENTS.md`.
|
|
96
|
+
3. Commit + push to deploy branch — **do not** `vercel deploy` manually (see `Agents.md`).
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Skeleton template
|
|
101
|
+
|
|
102
|
+
Copy into a new customer doc and replace `{{…}}` placeholders:
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
# Hosted MCP end-to-end test ({{SITE_NAME}})
|
|
106
|
+
|
|
107
|
+
| MCP URL | {{MCP_URL}} |
|
|
108
|
+
| Expected cms-edit | {{VERSION}} |
|
|
109
|
+
| Deploy branch | {{BRANCH}} |
|
|
110
|
+
|
|
111
|
+
## Prompt
|
|
112
|
+
|
|
113
|
+
\`\`\`
|
|
114
|
+
You are exercising the {{SITE_NAME}} cms-edit hosted MCP end-to-end.
|
|
115
|
+
|
|
116
|
+
RULES
|
|
117
|
+
- Do NOT pass --space …
|
|
118
|
+
- Do NOT save …
|
|
119
|
+
- discard after any set …
|
|
120
|
+
|
|
121
|
+
PHASE 0 — …
|
|
122
|
+
PHASE 1 — Confirm: homepage slug `{{HOMEPAGE_SLUG}}`, articles `{{ARTICLES_BASE}}`
|
|
123
|
+
…
|
|
124
|
+
PHASE 9 — Negatives: sitemap, ensure, run
|
|
125
|
+
FINAL REPORT — table + P0/P1/P2
|
|
126
|
+
\`\`\`
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Shorter smoke variant
|
|
132
|
+
|
|
133
|
+
Document a **5-minute** subset in the same file:
|
|
134
|
+
|
|
135
|
+
- Phases **0, 1, 2, 4, 9** only — enough to catch connector, knowledge, discovery, session, and CLI regressions.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Built-in MCP prompts (lighter alternative)
|
|
140
|
+
|
|
141
|
+
For ad-hoc checks without the full E2E script:
|
|
142
|
+
|
|
143
|
+
| Prompt | Covers |
|
|
144
|
+
|--------|--------|
|
|
145
|
+
| `cms_edit_verify` | version + health + customer resources load |
|
|
146
|
+
| `cms_edit_explore` | list + open homepage + snapshot |
|
|
147
|
+
|
|
148
|
+
The full E2E prompt is for **release QA** and **regression matrices** after CLI or editor-pack changes.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Related docs
|
|
153
|
+
|
|
154
|
+
| Doc | Purpose |
|
|
155
|
+
|-----|---------|
|
|
156
|
+
| [hosted-guide.md](./hosted-guide.md) | Editor + agent MCP reference |
|
|
157
|
+
| [HOSTED.md](../../HOSTED.md) | Editor onboarding |
|
|
158
|
+
| [../../docs/CMS_EDIT_SETUP.md](../../../../docs/CMS_EDIT_SETUP.md) | Customer deploy runbooks |
|
|
159
|
+
| Skill `contentful-cms-regenerate-editor-pack` | Regen + push workflow |
|
package/docs/mcp/hosted-guide.md
CHANGED
|
@@ -67,6 +67,10 @@ When a site editor pack is deployed, these MCP resources provide **site-specific
|
|
|
67
67
|
|
|
68
68
|
Read the full guide anytime via the `cms-edit://guide` resource or `cms_edit_help`.
|
|
69
69
|
|
|
70
|
+
## End-to-end QA prompt
|
|
71
|
+
|
|
72
|
+
For release QA after cms-edit or editor-pack upgrades, use a **copy-paste Claude Desktop test script** (phases: connector → customer resources → discovery → session → schema → media → dry-run writes → negatives). See [e2e-test-prompt.md](./e2e-test-prompt.md) to author one per customer site. Example: Brightline `docs/cms-edit/MCP-E2E-TEST.md`.
|
|
73
|
+
|
|
70
74
|
## Core workflow
|
|
71
75
|
|
|
72
76
|
Standard editing flow: **open → snapshot → read → set/rtf → diff → save**
|
|
@@ -270,6 +274,8 @@ Then open: `["peek", "--article-slug", "<slug>"]` or `["open", "--id", "<entry-i
|
|
|
270
274
|
|
|
271
275
|
After upgrading cms-edit, run `["index", "sync"]` once so the local index includes article `date` values (schema v4).
|
|
272
276
|
|
|
277
|
+
**Index freshness on hosted MCP:** The catalog index is shared via Redis (gzipped SQLite blob). `index status` on a cold instance may show **not built** until `list`, `open`, or another index command runs — that is normal. Committed writes (`save`, `create page`, `asset upload`, …) mark the index dirty; the next discovery command refreshes it. In-session `set` edits do not trigger a sync.
|
|
278
|
+
|
|
273
279
|
## Command reference (cms_edit args)
|
|
274
280
|
|
|
275
281
|
**Discovery:** `list --type <type>`, `search <query>`, `schema <contentType>`, `index sync`, `index status`
|