@bettercms-ai/mcp 0.81.0 → 0.82.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 +48 -3
- package/dist/index.js.map +1 -1
- package/dist/skills/bettercms/SKILL.md +5 -4
- package/dist/skills/bettercms/references/frameworks.md +2 -2
- package/dist/skills/bettercms/references/getting-started.md +23 -1
- package/dist/skills/bettercms/references/other-frameworks.md +3 -1
- package/dist/skills/bettercms/references/publishing.md +1 -1
- package/package.json +1 -1
|
@@ -72,9 +72,10 @@ These hold on every task. The reference in brackets has the detail and the codes
|
|
|
72
72
|
5. **Name the folder system every time you say "folder"**: Content sidebar folders never touch a
|
|
73
73
|
URL, URL page folders are part of the path, media folders organise assets.
|
|
74
74
|
[content-modeling.md]
|
|
75
|
-
6. **Headless projects are built by their host.** Never `deploy_project` or
|
|
76
|
-
`create_deploy_upload` there, never add `bcms-rebuild.yml`; deploy
|
|
77
|
-
|
|
75
|
+
6. **Headless projects are built by their host.** Never `deploy_project`, `deploy_to_host` or
|
|
76
|
+
`create_deploy_upload` there, never add `bcms-rebuild.yml`; deploy with
|
|
77
|
+
`npx @bettercms-ai/cli@latest deploy --to <host>`, or push to the repo the host builds.
|
|
78
|
+
Done = `receipt.frontEnd` closed. [getting-started.md]
|
|
78
79
|
7. **Every refusal has a code. Report it; do not retry blind.** The same call returns the same
|
|
79
80
|
code. Change the input or stop.
|
|
80
81
|
8. **Media is served by the backend that owns the asset ids.** `mediaUrl` is `mediaBaseUrl` from
|
|
@@ -123,7 +124,7 @@ resources: `bettercms://skill/bettercms` for this file, and each reference under
|
|
|
123
124
|
|
|
124
125
|
| Task | Reference | Read when | Keywords |
|
|
125
126
|
|---|---|---|---|
|
|
126
|
-
| Set up or resume a project | [getting-started.md](references/getting-started.md) | first contact, or "Continue BetterCMS setup" | setup, resume, onboarding, connect, import my site |
|
|
127
|
+
| Set up or resume a project | [getting-started.md](references/getting-started.md) | first contact, or "Continue BetterCMS setup" | setup, resume, onboarding, connect, import my site, headless, own front end, SDK, CLI |
|
|
127
128
|
| Finish an imported or converted site | [finish-site.md](references/finish-site.md) | a convert or build job; "make it fully editable"; the gap ledger | make it editable, finish, gap ledger, convert |
|
|
128
129
|
| Move content out of another CMS (Cosmic, Contentful, Sanity, Strapi, Prismic, WordPress…) | [external-content.md](references/external-content.md) | a CMS SDK in package.json; `envWarning` on import; pages that render empty without a third-party key | Contentful, Sanity, Strapi, envWarning, missing key, empty pages |
|
|
129
130
|
| Read a source site before modelling it | [detection.md](references/detection.md) | converting from a URL or built HTML; deciding what a band, a repeat or a value is | detect, classify, section, repeat, global, carousel clone, hidden state |
|
|
@@ -19,13 +19,13 @@ A project's `hostingMode` is `managed`, `hybrid` or `headless`.
|
|
|
19
19
|
|---|---|---|
|
|
20
20
|
| managed | BetterCMS | `deploy_project` / `create_deploy_upload` are the deploy path |
|
|
21
21
|
| hybrid | BetterCMS, and the client also reads content headlessly | Treat exactly like managed for builds and hosting |
|
|
22
|
-
| headless | The client's own host (Vercel, Netlify, Cloudflare Pages) | Never call `deploy_project` or `create_deploy_upload`; never add `bcms-rebuild.yml`. Deploy = push to the repo the host builds |
|
|
22
|
+
| headless | The client's own host (Vercel, Netlify, Cloudflare Pages) | Never call `deploy_project`, `deploy_to_host` or `create_deploy_upload`; never add `bcms-rebuild.yml`. Deploy = `npx @bettercms-ai/cli@latest deploy --to <host>`, or push to the repo the host builds. Done = `receipt.frontEnd` closed ([getting-started.md](getting-started.md)) |
|
|
23
23
|
|
|
24
24
|
Headless refusals, by code:
|
|
25
25
|
|
|
26
26
|
| Code | Cause | Fix |
|
|
27
27
|
|---|---|---|
|
|
28
|
-
| `HEADLESS_NO_BUILD` | A build, release or deploy was sent for a headless project | Stop; push to the provider instead |
|
|
28
|
+
| `HEADLESS_NO_BUILD` | A build, release or deploy was sent for a headless project | Stop; `bettercms deploy --to <host>` or push to the provider instead |
|
|
29
29
|
| `HEADLESS_NEEDS_CUSTOM_HOST` | GitHub connect without a provider host | Add Vercel, Netlify or Cloudflare Pages under Custom hosting in the dashboard, then connect |
|
|
30
30
|
| `HEADLESS_ARTIFACT_TARGET` | The custom host expects builds from BetterCMS | Switch the host to build from the repo |
|
|
31
31
|
|
|
@@ -38,7 +38,7 @@ Check: the MCP answers for this project id, and this folder is its repo.
|
|
|
38
38
|
failed, run the command the warning prints, inside the clone.
|
|
39
39
|
- Either way, stop and ask the user to restart you **inside** the repo folder: an MCP entry
|
|
40
40
|
added while you run loads only when the agent starts, and every step below works on that
|
|
41
|
-
folder's source.
|
|
41
|
+
folder's source. Not when `init` launched you: you already run there, connected.
|
|
42
42
|
|
|
43
43
|
### Phase 2 — No questions: the defaults are recorded
|
|
44
44
|
|
|
@@ -117,3 +117,25 @@ Check: the deployed site passes the numbers below on every route.
|
|
|
117
117
|
([site-blueprints.md](site-blueprints.md)), then build sections ([components.md](components.md)).
|
|
118
118
|
3. When a repo exists, clone it with the `init` command above, restart inside it, and continue
|
|
119
119
|
from Phase 3.
|
|
120
|
+
|
|
121
|
+
## A headless project (its own front end)
|
|
122
|
+
|
|
123
|
+
`get_project` says `hostingMode: "headless"`: BetterCMS never builds this site, its own host does.
|
|
124
|
+
Done is `receipt.frontEnd` closed in get_next_steps: the front end reads the content, has its site
|
|
125
|
+
URL, and rebuilds on publish. Work its rows in order; never `deploy_project` or `deploy_to_host`.
|
|
126
|
+
|
|
127
|
+
1. **Launched by `bettercms init`** (`--agent claude|codex|opencode|cursor|gemini`): you run in the
|
|
128
|
+
front end's folder, already connected; it is the user's existing app or a starter `init`
|
|
129
|
+
cloned. Do not ask to be restarted.
|
|
130
|
+
2. **Wire and read.** `.env` gets `BCMS_API_URL`, `BCMS_WORKSPACE` and `BCMS_PROJECT_ID` (from
|
|
131
|
+
`get_project`); published content needs no key. A starter whose config reads a key gets one
|
|
132
|
+
from `create_delivery_key` (`scope: "published"`), written straight into `.env`, never into
|
|
133
|
+
chat or a commit. Run the app and load a page: its first read closes `read`.
|
|
134
|
+
3. **Deploy.** `npx @bettercms-ai/cli@latest deploy --to vercel|netlify|cloudflare` from the
|
|
135
|
+
folder: the host's own sign-in, the `BCMS_*` variables set there, and the rebuild hook
|
|
136
|
+
registered (`publish-hook`). A front end that revalidates instead: `set_front_end
|
|
137
|
+
{ revalidation }`.
|
|
138
|
+
4. **Open it from BetterCMS.** `set_front_end { siteUrl, framework }` with the deployed URL
|
|
139
|
+
(`preview`); editors' "Preview on site" opens drafts there.
|
|
140
|
+
5. **Publish**, then get_next_steps until `receipt.complete` is true. Schema and content work is
|
|
141
|
+
the same as on any project ([content-modeling.md](content-modeling.md)).
|
|
@@ -25,7 +25,9 @@ export const bcms = createClient({
|
|
|
25
25
|
Reading published content needs no key. The platform sets `BCMS_API_URL`, `BCMS_WORKSPACE` and
|
|
26
26
|
`BCMS_PROJECT_ID` on every build and running server app, and again under each framework's public
|
|
27
27
|
prefix (`NUXT_PUBLIC_`, `PUBLIC_`, `VITE_`…); the table is in
|
|
28
|
-
[external-content.md](external-content.md).
|
|
28
|
+
[external-content.md](external-content.md). On a site BetterCMS builds, never add them to `.env`.
|
|
29
|
+
A headless front end on its own host sets them itself: in `.env` locally, and on the host by
|
|
30
|
+
`npx @bettercms-ai/cli@latest deploy --to <host>`.
|
|
29
31
|
|
|
30
32
|
| Option | Use |
|
|
31
33
|
|---|---|
|
|
@@ -49,7 +49,7 @@ that reads them.
|
|
|
49
49
|
| Hosting mode | Release path | Public proof |
|
|
50
50
|
|---|---|---|
|
|
51
51
|
| `managed` or `hybrid` | `deploy_project` or `create_deploy_upload`, then `get_deploy_status` | Cache-busted BetterCMS URL answers 200 with the intended revision |
|
|
52
|
-
| `headless` | Publish content in BetterCMS; the frontend deploys through its own host and rebuild or revalidation | The external host's URL answers 200 with the intended content and metadata |
|
|
52
|
+
| `headless` | Publish content in BetterCMS; the frontend deploys through its own host (`npx @bettercms-ai/cli@latest deploy --to <host>` the first time, which registers the rebuild hook) and rebuild or revalidation | The external host's URL answers 200 with the intended content and metadata |
|
|
53
53
|
|
|
54
54
|
A managed site renders static unless the owner switches Hosting to **Run as a server app**, which
|
|
55
55
|
must happen before an SSR build ships ([frameworks.md](frameworks.md)).
|
package/package.json
CHANGED