@bettercms-ai/mcp 0.66.0 → 0.66.1
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/dist/index.js +14 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2277,10 +2277,10 @@ var STRUCTURE_EXAMPLE_PAYLOAD = {
|
|
|
2277
2277
|
doc: {
|
|
2278
2278
|
schema: 1,
|
|
2279
2279
|
folders: [
|
|
2280
|
-
{ id: "home:pages", parentId: null, name: "Other pages", icon: "
|
|
2280
|
+
{ id: "home:pages", parentId: null, name: "Other pages", icon: "documents", sort: 1e3 },
|
|
2281
2281
|
{ id: "home:collections", parentId: null, name: "Shared", icon: null, sort: 1001 },
|
|
2282
|
-
{ id: "fld_std_blog", parentId: null, name: "Blog posts", icon: "
|
|
2283
|
-
{ id: "fld_std_products", parentId: null, name: "Products", icon: "
|
|
2282
|
+
{ id: "fld_std_blog", parentId: null, name: "Blog posts", icon: "document-text", sort: 0 },
|
|
2283
|
+
{ id: "fld_std_products", parentId: null, name: "Products", icon: "basket", sort: 1 }
|
|
2284
2284
|
],
|
|
2285
2285
|
items: [
|
|
2286
2286
|
{ kind: "page", id: "pg_home", folderId: "home:root", sort: 0, icon: null },
|
|
@@ -2293,7 +2293,7 @@ var STRUCTURE_EXAMPLE_PAYLOAD = {
|
|
|
2293
2293
|
{ kind: "collection", id: "cm_tags", folderId: "home:collections", sort: 0, icon: null },
|
|
2294
2294
|
{ kind: "page", id: "pg_about", folderId: "home:pages", sort: 0, icon: null },
|
|
2295
2295
|
{ kind: "page", id: "pg_contact", folderId: "home:pages", sort: 1, icon: null },
|
|
2296
|
-
{ kind: "page", id: "pg_404", folderId: "home:pages", sort: 2, icon: "
|
|
2296
|
+
{ kind: "page", id: "pg_404", folderId: "home:pages", sort: 2, icon: "code" }
|
|
2297
2297
|
]
|
|
2298
2298
|
}
|
|
2299
2299
|
};
|
|
@@ -2337,8 +2337,9 @@ ever changes.
|
|
|
2337
2337
|
7. **Settings closes the sidebar.** \`home:globals\` ("Settings") holds NO pages or collections \u2014
|
|
2338
2338
|
navigation, header, footer, site settings and SEO defaults open from it in the dashboard. The
|
|
2339
2339
|
three system folders always sort BELOW the folders you make: \u2026 Other pages, Shared, Settings.
|
|
2340
|
-
8. **Icons** (
|
|
2341
|
-
for docs, \`
|
|
2340
|
+
8. **Icons** (kit names, bettercms://icons/dock): \`document-text\` for posts, \`basket\` for products,
|
|
2341
|
+
\`book\` for docs, \`documents\` for Other pages, \`folder\` by default. Lucide names already stored
|
|
2342
|
+
still draw.
|
|
2342
2343
|
9. **Depth:** nest at most 2 levels by default. The hard limit is 4; do not use it without a
|
|
2343
2344
|
reason the user gave you.
|
|
2344
2345
|
10. **Organisation only.** Never rename a page, change a slug, touch a schema or move content to
|
|
@@ -2367,8 +2368,8 @@ What the structure writes refuse, and the code each refusal carries:
|
|
|
2367
2368
|
refuses a kind mismatch: it returns \`warnings\` and \`kindMismatches\` instead.
|
|
2368
2369
|
- **Page-bound models** are refused with 400 \`NAV_PAGE_BOUND_MODEL\` naming their page; organise
|
|
2369
2370
|
the page, by its page id.
|
|
2370
|
-
- **Shape:** folders nest at most 4 levels deep; names are 1-80 characters; icons are
|
|
2371
|
-
names (a-z, 0-9, dashes) and null clears one.
|
|
2371
|
+
- **Shape:** folders nest at most 4 levels deep; names are 1-80 characters; icons are kit
|
|
2372
|
+
names (bettercms://icons/dock; a-z, 0-9, dashes) and null clears one.
|
|
2372
2373
|
- **Access:** 403 \`SCHEMA_ACCESS_REQUIRED\` (rule 12).
|
|
2373
2374
|
- **Version:** 412 \`VERSION_CONFLICT\` (workflow step 4).
|
|
2374
2375
|
|
|
@@ -3568,7 +3569,7 @@ function buildToolDefs(deps) {
|
|
|
3568
3569
|
projectId: z.string().min(1).optional().describe("required only for a workspace-scoped grant")
|
|
3569
3570
|
});
|
|
3570
3571
|
const layoutBinding = z.object({ inputId: z.string().min(1), fieldId: z.string().min(1) });
|
|
3571
|
-
const layoutIcon = z.string().min(1).max(80).regex(/^(?:[a-z0-9]+(?:-[a-z0-9]+)*|[A-Z][A-Za-z0-9]+)$/).refine((value) => LAYOUT_SECTION_ICON_SET.has(value), "Select a
|
|
3572
|
+
const layoutIcon = z.string().min(1).max(80).regex(/^(?:[a-z0-9]+(?:-[a-z0-9]+)*|[A-Z][A-Za-z0-9]+)$/).refine((value) => DOCK_ICON_NAME_SET.has(value) || LAYOUT_SECTION_ICON_SET.has(value), "Select a kit icon (bettercms://icons/dock) or a legacy Lucide icon").describe("kit icon name from bettercms://icons/dock (e.g. 'document-text'); legacy Lucide names (kebab-case or CamelCase) remain accepted");
|
|
3572
3573
|
const sectionTarget = { sectionId: z.string().min(1) };
|
|
3573
3574
|
const layoutCommand = z.discriminatedUnion("type", [
|
|
3574
3575
|
z.object({ type: z.literal("set-section-values"), ...sectionTarget, values: z.record(z.string(), z.unknown()) }),
|
|
@@ -3842,7 +3843,7 @@ ${d.outline}` : "Proposed Content structure.", d);
|
|
|
3842
3843
|
def(
|
|
3843
3844
|
"set_content_structure",
|
|
3844
3845
|
"Replace the Content sidebar structure",
|
|
3845
|
-
`Replace the whole Content sidebar document in one write. Follow the structure standard (read ${STRUCTURE_PLAYBOOK_URI} first; suggest_content_structure returns a ready doc). Send the complete \`doc\` and the \`version\` get_content_structure returned (0 when the project has none yet). Validated exactly like the dashboard: unique folder ids, every parentId/folderId a folder in the doc, no cycles, depth \u22644, names 1-80 chars, lucide
|
|
3846
|
+
`Replace the whole Content sidebar document in one write. Follow the structure standard (read ${STRUCTURE_PLAYBOOK_URI} first; suggest_content_structure returns a ready doc). Send the complete \`doc\` and the \`version\` get_content_structure returned (0 when the project has none yet). Validated exactly like the dashboard: unique folder ids, every parentId/folderId a folder in the doc, no cycles, depth \u22644, names 1-80 chars, icons are kit names (bettercms://icons/dock; legacy lucide names still draw). A 412 VERSION_CONFLICT means someone changed it since you read it: read again and re-apply. Returns the new version and a diff. ${STRUCTURE_FENCE}`,
|
|
3846
3847
|
z.object({
|
|
3847
3848
|
doc: z.object({
|
|
3848
3849
|
schema: z.literal(1),
|
|
@@ -3850,7 +3851,7 @@ ${d.outline}` : "Proposed Content structure.", d);
|
|
|
3850
3851
|
id: z.string().min(1).describe("your own stable id, up to 64 chars"),
|
|
3851
3852
|
parentId: z.string().nullable().describe("parent folder id; null = top level"),
|
|
3852
3853
|
name: z.string(),
|
|
3853
|
-
icon: z.string().nullable().describe("
|
|
3854
|
+
icon: z.string().nullable().describe("kit icon name (bettercms://icons/dock) or null"),
|
|
3854
3855
|
sort: z.number()
|
|
3855
3856
|
})),
|
|
3856
3857
|
items: z.array(z.object({
|
|
@@ -3872,7 +3873,7 @@ ${d.outline}` : "Proposed Content structure.", d);
|
|
|
3872
3873
|
z.object({
|
|
3873
3874
|
name: z.string().min(1).describe("the folder's label, 1-80 chars"),
|
|
3874
3875
|
parentId: z.string().min(1).optional().describe("optional parent folder id (from get_content_structure); omit it, or send 'root', for the top level"),
|
|
3875
|
-
icon: z.string().min(1).optional().describe("optional
|
|
3876
|
+
icon: z.string().min(1).optional().describe("optional kit icon name (bettercms://icons/dock), e.g. 'folder'")
|
|
3876
3877
|
}).shape,
|
|
3877
3878
|
async (c, a) => structureResult(await data(c, "POST", `/management/content-structure/folders`, { name: a.name, parentId: a.parentId, icon: a.icon }))
|
|
3878
3879
|
),
|
|
@@ -3938,7 +3939,7 @@ ${d.outline}` : "Proposed Content structure.", d);
|
|
|
3938
3939
|
"what the id IS on this branch \u2014 VERIFIED, not assumed: an id is either a page or a collection, never both, and a mismatch is refused with 400 NAV_KIND_MISMATCH naming the kind to use. Call it again with that kind, which also clears the wrong-kind entry."
|
|
3939
3940
|
),
|
|
3940
3941
|
id: z.string().min(1).describe("the page id, collection (content model) id, or folder id"),
|
|
3941
|
-
icon: z.string().min(1).nullable().describe("
|
|
3942
|
+
icon: z.string().min(1).nullable().describe("kit icon name (bettercms://icons/dock), e.g. 'document-text'; null clears it")
|
|
3942
3943
|
}).shape,
|
|
3943
3944
|
async (c, a) => structureResult(await data(c, "POST", `/management/content-structure/icon`, { kind: a.kind, id: a.id, icon: a.icon }))
|
|
3944
3945
|
),
|