@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.
Files changed (42) hide show
  1. package/AGENTS.md +3 -1
  2. package/dist/bundled-content.js +26 -13
  3. package/dist/server.js +4 -0
  4. package/dist/tools/apps.js +33 -0
  5. package/dist/tools/fonts.js +1 -1
  6. package/dist/tools/forms.js +4 -3
  7. package/dist/tools/media.js +2 -2
  8. package/dist/tools/migration.js +1 -1
  9. package/dist/tools/pages.js +7 -0
  10. package/dist/tools/preview.js +4 -0
  11. package/dist/tools/settings.js +1 -1
  12. package/dist/tools/styles.js +1 -1
  13. package/dist/version.d.ts +1 -1
  14. package/dist/version.js +1 -1
  15. package/dist/workspace.d.ts +1 -1
  16. package/dist/workspace.js +17 -8
  17. package/package.json +1 -1
  18. package/skills/tr-brand.md +1 -1
  19. package/skills/tr-migrate-astro.md +4 -13
  20. package/skills/tr-migrate-multisite.md +10 -31
  21. package/skills/tr-migrate-wp.md +73 -384
  22. package/skills/tr-responsive.md +14 -0
  23. package/workspace-templates/scripts/README.md +18 -0
  24. package/workspace-templates/scripts/typeroll/browser.cjs +6 -1
  25. package/workspace-templates/scripts/typeroll/call.py +5 -2
  26. package/workspace-templates/scripts/typeroll/css_report.py +45 -0
  27. package/workspace-templates/scripts/typeroll/inventory.py +264 -0
  28. package/workspace-templates/scripts/typeroll/media_fit.py +112 -0
  29. package/workspace-templates/scripts/typeroll/migration.py +254 -0
  30. package/workspace-templates/scripts/typeroll/page_part.cjs +34 -0
  31. package/workspace-templates/scripts/typeroll/page_source.py +148 -0
  32. package/workspace-templates/scripts/typeroll/pages.py +156 -0
  33. package/workspace-templates/scripts/typeroll/read_pages.cjs +169 -0
  34. package/workspace-templates/scripts/typeroll/shoot_hosted.cjs +13 -6
  35. package/workspace-templates/scripts/typeroll/trlib.py +45 -7
  36. package/workspace-templates/scripts/typeroll/verify_migration.cjs +47 -0
  37. package/workspace-templates/scripts/typeroll/verify_migration.py +274 -0
  38. package/workspace-templates/scripts/typeroll/write_pages.py +542 -0
  39. package/workspace-templates/skills/typeroll-migrate-sources.md +36 -0
  40. package/workspace-templates/skills/typeroll-migrate.md +109 -0
  41. package/workspace-templates/workflows/design.md +1 -1
  42. package/workspace-templates/workflows/migration.md +12 -5
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: typeroll-migrate
3
+ description: Move an existing website to Typeroll in six steps with saved results and two owner approvals. Use when the user wants to migrate, move, rebuild or import a website.
4
+ ---
5
+
6
+ # Move a website to Typeroll
7
+
8
+ You drive the migration. You look at every page, decide what it is and build it. The
9
+ scripts only fetch material, write what you decided and check the result. Do not
10
+ write scripts that sort pages, pull out fields or turn pages into blocks by rules:
11
+ that has been tried, and it fails. A small script for a chore you have decided on
12
+ is fine, and you read its result page by page.
13
+
14
+ Every step saves a result in `qa/migration/`, and the scripts refuse a step until the
15
+ one before it has passed. Do not edit results to get past a stop. What comes next:
16
+
17
+ ```sh
18
+ python3 scripts/typeroll/migration.py status
19
+ ```
20
+
21
+ Before you start:
22
+
23
+ - Read AGENTS.md, brief/migration.md and `tr-migration-evidence` (`read_skill`).
24
+ Record `text_intent` and `design_intent`, each preserve or renew. Ask if unclear.
25
+ - `migration.py status` warns when these files are older than the Typeroll you are
26
+ connected to. Then run `npx @typeroll/mcp-server init . --update`.
27
+ - Read block fields from the CMS (`read_block_type`), never from a file.
28
+ - Check `get_import_readiness` and `get_migration_readiness`. Stop on a blocker.
29
+ - Several sites at once: read `tr-migrate-multisite` first, then do one at a time.
30
+
31
+ | Step | You do | Passes when |
32
+ | --- | --- | --- |
33
+ | 1 Inventory | `inventory.py https://old-site.example` | every page was saved |
34
+ | 2 Model | look at every page, `pages.py note` | every page has an answer, and the **owner approved it** |
35
+ | 3 Prototype | build one page of every kind, `write_pages.py prototype` | it is right, and the **owner approved it** |
36
+ | 4 Import | build the rest, `write_pages.py all` | every page is a draft, nothing was refused |
37
+ | 5 Compare | look at every new page, then `verify_migration.py` | no differences, or the owner accepted them |
38
+ | 6 Hand over | `migration.py handover` | the launch report is ready |
39
+
40
+ All scripts are in `scripts/typeroll/`. Set `TYPEROLL_API_KEY` privately. Playwright:
41
+ see `scripts/README.md`.
42
+
43
+ ## 1. Inventory
44
+
45
+ Saves every page as a visitor sees it, with pictures at two widths, in the ignored
46
+ `sources/private/`. Slow on purpose; run it again to continue. See `notes`. `outside`
47
+ lists parts from other sites and clickable maps: for each, a Core block, the site's own
48
+ block type, or ask the owner.
49
+
50
+ ## 2. Model
51
+
52
+ Before any page is made: a hundred events found after they became a hundred separate
53
+ pages have to be made again.
54
+
55
+ 1. `pages.py start`, then `pages.py next`. Open the pictures under `look_at`. Is the
56
+ page one of several of the same kind (article, event, person, case, product)?
57
+ Should it share a template? Are there lists of things that should be records?
58
+ Add kinds with `pages.py type` (`--no-pages` for records only shown in lists).
59
+ 2. Answer with `pages.py note PATH TYPE "what you saw"`: a content type, `page` (one
60
+ of a kind), `skip` with the reason and `--to /new/path/` (or `--to gone`), or
61
+ `ask` with your question for the owner. One page at a time. Go back and change
62
+ earlier answers when a later page shows a pattern. Cut a tall picture into
63
+ pieces before you look (`ffmpeg -i in.jpg -vf crop=iw:2000:0:0 top.jpg`).
64
+ 3. In `qa/migration/model.json`, set fields, `route_template` and `template` of each
65
+ type. A field is what differs between the pages; the template holds the rest.
66
+ Pages of one type in other folders keep their address with their own `path`.
67
+ Link records with `page_ref` or `page_ref_list` and `ref_content_type`.
68
+
69
+ Ask the owner about pages that show nothing. Show the types, what each page becomes
70
+ and an example in plain words, then run `migration.py approve model "NAME"`. Only the
71
+ owner approves, and a later edit voids it.
72
+
73
+ ## 3. Prototype
74
+
75
+ Build the design first: site settings, header, footer, and a template per type
76
+ (`create_page_template`). Then write one page file per page; the format is in
77
+ `write_pages.py --help`. Choose the blocks yourself from the picture. Copy long text
78
+ with `{"copy": "SELECTOR"}` from `page_source.py PATH`, so it is exact. Start with one
79
+ page of every kind: `write_pages.py prototype PATH PATH --apply`. Look at each preview
80
+ (`get_preview_link` with `drafts_in_lists: true`, so lists show the drafts)
81
+ beside the old picture, show the owner, then `migration.py approve prototype "NAME"`.
82
+
83
+ ## 4. Import
84
+
85
+ Write the remaining page files, reading each old page. `write_pages.py all --apply`
86
+ makes drafts, can be run again and leaves pages changed in the CMS alone. Fix what is
87
+ under `refused`, `missing`, `failed`, `taken` and `redirect_problems`. The import
88
+ makes every redirect itself, the old site's own included. Never send removed pages to the home page.
89
+ A file the library refuses is copied by hand, smaller and with a shorter name
90
+ (`media_fit.py`, needs ffmpeg); `media_why` gives the reason when that fails too.
91
+ `empty_fields` lists fields no page fills: read the old pages for them, or remove them.
92
+
93
+ ## 5. Compare
94
+
95
+ Look at every new page beside the old picture, at both widths. Say what you compared:
96
+ `pages.py checked PATH "..."`. `pages.py left` lists what remains.
97
+
98
+ Publish to the test address only with the owner's permission, and read
99
+ `get_publication_impact` first. The comparison covers texts, addresses, headings,
100
+ links to the old site, videos, files and images on every page. Look at the
101
+ screenshots in `qa/reports/migration/` yourself: a script cannot see that a
102
+ page looks wrong. Put a difference the owner accepts in `qa/migration/accepted.json`,
103
+ for example `{"/about/": ["text missing"]}`. Run `css_report.py` and write a reason
104
+ for every deviation from the design system.
105
+
106
+ ## 6. Hand over
107
+
108
+ `handover.md` lists what stops the launch and what is worth fixing. Then run
109
+ `read_site_readiness`. Publishing and DNS each need their own approval.
@@ -61,7 +61,7 @@ explicit exceptions, not the default authoring method. Configure scales in
61
61
 
