@typeroll/mcp-server 0.45.130 → 0.45.132
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 +22 -3
- package/dist/bundled-content.js +3 -3
- package/dist/rest-reference.js +1 -0
- package/dist/server.js +2 -0
- package/dist/tools/pages.js +1 -1
- package/dist/tools/settings.js +2 -1
- package/dist/tools/sites.js +22 -2
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/tr-header-footer.md +8 -1
- package/skills/tr-new-site.md +1 -0
package/dist/rest-reference.js
CHANGED
|
@@ -22,6 +22,7 @@ const EXAMPLE_ARGS = {
|
|
|
22
22
|
inspect_package: { source_url: 'https://example.com/acme-sections-1.0.0.typeroll', options: { design: 'content' } },
|
|
23
23
|
import_package: { source_url: 'https://example.com/acme-sections-1.0.0.typeroll', options: { design: 'content' } },
|
|
24
24
|
create_site: { name: '{name}', id: '{id}', language: 'en', domain: 'example.com', from_site_id: '{from_site_id}', design: 'full', font_licence_confirmed: true },
|
|
25
|
+
delete_site: { confirm_site_id: '{siteId}', confirm_digest: '{confirm_digest}', reason: '{reason}' },
|
|
25
26
|
upload_font: { filename: 'BrandSans-Regular.woff2', data_base64: '{data_base64}', licence_confirmed: true, licence_note: 'Web licence, order 1234' },
|
|
26
27
|
};
|
|
27
28
|
const SITE = '{siteId}';
|
package/dist/server.js
CHANGED
|
@@ -127,6 +127,8 @@ export function effectFor(name) {
|
|
|
127
127
|
|| name === 'archive_site'
|
|
128
128
|
|| name === 'restore_site'
|
|
129
129
|
|| name === 'purge_site_media'
|
|
130
|
+
// Owner authority is checked by the route; admin is the least it needs.
|
|
131
|
+
|| name === 'delete_site'
|
|
130
132
|
|| name === 'install_extension'
|
|
131
133
|
|| name === 'set_extension_installation_status'
|
|
132
134
|
|| name === 'uninstall_extension'
|
package/dist/tools/pages.js
CHANGED
|
@@ -43,7 +43,7 @@ export const pageTools = [
|
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
name: 'list_pages',
|
|
46
|
-
description: 'List pages on the active site. Returns id, title, slug, status,
|
|
46
|
+
description: 'List pages on the active site. Returns id, title, slug, status, SEO summary and has_unsaved_changes (true while the page has an unsaved draft; the listed fields are the saved values) (no html_content by default — use read_page or batch_read_pages for body content). Supports filtering by status and forward-cursor pagination. Pass full=true to include html_content + blocks in the response.',
|
|
47
47
|
inputSchema: {
|
|
48
48
|
status: z.enum(['draft', 'review', 'unlisted', 'published', 'all']).optional(),
|
|
49
49
|
sort_by: z.string().optional().describe('Sort field; defaults to the selected content type’s order. Unfiltered lists use stable Page IDs.'),
|
package/dist/tools/settings.js
CHANGED
|
@@ -123,6 +123,7 @@ export const settingsTools = [
|
|
|
123
123
|
scripts_necessary: z.string().optional().describe('Trusted script markup that runs before consent.'),
|
|
124
124
|
scripts_optional: z.string().optional().describe('Trusted script markup activated only after full consent.'),
|
|
125
125
|
reload_after_consent: z.boolean().optional(),
|
|
126
|
+
manage_button: z.enum(['floating', 'none']).nullable().optional().describe('How visitors reopen the banner after choosing. `floating` (default) shows the "Cookies" button fixed bottom-left; `none` leaves it out, for example where it covers forms on mobile. With `none`, link to `#cookie-settings` from the footer (a menu `url` item with href "#cookie-settings" works): withdrawing consent must stay as easy as giving it, and the write returns a `cookie_reopen_link_missing` warning while no partial or menu has such a link. null restores the default.'),
|
|
126
127
|
labels: z.object({
|
|
127
128
|
title: z.string().optional(),
|
|
128
129
|
reject: z.string().optional(),
|
|
@@ -131,7 +132,7 @@ export const settingsTools = [
|
|
|
131
132
|
privacy_link: z.string().optional(),
|
|
132
133
|
manage: z.string().optional(),
|
|
133
134
|
manage_button: z.string().optional(),
|
|
134
|
-
}).optional().describe('Plain-text replacements for the banner heading, buttons and links (max 120 characters each). `manage` is the accessible name and `manage_button` the visible text of the floating button that reopens the banner. Omitted or blank labels follow the page language: Swedish, Norwegian Bokmål, German, Dutch, Finnish, French, Polish, Italian, Spanish, otherwise English. Replaces the whole labels object.'),
|
|
135
|
+
}).optional().describe('Plain-text replacements for the banner heading, buttons and links (max 120 characters each). `manage` is the accessible name and `manage_button` the visible text of the floating button that reopens the banner (not the `manage_button` setting beside `labels`). Omitted or blank labels follow the page language: Swedish, Norwegian Bokmål, German, Dutch, Finnish, French, Polish, Italian, Spanish, otherwise English. Replaces the whole labels object.'),
|
|
135
136
|
}).optional().describe('Native consent banner configuration. Partial updates preserve omitted fields. Script fields execute in visitor browsers and are accepted under the API key authority.'),
|
|
136
137
|
language_sections: z.array(z.object({
|
|
137
138
|
language: z.string().describe('BCP 47 tag matched against Page.language, such as "sv-SE". Not the site language.'),
|
package/dist/tools/sites.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Sites tools — discovery, Site-level identity edits and the site lifecycle
|
|
2
|
-
// (archive / restore). Each maps to a v1
|
|
3
|
-
// check as the corresponding portal action.
|
|
2
|
+
// (archive / restore, and permanent deletion by an owner). Each maps to a v1
|
|
3
|
+
// route with the same permission check as the corresponding portal action.
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { fail, ok, withErrorBoundary } from './helpers.js';
|
|
6
6
|
/** Optional fields every site-creating tool accepts (POST /api/v1/sites and the create-and-* routes). */
|
|
@@ -143,4 +143,24 @@ export const siteTools = [
|
|
|
143
143
|
return ok(res);
|
|
144
144
|
}),
|
|
145
145
|
},
|
|
146
|
+
{
|
|
147
|
+
name: 'get_site_deletion_inventory',
|
|
148
|
+
description: 'Step 1 of permanently deleting an ARCHIVED site. Writes nothing. Returns what deletion would remove (document counts per collection and per version), `blockers` (not_archived, domain_serving, shared_with_other_orgs, media_present — run purge_site_media first, hosting_service_unavailable), `untouched` resources in the owner\'s own accounts that deletion leaves alone (Git repository, Cloudflare Pages project that keeps serving the last publication, DNS, app data) with what to do about each, the API keys it revokes, a `digest` of all of it, and `confirm` — exactly what delete_site needs. Requires an owner of the organization that owns the site, through their own MCP connection or personal API token; organization/site API keys, administrators, editors and shares are refused (403 owner_authority_required). Before calling delete_site, show the inventory to the owner and get their explicit confirmation naming this site.',
|
|
149
|
+
handler: withErrorBoundary(async (_args, { client, siteId }) => ok(await client.get(siteId, 'deletion'))),
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'delete_site',
|
|
153
|
+
description: 'Step 2: PERMANENTLY delete this archived site and all its content. Irreversible. Call only after get_site_deletion_inventory and after the organization owner has explicitly confirmed that inventory for this exact site in the conversation; never infer consent and never delete a site the owner did not name. Send the inventory\'s `confirm.body` unchanged: `confirm_site_id` must equal this site\'s id and `confirm_digest` the inventory digest; a changed site answers 409 site_deletion_digest_stale (read the inventory again and re-confirm), a blocked one 409 site_deletion_blocked. Revokes the site\'s API keys first, deletes its documents leaf first and the site last, and writes an audit record (`audit_id`). HTTP 202 `in_progress` means a large site is not finished: call again with the same arguments (no new confirmation needed; an interrupted deletion cannot be restored, only finished). The answer lists `untouched` resources in the owner\'s accounts — tell the owner about them. Same authority as get_site_deletion_inventory.',
|
|
154
|
+
inputSchema: {
|
|
155
|
+
confirm_site_id: z.string().min(1).describe('This site\'s id, exactly. From the inventory\'s confirm.body.'),
|
|
156
|
+
confirm_digest: z.string().min(1).describe('The inventory digest the owner confirmed. From the inventory\'s confirm.body.'),
|
|
157
|
+
reason: z.string().max(500).optional().describe('Why the site is deleted; kept in the audit record.'),
|
|
158
|
+
},
|
|
159
|
+
handler: withErrorBoundary(async (args, { client, siteId }) => {
|
|
160
|
+
if (args.confirm_site_id !== siteId) {
|
|
161
|
+
return fail(new Error(`confirm_site_id "${args.confirm_site_id}" is not the selected site "${siteId}". Nothing was deleted.`));
|
|
162
|
+
}
|
|
163
|
+
return ok(await client.post(siteId, 'deletion', definedFields(args)));
|
|
164
|
+
}),
|
|
165
|
+
},
|
|
146
166
|
];
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typeroll/mcp-server",
|
|
3
3
|
"mcpName": "io.github.Typeroll/typeroll",
|
|
4
|
-
"version": "0.45.
|
|
4
|
+
"version": "0.45.132",
|
|
5
5
|
"description": "Typeroll CMS MCP server \u2013 connect AI agents to the REST API to manage content and publish static websites.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -202,7 +202,14 @@ English. For any other language, write `text` and set `labels` (`title`,
|
|
|
202
202
|
`reject`, `necessary`, `accept_all`, `privacy_link`, `manage`,
|
|
203
203
|
`manage_button`) in that language. `manage` is the accessible name and
|
|
204
204
|
`manage_button` the visible text of the floating button that reopens the
|
|
205
|
-
banner.
|
|
205
|
+
banner.
|
|
206
|
+
|
|
207
|
+
To leave out the floating button (it can cover form fields on a phone), set
|
|
208
|
+
`cookie_consent.manage_button: "none"` and add a "Cookie settings" item to the
|
|
209
|
+
footer menu: `type: "url"`, `href: "#cookie-settings"`. Any link to
|
|
210
|
+
`#cookie-settings` opens the banner, so visitors can still change or withdraw
|
|
211
|
+
their choice; the settings write warns with `cookie_reopen_link_missing`
|
|
212
|
+
while no partial or menu has one. Do not hide `.tr-consent__manage` with CSS. The publication's job `warnings`
|
|
206
213
|
list any banner wording and built-in control labels that fall back to English.
|
|
207
214
|
|
|
208
215
|
Use `update_site_settings`, then read settings back. `scripts_necessary` and
|
package/skills/tr-new-site.md
CHANGED
|
@@ -125,6 +125,7 @@ Common requirements that are easy to misclassify:
|
|
|
125
125
|
| Cookie notice | `settings.cookie_consent`, not a page block |
|
|
126
126
|
| Consent copy owned by an installed Extension | `list_extension_installations` → `read_extension_installation` → `update_extension_installation_config`, using exact manifest schema keys; the update queues a production deploy by default |
|
|
127
127
|
| One-off HTML + JavaScript embed | `core/embed`; reusable widgets use a custom block type with `script` |
|
|
128
|
+
| Third-party widget that sets cookies (comparer, booking, map) | `core/embed` with `consent: "optional"` and the cookie banner on; it loads only after the visitor accepts all cookies |
|
|
128
129
|
| CTA/button variants | `core/cta` and `core/button`, styled from site tokens or a narrowly scoped class |
|
|
129
130
|
| Two-column image/text | `core/media_card`, `core/feature_row`, or `core/columns` |
|
|
130
131
|
| Figures, captions and tables | `core/prose` / richtext; the sanitizer preserves these semantic tags |
|