webcake-landing-mcp 1.0.83 → 1.0.84

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,11 @@
1
1
  [
2
+ {
3
+ "v": "1.0.84",
4
+ "d": "17/06/2026",
5
+ "type": "Added",
6
+ "en": "create_page now sends a by_ai field in the create request body (default value \"mcp\") so the backend can stamp each MCP-generated page in its by_ai…",
7
+ "vi": "create_page nay gửi thêm trường by_ai trong body của request tạo trang (giá trị mặc định \"mcp\") để backend có thể đánh dấu từng trang được tạo qua…"
8
+ },
2
9
  {
3
10
  "v": "1.0.83",
4
11
  "d": "16/06/2026",
@@ -33,12 +40,5 @@
33
40
  "type": "Changed",
34
41
  "en": "The Privacy Policy served at /privacy is updated with GDPR-style data-category headings, per-category purpose statements, documentation of…",
35
42
  "vi": "Trang Privacy Policy tại /privacy được cập nhật với các tiêu đề phân loại dữ liệu theo chuẩn GDPR, ghi rõ mục đích xử lý từng loại dữ liệu, bổ sung…"
36
- },
37
- {
38
- "v": "1.0.78",
39
- "d": "15/06/2026",
40
- "type": "Added",
41
- "en": "The OAuth token store (clients, authorization codes, access and refresh tokens) now uses Postgres when DATABASE_URL, WEBCAKE_POSTGRES_URL, or…",
42
- "vi": "Kho lưu trữ OAuth token (clients, authorization code, access và refresh token) nay sử dụng Postgres khi DATABASE_URL, WEBCAKE_POSTGRES_URL, hoặc…"
43
43
  }
44
44
  ]
@@ -23,6 +23,14 @@ function timeoutOrNetworkError(url, e) {
23
23
  const UPLOAD_FILE_ENDPOINT = "/external/upload_file";
24
24
  const BUILD_ENDPOINT = "/render/build";
25
25
  const CREATE_ENDPOINT = "/api/v1/ai/create_page_from_source";
26
+ /**
27
+ * Marker sent on every MCP-originated create so the backend can stamp the page's
28
+ * `by_ai` column — it records that the page was generated through this MCP server
29
+ * (the backend reads `by_ai` from the create body; the column lives in the
30
+ * separate landing_page_backend repo). Override via WEBCAKE_BY_AI env if a host
31
+ * wants a more specific tag.
32
+ */
33
+ const BY_AI = process.env.WEBCAKE_BY_AI || "mcp";
26
34
  const ORGS_ENDPOINT = "/api/v1/org/organizations";
27
35
  const PAGES_ENDPOINT = "/api/v1/ai/pages";
28
36
  const SEARCH_PAGES_ENDPOINT = "/api/v1/ai/search_pages";
@@ -141,7 +149,8 @@ export function buildRequest(config, name, source, orgId) {
141
149
  method: "POST",
142
150
  url: `${config.base}${CREATE_ENDPOINT}`,
143
151
  headers: authHeaders(config, orgId),
144
- body: JSON.stringify({ name, source }),
152
+ // by_ai marks the page as MCP-generated for the backend's `by_ai` column.
153
+ body: JSON.stringify({ name, source, by_ai: BY_AI }),
145
154
  };
146
155
  }
147
156
  /** Same as buildRequest but with the token masked, safe to show to the user. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webcake-landing-mcp",
3
- "version": "1.0.83",
3
+ "version": "1.0.84",
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",