@se-studio/contentful-cms 1.3.7 → 2.0.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/HOSTED.md +25 -72
- package/INSTALL.md +2 -2
- package/README.md +1 -1
- package/dist/cli/program.js +2 -2
- package/dist/cli/program.js.map +1 -1
- package/dist/commands/entry-search.d.ts.map +1 -1
- package/dist/commands/entry-search.js +4 -1
- package/dist/commands/entry-search.js.map +1 -1
- package/dist/commands/host-scaffold.d.ts +4 -0
- package/dist/commands/host-scaffold.d.ts.map +1 -0
- package/dist/commands/host-scaffold.js +73 -0
- package/dist/commands/host-scaffold.js.map +1 -0
- package/dist/commands/{mcpb-pack.d.ts → host-stage.d.ts} +2 -2
- package/dist/commands/host-stage.d.ts.map +1 -0
- package/dist/commands/host-stage.js +60 -0
- package/dist/commands/host-stage.js.map +1 -0
- package/dist/commands/host.d.ts +3 -0
- package/dist/commands/host.d.ts.map +1 -0
- package/dist/commands/host.js +9 -0
- package/dist/commands/host.js.map +1 -0
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +26 -2
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/sitemap.d.ts.map +1 -1
- package/dist/commands/sitemap.js +17 -2
- package/dist/commands/sitemap.js.map +1 -1
- package/dist/contentful/cda-sync.d.ts.map +1 -1
- package/dist/contentful/cda-sync.js +2 -0
- package/dist/contentful/cda-sync.js.map +1 -1
- package/dist/contentful/reference-record.d.ts +4 -0
- package/dist/contentful/reference-record.d.ts.map +1 -1
- package/dist/contentful/reference-record.js +7 -0
- package/dist/contentful/reference-record.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 +7 -0
- package/dist/hosted/index.d.ts.map +1 -1
- package/dist/hosted/index.js +7 -0
- package/dist/hosted/index.js.map +1 -1
- package/dist/hosted/next/claude-connect.d.ts +8 -0
- package/dist/hosted/next/claude-connect.d.ts.map +1 -0
- package/dist/hosted/next/claude-connect.js +23 -0
- package/dist/hosted/next/claude-connect.js.map +1 -0
- package/dist/hosted/next/context.d.ts +3 -0
- package/dist/hosted/next/context.d.ts.map +1 -0
- package/dist/hosted/next/context.js +11 -0
- package/dist/hosted/next/context.js.map +1 -0
- package/dist/hosted/next/editor-pack-path.d.ts +2 -0
- package/dist/hosted/next/editor-pack-path.d.ts.map +1 -0
- package/dist/hosted/next/editor-pack-path.js +6 -0
- package/dist/hosted/next/editor-pack-path.js.map +1 -0
- package/dist/hosted/next/page-styles.d.ts +6 -0
- package/dist/hosted/next/page-styles.d.ts.map +1 -0
- package/dist/hosted/next/page-styles.js +37 -0
- package/dist/hosted/next/page-styles.js.map +1 -0
- package/dist/hosted/next/pages/CmsEditPage.d.ts +2 -0
- package/dist/hosted/next/pages/CmsEditPage.d.ts.map +1 -0
- package/dist/hosted/next/pages/CmsEditPage.js +22 -0
- package/dist/hosted/next/pages/CmsEditPage.js.map +1 -0
- package/dist/hosted/next/pages/ContentfulCallbackPage.d.ts +2 -0
- package/dist/hosted/next/pages/ContentfulCallbackPage.d.ts.map +1 -0
- package/dist/hosted/next/pages/ContentfulCallbackPage.js +45 -0
- package/dist/hosted/next/pages/ContentfulCallbackPage.js.map +1 -0
- package/dist/hosted/next/pages/HomePage.d.ts +2 -0
- package/dist/hosted/next/pages/HomePage.d.ts.map +1 -0
- package/dist/hosted/next/pages/HomePage.js +36 -0
- package/dist/hosted/next/pages/HomePage.js.map +1 -0
- package/dist/hosted/next/redis.d.ts +5 -0
- package/dist/hosted/next/redis.d.ts.map +1 -0
- package/dist/hosted/next/redis.js +23 -0
- package/dist/hosted/next/redis.js.map +1 -0
- package/dist/hosted/next/routes/connect.d.ts +2 -0
- package/dist/hosted/next/routes/connect.d.ts.map +1 -0
- package/dist/hosted/next/routes/connect.js +19 -0
- package/dist/hosted/next/routes/connect.js.map +1 -0
- package/dist/hosted/next/routes/health.d.ts +2 -0
- package/dist/hosted/next/routes/health.d.ts.map +1 -0
- package/dist/hosted/next/routes/health.js +51 -0
- package/dist/hosted/next/routes/health.js.map +1 -0
- package/dist/hosted/next/routes/link-contentful.d.ts +2 -0
- package/dist/hosted/next/routes/link-contentful.d.ts.map +1 -0
- package/dist/hosted/next/routes/link-contentful.js +6 -0
- package/dist/hosted/next/routes/link-contentful.js.map +1 -0
- package/dist/hosted/next/routes/mcp.d.ts +4 -0
- package/dist/hosted/next/routes/mcp.d.ts.map +1 -0
- package/dist/hosted/next/routes/mcp.js +52 -0
- package/dist/hosted/next/routes/mcp.js.map +1 -0
- package/dist/hosted/next/routes/oauth-authorization-server.d.ts +2 -0
- package/dist/hosted/next/routes/oauth-authorization-server.d.ts.map +1 -0
- package/dist/hosted/next/routes/oauth-authorization-server.js +5 -0
- package/dist/hosted/next/routes/oauth-authorization-server.js.map +1 -0
- package/dist/hosted/next/routes/oauth-authorize.d.ts +2 -0
- package/dist/hosted/next/routes/oauth-authorize.d.ts.map +1 -0
- package/dist/hosted/next/routes/oauth-authorize.js +6 -0
- package/dist/hosted/next/routes/oauth-authorize.js.map +1 -0
- package/dist/hosted/next/routes/oauth-protected-resource.d.ts +2 -0
- package/dist/hosted/next/routes/oauth-protected-resource.d.ts.map +1 -0
- package/dist/hosted/next/routes/oauth-protected-resource.js +5 -0
- package/dist/hosted/next/routes/oauth-protected-resource.js.map +1 -0
- package/dist/hosted/next/routes/oauth-register.d.ts +2 -0
- package/dist/hosted/next/routes/oauth-register.d.ts.map +1 -0
- package/dist/hosted/next/routes/oauth-register.js +6 -0
- package/dist/hosted/next/routes/oauth-register.js.map +1 -0
- package/dist/hosted/next/routes/oauth-token.d.ts +2 -0
- package/dist/hosted/next/routes/oauth-token.d.ts.map +1 -0
- package/dist/hosted/next/routes/oauth-token.js +6 -0
- package/dist/hosted/next/routes/oauth-token.js.map +1 -0
- package/dist/hosted/next/stage-site.d.ts +11 -0
- package/dist/hosted/next/stage-site.d.ts.map +1 -0
- package/dist/hosted/next/stage-site.js +49 -0
- package/dist/hosted/next/stage-site.js.map +1 -0
- package/dist/hosted/oauth/auth.d.ts +11 -0
- package/dist/hosted/oauth/auth.d.ts.map +1 -0
- package/dist/hosted/oauth/auth.js +41 -0
- package/dist/hosted/oauth/auth.js.map +1 -0
- package/dist/hosted/oauth/complete.d.ts +13 -0
- package/dist/hosted/oauth/complete.d.ts.map +1 -0
- package/dist/hosted/oauth/complete.js +40 -0
- package/dist/hosted/oauth/complete.js.map +1 -0
- package/dist/hosted/oauth/config.d.ts +7 -0
- package/dist/hosted/oauth/config.d.ts.map +1 -0
- package/dist/hosted/oauth/config.js +33 -0
- package/dist/hosted/oauth/config.js.map +1 -0
- package/dist/hosted/oauth/handlers.d.ts +18 -0
- package/dist/hosted/oauth/handlers.d.ts.map +1 -0
- package/dist/hosted/oauth/handlers.js +212 -0
- package/dist/hosted/oauth/handlers.js.map +1 -0
- package/dist/hosted/oauth/jwt.d.ts +9 -0
- package/dist/hosted/oauth/jwt.d.ts.map +1 -0
- package/dist/hosted/oauth/jwt.js +31 -0
- package/dist/hosted/oauth/jwt.js.map +1 -0
- package/dist/hosted/oauth/pkce.d.ts +3 -0
- package/dist/hosted/oauth/pkce.d.ts.map +1 -0
- package/dist/hosted/oauth/pkce.js +9 -0
- package/dist/hosted/oauth/pkce.js.map +1 -0
- package/dist/hosted/oauth/store.d.ts +35 -0
- package/dist/hosted/oauth/store.d.ts.map +1 -0
- package/dist/hosted/oauth/store.js +70 -0
- package/dist/hosted/oauth/store.js.map +1 -0
- package/dist/index/db.d.ts.map +1 -1
- package/dist/index/db.js +5 -1
- package/dist/index/db.js.map +1 -1
- package/dist/index/query.d.ts +4 -0
- package/dist/index/query.d.ts.map +1 -1
- package/dist/index/query.js +13 -2
- package/dist/index/query.js.map +1 -1
- package/dist/index/reference-lookup.d.ts.map +1 -1
- package/dist/index/reference-lookup.js +4 -0
- package/dist/index/reference-lookup.js.map +1 -1
- package/dist/index/schema.d.ts +5 -3
- package/dist/index/schema.d.ts.map +1 -1
- package/dist/index/schema.js +8 -3
- package/dist/index/schema.js.map +1 -1
- package/dist/index/sync.d.ts.map +1 -1
- package/dist/index/sync.js +5 -4
- package/dist/index/sync.js.map +1 -1
- package/dist/mcp/guide.js +5 -5
- package/dist/mcp/guide.js.map +1 -1
- package/dist/mcp/prompts/onboarding.js +1 -1
- 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 +10 -2
- package/dist/mcp/tools/cms-edit.js.map +1 -1
- package/dist/output/json.d.ts.map +1 -1
- package/dist/output/json.js +1 -0
- package/dist/output/json.js.map +1 -1
- package/dist/project/types.d.ts +0 -8
- package/dist/project/types.d.ts.map +1 -1
- package/dist/project/types.js +0 -8
- package/dist/project/types.js.map +1 -1
- package/docs/help/fields-article.md +14 -0
- package/docs/help/index-sync.md +1 -0
- package/docs/mcp/hosted-guide.md +29 -5
- package/package.json +34 -6
- package/skills/core/SKILL.md +7 -0
- package/skills/setup/SKILL.md +12 -15
- package/dist/commands/mcpb-pack.d.ts.map +0 -1
- package/dist/commands/mcpb-pack.js +0 -60
- package/dist/commands/mcpb-pack.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/project/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;iBAsB/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/project/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;iBAsB/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
package/dist/project/types.js
CHANGED
|
@@ -22,12 +22,4 @@ export const CmsEditProjectSchema = z.object({
|
|
|
22
22
|
mcpUrl: z.string().url(),
|
|
23
23
|
}),
|
|
24
24
|
});
|
|
25
|
-
export function toMcpbCustomerConfig(project) {
|
|
26
|
-
return {
|
|
27
|
-
projectKey: project.projectKey,
|
|
28
|
-
displayName: project.displayName,
|
|
29
|
-
mcpUrl: project.hosted.mcpUrl,
|
|
30
|
-
description: project.description,
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
25
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/project/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,KAAK,CAAC,cAAc,EAAE,wDAAwD,CAAC;IAClF,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC;QACnB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,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,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;QAChD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;KAClD,CAAC;IACF,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;QAChB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACzB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QACvC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QAChD,kFAAkF;QAClF,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;KAC3C,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;KACzB,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -31,6 +31,20 @@ This lists all article type entries with their IDs and slugs. Use the `sys.id` v
|
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
|
34
|
+
## Listing Recent Articles
|
|
35
|
+
|
|
36
|
+
Sort by publication `date` (matches the website), not `sys.updatedAt`:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
cms-edit list --type article --sort date -n 10
|
|
40
|
+
cms-edit search "keyword" --type article
|
|
41
|
+
cms-edit sitemap --include article --sort date
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
To find **draft** articles: `cms-edit sitemap --include article --status draft`, then `cms-edit peek --article-slug <slug>` or `cms-edit open --id <id>`. `peek` and `open` load draft content — only `list --published` is published-only.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
34
48
|
## Reading Article Fields
|
|
35
49
|
|
|
36
50
|
```bash
|
package/docs/help/index-sync.md
CHANGED
|
@@ -23,6 +23,7 @@ Each catalog row stores:
|
|
|
23
23
|
| `cmsLabel` | `cmsLabel` when present (page, article, pageVariant, tag, template) |
|
|
24
24
|
| `tagTypeSlug` | Parent tag type slug (tags only) |
|
|
25
25
|
| `articleTypeSlug` | Parent article type slug (articles only) |
|
|
26
|
+
| `date` | Publication date `YYYY-MM-DD` (articles only; schema v4) |
|
|
26
27
|
|
|
27
28
|
## When you need it
|
|
28
29
|
|
package/docs/mcp/hosted-guide.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# cms-edit MCP guide
|
|
2
2
|
|
|
3
|
-
Use this guide when editing Contentful draft content through Claude Desktop (hosted
|
|
3
|
+
Use this guide when editing Contentful draft content through Claude Desktop (hosted Integrations + OAuth) or local stdio MCP.
|
|
4
4
|
|
|
5
5
|
{{SITE_INTRO}}
|
|
6
6
|
|
|
@@ -148,7 +148,7 @@ Asset search and media-by-filename list **require** the index. Template/taxonomy
|
|
|
148
148
|
["search", "pricing"]
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
## Hosted
|
|
151
|
+
## Hosted connector rules
|
|
152
152
|
|
|
153
153
|
{{HOSTED_RULES}}
|
|
154
154
|
|
|
@@ -177,12 +177,36 @@ Asset search and media-by-filename list **require** the index. Template/taxonomy
|
|
|
177
177
|
|
|
178
178
|
| Problem | What to do |
|
|
179
179
|
|---------|------------|
|
|
180
|
-
| **401 /
|
|
181
|
-
| **No cms_edit tool** |
|
|
180
|
+
| **401 / connection failed** | Claude → Settings → Integrations → Connect again; complete Contentful sign-in |
|
|
181
|
+
| **No cms_edit tool** | Confirm the integration is connected under Settings → Integrations |
|
|
182
182
|
| **No active session** | Do not pass `--space` on hosted. Check `/api/health` — `redis` must be ok. MCP uses `_mcp` session automatically. Manual session: `["--session", "name", "open", "--page-slug", "/"]`. Fallback: `["read", "<entry-id>", "--id"]` |
|
|
183
|
-
| **Wrong space** |
|
|
183
|
+
| **Wrong space** | Your Contentful account must have access to this deployment's space |
|
|
184
184
|
| **Check version** | Call `cms_edit_version` or `curl /api/health` and read `cmsEdit` |
|
|
185
185
|
|
|
186
|
+
## Articles
|
|
187
|
+
|
|
188
|
+
**Recent articles** (by publication `date`, not last-updated):
|
|
189
|
+
|
|
190
|
+
```json
|
|
191
|
+
["list", "--type", "article", "--sort", "date", "-n", "10"]
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Alternatives: `["search", "<keyword>", "--type", "article"]` (also sorts by date), `["sitemap", "--include", "article", "--sort", "date"]`.
|
|
195
|
+
|
|
196
|
+
**Draft articles** — `peek` and `open` load drafts via CMA (not published-only). To discover drafts:
|
|
197
|
+
|
|
198
|
+
```json
|
|
199
|
+
["sitemap", "--include", "article", "--status", "draft"]
|
|
200
|
+
["search", "<title>", "--type", "article"]
|
|
201
|
+
["list", "--type", "article", "--slug", "<slug>"]
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Then open: `["peek", "--article-slug", "<slug>"]` or `["open", "--id", "<entry-id>"]`. Use `--article-slug`, not `--page-slug`.
|
|
205
|
+
|
|
206
|
+
**Published-only** is opt-in: `list --published` and `resolve --published` use the Delivery API index and omit never-published drafts.
|
|
207
|
+
|
|
208
|
+
After upgrading cms-edit, run `["index", "sync"]` once so the local index includes article `date` values (schema v4).
|
|
209
|
+
|
|
186
210
|
## Command reference (cms_edit args)
|
|
187
211
|
|
|
188
212
|
**Discovery:** `sitemap`, `list --type <type>`, `search <query>`, `schema <contentType>`, `index sync`, `index status`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@se-studio/contentful-cms",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
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",
|
|
@@ -22,6 +22,30 @@
|
|
|
22
22
|
"./hosted": {
|
|
23
23
|
"types": "./dist/hosted/index.d.ts",
|
|
24
24
|
"import": "./dist/hosted/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./hosted/next/*": {
|
|
27
|
+
"types": "./dist/hosted/next/*.d.ts",
|
|
28
|
+
"import": "./dist/hosted/next/*.js"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@upstash/redis": ">=1.38.0",
|
|
33
|
+
"next": ">=15.0.0",
|
|
34
|
+
"react": ">=19.0.0",
|
|
35
|
+
"react-dom": ">=19.0.0"
|
|
36
|
+
},
|
|
37
|
+
"peerDependenciesMeta": {
|
|
38
|
+
"@upstash/redis": {
|
|
39
|
+
"optional": false
|
|
40
|
+
},
|
|
41
|
+
"next": {
|
|
42
|
+
"optional": true
|
|
43
|
+
},
|
|
44
|
+
"react": {
|
|
45
|
+
"optional": true
|
|
46
|
+
},
|
|
47
|
+
"react-dom": {
|
|
48
|
+
"optional": true
|
|
25
49
|
}
|
|
26
50
|
},
|
|
27
51
|
"bin": {
|
|
@@ -45,14 +69,19 @@
|
|
|
45
69
|
"contentful": "^11.12.4",
|
|
46
70
|
"contentful-management": "^12.5.1",
|
|
47
71
|
"dotenv": "^17.4.2",
|
|
72
|
+
"jose": "^6.2.3",
|
|
48
73
|
"picocolors": "^1.1.1",
|
|
49
74
|
"zod": "^4.4.3"
|
|
50
75
|
},
|
|
51
76
|
"devDependencies": {
|
|
52
|
-
"@anthropic-ai/mcpb": "^2.1.2",
|
|
53
77
|
"@biomejs/biome": "^2.4.16",
|
|
54
|
-
"@types/node": "^24.13.
|
|
55
|
-
"
|
|
78
|
+
"@types/node": "^24.13.2",
|
|
79
|
+
"@types/react": "^19.2.17",
|
|
80
|
+
"@types/react-dom": "^19.2.3",
|
|
81
|
+
"@upstash/redis": "^1.38.0",
|
|
82
|
+
"next": "^15.5.19",
|
|
83
|
+
"react": "^19.2.7",
|
|
84
|
+
"react-dom": "^19.2.7",
|
|
56
85
|
"typescript": "^6.0.3",
|
|
57
86
|
"vitest": "^4.1.8"
|
|
58
87
|
},
|
|
@@ -72,11 +101,10 @@
|
|
|
72
101
|
"generate:embeds": "node scripts/generate-embedded-assets.mjs",
|
|
73
102
|
"sync:skills": "node scripts/sync-cms-edit-skills.mjs",
|
|
74
103
|
"build": "node scripts/generate-embedded-assets.mjs && node scripts/sync-cms-edit-skills.mjs && tsc --project tsconfig.build.json",
|
|
75
|
-
"build:mcpb-bridge": "esbuild mcpb/bridge/index.ts --bundle --platform=node --target=node20 --format=esm --packages=bundle --outfile=mcpb/.pack/bridge/index.js",
|
|
76
104
|
"dev": "node scripts/generate-embedded-assets.mjs && node scripts/sync-cms-edit-skills.mjs && tsc --project tsconfig.build.json --watch",
|
|
77
105
|
"type-check": "node scripts/generate-embedded-assets.mjs && tsc --noEmit",
|
|
78
106
|
"lint": "biome lint .",
|
|
79
|
-
"clean": "rm -rf dist src/generated .turbo *.tsbuildinfo
|
|
107
|
+
"clean": "rm -rf dist src/generated .turbo *.tsbuildinfo",
|
|
80
108
|
"test": "node scripts/generate-embedded-assets.mjs && node scripts/sync-cms-edit-skills.mjs && vitest run"
|
|
81
109
|
}
|
|
82
110
|
}
|
package/skills/core/SKILL.md
CHANGED
|
@@ -479,10 +479,16 @@ cms-edit types component
|
|
|
479
479
|
cms-edit types collection
|
|
480
480
|
|
|
481
481
|
# List entries with filters
|
|
482
|
+
cms-edit list --type article --sort date -n 10 # recent articles by publication date
|
|
482
483
|
cms-edit list --type article --has-download # articles with a download asset
|
|
483
484
|
cms-edit list --type article --slug my-article # article with a specific slug
|
|
484
485
|
cms-edit list --type article --has-field tags # articles where tags field is non-empty
|
|
485
486
|
|
|
487
|
+
# Find draft articles, then peek/open (both support drafts via CMA)
|
|
488
|
+
cms-edit sitemap --include article --status draft
|
|
489
|
+
cms-edit peek --article-slug resources/blog/my-post
|
|
490
|
+
# Only list --published / resolve --published are published-only
|
|
491
|
+
|
|
486
492
|
# Resolve any entry or asset by ID (no open session required)
|
|
487
493
|
cms-edit resolve --id 4xKj2abcDefGhijK # entry: shows type, title, slug, status
|
|
488
494
|
cms-edit resolve --id 7pQrStuvWxyzAbc # asset: shows title, fileName, URL
|
|
@@ -702,6 +708,7 @@ cms-edit sitemap # All pages, sorted by slug
|
|
|
702
708
|
cms-edit sitemap --prefix /blog # Filter by slug prefix
|
|
703
709
|
cms-edit sitemap --status draft # Draft pages only
|
|
704
710
|
cms-edit sitemap --sort updated # Most recently updated first
|
|
711
|
+
cms-edit sitemap --include article --sort date # Articles by publication date
|
|
705
712
|
cms-edit sitemap --tree # Tree rendering
|
|
706
713
|
cms-edit sitemap --include page,article # Include articles too
|
|
707
714
|
```
|
package/skills/setup/SKILL.md
CHANGED
|
@@ -11,35 +11,32 @@ Use this skill when the user wants to install or configure the `cms-edit` MCP se
|
|
|
11
11
|
|
|
12
12
|
| Path | When to use |
|
|
13
13
|
|------|-------------|
|
|
14
|
-
| **Hosted (
|
|
14
|
+
| **Hosted (Integrations)** | Content editor; SE sent an onboarding URL (e.g. `/cms-edit`); no Node.js |
|
|
15
15
|
| **Local (setup wizard)** | Developer; multi-space; or no hosted deployment |
|
|
16
16
|
|
|
17
17
|
Ask which applies if unclear.
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
## Hosted setup (
|
|
21
|
+
## Hosted setup (Claude Integrations + OAuth)
|
|
22
22
|
|
|
23
|
-
Use when
|
|
23
|
+
Use when SE sent an **onboarding link** (e.g. `https://your-site.content.se.studio/cms-edit`). Do **not** run the setup wizard.
|
|
24
24
|
|
|
25
|
-
### Step 1:
|
|
25
|
+
### Step 1: Connect to Claude
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
1. Open the link SE sent (or **Connect to Claude** on `/cms-edit`)
|
|
28
|
+
2. Confirm the connector in Claude Desktop or claude.ai
|
|
29
|
+
3. Sign in with **Contentful** when prompted (same account SE invited to the space)
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
1. Open [Claude Desktop](https://claude.ai/download)
|
|
32
|
-
2. **Settings → Extensions → Install Extension…** (or double-click the `.mcpb` file)
|
|
33
|
-
3. Paste the Contentful token when prompted
|
|
34
|
-
4. Fully quit and reopen Claude Desktop
|
|
31
|
+
Manual alternative: Claude → **Customize → Connectors** → Add custom connector → paste the MCP URL (`…/api/mcp`) → Connect.
|
|
35
32
|
|
|
36
33
|
Full editor guide: `packages/contentful-cms/HOSTED.md`
|
|
37
34
|
|
|
38
|
-
### Step
|
|
35
|
+
### Step 2: Verify
|
|
39
36
|
|
|
40
|
-
In Claude, ask to
|
|
37
|
+
In Claude, ask to read the cms-edit guide or verify the connection. If `cms_edit` returns content, setup is complete.
|
|
41
38
|
|
|
42
|
-
**
|
|
39
|
+
**Reconnect:** Settings → Integrations → Connect again if the connection stops working.
|
|
43
40
|
|
|
44
41
|
---
|
|
45
42
|
|
|
@@ -126,4 +123,4 @@ If it returns a page structure, setup is complete. If it errors, see Troubleshoo
|
|
|
126
123
|
It should contain an `mcpServers.cms-edit` entry. If missing, run the wizard again.
|
|
127
124
|
|
|
128
125
|
**Adding another space**
|
|
129
|
-
→ Run `npx @se-studio/contentful-cms@latest setup` again — it merges the new space into the existing config.
|
|
126
|
+
→ Run `npx @se-studio/contentful-cms@latest setup` again — it merges the new space into the existing config.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcpb-pack.d.ts","sourceRoot":"","sources":["../../src/commands/mcpb-pack.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAOvF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAuDjE"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/** biome-ignore-all lint/suspicious/noConsole: Console output is intentional in CLI */
|
|
2
|
-
import * as child_process from 'node:child_process';
|
|
3
|
-
import * as fs from 'node:fs';
|
|
4
|
-
import * as os from 'node:os';
|
|
5
|
-
import * as path from 'node:path';
|
|
6
|
-
import { fileURLToPath } from 'node:url';
|
|
7
|
-
import { isJsonMode } from '../output/mode.js';
|
|
8
|
-
import { loadProjectConfig } from '../project/load.js';
|
|
9
|
-
import { toMcpbCustomerConfig } from '../project/types.js';
|
|
10
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
11
|
-
const PACKAGE_ROOT = path.resolve(__dirname, '..', '..');
|
|
12
|
-
const MCPB_DIR = path.join(PACKAGE_ROOT, 'mcpb');
|
|
13
|
-
const BUILD_SCRIPT = path.resolve(PACKAGE_ROOT, '..', '..', 'scripts', 'build-cms-edit-mcpb.sh');
|
|
14
|
-
export function registerMcpbPackCommand(program) {
|
|
15
|
-
const cmd = program.command('mcpb').description('Build Claude Desktop cms-edit extensions');
|
|
16
|
-
cmd
|
|
17
|
-
.command('pack')
|
|
18
|
-
.description('Build a .mcpb extension from cms-edit/<site>/project.json')
|
|
19
|
-
.requiredOption('--project-config <path>', 'Path to cms-edit/<site>/project.json')
|
|
20
|
-
.option('--output <path>', 'Output .mcpb path')
|
|
21
|
-
.action((opts) => {
|
|
22
|
-
const project = loadProjectConfig(opts.projectConfig);
|
|
23
|
-
const customer = toMcpbCustomerConfig(project);
|
|
24
|
-
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'cms-edit-mcpb-'));
|
|
25
|
-
const tempConfig = path.join(tempDir, `${project.projectKey}.json`);
|
|
26
|
-
fs.writeFileSync(tempConfig, `${JSON.stringify(customer, null, 2)}\n`);
|
|
27
|
-
try {
|
|
28
|
-
if (!fs.existsSync(BUILD_SCRIPT)) {
|
|
29
|
-
throw new Error(`mcpb build script not found: ${BUILD_SCRIPT}`);
|
|
30
|
-
}
|
|
31
|
-
const args = ['--config', tempConfig];
|
|
32
|
-
if (opts.output) {
|
|
33
|
-
args.push('--output', path.resolve(opts.output));
|
|
34
|
-
}
|
|
35
|
-
const result = child_process.spawnSync('bash', [BUILD_SCRIPT, ...args], {
|
|
36
|
-
cwd: path.resolve(PACKAGE_ROOT, '..', '..'),
|
|
37
|
-
stdio: 'inherit',
|
|
38
|
-
env: {
|
|
39
|
-
...process.env,
|
|
40
|
-
CMS_EDIT_CUSTOMER_CONFIG: tempConfig,
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
if (result.status !== 0) {
|
|
44
|
-
throw new Error('mcpb pack failed');
|
|
45
|
-
}
|
|
46
|
-
const defaultOutput = path.join(MCPB_DIR, 'dist', `cms-edit-${project.projectKey}.mcpb`);
|
|
47
|
-
const outputPath = opts.output ? path.resolve(opts.output) : defaultOutput;
|
|
48
|
-
if (isJsonMode()) {
|
|
49
|
-
console.log(JSON.stringify({ ok: true, output: outputPath, projectKey: project.projectKey }));
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
console.log(`Built extension: ${outputPath}`);
|
|
53
|
-
}
|
|
54
|
-
finally {
|
|
55
|
-
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
return cmd;
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=mcpb-pack.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcpb-pack.js","sourceRoot":"","sources":["../../src/commands/mcpb-pack.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAEvF,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,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