Skip to content

Releases: vuluu2k/webcake-storefront-mcp

v1.31.9

Choose a tag to compare

@github-actions github-actions released this 07 Sep 02:20

[1.31.9] - 2026-09-07

Added

  • Pages created by create_page, build_page, and commit_page_draft are now stamped with by_ai: "mcp" (persisted to the backend pages.by_ai column) so the builder can flag AI-authored pages.

Changed

  • create_page, build_page, start_page_draft, and commit_page_draft now check for an existing page before creating one: a duplicate main (homepage), error, or maintain page, or a slug already used on the site, is refused with the conflicting existing_page id so you edit that page in place (replace_page_source / add_section / update_page) instead of creating a shadow duplicate; dry_run calls report blocked: true with the same conflict detail. Only custom pages remain unlimited.
  • get_build_guide documents the one-page-per-site rule for the main, error, and maintain page types, and clarifies that store, member, blog, and custom pages are instead kept unique by slug.

v1.31.8

Choose a tag to compare

@github-actions github-actions released this 29 Jun 02:41

[1.31.8] - 2026-06-29

Fixed

  • Elements placed by new_section, new_row, and build_page that fill their grid cell (text, image, container, columns, repeaters) now receive constraintX: ["left","right"] (stretch) instead of ["centerLeft"] (center), so sibling elements line up edge-to-edge rather than snapping to content width and floating (the "cắn left-top / không thẳng hàng" alignment bug).
  • buildElement now backfills opts.config and opts.style into runtime for factories that silently ignored them (e.g. createContainer, createMenu), fixing cases where config.isHidden was dropped and a mobile-only nav bar would remain visible on desktop.

Changed

  • The button factory now defaults to content-width (widthUnit: "auto") with 28 px horizontal padding and a centred label instead of a fixed 142 px wide bar, so standalone CTAs size to their text rather than stretching edge-to-edge.
  • The submit-button factory now defaults to 48 px height with 24 px horizontal padding and a centred label so form submit buttons no longer render as unstyled slivers.
  • build_page, new_section, and new_row now auto-scale large fonts (fontSize ≥ 22 px, approximately 0.86× on tablet and 0.72× on mobile) and tall images (height > 320 px) on smaller breakpoints by default; an explicit responsive diff on a node still wins.
  • new_element (and buildElement internally) now accepts opts.align ("left" | "center" | "right" | "fill") on any element type; "fill" sets constraintX: ["left","right"] plus widthUnit: "%" / relWidth: 100 so the element spans its column.
  • get_build_guide is updated with: the grid-cell alignment rule (stretch vs. center, when each applies), button sizing and opts.align usage, auto-responsive scaling defaults, and a verified two-nav isHidden-swap pattern for building a reliable mobile menubar.

v1.31.7

Choose a tag to compare

@github-actions github-actions released this 26 Jun 10:00

[1.31.7] - 2026-06-26

Fixed

  • build_page, create_page, update_page, and commit_page_draft now strip a leading / from slug before saving; a slug like /cart would previously 404 on the storefront because it matches the bare path segment only.
  • Sections built by new_section and build_page now apply vertical padding via top and bottom spacer grid rows in runtime.config instead of CSS paddingTop/paddingBottom, which the storefront renderer ignores on sections.
  • Child elements placed by new_section and new_row now default to widthUnit:"%" and relWidth:100 in their runtime.config, eliminating the invalid width: %; that caused elements to render with zero width.
  • create_product now expands attribute axes into a cartesian product of variations, each carrying the correct fields entries with unique ids, so the storefront variation selector has values to display; product_attributes now also includes an id and a keyword list (with keyValue and value per entry) as required by the selector.

v1.31.6

Choose a tag to compare

@github-actions github-actions released this 26 Jun 07:49

[1.31.6] - 2026-06-26

Removed

  • scaffold_store_pages, scaffold_global_sections, and scaffold_popup tools are removed; pages are now composed free-form from elements using new_section, new_element, new_row, and build_page.

Added

  • New get_page_schema tool returns the authoritative JSON Schema (Draft 2020-12) for the CSS-grid page source, documenting the structural contract for every page node.
  • Six new page-draft tools (start_page_draft, add_draft_section, get_page_draft, list_page_drafts, commit_page_draft, clear_page_draft) enable building large pages section-by-section into a local cache (Redis when REDIS_URL or WEBCAKE_REDIS_URL is set, otherwise in-memory) and committing them to the backend incrementally and resumably, avoiding 15-second request timeouts.

Changed

  • create_site now auto-clears seeded sample products, non-default categories, and articles on site creation so the new site starts empty and on-theme; opt out with keep_seed:true, and the result reports seed_cleared counts.
  • get_build_guide is rewritten with a "DESIGN SYSTEM" section covering palette, type-scale, 8px spacing grid, contrast rules (CTA buttons must use var(--color_24) with a white label; var(--color_20) is too pale for white text on any theme), hero image rules (build a real full-width image element, not a CSS background shorthand), and product-image requirements (product-level images, not variation-only).
  • new_element, new_section, new_row, and build_page now accept a responsive option with sparse per-breakpoint style/config overrides that cascade waterfall (bp1→bp4) so each smaller breakpoint inherits the resolved larger one and applies only its own diff.

Fixed

  • publish_site now sends all saved pages (with source, id, type, slug, is_homepage, and settings) and a changes map to the publish endpoint, so the storefront actually goes live instead of remaining on the "no interface" error page.
  • publish_site now includes the site's live domain in the publish request body, preventing published sites from expiring on the preview URL instead of resolving to the live domain.
  • The page schema used by validate_page and get_page_schema now accepts runtime.specials and relaxes heightUnit validation to match the actual factory node shape.

