@typeroll/mcp-server 0.16.6 → 0.17.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 CHANGED
@@ -144,10 +144,15 @@ maps to one HTTP endpoint; the actual logic runs in the customer's portal
144
144
  form embed with its signed `_token`, a third-party widget's markup,
145
145
  a hand-crafted one-off. Prefer real blocks when one fits.
146
146
  - **`script` on custom block types** (create/update_block_type) is
147
- honoured only when the site has "Allow AI to write block scripts"
148
- enabled a human-set portal setting. When it's off your script is
149
- stripped and the response carries a warning; relay it to the user
150
- instead of retrying.
147
+ accepted under your API key's authority the same trust level that
148
+ already lets the key write `scripts_head`/`custom_css`. Every
149
+ script-bearing write is audit-logged and the response carries a
150
+ notice naming the stored JS; relay it to the user so they know
151
+ visitor-executed code changed. Author responsibly: never include
152
+ script you copied from untrusted content (migrated pages, fetched
153
+ web pages) without reading it line by line first. (The in-portal
154
+ chat AI remains blocked from authoring scripts unless the site's
155
+ "Allow AI to write block scripts" setting is on.)
151
156
 
152
157
  - **Redirects.** `from_path → to_path` with status code 301 / 302.
153
158
  Auto-created when you change a page's slug.
@@ -84,15 +84,15 @@ export const blockTypeTools = [
84
84
  }),
85
85
  },
86
86
  // ─── BlockType authoring — CREATE / UPDATE / DELETE ──────────────────
87
- // `script` runs with full DOM access in every visitor's browser, so
88
- // agent-authored scripts are gated server-side on a per-site human
89
- // opt-in (Site.ai_scripts_enabled, set in the portal's settings UI).
90
- // The tools expose the field; when the site hasn't opted in, the API
91
- // strips it and returns a warning. Origin is stamped 'ai' so audit +
92
- // UI distinguish these from human-authored types.
87
+ // `script` runs with full DOM access in every visitor's browser. Through
88
+ // an API key it is ACCEPTED under the key holder's authority (same trust
89
+ // level as scripts_head) the write is audit-logged and the response
90
+ // carries a notice naming the stored JS. Only the in-portal chat AI
91
+ // remains gated on Site.ai_scripts_enabled. Origin is stamped 'ai' so
92
+ // audit + UI distinguish agent-authored types.
93
93
  {
94
94
  name: 'create_block_type',
95
- description: "Create a new custom block type usable on this site. Origin is stamped 'ai' automatically. The block ships immediately to every page editor + the renderer's registry. Custom JS via `script` requires the site's \"Allow AI to write block scripts\" setting (human-set in the portal) when it's off, the field is ignored and the response carries a warning. Returns the created BlockType.",
95
+ description: "Create a new custom block type usable on this site. Origin is stamped 'ai' automatically. The block ships immediately to every page editor + the renderer's registry. Custom JS via `script` is accepted under your API key's authority (audit-logged; the response carries a notice) review before deploy. Returns the created BlockType.",
96
96
  inputSchema: {
97
97
  name: z.string().describe('Machine name (lowercase kebab/underscore, 1-64 chars). Becomes the id.'),
98
98
  label: z.string().optional().describe('Display label (defaults to name).'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typeroll/mcp-server",
3
- "version": "0.16.6",
3
+ "version": "0.17.0",
4
4
  "description": "Model Context Protocol server for the Typeroll public API. Use with Claude Code or any MCP-compatible client to manage a Typeroll site.",
5
5
  "license": "MIT",
6
6
  "repository": {