@mapled/mcp 0.14.1 → 0.15.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/README.md +2 -1
- package/dist/tools.js +10 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,8 +46,9 @@ For the first integration, propose one plan and let the owner approve it on a tr
|
|
|
46
46
|
2. `propose_setup_plan` — the collections and singles (with fields and the records to import), the files you will change, the packages you will install. Nothing changes yet. Relation fields name their target — a collection of the plan by its display name, or an existing one by key; give a record a `"$ref": "jane"` and other records of the plan link to it as `"author": "jane"` (a list of refs for `many`), while links to existing collections use record ids from `list_records`. Group fields carry their sub-fields; their values are objects keyed by the sub-field keys. Mark a field — or a sub-field of a group — `sensitive: true` when editors keep it but the site must never get it. A link that does not resolve is answered right away with its path, so fix the plan before the owner sees it.
|
|
47
47
|
3. Ask the user to open the returned `reviewUrl` and approve. Poll `get_setup_run` until its status is `approved` (or `rejected` — then propose a better plan).
|
|
48
48
|
4. `apply_setup_plan` — Mapled creates everything in one go and tells you the keys it assigned.
|
|
49
|
-
5. Wire the site: `get_connection`, then `configure_revalidation` for a site with a server — or `set_site_url` for one rendered in the browser (a React single-page app, plain HTML: no webhook, no preview route) —
|
|
49
|
+
5. Wire the site: `get_connection`, then `configure_revalidation` for a site with a server — or `set_site_url` for one rendered in the browser (a React single-page app, plain HTML: no webhook, no preview route) — and deploy.
|
|
50
50
|
6. Leave a guide: `get_mapled_md` renders `MAPLED.md` from the project — what the site reads and where, the content model, the working rules, the commands that verify the integration. Write it to the repository root and commit it; the next agent (or person) starts from it. When the file exists, replace everything above its `<!-- mapled:notes -->` line and keep the notes below.
|
|
51
|
+
7. Close with `report_setup` (files changed, `buildPassed`, `secretsCommitted: false`, `mapledMdWritten: true`). Mapled runs its own checks — the site reads content, the webhook delivered, the preview route responds, fields have help texts, MAPLED.md was written — and the run is completed only when they pass. Fix what failed and call `verify_setup`. The result lands in the file's «Last setup run» section, so call `get_mapled_md` once more when the run is settled and commit the refreshed file.
|
|
51
52
|
|
|
52
53
|
## Destructive and breaking changes
|
|
53
54
|
|
package/dist/tools.js
CHANGED
|
@@ -160,17 +160,21 @@ export function createTools(api) {
|
|
|
160
160
|
name: "apply_setup_plan",
|
|
161
161
|
description: "Apply an approved setup plan. Mapled creates the collections, fields and records in one go and returns " +
|
|
162
162
|
"what was created (keys, counts) plus warnings for records it had to skip. Then wire the site " +
|
|
163
|
-
"(get_connection, configure_revalidation), write MAPLED.md (get_mapled_md)
|
|
163
|
+
"(get_connection, configure_revalidation), write MAPLED.md (get_mapled_md), finish with report_setup and " +
|
|
164
|
+
"refresh MAPLED.md once more.",
|
|
164
165
|
schema: { runId: z.string().uuid() },
|
|
165
166
|
handler: async (args) => api.request("POST", `/v1/agent/runs/${encodeURIComponent(args.runId)}/apply`, {}),
|
|
166
167
|
},
|
|
167
168
|
{
|
|
168
169
|
name: "report_setup",
|
|
169
170
|
description: "Close a setup run with your report: the files you changed, what stayed hardcoded, warnings the owner " +
|
|
170
|
-
"should know about, whether the site builds (buildPassed)
|
|
171
|
-
"(secretsCommitted: false)
|
|
171
|
+
"should know about, whether the site builds (buildPassed), that no secrets were committed " +
|
|
172
|
+
"(secretsCommitted: false) and whether you wrote MAPLED.md from get_mapled_md before this call " +
|
|
173
|
+
"(mapledMdWritten), plus the preview URL if the site is deployed. Mapled then runs its own " +
|
|
172
174
|
"checks (site reads content, webhook delivered, preview route responds, help texts) and returns them; " +
|
|
173
|
-
"the run is completed only when every check passes — fix what failed and call verify_setup."
|
|
175
|
+
"the run is completed only when every check passes — fix what failed and call verify_setup. The report " +
|
|
176
|
+
"and the checks change the file's «Last setup run» section, so once the run is settled call get_mapled_md " +
|
|
177
|
+
"again and rewrite MAPLED.md — a refresh keeps the check passed and the file current.",
|
|
174
178
|
schema: {
|
|
175
179
|
runId: z.string().uuid(),
|
|
176
180
|
filesChanged: z.array(z.string().max(300)).max(50).optional(),
|
|
@@ -179,6 +183,7 @@ export function createTools(api) {
|
|
|
179
183
|
previewUrl: z.string().url().optional(),
|
|
180
184
|
buildPassed: z.boolean().optional(),
|
|
181
185
|
secretsCommitted: z.boolean().optional(),
|
|
186
|
+
mapledMdWritten: z.boolean().optional(),
|
|
182
187
|
},
|
|
183
188
|
handler: async (args) => {
|
|
184
189
|
const { runId, ...body } = args;
|
|
@@ -551,7 +556,7 @@ export function createTools(api) {
|
|
|
551
556
|
"repository root and commit it. If the file exists, replace everything above its `<!-- mapled:notes -->` " +
|
|
552
557
|
"line and keep what is below — that part belongs to the repository. Its first line is a stamp with the " +
|
|
553
558
|
"schema hash, the manifest version and the integration hash. Refresh it after every schema or " +
|
|
554
|
-
"manifest change and at the end of a setup; `npx @mapled/cli md pull` does the same from the repository " +
|
|
559
|
+
"manifest change and at the end of a setup, after report_setup or verify_setup; `npx @mapled/cli md pull` does the same from the repository " +
|
|
555
560
|
"and `mapled doctor` says when it is out of date. It never contains a secret — don't add one.",
|
|
556
561
|
schema: {},
|
|
557
562
|
handler: async () => api.request("GET", "/v1/agent/mapled-md"),
|