@typeroll/mcp-server 0.33.2 → 0.35.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/AGENTS.md +13 -6
- package/README.md +26 -4
- package/dist/bundled-content.js +3 -3
- package/dist/extension-cli.js +188 -0
- package/dist/index.js +6 -0
- package/dist/server.js +7 -1
- package/dist/tools/apps.js +36 -0
- package/dist/tools/forms.js +5 -7
- package/dist/version.js +1 -1
- package/package.json +6 -5
- package/skills/tr-forms.md +90 -257
package/AGENTS.md
CHANGED
|
@@ -98,6 +98,12 @@ maps to one HTTP endpoint; the actual logic runs in the customer's portal
|
|
|
98
98
|
the declared funnel, destination, page path, and resolved allowlisted
|
|
99
99
|
attribution. Navigation never waits for analytics.
|
|
100
100
|
|
|
101
|
+
- **Apps.** `list_apps`, `read_app`, and `update_app` expose the complete
|
|
102
|
+
code-defined app registry through the same admin API key used for content
|
|
103
|
+
and deploys. Read the schema before writing. Secret fields stay masked on
|
|
104
|
+
reads and encrypted at rest; omitted fields preserve their current values.
|
|
105
|
+
When `affects_build` is true, deploy after the update.
|
|
106
|
+
|
|
101
107
|
- **Page templates.** A `PageTemplate` is a Block[] tree that wraps a
|
|
102
108
|
page's body. The template contains exactly one block of type
|
|
103
109
|
`template_content_slot` — at render time that block gets replaced by
|
|
@@ -250,7 +256,7 @@ maps to one HTTP endpoint; the actual logic runs in the customer's portal
|
|
|
250
256
|
- **Forms 2.0** (template_capabilities_version ≥ 0.18.0): forms can
|
|
251
257
|
carry `steps[]` — each step is a Block[] tree mixing `form/*` field
|
|
252
258
|
blocks (text/email/phone/number, textarea, select/radio_group/
|
|
253
|
-
checkbox_group, toggle, slider, date, heading, help, consent,
|
|
259
|
+
checkbox_group, toggle, slider, date, URL, heading, help, consent,
|
|
254
260
|
hidden) with any content blocks. Place `{ type: 'core/form',
|
|
255
261
|
data: { form_id } }` on a page — the build renders step 1 + all
|
|
256
262
|
static steps with the signed token, honeypot and proof-of-work
|
|
@@ -258,9 +264,9 @@ maps to one HTTP endpoint; the actual logic runs in the customer's portal
|
|
|
258
264
|
complete, 30-day TTL on abandoned partials). Per-step validation is
|
|
259
265
|
derived from the field blocks (required/pattern/min/max) — no
|
|
260
266
|
separate field list to keep in sync. `update_form` accepts steps,
|
|
261
|
-
styles (form-scoped CSS), kind and partial_ttl_days.
|
|
262
|
-
|
|
263
|
-
|
|
267
|
+
styles (form-scoped CSS), kind and partial_ttl_days. On HTML-mode
|
|
268
|
+
pages, `<x-form id="…" />` is expanded server-side through the same
|
|
269
|
+
renderer and supports the same initial state and multi-step runtime.
|
|
264
270
|
- **`script` on custom block types** (create/update_block_type) is
|
|
265
271
|
accepted under your API key's authority — the same trust level that
|
|
266
272
|
already lets the key write `scripts_head`/`custom_css`. Every
|
|
@@ -953,9 +959,10 @@ preview.
|
|
|
953
959
|
| **Media** | `list_media`, `read_media`, `create_upload_url`, `upload_media_from_url`, `upload_media_inline`, `update_media`, `delete_media`, `finalize_media`, `finalize_all_media`, `generate_image_variants`, `suggest_alt_text_context` |
|
|
954
960
|
| **Redirects** | `list_redirects`, `create_redirect`, `delete_redirect`. `from_path` may be a PATTERN: a trailing `*` (with `:splat` in the target) or `:name` for one segment — one rule retires a whole family of dead URLs (`/category/*` → `/blogg/:splat`). Mid-path splats and query strings are refused, as is any rule that would hide a live page. |
|
|
955
961
|
| **Migration inventory** | `get_migration_readiness` (preflight — CALL FIRST on any import), `list_migration_urls`, `add_migration_urls`, `update_migration_url`, `delete_migration_url`, `verify_migration_urls`. The legacy site's URL list with LIVE coverage status (`migrated` / `redirected` / `excluded` / `unhandled`, recomputed on every read from current pages + redirects). `verify_migration_urls` is the pre-cutover check that REQUESTS every URL against the deployed site — see "Don't lose URLs in a migration" below. |
|
|
956
|
-
| **Forms** | `list_forms`, `read_form`, `create_form`, `update_form`, `delete_form`, `list_form_submissions`, `delete_form_submission` (removes one submission — e.g. cleaning up a test entry; `delete_form` with `delete_submissions` is the bulk path). **Steps (form/* block trees) are the ONLY stored model
|
|
962
|
+
| **Forms** | `list_forms`, `read_form`, `create_form`, `update_form`, `delete_form`, `list_form_submissions`, `delete_form_submission` (removes one submission — e.g. cleaning up a test entry; `delete_form` with `delete_submissions` is the bulk path). **Steps (form/* block trees) are the ONLY stored model**: pass `steps` for funnels, or `fields` for simple forms — the server converts a flat field list to a single static step. Place with a `core/form` block on block-mode pages or `<x-form id="…" />` in HTML mode. Both expand server-side to the same complete signed shell and initial state. Email/webhook actions are admin-only in the portal and excluded from agent reads/writes. |
|
|
957
963
|
| **Settings** | `update_site_settings` (whitelist) |
|
|
958
|
-
| **
|
|
964
|
+
| **Apps** | `list_apps`, `read_app`, `update_app` (admin; schema-driven config, masked secrets, redeploy when `affects_build` is true) |
|
|
965
|
+
| **Analytics attribution** | `read_funnel_attribution`, `update_funnel_attribution` (specialized Analytics module tools; admin; redeploy after changes) |
|
|
959
966
|
| **Search + bulk** | `search_pages`, `bulk_replace_text` |
|
|
960
967
|
| **Branches** | `create_branch`, `read_version`, `delete_branch`, `merge_branch` |
|
|
961
968
|
| **Deploy** | `trigger_deploy`, `list_deploys`, `get_deploy_status` |
|
package/README.md
CHANGED
|
@@ -86,6 +86,23 @@ client using it stops working immediately.
|
|
|
86
86
|
| `TYPEROLL_API_KEY` | yes | A `typeroll_live_…` bearer token. |
|
|
87
87
|
| `TYPEROLL_SITE_ID` | sometimes | Pin to a specific site. Required when using an org-scoped key over stdio (the install can only target one site at a time); auto-detected for site-scoped keys. |
|
|
88
88
|
|
|
89
|
+
## Extension developer CLI
|
|
90
|
+
|
|
91
|
+
The package also installs `typeroll`. With an organization-scoped API key,
|
|
92
|
+
an external Extension repository can use the same developer and installation
|
|
93
|
+
APIs as the portal:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
typeroll extension validate
|
|
97
|
+
typeroll extension push --draft
|
|
98
|
+
typeroll extension install --site test-site --config local-extension-config.json
|
|
99
|
+
typeroll extension promote 1.0.0
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The manifest defaults to `typeroll-extension.json`; use `--manifest` to select
|
|
103
|
+
another file. Local validation is a fast preflight. The portal always performs
|
|
104
|
+
the complete schema, compatibility, origin and asset-hash validation.
|
|
105
|
+
|
|
89
106
|
## What the agent should read first
|
|
90
107
|
|
|
91
108
|
The package ships [AGENTS.md](./AGENTS.md), a self-contained briefing
|
|
@@ -141,13 +158,18 @@ the full reference + concrete operation recipes.
|
|
|
141
158
|
vision model).
|
|
142
159
|
- **Redirects** — list, create, delete. Plus automatic 301 on slug change.
|
|
143
160
|
- **Forms** — list, read, create, update, delete, list submissions.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
161
|
+
Place forms with `core/form` blocks or an HTML-mode `<x-form id="…" />`
|
|
162
|
+
reference; preview/build expands both server-side to the same complete,
|
|
163
|
+
signed form shell. Admins configure email and allowlisted, signed webhooks
|
|
164
|
+
in the portal; action configuration stays off agent surfaces.
|
|
148
165
|
- **Settings** — read + patch, including `scripts_head` /
|
|
149
166
|
`scripts_body_end` / `custom_css` (trusted because the caller holds an
|
|
150
167
|
API key; the in-portal chat AI does NOT get these).
|
|
168
|
+
- **Apps** — list the registry, read schema + masked state, and enable,
|
|
169
|
+
configure, or disable any app with the same admin API key used for content
|
|
170
|
+
and deploys. Secret fields are encrypted server-side and never returned;
|
|
171
|
+
Analytics provisioning runs on the platform. Deploy after updates whose
|
|
172
|
+
response has `affects_build: true`.
|
|
151
173
|
- **Search** — `search_pages` with substring or regex.
|
|
152
174
|
- **Bulk** — `bulk_replace_text` with dry-run.
|
|
153
175
|
- **Branches** — create, read, delete, merge. Branch deploys get their
|