@typeroll/mcp-server 0.45.167 → 0.45.169
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 +3 -1
- package/dist/bundled-content.js +26 -13
- package/dist/server.js +4 -0
- package/dist/tools/apps.js +33 -0
- package/dist/tools/fonts.js +1 -1
- package/dist/tools/forms.js +4 -3
- package/dist/tools/media.js +2 -2
- package/dist/tools/migration.js +1 -1
- package/dist/tools/pages.js +7 -0
- package/dist/tools/preview.js +4 -0
- package/dist/tools/settings.js +1 -1
- package/dist/tools/styles.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/workspace.d.ts +1 -1
- package/dist/workspace.js +17 -8
- package/package.json +1 -1
- package/skills/tr-brand.md +1 -1
- package/skills/tr-migrate-astro.md +4 -13
- package/skills/tr-migrate-multisite.md +10 -31
- package/skills/tr-migrate-wp.md +73 -384
- package/skills/tr-responsive.md +14 -0
- package/workspace-templates/scripts/README.md +18 -0
- package/workspace-templates/scripts/typeroll/browser.cjs +6 -1
- package/workspace-templates/scripts/typeroll/call.py +5 -2
- package/workspace-templates/scripts/typeroll/css_report.py +45 -0
- package/workspace-templates/scripts/typeroll/inventory.py +264 -0
- package/workspace-templates/scripts/typeroll/media_fit.py +112 -0
- package/workspace-templates/scripts/typeroll/migration.py +254 -0
- package/workspace-templates/scripts/typeroll/page_part.cjs +34 -0
- package/workspace-templates/scripts/typeroll/page_source.py +148 -0
- package/workspace-templates/scripts/typeroll/pages.py +156 -0
- package/workspace-templates/scripts/typeroll/read_pages.cjs +169 -0
- package/workspace-templates/scripts/typeroll/shoot_hosted.cjs +13 -6
- package/workspace-templates/scripts/typeroll/trlib.py +45 -7
- package/workspace-templates/scripts/typeroll/verify_migration.cjs +47 -0
- package/workspace-templates/scripts/typeroll/verify_migration.py +274 -0
- package/workspace-templates/scripts/typeroll/write_pages.py +542 -0
- package/workspace-templates/skills/typeroll-migrate-sources.md +36 -0
- package/workspace-templates/skills/typeroll-migrate.md +109 -0
- package/workspace-templates/workflows/design.md +1 -1
- package/workspace-templates/workflows/migration.md +12 -5
package/dist/server.js
CHANGED
|
@@ -112,6 +112,10 @@ export function effectFor(name) {
|
|
|
112
112
|
|| name === 'list_apps'
|
|
113
113
|
|| name === 'read_app'
|
|
114
114
|
|| name === 'update_app'
|
|
115
|
+
|| name === 'list_integrations'
|
|
116
|
+
|| name === 'update_integration'
|
|
117
|
+
|| name === 'install_integration'
|
|
118
|
+
|| name === 'remove_integration'
|
|
115
119
|
|| name === 'list_extension_installations'
|
|
116
120
|
|| name === 'read_extension_installation'
|
|
117
121
|
|| name === 'update_extension_installation_config'
|
package/dist/tools/apps.js
CHANGED
|
@@ -19,6 +19,39 @@ export const appTools = [
|
|
|
19
19
|
},
|
|
20
20
|
handler: withErrorBoundary(async (args, { client, siteId }) => ok(await client.post(siteId, 'integrations/conversions/test', args.meta_event ? { meta_event: args.meta_event } : {}))),
|
|
21
21
|
},
|
|
22
|
+
{
|
|
23
|
+
name: 'list_integrations',
|
|
24
|
+
description: 'List every third-party tool the site can use (analytics, advertising, chat, newsletters, CRM): what each does (pages, forms, blocks), whether it is connected, its fields, its form action type and the forms that use it. Secrets are never returned. Admin permission required.',
|
|
25
|
+
handler: withErrorBoundary(async (_args, { client, siteId }) => ok(await client.get(siteId, 'integrations'))),
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'update_integration',
|
|
29
|
+
description: 'Connect a tool, or change its values (fields from list_integrations). Omitted values are kept; null clears one. disconnect: true removes all of them, and forms stop sending to the tool. A tool for pages shows after the next publication; a tool for forms is then added to a form\'s actions as its action_type. Secrets are encrypted. Admin permission required.',
|
|
30
|
+
inputSchema: {
|
|
31
|
+
tool_id: z.string().min(1).describe('Id from list_integrations, for example mailchimp.'),
|
|
32
|
+
values: z.record(z.string(), z.string().nullable()).optional().describe('Field key → value, or null to clear it.'),
|
|
33
|
+
disconnect: z.boolean().optional(),
|
|
34
|
+
},
|
|
35
|
+
handler: withErrorBoundary(async (args, { client, siteId }) => {
|
|
36
|
+
const path = `integrations/${encodeURIComponent(args.tool_id)}`;
|
|
37
|
+
return ok(args.disconnect ? await client.del(siteId, path) : await client.put(siteId, path, { values: args.values ?? {} }));
|
|
38
|
+
}),
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'install_integration', noSite: true,
|
|
42
|
+
description: 'Add a tool to the organization from a description (JSON data, never code): the values the owner supplies, the tag it adds to pages and the requests a form sends. Format: https://typeroll.com/docs/apps/integration-descriptions/. Use dry_run: true first to check it. The description decides what is added to pages and where form data goes, so install only what the person has approved. A tool that needs OAuth or code of its own is an Extension instead. Requires an organization API key or a personal connection of an owner or administrator.',
|
|
43
|
+
inputSchema: {
|
|
44
|
+
description: z.record(z.string(), z.unknown()).describe('The description.'),
|
|
45
|
+
dry_run: z.boolean().optional().describe('Only check it.'),
|
|
46
|
+
},
|
|
47
|
+
handler: withErrorBoundary(async (args, { client }) => ok(await client.rootPost('organization/integrations', { description: args.description, ...(args.dry_run ? { dry_run: true } : {}) }))),
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'remove_integration', noSite: true,
|
|
51
|
+
description: 'Remove a tool the organization installed, from every site. Forms that use it stop sending to it; its tag leaves pages at the next publication. Bundled tools cannot be removed. Requires an organization API key or a personal connection of an owner or administrator.',
|
|
52
|
+
inputSchema: { tool_id: z.string().min(1).describe('Id of a tool with source "organization" in list_integrations.') },
|
|
53
|
+
handler: withErrorBoundary(async (args, { client }) => ok(await client.rootDelete(`organization/integrations/${encodeURIComponent(args.tool_id)}`))),
|
|
54
|
+
},
|
|
22
55
|
{
|
|
23
56
|
name: 'list_apps',
|
|
24
57
|
description: 'List every Typeroll app available to this site, including its field schema, build impact, and masked enabled/config state. For setup guidance without admin access, use read_app_documentation. Admin permission required.',
|
package/dist/tools/fonts.js
CHANGED
|
@@ -51,7 +51,7 @@ export const fontTools = [
|
|
|
51
51
|
mono: clearableRole.describe('Code and preformatted text. Without it code uses the system monospace stack; null clears.'),
|
|
52
52
|
display: clearableRole.describe('Large headings and heroes (render version 15). null uses the heading family.'),
|
|
53
53
|
accent: clearableRole.describe('Eyebrows and quotes (render version 15). null uses the body family.'),
|
|
54
|
-
load: z.
|
|
54
|
+
load: z.partialRecord(z.enum(['heading', 'body', 'mono', 'display', 'accent']), z.object({ weights: weights.optional(), italic: weights.optional() }).strict()).nullable().optional()
|
|
55
55
|
.describe('Extra weights (and italic weights) to load per role beyond those in use, e.g. { "heading": { "weights": [800] } }. null clears.'),
|
|
56
56
|
delivery: z.enum(['self_hosted', 'google']).nullable().optional().describe('Google Fonts delivery: self_hosted (default, files copied into the site) or google (Google Fonts CDN). Uploaded and service fonts are unaffected.'),
|
|
57
57
|
services: z.array(service).max(4).nullable().optional()
|
package/dist/tools/forms.js
CHANGED
|
@@ -47,9 +47,10 @@ const targetSchema = z.object({
|
|
|
47
47
|
const optionSourceSchema = z.object({ field: z.string(), type: z.string(), config: z.record(z.string(), z.unknown()), notice_field: z.string().optional() }).strict();
|
|
48
48
|
const actionSchema = z.object({
|
|
49
49
|
id: z.string().optional().describe('Keep an existing action\'s id to update it in place (webhooks keep their stored secret).'),
|
|
50
|
-
type: z.string().describe('"email", "webhook", or an action type provided by an installed app (see get_form_capabilities).'),
|
|
50
|
+
type: z.string().describe('"email", "webhook", "connector:<tool>" for a connected tool such as "connector:mailchimp", or an action type provided by an installed app (see get_form_capabilities).'),
|
|
51
51
|
config: z.record(z.string(), z.unknown()).describe('email: { to, subject, body, cc?, bcc?, reply_to?, include_all?, format?: "html"|"text" } — to/subject/body may use {{field}} placeholders, e.g. to: "{{email}}" for a confirmation to the visitor. include_all appends every submitted value, but only when to, cc and bcc are fixed addresses; with a {{field}} recipient it is ignored and the email contains only its subject and body. ' +
|
|
52
|
-
'webhook: { url (https), fields: ["name","email"] (only these values are sent), secret (signing secret; send "••••••••" to keep the stored one) }.'
|
|
52
|
+
'webhook: { url (https), fields: ["name","email"] (only these values are sent), secret (signing secret; send "••••••••" to keep the stored one) }. ' +
|
|
53
|
+
'connector:<tool>: the config_fields get_form_capabilities lists for it, for example connector:mailchimp { audience_id, email_field: "email", merge_fields?: "FNAME=first_name", tags?: "newsletter, events", double_opt_in?: boolean }. Any of them takes consent_field: nothing is sent unless that field was ticked. Keys are not part of the action: the site connects the tool once (list_integrations, update_integration).'),
|
|
53
54
|
trigger: z.enum(['complete', 'partial_abandoned']).optional().describe('When the action runs. "complete" (default): after the final step. "partial_abandoned" (email actions only, opt-in): once per submission when a partial submission (visitor finished at least one step) has not advanced for after_hours hours; never for completed submissions. The email lists the answers given so far.'),
|
|
54
55
|
after_hours: z.number().int().min(1).max(720).optional().describe('For trigger "partial_abandoned": hours without progress before the email is sent.'),
|
|
55
56
|
});
|
|
@@ -86,7 +87,7 @@ export const formTools = [
|
|
|
86
87
|
},
|
|
87
88
|
{
|
|
88
89
|
name: 'get_form_capabilities',
|
|
89
|
-
description: 'List the action types a form can run after a submission (core "email" and "webhook"
|
|
90
|
+
description: 'List the action types a form can run after a submission (core "email" and "webhook", connected tools as "connector:<tool>", and types provided by installed apps) and the prefill sources, each with its config field schema — the same choices as the portal\'s Forms editor. available_integrations names tools the site has not connected yet. Read this before writing `actions` with create_form/update_form. Admin permission required.',
|
|
90
91
|
handler: withErrorBoundary(async (_args, { client, siteId }) => ok(await client.get(siteId, 'form-capabilities'))),
|
|
91
92
|
},
|
|
92
93
|
{
|
package/dist/tools/media.js
CHANGED
|
@@ -91,7 +91,7 @@ export const mediaTools = [
|
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
name: 'upload_media_from_url',
|
|
94
|
-
description: 'Fetch an image
|
|
94
|
+
description: 'Fetch an image, PDF, or MP4/WebM film from any public URL and push it to the site\'s media library in one call. The organization\'s media transfer Worker downloads the source from verified public HTTP(S) destinations straight into the organization\'s storage; private addresses and unsafe redirects are refused. Integrity-safe: the bytes are streamed, never transcribed as base64 through the model, so (unlike a large `upload_media_inline` payload) they can\'t be silently corrupted in transit. Returns { media_id, cdn_url, filename, finalize, import }. When the media record was created but the copy failed for a passing reason (a busy or rate-limited source, an interrupted transfer, a transfer Worker 5xx), the call answers HTTP 202 with import.state "pending", import.error_code, import.retry { automatic: true, next_attempt_at } and cdn_url/finalize null: the site\'s media migration retries the copy after 1, 5, 15, 30 and 60 minutes. Do not import it again; poll read_media until import.state is "complete" before referencing the file in published content. A refused source (4xx) is an error and leaves no new record; an existing pending record is retained with import.state failed and automatic retries stopped. Each upload queues image preparation (finalize.preparation): one job per site on the organization\'s shared build engine, started once uploads have been quiet for 30 s (at most 5 min after the first), so a series of uploads shares one job. get_media_preparation returns its build_job_id; let it finish, like any other active build, before publishing another site of the organization.',
|
|
95
95
|
inputSchema: {
|
|
96
96
|
source_url: z.string().url().describe('Public URL to download the image from.'),
|
|
97
97
|
filename: z.string().optional().describe('Override the filename used on R2. Defaults to the last path segment of source_url. When its extension does not match the content type, the type\'s extension is appended; the response returns the stored filename.'),
|
|
@@ -107,7 +107,7 @@ export const mediaTools = [
|
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
name: 'upload_media_batch_from_urls',
|
|
110
|
-
description: 'Upload 1–50 public images
|
|
110
|
+
description: 'Upload 1–50 public images, PDFs or MP4/WebM films (max 25 MiB each; a larger file must be made smaller first, as media_fit.py in a migration workspace does) in one MCP call. Uses the same integrity-safe download → signed PUT → finalize pipeline as upload_media_from_url, with four concurrent workers. Returns one result per source URL; individual failures do not abort the batch. A result with pending: true has a media record whose copy is retried automatically (see upload_media_from_url); `pending` counts them; `succeeded` counts only completed imports. Uploads queue image preparation as upload_media_from_url describes; consecutive batches share one preparation job while each starts within 30 s of the previous one.',
|
|
111
111
|
inputSchema: {
|
|
112
112
|
items: z.array(z.object({
|
|
113
113
|
source_url: z.string().url(),
|
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. 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.',
|
|
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) and content_type_without_template (missing_templates lists the types whose Pages repeat one layout). 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);
|
package/dist/tools/pages.js
CHANGED
|
@@ -117,6 +117,8 @@ export const pageTools = [
|
|
|
117
117
|
'fails with 409 { code: "slug_in_use" | "path_in_use", details: { page_id, path } } — edit that page or choose another slug; ' +
|
|
118
118
|
'the address is never changed silently. Only a title-derived slug is numbered (e.g. "tack" → "tack-2"), and the response then ' +
|
|
119
119
|
'carries warnings: [{ code: "slug_adjusted", requested, slug, path, conflicting_page_id }]. ' +
|
|
120
|
+
'Warnings repeated_page_without_type and repeated_layout_without_template mean the page looks like one of a series ' +
|
|
121
|
+
'(articles, events, staff, products): decide on a content type and template before you create more. ' +
|
|
120
122
|
'Homepage convention: pass slug="" (empty string) or omit slug and set title to "Home"; ' +
|
|
121
123
|
'the server stores it under id "home" with slug "". ' +
|
|
122
124
|
'Slug must be a single path segment (no slashes). For nested URLs like ' +
|
|
@@ -156,6 +158,8 @@ export const pageTools = [
|
|
|
156
158
|
author: z.string().optional(),
|
|
157
159
|
language: z.string().optional().describe('BCP-47 tag overriding the site default (e.g. "en" on an otherwise Swedish site).'),
|
|
158
160
|
id: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$/).optional().describe('Page id to use instead of one derived from the address; keeps references such as parent or filter values stable. A taken id fails with 409; it is never replaced.'),
|
|
161
|
+
own_page: z.boolean().optional().describe('Default true. Set false for a record that only appears in lists: it gets no address and no page of its own. Only for content types with a URL pattern, never for ordinary pages.'),
|
|
162
|
+
date_published: z.string().optional().describe('Publication date as an ISO date or datetime, such as the original date of an imported article.'),
|
|
159
163
|
sort_order: z.number().finite().optional().describe('Manual Page order; lower numbers come first in ascending lists. Content types and listings choose how to sort.'),
|
|
160
164
|
template: z.string().nullable().optional().describe('Allowed Page template ID; null uses the content type default.'),
|
|
161
165
|
image_sizes_default: z.string().optional().describe('Per-page default `sizes` for responsive images (e.g. "(max-width: 640px) 360px, 560px"). Overrides the site setting; a per-<img> `sizes` attr still wins. Set when this page\'s images render narrower than the generic default so the browser stops over-fetching.'),
|
|
@@ -183,6 +187,7 @@ export const pageTools = [
|
|
|
183
187
|
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). From Core 0.3.45, retitling core/heading or core/rich_heading preserves its existing anchor by default; supply anchor_id to change it, or null to request generated ids. Prose/HTML heading changes still warn heading_anchor_changed.'),
|
|
184
188
|
status: z.enum(['draft', 'review', 'unlisted', 'published']).optional(),
|
|
185
189
|
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.'),
|
|
190
|
+
date_published: z.string().optional().describe('Publication date as an ISO date or datetime, such as the original date of an imported article. Applies immediately, like status.'),
|
|
186
191
|
unpublish_at: z.string().nullable().optional().describe('Scheduled unpublish: ISO datetime at which status flips back to draft (+ deploy). Null clears.'),
|
|
187
192
|
kind: z.enum(['page', 'article']).optional(),
|
|
188
193
|
author: z.string().optional(),
|
|
@@ -201,6 +206,7 @@ export const pageTools = [
|
|
|
201
206
|
path: z.string().optional().describe('Explicit URL path for nested pages (e.g. "/erbjudanden/sommar-2026"). Takes precedence over slug for routing; changing it auto-creates a 301 from the old URL on save.'),
|
|
202
207
|
noindex: z.boolean().optional(),
|
|
203
208
|
nofollow: z.boolean().optional(),
|
|
209
|
+
own_page: z.boolean().optional().describe('Set false for a record that only appears in lists: it has no address and no page of its own. Turning it on again needs a publication before the link works. Not for ordinary pages.'),
|
|
204
210
|
alternates: z
|
|
205
211
|
.array(z.object({ hreflang: z.string(), href: z.string() }))
|
|
206
212
|
.nullable()
|
|
@@ -314,6 +320,7 @@ export const pageTools = [
|
|
|
314
320
|
canonical_url: undefined, // intentionally NOT copied — point of canonical is to differ
|
|
315
321
|
noindex: src.noindex,
|
|
316
322
|
nofollow: src.nofollow,
|
|
323
|
+
own_page: src.own_page,
|
|
317
324
|
kind: src.kind,
|
|
318
325
|
author: src.author,
|
|
319
326
|
json_ld: undefined, // structured data is usually page-specific; force re-author
|
package/dist/tools/preview.js
CHANGED
|
@@ -26,6 +26,10 @@ export const previewTools = [
|
|
|
26
26
|
.boolean()
|
|
27
27
|
.optional()
|
|
28
28
|
.describe('Render unsaved drafts (working copies) too — yours AND the editor\'s. Off by default (saved content only). Signed into the token, so a draft link needs its own mint. Use this for your own iteration loop; use a plain link when the user wants to see exactly what a deploy would ship.'),
|
|
29
|
+
drafts_in_lists: z
|
|
30
|
+
.boolean()
|
|
31
|
+
.optional()
|
|
32
|
+
.describe('Lists (page lists, repeaters, related records) show draft pages and records too, so a site or section made of drafts, such as a migration prototype, can be checked before anything is published. Signed into the token. A plain link lists published records only, as a publication would.'),
|
|
29
33
|
include_frame_url: z
|
|
30
34
|
.boolean()
|
|
31
35
|
.optional()
|
package/dist/tools/settings.js
CHANGED
|
@@ -94,7 +94,7 @@ export const settingsTools = [
|
|
|
94
94
|
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.'),
|
|
95
95
|
typography: z.object({ ratio_mobile: z.number().min(1.1).max(1.5).nullable().optional(), ratio_desktop: z.number().min(1.1).max(1.5).nullable().optional(), rhythm: z.number().min(0.5).max(2).nullable().optional(), line_length: z.union([z.number().min(40).max(90), z.literal('none')]).nullable().optional() }).strict().nullable().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. Merged into the stored typography: only the controls you pass change, null resets one control to its default, and typography: null resets them all.'),
|
|
96
96
|
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()]).nullable()).nullable()).nullable().optional().describe('Site token scales, merged per step: only the steps you pass change (a responsive map replaces that step\'s previous value), a step set to null returns to the platform default, a scale set to null resets that scale, and design_scales: null resets every scale. Scales: 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. Steps never set use platform defaults.'),
|
|
97
|
-
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.'),
|
|
97
|
+
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. Other keys are colours of the site\'s own, such as blush: lowercase letters, digits and underscores, a CSS colour as value, null removes one. From render version 23 each is written as --color-<key> (underscores as dashes) and colour fields of blocks accept its name, e.g. a container background "blush".'),
|
|
98
98
|
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).'),
|
|
99
99
|
contact: z
|
|
100
100
|
.object({
|
package/dist/tools/styles.js
CHANGED
|
@@ -10,7 +10,7 @@ import { ok, withErrorBoundary, versionParam } from './helpers.js';
|
|
|
10
10
|
function v(version) {
|
|
11
11
|
return version ? { version } : undefined;
|
|
12
12
|
}
|
|
13
|
-
const COLOR_HELP = 'A palette token (primary, secondary, accent, background, surface, text, text_light), the text colour for a palette background (on_primary, on_secondary, on_accent: the site\'s colors.on_* when set, else black or white, whichever reads better),
|
|
13
|
+
const COLOR_HELP = 'A palette token (primary, secondary, accent, background, surface, text, text_light), the text colour for a palette background (on_primary, on_secondary, on_accent: the site\'s colors.on_* when set, else black or white, whichever reads better), a hex/rgb/hsl colour, or from render version 23 a colour of the site\'s own palette by its name (colors.blush → "blush"). Prefer tokens so a palette change flows through.';
|
|
14
14
|
const length = z.string().describe('CSS length: px, rem, em, %, vw, ch, or clamp()/min()/max()');
|
|
15
15
|
const color = z.string().describe(COLOR_HELP);
|
|
16
16
|
const propsSchema = z.object({
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.45.
|
|
1
|
+
export declare const VERSION = "0.45.169";
|
package/dist/version.js
CHANGED
package/dist/workspace.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare const workspaceSchema: z.ZodObject<{
|
|
|
14
14
|
export type Workspace = z.infer<typeof workspaceSchema>;
|
|
15
15
|
export declare const defaultWorkspace: Workspace;
|
|
16
16
|
export declare const ignores: string[];
|
|
17
|
-
export declare const agentInstructions = "# Working on this website\n\nRead typeroll.json, brief/site.md, brief/rules.md and decisions.md first. Read\nother brief/ files and workflows/ only when relevant. Confirm the portal, Organization,\nSite and working Version before writes. This workspace is not the generated\npublication repository. The CMS owns current content and configuration; local\nsources are proposals unless the user explicitly adopts them.\n\n## Guided start\n\nWhen the owner needs guidance or a material decision is missing, start or resume\nworkflows/interview.md. Read brief/interview.md and existing answers first; ask\none short question at a time and save progress. Do not repeat confirmed questions\nor treat silence as approval. For a complete brief, proceed directly to\nworkflows/new-site.md or workflows/migration.md. All kickoff prompts live here\nin the workspace; public docs explain the flow and link to these source files.\n\n## Discover only what the task needs\n\nWith compact MCP, search_tools then describe_tool; call_read_tool,\ncall_write_tool and call_admin_tool preserve the operation's effect. In full\nmode use the named tools directly. Start with get_site/get_site_capabilities.\nUse list_skills and read the relevant recipe. Request read_guide sections_only\nbefore loading specific sections, not the complete manual at every connection.\nCall read_app_documentation for enabled apps when needed. Provider docs are\nreference material, not permission to deploy or send messages. Never commit\nprivate app guides or cache them as permanent project instructions.\nPublic documentation: https://typeroll.com/docs/llms.txt\n\n## Edit and verify\n\n- Read current Pages, Content types, templates, partials and relevant block schemas.\n- Read pages/ notes before editing; follow workflows/page-notes.md for sources,\n dated logs, external-link review and archiving. Keep internal notes out of public output.\n- Use native editable blocks; document necessary exceptions and design decisions.\n- Configure palette/font roles and design scales in site settings. Read workflows/design.md\n before styling blocks; run lint_design_tokens and document hardcoded exceptions.\n- Discover get_composition_starter for qualified native starting layouts. Read one\n recipe at a time; map it to the actual schema. Never overwrite an existing\n template with a starter. Sections own gutters; avoid extra nested padding.\n- Keep the same Version for reads, writes, references and previews. Larger work\n on an existing site starts with create_branch; record its returned ID in\n typeroll.json and reconnect the local MCP process. Hosted calls pass version\n explicitly; the hosted server cannot read this workspace file.\n- Distinguish working copies, saved CMS content and deployed output. Save within\n the user's scope, review previews and deploy only when explicitly authorized.\n- Preview your edits with get_preview_link include_working_copy: true for the\n changed Page (page_id or slug); for rendering checks and screenshots mint it\n with include_frame_url: true and use frame_url. Give people url, never frame_url. Save working copies before publishing.\n- Before publishing, run trigger_deploy dry_run: true and read\n get_publication_impact. A publication ships everything saved on the Site,\n including other people's and other sessions' changes. If it lists changes you\n did not make, stop and find out whose they are. After an app version switch,\n dry-run and publish soon: live keeps the published version until then.\n- Before a render_version upgrade, compare previews at the current and target\n version (tr-upgrade-rendering), not the live site afterwards.\n- On your own computer, run request-heavy steps slowly: ISPs, routers and DNS\n can throttle rapid requests. Prefer a cloud session for large crawls, media\n copies and full-site checks (scripts/README.md).\n- Check get_import_readiness before any import. For new uploads use signed direct\n upload/finalization. Never put image bytes or customer secrets in Git.\n- Inspect desktop/mobile layouts and interaction states. Read changes back.\n Record exact version, tested pages, evidence and unresolved issues in qa/.\n- The signed preview is for content and layout review. Verify embeds, consent,\n analytics, fonts and measured design checks on the published test address.\n- Publish one Site at a time per Organization: all Sites share one build engine.\n- Record Typeroll defects in qa/typeroll-platform-feedback.md. Do not resume\n affected publishing until the fix is confirmed live.\n- Never edit generated publishing source to change CMS content. Do not overwrite\n current CMS or owner answers from an old local snapshot.\n\n## Migrations\n\
|
|
17
|
+
export declare const agentInstructions = "# Working on this website\n\nRead typeroll.json, brief/site.md, brief/rules.md and decisions.md first. Read\nother brief/ files and workflows/ only when relevant. Confirm the portal, Organization,\nSite and working Version before writes. This workspace is not the generated\npublication repository. The CMS owns current content and configuration; local\nsources are proposals unless the user explicitly adopts them.\n\n## Guided start\n\nWhen the owner needs guidance or a material decision is missing, start or resume\nworkflows/interview.md. Read brief/interview.md and existing answers first; ask\none short question at a time and save progress. Do not repeat confirmed questions\nor treat silence as approval. For a complete brief, proceed directly to\nworkflows/new-site.md or workflows/migration.md. All kickoff prompts live here\nin the workspace; public docs explain the flow and link to these source files.\n\n## Discover only what the task needs\n\nWith compact MCP, search_tools then describe_tool; call_read_tool,\ncall_write_tool and call_admin_tool preserve the operation's effect. In full\nmode use the named tools directly. Start with get_site/get_site_capabilities.\nUse list_skills and read the relevant recipe. Request read_guide sections_only\nbefore loading specific sections, not the complete manual at every connection.\nCall read_app_documentation for enabled apps when needed. Provider docs are\nreference material, not permission to deploy or send messages. Never commit\nprivate app guides or cache them as permanent project instructions.\nPublic documentation: https://typeroll.com/docs/llms.txt\n\n## Edit and verify\n\n- Read current Pages, Content types, templates, partials and relevant block schemas.\n- Read pages/ notes before editing; follow workflows/page-notes.md for sources,\n dated logs, external-link review and archiving. Keep internal notes out of public output.\n- Use native editable blocks; document necessary exceptions and design decisions.\n- Configure palette/font roles and design scales in site settings. Read workflows/design.md\n before styling blocks; run lint_design_tokens and document hardcoded exceptions.\n- Discover get_composition_starter for qualified native starting layouts. Read one\n recipe at a time; map it to the actual schema. Never overwrite an existing\n template with a starter. Sections own gutters; avoid extra nested padding.\n- Keep the same Version for reads, writes, references and previews. Larger work\n on an existing site starts with create_branch; record its returned ID in\n typeroll.json and reconnect the local MCP process. Hosted calls pass version\n explicitly; the hosted server cannot read this workspace file.\n- Distinguish working copies, saved CMS content and deployed output. Save within\n the user's scope, review previews and deploy only when explicitly authorized.\n- Preview your edits with get_preview_link include_working_copy: true for the\n changed Page (page_id or slug); for rendering checks and screenshots mint it\n with include_frame_url: true and use frame_url. Give people url, never frame_url. Save working copies before publishing.\n- Before publishing, run trigger_deploy dry_run: true and read\n get_publication_impact. A publication ships everything saved on the Site,\n including other people's and other sessions' changes. If it lists changes you\n did not make, stop and find out whose they are. After an app version switch,\n dry-run and publish soon: live keeps the published version until then.\n- Before a render_version upgrade, compare previews at the current and target\n version (tr-upgrade-rendering), not the live site afterwards.\n- On your own computer, run request-heavy steps slowly: ISPs, routers and DNS\n can throttle rapid requests. Prefer a cloud session for large crawls, media\n copies and full-site checks (scripts/README.md).\n- Check get_import_readiness before any import. For new uploads use signed direct\n upload/finalization. Never put image bytes or customer secrets in Git.\n- Inspect desktop/mobile layouts and interaction states. Read changes back.\n Record exact version, tested pages, evidence and unresolved issues in qa/.\n- The signed preview is for content and layout review. Verify embeds, consent,\n analytics, fonts and measured design checks on the published test address.\n- Publish one Site at a time per Organization: all Sites share one build engine.\n- Record Typeroll defects in qa/typeroll-platform-feedback.md. Do not resume\n affected publishing until the fix is confirmed live.\n- Never edit generated publishing source to change CMS content. Do not overwrite\n current CMS or owner answers from an old local snapshot.\n\n## Migrations\n\nUse the skill typeroll-migrate: six steps with saved results, where the owner\napproves the content model before anything is imported and the prototype before\neverything is. Decide the content type and template of every page before you\ncreate any. typeroll-migrate-sources covers APIs and exports. They are in\n.claude/skills and .agents/skills with the same text. Read tr-migration-evidence\nfirst; tr-migrate-wp, tr-import-url, tr-migrate-astro and tr-migrate-multisite hold the platform's rules per source.\nRecord text_intent and design_intent separately as preserve or renew\nin brief/migration.md; design includes images. Ask if either is unclear. Standard blocks first, reviewed\ncustom types next, documented HTML exceptions last. Preserve or meaningfully\nredirect every old public URL. Import completion is not block reconstruction\nor launch acceptance. A migration is finished only when no media or Page has\nfailed, or each failure is reviewed and accepted. Compare text and design/images separately: preserved dimensions to the source,\nrenewed dimensions to their approved brief. New design never permits rewriting preserved text.\nworkflows/migration.md has the kickoff prompt. Read scripts/README.md for version-bound\npre-deploy and hosted QA tools. Follow workflows/design.md for layout defaults.\n\n## Project rules and search strategy\n\nRecord the owner's preferences and durable constraints in brief/rules.md; put\napproved search intent, topic coverage and URL/indexing strategy in brief/seo.md.\nThese are project decisions, not CMS settings or permission to publish. If a\nrequest conflicts with an agreed rule, ask and record the resulting decision.\nUse workflows/README.md to find the relevant routine, not load every recipe.\n\n## Everyday requests\n\n- Links, images, menus, settings, analytics and site-wide changes: read the\n tr-edit-site recipe. Shared content becomes one global block, not N edits.\n- FAQ, recipe and event pages: add_faq_schema, add_recipe_schema and\n add_event_schema build validated JSON-LD (see tr-seo); don't hand-write it.\n- A blank site or the starter design: tr-starter-design lists its variables.\n- The portal's built-in AI is optional. When an AI workflow (site planning,\n content generation or improvement, schema markup) reports ai_not_enabled,\n do the work yourself with the recipe it names and say so; don't retry.\n\nStore credentials in the client's private settings or injected environment.\nRun the workspace doctor after setup and after changing the binding.\n";
|
|
18
18
|
export declare const workspaceTemplates: Record<string, string>;
|
|
19
19
|
export declare function readWorkspace(dir: string): Promise<Workspace>;
|
|
20
20
|
/** Reject linked destinations, including linked ancestor folders inside the workspace. */
|
package/dist/workspace.js
CHANGED
|
@@ -92,17 +92,20 @@ Public documentation: https://typeroll.com/docs/llms.txt
|
|
|
92
92
|
|
|
93
93
|
## Migrations
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
Use the skill typeroll-migrate: six steps with saved results, where the owner
|
|
96
|
+
approves the content model before anything is imported and the prototype before
|
|
97
|
+
everything is. Decide the content type and template of every page before you
|
|
98
|
+
create any. typeroll-migrate-sources covers APIs and exports. They are in
|
|
99
|
+
.claude/skills and .agents/skills with the same text. Read tr-migration-evidence
|
|
100
|
+
first; tr-migrate-wp, tr-import-url, tr-migrate-astro and tr-migrate-multisite hold the platform's rules per source.
|
|
101
|
+
Record text_intent and design_intent separately as preserve or renew
|
|
97
102
|
in brief/migration.md; design includes images. Ask if either is unclear. Standard blocks first, reviewed
|
|
98
103
|
custom types next, documented HTML exceptions last. Preserve or meaningfully
|
|
99
104
|
redirect every old public URL. Import completion is not block reconstruction
|
|
100
105
|
or launch acceptance. A migration is finished only when no media or Page has
|
|
101
106
|
failed, or each failure is reviewed and accepted. Compare text and design/images separately: preserved dimensions to the source,
|
|
102
|
-
renewed dimensions to their approved brief. New design never permits rewriting preserved text.
|
|
103
|
-
|
|
104
|
-
does not need to manually convert each Page. No automatic converter is available.
|
|
105
|
-
Discover tools and recipes on demand. Read scripts/README.md for version-bound
|
|
107
|
+
renewed dimensions to their approved brief. New design never permits rewriting preserved text.
|
|
108
|
+
workflows/migration.md has the kickoff prompt. Read scripts/README.md for version-bound
|
|
106
109
|
pre-deploy and hosted QA tools. Follow workflows/design.md for layout defaults.
|
|
107
110
|
|
|
108
111
|
## Project rules and search strategy
|
|
@@ -127,16 +130,22 @@ Use workflows/README.md to find the relevant routine, not load every recipe.
|
|
|
127
130
|
Store credentials in the client's private settings or injected environment.
|
|
128
131
|
Run the workspace doctor after setup and after changing the binding.
|
|
129
132
|
`;
|
|
133
|
+
/** Each skill has one source text; Claude Code and Codex read it from their own folder. */
|
|
134
|
+
const bundledFiles = Object.fromEntries(Object.entries(BUNDLED_WORKSPACE_TEMPLATES).flatMap(([name, content]) => {
|
|
135
|
+
const skill = /^skills\/([a-z0-9-]+)\.md$/.exec(name)?.[1];
|
|
136
|
+
return skill ? [[`.claude/skills/${skill}/SKILL.md`, content], [`.agents/skills/${skill}/SKILL.md`, content]] : [[name, content]];
|
|
137
|
+
}));
|
|
130
138
|
export const workspaceTemplates = {
|
|
131
|
-
...
|
|
139
|
+
...bundledFiles,
|
|
132
140
|
'AGENTS.md': agentInstructions,
|
|
141
|
+
'CLAUDE.md': 'Read and follow the project instructions:\n\n@AGENTS.md\n',
|
|
133
142
|
'README.md': `# Website workspace\n\nKeep project intent here; edit the website through Typeroll CMS.\n\n1. Read AGENTS.md. For guidance, ask your agent to start or resume workflows/interview.md. Otherwise use workflows/new-site.md or workflows/migration.md. Save confirmed goals, rules and SEO strategy in brief/; record text and design/image choices separately for migrations.\n2. Connect hosted MCP at https://app.typeroll.com/api/mcp?tools=compact.\n3. Use an Organization key to create a site, or select an existing one.\n4. Record its IDs and working version in typeroll.json. No secrets belong there.\n5. Run npx @typeroll/mcp-server doctor . (inject TYPEROLL_API_KEY privately).\n\nStart guide: https://typeroll.com/docs/getting-started/agent-workspace/\n\nUpdate the generated scaffold with npx @typeroll/mcp-server init . --update.\nEdited files are preserved and reported for manual reconciliation. Optional local\nrecipes: init . --recipes. They are reference Markdown, not automatically loaded.\n`,
|
|
134
143
|
'brief/site.md': '# Site brief\n\n## Purpose and audience\n\n## Languages and scope\n\n## Primary user journeys\n\n## Content authority and sources\n\n## Editorial constraints and forbidden internal markers\n',
|
|
135
144
|
'brief/brand.md': '# Brand\n\n## Voice and tone\n\n## Visual direction and references\n\n## Typography, colors and image policy\n\n## Desktop and mobile navigation\n\nRecord intent here; current design tokens belong in CMS settings. Choose semantic palette roles and typography/spacing steps; record deliberate hardcoded exceptions in decisions.md.\n',
|
|
136
145
|
'brief/content-model.md': '# Content model\n\n## Page plan\n\nThe pages the business needs, agreed before design work: home, about, services or products, pricing, contact, privacy policy and other legal pages, comparisons and articles as relevant. One row per page: title, path, purpose, primary search intent and status (planned, built, published).\n\n| Title | Path | Purpose | Search intent | Status |\n| --- | --- | --- | --- | --- |\n\n## Page types and routes\n\n## Fields and references\n\n## Shared templates and partials\n\n## Taxonomy and navigation\n\nUse the current CMS schema. This document describes decisions, not a second schema store.\n',
|
|
137
146
|
'brief/rules.md': "# Owner preferences and project rules\n\n## Confirmed rules\n\nRecord each rule, its scope, who approved it and the date. Separate confirmed rules from proposals.\n\n## Writing and factual accuracy\n\nVoice, terminology, prohibited claims, source requirements and legal copy that must not be rewritten.\n\n## Design and editing\n\nBrand constraints, accessibility, editable content, standard/custom blocks and documented HTML exceptions.\n\n## Operations and approval\n\nWho may approve content, publication, DNS changes and messages? Credentials stay outside this repository.\n\n## Exceptions and superseded rules\n\nLink decisions.md; do not silently override a confirmed rule. Project notes do not grant permissions beyond the user's authorization or account access.\n",
|
|
138
147
|
'brief/seo.md': "# SEO strategy\n\n## Launch basics\n\nAsk the owner early; each item is optional. Record a skipped item here with the reason. Current values live in the CMS settings.\n\n- Default share image (`default_og_image`): chosen, uploaded or created with tr-imagegen; 1200×630 PNG or JPEG. Never a generated title card.\n- Organization (`organization`): business name and logo, and official profile URLs (`same_as`).\n- Page plan: agreed in brief/content-model.md, including privacy policy and contact pages.\n- Search Console: property type (Domain or URL prefix), verification method, who has access and the date the sitemap was submitted.\n- AI crawlers (`ai_crawler_policy`): allow_all (default), no_training or block_all, and any Cloudflare zone policy that must match.\n\n## Business goals, audience, markets and languages\n\n## Search intent and topic coverage\n\nRecord research sources and dates. Distinguish evidence from assumptions; do not invent traffic or ranking forecasts.\n\n## Page roles and URL plan\n\nContent types, useful landing pages, taxonomy, internal links and routes to preserve or redirect. Avoid near-duplicate pages created only for keyword variants.\n\n## Indexing and canonical policy\n\nWhich pages should be indexable, public noindex, or private? Record deliberate canonical overrides and sitemap policy; actual values live in the CMS.\n\n## Editorial standards and structured data\n\nUnique useful copy, supported claims, descriptive titles and links, accessible image text, schema matching visible content. No fixed title length or word count is a hard SEO rule.\n\n## Measurement and review\n\nBaseline, analytics/consent decisions, measures of success and review dates. Never store credentials or private analytics exports here.\n",
|
|
139
|
-
'workflows/README.md': "# Project routines\n\nRead only the relevant routine and discover current tool schemas through MCP.\nProject files record intent; the CMS owns current content and configuration.\n\n| Task | Project context | On-demand recipe |\n| --- | --- | --- |\n| Guided start | workflows/interview.md, brief/interview.md | Ask one question at a time; resume confirmed answers |\n| New website | workflows/new-site.md, brief/site.md, brief/brand.md, brief/content-model.md | tr-new-site, tr-starter-design |\n| Migration | workflows/migration.md, brief/migration.md |
|
|
148
|
+
'workflows/README.md': "# Project routines\n\nRead only the relevant routine and discover current tool schemas through MCP.\nProject files record intent; the CMS owns current content and configuration.\n\n| Task | Project context | On-demand recipe |\n| --- | --- | --- |\n| Guided start | workflows/interview.md, brief/interview.md | Ask one question at a time; resume confirmed answers |\n| New website | workflows/new-site.md, brief/site.md, brief/brand.md, brief/content-model.md | tr-new-site, tr-starter-design |\n| Migration | workflows/migration.md, brief/migration.md, qa/migration/ | The skill typeroll-migrate, with tr-migration-evidence |\n| Everyday editing | brief/rules.md, pages/ notes and the relevant Page | tr-edit-site |\n| Page notes and review | workflows/page-notes.md, pages/README.md, pages/index.md | Read before edits; update logs afterward |\n| SEO | brief/seo.md and current site settings | tr-seo |\n| New reusable block | brief/brand.md and recorded editing needs | tr-custom-blocks |\n| Verification and publication | qa/checklist.md, decisions.md | Current preview/deploy tools and publishing readiness |\n| Launch | qa/checklist.md (Launch), brief/seo.md (Launch basics) | read_site_readiness, tr-seo |\n\nAdd project-specific routines here with inputs, steps, acceptance evidence and approval boundaries. Do not copy the complete Typeroll manual or private app guides. Discover enabled app guidance with read_app_documentation. Load a recipe when needed so instructions stay current and context stays small.\n",
|
|
140
149
|
'decisions.md': '# Decisions\n\nRecord date, decision, reason, approved scope and alternatives when useful. For design-token exceptions include the source/block, fixed value, reason (e.g. white text on a photograph) and review criteria.\n',
|
|
141
150
|
'sources/README.md': '# Sources\n\nStore research references and copy proposals. Record source URLs and dates.\nPrivate extracts belong in ignored private/ or an approved external store.\nDo not treat local drafts as current CMS content or commit media libraries.\n',
|
|
142
151
|
};
|
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.169",
|
|
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
|
@@ -387,7 +387,7 @@ Open in browser. Check:
|
|
|
387
387
|
- Nav text is readable against header background
|
|
388
388
|
- Body text has sufficient contrast
|
|
389
389
|
|
|
390
|
-
The preview
|
|
390
|
+
The preview does not use the font files of the published site, so it proves nothing
|
|
391
391
|
about font delivery. After an authorized publish, check the published
|
|
392
392
|
temporary/test address:
|
|
393
393
|
- `/_typeroll/fonts/fonts.css` has `@font-face` rules for every chosen Google
|
|
@@ -16,6 +16,8 @@ Use standard blocks first, reviewed custom types next, rare documented HTML last
|
|
|
16
16
|
All four combinations must preserve or meaningfully redirect every old public URL. That
|
|
17
17
|
shared contract defines acceptance; this recipe only adds source-specific steps.
|
|
18
18
|
|
|
19
|
+
**How to do it:** in a starter workspace use its skills `typeroll-migrate` and
|
|
20
|
+
`typeroll-migrate-sources`. This recipe holds what is special about Astro.
|
|
19
21
|
|
|
20
22
|
Astro Content Collections are source data. In Typeroll, each source record
|
|
21
23
|
becomes a Page, and each source schema becomes a Content type. Static Astro
|
|
@@ -86,19 +88,8 @@ to returned media URLs. Use direct upload URLs for local bytes and the customer
|
|
|
86
88
|
transfer flow for remote media; do not relay large base64 payloads through the
|
|
87
89
|
model. Preserve alt text, captions, dimensions, links and image variants.
|
|
88
90
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Follow `tr-images` for upload → verification → private preparation → publication.
|
|
92
|
-
Do not use pending imports or share authenticated editor URLs. From Core
|
|
93
|
-
0.3.49, new uploads default to root filenames without date folders; explicit
|
|
94
|
-
folders and WordPress upload-relative folders remain supported. Read returned
|
|
95
|
-
paths rather than flattening names or predicting numeric collision suffixes.
|
|
96
|
-
Keep each Site's media namespace separate, including when several old Sites
|
|
97
|
-
are merged. Verify historical image/PDF URLs independently of rewritten HTML;
|
|
98
|
-
use established prefix mappings and exact exceptions, not a redirect for every
|
|
99
|
-
new variant. The matching Core runtime is required. See
|
|
100
|
-
https://typeroll.com/docs/tools/media/ and
|
|
101
|
-
https://typeroll.com/docs/tools/redirects/#image-and-file-addresses.
|
|
91
|
+
Follow `tr-images` for media. Read returned paths, keep each Site's namespace
|
|
92
|
+
separate and check old image and PDF addresses on their own.
|
|
102
93
|
|
|
103
94
|
## Listing and verification
|
|
104
95
|
|
|
@@ -106,18 +106,12 @@ it), in its language so `<html lang>` is right from the first build:
|
|
|
106
106
|
create_site name="Example DE" id="example-de" language="de-DE"
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
Then
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
fetch https://example.de/sitemap.xml # follow sitemap-index children
|
|
113
|
-
fetch https://example.de/wp-json/wp/v2/pages?per_page=100 # walk X-WP-TotalPages
|
|
114
|
-
```
|
|
109
|
+
Then list its addresses. The starter's `inventory.py` finds them and its import adds
|
|
110
|
+
them; otherwise post them yourself:
|
|
115
111
|
|
|
116
112
|
```
|
|
117
113
|
add_migration_urls site_id=<de-site> source_origin="https://example.de" source="sitemap" urls=[
|
|
118
|
-
{ url: "https://example.de/ueber-uns" },
|
|
119
|
-
{ url: "https://example.de/kontakt" },
|
|
120
|
-
…
|
|
114
|
+
{ url: "https://example.de/ueber-uns" }, …
|
|
121
115
|
]
|
|
122
116
|
```
|
|
123
117
|
|
|
@@ -149,7 +143,8 @@ list_migration_urls site_id=<de-site> status="unhandled" limit=50
|
|
|
149
143
|
|
|
150
144
|
## Phase 2 — Build the reference site
|
|
151
145
|
|
|
152
|
-
|
|
146
|
+
In a starter workspace use its skill `typeroll-migrate`, one workspace per Site.
|
|
147
|
+
Otherwise follow `tr-migrate-wp` (or `tr-import-url`). Build the ONE reference site:
|
|
153
148
|
design, header/footer partials, page templates, block types. Get the user to
|
|
154
149
|
approve it before replicating — every fix you make after this point costs
|
|
155
150
|
N times as much.
|
|
@@ -190,19 +185,8 @@ source JavaScript, and carry each market's own analytics and advertising IDs
|
|
|
190
185
|
over in that site's Integrations app with its cookie banner enabled. Never
|
|
191
186
|
reuse one market's tracking IDs on another.
|
|
192
187
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
Follow `tr-images` for upload → verification → private preparation → publication.
|
|
196
|
-
Do not use pending imports or share authenticated editor URLs. From Core
|
|
197
|
-
0.3.49, new uploads default to root filenames without date folders; explicit
|
|
198
|
-
folders and WordPress upload-relative folders remain supported. Read returned
|
|
199
|
-
paths rather than flattening names or predicting numeric collision suffixes.
|
|
200
|
-
Keep each Site's media namespace separate, including when several old Sites
|
|
201
|
-
are merged. Verify historical image/PDF URLs independently of rewritten HTML;
|
|
202
|
-
use established prefix mappings and exact exceptions, not a redirect for every
|
|
203
|
-
new variant. The matching Core runtime is required. See
|
|
204
|
-
https://typeroll.com/docs/tools/media/ and
|
|
205
|
-
https://typeroll.com/docs/tools/redirects/#image-and-file-addresses.
|
|
188
|
+
Follow `tr-images` for media. Read returned paths, keep each Site's namespace
|
|
189
|
+
separate and check old image and PDF addresses on their own.
|
|
206
190
|
|
|
207
191
|
## Phase 5 — Redirects for everything you didn't preserve
|
|
208
192
|
|
|
@@ -400,11 +384,6 @@ explains every item.
|
|
|
400
384
|
|
|
401
385
|
## Storage prerequisite
|
|
402
386
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
and verify its own storage first. Do not fall back to draft storage, hotlink
|
|
407
|
-
source images, or use ordinary page-write tools to bypass the import gate.
|
|
408
|
-
Use `upload_media_from_url` for referenced source images; the customer’s
|
|
409
|
-
Cloudflare transfer Worker copies and verifies them directly in R2, independently
|
|
410
|
-
of the GitHub/Cloudflare build-provider choice.
|
|
387
|
+
Call `get_import_readiness` before reading or importing. If `ready` is false, stop and
|
|
388
|
+
show the message and Publishing settings link. Never fall back to draft storage or
|
|
389
|
+
hotlinked images. Copy media with `upload_media_from_url`.
|