62
62
  Use exact Google Fonts family names. Published sites self-host them by default
63
63
  (`fonts.delivery: self_hosted`); a name Google does not serve falls back
64
- silently, and the preview loads fonts from Google, so check fonts on the
64
+ silently, and the preview does not use the published font files, so check fonts on the
65
65
  published address (qa/checklist.md). `delivery: google` sends each visitor's IP
66
66
  address to Google: a privacy decision for the owner.
67
67
 
@@ -8,7 +8,9 @@ Migrate [source URL] to Typeroll, Organization [ID/name], Site [ID/name], Versio
8
8
  Text: [preserve existing wording / renew against an agreed editorial brief].
9
9
  Design and images: [preserve / renew against an agreed design brief].
10
10
  Read AGENTS.md and use workflows/interview.md for missing decisions.
11
- Read tr-migration-evidence, then tr-migrate-wp (or the appropriate source recipe).
11
+ Use the skill typeroll-migrate: inventory, model, prototype, import, compare, hand over.
12
+ Read tr-migration-evidence. Decide the content type and template of every page first. Show me the content
13
+ model before anything is imported, and the prototype before everything is.
12
14
  Confirm the target and import readiness before writes. Inventory URLs, content,
13
15
  media, templates and integrations; record both choices and exceptions in brief/migration.md.
