@bettercms-ai/mcp 0.75.0 → 0.76.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/dist/index.js
CHANGED
|
@@ -3005,6 +3005,7 @@ var PARAM_TEXT = {
|
|
|
3005
3005
|
componentPreview: "a slot row's look: {title?, subtitle?, media?} TOP-LEVEL prop keys, fallback?, icon?; null clears. \xA73 of bettercms://playbook/schema",
|
|
3006
3006
|
componentIcon: "the block icon, a dock icon name; null clears. \xA73 of bettercms://playbook/schema",
|
|
3007
3007
|
componentTabs: "/kit tabs no top-level prop sits in: [{id,label,icon?,order?}]. \xA73 of bettercms://playbook/schema",
|
|
3008
|
+
componentKitEntry: "the bettercms://kit entry id its V2 dock UI follows (422 kit_entry_unknown otherwise); null clears. The setup gate's dock row needs one",
|
|
3008
3009
|
describes: "for editors: what it is and holds; omitted: written for you",
|
|
3009
3010
|
runtimeBundle: "instead of pageId: the server-app bundle cleanup",
|
|
3010
3011
|
pageRef: "page id or path ('/de/about'); a bare slug only when one page has it",
|
|
@@ -4114,6 +4115,7 @@ function buildToolDefs(deps) {
|
|
|
4114
4115
|
preview: componentPreviewArg.optional(),
|
|
4115
4116
|
icon: dockIconArg.nullable().optional().describe(PARAM_TEXT.componentIcon),
|
|
4116
4117
|
tabs: z.array(z.object({ id: z.string(), label: z.string(), icon: z.string().optional(), order: z.number().int().optional() })).nullable().optional().describe(PARAM_TEXT.componentTabs),
|
|
4118
|
+
kitEntry: z.string().min(1).max(100).nullable().optional().describe(PARAM_TEXT.componentKitEntry),
|
|
4117
4119
|
blockJson: z.array(blockObject).default([]).describe("the component's block tree"),
|
|
4118
4120
|
props: z.array(componentPropObject).default([]).describe(
|
|
4119
4121
|
"overridable fields. DECLARE A PROP \u2014 WITH A `target` \u2014 for every string, link and image a marketer will ever touch: only the leaves a prop targets are click-to-edit. Each one may carry `ui` to say how its control presents in the inspector \u2014 a collapsed group, what titles and thumbnails a table's rows, whether that table's rows can be dragged at all. 'button' is ONE unit {label, href, variant?, size?, arrow?, icon?, newTab?} on a button block's 'props', never a text prop plus a url prop. 'link' an href, 'date' YYYY-MM-DD, 'color' a hex, 'file' {url, name?}, 'icon' an icon name or an image, 'multiselect' a string[] from config.options (required). " + SLOT_MULTIPLE_NOTE + " " + PROP_V2_NOTE
|
|
@@ -4132,6 +4134,7 @@ function buildToolDefs(deps) {
|
|
|
4132
4134
|
description: z.string().optional(),
|
|
4133
4135
|
preview: componentPreviewArg.optional(),
|
|
4134
4136
|
icon: dockIconArg.nullable().optional().describe(PARAM_TEXT.componentIcon),
|
|
4137
|
+
kitEntry: z.string().min(1).max(100).nullable().optional().describe(PARAM_TEXT.componentKitEntry),
|
|
4135
4138
|
blockJson: z.array(blockObject).optional().describe("REPLACES the block tree"),
|
|
4136
4139
|
props: z.array(componentPropObject).optional().describe(
|
|
4137
4140
|
"REPLACES the prop array \u2014 include every prop you want to keep, WITH its stored `ui`, or that prop's authoring chrome is dropped along with the prop. Read get_component first."
|
|
@@ -6252,10 +6255,12 @@ ${lines.join("\n")}`, found);
|
|
|
6252
6255
|
},
|
|
6253
6256
|
handler: guard(
|
|
6254
6257
|
async (args) => withClient(async (client) => {
|
|
6255
|
-
const
|
|
6258
|
+
const res = await client.extractComponent(args);
|
|
6259
|
+
const { component, replaced } = res;
|
|
6260
|
+
const kit = res.kit;
|
|
6256
6261
|
return ok(
|
|
6257
6262
|
`Created component '${component.name}' (id ${component.id}) and repointed ${replaced} sections to it. Page drafts changed; publish those pages to make it live.`,
|
|
6258
|
-
{ ...component, nextAction: DOCK_UI_NEXT }
|
|
6263
|
+
{ ...component, ...kit ? { kit } : {}, nextAction: DOCK_UI_NEXT }
|
|
6259
6264
|
);
|
|
6260
6265
|
})
|
|
6261
6266
|
)
|
|
@@ -6516,6 +6521,10 @@ DERIVED by \`editor_setup\`, where the componentize lane in \xA710 reuses every
|
|
|
6516
6521
|
mcp notes and avoid its pitfalls (tag rules below).
|
|
6517
6522
|
Its props carry NO target: give each one a target
|
|
6518
6523
|
into YOUR blockJson (\xA73) before create_component
|
|
6524
|
+
Every component names its kitEntry
|
|
6525
|
+
(bettercms://kit/entry/{id}); its ui follows that
|
|
6526
|
+
entry; override the match when it's wrong; exempt
|
|
6527
|
+
with no-kit-match only with a note
|
|
6519
6528
|
Repeated visual region on a page? -> a COMPONENT with sectionType (a Section)
|
|
6520
6529
|
...and it comes in more than one look? -> siblings sharing that sectionType = VARIANTS
|
|
6521
6530
|
A stack of mixed, reorderable content? -> kind:'block' models + a \`modular\` field
|