v1.31.5

Choose a tag to compare

@github-actions github-actions released this 26 Jun 04:05

[1.31.5] - 2026-06-26

Added

  • Column definitions accepted by create_collection and update_collection_columns now support five new optional fields: note (help text for the column), default (default value), reference (referenced table_name or system entity for reference-type columns), reference_type ("system" or "collection"), and date_default_type ("empty", "added", or "specific" for date/naive_datetime columns).

Fixed

  • The type field in column definitions for create_collection and update_collection_columns now enumerates all 20 editor-supported types (text, rich_text, url, integer, float, decimal, boolean, reference, color, image, media_gallery, video, audio, document, date, naive_datetime, time, address, object, array) instead of the outdated 9-type subset that included backend-internal aliases (string, binary_id, map).
  • The MCP server now reports its version from package.json at runtime instead of the stale hardcoded "1.0.0".

v1.31.4

Choose a tag to compare

@github-actions github-actions released this 26 Jun 03:34

[1.31.4] - 2026-06-26

Added

  • The guide returned by get_http_function and get_site_custom_code now includes a verified end-to-end "Custom data TABLES (collections)" section documenting the complete workflow: create a table and its columns with create_collection and update_collection_columns, read rows directly with query_collection_records, and write rows from an HTTP function via the webcake-data SDK (db.model(table).create, updateOne, deleteMany, find); the section notes that record writes have no direct dashboard API and must be deployed with update_http_function then invoked with run_function, and that debug_function requires the function to be deployed first.

v1.31.3

Choose a tag to compare

@github-actions github-actions released this 26 Jun 03:25

[1.31.3] - 2026-06-26

Added

  • New update_collection_columns tool reads the current collection schema and PATCHes it with the system columns plus the provided custom columns, enabling safe column management without accidentally dropping existing fields.
  • New delete_collection tool permanently removes a collection (table) and all its records by collection_id.

Changed

  • create_collection now accepts an optional table_name (snake_case, distinct from the display name) and a columns array of custom field definitions; it creates the bare table first, then applies columns in a second PATCH call, matching the verified backend flow.
  • create_collection description now explicitly documents that record writes must go through an HTTP function using the webcake-data SDK (db.model(table).create({...})), since no direct dashboard record-insert API exists; get_http_function is surfaced as the guide reference.

Fixed

  • create_collection previously sent the schema array in the create body, which caused a 500 error from the backend; custom columns are now added via a follow-up PATCH after the table is created.

Removed

  • insert_collection_record, update_collection_record, and delete_collection_record are removed because the dashboard record-write endpoint returns 422 unconditionally on every call regardless of payload; record writes must be performed via an HTTP function using the webcake-data SDK.

v1.31.2

Choose a tag to compare

@github-actions github-actions released this 26 Jun 03:10

[1.31.2] - 2026-06-26

Changed

  • The HTTP_FUNCTION_GUIDE embedded in get_http_function and get_site_custom_code now includes a "Common patterns" section with battle-tested production recipes: find-or-create, upsert with { new: true } read-back, count-then-denormalize, multi-table ordered writes with an audit/history row, soft delete via status field, reference-id helpers (toId/toNumber), numeric status enums, and the auth-guard + try/catch { mess } return convention.
  • The @webcake/* module section in the same guide now explicitly notes that these modules run inside the function sandbox (authenticated via global.token) and can therefore reach /cms_function endpoints that the dashboard JWT cannot; @webcake/customer documentation now lists the returned object's fields (id, name, avatar, email, phone_number), the always-check-customer?.id rule, and a typical lookup-by-anything helper (code → phone → email → id); the @webcake/promotion addBonus entry now includes a concrete example call.

v1.31.1

Choose a tag to compare

@github-actions github-actions released this 26 Jun 02:54

[1.31.1] - 2026-06-26

Fixed

  • The webcake-data SDK reference embedded in get_http_function and get_site_custom_code now documents the correct Mongoose-document API: filters are plain MongoDB-style objects (e.g. { status: { $in: [0, 1, 2] } }) instead of the .where().gte() QueryBuilder pattern; chains are directly awaitable with no .exec(); .select() takes an array of field names; .populate({ field, select:[...] }) resolves a reference field to its related object; the write API documents findOneAndUpdate(filter, update, { new: true }), updateOne, updateMany, and deleteMany; and the example is rewritten to a real production pattern with db and models declared at module top, request.customer?.id for auth, request.params for inputs, and { mess: "OK", ...data } as the return convention.

v1.31.0

Choose a tag to compare

@github-actions github-actions released this 26 Jun 02:51

[1.31.0] - 2026-06-26

Added

  • New create_collection tool creates a custom data table by accepting a name and a schema array of field definitions (with types such as string, integer, naive_datetime, map, etc.); the backend automatically adds id, inserted_at, and updated_at.
  • New insert_collection_record tool inserts a record into a collection by accepting a table_name and a record field-value object matching the table schema.
  • New update_collection_record tool updates a collection record by record_id, accepting only the changed fields in record.
  • New delete_collection_record tool deletes a collection record by record_id.

Changed

  • query_collection_records now accepts an optional where filter object (e.g. { status: "active" }) and an order_by field name, enabling server-side filtering and sorting of collection data.

Fixed

  • query_collection_records previously returned 401 on every call because the collection records endpoint requires an x-cms-api-key header in addition to the standard dashboard JWT; the API client now fetches and caches that key automatically and sends it with all collection-data requests.