@typeroll/mcp-server 0.25.0 → 0.25.2

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 CHANGED
@@ -212,7 +212,11 @@ maps to one HTTP endpoint; the actual logic runs in the customer's portal
212
212
  everything you write through `?version=<branch-id>` lives on the
213
213
  branch until you `merge_branch` it back to main. Branches default
214
214
  `robots_blocked: true` so a half-finished redesign can't be indexed,
215
- and deploys land at a stable `{branch}.{project}.pages.dev` URL.
215
+ and deploys land at a stable `{branch}.{project}.pages.dev` URL. That
216
+ branch deploy renders the site's full inherited brand (settings, fonts,
217
+ favicon, header/footer — everything not overridden on the branch), so
218
+ it's a faithful preview of what merging to main will look like, not just
219
+ a content diff — trust it for stakeholder review.
216
220
 
217
221
  - **Deploys.** Customers see live changes only after a deploy. Preview
218
222
  always sees drafts. `trigger_deploy` enqueues; `get_deploy_status`
@@ -224,6 +228,23 @@ maps to one HTTP endpoint; the actual logic runs in the customer's portal
224
228
  - `preview_base` — the portal preview origin (for token URLs)
225
229
  Use these in answers to "what's the URL?" — never invent.
226
230
 
231
+ - **For design/content iteration, share the DB-LIVE preview — don't deploy.**
232
+ `get_preview_link` renders straight from the database with NO build, so a
233
+ reload shows every edit immediately. Mint it ONCE with the long TTL
234
+ (`ttl_seconds: 86400`, the 24h max) and REUSE that single URL: it's stable
235
+ across edits (internal links keep the token, so one link navigates the whole
236
+ branch), and you only re-mint when the 24h lapses — never per edit. This is
237
+ both the link you hand the user while iterating AND what you open to verify
238
+ your own changes. Do NOT `trigger_deploy` merely to preview a content/design
239
+ change — a deploy builds static pages (slow) and only reflects state as of
240
+ that build.
241
+ - **Deploys / `{branch}.{project}.pages.dev` are the STATIC BUILD**, refreshed
242
+ only by `trigger_deploy`. Reach for them when you want the real compiled
243
+ output: publishing, a stakeholder link to the built site, or a faithful
244
+ pre-merge check. The branch alias is permanent across re-deploys; the
245
+ per-deploy `{hash}.pages.dev` is immutable per build. Reserve deploys for
246
+ these — not for previewing edits.
247
+
227
248
  ## Discovering this site
228
249
 
229
250
  Don't hardcode assumptions about what's here. Every fact about the site
@@ -305,8 +326,8 @@ list_pages → batch_read_pages a few existing pages # learn conventions
305
326
  # Propose redesign locally; ask user to confirm.
306
327
  create_branch name="Home redesign" # ID is, say, "home-redesign"
307
328
  update_page page_id=home patch={ html_content: "…" } version=home-redesign
308
- get_preview_link page_id=home version=home-redesign # signed clickable URL
309
- # Iterate. When approved:
329
+ get_preview_link page_id=home version=home-redesign ttl_seconds=86400 # DB-live URL — mint once, reuse while iterating (no deploy)
330
+ # Iterate (reload the same link after each edit). When approved:
310
331
  merge_branch version_id=home-redesign
311
332
  trigger_deploy
