webcake-landing-mcp 1.5.5 → 1.5.7

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.
@@ -1,4 +1,18 @@
1
1
  [
2
+ {
3
+ "v": "1.5.7",
4
+ "d": "13/10/2026",
5
+ "type": "Changed",
6
+ "en": "The ingest_url and render_preview tool descriptions now link to the API docs (docs/tools.md for both, plus the Microlink API reference for…",
7
+ "vi": "Mô tả của tool ingest_url và render_preview nay có thêm link tới tài liệu API (docs/tools.md cho cả hai, cùng với link tham chiếu API của Microlink…"
8
+ },
9
+ {
10
+ "v": "1.5.6",
11
+ "d": "13/10/2026",
12
+ "type": "Fixed",
13
+ "en": "The HTTP server now serves a 192px PNG at /favicon.ico, /favicon.png, and /apple-touch-icon.png (with matching <link rel=\"icon\">/<link…",
14
+ "vi": "HTTP server nay phục vụ PNG 192px tại /favicon.ico, /favicon.png, và /apple-touch-icon.png (kèm thẻ <link rel=\"icon\">/<link rel=\"apple-touch-icon\">…"
15
+ },
2
16
  {
3
17
  "v": "1.5.5",
4
18
  "d": "13/10/2026",
@@ -26,19 +40,5 @@
26
40
  "type": "Fixed",
27
41
  "en": "Colors written in any CSS notation other than the legacy rgba(r,g,b,a) form (hex, rgb(), hsl(), CSS named colors, and the modern space/slash rgba()…",
28
42
  "vi": "Các giá trị màu được viết ở bất kỳ dạng CSS nào khác ngoài dạng rgba(r,g,b,a) kiểu cũ (hex, rgb(), hsl(), tên màu CSS, và cú pháp rgba() mới dùng…"
29
- },
30
- {
31
- "v": "1.5.1",
32
- "d": "24/08/2026",
33
- "type": "Added",
34
- "en": "update_page now detects when the live page was edited outside this session (e.g. in the Webcake editor) since it was last read, and rejects the…",
35
- "vi": "update_page nay phát hiện khi trang đang sống đã bị chỉnh sửa bên ngoài phiên làm việc này (ví dụ trong editor Webcake) kể từ lần đọc gần nhất, và…"
36
- },
37
- {
38
- "v": "1.5.0",
39
- "d": "23/07/2026",
40
- "type": "Added",
41
- "en": "search_images now returns a sizes map on every photo (the delivered width/height in px for each src variant, accounting for retina dpr) plus a…",
42
- "vi": "search_images nay trả về một sizes map trên mỗi ảnh (kích thước width/height thực tế theo px của từng biến thể src, có tính đến dpr cho màn hình…"
43
43
  }
44
44
  ]
package/dist/http.js CHANGED
@@ -66,6 +66,21 @@ function ogImagePng() {
66
66
  return null;
67
67
  }
68
68
  }
