@mapled/mcp 0.14.0 → 0.14.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/README.md +1 -1
- package/dist/tools.js +8 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ A rename or a conversion Mapled wouldn't take is refused at once with the reason
|
|
|
66
66
|
| `add_records` | Insert draft records |
|
|
67
67
|
| `list_records` | Read a collection's draft records, newest edit first — `query` searches their content, `limit` (1–200) and `cursor` (the previous answer's `nextCursor`) page through them; `total` counts every match |
|
|
68
68
|
| `create_form` / `list_forms` | Set up public forms with spam protection |
|
|
69
|
-
| `get_connection` | The delivery key and the API URL, plus — for the `framework` the agent names (`nextjs`, `react-spa`, `plain-html`, …) or the project's own — the package
|
|
69
|
+
| `get_connection` | The delivery key and the API URL, plus — for the `framework` the agent names (`nextjs`, `react-spa`, `plain-html`, …) or the project's own — the package the site reads through (`@mapled/next`, `@mapled/react`, `@mapled/vanilla` — a script tag and `data-mapled-*` attributes for plain HTML — or `@mapled/client`), the env var of the key, whether the site renders on a server or in the browser, and the wire-up steps. Image values → `assetUrl(id, { width })` of the same package |
|
|
70
70
|
| `set_site_url` | Where the site is deployed — for a site rendered in the browser (a React single-page app, plain HTML), which has no webhook to learn it from: Preview opens the site there, verification checks that it answers |
|
|
71
71
|
| `push_site_manifest` / `list_bindings` | Tell Mapled where each field is rendered; read every binding's health (type mismatch, outdated, missing on site). Keep the repository's copy in `mapled/manifest.json` — `npx @mapled/cli scan --write` derives it from the code and `bindings push` / `bindings pull` exchange it with Mapled. A push records the integration hash — the schema and these bindings — and `list_bindings` says whether it still matches (`integration.inSync`, with `schemaChanged` / `bindingsChanged` naming what moved) |
|
|
72
72
|
| `configure_revalidation` | Point the publish webhook at the site (one with a server that caches what it reads), get the signing secret; the description also tells the agent how to add live updates for tabs that are already open (`createReleaseHandler` and `<MapledLive />`, `@mapled/next` 0.8.0+) |
|
package/dist/tools.js
CHANGED
|
@@ -289,7 +289,8 @@ export function createTools(api) {
|
|
|
289
289
|
"collections or fields. `framework` is what the site is built with, as a short key: \"nextjs\", " +
|
|
290
290
|
"\"react-spa\" (a React single-page app — Vite and the like), \"plain-html\", or astro, remix, nuxt, " +
|
|
291
291
|
"sveltekit…; react-spa and plain-html tell Mapled the site renders in the browser, so verification " +
|
|
292
|
-
"expects no webhook and no preview route. " +
|
|
292
|
+
"expects no webhook and no preview route. A plain HTML page that shows one record keeps the slug in its " +
|
|
293
|
+
"query — name it \"/post.html?slug=[slug]\", with a route_param binding on the slug field. " +
|
|
293
294
|
"The answer's manifest.integrationHash is the hash of the schema and these " +
|
|
294
295
|
"bindings — what the site is synced with from now on; check_integration reports inSync against it. " +
|
|
295
296
|
"Needs the builder plan.",
|
|
@@ -492,14 +493,17 @@ export function createTools(api) {
|
|
|
492
493
|
"for the site's framework (`sdk`), the env var the key goes in (`envVar`), how the site renders " +
|
|
493
494
|
"(`rendering`: server or browser) and `wireUp` — the steps for that framework; follow them. Pass " +
|
|
494
495
|
'`framework` as you see it in the repository: "nextjs" (@mapled/next), "react-spa" for a React ' +
|
|
495
|
-
'single-page app such as Vite (@mapled/react), "plain-html"
|
|
496
|
-
"@mapled/
|
|
496
|
+
'single-page app such as Vite (@mapled/react), "plain-html" for pages without a build step ' +
|
|
497
|
+
"(@mapled/vanilla: one script tag and data-mapled-* attributes on the elements — no reading code to " +
|
|
498
|
+
"write, wireUp lists the attributes), or another short key (astro, remix, … — " +
|
|
499
|
+
"@mapled/client on the server); left out, the project's own is used. The JavaScript packages have the same reads: " +
|
|
497
500
|
'createClient({ key }).getRecords("<collection>"), getSingle, getRecordBySlug. ' +
|
|
498
501
|
"Reads take filter ({ field: value } or { field: { gte, lt, in, contains… } }), sort, limit/offset, " +
|
|
499
502
|
"fields, and expand (relation fields, e.g. [\"author\"]) — linked records arrive under record.expanded; " +
|
|
500
503
|
"getRecordBySlug(collection, slug) reads one record by its slug field. " +
|
|
501
504
|
"Image values are asset ids: assetUrl(id, { width, format }) from the same package gives the URL of a resized variant. " +
|
|
502
|
-
"rich_text values are Markdown — render them with a Markdown component (e.g. react-markdown), never as raw HTML
|
|
505
|
+
"rich_text values are Markdown — render them with a Markdown component (e.g. react-markdown), never as raw HTML " +
|
|
506
|
+
"(@mapled/vanilla renders them itself: data-mapled-format=\"markdown\"). " +
|
|
503
507
|
"Content appears on the site only after a human presses Publish in Mapled.",
|
|
504
508
|
schema: {
|
|
505
509
|
framework: z
|