@typeroll/mcp-server 0.45.149 → 0.45.151
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 +45 -11
- package/README.md +9 -2
- package/dist/bundled-content.js +9 -9
- package/dist/server.js +3 -0
- package/dist/tools/email.js +32 -6
- package/dist/tools/media.js +5 -5
- package/dist/tools/pages.js +6 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/tr-images.md +39 -18
- package/skills/tr-import-url.md +13 -2
- package/skills/tr-migrate-astro.md +14 -0
- package/skills/tr-migrate-multisite.md +14 -0
- package/skills/tr-migrate-wp.md +13 -5
- package/skills/tr-migration-evidence.md +14 -0
- package/workspace-templates/workflows/source-media.md +15 -0
package/AGENTS.md
CHANGED
|
@@ -818,16 +818,21 @@ or `page_ref_list` with `ref_content_type`. Preview with the returned Page ID.
|
|
|
818
818
|
upload_media_from_url source_url="https://..." alt_text="Hero photo of …"
|
|
819
819
|
→ returns { media_id, cdn_url, finalize: {…}, finalize_error: null }
|
|
820
820
|
|
|
821
|
-
# OR image lives
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
#
|
|
828
|
-
#
|
|
829
|
-
#
|
|
830
|
-
#
|
|
821
|
+
# OR a local/generated image lives on disk:
|
|
822
|
+
create_upload_url filename="hero.png" content_type="image/png" size=<bytes>
|
|
823
|
+
→ returns { media_id, upload_url, cdn_url, ... }
|
|
824
|
+
# PUT the actual file bytes to upload_url with Content-Type: image/png,
|
|
825
|
+
# then call finalize_media media_id=<id> expected_sha256=<source-hash>.
|
|
826
|
+
|
|
827
|
+
# Inspect import.state, readiness and finalize_error first. A pending import
|
|
828
|
+
# is not ready to reference; a successful PUT alone is not a verified file.
|
|
829
|
+
# URL and inline uploads finalize automatically when successful. A manual
|
|
830
|
+
# create_upload_url + PUT requires finalize_media explicitly.
|
|
831
|
+
# Finalize verifies and freezes the private original; the Organization's
|
|
832
|
+
# build engine prepares AVIF/WebP variants privately and publishes referenced
|
|
833
|
+
# media with the website. generate_image_variants does not transcode here.
|
|
834
|
+
# Use the verified cdn_url in content; it is an authenticated editor reference,
|
|
835
|
+
# not a public sharing link. Public PDFs use publish_media_file separately.
|
|
831
836
|
#
|
|
832
837
|
# INTEGRITY — don't lose bytes in transit. upload_media_inline carries the
|
|
833
838
|
# file as a base64 string through the model/tool boundary; a payload beyond a
|
|
@@ -848,6 +853,35 @@ read_page page_id=...
|
|
|
848
853
|
update_page page_id=... patch={ html_content: "<...><img src='{cdn_url}' alt='…' /></...>" }
|
|
849
854
|
```
|
|
850
855
|
|
|
856
|
+
### Media names, public links and recovery
|
|
857
|
+
|
|
858
|
+
Core 0.3.49/MCP 0.45.150 use root filenames for new uploads without automatic
|
|
859
|
+
year/month folders. Explicit folders are supported. WordPress imports keep
|
|
860
|
+
upload-relative folders, omitting `wp-content/uploads` and multisite prefixes.
|
|
861
|
+
Different bytes receive permanent `-2`, `-3` names at first publication; changing
|
|
862
|
+
a display filename does not move an allocated public address. A shared
|
|
863
|
+
Organization media host still includes an isolated Site namespace. Responsive
|
|
864
|
+
variants retain generated recipe/hash suffixes.
|
|
865
|
+
|
|
866
|
+
Safe old aliases are retained for media still needed by the publication;
|
|
867
|
+
reserved names do not keep deleted or unused files in every later build.
|
|
868
|
+
Managed WordPress imports can declare an uploads prefix, with exact exceptions
|
|
869
|
+
for changed names. Borrowing an image from WordPress alone never authorizes that
|
|
870
|
+
namespace. Keep stored redirects, verify historical public URLs independently
|
|
871
|
+
of current HTML, and use the Pages/Bulk policy in the public guide. Ordinary
|
|
872
|
+
replacements do not add one redirect per image or per variant.
|
|
873
|
+
|
|
874
|
+
`read_media`/`list_media` distinguish ready, pending and failed imports. A library
|
|
875
|
+
identity or old HTML reference is not evidence of a file's availability. Repair
|
|
876
|
+
the source or upload verified bytes; do not hotlink a failed source. Missing
|
|
877
|
+
referenced files stop publication by default. Deletion removes public copies
|
|
878
|
+
and purges caches; HTTP 207 is incomplete, and protected shared bytes remain
|
|
879
|
+
until their other media owners are deliberately removed. See
|
|
880
|
+
https://typeroll.com/docs/tools/media/ and
|
|
881
|
+
https://typeroll.com/docs/tools/redirects/#image-and-file-addresses.
|
|
882
|
+
Cloud requires the matching runtime release; updating MCP alone changes no
|
|
883
|
+
server behavior.
|
|
884
|
+
|
|
851
885
|
### "Stop an image over-fetching a too-large variant"
|
|
852
886
|
|
|
853
887
|
When an image renders much narrower than the viewport (a container-constrained
|
|
@@ -1364,7 +1398,7 @@ preview.
|
|
|
1364
1398
|
| **Block types** | `list_block_types`, `read_block_type`, `find_pages_using_block_type`, `list_block_type_starters`, `validate_block_type`, `preview_block_type`, `create_block_type`, `update_block_type` (`renames`, `confirm_data_loss`), `delete_block_type`, `export_block_types`, `import_block_types` (`on_conflict`: skip, rename, replace). Authoring and import need write permission. |
|
|
1365
1399
|
| **Content types** | `list_content_types`, `read_content_type`, `create_content_type`, `update_content_type`, `delete_content_type`, `change_page_content_type`, `page_completeness` |
|
|
1366
1400
|
| **Page templates** | `list_page_templates`, `read_page_template`, `create_page_template` (a display `name` such as "Artikel" derives the ID `artikel`; or pass `id`), `update_page_template`, `delete_page_template` |
|
|
1367
|
-
| **Media** | `get_media_upload_status`, `list_media`, `read_media`, `create_upload_url`, `upload_media_from_url`, `upload_media_inline`, `
|
|
1401
|
+
| **Media** | `get_import_readiness`, `get_media_upload_status`, `list_media`, `read_media`, `read_private_media_url`, `create_upload_url`, `upload_media_from_url`, `upload_media_batch_from_urls`, `upload_media_inline`, `finalize_media`, `get_media_preparation`, `prepare_media`, `publish_media_file` (PDF), `update_media`, `replace_media` (admin, all versions), `delete_media`, `delete_media_batch` (1–20 explicit IDs), `remove_published_media_copies` (admin, deleted copies; dry run first), `finalize_all_media` / `generate_image_variants` (compatibility, no portal transcoding), `suggest_alt_text_context`. HTTP 207 is incomplete; inspect protected bytes and cache-purge failures. |
|
|
1368
1402
|
| **Redirects** | `list_redirects`, `create_redirect`, `delete_redirect`. `from_path` may be a PATTERN: a trailing `*` (with `:splat` in the target) or `:name` for one segment — one rule retires a whole family of dead URLs (`/category/*` → `/blogg/:splat`). Mid-path splats and query strings are refused, as is any rule that would hide a live page. |
|
|
1369
1403
|
| **Migration inventory + launch gate** | `get_migration_readiness` (preflight — CALL FIRST), `list_migration_urls`, `add_migration_urls`, `update_migration_url`, `update_migration_urls`, `delete_migration_url`, `import_sitemap`, `import_gsc_performance`, `repair_migration_plain_text`, `verify_migration_urls`, `record_migration_seo_acceptance`, `get_migration_launch_report`. Sitemap indexes are recursive. GSC supports direct Search Console access or CSV and aggregates fragment variants. Plain-text repair is allowlisted and dry-run-first. A complete unfiltered URL check and reviewed SEO evidence are bound to the latest hosted deploy; the launch report fails closed when either is stale or incomplete. |
|
|
1370
1404
|
| **Forms** | `list_forms`, `read_form`, `create_form`, `update_form`, `delete_form`, `get_form_capabilities`, `list_form_submissions`, `read_form_submission`, `delete_form_submission` (removes one submission — e.g. cleaning up a test entry; `delete_form` with `delete_submissions` is the bulk path). **Steps (form/* block trees) are the ONLY stored model**: pass `steps` for funnels, or `fields` for simple forms — the server converts a flat field list to a single static step. Place with a `core/form` block on block-mode pages or `<x-form id="…" />` in HTML mode. Both expand server-side to the same complete signed shell and initial state. `read_form` shows the form's actions (email notifications, webhooks; secrets masked) and `create_form`/`update_form` set them with `actions`, with admin permission as in the portal; `get_form_capabilities` lists the action types (including app-provided ones) and their config fields. |
|
package/README.md
CHANGED
|
@@ -270,8 +270,15 @@ the full reference + concrete operation recipes.
|
|
|
270
270
|
by the Organization's selected build provider. Ordinary authored uploads may
|
|
271
271
|
use draft storage before connection; import tools must not bypass readiness
|
|
272
272
|
that way. Legacy maintenance includes `finalize_all_media` and
|
|
273
|
-
`generate_image_variants
|
|
274
|
-
|
|
273
|
+
`generate_image_variants`; neither transcodes images in the portal.
|
|
274
|
+
`readiness.selectable` distinguishes verified files from pending/failed import
|
|
275
|
+
records. Upload/finalize/preparation remain private; website publication makes
|
|
276
|
+
referenced media public, or `publish_media_file` publishes a PDF separately.
|
|
277
|
+
Core 0.3.49/MCP 0.45.150 default to readable root names without date folders,
|
|
278
|
+
preserve explicit and WordPress upload-relative folders, and number conflicts
|
|
279
|
+
permanently. A shared media host still uses a Site namespace. The matching
|
|
280
|
+
Core runtime is required; upgrading MCP alone changes no hosting behavior.
|
|
281
|
+
`suggest_alt_text_context` returns a prompt for the agent's vision model. See the [media API and tool guide](https://typeroll.com/docs/tools/media/).
|
|
275
282
|
- **Rendering controls** — semantic `core/navigation`, mapped
|
|
276
283
|
`core/post_card`, `core/table_of_contents`, per-site
|
|
277
284
|
`trailing_slash`, exact `iframe_allowed_hosts`, `icon_192`, and per-page
|