@bettercms-ai/mcp 0.67.0 → 0.67.3
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 +10 -4
- package/dist/index.js.map +1 -1
- package/dist/skills/bettercms/references/bindings.md +1 -1
- package/dist/skills/bettercms/references/components.md +17 -0
- package/dist/skills/bettercms/references/content-modeling.md +3 -1
- package/dist/skills/bettercms/references/dock-input.md +8 -2
- package/dist/skills/bettercms/references/getting-started.md +2 -2
- package/package.json +2 -2
|
@@ -134,7 +134,7 @@ helpers rather than by hand.
|
|
|
134
134
|
keep inside a bound element. A value with no element never reaches the page, and one that
|
|
135
135
|
would corrupt its element is refused and named.
|
|
136
136
|
- Read the report, not the screen. Clean = `coverage.pending` empty and the mode you expect. Each
|
|
137
|
-
`unmatched` reason names a fix in the source. A Global Layout Section is reported only on the
|
|
137
|
+
`unmatched` reason names a fix in the source. A field the stamped build renders on no route is flagged `stale: true` on its schema — kept, hidden in the editor, cleared by the release that binds it again — and is not listed. A Global Layout Section is reported only on the
|
|
138
138
|
routes that render it (`layoutRoutes` lists each route's Sections): a docs page on its own layout
|
|
139
139
|
is not missing the nav, so never add one there. A `fallback` flag means the build carried no
|
|
140
140
|
`bcms-brief` meta and was measured against the latest pin. Only a release creates the report;
|
|
@@ -176,6 +176,23 @@ A code-built site ships only what its templates draw, whatever the page's `block
|
|
|
176
176
|
`svg.bcms-btn-arrow` it draws; never leave a hand-written arrow `<svg>` beside it, or turning
|
|
177
177
|
the arrow off leaves one behind. A CTA whose look is hard-coded tells the editor "Style lives
|
|
178
178
|
in the site's code".
|
|
179
|
+
- **Render a CTA as one button** (the fix a 409 `CODE_RENDERED_ROUTE` names: its `next` gives the
|
|
180
|
+
`route` and the pair's `keys`). On a route the site's app renders, the code reads the keys it
|
|
181
|
+
declares, so the swap is made in code, on a branch, never on the default one:
|
|
182
|
+
1. Find the anchor. Search the repo for the keys; follow them through props and bindings tables
|
|
183
|
+
to the component that writes the `<a>` (a page passes them to a layout component, which
|
|
184
|
+
passes them to the button component).
|
|
185
|
+
2. Render it with `BcmsButton` (`@bettercms-ai/astro/components/BcmsButton.astro`, or
|
|
186
|
+
`BcmsButton` from `@bettercms-ai/next`) under ONE key: the link key without `-href`. Pass
|
|
187
|
+
`value` as the entry's button when it holds one, else `{ label, href }` from the copy and
|
|
188
|
+
href the page renders today, so nothing changes until someone edits it. Keep the anchor's
|
|
189
|
+
classes on `class`.
|
|
190
|
+
3. Remove the old pair's stamps and reads for that anchor (`data-bcms-field`, `data-bcms-props`,
|
|
191
|
+
the lookups of the two old keys). Leave other callers of a shared component working.
|
|
192
|
+
4. Open a pull request. After it is merged and the site rebuilt, run `editor_setup`, then check
|
|
193
|
+
the page: the anchor carries `data-bcms-button="<key>"` and `get_binding_report` lists no
|
|
194
|
+
unmatched path for it. The button field is added by that build and starts from the pair's
|
|
195
|
+
label and link.
|
|
179
196
|
|
|
180
197
|
## 6. Preview source
|
|
181
198
|
|
|
@@ -94,7 +94,9 @@ sitemap), RSS (dated by `publishedAt`), `llms.txt` (one link per published item)
|
|
|
94
94
|
`create_page` and model writes. A page that already holds a pair (`primaryCtaText` +
|
|
95
95
|
`primaryCtaHref`) becomes one button with `update_field` `{ pageId, path: "primaryCtaText",
|
|
96
96
|
mergeHref: "primaryCtaHref" }`: each entry's DRAFT gets `{ label, href }` and keeps the old values,
|
|
97
|
-
so code still reading them keeps rendering; the live copy changes on publish.
|
|
97
|
+
so code still reading them keeps rendering; the live copy changes on publish. On a route the
|
|
98
|
+
site's app renders at request time the merge is refused (409 `CODE_RENDERED_ROUTE`): change the
|
|
99
|
+
code to draw the CTA with `BcmsButton`, and the next build adds the button field. Inside a component
|
|
98
100
|
a CTA is a `button` block whose `props.text` and `props.href` two props target.
|
|
99
101
|
- Never model SEO columns ([seo.md](seo.md)), Form questions (they live on the Form document) or
|
|
100
102
|
Global Layout values as content fields.
|
|
@@ -83,8 +83,11 @@ bettercms/inputs/<name>.tsx
|
|
|
83
83
|
|
|
84
84
|
- `<name>` is the `ui.input.name`: lowercase letters, digits and dashes, 1 to 48 characters,
|
|
85
85
|
starting with a letter (`button-look`, `brand-swatch`).
|
|
86
|
-
- The default export is the component. The
|
|
87
|
-
speaks the protocol (section 6) so the component only deals with props.
|
|
86
|
+
- The default export is the component, and the file does nothing else. The build wraps it in
|
|
87
|
+
`mountDockInput`, which speaks the protocol (section 6), so the component only deals with props.
|
|
88
|
+
Never call `mountDockInput` in the file: the input would mount twice.
|
|
89
|
+
- The site needs `react`, `react-dom` and `@bettercms-ai/dock-input` in its `devDependencies`
|
|
90
|
+
(plus `@bettercms-ai/kit` for kit components). The build bundles them into the input.
|
|
88
91
|
- Keep it small and self-contained: kit components and the field's own data, no app imports.
|
|
89
92
|
|
|
90
93
|
## 6. Protocol summary
|
|
@@ -102,6 +105,9 @@ project's own inputs origin, never the dashboard's. `mountDockInput` handles all
|
|
|
102
105
|
## 7. Build, serve and scope
|
|
103
106
|
|
|
104
107
|
- v1 is managed sites only (BetterCMS hosting). On a headless or hybrid site, do not suggest one.
|
|
108
|
+
- The user's approval (`confirmed: true`) also switches custom inputs on for the project, unless an
|
|
109
|
+
admin switched them off in Settings → General → Visual editor; then `get_next_steps` lists
|
|
110
|
+
`dock-inputs-off`, and you tell the user instead of working around it.
|
|
105
111
|
- Once custom inputs are enabled for the project, the inputs are built with the site and served
|
|
106
112
|
on its inputs origin automatically. Push the file, wait for the build, then open the field in the
|
|
107
113
|
dock to check it.
|
|
@@ -68,8 +68,8 @@ and `get_componentize_plan` proposes nothing more.
|
|
|
68
68
|
0. A build brings in only SEO and meta, media, the brand and the models `bcms-content.json`
|
|
69
69
|
declares. Pages, collections, forms, bindings and components come from `editor_setup`: run it
|
|
70
70
|
and poll `editor_setup { check: true }` until `ready` before anything below. Run it again
|
|
71
|
-
whenever `get_deploy_status` reports `editorSetup` `stale`: a re-run
|
|
72
|
-
|
|
71
|
+
whenever `get_deploy_status` reports `editorSetup` `stale`: a re-run flags the auto fields the
|
|
72
|
+
build no longer renders `stale` (hidden in the editor, never deleted) and never one a person edited, so never delete those by hand. It also fills missing meta from the
|
|
73
73
|
page copy, merges identical components and switches to declared bindings when the build proves
|
|
74
74
|
them; the receipt stays yours (it is the codemod's account of your repo).
|
|
75
75
|
1. Explore the repo (the "Read when" column of SKILL.md's reference table names the signals) and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bettercms-ai/mcp",
|
|
3
|
-
"version": "0.67.
|
|
3
|
+
"version": "0.67.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "BetterCMS MCP server — schema, content, forms + components authoring tools over the Management API, authed via OAuth device-code.",
|
|
6
6
|
"bin": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@bettercms-ai/device-auth": "^0.2.0",
|
|
35
|
-
"@bettercms-ai/sdk": "^1.26.
|
|
35
|
+
"@bettercms-ai/sdk": "^1.26.2",
|
|
36
36
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
37
37
|
"zod": "^4.3.6"
|
|
38
38
|
},
|