14
16
  Build and verify one prototype per distinct layout before bulk reconstruction.
@@ -22,10 +24,15 @@ Report unverified items separately. Do not publish, switch DNS or send messages
22
24
  without explicit approval.
23
25
  ```
24
26
 
27
+ The six steps, their commands and what makes each pass are in the skill
28
+ typeroll-migrate. Results are saved in qa/migration/; `migration.py status` says
29
+ what comes next. The scripts refuse to go on without the owner's approvals.
30
+
25
31
  The managed importer stages cleaned HTML, media and shared references in Review.
26
32
  The external agent can then reconstruct those Pages; no manual editor conversion
27
33
  is required. An agent can also build block Pages directly from source material.
28
- Neither path includes an automatic HTML-to-blocks converter. Read and preserve the
34
+ Neither path includes an HTML-to-blocks converter: the agent builds every page,
35
+ and the starter's scripts only fetch, write and check. Read and preserve the
29
36
  full source before switching modes, then save/read back and preview the rebuilt
30
37
  Page on the selected Version. Never publish an empty intermediate block Page.
31
38
 
@@ -36,9 +43,9 @@ and URL continuity contract. Planning choices are not migration API fields.
36
43
 
37
44
  ## Repeatable reconstruction and acceptance
38
45
 
39
- Read workflows/design.md and scripts/README.md. First check whether public
40
- WordPress REST + HTML covers the source; use tr-migrate-wp's access decision
41
- table before asking for a helper plugin. Inventory both Pages and posts plus
46
+ Read workflows/design.md and scripts/README.md. The pages as visitors see them are
47
+ the source. Use the table in typeroll-migrate-sources before asking for an export
48
+ or a helper plugin. Inventory both Pages and posts plus
42
49
  internal links and known old slugs. A sitemap alone is not complete.
43
50
 
44
51
  Crawl and copy slowly on your own computer: an ISP, router or DNS resolver can