webcake-landing-mcp 1.0.28 → 1.0.30
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/LICENSE +21 -0
- package/dist/changelog.json +14 -14
- package/dist/domains/landing/instructions.js +2 -1
- package/dist/og.png +0 -0
- package/dist/web-guide.js +14 -3
- package/package.json +3 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 vuluu2k
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/changelog.json
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "1.0.30",
|
|
4
|
+
"d": "08/06/2026",
|
|
5
|
+
"type": "Changed",
|
|
6
|
+
"en": "The server instructions now direct the agent to gather all get_element and get_generation_guide results before assembling the page source, build the…",
|
|
7
|
+
"vi": "Hướng dẫn cho agent nay yêu cầu thu thập toàn bộ kết quả get_element và get_generation_guide trước khi lắp ráp nguồn trang, xây dựng cây phần tử đầy…"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"v": "1.0.29",
|
|
11
|
+
"d": "08/06/2026",
|
|
12
|
+
"type": "Fixed",
|
|
13
|
+
"en": "The GET / guide page now takes full control of scroll restoration across reloads: native browser scroll restoration is disabled in the <head> script…",
|
|
14
|
+
"vi": "Trang hướng dẫn GET / nay kiểm soát hoàn toàn việc khôi phục vị trí cuộn sau reload: tính năng scroll restoration tự nhiên của trình duyệt bị tắt…"
|
|
15
|
+
},
|
|
2
16
|
{
|
|
3
17
|
"v": "1.0.28",
|
|
4
18
|
"d": "08/06/2026",
|
|
@@ -26,19 +40,5 @@
|
|
|
26
40
|
"type": "Changed",
|
|
27
41
|
"en": "currency has moved from options.currency to settings.currency in the page source model; new_page_skeleton now emits it in the correct location,…",
|
|
28
42
|
"vi": "currency đã được chuyển từ options.currency sang settings.currency trong mô hình nguồn trang; new_page_skeleton giờ xuất đúng vị trí,…"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"v": "1.0.24",
|
|
32
|
-
"d": "07/06/2026",
|
|
33
|
-
"type": "Changed",
|
|
34
|
-
"en": "The numbered installation steps on the GET / guide page now display a faint vertical connector line between step numbers, giving the list a clear…",
|
|
35
|
-
"vi": "Các bước cài đặt được đánh số trên trang hướng dẫn GET / nay hiển thị đường kết nối dọc mờ giữa các số thứ tự, tạo giao diện stepper rõ ràng."
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"v": "1.0.23",
|
|
39
|
-
"d": "07/06/2026",
|
|
40
|
-
"type": "Added",
|
|
41
|
-
"en": "The GET / guide page now includes a dark/light theme toggle button in the header; the preference is saved in localStorage and applied before the…",
|
|
42
|
-
"vi": "Trang hướng dẫn GET / nay có nút chuyển chế độ sáng/tối trong header; lựa chọn được lưu vào localStorage và áp dụng trước khi trang hiển thị để…"
|
|
43
43
|
}
|
|
44
44
|
]
|
|
@@ -9,7 +9,8 @@ RULES (follow for every request):
|
|
|
9
9
|
- INTAKE FIRST — do this EVERY time, even for a "quick"/"test" page. Do NOT jump straight to new_page_skeleton/create_page on the same turn as the request: ask the essentials, restate an outline, get a "yes", THEN build. Ask ONE short batch (3–6, with sensible defaults so the user answers fast) enough to understand the page's PURPOSE, name, look and layout: page purpose/goal, brand/page name, what they sell + price (sales/ads pages), primary color + logo/branding, sections & layout in order, primary CTA + destination, desktop+mobile or mobile-only, which organization. CONSULT, don't interrogate: SUGGEST so the user reacts to something concrete — propose a section flow (pick the archetype matching the page type) + a look (hero treatment + color/tone), and when the user is vague offer 2–3 directions to choose from; proactively suggest sections that fit their goal (social-proof, FAQ, countdown), but ask, don't silently add. Then restate the proposed design (section flow + CTA + color/tone) and WAIT for the user's confirmation, iterating until it matches their intent, before generating. Never assume or silently placeholder the page name, product, price, or colors — ask; only placeholder a core fact when the user explicitly declines to give it.
|
|
10
10
|
- ASK for any real data the page will display — never invent it, and don't silently placeholder it. This includes: phone/hotline/Zalo, price (+ original price), address, shop/brand name, links/URLs, email, opening hours, and exact stats/social-proof numbers. If a value the page needs is missing, ASK the user for it (in intake, or pause and ask before generating). Use a clearly-labelled placeholder ONLY when the user explicitly says to skip it — then tell them exactly what to fill in.
|
|
11
11
|
- ALWAYS call validate_page and fix every error before create_page / update_page.
|
|
12
|
-
-
|
|
12
|
+
- BUILD THE SOURCE IN ONE PASS — gather everything you need (call get_element / get_generation_guide for every section, popup, and element type) BEFORE assembling the source, then build the FULL tree once. Do NOT interleave get_element calls between create_page previews and rebuild. create_page/update_page take the entire source as input, so each call re-ships the whole page — re-previewing repeatedly wastes the request.
|
|
13
|
+
- create_page and update_page DEFAULT to dry_run=true. Dry-run EXACTLY ONCE: show it, then only send dry_run=false after the user confirms. If the dry-run reports validation problems, fix them via validate_page and re-run once — do not loop dry-runs to "check" the source.
|
|
13
14
|
- EDIT existing pages surgically: get_page → change ONLY what was asked → keep every other element, its id, and coordinates → validate_page → update_page. Never regenerate the whole tree for a small change.
|
|
14
15
|
- Organizations: call list_organizations and ask which to use; default to the is_default org. Endpoints are owner-scoped (only the account's own pages).
|
|
15
16
|
|
package/dist/og.png
CHANGED
|
Binary file
|
package/dist/web-guide.js
CHANGED
|
@@ -381,7 +381,7 @@ export function guideHtml(origin, lang = "vi") {
|
|
|
381
381
|
<html lang="${L}"><head>
|
|
382
382
|
<meta charset="utf-8">
|
|
383
383
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
384
|
-
<script>(function(){try{var t=localStorage.getItem('wc-theme');if(t==='dark'||t==='light')document.documentElement.setAttribute('data-theme',t);}catch(e){}})();</script>
|
|
384
|
+
<script>(function(){try{var t=localStorage.getItem('wc-theme');if(t==='dark'||t==='light')document.documentElement.setAttribute('data-theme',t);}catch(e){}try{if('scrollRestoration' in history)history.scrollRestoration='manual';}catch(e){}})();</script>
|
|
385
385
|
<title>${m.title}</title>
|
|
386
386
|
<meta name="description" content="${m.desc}">
|
|
387
387
|
<meta name="keywords" content="${m.keywords}">
|
|
@@ -757,6 +757,17 @@ export function guideHtml(origin, lang = "vi") {
|
|
|
757
757
|
paint();
|
|
758
758
|
if(tBtn)tBtn.addEventListener('click',function(){var next=effective()==='dark'?'light':'dark';html.setAttribute('data-theme',next);try{localStorage.setItem('wc-theme',next);}catch(e){}paint();});
|
|
759
759
|
|
|
760
|
+
// Restore scroll position exactly across reloads. Native scroll restoration is
|
|
761
|
+
// disabled (see head script); the browser's own restore drifts a little each
|
|
762
|
+
// reload as the reveal/hero animations settle. We persist the exact offset per
|
|
763
|
+
// URL and re-apply it now (DOM is fully parsed — this script is at body end, the
|
|
764
|
+
// page has no async images, so layout height is already final → no drift).
|
|
765
|
+
var SKEY='wc-scroll:'+location.pathname+location.search;
|
|
766
|
+
try{var y=sessionStorage.getItem(SKEY);if(y!==null)window.scrollTo(0,parseFloat(y)||0);}catch(e){}
|
|
767
|
+
function saveScroll(){try{sessionStorage.setItem(SKEY,String(window.scrollY));}catch(e){}}
|
|
768
|
+
window.addEventListener('beforeunload',saveScroll);
|
|
769
|
+
window.addEventListener('pagehide',saveScroll);
|
|
770
|
+
|
|
760
771
|
// Enable smooth scrolling only after the browser has restored scroll position
|
|
761
772
|
// on (re)load — applying it globally animates that restore into a jerky scroll.
|
|
762
773
|
window.addEventListener('load',function(){requestAnimationFrame(function(){html.classList.add('smooth');});});
|
|
@@ -794,8 +805,8 @@ export function ogImageSvg() {
|
|
|
794
805
|
<text x="90" y="400" fill="#ffffff" font-size="64" font-weight="800" letter-spacing="-2">pages from <tspan fill="#1DB954">one sentence</tspan>.</text>
|
|
795
806
|
<text x="90" y="478" fill="#9fb1a8" font-size="30" font-weight="500">No drag-and-drop · No JSON · Saves straight to your Webcake account</text>
|
|
796
807
|
<g transform="translate(90 520)">
|
|
797
|
-
<rect width="
|
|
798
|
-
<text x="
|
|
808
|
+
<rect width="470" height="56" rx="12" fill="#1DB954"/>
|
|
809
|
+
<text x="235" y="36" fill="#ffffff" font-size="24" font-weight="700" text-anchor="middle">npx -y webcake-landing-mcp install</text>
|
|
799
810
|
</g>
|
|
800
811
|
<text x="1110" y="560" fill="#5b6b63" font-size="24" font-weight="600" text-anchor="end">github.com/vuluu2k/webcake-landing-mcp</text>
|
|
801
812
|
</svg>`;
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webcake-landing-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30",
|
|
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
|
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
6
7
|
"bin": {
|
|
7
8
|
"webcake-landing-mcp": "dist/index.js"
|
|
8
9
|
},
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
"build": "node scripts/gen-changelog.mjs && tsc && node scripts/copy-assets.mjs",
|
|
21
22
|
"start": "node dist/index.js",
|
|
22
23
|
"dev": "tsc --watch",
|
|
24
|
+
"dev:guide": "node scripts/preview-guide.mjs",
|
|
23
25
|
"smoke": "node dist/smoke.js",
|
|
24
26
|
"prepare": "npm run build",
|
|
25
27
|
"prepublishOnly": "npm run build && npm run smoke",
|