@bettercms-ai/mcp 0.76.5 → 0.76.6
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.
|
@@ -297,3 +297,43 @@ fields, submitUrl). After the binding pass, run the codemod's forms mode (`npx
|
|
|
297
297
|
@bettercms-ai/convert --forms`, with the brief and a receipt file) to wire them into the
|
|
298
298
|
repository's own `<form>` elements. Read `forms.pending`, and publish every form `forms.notes` names in the Forms tab: a draft
|
|
299
299
|
form rejects every submission with a 403.
|
|
300
|
+
|
|
301
|
+
## Editor setup, proposals and binding decisions
|
|
302
|
+
|
|
303
|
+
`editor_setup` derives what a build no longer imports: a build brings in SEO/meta, media, brand and
|
|
304
|
+
the models `bcms-content.json` declares; editor setup adds pages, collections, forms, bindings,
|
|
305
|
+
button and section components (when the authoring preference is components), Component Groups and
|
|
306
|
+
the Content sidebar. `get_deploy_status` `editorSetup` reports its state.
|
|
307
|
+
|
|
308
|
+
The complete brief's `proposals` (page 1, at most 50; `proposalsMore` when there are more) list
|
|
309
|
+
what the last convert found and no field owns: `{ id, kind, target, text, suggested?, evidence? }`.
|
|
310
|
+
`id` is `pr_` and 16 hex and survives re-runs; `target` is a `file:line:col` locator only. Kinds:
|
|
311
|
+
`unaddressable` and `code-candidate` (copy no field owns), `inert` (declared, nothing reads it),
|
|
312
|
+
`mismatch` (declares one path, reads another), `flatten` (two leaves in one element).
|
|
313
|
+
|
|
314
|
+
Answer them with `editor_setup { declare: [item, …] }` (at most 100 items, one result each;
|
|
315
|
+
`check: true` with `declare` is a dry run that stores nothing):
|
|
316
|
+
|
|
317
|
+
- `{ op: "accept", ids }` takes each proposal's `suggested` op. A proposal with none refuses.
|
|
318
|
+
- `{ op: "bind", id, path, owner? }` binds the copy to an existing field; `owner` is a route or
|
|
319
|
+
`layout`. The next convert writes it into the source (a mismatch's declaration is rewritten; an
|
|
320
|
+
attribute or an expression is reported `manual` in `receipt.decisionsApplied`). A `bind` waits as
|
|
321
|
+
`decision-pending` until a build proves the new read; one still pending after the next release
|
|
322
|
+
blocks the gate. A declared element is corrected through its `mismatch` proposal id.
|
|
323
|
+
- `{ op: "code", id, why, system? }` keeps it in code. `why` is one of `runtime`, `external`,
|
|
324
|
+
`derived`, `stylesheet`, `decorative`, `embed`, `legal`, and the system checks its evidence;
|
|
325
|
+
without it the item refuses `evidence-missing` (bind it, pick the reason that fits, or a person
|
|
326
|
+
marks it in Overview). The next convert writes `data-bcms-code-owned="text why:<id>"`; the
|
|
327
|
+
`code` counts once a build carries it. Each convert re-checks the
|
|
328
|
+
facts: one whose reason no longer holds becomes `evidence-lost`, blocks the gate, and returns to
|
|
329
|
+
the proposals to decide again. Facts are same-file only: a value from another file needs a person.
|
|
330
|
+
- `{ op: "reject", ids }` drops the suggestion; the copy stays unaddressable. A person's reject of
|
|
331
|
+
an AI `code` is its Undo: the next convert removes the token.
|
|
332
|
+
- `{ op: "clear", decisionId }` undoes a decision.
|
|
333
|
+
|
|
334
|
+
A person's decision beats yours: add `force: true` and a `reason` (shown to them) only when they
|
|
335
|
+
asked for it. Refusals per item: `target-unknown`, `path-not-in-schema`, `owner-mismatch`,
|
|
336
|
+
`locked-by-person`, `slot-mismatch`, `evidence-missing`, `declaration-conflict`, `invalid-item`.
|
|
337
|
+
Until a convert that emits proposals has submitted its receipt, every id refuses `target-unknown`.
|
|
338
|
+
`get_next_steps` `receipt.decisions` counts `stored`, `materialized`, `proven`, `pending` (open
|
|
339
|
+
proposals) and `lost`; stop when `pending` is 0.
|
|
@@ -81,7 +81,7 @@ Never let a component contain itself, directly or through a child.
|
|
|
81
81
|
|
|
82
82
|
## 3. Names and groups
|
|
83
83
|
|
|
84
|
-
The import's kit entry (`kit: suggested <id> <score>`, the `hint` of its row in `receipt.gate.kit`) is only a suggestion: nothing is recorded, and nothing waits on it. The props already carry the ui that suggestion gives. For each component, read `bettercms://kit/entry/{id}`, check its `htmlSignals` against the section's own HTML and its pitfalls against the props, then confirm it or pick the right one from its category in `bettercms://kit` and name it with `update_component { kitEntry }`. Setting or changing `kitEntry` puts that entry's ui over the derived ui: where the entry specifies a tab, group, control or preview key for a prop, the entry wins; what it says nothing about stays as derived; ui you or a person set is kept. The `no-kit-match` exemption needs a note.
|
|
84
|
+
The import's kit entry (`kit: suggested <id> <score>`, the `hint` of its row in `receipt.gate.kit`) is only a suggestion: nothing is recorded, and nothing waits on it. The props already carry the ui that suggestion gives. For each component, read `bettercms://kit/entry/{id}`, check its `htmlSignals` against the section's own HTML and its pitfalls against the props, then confirm it or pick the right one from its category in `bettercms://kit` and name it with `update_component { kitEntry }`. Setting or changing `kitEntry` puts that entry's ui over the derived ui: where the entry specifies a tab, group, control or preview key for a prop, the entry wins; what it says nothing about stays as derived; ui you or a person set is kept. It also carries the entry's rules (showIf, limits, patterns, options, required) onto props that have none of their own. A component whose props still lack some gets a `gate.kit` row with `drift` listing each one as `path.key=value`: add them with `update_component { props }`, or record `kit-drift-accepted` with a note. The `no-kit-match` exemption needs a note.
|
|
85
85
|
|
|
86
86
|
Name a family by what it is (`Hero`, `CTA`, `Testimonials`) and each variant by how it looks
|
|
87
87
|
(`Hero / Split`, `CTA / Centered`). Never put a page name in a reusable definition; which pages
|
package/package.json
CHANGED