312
333
  ```
@@ -583,9 +604,11 @@ can manually deprovision the old one via the portal.
583
604
 
584
605
  ## Preview-driven workflow
585
606
 
586
- After any non-trivial change, call `get_preview_link` and ask the user
587
- (or your own browser tool) to confirm the result before moving on. One
588
- HTTP call vs. shipping a broken redesignalways worth it.
607
+ After any non-trivial change, verify against the DB-live `get_preview_link`
608
+ (reused — mint once at the 24h TTL) and/or your own browser tool before moving
609
+ on. It reflects the DB instantly with no build, so it not a deploy — is the
610
+ loop for design/content iteration. One reload vs. shipping a broken redesign —
611
+ always worth it.
589
612
 
590
613
  **To UNDERSTAND a page, render it to one HTML file — don't reconstruct it
591
614
  from the block tree in your head.** A page is assembled at render time from the
@@ -601,18 +624,29 @@ so you can map a spot in the rendered HTML straight back to the block to edit:
601
624
  read preview to understand → find the element → its `data-block-id` is the block
602
625
  to mutate → edit → re-render to verify.
603
626
 
604
- **A design review covers appearance AND readability — not just structure.**
605
- If you have a browser tool, screenshot at desktop (~1440px) and mobile (~390px)
606
- and actually judge the visuals before telling the user it's done: logo fully
607
- visible (not cut off by a header's overflow:hidden + overlap margin) + legible +
608
- brand-compliant against its real background screenshot the header in page
609
- context, NOT the logo element in isolation (an element shot renders the full SVG
610
- and hides layout clipping); a light/yellow wordmark must not sit bare on a light
611
- surface without its plate. Text contrast on every
612
- band, no horizontal scroll (`scrollWidth === clientWidth` at 360–390px), no
613
- mid-word breaks, all images rendered, mobile layout actually collapsed. "Copy
614
- present + no overflow + images 200" is a structural check, NOT a design review —
615
- never report a design as perfect/approved off structural metrics alone.
627
+ **A design review is a multi-DIMENSION, MEASURED pass — not "copy present + no
628
+ overflow + images 200".** If you have a browser tool, walk every dimension (the
629
+ `tr-redesign-branch` skill has the full checklist with how-to):
630
+ - **Responsive** width ladder (≈390/768/1024/1440/1920px) + a sweep just below/
631
+ above the page's own @media breakpoints; `scrollWidth <= clientWidth` at every
632
+ width (bugs hide between the two extremes); + 200% zoom.
633
+ - **Visual & brand** logo FULLY visible (screenshot the header IN CONTEXT, never
634
+ the logo element in isolation that hides clipping) + brand-compliant; no
635
+ divider seams / clipped glows / cropped faces / fade-cutoffs; typography +
636
+ palette + spacing consistent.
637
+ - **Accessibility (measure)** actual contrast ratios (AA 4.5:1 / 3:1), alt on
638
+ every image, one `<h1>` + no skipped levels, visible focus, labels on inputs,
639
+ ≥44px touch targets, landmarks, reduced-motion.
640
+ - **Functional** — form actually works (action + token + honeypot, long values
641
+ don't break), every link/`#anchor` resolves, ZERO console errors.
642
+ - **Content** — no unrendered `{{…}}`, no placeholder, copy matches the live page.
643
+ - **Findable** — title + meta description + og:* + canonical + favicon + lang +
644
+ noindex-on-branch.
645
+ - **Fast** — images sized right + modern format + width/height set + lazy/eager.
646
+ - **Cross-browser** — re-check another engine if possible, or flag risky props
647
+ (backdrop-filter, -webkit- masks, 100vh→100svh, sticky-in-overflow).
648
+ "Looks good in Chrome at 1440" ≠ "works for everyone, everywhere" — never report a
649
+ design as perfect/approved off a glance or a partial pass.
616
650
 
617
651
  Preview shows DB state (drafts included). Live (`get_site → urls.production`)
618
652
  shows the most recent deploy. Branch deploys live at
@@ -630,9 +664,11 @@ The response includes `id` — pass that as `version=<id>` on every
630
664
  subsequent call. The branch is independent of main; writes don't affect
631
665
  the live site until you `merge_branch`.
632
666
 
633
- Branches default `robots_blocked: true`. Deploys to a branch land at a
634
- stable, share-able URL (`{branch}.{project}.pages.dev`); use that for
635
- stakeholder review.
667
+ Branches default `robots_blocked: true`. While iterating, preview the branch
668
+ with a reused `get_preview_link` (DB-live, no build). Deploys to a branch land
669
+ at a stable URL (`{branch}.{project}.pages.dev`) — that's the compiled static
670
+ build, for sharing the finished result / stakeholder review, not per-edit
671
+ preview.
636
672
 
637
673
  ## When in doubt
638
674