@typeroll/mcp-server 0.45.129 → 0.45.131
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 +21 -2
- package/dist/bundled-content.js +11 -11
- package/dist/rest-reference.js +1 -0
- package/dist/server.js +2 -0
- package/dist/tools/bulk.js +1 -1
- package/dist/tools/migration.js +1 -1
- package/dist/tools/page-blocks.js +20 -3
- package/dist/tools/pages.js +1 -1
- package/dist/tools/settings.js +1 -1
- package/dist/tools/sites.js +22 -2
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/tr-brand.md +2 -0
- package/skills/tr-edit-site.md +6 -0
- package/skills/tr-header-footer.md +19 -0
- package/skills/tr-migrate-wp.md +3 -1
- package/skills/tr-new-site.md +3 -0
- package/skills/tr-seo.md +2 -1
- package/skills/tr-starter-design.md +2 -0
- package/skills/tr-upgrade-rendering.md +5 -0
- package/workspace-templates/workflows/design.md +2 -0
- package/workspace-templates/workflows/migration.md +2 -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/bulk.js
CHANGED
|
@@ -6,7 +6,7 @@ function v(version) {
|
|
|
6
6
|
export const bulkTools = [
|
|
7
7
|
{
|
|
8
8
|
name: 'check_internal_links',
|
|
9
|
-
description: 'Check internal hrefs against the versioned database before deploy. Covers published Pages of every content type, partials, Page templates, generated facet routes, media URLs and redirect chains. Returns every broken source/href pair without requesting the live site
|
|
9
|
+
description: 'Check internal hrefs against the versioned database before deploy. Covers published Pages of every content type, partials, Page templates, generated facet routes, media URLs and redirect chains. A `#fragment` (same-page `#x` in a Page, or `/path#x` from anywhere) must match an id on the target Page as it renders: heading ids including generated ones and `anchor_id`, block `html_id`, and ids in HTML; `#` and `#top` always resolve. Returns every broken source/href pair without requesting the live site; a missing fragment has reason `missing_fragment` with `fragment` and the target Page in `resolved_path`.',
|
|
10
10
|
inputSchema: { version: versionParam },
|
|
11
11
|
handler: withErrorBoundary(async (args, { client, siteId }) => {
|
|
12
12
|
return ok(await client.get(siteId, 'internal-links', v(args.version)));
|
package/dist/tools/migration.js
CHANGED
|
@@ -241,7 +241,7 @@ export const migrationTools = [
|
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
243
|
name: 'get_migration_launch_report',
|
|
244
|
-
description: 'Return the launch decision report with separate inventory, exclusion-reason, internal-link, deployed URL parity, deploy freshness, reviewed SEO/content parity, migration fidelity and script requirements. scripts lists copied source-platform scripts (WordPress plugins, theme, jQuery, page builders, cookie plugins), tracking code outside the consent gate, and analytics/advertising integrations without the cookie banner; each blocks launch. launch_ready is false when any evidence is absent, incomplete, failed, targets an old origin, or predates the latest hosted deploy. Use this final gate instead of treating zero unhandled URLs as launch readiness.',
|
|
244
|
+
description: 'Return the launch decision report with separate inventory, exclusion-reason, internal-link, deployed URL parity, deploy freshness, reviewed SEO/content parity, migration fidelity and script requirements. scripts lists copied source-platform scripts (WordPress plugins, theme, jQuery, page builders, cookie plugins), tracking code outside the consent gate, and analytics/advertising integrations without the cookie banner; each blocks launch. warnings lists findings that do not block launch, such as broken_fragment_links (links whose #fragment is missing on the target Page). launch_ready is false when any evidence is absent, incomplete, failed, targets an old origin, or predates the latest hosted deploy. Use this final gate instead of treating zero unhandled URLs as launch readiness.',
|
|
245
245
|
handler: withErrorBoundary(async (_args, { client, siteId }) => {
|
|
246
246
|
const res = await client.get(siteId, 'migration-report');
|
|
247
247
|
return ok(res);
|
|
@@ -5,6 +5,20 @@
|
|
|
5
5
|
// not convert HTML into blocks; block pages are built with blocks.
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { ok, withErrorBoundary, versionParam } from './helpers.js';
|
|
8
|
+
/**
|
|
9
|
+
* Per-route settings (Block.route_overrides). Strict, so a misspelled route
|
|
10
|
+
* kind is refused instead of being dropped on the way to the server.
|
|
11
|
+
*/
|
|
12
|
+
const routeOverrideSchema = z.object({
|
|
13
|
+
data_overrides: z.record(z.string(), z.unknown()).optional().describe('Field values merged over block.data on this route (shallow), checked like data.'),
|
|
14
|
+
}).strict();
|
|
15
|
+
const routeOverridesSchema = z.object({
|
|
16
|
+
home: routeOverrideSchema.optional(),
|
|
17
|
+
item: routeOverrideSchema.optional(),
|
|
18
|
+
page: routeOverrideSchema.optional(),
|
|
19
|
+
facet: routeOverrideSchema.optional(),
|
|
20
|
+
}).strict().describe('Per-route settings, keyed by the page\'s route kind (its <body data-route>): home (the home page), item (an item of a content type other than page), page (an ordinary page), facet (a generated taxonomy page). On a route of that kind, data_overrides are merged over block.data before the block renders, in preview and in the build. Example for a shared header banner that is primary on the home page only: { "home": { "data_overrides": { "background": "primary" } } }. Use it instead of site CSS against body[data-route].');
|
|
21
|
+
const ROUTE_OVERRIDES = ' `route_overrides` ({ home | item | page | facet: { data_overrides } }) varies any setting of the block by route kind without duplicating it or writing site CSS, e.g. a header section with background secondary and { "home": { "data_overrides": { "background": "primary" } } }. Override keys are checked like data keys (400 `unknown_field` and `invalid_field_value`, `field_type_mismatch` warnings); a route that is not a route kind is 400.';
|
|
8
22
|
const blockSchema = z.object({
|
|
9
23
|
id: z.string().optional().describe('Stable id. Omit to let the server generate one.'),
|
|
10
24
|
type: z.string().describe('Block type id, e.g. "core/heading", "core/section", or a custom "user/banner".'),
|
|
@@ -18,6 +32,7 @@ const blockSchema = z.object({
|
|
|
18
32
|
custom_class: z.string().optional(),
|
|
19
33
|
html_id: z.string().optional(),
|
|
20
34
|
}).optional(),
|
|
35
|
+
route_overrides: routeOverridesSchema.optional(),
|
|
21
36
|
}).passthrough();
|
|
22
37
|
/**
|
|
23
38
|
* Generic container target. kind=page is the back-compat default — when
|
|
@@ -78,7 +93,7 @@ export const pageBlockTools = [
|
|
|
78
93
|
},
|
|
79
94
|
{
|
|
80
95
|
name: 'add_block',
|
|
81
|
-
description: 'Insert a block into a container (page, partial, or page template). BUFFER MODEL: block mutations on pages/partials edit the unsaved DRAFT — commit_working_copy is the explicit save. With no parent_id, inserts at the top level of the container. Otherwise inserts as a child (or into a slot for slot-containers). Position defaults to "end". Slot containers (core/columns, core/tabs — container: "slots"): slot_index picks the slot (0-based; defaults to 0) and works even if the parent instance has no slots array yet; a freshly added slot container gets its slots initialised to the type\'s arity. You can also pass the whole subtree inline via block.slots: [[...],[...]]. Pass `target: { kind: "partial", id: "header" }` to drop a block into the header on every page, etc. `page_id` is the legacy shorthand. A `data` key that no field of the block\'s type declares (read_block_type) is rejected with 400 `unknown_field`, for the block and every child; nothing is written, and `unknown_fields[].suggestions` says where it belongs (e.g. `item_overrides.<key>` for an item-block field on a repeater or its aliases, or the closest field names).' + PART_STYLES + COMPACT_ANSWER + ' `added_id` is the new block\'s id.',
|
|
96
|
+
description: 'Insert a block into a container (page, partial, or page template). BUFFER MODEL: block mutations on pages/partials edit the unsaved DRAFT — commit_working_copy is the explicit save. With no parent_id, inserts at the top level of the container. Otherwise inserts as a child (or into a slot for slot-containers). Position defaults to "end". Slot containers (core/columns, core/tabs — container: "slots"): slot_index picks the slot (0-based; defaults to 0) and works even if the parent instance has no slots array yet; a freshly added slot container gets its slots initialised to the type\'s arity. You can also pass the whole subtree inline via block.slots: [[...],[...]]. Pass `target: { kind: "partial", id: "header" }` to drop a block into the header on every page, etc. `page_id` is the legacy shorthand. A `data` key that no field of the block\'s type declares (read_block_type) is rejected with 400 `unknown_field`, for the block and every child; nothing is written, and `unknown_fields[].suggestions` says where it belongs (e.g. `item_overrides.<key>` for an item-block field on a repeater or its aliases, or the closest field names). A select value outside the field\'s options is rejected with 400 `invalid_field_value` (`details.invalid_fields[]`: block_id, path, field, value, allowed).' + PART_STYLES + ROUTE_OVERRIDES + COMPACT_ANSWER + ' `added_id` is the new block\'s id.',
|
|
82
97
|
inputSchema: {
|
|
83
98
|
target: targetSchema.optional(),
|
|
84
99
|
page_id: z.string().optional(),
|
|
@@ -102,7 +117,7 @@ export const pageBlockTools = [
|
|
|
102
117
|
},
|
|
103
118
|
{
|
|
104
119
|
name: 'update_block',
|
|
105
|
-
description: 'Update a block\'s data fields (shallow merge), style overrides, or responsive settings. Works on pages, partials, and page templates — use `target` to address non-page containers. Does not modify children or slots; use move/add/remove for structural changes. For appearance, prefer a named style (`data.style_id`, see list_styles) over custom_class or custom_css. From render version 2, custom_class lands on the heading or button link element itself instead of the block wrapper. Send values in the field\'s type (numbers as numbers); a value the block will not render comes back in `warnings` (`field_type_mismatch`) with its path. A `null` value removes that key from data (the field renders its default); use it to clean up a key stored by mistake. A written key that no field of the block\'s type declares is rejected with 400 `unknown_field` and nothing is written; `unknown_fields[].suggestions` says where it belongs: on core/repeater and its aliases (core/testimonials, core/page_list, ...) a field of the item block goes in `item_overrides.<key>`, otherwise the closest field names.' + PART_STYLES + COMPACT_ANSWER,
|
|
120
|
+
description: 'Update a block\'s data fields (shallow merge), style overrides, per-route settings (route_overrides), or responsive settings. Works on pages, partials, and page templates — use `target` to address non-page containers. Does not modify children or slots; use move/add/remove for structural changes. For appearance, prefer a named style (`data.style_id`, see list_styles) over custom_class or custom_css. From render version 2, custom_class lands on the heading or button link element itself instead of the block wrapper. Send values in the field\'s type (numbers as numbers); a value the block will not render comes back in `warnings` (`field_type_mismatch`) with its path. A select value outside the field\'s options (e.g. `level: 2` instead of "h2") is refused with 400 `invalid_field_value` naming the block, field and allowed values; one the block already held is left alone and only warned about. Changing the text of a heading without `anchor_id` on a published page changes its generated id; the answer then carries a `heading_anchor_changed` warning with `old_id` and `new_id` (set `anchor_id` to `old_id` to keep inbound links). A `null` value removes that key from data (the field renders its default); use it to clean up a key stored by mistake. A written key that no field of the block\'s type declares is rejected with 400 `unknown_field` and nothing is written; `unknown_fields[].suggestions` says where it belongs: on core/repeater and its aliases (core/testimonials, core/page_list, ...) a field of the item block goes in `item_overrides.<key>`, otherwise the closest field names.' + PART_STYLES + ROUTE_OVERRIDES + ' On update, `route_overrides` replaces the block\'s route overrides whole; null removes them.' + COMPACT_ANSWER,
|
|
106
121
|
inputSchema: {
|
|
107
122
|
target: targetSchema.optional(),
|
|
108
123
|
page_id: z.string().optional(),
|
|
@@ -115,6 +130,7 @@ export const pageBlockTools = [
|
|
|
115
130
|
custom_class: z.string().optional(),
|
|
116
131
|
html_id: z.string().optional(),
|
|
117
132
|
}).optional(),
|
|
133
|
+
route_overrides: routeOverridesSchema.nullable().optional().describe('Per-route settings: { home | item | page | facet: { data_overrides } }. Replaces the block\'s route overrides whole; null removes them.'),
|
|
118
134
|
response: responseParam,
|
|
119
135
|
version: versionParam,
|
|
120
136
|
},
|
|
@@ -124,6 +140,7 @@ export const pageBlockTools = [
|
|
|
124
140
|
block_id: args.block_id,
|
|
125
141
|
data: args.data,
|
|
126
142
|
style_overrides: args.style_overrides,
|
|
143
|
+
...(args.route_overrides !== undefined ? { route_overrides: args.route_overrides } : {}),
|
|
127
144
|
}, writeQuery(args.version, args.response));
|
|
128
145
|
return ok(res);
|
|
129
146
|
}),
|
|
@@ -188,7 +205,7 @@ export const pageBlockTools = [
|
|
|
188
205
|
},
|
|
189
206
|
{
|
|
190
207
|
name: 'set_block_responsive',
|
|
191
|
-
description: 'Set a per-breakpoint value on one responsive field of a block (in any container — page, partial, or template). The renderer reads { mobile, tablet, laptop, desktop, wide } objects on any field marked responsive in the BlockType schema (use read_block_type to see which). Mobile-first inheritance: missing breakpoints inherit upward. Pass a scalar value to clear responsive back to a single value. Example: setting `cols` on a feature_grid to { mobile: 1, tablet: 2, desktop: 3 } renders 1-col on phones, 2-col on tablets, 3-col on desktop+. A field the block type does not declare is rejected with 400 `unknown_field`.' + COMPACT_ANSWER,
|
|
208
|
+
description: 'Set a per-breakpoint value on one responsive field of a block (in any container — page, partial, or template). The renderer reads { mobile, tablet, laptop, desktop, wide } objects on any field marked responsive in the BlockType schema (use read_block_type to see which). Mobile-first inheritance: missing breakpoints inherit upward. Pass a scalar value to clear responsive back to a single value. Example: setting `cols` on a feature_grid to { mobile: 1, tablet: 2, desktop: 3 } renders 1-col on phones, 2-col on tablets, 3-col on desktop+. A field the block type does not declare is rejected with 400 `unknown_field`, and a value outside a select field\'s options with 400 `invalid_field_value`.' + COMPACT_ANSWER,
|
|
192
209
|
inputSchema: {
|
|
193
210
|
target: targetSchema.optional(),
|
|
194
211
|
page_id: z.string().optional(),
|
package/dist/tools/pages.js
CHANGED
|
@@ -173,7 +173,7 @@ export const pageTools = [
|
|
|
173
173
|
fields: z.record(z.string(), z.unknown()).optional(),
|
|
174
174
|
slug: z.string().optional(),
|
|
175
175
|
html_content: z.string().optional(),
|
|
176
|
-
blocks: z.array(z.any()).optional().describe('Block tree, only used when content_mode="blocks".'),
|
|
176
|
+
blocks: z.array(z.any()).optional().describe('Block tree, only used when content_mode="blocks". A select value the write sets or changes outside the field\'s options (e.g. level 2 instead of "h2") is refused with 400 invalid_field_value; one a block already held is only warned about (field_type_mismatch). Retitling a published heading without anchor_id warns heading_anchor_changed with old_id and new_id.'),
|
|
177
177
|
status: z.enum(['draft', 'review', 'unlisted', 'published']).optional(),
|
|
178
178
|
publish_at: z.string().nullable().optional().describe('Scheduled publishing (0.29.0+): ISO datetime at which the platform flips status → published AND deploys the site. Applies immediately (publish state, never drafted); null clears the schedule. Requires the SAVED content to be ready — schedule after save_changes/commit.'),
|
|
179
179
|
unpublish_at: z.string().nullable().optional().describe('Scheduled unpublish: ISO datetime at which status flips back to draft (+ deploy). Null clears.'),
|
package/dist/tools/settings.js
CHANGED
|
@@ -90,7 +90,7 @@ export const settingsTools = [
|
|
|
90
90
|
staging_url: z.string().nullable().optional().describe('URL of a staging environment for this site, for reference. Stored on the Site, not per version. Trailing slashes are dropped; empty string or null clears.'),
|
|
91
91
|
form_submission_retention_days: z.number().int().min(30).max(3650).nullable().optional().describe('Opt-in deletion of completed form submissions this many days (30–3650) after they were completed, on every form of the site, including existing submissions: those already older are deleted immediately and cannot be restored. null (the default) keeps submissions until someone deletes them. Site administrators only (never an Extension credential); stored on the Site, not per version. The response reports form_submission_retention { updated, deleted }. Partial submissions keep their form\'s partial_ttl_days.'),
|
|
92
92
|
render_version: z.number().int().min(1).optional().describe('Platform render version. Platform output changes ship as new versions so existing sites never change look on their own. Upgrade only after previewing (get_preview_link render_version) and with the user\'s approval; the tr-upgrade-rendering skill compares every page. Lowering it returns to an earlier version.'),
|
|
93
|
-
typography: z.object({ ratio_mobile: z.number().min(1.1).max(1.5).optional(), ratio_desktop: z.number().min(1.1).max(1.5).optional(), rhythm: z.number().min(0.5).max(2).optional(), line_length: z.number().min(40).max(90).optional() }).strict().optional().describe('Fluid design controls (render version 10+). Base size is fonts.size_base. Replaces typography as a whole; omitted controls use defaults.'),
|
|
93
|
+
typography: z.object({ ratio_mobile: z.number().min(1.1).max(1.5).optional(), ratio_desktop: z.number().min(1.1).max(1.5).optional(), rhythm: z.number().min(0.5).max(2).optional(), line_length: z.union([z.number().min(40).max(90), z.literal('none')]).optional() }).strict().optional().describe('Fluid design controls (render version 10+). Base size is fonts.size_base. line_length caps prose at 40–90 characters (default 65), or "none" for no measure: prose fills its column, so templates that own their text columns need no --measure-prose custom CSS. Replaces typography as a whole; omitted controls use defaults.'),
|
|
94
94
|
design_scales: z.record(z.string(), z.record(z.string(), z.union([z.string(), z.object({ mobile: z.string().optional(), tablet: z.string().optional(), laptop: z.string().optional(), desktop: z.string().optional(), wide: z.string().optional() }).strict()]))).optional().describe('Site token scales (replaced as a whole): type_size xs/sm/md/lg/xl/2xl/3xl; space none/xs/sm/md/lg/xl in px/rem/em or clamp(min, length + vw, max), or responsive maps; leading tight/snug/normal/relaxed/loose as unitless 1–2. Omitted steps use platform defaults.'),
|
|
95
95
|
colors: z.record(z.string(), z.string().nullable()).optional().describe('Palette: primary, secondary, accent, background, surface, surface_hover, text, text_light (shallow-merged). Optional on_primary, on_secondary, on_accent set the text colour on that theme colour (buttons, badges, tabs, call-to-action sections, styles using the on_* tokens) as a hex colour such as "#ffffff"; null returns to the automatic black or white (chosen by APCA from render version 8, by the WCAG 2 ratio before). A chosen on_* colour applies on every render version. The response lists `on_colors` with each one\'s APCA Lc and WCAG 2 ratio; a choice below APCA Lc 60 (button text, 16px/600) is kept and returned as a warning. Prefer the automatic choice unless the brand specifies a colour.'),
|
|
96
96
|
fonts: z.record(z.string(), z.unknown()).optional().describe('heading, body, mono (Google Fonts family or "system"), size_base (px) and smoothing: "auto" (browser default) or "antialiased" (thinner text on macOS, for light text on dark backgrounds); null clears smoothing. Unset smoothing is auto from render version 6. delivery: "self_hosted" (default: published pages load the font files from the site itself, no request to Google before consent) or "google" (Google Fonts CDN).'),
|
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.131",
|
|
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": {
|
package/skills/tr-brand.md
CHANGED
|
@@ -445,6 +445,8 @@ Use `fonts.size_base` (default 16), `typography.ratio_mobile` (1.2),
|
|
|
445
445
|
spacing and line-height steps. `apply_standard_styles` uses those steps;
|
|
446
446
|
`overwrite: true` resets existing roles, so review their current values first.
|
|
447
447
|
Explicit sizes and breakpoint overrides still win and are not silently migrated.
|
|
448
|
+
A template that owns its text columns sets `typography.line_length` to `"none"`:
|
|
449
|
+
prose then fills its column, with no `--measure-prose` custom CSS.
|
|
448
450
|
|
|
449
451
|
Heading role margins belong to editorial flow. Component titles use their own
|
|
450
452
|
padding/gap, and opening headings in containers/sections add no top margin.
|
package/skills/tr-edit-site.md
CHANGED
|
@@ -72,6 +72,12 @@ reports `production: true`), every deploy is a production release: get the
|
|
|
72
72
|
owner's approval and pass `confirm_live_domains: true`. Review with
|
|
73
73
|
`get_preview_link` `include_working_copy: true` instead of deploying.
|
|
74
74
|
|
|
75
|
+
**Renamed headings.** A heading without `anchor_id` takes its id from its text,
|
|
76
|
+
so retitling a published one changes its `#` address. The write then answers
|
|
77
|
+
with a `heading_anchor_changed` warning (`old_id`, `new_id`); unless the user
|
|
78
|
+
wants the new address, set the heading's `anchor_id` (or the prose heading's
|
|
79
|
+
`id`) to `old_id` so existing links keep working.
|
|
80
|
+
|
|
75
81
|
**Publishing and failed deploys.** Poll `get_deploy_status` until the job is
|
|
76
82
|
`succeeded` or `failed`. Every site in an organization shares one build
|
|
77
83
|
engine: publish one site at a time, and start another site's publish only when
|
|
@@ -151,6 +151,25 @@ Each entry in `links` (`core/navigation_links` and `core/navigation`) may set
|
|
|
151
151
|
A `core/tabs` choice with a direct `href` accepts `link_rel` and `new_tab` too,
|
|
152
152
|
so a partner banner built from tabs can mark its links the same way.
|
|
153
153
|
|
|
154
|
+
A header or footer block that must look different on some routes (a banner
|
|
155
|
+
that is `primary` over the home page's hero and `secondary` elsewhere) keeps
|
|
156
|
+
one block and sets `route_overrides`, keyed by route kind (`home`, `item`,
|
|
157
|
+
`page`, `facet`):
|
|
158
|
+
|
|
159
|
+
```json
|
|
160
|
+
{
|
|
161
|
+
"type": "core/section",
|
|
162
|
+
"data": { "background": "secondary" },
|
|
163
|
+
"route_overrides": {
|
|
164
|
+
"home": { "data_overrides": { "background": "primary" } }
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Set it with `update_block` (`null` removes it). Do not duplicate the block
|
|
170
|
+
behind visibility branches or write site CSS against `body[data-route]` for a
|
|
171
|
+
setting the block has.
|
|
172
|
+
|
|
154
173
|
## Footer tree and consent
|
|
155
174
|
|
|
156
175
|
Use an accessible footer navigation landmark and `core/navigation_links` with
|
package/skills/tr-migrate-wp.md
CHANGED
|
@@ -315,7 +315,7 @@ import_sitemap url="https://old.example.com/sitemap.xml"
|
|
|
315
315
|
# Optional: direct Search Console query (platform service account must have property access)
|
|
316
316
|
import_gsc_performance property="https://old.example.com/" months=6
|
|
317
317
|
# Or paste a Search Console Pages CSV via csv="..." and source_origin.
|
|
318
|
-
check_internal_links # database preflight before deploy
|
|
318
|
+
check_internal_links # database preflight before deploy, incl. #fragment targets
|
|
319
319
|
verify_migration_urls # after trigger_deploy; compact exceptions by default
|
|
320
320
|
record_migration_seo_acceptance # after reviewing this exact deployment
|
|
321
321
|
get_migration_launch_report # final fail-closed launch gate
|
|
@@ -511,6 +511,8 @@ Use `fonts.size_base` (default 16), `typography.ratio_mobile` (1.2),
|
|
|
511
511
|
spacing and line-height steps. `apply_standard_styles` uses those steps;
|
|
512
512
|
`overwrite: true` resets existing roles, so review their current values first.
|
|
513
513
|
Explicit sizes and breakpoint overrides still win and are not silently migrated.
|
|
514
|
+
A template that owns its text columns sets `typography.line_length` to `"none"`:
|
|
515
|
+
prose then fills its column, with no `--measure-prose` custom CSS.
|
|
514
516
|
|
|
515
517
|
Heading role margins belong to editorial flow. Component titles use their own
|
|
516
518
|
padding/gap, and opening headings in containers/sections add no top margin.
|
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 |
|
|
@@ -507,6 +508,8 @@ Use `fonts.size_base` (default 16), `typography.ratio_mobile` (1.2),
|
|
|
507
508
|
spacing and line-height steps. `apply_standard_styles` uses those steps;
|
|
508
509
|
`overwrite: true` resets existing roles, so review their current values first.
|
|
509
510
|
Explicit sizes and breakpoint overrides still win and are not silently migrated.
|
|
511
|
+
A template that owns its text columns sets `typography.line_length` to `"none"`:
|
|
512
|
+
prose then fills its column, with no `--measure-prose` custom CSS.
|
|
510
513
|
|
|
511
514
|
Heading role margins belong to editorial flow. Component titles use their own
|
|
512
515
|
padding/gap, and opening headings in containers/sections add no top margin.
|
package/skills/tr-seo.md
CHANGED
|
@@ -178,7 +178,8 @@ batch_update_pages updates=[
|
|
|
178
178
|
- Give shared pages, especially articles, their own `og_image`.
|
|
179
179
|
- Link every published page from somewhere. The readiness item `orphan_pages`
|
|
180
180
|
lists pages that no internal link reaches; `check_internal_links` finds
|
|
181
|
-
broken saved links
|
|
181
|
+
broken saved links, including `#fragment` links whose heading or anchor id
|
|
182
|
+
no longer exists (`missing_fragment`).
|
|
182
183
|
|
|
183
184
|
### 5. Structured data beyond the automatic output
|
|
184
185
|
|
|
@@ -140,6 +140,8 @@ Use `fonts.size_base` (default 16), `typography.ratio_mobile` (1.2),
|
|
|
140
140
|
spacing and line-height steps. `apply_standard_styles` uses those steps;
|
|
141
141
|
`overwrite: true` resets existing roles, so review their current values first.
|
|
142
142
|
Explicit sizes and breakpoint overrides still win and are not silently migrated.
|
|
143
|
+
A template that owns its text columns sets `typography.line_length` to `"none"`:
|
|
144
|
+
prose then fills its column, with no `--measure-prose` custom CSS.
|
|
143
145
|
|
|
144
146
|
Heading role margins belong to editorial flow. Component titles use their own
|
|
145
147
|
padding/gap, and opening headings in containers/sections add no top margin.
|
|
@@ -51,6 +51,11 @@ comparison first.
|
|
|
51
51
|
version note names. Version 2 moves a heading's or button's custom class
|
|
52
52
|
onto the `<h2>` or link, so `.my-class .block-heading-text` stops
|
|
53
53
|
matching; propose the rewrite (`.my-class`) or a named style.
|
|
54
|
+
Version 16 wraps a form's buttons in `.form-actions`, so CSS that placed
|
|
55
|
+
the button in the form grid targets `form > .form-actions`. Version 17
|
|
56
|
+
loads weights written in CSS: propose removing `fonts.load` entries that
|
|
57
|
+
only existed for them, and element rules that were scoped only to keep
|
|
58
|
+
them off the cookie banner.
|
|
54
59
|
|
|
55
60
|
7. **Ask before upgrading.** Never upgrade on your own. If the user wants to
|
|
56
61
|
keep a specific old look, solve it with a site style or page CSS first and
|
|
@@ -87,6 +87,8 @@ Use `fonts.size_base` (default 16), `typography.ratio_mobile` (1.2),
|
|
|
87
87
|
spacing and line-height steps. `apply_standard_styles` uses those steps;
|
|
88
88
|
`overwrite: true` resets existing roles, so review their current values first.
|
|
89
89
|
Explicit sizes and breakpoint overrides still win and are not silently migrated.
|
|
90
|
+
A template that owns its text columns sets `typography.line_length` to `"none"`:
|
|
91
|
+
prose then fills its column, with no `--measure-prose` custom CSS.
|
|
90
92
|
|
|
91
93
|
Heading role margins belong to editorial flow. Component titles use their own
|
|
92
94
|
padding/gap, and opening headings in containers/sections add no top margin.
|
|
@@ -160,6 +160,8 @@ Use `fonts.size_base` (default 16), `typography.ratio_mobile` (1.2),
|
|
|
160
160
|
spacing and line-height steps. `apply_standard_styles` uses those steps;
|
|
161
161
|
`overwrite: true` resets existing roles, so review their current values first.
|
|
162
162
|
Explicit sizes and breakpoint overrides still win and are not silently migrated.
|
|
163
|
+
A template that owns its text columns sets `typography.line_length` to `"none"`:
|
|
164
|
+
prose then fills its column, with no `--measure-prose` custom CSS.
|
|
163
165
|
|
|
164
166
|
Heading role margins belong to editorial flow. Component titles use their own
|
|
165
167
|
padding/gap, and opening headings in containers/sections add no top margin.
|