@se-studio/contentful-cms 2.0.4 → 2.1.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 +11 -0
- package/HOSTED.md +18 -0
- package/dist/commands/create-from-json.d.ts.map +1 -1
- package/dist/commands/create-from-json.js +10 -4
- package/dist/commands/create-from-json.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +46 -5
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/project.d.ts.map +1 -1
- package/dist/commands/project.js +3 -1
- package/dist/commands/project.js.map +1 -1
- package/dist/contentful/article-type-resolve.d.ts +11 -0
- package/dist/contentful/article-type-resolve.d.ts.map +1 -0
- package/dist/contentful/article-type-resolve.js +35 -0
- package/dist/contentful/article-type-resolve.js.map +1 -0
- package/dist/contentful/entry-fields.d.ts +2 -0
- package/dist/contentful/entry-fields.d.ts.map +1 -1
- package/dist/contentful/entry-fields.js +33 -2
- package/dist/contentful/entry-fields.js.map +1 -1
- package/dist/contentful/featured-image-defaults.d.ts +16 -0
- package/dist/contentful/featured-image-defaults.d.ts.map +1 -0
- package/dist/contentful/featured-image-defaults.js +117 -0
- package/dist/contentful/featured-image-defaults.js.map +1 -0
- package/dist/editor-pack/generate.d.ts.map +1 -1
- package/dist/editor-pack/generate.js +80 -8
- package/dist/editor-pack/generate.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/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/stage-site.d.ts.map +1 -1
- package/dist/hosted/next/stage-site.js +6 -5
- package/dist/hosted/next/stage-site.js.map +1 -1
- package/dist/mcp/guide.d.ts +2 -2
- package/dist/mcp/guide.d.ts.map +1 -1
- package/dist/mcp/guide.js +3 -0
- package/dist/mcp/guide.js.map +1 -1
- package/dist/mcp/prompts/onboarding.d.ts.map +1 -1
- package/dist/mcp/prompts/onboarding.js +95 -0
- package/dist/mcp/prompts/onboarding.js.map +1 -1
- package/dist/mcp/resources/customer.d.ts.map +1 -1
- package/dist/mcp/resources/customer.js +3 -0
- package/dist/mcp/resources/customer.js.map +1 -1
- package/dist/project/types.d.ts +13 -0
- package/dist/project/types.d.ts.map +1 -1
- package/dist/project/types.js +13 -0
- package/dist/project/types.js.map +1 -1
- package/dist/project/validate-hosted.d.ts +7 -0
- package/dist/project/validate-hosted.d.ts.map +1 -0
- package/dist/project/validate-hosted.js +12 -0
- package/dist/project/validate-hosted.js.map +1 -0
- package/docs/help/create-from-json.md +3 -3
- package/docs/help/fields-article.md +7 -4
- package/docs/mcp/hosted-guide.md +54 -2
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SpaceConfig } from '../config/types.js';
|
|
2
|
+
import type { EditorDefaultsConfig } from '../project/types.js';
|
|
3
|
+
import type { SafeEnvironment } from './client.js';
|
|
4
|
+
export type FeaturedImageSource = 'explicit' | 'articleType' | 'siteDefault' | 'none';
|
|
5
|
+
export interface FeaturedImageResolution {
|
|
6
|
+
assetId?: string;
|
|
7
|
+
source: FeaturedImageSource;
|
|
8
|
+
message?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function loadEditorDefaultsFromPack(): EditorDefaultsConfig | null;
|
|
11
|
+
export declare function loadEditorDefaultsFromProject(): EditorDefaultsConfig | null;
|
|
12
|
+
export declare function getEditorDefaults(): EditorDefaultsConfig | null;
|
|
13
|
+
export declare function getArticleTypeFeaturedImageAssetId(env: SafeEnvironment, articleTypeId: string, locale: string): Promise<string | undefined>;
|
|
14
|
+
export declare function resolveSiteDefaultFeaturedImageAssetId(space: SpaceConfig, defaults: EditorDefaultsConfig): Promise<string | undefined>;
|
|
15
|
+
export declare function resolveArticleFeaturedImageFallback(env: SafeEnvironment, space: SpaceConfig, locale: string, articleTypeId: string | undefined, hasExplicitFeatured: boolean): Promise<FeaturedImageResolution>;
|
|
16
|
+
//# sourceMappingURL=featured-image-defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"featured-image-defaults.d.ts","sourceRoot":"","sources":["../../src/contentful/featured-image-defaults.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,aAAa,GAAG,aAAa,GAAG,MAAM,CAAC;AAEtF,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAsBD,wBAAgB,0BAA0B,IAAI,oBAAoB,GAAG,IAAI,CAmBxE;AAED,wBAAgB,6BAA6B,IAAI,oBAAoB,GAAG,IAAI,CAiB3E;AAED,wBAAgB,iBAAiB,IAAI,oBAAoB,GAAG,IAAI,CAE/D;AAED,wBAAsB,kCAAkC,CACtD,GAAG,EAAE,eAAe,EACpB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAqB7B;AAED,wBAAsB,sCAAsC,CAC1D,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,oBAAoB,GAC7B,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAY7B;AAED,wBAAsB,mCAAmC,CACvD,GAAG,EAAE,eAAe,EACpB,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,mBAAmB,EAAE,OAAO,GAC3B,OAAO,CAAC,uBAAuB,CAAC,CAiClC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { resolveEditorPackPath } from '../editor-pack/load.js';
|
|
4
|
+
import { loadProjectConfig } from '../project/load.js';
|
|
5
|
+
import { resolveAssetIdFromFilename } from './asset-link-from-json.js';
|
|
6
|
+
function normalizeDefaultsConfig(raw) {
|
|
7
|
+
if ('featuredImageAssetFilename' in raw || 'featuredImageAssetId' in raw) {
|
|
8
|
+
return {
|
|
9
|
+
featuredImageAssetFilename: raw.featuredImageAssetFilename,
|
|
10
|
+
featuredImageAssetId: raw.featuredImageAssetId,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
const nested = raw.featuredImage ?? raw.defaults;
|
|
14
|
+
return nested ?? {};
|
|
15
|
+
}
|
|
16
|
+
export function loadEditorDefaultsFromPack() {
|
|
17
|
+
const packPath = resolveEditorPackPath();
|
|
18
|
+
if (!packPath) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
const jsonPath = path.join(packPath, 'defaults.json');
|
|
22
|
+
if (!fs.existsSync(jsonPath)) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
const parsed = JSON.parse(fs.readFileSync(jsonPath, 'utf8'));
|
|
27
|
+
const config = normalizeDefaultsConfig(parsed);
|
|
28
|
+
if (!config.featuredImageAssetFilename && !config.featuredImageAssetId) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
return config;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export function loadEditorDefaultsFromProject() {
|
|
38
|
+
const configPath = process.env['CMS_EDIT_PROJECT_CONFIG'];
|
|
39
|
+
if (configPath && fs.existsSync(configPath)) {
|
|
40
|
+
const project = loadProjectConfig(configPath);
|
|
41
|
+
return project.editor?.defaults ?? null;
|
|
42
|
+
}
|
|
43
|
+
const packPath = resolveEditorPackPath();
|
|
44
|
+
if (packPath) {
|
|
45
|
+
const sibling = path.join(path.dirname(packPath), 'project.json');
|
|
46
|
+
if (fs.existsSync(sibling)) {
|
|
47
|
+
const project = loadProjectConfig(sibling);
|
|
48
|
+
return project.editor?.defaults ?? null;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
export function getEditorDefaults() {
|
|
54
|
+
return loadEditorDefaultsFromPack() ?? loadEditorDefaultsFromProject();
|
|
55
|
+
}
|
|
56
|
+
export async function getArticleTypeFeaturedImageAssetId(env, articleTypeId, locale) {
|
|
57
|
+
try {
|
|
58
|
+
const entry = await env.getEntry(articleTypeId);
|
|
59
|
+
const featuredImageField = entry.fields['featuredImage'];
|
|
60
|
+
if (!featuredImageField || typeof featuredImageField !== 'object') {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
const localized = featuredImageField[locale] ??
|
|
64
|
+
featuredImageField['en-US'] ??
|
|
65
|
+
Object.values(featuredImageField)[0];
|
|
66
|
+
if (localized && typeof localized === 'object' && 'sys' in localized) {
|
|
67
|
+
const id = localized.sys?.id;
|
|
68
|
+
if (id) {
|
|
69
|
+
return id;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
export async function resolveSiteDefaultFeaturedImageAssetId(space, defaults) {
|
|
79
|
+
if (defaults.featuredImageAssetId) {
|
|
80
|
+
return defaults.featuredImageAssetId;
|
|
81
|
+
}
|
|
82
|
+
if (defaults.featuredImageAssetFilename) {
|
|
83
|
+
return resolveAssetIdFromFilename(space, defaults.featuredImageAssetFilename, 'site default featuredImage');
|
|
84
|
+
}
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
export async function resolveArticleFeaturedImageFallback(env, space, locale, articleTypeId, hasExplicitFeatured) {
|
|
88
|
+
if (hasExplicitFeatured) {
|
|
89
|
+
return { source: 'explicit' };
|
|
90
|
+
}
|
|
91
|
+
if (articleTypeId) {
|
|
92
|
+
const assetId = await getArticleTypeFeaturedImageAssetId(env, articleTypeId, locale);
|
|
93
|
+
if (assetId) {
|
|
94
|
+
return {
|
|
95
|
+
assetId,
|
|
96
|
+
source: 'articleType',
|
|
97
|
+
message: `Featured image inherited from articleType (${articleTypeId})`,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const defaults = getEditorDefaults();
|
|
102
|
+
if (defaults) {
|
|
103
|
+
const assetId = await resolveSiteDefaultFeaturedImageAssetId(space, defaults);
|
|
104
|
+
if (assetId) {
|
|
105
|
+
return {
|
|
106
|
+
assetId,
|
|
107
|
+
source: 'siteDefault',
|
|
108
|
+
message: 'Featured image set from site default (editor.defaults)',
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
source: 'none',
|
|
114
|
+
message: 'No featured image set (optional — articleType or site default may apply on the live site)',
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=featured-image-defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"featured-image-defaults.js","sourceRoot":"","sources":["../../src/contentful/featured-image-defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CA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CAAC;YACZ,OAAO;gBACL,OAAO;gBACP,MAAM,EAAE,aAAa;gBACrB,OAAO,EAAE,wDAAwD;aAClE,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO;QACL,MAAM,EAAE,MAAM;QACd,OAAO,EACL,2FAA2F;KAC9F,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/editor-pack/generate.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/editor-pack/generate.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAwB,MAAM,qBAAqB,CAAC;AAKhF,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAgND,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,wBAAwB,CAwG/F"}
|
|
@@ -84,7 +84,58 @@ function parseTheme(appDir) {
|
|
|
84
84
|
return null;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function buildDefaultsMarkdown(project) {
|
|
88
|
+
const defaults = project.editor?.defaults;
|
|
89
|
+
if (!defaults?.featuredImageAssetFilename && !defaults?.featuredImageAssetId) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
const lines = [
|
|
93
|
+
'# Site defaults',
|
|
94
|
+
'',
|
|
95
|
+
'Rules for featured images, article types, and when to use Contentful UI vs Claude.',
|
|
96
|
+
'',
|
|
97
|
+
'## Contentful UI — publish and assets only',
|
|
98
|
+
'',
|
|
99
|
+
'Marketing editors should use **Claude + cms-edit** for all copy and structure changes.',
|
|
100
|
+
'Open Contentful only to:',
|
|
101
|
+
'',
|
|
102
|
+
'- **Publish** drafts after review (cms-edit cannot publish)',
|
|
103
|
+
'- **Upload** new images and files to the asset library',
|
|
104
|
+
'',
|
|
105
|
+
'Do not edit page or article copy directly in Contentful.',
|
|
106
|
+
'',
|
|
107
|
+
'## Article types (required)',
|
|
108
|
+
'',
|
|
109
|
+
'Every article must link to an **articleType** entry. Before creating an article:',
|
|
110
|
+
'',
|
|
111
|
+
'1. Run `cms-edit index sync` (if the catalog may be stale)',
|
|
112
|
+
'2. Run `cms-edit list --type articleType` — pick the correct type by name or slug',
|
|
113
|
+
'3. Use `--article-type-slug` or `articleTypeSlug` in JSON (preferred for marketers)',
|
|
114
|
+
'',
|
|
115
|
+
'## Featured images — decision tree',
|
|
116
|
+
'',
|
|
117
|
+
'When creating or updating an article:',
|
|
118
|
+
'',
|
|
119
|
+
'1. **Custom image** — set `featuredImage` or `featuredImageAssetFilename` on the article when the marketer provides a specific image',
|
|
120
|
+
'2. **Article type default** — if omitted, cms-edit inherits the linked **articleType** `featuredImage`',
|
|
121
|
+
'3. **Site default** — if the article type has no image, use the site default below',
|
|
122
|
+
'',
|
|
123
|
+
'## Site default featured image',
|
|
124
|
+
'',
|
|
125
|
+
];
|
|
126
|
+
if (defaults.featuredImageAssetFilename) {
|
|
127
|
+
lines.push(`- **Asset filename:** \`${defaults.featuredImageAssetFilename}\``, '- Resolve after `cms-edit index sync` with `featuredImageAssetFilename` in create-from-json');
|
|
128
|
+
}
|
|
129
|
+
if (defaults.featuredImageAssetId) {
|
|
130
|
+
lines.push(`- **Asset ID:** \`${defaults.featuredImageAssetId}\``);
|
|
131
|
+
}
|
|
132
|
+
lines.push('', '## Pages', '', 'Page `featuredImage` is optional (social sharing). No automatic fallback.');
|
|
133
|
+
return `${lines.join('\n')}\n`;
|
|
134
|
+
}
|
|
135
|
+
function buildDefaultsJson(defaults) {
|
|
136
|
+
return `${JSON.stringify({ featuredImage: defaults }, null, 2)}\n`;
|
|
137
|
+
}
|
|
138
|
+
function buildOverviewMarkdown(project, options) {
|
|
88
139
|
const lines = [
|
|
89
140
|
`# ${project.displayName}`,
|
|
90
141
|
'',
|
|
@@ -99,13 +150,26 @@ function buildOverviewMarkdown(project, constants) {
|
|
|
99
150
|
if (project.website.devBaseUrl) {
|
|
100
151
|
lines.push(`- **Staging URL:** ${project.website.devBaseUrl}`);
|
|
101
152
|
}
|
|
102
|
-
if (
|
|
103
|
-
lines.push(`- **Customer name:** ${
|
|
153
|
+
if (project.website.customerName) {
|
|
154
|
+
lines.push(`- **Customer name:** ${project.website.customerName}`);
|
|
155
|
+
}
|
|
156
|
+
if (project.website.siteTitle) {
|
|
157
|
+
lines.push(`- **Site title:** ${project.website.siteTitle}`);
|
|
158
|
+
}
|
|
159
|
+
const beforeSteps = [
|
|
160
|
+
'1. Read `cms-edit://customer/routing` for URL rules.',
|
|
161
|
+
'2. Read `cms-edit://customer/components-index` to pick component types.',
|
|
162
|
+
];
|
|
163
|
+
if (options.hasDefaults) {
|
|
164
|
+
beforeSteps.push('3. Read `cms-edit://customer/defaults` for featured image rules and Contentful UI scope.');
|
|
104
165
|
}
|
|
105
|
-
if (
|
|
106
|
-
|
|
166
|
+
if (options.hasArticles) {
|
|
167
|
+
beforeSteps.push(`${String(beforeSteps.length + 1)}. Read \`cms-edit://customer/articles\` for article/publication playbook.`);
|
|
107
168
|
}
|
|
108
|
-
|
|
169
|
+
beforeSteps.push(`${String(beforeSteps.length + 1)}. Read \`cms-edit://customer/brand\` when writing copy (if available).`);
|
|
170
|
+
beforeSteps.push(`${String(beforeSteps.length + 1)}. Use \`cms_edit\` with \`create from-json --dry-run --strict\` before saving new pages or articles.`);
|
|
171
|
+
lines.push('', '## Before editing', '', ...beforeSteps, '');
|
|
172
|
+
lines.push('## Contentful UI — publish and assets only', '', 'Use Claude for drafting. Open Contentful only to **publish** approved drafts and **upload** assets.', '', '## Publish handoff', '', 'All `save` operations create **drafts only**. A human must **publish in Contentful** for changes to go live.', '');
|
|
109
173
|
return `${lines.join('\n')}\n`;
|
|
110
174
|
}
|
|
111
175
|
export function generateEditorPack(options) {
|
|
@@ -124,9 +188,18 @@ export function generateEditorPack(options) {
|
|
|
124
188
|
'collections-index',
|
|
125
189
|
'externals-index',
|
|
126
190
|
];
|
|
127
|
-
|
|
191
|
+
const articles = findArticlesPlaybook(repoRoot, project.projectKey);
|
|
192
|
+
const defaultsMd = buildDefaultsMarkdown(project);
|
|
193
|
+
const hasDefaults = defaultsMd !== null;
|
|
194
|
+
const hasArticles = articles !== null;
|
|
195
|
+
fs.writeFileSync(path.join(outDir, 'overview.md'), buildOverviewMarkdown(project, { hasDefaults, hasArticles }));
|
|
128
196
|
const homepageSlug = project.website.homepageSlug ?? constants.homepageSlug ?? 'index';
|
|
129
197
|
fs.writeFileSync(path.join(outDir, 'routing.md'), buildRoutingMarkdown(constants, homepageSlug));
|
|
198
|
+
if (defaultsMd && project.editor?.defaults) {
|
|
199
|
+
fs.writeFileSync(path.join(outDir, 'defaults.md'), defaultsMd);
|
|
200
|
+
fs.writeFileSync(path.join(outDir, 'defaults.json'), buildDefaultsJson(project.editor.defaults));
|
|
201
|
+
resources.push('defaults');
|
|
202
|
+
}
|
|
130
203
|
const brand = buildBrandMarkdown(findSiteContext(repoRoot));
|
|
131
204
|
if (brand) {
|
|
132
205
|
fs.writeFileSync(path.join(outDir, 'brand.md'), brand);
|
|
@@ -138,7 +211,6 @@ export function generateEditorPack(options) {
|
|
|
138
211
|
fs.writeFileSync(path.join(outDir, 'components-index.json'), `${JSON.stringify(components, null, 2)}\n`);
|
|
139
212
|
fs.writeFileSync(path.join(outDir, 'collections-index.json'), `${JSON.stringify(collections, null, 2)}\n`);
|
|
140
213
|
fs.writeFileSync(path.join(outDir, 'externals-index.json'), `${JSON.stringify(externals, null, 2)}\n`);
|
|
141
|
-
const articles = findArticlesPlaybook(repoRoot, project.projectKey);
|
|
142
214
|
if (articles) {
|
|
143
215
|
fs.writeFileSync(path.join(outDir, 'articles.md'), articles);
|
|
144
216
|
resources.push('articles');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/editor-pack/generate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE3E,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAS9D,SAAS,eAAe,CAAC,QAAgB;IACvC,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;IAC5D,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,CAA4B,CAAC;IACnF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,kBAAkB,CAAC,WAA2C;IACrE,IAAI,CAAC,WAAW;QAAE,OAAO,IAAI,CAAC;IAE9B,MAAM,KAAK,GAAG,CAAC,iBAAiB,EAAE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G,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,QAAQ,GAAuB;QACnC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,WAAW,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACrC,SAAS,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE;KAC1C,CAAC;IACF,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IAE/F,MAAM,OAAO,GAAG;QACd,6BAA6B,OAAO,CAAC,WAAW,EAAE;QAClD,aAAa,MAAM,EAAE;QACrB,iBAAiB,UAAU,CAAC,MAAM,EAAE;QACpC,kBAAkB,WAAW,CAAC,MAAM,EAAE;QACtC,gBAAgB,SAAS,CAAC,MAAM,EAAE;QAClC,sBAAsB,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,EAAE;KAC9E,CAAC;IAEF,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AACvC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const HOSTED_GUIDE_TEMPLATE = "# cms-edit MCP guide\n\nUse this guide when editing Contentful draft content through Claude Desktop (hosted Integrations + OAuth) or local stdio MCP.\n\n{{SITE_INTRO}}\n\n## Safety rules\n\ncms-edit **cannot and will not**:\n\n- Publish or unpublish entries\n- Archive or delete published entries\n- Upload new assets (use Contentful UI for assets)\n\nAll `save` operations create **drafts only**. A human must review and publish in Contentful.\n\n## MCP tools\n\n| Tool | Purpose |\n|------|---------|\n| `cms_edit` | Run any cms-edit command via an `args` array |\n| `cms_edit_version` | Check the installed cms-edit version (no session required) |\n| `cms_edit_help` | Read this guide by topic (`overview`, `workflow`, `commands`, `troubleshooting`, `hosted`) |\n\n## Customer editor pack (read first)\n\nWhen a site editor pack is deployed, these MCP resources provide **site-specific** context. Read them before creating or editing content:\n\n| Resource | Purpose |\n|----------|---------|\n| `cms-edit://customer/index` | List of all customer resources |\n| `cms-edit://customer/overview` | Site name, space, staging URL, handoff rules |\n| `cms-edit://customer/routing` | Article/tag URL rules for this site |\n| `cms-edit://customer/components-index` | Component types and when to use each |\n| `cms-edit://customer/collections-index` | Collection types |\n| `cms-edit://customer/brand` | Brand voice and terminology (if configured) |\n| `cms-edit://customer/articles` | Article/publication playbook (if configured) |\n\n**Workflow:** read `cms-edit://customer/index` \u2192 `overview` \u2192 `routing` \u2192 `components-index` \u2192 then use `cms_edit` commands.\n\n## MCP prompts\n\n| Prompt | Purpose |\n|--------|---------|\n| `cms_edit_verify` | Check version and connectivity |\n| `cms_edit_explore` | List site content and open a page |\n| `cms_edit_edit_page` | Edit a page through diff \u2192 save |\n| `cms_edit_index_sync` | Build/refresh local index (assets, media, templates, taxonomy) |\n| `cms_edit_create_page` | Create a page with template selection |\n| `cms_edit_create_from_doc` | Create a page from a freeform document (infer \u2192 confirm \u2192 dry-run) |\n| `cms_edit_taxonomy` | Import or ensure taxonomy entries |\n\nRead the full guide anytime via the `cms-edit://guide` resource or `cms_edit_help`.\n\n## Core workflow\n\nStandard editing flow: **open \u2192 snapshot \u2192 read \u2192 set/rtf \u2192 diff \u2192 save**\n\nEach step is a separate `cms_edit` call. Sessions persist in Redis between calls (hosted) or on disk (local). MCP auto-uses session `_mcp`.\n\n### 1. Open a page\n\n```\n[\"open\", \"--page-slug\", \"/\"]\n[\"open\", \"--page-slug\", \"/pricing\"]\n[\"open\", \"--id\", \"<entry-id>\"]\n```\n\n**Homepage (all SE Studio sites):** Contentful stores the marketing homepage slug as `index`. The live site URL is `/`. In cms-edit, `--page-slug /` and `--page-slug /index` are equivalent (both resolve to `index`). `sitemap` displays this page as `/index` \u2014 that is formatting, not a different slug. Read `cms-edit://customer/routing` for site-specific exceptions (e.g. Pedestal uses `home`).\n\n### 2. Snapshot \u2014 see the content tree\n\n```\n[\"snapshot\"]\n```\n\nOutput shows `@c0`, `@c1`, \u2026 refs for each component. Use these refs in `read`, `set`, and `rtf`.\n\n### 3. Read fields\n\n```\n[\"read\", \"@c1\"]\n[\"read\", \"@c1\", \"heading\"]\n```\n\n### 4. Edit fields\n\n```\n[\"set\", \"@c1\", \"heading\", \"New heading text\"]\n[\"rtf\", \"@c1\", \"body\", \"--content\", \"# Title\\n\\nParagraph text.\"]\n```\n\nFor rich text, prefer `--content` with inline markdown. Use `--base64` when special characters cause issues.\n\n### 5. Review and save\n\n```\n[\"diff\"]\n[\"save\"]\n```\n\nAlways run `diff` before `save`. To abandon changes: `[\"discard\"]`.\n\n## Common sequences\n\n### List all pages\n\n```\n[\"sitemap\"]\n```\n\n### Refresh local index (assets, media, templates, taxonomy)\n\nRun before asset filename search, media-by-filename list, or fast template/taxonomy lookup:\n\n```\n[\"index\", \"sync\"]\n[\"index\", \"status\"]\n[\"list\", \"--type\", \"template\"]\n```\n\nAsset search and media-by-filename list **require** the index. Template/taxonomy list prefers the index when built.\n\n### Explore the homepage\n\n```\n[\"open\", \"--page-slug\", \"/\"]\n[\"snapshot\"]\n[\"read\", \"@c1\"]\n```\n\n### Edit copy on a page\n\n```\n[\"open\", \"--page-slug\", \"{{EXAMPLE_SLUG}}\"]\n[\"snapshot\"]\n[\"read\", \"@c1\", \"heading\"]\n[\"set\", \"@c1\", \"heading\", \"Updated heading\"]\n[\"diff\"]\n[\"save\"]\n```\n\n## Field discovery\n\n```\n[\"schema\", \"component\"]\n[\"list\", \"--type\", \"page\"]\n[\"search\", \"pricing\"]\n```\n\n## Hosted connector rules\n\n{{HOSTED_RULES}}\n\n## Session tips\n\n- After `open`, subsequent MCP commands share session `_mcp` automatically (stored in Redis on hosted).\n- Use `--session <name>` only when juggling multiple pages \u2014 pass it **before** the subcommand on every call: `[\"--session\", \"my-work\", \"open\", \"--page-slug\", \"/\"]`.\n- Snapshot JSON includes `sessionName` and `sessionKey` for debugging.\n- If you see \"No active session\", check `/api/health` (Redis must be ok), then run `open` again. Set `LOG_CMS_SESSION=1` on Vercel and search runtime logs for `[cms-edit:session]` (`redis save ok` / `redis load hit` / `requireSession miss`).\n\n### peek vs open vs read\n\n| Goal | MCP args |\n|------|----------|\n| Edit workflow (session) | `[\"open\", \"--page-slug\", \"/\"]` then `[\"read\", \"@c0\"]` |\n| Preview tree + fields, no session | `[\"peek\", \"--page-slug\", \"/pricing\"]` or `[\"peek\", \"--id\", \"<entry-id>\"]` (JSON includes `rootFields`) |\n| Read fields by entry ID, no session | `[\"read\", \"<entry-id>\", \"--id\"]` or `[\"read\", \"<entry-id>\", \"--id\", \"heading\"]` |\n| Debug session persistence | `[\"diagnose\"]` \u2014 reports store, userId, active session key |\n\n- **`peek` is one-shot** \u2014 prints tree and **root field values** (`rootFields` in JSON). No session is created; do not chain `read @ref` afterward.\n- **Use flat lookup flags** for `open` and `peek` \u2014 same as CLI (`--page-slug`, `--id`, etc.). See `help lookup`.\n- **`read @root`** only works after `open` (uses the active session). The hint in peek output is for terminal users who already ran `open`.\n- **Do not invent flags** \u2014 there is no `--read`, `--then`, or chained peek+read syntax. One command per `cms_edit` call.\n\n## Troubleshooting\n\n| Problem | What to do |\n|---------|------------|\n| **401 / connection failed** | Claude \u2192 Settings \u2192 Integrations \u2192 Connect again; complete Contentful sign-in. On Vercel, search runtime logs for `[cms-edit:oauth] auth_failure` (always logged). Set `LOG_CMS_OAUTH=1` for connect success traces. |\n| **No cms_edit tool** | Confirm the integration is connected under Settings \u2192 Integrations |\n| **No active session** | Do not pass `--space` on hosted. Check `/api/health` \u2014 `redis` must be ok. MCP uses `_mcp` session automatically. Manual session: `[\"--session\", \"name\", \"open\", \"--page-slug\", \"/\"]`. Fallback: `[\"read\", \"<entry-id>\", \"--id\"]` |\n| **Wrong space** | Your Contentful account must have access to this deployment's space |\n| **Check version** | Call `cms_edit_version` or `curl /api/health` and read `cmsEdit` |\n\n## Articles\n\n**Recent articles** (by publication `date`, not last-updated):\n\n```json\n[\"list\", \"--type\", \"article\", \"--sort\", \"date\", \"-n\", \"10\"]\n```\n\nAlternatives: `[\"search\", \"<keyword>\", \"--type\", \"article\"]` (also sorts by date), `[\"sitemap\", \"--include\", \"article\", \"--sort\", \"date\"]`.\n\n**Draft articles** \u2014 `peek` and `open` load drafts via CMA (not published-only). To discover drafts:\n\n```json\n[\"sitemap\", \"--include\", \"article\", \"--status\", \"draft\"]\n[\"search\", \"<title>\", \"--type\", \"article\"]\n[\"list\", \"--type\", \"article\", \"--slug\", \"<slug>\"]\n```\n\nThen open: `[\"peek\", \"--article-slug\", \"<slug>\"]` or `[\"open\", \"--id\", \"<entry-id>\"]`. Use `--article-slug`, not `--page-slug`.\n\n**Published-only** is opt-in: `list --published` and `resolve --published` use the Delivery API index and omit never-published drafts.\n\nAfter upgrading cms-edit, run `[\"index\", \"sync\"]` once so the local index includes article `date` values (schema v4).\n\n## Command reference (cms_edit args)\n\n**Discovery:** `sitemap`, `list --type <type>`, `search <query>`, `schema <contentType>`, `index sync`, `index status`\n\n**Reading:** `open --page-slug <slug>`, `open --id <id>`, `peek --page-slug <slug>`, `peek --id <id>`, `snapshot`, `read <ref>`, `read <ref> <field>`, `read <id> --id [field]`\n\n**Diagnostics:** `diagnose` \u2014 session store, userId, active session (after open/read issues)\n\n**Editing:** `set <ref> <field> <value>`, `rtf <ref> <field> --content \"<md>\"`, `diff`, `save`, `discard`\n\n**Creating:** `create page --slug \u2026 --title \u2026`, `add <type> --content-type \u2026 --parent @c0 --target content`\n\n**Other:** `health`, `version`, `guide [topic]`\n";
|
|
1
|
+
export declare const HOSTED_GUIDE_TEMPLATE = "# cms-edit MCP guide\n\nUse this guide when editing Contentful draft content through Claude Desktop (hosted Integrations + OAuth) or local stdio MCP.\n\n{{SITE_INTRO}}\n\n## Safety rules\n\ncms-edit **cannot and will not**:\n\n- Publish or unpublish entries\n- Archive or delete published entries\n- Upload new assets (use Contentful UI for assets)\n\nAll `save` operations create **drafts only**. A human must review and publish in Contentful.\n\n## MCP tools\n\n| Tool | Purpose |\n|------|---------|\n| `cms_edit` | Run any cms-edit command via an `args` array |\n| `cms_edit_version` | Check the installed cms-edit version (no session required) |\n| `cms_edit_help` | Read this guide by topic (`overview`, `workflow`, `commands`, `troubleshooting`, `hosted`) |\n\n## Customer editor pack (read first)\n\nWhen a site editor pack is deployed, these MCP resources provide **site-specific** context. Read them before creating or editing content:\n\n| Resource | Purpose |\n|----------|---------|\n| `cms-edit://customer/index` | List of all customer resources |\n| `cms-edit://customer/overview` | Site name, space, staging URL, handoff rules |\n| `cms-edit://customer/routing` | Article/tag URL rules for this site |\n| `cms-edit://customer/components-index` | Component types and when to use each |\n| `cms-edit://customer/collections-index` | Collection types |\n| `cms-edit://customer/brand` | Brand voice and terminology (if configured) |\n| `cms-edit://customer/articles` | Article/publication playbook (if configured) |\n| `cms-edit://customer/defaults` | Featured image rules, article types, Contentful UI scope (if configured) |\n\n**Workflow:** read `cms-edit://customer/index` \u2192 `overview` \u2192 `routing` \u2192 `defaults` (if present) \u2192 `components-index` \u2192 `articles` (if creating articles) \u2192 then use `cms_edit` commands.\n\n## MCP prompts\n\n| Prompt | Purpose |\n|--------|---------|\n| `cms_edit_verify` | Check version and connectivity |\n| `cms_edit_explore` | List site content and open a page |\n| `cms_edit_edit_page` | Edit a page through diff \u2192 save |\n| `cms_edit_edit_article` | Edit an article through diff \u2192 save |\n| `cms_edit_index_sync` | Build/refresh local index (assets, media, templates, taxonomy) |\n| `cms_edit_create_page` | Create a page with template selection |\n| `cms_edit_create_article` | Create an article (requires article type; featured image rules) |\n| `cms_edit_create_from_doc` | Create a page from a freeform document (infer \u2192 confirm \u2192 dry-run) |\n| `cms_edit_create_article_from_doc` | Create an article from a freeform document |\n| `cms_edit_taxonomy` | Import or ensure taxonomy entries |\n\nRead the full guide anytime via the `cms-edit://guide` resource or `cms_edit_help`.\n\n## Core workflow\n\nStandard editing flow: **open \u2192 snapshot \u2192 read \u2192 set/rtf \u2192 diff \u2192 save**\n\nEach step is a separate `cms_edit` call. Sessions persist in Redis between calls (hosted) or on disk (local). MCP auto-uses session `_mcp`.\n\n### 1. Open a page\n\n```\n[\"open\", \"--page-slug\", \"/\"]\n[\"open\", \"--page-slug\", \"/pricing\"]\n[\"open\", \"--id\", \"<entry-id>\"]\n```\n\n**Homepage (all SE Studio sites):** Contentful stores the marketing homepage slug as `index`. The live site URL is `/`. In cms-edit, `--page-slug /` and `--page-slug /index` are equivalent (both resolve to `index`). `sitemap` displays this page as `/index` \u2014 that is formatting, not a different slug. Read `cms-edit://customer/routing` for site-specific exceptions (e.g. Pedestal uses `home`).\n\n### 2. Snapshot \u2014 see the content tree\n\n```\n[\"snapshot\"]\n```\n\nOutput shows `@c0`, `@c1`, \u2026 refs for each component. Use these refs in `read`, `set`, and `rtf`.\n\n### 3. Read fields\n\n```\n[\"read\", \"@c1\"]\n[\"read\", \"@c1\", \"heading\"]\n```\n\n### 4. Edit fields\n\n```\n[\"set\", \"@c1\", \"heading\", \"New heading text\"]\n[\"rtf\", \"@c1\", \"body\", \"--content\", \"# Title\\n\\nParagraph text.\"]\n```\n\nFor rich text, prefer `--content` with inline markdown. Use `--base64` when special characters cause issues.\n\n### 5. Review and save\n\n```\n[\"diff\"]\n[\"save\"]\n```\n\nAlways run `diff` before `save`. To abandon changes: `[\"discard\"]`.\n\n## When to use Contentful UI\n\n| Task | Where |\n|------|-------|\n| Edit copy, add sections, create pages/articles | **Claude + cms-edit** (drafts) |\n| Publish approved drafts | **Contentful UI** |\n| Upload new images and files | **Contentful UI** asset library |\n| Edit copy directly in Contentful | **Avoid** \u2014 use Claude instead |\n\ncms-edit saves **drafts only**. A colleague must **publish in Contentful** for changes to go live.\n\n## Featured images (articles)\n\nRead `cms-edit://customer/defaults` when present. Otherwise:\n\n1. **Custom** \u2014 set `featuredImage` or `featuredImageAssetFilename` on the article when the editor provides a specific image\n2. **Article type** \u2014 if omitted, cms-edit inherits the linked **articleType** `featuredImage`\n3. **Site default** \u2014 from `editor.defaults` in the site config (also in `defaults.json` in the editor pack)\n\nRun `[\"index\", \"sync\"]` before resolving assets by filename.\n\n## Create content\n\n### Create a page\n\n```\n[\"index\", \"sync\"]\n[\"list\", \"--type\", \"template\"]\n[\"create\", \"page\", \"--slug\", \"/about-us\", \"--title\", \"About Us\", \"--template-id\", \"<id>\"]\n[\"snapshot\"]\n```\n\nOr use `create from-json` with `--dry-run --strict` for multi-section pages.\n\n### Create an article\n\nEvery article requires an **articleType**:\n\n```\n[\"index\", \"sync\"]\n[\"list\", \"--type\", \"articleType\"]\n[\"create\", \"article\", \"--slug\", \"resources/blog/my-post\", \"--title\", \"My Post\", \"--article-type-slug\", \"resources/blog\"]\n```\n\nOr `create from-json` with `\"type\": \"article\"` and `articleTypeSlug` / `articleTypeId`.\n\nUse MCP prompt `cms_edit_create_article` for guided creation.\n\n## Common sequences\n\n### List all pages\n\n```\n[\"sitemap\"]\n```\n\n### Refresh local index (assets, media, templates, taxonomy)\n\nRun before asset filename search, media-by-filename list, or fast template/taxonomy lookup:\n\n```\n[\"index\", \"sync\"]\n[\"index\", \"status\"]\n[\"list\", \"--type\", \"template\"]\n```\n\nAsset search and media-by-filename list **require** the index. Template/taxonomy list prefers the index when built.\n\n### Explore the homepage\n\n```\n[\"open\", \"--page-slug\", \"/\"]\n[\"snapshot\"]\n[\"read\", \"@c1\"]\n```\n\n### Edit copy on a page\n\n```\n[\"open\", \"--page-slug\", \"{{EXAMPLE_SLUG}}\"]\n[\"snapshot\"]\n[\"read\", \"@c1\", \"heading\"]\n[\"set\", \"@c1\", \"heading\", \"Updated heading\"]\n[\"diff\"]\n[\"save\"]\n```\n\n## Field discovery\n\n```\n[\"schema\", \"component\"]\n[\"list\", \"--type\", \"page\"]\n[\"search\", \"pricing\"]\n```\n\n## Hosted connector rules\n\n{{HOSTED_RULES}}\n\n## Session tips\n\n- After `open`, subsequent MCP commands share session `_mcp` automatically (stored in Redis on hosted).\n- Use `--session <name>` only when juggling multiple pages \u2014 pass it **before** the subcommand on every call: `[\"--session\", \"my-work\", \"open\", \"--page-slug\", \"/\"]`.\n- Snapshot JSON includes `sessionName` and `sessionKey` for debugging.\n- If you see \"No active session\", check `/api/health` (Redis must be ok), then run `open` again. Set `LOG_CMS_SESSION=1` on Vercel and search runtime logs for `[cms-edit:session]` (`redis save ok` / `redis load hit` / `requireSession miss`).\n\n### peek vs open vs read\n\n| Goal | MCP args |\n|------|----------|\n| Edit workflow (session) | `[\"open\", \"--page-slug\", \"/\"]` then `[\"read\", \"@c0\"]` |\n| Preview tree + fields, no session | `[\"peek\", \"--page-slug\", \"/pricing\"]` or `[\"peek\", \"--id\", \"<entry-id>\"]` (JSON includes `rootFields`) |\n| Read fields by entry ID, no session | `[\"read\", \"<entry-id>\", \"--id\"]` or `[\"read\", \"<entry-id>\", \"--id\", \"heading\"]` |\n| Debug session persistence | `[\"diagnose\"]` \u2014 reports store, userId, active session key |\n\n- **`peek` is one-shot** \u2014 prints tree and **root field values** (`rootFields` in JSON). No session is created; do not chain `read @ref` afterward.\n- **Use flat lookup flags** for `open` and `peek` \u2014 same as CLI (`--page-slug`, `--id`, etc.). See `help lookup`.\n- **`read @root`** only works after `open` (uses the active session). The hint in peek output is for terminal users who already ran `open`.\n- **Do not invent flags** \u2014 there is no `--read`, `--then`, or chained peek+read syntax. One command per `cms_edit` call.\n\n## Troubleshooting\n\n| Problem | What to do |\n|---------|------------|\n| **401 / connection failed** | Claude \u2192 Settings \u2192 Integrations \u2192 Connect again; complete Contentful sign-in. On Vercel, search runtime logs for `[cms-edit:oauth] auth_failure` (always logged). Set `LOG_CMS_OAUTH=1` for connect success traces. |\n| **No cms_edit tool** | Confirm the integration is connected under Settings \u2192 Integrations |\n| **No active session** | Do not pass `--space` on hosted. Check `/api/health` \u2014 `redis` must be ok. MCP uses `_mcp` session automatically. Manual session: `[\"--session\", \"name\", \"open\", \"--page-slug\", \"/\"]`. Fallback: `[\"read\", \"<entry-id>\", \"--id\"]` |\n| **Wrong space** | Your Contentful account must have access to this deployment's space |\n| **Check version** | Call `cms_edit_version` or `curl /api/health` and read `cmsEdit` |\n\n## Articles\n\n**Recent articles** (by publication `date`, not last-updated):\n\n```json\n[\"list\", \"--type\", \"article\", \"--sort\", \"date\", \"-n\", \"10\"]\n```\n\nAlternatives: `[\"search\", \"<keyword>\", \"--type\", \"article\"]` (also sorts by date), `[\"sitemap\", \"--include\", \"article\", \"--sort\", \"date\"]`.\n\n**Draft articles** \u2014 `peek` and `open` load drafts via CMA (not published-only). To discover drafts:\n\n```json\n[\"sitemap\", \"--include\", \"article\", \"--status\", \"draft\"]\n[\"search\", \"<title>\", \"--type\", \"article\"]\n[\"list\", \"--type\", \"article\", \"--slug\", \"<slug>\"]\n```\n\nThen open: `[\"peek\", \"--article-slug\", \"<slug>\"]` or `[\"open\", \"--id\", \"<entry-id>\"]`. Use `--article-slug`, not `--page-slug`.\n\n**Published-only** is opt-in: `list --published` and `resolve --published` use the Delivery API index and omit never-published drafts.\n\nAfter upgrading cms-edit, run `[\"index\", \"sync\"]` once so the local index includes article `date` values (schema v4).\n\n## Command reference (cms_edit args)\n\n**Discovery:** `sitemap`, `list --type <type>`, `search <query>`, `schema <contentType>`, `index sync`, `index status`\n\n**Reading:** `open --page-slug <slug>`, `open --id <id>`, `peek --page-slug <slug>`, `peek --id <id>`, `snapshot`, `read <ref>`, `read <ref> <field>`, `read <id> --id [field]`\n\n**Diagnostics:** `diagnose` \u2014 session store, userId, active session (after open/read issues)\n\n**Editing:** `set <ref> <field> <value>`, `rtf <ref> <field> --content \"<md>\"`, `diff`, `save`, `discard`\n\n**Creating:** `create page --slug \u2026 --title \u2026`, `create article --slug \u2026 --title \u2026 --article-type-slug \u2026`, `create from-json --file \u2026`, `add <type> --content-type \u2026 --parent @c0 --target content`\n\n**Other:** `health`, `version`, `guide [topic]`\n";
|
|
2
2
|
//# sourceMappingURL=hosted-guide.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-guide.d.ts","sourceRoot":"","sources":["../../src/generated/hosted-guide.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"hosted-guide.d.ts","sourceRoot":"","sources":["../../src/generated/hosted-guide.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,qBAAqB,+sWAAkgW,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Generated by scripts/generate-embedded-assets.mjs — do not edit manually.
|
|
2
|
-
export const HOSTED_GUIDE_TEMPLATE = "# cms-edit MCP guide\n\nUse this guide when editing Contentful draft content through Claude Desktop (hosted Integrations + OAuth) or local stdio MCP.\n\n{{SITE_INTRO}}\n\n## Safety rules\n\ncms-edit **cannot and will not**:\n\n- Publish or unpublish entries\n- Archive or delete published entries\n- Upload new assets (use Contentful UI for assets)\n\nAll `save` operations create **drafts only**. A human must review and publish in Contentful.\n\n## MCP tools\n\n| Tool | Purpose |\n|------|---------|\n| `cms_edit` | Run any cms-edit command via an `args` array |\n| `cms_edit_version` | Check the installed cms-edit version (no session required) |\n| `cms_edit_help` | Read this guide by topic (`overview`, `workflow`, `commands`, `troubleshooting`, `hosted`) |\n\n## Customer editor pack (read first)\n\nWhen a site editor pack is deployed, these MCP resources provide **site-specific** context. Read them before creating or editing content:\n\n| Resource | Purpose |\n|----------|---------|\n| `cms-edit://customer/index` | List of all customer resources |\n| `cms-edit://customer/overview` | Site name, space, staging URL, handoff rules |\n| `cms-edit://customer/routing` | Article/tag URL rules for this site |\n| `cms-edit://customer/components-index` | Component types and when to use each |\n| `cms-edit://customer/collections-index` | Collection types |\n| `cms-edit://customer/brand` | Brand voice and terminology (if configured) |\n| `cms-edit://customer/articles` | Article/publication playbook (if configured) |\n\n**Workflow:** read `cms-edit://customer/index` → `overview` → `routing` → `components-index` → then use `cms_edit` commands.\n\n## MCP prompts\n\n| Prompt | Purpose |\n|--------|---------|\n| `cms_edit_verify` | Check version and connectivity |\n| `cms_edit_explore` | List site content and open a page |\n| `cms_edit_edit_page` | Edit a page through diff → save |\n| `cms_edit_index_sync` | Build/refresh local index (assets, media, templates, taxonomy) |\n| `cms_edit_create_page` | Create a page with template selection |\n| `cms_edit_create_from_doc` | Create a page from a freeform document (infer → confirm → dry-run) |\n| `cms_edit_taxonomy` | Import or ensure taxonomy entries |\n\nRead the full guide anytime via the `cms-edit://guide` resource or `cms_edit_help`.\n\n## Core workflow\n\nStandard editing flow: **open → snapshot → read → set/rtf → diff → save**\n\nEach step is a separate `cms_edit` call. Sessions persist in Redis between calls (hosted) or on disk (local). MCP auto-uses session `_mcp`.\n\n### 1. Open a page\n\n```\n[\"open\", \"--page-slug\", \"/\"]\n[\"open\", \"--page-slug\", \"/pricing\"]\n[\"open\", \"--id\", \"<entry-id>\"]\n```\n\n**Homepage (all SE Studio sites):** Contentful stores the marketing homepage slug as `index`. The live site URL is `/`. In cms-edit, `--page-slug /` and `--page-slug /index` are equivalent (both resolve to `index`). `sitemap` displays this page as `/index` — that is formatting, not a different slug. Read `cms-edit://customer/routing` for site-specific exceptions (e.g. Pedestal uses `home`).\n\n### 2. Snapshot — see the content tree\n\n```\n[\"snapshot\"]\n```\n\nOutput shows `@c0`, `@c1`, … refs for each component. Use these refs in `read`, `set`, and `rtf`.\n\n### 3. Read fields\n\n```\n[\"read\", \"@c1\"]\n[\"read\", \"@c1\", \"heading\"]\n```\n\n### 4. Edit fields\n\n```\n[\"set\", \"@c1\", \"heading\", \"New heading text\"]\n[\"rtf\", \"@c1\", \"body\", \"--content\", \"# Title\\n\\nParagraph text.\"]\n```\n\nFor rich text, prefer `--content` with inline markdown. Use `--base64` when special characters cause issues.\n\n### 5. Review and save\n\n```\n[\"diff\"]\n[\"save\"]\n```\n\nAlways run `diff` before `save`. To abandon changes: `[\"discard\"]`.\n\n## Common sequences\n\n### List all pages\n\n```\n[\"sitemap\"]\n```\n\n### Refresh local index (assets, media, templates, taxonomy)\n\nRun before asset filename search, media-by-filename list, or fast template/taxonomy lookup:\n\n```\n[\"index\", \"sync\"]\n[\"index\", \"status\"]\n[\"list\", \"--type\", \"template\"]\n```\n\nAsset search and media-by-filename list **require** the index. Template/taxonomy list prefers the index when built.\n\n### Explore the homepage\n\n```\n[\"open\", \"--page-slug\", \"/\"]\n[\"snapshot\"]\n[\"read\", \"@c1\"]\n```\n\n### Edit copy on a page\n\n```\n[\"open\", \"--page-slug\", \"{{EXAMPLE_SLUG}}\"]\n[\"snapshot\"]\n[\"read\", \"@c1\", \"heading\"]\n[\"set\", \"@c1\", \"heading\", \"Updated heading\"]\n[\"diff\"]\n[\"save\"]\n```\n\n## Field discovery\n\n```\n[\"schema\", \"component\"]\n[\"list\", \"--type\", \"page\"]\n[\"search\", \"pricing\"]\n```\n\n## Hosted connector rules\n\n{{HOSTED_RULES}}\n\n## Session tips\n\n- After `open`, subsequent MCP commands share session `_mcp` automatically (stored in Redis on hosted).\n- Use `--session <name>` only when juggling multiple pages — pass it **before** the subcommand on every call: `[\"--session\", \"my-work\", \"open\", \"--page-slug\", \"/\"]`.\n- Snapshot JSON includes `sessionName` and `sessionKey` for debugging.\n- If you see \"No active session\", check `/api/health` (Redis must be ok), then run `open` again. Set `LOG_CMS_SESSION=1` on Vercel and search runtime logs for `[cms-edit:session]` (`redis save ok` / `redis load hit` / `requireSession miss`).\n\n### peek vs open vs read\n\n| Goal | MCP args |\n|------|----------|\n| Edit workflow (session) | `[\"open\", \"--page-slug\", \"/\"]` then `[\"read\", \"@c0\"]` |\n| Preview tree + fields, no session | `[\"peek\", \"--page-slug\", \"/pricing\"]` or `[\"peek\", \"--id\", \"<entry-id>\"]` (JSON includes `rootFields`) |\n| Read fields by entry ID, no session | `[\"read\", \"<entry-id>\", \"--id\"]` or `[\"read\", \"<entry-id>\", \"--id\", \"heading\"]` |\n| Debug session persistence | `[\"diagnose\"]` — reports store, userId, active session key |\n\n- **`peek` is one-shot** — prints tree and **root field values** (`rootFields` in JSON). No session is created; do not chain `read @ref` afterward.\n- **Use flat lookup flags** for `open` and `peek` — same as CLI (`--page-slug`, `--id`, etc.). See `help lookup`.\n- **`read @root`** only works after `open` (uses the active session). The hint in peek output is for terminal users who already ran `open`.\n- **Do not invent flags** — there is no `--read`, `--then`, or chained peek+read syntax. One command per `cms_edit` call.\n\n## Troubleshooting\n\n| Problem | What to do |\n|---------|------------|\n| **401 / connection failed** | Claude → Settings → Integrations → Connect again; complete Contentful sign-in. On Vercel, search runtime logs for `[cms-edit:oauth] auth_failure` (always logged). Set `LOG_CMS_OAUTH=1` for connect success traces. |\n| **No cms_edit tool** | Confirm the integration is connected under Settings → Integrations |\n| **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\"]` |\n| **Wrong space** | Your Contentful account must have access to this deployment's space |\n| **Check version** | Call `cms_edit_version` or `curl /api/health` and read `cmsEdit` |\n\n## Articles\n\n**Recent articles** (by publication `date`, not last-updated):\n\n```json\n[\"list\", \"--type\", \"article\", \"--sort\", \"date\", \"-n\", \"10\"]\n```\n\nAlternatives: `[\"search\", \"<keyword>\", \"--type\", \"article\"]` (also sorts by date), `[\"sitemap\", \"--include\", \"article\", \"--sort\", \"date\"]`.\n\n**Draft articles** — `peek` and `open` load drafts via CMA (not published-only). To discover drafts:\n\n```json\n[\"sitemap\", \"--include\", \"article\", \"--status\", \"draft\"]\n[\"search\", \"<title>\", \"--type\", \"article\"]\n[\"list\", \"--type\", \"article\", \"--slug\", \"<slug>\"]\n```\n\nThen open: `[\"peek\", \"--article-slug\", \"<slug>\"]` or `[\"open\", \"--id\", \"<entry-id>\"]`. Use `--article-slug`, not `--page-slug`.\n\n**Published-only** is opt-in: `list --published` and `resolve --published` use the Delivery API index and omit never-published drafts.\n\nAfter upgrading cms-edit, run `[\"index\", \"sync\"]` once so the local index includes article `date` values (schema v4).\n\n## Command reference (cms_edit args)\n\n**Discovery:** `sitemap`, `list --type <type>`, `search <query>`, `schema <contentType>`, `index sync`, `index status`\n\n**Reading:** `open --page-slug <slug>`, `open --id <id>`, `peek --page-slug <slug>`, `peek --id <id>`, `snapshot`, `read <ref>`, `read <ref> <field>`, `read <id> --id [field]`\n\n**Diagnostics:** `diagnose` — session store, userId, active session (after open/read issues)\n\n**Editing:** `set <ref> <field> <value>`, `rtf <ref> <field> --content \"<md>\"`, `diff`, `save`, `discard`\n\n**Creating:** `create page --slug … --title …`, `add <type> --content-type … --parent @c0 --target content`\n\n**Other:** `health`, `version`, `guide [topic]`\n";
|
|
2
|
+
export const HOSTED_GUIDE_TEMPLATE = "# cms-edit MCP guide\n\nUse this guide when editing Contentful draft content through Claude Desktop (hosted Integrations + OAuth) or local stdio MCP.\n\n{{SITE_INTRO}}\n\n## Safety rules\n\ncms-edit **cannot and will not**:\n\n- Publish or unpublish entries\n- Archive or delete published entries\n- Upload new assets (use Contentful UI for assets)\n\nAll `save` operations create **drafts only**. A human must review and publish in Contentful.\n\n## MCP tools\n\n| Tool | Purpose |\n|------|---------|\n| `cms_edit` | Run any cms-edit command via an `args` array |\n| `cms_edit_version` | Check the installed cms-edit version (no session required) |\n| `cms_edit_help` | Read this guide by topic (`overview`, `workflow`, `commands`, `troubleshooting`, `hosted`) |\n\n## Customer editor pack (read first)\n\nWhen a site editor pack is deployed, these MCP resources provide **site-specific** context. Read them before creating or editing content:\n\n| Resource | Purpose |\n|----------|---------|\n| `cms-edit://customer/index` | List of all customer resources |\n| `cms-edit://customer/overview` | Site name, space, staging URL, handoff rules |\n| `cms-edit://customer/routing` | Article/tag URL rules for this site |\n| `cms-edit://customer/components-index` | Component types and when to use each |\n| `cms-edit://customer/collections-index` | Collection types |\n| `cms-edit://customer/brand` | Brand voice and terminology (if configured) |\n| `cms-edit://customer/articles` | Article/publication playbook (if configured) |\n| `cms-edit://customer/defaults` | Featured image rules, article types, Contentful UI scope (if configured) |\n\n**Workflow:** read `cms-edit://customer/index` → `overview` → `routing` → `defaults` (if present) → `components-index` → `articles` (if creating articles) → then use `cms_edit` commands.\n\n## MCP prompts\n\n| Prompt | Purpose |\n|--------|---------|\n| `cms_edit_verify` | Check version and connectivity |\n| `cms_edit_explore` | List site content and open a page |\n| `cms_edit_edit_page` | Edit a page through diff → save |\n| `cms_edit_edit_article` | Edit an article through diff → save |\n| `cms_edit_index_sync` | Build/refresh local index (assets, media, templates, taxonomy) |\n| `cms_edit_create_page` | Create a page with template selection |\n| `cms_edit_create_article` | Create an article (requires article type; featured image rules) |\n| `cms_edit_create_from_doc` | Create a page from a freeform document (infer → confirm → dry-run) |\n| `cms_edit_create_article_from_doc` | Create an article from a freeform document |\n| `cms_edit_taxonomy` | Import or ensure taxonomy entries |\n\nRead the full guide anytime via the `cms-edit://guide` resource or `cms_edit_help`.\n\n## Core workflow\n\nStandard editing flow: **open → snapshot → read → set/rtf → diff → save**\n\nEach step is a separate `cms_edit` call. Sessions persist in Redis between calls (hosted) or on disk (local). MCP auto-uses session `_mcp`.\n\n### 1. Open a page\n\n```\n[\"open\", \"--page-slug\", \"/\"]\n[\"open\", \"--page-slug\", \"/pricing\"]\n[\"open\", \"--id\", \"<entry-id>\"]\n```\n\n**Homepage (all SE Studio sites):** Contentful stores the marketing homepage slug as `index`. The live site URL is `/`. In cms-edit, `--page-slug /` and `--page-slug /index` are equivalent (both resolve to `index`). `sitemap` displays this page as `/index` — that is formatting, not a different slug. Read `cms-edit://customer/routing` for site-specific exceptions (e.g. Pedestal uses `home`).\n\n### 2. Snapshot — see the content tree\n\n```\n[\"snapshot\"]\n```\n\nOutput shows `@c0`, `@c1`, … refs for each component. Use these refs in `read`, `set`, and `rtf`.\n\n### 3. Read fields\n\n```\n[\"read\", \"@c1\"]\n[\"read\", \"@c1\", \"heading\"]\n```\n\n### 4. Edit fields\n\n```\n[\"set\", \"@c1\", \"heading\", \"New heading text\"]\n[\"rtf\", \"@c1\", \"body\", \"--content\", \"# Title\\n\\nParagraph text.\"]\n```\n\nFor rich text, prefer `--content` with inline markdown. Use `--base64` when special characters cause issues.\n\n### 5. Review and save\n\n```\n[\"diff\"]\n[\"save\"]\n```\n\nAlways run `diff` before `save`. To abandon changes: `[\"discard\"]`.\n\n## When to use Contentful UI\n\n| Task | Where |\n|------|-------|\n| Edit copy, add sections, create pages/articles | **Claude + cms-edit** (drafts) |\n| Publish approved drafts | **Contentful UI** |\n| Upload new images and files | **Contentful UI** asset library |\n| Edit copy directly in Contentful | **Avoid** — use Claude instead |\n\ncms-edit saves **drafts only**. A colleague must **publish in Contentful** for changes to go live.\n\n## Featured images (articles)\n\nRead `cms-edit://customer/defaults` when present. Otherwise:\n\n1. **Custom** — set `featuredImage` or `featuredImageAssetFilename` on the article when the editor provides a specific image\n2. **Article type** — if omitted, cms-edit inherits the linked **articleType** `featuredImage`\n3. **Site default** — from `editor.defaults` in the site config (also in `defaults.json` in the editor pack)\n\nRun `[\"index\", \"sync\"]` before resolving assets by filename.\n\n## Create content\n\n### Create a page\n\n```\n[\"index\", \"sync\"]\n[\"list\", \"--type\", \"template\"]\n[\"create\", \"page\", \"--slug\", \"/about-us\", \"--title\", \"About Us\", \"--template-id\", \"<id>\"]\n[\"snapshot\"]\n```\n\nOr use `create from-json` with `--dry-run --strict` for multi-section pages.\n\n### Create an article\n\nEvery article requires an **articleType**:\n\n```\n[\"index\", \"sync\"]\n[\"list\", \"--type\", \"articleType\"]\n[\"create\", \"article\", \"--slug\", \"resources/blog/my-post\", \"--title\", \"My Post\", \"--article-type-slug\", \"resources/blog\"]\n```\n\nOr `create from-json` with `\"type\": \"article\"` and `articleTypeSlug` / `articleTypeId`.\n\nUse MCP prompt `cms_edit_create_article` for guided creation.\n\n## Common sequences\n\n### List all pages\n\n```\n[\"sitemap\"]\n```\n\n### Refresh local index (assets, media, templates, taxonomy)\n\nRun before asset filename search, media-by-filename list, or fast template/taxonomy lookup:\n\n```\n[\"index\", \"sync\"]\n[\"index\", \"status\"]\n[\"list\", \"--type\", \"template\"]\n```\n\nAsset search and media-by-filename list **require** the index. Template/taxonomy list prefers the index when built.\n\n### Explore the homepage\n\n```\n[\"open\", \"--page-slug\", \"/\"]\n[\"snapshot\"]\n[\"read\", \"@c1\"]\n```\n\n### Edit copy on a page\n\n```\n[\"open\", \"--page-slug\", \"{{EXAMPLE_SLUG}}\"]\n[\"snapshot\"]\n[\"read\", \"@c1\", \"heading\"]\n[\"set\", \"@c1\", \"heading\", \"Updated heading\"]\n[\"diff\"]\n[\"save\"]\n```\n\n## Field discovery\n\n```\n[\"schema\", \"component\"]\n[\"list\", \"--type\", \"page\"]\n[\"search\", \"pricing\"]\n```\n\n## Hosted connector rules\n\n{{HOSTED_RULES}}\n\n## Session tips\n\n- After `open`, subsequent MCP commands share session `_mcp` automatically (stored in Redis on hosted).\n- Use `--session <name>` only when juggling multiple pages — pass it **before** the subcommand on every call: `[\"--session\", \"my-work\", \"open\", \"--page-slug\", \"/\"]`.\n- Snapshot JSON includes `sessionName` and `sessionKey` for debugging.\n- If you see \"No active session\", check `/api/health` (Redis must be ok), then run `open` again. Set `LOG_CMS_SESSION=1` on Vercel and search runtime logs for `[cms-edit:session]` (`redis save ok` / `redis load hit` / `requireSession miss`).\n\n### peek vs open vs read\n\n| Goal | MCP args |\n|------|----------|\n| Edit workflow (session) | `[\"open\", \"--page-slug\", \"/\"]` then `[\"read\", \"@c0\"]` |\n| Preview tree + fields, no session | `[\"peek\", \"--page-slug\", \"/pricing\"]` or `[\"peek\", \"--id\", \"<entry-id>\"]` (JSON includes `rootFields`) |\n| Read fields by entry ID, no session | `[\"read\", \"<entry-id>\", \"--id\"]` or `[\"read\", \"<entry-id>\", \"--id\", \"heading\"]` |\n| Debug session persistence | `[\"diagnose\"]` — reports store, userId, active session key |\n\n- **`peek` is one-shot** — prints tree and **root field values** (`rootFields` in JSON). No session is created; do not chain `read @ref` afterward.\n- **Use flat lookup flags** for `open` and `peek` — same as CLI (`--page-slug`, `--id`, etc.). See `help lookup`.\n- **`read @root`** only works after `open` (uses the active session). The hint in peek output is for terminal users who already ran `open`.\n- **Do not invent flags** — there is no `--read`, `--then`, or chained peek+read syntax. One command per `cms_edit` call.\n\n## Troubleshooting\n\n| Problem | What to do |\n|---------|------------|\n| **401 / connection failed** | Claude → Settings → Integrations → Connect again; complete Contentful sign-in. On Vercel, search runtime logs for `[cms-edit:oauth] auth_failure` (always logged). Set `LOG_CMS_OAUTH=1` for connect success traces. |\n| **No cms_edit tool** | Confirm the integration is connected under Settings → Integrations |\n| **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\"]` |\n| **Wrong space** | Your Contentful account must have access to this deployment's space |\n| **Check version** | Call `cms_edit_version` or `curl /api/health` and read `cmsEdit` |\n\n## Articles\n\n**Recent articles** (by publication `date`, not last-updated):\n\n```json\n[\"list\", \"--type\", \"article\", \"--sort\", \"date\", \"-n\", \"10\"]\n```\n\nAlternatives: `[\"search\", \"<keyword>\", \"--type\", \"article\"]` (also sorts by date), `[\"sitemap\", \"--include\", \"article\", \"--sort\", \"date\"]`.\n\n**Draft articles** — `peek` and `open` load drafts via CMA (not published-only). To discover drafts:\n\n```json\n[\"sitemap\", \"--include\", \"article\", \"--status\", \"draft\"]\n[\"search\", \"<title>\", \"--type\", \"article\"]\n[\"list\", \"--type\", \"article\", \"--slug\", \"<slug>\"]\n```\n\nThen open: `[\"peek\", \"--article-slug\", \"<slug>\"]` or `[\"open\", \"--id\", \"<entry-id>\"]`. Use `--article-slug`, not `--page-slug`.\n\n**Published-only** is opt-in: `list --published` and `resolve --published` use the Delivery API index and omit never-published drafts.\n\nAfter upgrading cms-edit, run `[\"index\", \"sync\"]` once so the local index includes article `date` values (schema v4).\n\n## Command reference (cms_edit args)\n\n**Discovery:** `sitemap`, `list --type <type>`, `search <query>`, `schema <contentType>`, `index sync`, `index status`\n\n**Reading:** `open --page-slug <slug>`, `open --id <id>`, `peek --page-slug <slug>`, `peek --id <id>`, `snapshot`, `read <ref>`, `read <ref> <field>`, `read <id> --id [field]`\n\n**Diagnostics:** `diagnose` — session store, userId, active session (after open/read issues)\n\n**Editing:** `set <ref> <field> <value>`, `rtf <ref> <field> --content \"<md>\"`, `diff`, `save`, `discard`\n\n**Creating:** `create page --slug … --title …`, `create article --slug … --title … --article-type-slug …`, `create from-json --file …`, `add <type> --content-type … --parent @c0 --target content`\n\n**Other:** `health`, `version`, `guide [topic]`\n";
|
|
3
3
|
//# sourceMappingURL=hosted-guide.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-guide.js","sourceRoot":"","sources":["../../src/generated/hosted-guide.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,qBAAqB,GAAG,
|
|
1
|
+
{"version":3,"file":"hosted-guide.js","sourceRoot":"","sources":["../../src/generated/hosted-guide.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,qBAAqB,GAAG,+/VAA+/V,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmsEditPage.d.ts","sourceRoot":"","sources":["../../../../src/hosted/next/pages/CmsEditPage.tsx"],"names":[],"mappings":"AAIA,wBAA8B,qBAAqB,
|
|
1
|
+
{"version":3,"file":"CmsEditPage.d.ts","sourceRoot":"","sources":["../../../../src/hosted/next/pages/CmsEditPage.tsx"],"names":[],"mappings":"AAIA,wBAA8B,qBAAqB,yCAuHlD"}
|
|
@@ -17,6 +17,6 @@ export default async function CmsEditOnboardingPage() {
|
|
|
17
17
|
const connectorName = `cms-edit (${displayName})`;
|
|
18
18
|
const installUrl = buildClaudeConnectorInstallUrl(mcpUrl, connectorName);
|
|
19
19
|
const canUseInstallLink = isPublicHttpsMcpUrl(mcpUrl);
|
|
20
|
-
return (_jsxs("main", { style: pageStyle, children: [_jsxs("h1", { children: ["cms-edit for ", displayName] }), _jsx("p", { children: "Edit Contentful draft content from Claude. Sign in with your Contentful account \u2014 no tokens or command line required." }), _jsxs("section", { children: [_jsx("h2", { children: "Quick connect (recommended)" }), canUseInstallLink ? (_jsxs(_Fragment, { children: [_jsx("p", { children: "Click the button below. It opens Claude with the connector name and URL prefilled \u2014 you just confirm and sign in with Contentful." }), _jsx("p", { children: _jsx("a", { href: installUrl, style: buttonStyle, children: "Connect to Claude" }) }), _jsxs("p", { style: { fontSize: '0.9375rem', color: '#52525b' }, children: ["Works in Claude Desktop and claude.ai (same account). Shortcut:", ' ', _jsx("a", { href: "/connect", children: "/connect" })] })] })) : (_jsx("p", { children: "The one-click link requires a public HTTPS URL. For local dev, add the connector manually below or use Claude Code." }))] }), _jsxs("section", { children: [_jsx("h2", { children: "Manual setup" }), _jsxs("ol", { children: [_jsxs("li", { children: ["Install ", _jsx("a", { href: "https://claude.ai/download", children: "Claude Desktop" }), " if needed"] }), _jsxs("li", { children: ["Open ", _jsx("strong", { children: "Customize \u2192 Connectors" }), " (or Settings \u2192 Integrations in some versions)"] }), _jsxs("li", { children: ["Click ", _jsx("strong", { children: "Add custom connector" })] }), _jsxs("li", { children: ["Paste this URL, then ", _jsx("strong", { children: "Connect" }), " and sign in with Contentful:"] })] }), _jsx("code", { style: codeStyle, children: mcpUrl })] }), _jsxs("section", { children: [_jsx("h2", { children: "Verify" }), _jsx("p", { children: "Start a new conversation and ask:" }), _jsx("blockquote", { style: { margin: '0.5rem 0', padding: '0.75rem 1rem', background: '#f4f4f5' }, children: "Read the cms-edit guide and verify the connection." })] }), _jsxs("section", { children: [_jsx("h2", { children: "Troubleshooting" }), _jsxs("ul", { children: [_jsxs("li", { children: [_jsx("strong", { children: "Connection stopped working?" }), " Open Customize \u2192 Connectors and click", ' ', _jsx("strong", { children: "Connect" }), " again."] }), _jsxs("li", { children: [_jsx("strong", { children: "Wrong space?" }), " Your Contentful account must have access to this site's space."] }), _jsxs("li", { children: ["Health check: ", _jsx("code", { children: "/api/health" })] })] })] })] }));
|
|
20
|
+
return (_jsxs("main", { style: pageStyle, children: [_jsxs("h1", { children: ["cms-edit for ", displayName] }), _jsx("p", { children: "Edit Contentful draft content from Claude. Sign in with your Contentful account \u2014 no tokens or command line required." }), _jsxs("section", { children: [_jsx("h2", { children: "Quick connect (recommended)" }), canUseInstallLink ? (_jsxs(_Fragment, { children: [_jsx("p", { children: "Click the button below. It opens Claude with the connector name and URL prefilled \u2014 you just confirm and sign in with Contentful." }), _jsx("p", { children: _jsx("a", { href: installUrl, style: buttonStyle, children: "Connect to Claude" }) }), _jsxs("p", { style: { fontSize: '0.9375rem', color: '#52525b' }, children: ["Works in Claude Desktop and claude.ai (same account). Shortcut:", ' ', _jsx("a", { href: "/connect", children: "/connect" })] })] })) : (_jsx("p", { children: "The one-click link requires a public HTTPS URL. For local dev, add the connector manually below or use Claude Code." }))] }), _jsxs("section", { children: [_jsx("h2", { children: "Manual setup" }), _jsxs("ol", { children: [_jsxs("li", { children: ["Install ", _jsx("a", { href: "https://claude.ai/download", children: "Claude Desktop" }), " if needed"] }), _jsxs("li", { children: ["Open ", _jsx("strong", { children: "Customize \u2192 Connectors" }), " (or Settings \u2192 Integrations in some versions)"] }), _jsxs("li", { children: ["Click ", _jsx("strong", { children: "Add custom connector" })] }), _jsxs("li", { children: ["Paste this URL, then ", _jsx("strong", { children: "Connect" }), " and sign in with Contentful:"] })] }), _jsx("code", { style: codeStyle, children: mcpUrl })] }), _jsxs("section", { children: [_jsx("h2", { children: "Verify" }), _jsx("p", { children: "Start a new conversation and ask:" }), _jsx("blockquote", { style: { margin: '0.5rem 0', padding: '0.75rem 1rem', background: '#f4f4f5' }, children: "Read the cms-edit guide and verify the connection." })] }), _jsxs("section", { children: [_jsx("h2", { children: "Common tasks" }), _jsx("p", { children: "Examples you can paste into Claude (or use the matching MCP prompts):" }), _jsxs("ul", { children: [_jsxs("li", { children: [_jsx("strong", { children: "Edit a page:" }), " \u201CUpdate the hero heading on /about-us\u201D"] }), _jsxs("li", { children: [_jsx("strong", { children: "Create an article:" }), " \u201CCreate a new blog article titled \u2026\u201D (Claude will ask for the article type)"] }), _jsxs("li", { children: [_jsx("strong", { children: "Go live:" }), " After Claude saves a draft, open Contentful and publish \u2014 cms-edit does not publish for you"] })] }), _jsx("p", { style: { fontSize: '0.9375rem', color: '#52525b' }, children: "Use Contentful only to publish and upload images. Do all copy editing in Claude." })] }), _jsxs("section", { children: [_jsx("h2", { children: "Troubleshooting" }), _jsxs("ul", { children: [_jsxs("li", { children: [_jsx("strong", { children: "Connection stopped working?" }), " Open Customize \u2192 Connectors and click", ' ', _jsx("strong", { children: "Connect" }), " again."] }), _jsxs("li", { children: [_jsx("strong", { children: "Wrong space?" }), " Your Contentful account must have access to this site's space."] }), _jsxs("li", { children: ["Health check: ", _jsx("code", { children: "/api/health" })] })] })] })] }));
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=CmsEditPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmsEditPage.js","sourceRoot":"","sources":["../../../../src/hosted/next/pages/CmsEditPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE5F,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,qBAAqB;IACjD,MAAM,MAAM,GAAG,MAAM,oBAAoB,EAAE,CAAC;IAE5C,IAAI,WAAW,GAAG,WAAW,CAAC;IAC9B,IAAI,MAA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AAiB,CAAC,CAAC,CAAC,CACnB,8BACE,iKAGI,EACJ,sBACE,YAAG,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,kCAEnC,GACF,EACJ,aAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,gFACa,GAAG,EACnE,YAAG,IAAI,EAAC,UAAU,yBAAa,IAC7B,IACH,CACJ,CAAC,CAAC,CAAC,CACF,8IAGI,CACL,IACO,EAEV,8BACE,wCAAqB,EACrB,yBACE,qCACU,YAAG,IAAI,EAAC,4BAA4B,+BAAmB,kBAC5D,EACL,kCACO,2DAAuC,2DAEzC,EACL,mCACQ,oDAAqC,IACxC,EACL,kDACuB,uCAAwB,qCAC1C,IACF,EACL,eAAM,KAAK,EAAE,SAAS,YAAG,MAAM,GAAQ,IAC/B,EAEV,8BACE,kCAAe,EACf,4DAAwC,EACxC,qBAAY,KAAK,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,mEAE5E,IACL,EAEV,8BACE,wCAAqB,EACrB,gGAA4E,EAC5E,yBACE,yBACE,4CAA6B,yDAC1B,EACL,yBACE,kDAAmC,mGAEhC,EACL,yBACE,wCAAyB,yGAEtB,IACF,EACL,YAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,iGAEjD,IACI,EAEV,8BACE,2CAAwB,EACxB,yBACE,yBACE,2DAA4C,iDAAuC,GAAG,EACtF,uCAAwB,eACrB,EACL,yBACE,4CAA6B,uEAE1B,EACL,2CACgB,yCAAwB,IACnC,IACF,IACG,IACL,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-site.d.ts","sourceRoot":"","sources":["../../../src/hosted/next/stage-site.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stage-site.d.ts","sourceRoot":"","sources":["../../../src/hosted/next/stage-site.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM,CAsBR;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB,CA+BA"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { cpSync, existsSync,
|
|
1
|
+
import { cpSync, existsSync, rmSync } from 'node:fs';
|
|
2
2
|
import { join, resolve } from 'node:path';
|
|
3
|
+
import { loadProjectConfig } from '../../project/load.js';
|
|
4
|
+
import { assertHostedDeployReady } from '../../project/validate-hosted.js';
|
|
3
5
|
function fail(message) {
|
|
4
6
|
throw new Error(message);
|
|
5
7
|
}
|
|
@@ -34,10 +36,9 @@ export function stageEditorPack(options) {
|
|
|
34
36
|
if (!existsSync(projectJsonPath)) {
|
|
35
37
|
fail(`Missing ${projectJsonPath}. Check CMS_EDIT_ROOT (${cmsEditRoot}).`);
|
|
36
38
|
}
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
39
|
+
const project = loadProjectConfig(projectJsonPath);
|
|
40
|
+
assertHostedDeployReady(project);
|
|
41
|
+
const projectKey = project.projectKey;
|
|
41
42
|
const editorPackSrc = join(siteDir, 'editor-pack');
|
|
42
43
|
if (!existsSync(editorPackSrc)) {
|
|
43
44
|
fail(`Missing ${editorPackSrc} — run editor-pack generate for this site, then commit editor-pack/`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-site.js","sourceRoot":"","sources":["../../../src/hosted/next/stage-site.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"stage-site.js","sourceRoot":"","sources":["../../../src/hosted/next/stage-site.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAQ3E,SAAS,IAAI,CAAC,OAAe;IAC3B,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,OAAe,EACf,QAAgB,EAChB,WAAoB;IAEpB,MAAM,mBAAmB,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,uBAAuB,CAAC,CAAC,CAAC;IAChF,IAAI,IAAI,GAAG,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAEvD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC1B,IAAI,CACF,2IAA2I,CAC5I,CAAC;QACJ,CAAC;QACD,IAAI,mBAAmB,EAAE,CAAC;YACxB,IAAI,GAAG,UAAU,CAAC;QACpB,CAAC;aAAM,IAAI,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,2BAA2B,CAAC,CAAC,EAAE,CAAC;YAClE,OAAO,EAAE,CAAC;QACZ,CAAC;aAAM,CAAC;YACN,IAAI,CACF,sHAAsH,CACvH,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAyB;IAIvD,MAAM,OAAO,GAAG,O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AO,EAAE,KAAK,EAAE,CAAC;AACxC,CAAC"}
|
package/dist/mcp/guide.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ export interface HostedMcpInfo {
|
|
|
6
6
|
export type GuideTopic = 'overview' | 'workflow' | 'commands' | 'troubleshooting' | 'hosted';
|
|
7
7
|
export declare const GUIDE_TOPICS: GuideTopic[];
|
|
8
8
|
export declare const GUIDE_RESOURCE_URI = "cms-edit://guide";
|
|
9
|
-
export declare const ONBOARDING_PROMPTS: readonly ["cms_edit_verify", "cms_edit_explore", "cms_edit_edit_page", "cms_edit_index_sync", "cms_edit_create_page", "cms_edit_create_from_doc", "cms_edit_taxonomy"];
|
|
9
|
+
export declare const ONBOARDING_PROMPTS: readonly ["cms_edit_verify", "cms_edit_explore", "cms_edit_edit_page", "cms_edit_edit_article", "cms_edit_index_sync", "cms_edit_create_page", "cms_edit_create_article", "cms_edit_create_from_doc", "cms_edit_create_article_from_doc", "cms_edit_taxonomy"];
|
|
10
10
|
export declare const GETTING_STARTED_INFO: {
|
|
11
11
|
readonly resourceUri: "cms-edit://guide";
|
|
12
|
-
readonly prompts: readonly ["cms_edit_verify", "cms_edit_explore", "cms_edit_edit_page", "cms_edit_index_sync", "cms_edit_create_page", "cms_edit_create_from_doc", "cms_edit_taxonomy"];
|
|
12
|
+
readonly prompts: readonly ["cms_edit_verify", "cms_edit_explore", "cms_edit_edit_page", "cms_edit_edit_article", "cms_edit_index_sync", "cms_edit_create_page", "cms_edit_create_article", "cms_edit_create_from_doc", "cms_edit_create_article_from_doc", "cms_edit_taxonomy"];
|
|
13
13
|
readonly helpTool: "cms_edit_help";
|
|
14
14
|
};
|
|
15
15
|
export declare function loadHostedGuideTemplate(): string;
|
package/dist/mcp/guide.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guide.d.ts","sourceRoot":"","sources":["../../src/mcp/guide.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,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ROMPTS = [
|
|
|
11
11
|
'cms_edit_verify',
|
|
12
12
|
'cms_edit_explore',
|
|
13
13
|
'cms_edit_edit_page',
|
|
14
|
+
'cms_edit_edit_article',
|
|
14
15
|
'cms_edit_index_sync',
|
|
15
16
|
'cms_edit_create_page',
|
|
17
|
+
'cms_edit_create_article',
|
|
16
18
|
'cms_edit_create_from_doc',
|
|
19
|
+
'cms_edit_create_article_from_doc',
|
|
17
20
|
'cms_edit_taxonomy',
|
|
18
21
|
];
|
|
19
22
|
export const GETTING_STARTED_INFO = {
|
package/dist/mcp/guide.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guide.js","sourceRoot":"","sources":["../../src/mcp/guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAUrE,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,UAAU;IACV,UAAU;IACV,UAAU;IACV,iBAAiB;IACjB,QAAQ;CACT,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAErD,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,iBAAiB;IACjB,kBAAkB;IAClB,oBAAoB;IACpB,qBAAqB;IACrB,sBAAsB;IACtB,0BAA0B;IAC1B,mBAAmB;CACX,CAAC;AAEX,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,WAAW,EAAE,kBAAkB;IAC/B,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;IAChC,QAAQ,EAAE,eAAe;CACjB,CAAC;AAEX,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AAEhD,MAAM,cAAc,GAAoD;IACtE,QAAQ,EAAE,kBAAkB;IAC5B,QAAQ,EAAE,sCAAsC;IAChD,eAAe,EAAE,oBAAoB;IACrC,MAAM,EAAE,2BAA2B;CACpC,CAAC;AAEF,MAAM,UAAU,uBAAuB;IACrC,OAAO,qBAA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