69
+ // Raster brand icon (192px, from assets/icon-512.png) at src/icon.png → dist/icon.png.
70
+ // Favicon fetchers (Google s2, which the claude.ai connector list uses) skip
71
+ // SVG-only favicons and fall back to a globe, so /favicon.ico serves this PNG.
72
+ let ICON_PNG = null;
73
+ function iconPng() {
74
+ if (ICON_PNG)
75
+ return ICON_PNG;
76
+ try {
77
+ ICON_PNG = readFileSync(new URL("./icon.png", import.meta.url));
78
+ return ICON_PNG;
79
+ }
80
+ catch {
81
+ return null;
82
+ }
83
+ }
69
84
  function sendJson(res, status, body) {
70
85
  res.writeHead(status, { "content-type": "application/json" });
71
86
  res.end(JSON.stringify(body));
@@ -382,6 +397,13 @@ export async function startHttpServer(port) {
382
397
  const path = (req.url ?? "").split("?")[0];
383
398
  // Brand icon — clients (e.g. the claude.ai connector) fetch a favicon from the
384
399
  // server origin; without one they show a generic globe. Served raw as SVG.
400
+ if (req.method === "GET" && (path === "/favicon.ico" || path === "/favicon.png" || path === "/icon.png" || path === "/apple-touch-icon.png")) {
401
+ const png = iconPng();
402
+ if (png) {
403
+ res.writeHead(200, { "content-type": "image/png", "cache-control": "public, max-age=86400" });
404
+ return res.end(png);
405
+ }
406
+ }
385
407
  if (req.method === "GET" && (path === "/favicon.ico" || path === "/favicon.svg" || path === "/icon.svg")) {
386
408
  res.writeHead(200, { "content-type": ICON_MIME, "cache-control": "public, max-age=86400" });
387
409
  return res.end(ICON_SVG);
package/dist/icon.png ADDED
Binary file
@@ -89,7 +89,7 @@ export function registerIngestTools(server, domain) {
89
89
  const extraCss = baseUrl ? await fetchStylesheets(html, baseUrl) : undefined;
90
90
  return text({ intent: intent ?? "adapt", ...withCloneSource(domain, parseHtml(html, detail ?? "compact", { sections, baseUrl, extraCss })) });
91
91
  });
92
- server.tool("ingest_url", "Fetches a public webpage (GET, 10s timeout, 2MB cap) and parses it into the same reference AST as ingest_html (including per-section size_hint desktop heights). Returns a warning when the page appears client-rendered (empty <body>) so the caller can fall back to a screenshot — Claude can analyze a screenshot natively without this tool. Does not execute JavaScript; sites built with React/Vue/Next.js may return little content. Use detail:'full' for clone-faithful rebuilds — adds CSS palette, background_images, per-section blocks, lists, images as { src, alt } objects, and widgets (source HTML + CSS of composite mockups for html-box rebuilds). ABSOLUTE-CANVAS builder exports (LadiPage-family / Webcake-published pages) are auto-detected the same way as ingest_html and converted DETERMINISTICALLY into a ready-to-save `source` (+ `clone_notes` + `clone_notice`, with the per-element geometry summarized to `canvas_summary`) — save it straight to create_page; external images auto-host on save. Image URLs in the result are the user's assets — re-host them via upload_images and reuse them for BOTH intents; use search_images only for slots with no source image. Also fetches the page's external stylesheets (+ @imports) so `font_groups` (self-hosted fonts → settings.fontGroups, uploaded on save) and the computed `typography`/`text_styles` (font_size/mobile_font_size/font_weight — copy exactly) see rules outside the HTML.", {
92
+ server.tool("ingest_url", "Fetches a public webpage (GET, 10s timeout, 2MB cap) and parses it into the same reference AST as ingest_html (including per-section size_hint desktop heights). Returns a warning when the page appears client-rendered (empty <body>) so the caller can fall back to a screenshot — Claude can analyze a screenshot natively without this tool. Does not execute JavaScript; sites built with React/Vue/Next.js may return little content. Use detail:'full' for clone-faithful rebuilds — adds CSS palette, background_images, per-section blocks, lists, images as { src, alt } objects, and widgets (source HTML + CSS of composite mockups for html-box rebuilds). ABSOLUTE-CANVAS builder exports (LadiPage-family / Webcake-published pages) are auto-detected the same way as ingest_html and converted DETERMINISTICALLY into a ready-to-save `source` (+ `clone_notes` + `clone_notice`, with the per-element geometry summarized to `canvas_summary`) — save it straight to create_page; external images auto-host on save. Image URLs in the result are the user's assets — re-host them via upload_images and reuse them for BOTH intents; use search_images only for slots with no source image. Also fetches the page's external stylesheets (+ @imports) so `font_groups` (self-hosted fonts → settings.fontGroups, uploaded on save) and the computed `typography`/`text_styles` (font_size/mobile_font_size/font_weight — copy exactly) see rules outside the HTML. Docs: https://github.com/vuluu2k/webcake-landing-mcp/blob/main/docs/tools.md (ingest_url).", {
93
93
  url: z.string().describe("Public HTTP(S) URL of the page to fetch."),
94
94
  intent: z
95
95
  .enum(["adapt", "clone"])
@@ -291,7 +291,7 @@ export function registerMediaTools(server, allowLocalFiles = true) {
291
291
  });
292
292
  });
293
293
  // 13c) Render a page/URL to a screenshot the model can SEE --------------------
294
- server.tool("render_preview", "Renders a PUBLIC URL to a PNG and returns it as an image so the model can SEE the result and compare it visually to the reference — the fidelity-check step of the clone loop (build → see → patch_page → re-check). Pass `page_id` to shoot a created page's preview (/preview/<id>) or `url` for any public page (e.g. the reference you're cloning). full_page defaults to true (whole scrollable page). AGENT-FIRST: if YOU already have a screenshot/browser capability (a shell + headless browser, or a screenshot tool), screenshot the preview URL YOURSELF instead — it's fresh and unlimited; use this tool only when you cannot. ENGINE: zero-config via Microlink's free tier (rate-limited ~50/day PER IP, so heavy looping can hit HTTP 429 — then this returns ok:false and you should SKIP the visual check that round, not fail); a host can set RENDER_SCREENSHOT_BASE (or the x-render-screenshot-base header) to a keyed proxy, or MICROLINK_API_KEY / x-microlink-key for a higher quota. NOTE: a no-domain preview only renders for ~10 minutes after the last publish — call this promptly after create_page/publish_page, and re-publish before re-checking a stale page. TALL PAGES: pass tiles:true to get the page as a STACK of top→bottom band images (each readable at full detail) instead of one full-page image squished small — needs a self-hosted Playwright host (RENDER_SCREENSHOT_BASE); falls back to a single image otherwise.", {
294
+ server.tool("render_preview", "Renders a PUBLIC URL to a PNG and returns it as an image so the model can SEE the result and compare it visually to the reference — the fidelity-check step of the clone loop (build → see → patch_page → re-check). Pass `page_id` to shoot a created page's preview (/preview/<id>) or `url` for any public page (e.g. the reference you're cloning). full_page defaults to true (whole scrollable page). AGENT-FIRST: if YOU already have a screenshot/browser capability (a shell + headless browser, or a screenshot tool), screenshot the preview URL YOURSELF instead — it's fresh and unlimited; use this tool only when you cannot. ENGINE: zero-config via Microlink's free tier (rate-limited ~50/day PER IP, so heavy looping can hit HTTP 429 — then this returns ok:false and you should SKIP the visual check that round, not fail); a host can set RENDER_SCREENSHOT_BASE (or the x-render-screenshot-base header) to a keyed proxy, or MICROLINK_API_KEY / x-microlink-key for a higher quota. NOTE: a no-domain preview only renders for ~10 minutes after the last publish — call this promptly after create_page/publish_page, and re-publish before re-checking a stale page. TALL PAGES: pass tiles:true to get the page as a STACK of top→bottom band images (each readable at full detail) instead of one full-page image squished small — needs a self-hosted Playwright host (RENDER_SCREENSHOT_BASE); falls back to a single image otherwise. Docs: https://github.com/vuluu2k/webcake-landing-mcp/blob/main/docs/tools.md (render_preview); engine API: https://microlink.io/docs/api/getting-started/overview.", {
295
295
  page_id: z.string().optional().describe("A created page's id — screenshots its /preview/<id> URL (built from the preview base). Provide page_id OR url."),
296
296
  url: z.string().optional().describe("Any public http(s) URL to screenshot (e.g. the reference page being cloned). Wins over page_id."),
297
297
  full_page: z.boolean().optional().describe("Capture the whole scrollable page (default true) vs just the viewport."),
package/dist/web-guide.js CHANGED
@@ -544,7 +544,9 @@ export function guideHtml(origin, lang = "vi") {
544
544
  <link rel="alternate" hreflang="vi" href="${origin}/">
545
545
  <link rel="alternate" hreflang="en" href="${origin}/?lang=en">
546
546
  <link rel="alternate" hreflang="x-default" href="${origin}/">
547
+ <link rel="icon" type="image/png" sizes="192x192" href="/favicon.png">
547
548
  <link rel="icon" type="image/svg+xml" href="/favicon.svg">
549
+ <link rel="apple-touch-icon" href="/apple-touch-icon.png">
548
550
  <meta property="og:type" content="website">
549
551
  <meta property="og:site_name" content="Webcake Landing MCP">
550
552
  <meta property="og:title" content="${m.title}">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webcake-landing-mcp",
3
- "version": "1.5.5",
3
+ "version": "1.5.7",
4
4
  "description": "MCP server exposing Webcake landing-page element schemas + AI usage hints, and persisting LLM-generated page sources to a Webcake backend.",
5
5
  "mcpName": "io.github.vuluu2k/webcake-landing-mcp",
6
6
  "type": "module",