sbuilder-mcp 0.55.0 → 0.57.0

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/CHANGELOG.md CHANGED
@@ -6,6 +6,17 @@ All notable changes to this project are documented in this file.
6
6
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
7
7
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
8
 
9
+ ## [0.57.0] - 2026-09-15
10
+
11
+ ### Added
12
+ - `sb_review` now reports a `categoryPage` readiness gap when a store has product categories but no published page of the `category` type, since `/collections/{slug}` falls back to that template and every collection link, including the ones in the site's own menu, 404s without it.
13
+ - `sb_review` now reports an `articleTemplate` readiness gap when a site has written blog articles but no published page of the `post` type, since `/blog/{slug}` falls back to that template and every article link, including the ones a listing page carries, 404s without it.
14
+
15
+ ## [0.56.0] - 2026-09-15
16
+
17
+ ### Added
18
+ - `sb_page_create` now opens an articles-listing page (matched by name, the same as the other usual-page layouts) with a heading over a repeater already bound to `article.url`, `article.title`, `article.summary`, and `article.date`, plus an empty state, instead of a blank canvas; the `usually_also` advisory for a missing blog listing now names this as its fix.
19
+
9
20
  ## [0.55.0] - 2026-09-15
10
21
 
11
22
  ### Added
package/CHANGELOG.vi.md CHANGED
@@ -6,6 +6,17 @@ Mọi thay đổi đáng chú ý của dự án được ghi lại trong file n
6
6
  Định dạng dựa trên [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
7
7
  và dự án tuân theo [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
8
 
9
+ ## [0.57.0] - 2026-09-15
10
+
11
+ ### Added
12
+ - `sb_review` giờ báo lỗi sẵn sàng `categoryPage` khi store có danh mục sản phẩm nhưng chưa có trang loại `category` nào được publish, vì `/collections/{slug}` sẽ dùng template đó, và mọi liên kết danh mục — kể cả những liên kết trong menu của chính site — sẽ trả về 404 nếu thiếu.
13
+ - `sb_review` giờ báo lỗi sẵn sàng `articleTemplate` khi site đã viết bài blog nhưng chưa có trang loại `post` nào được publish, vì `/blog/{slug}` sẽ dùng template đó, và mọi liên kết bài viết — kể cả những liên kết trong trang danh sách bài viết — sẽ trả về 404 nếu thiếu.
14
+
15
+ ## [0.56.0] - 2026-09-15
16
+
17
+ ### Added
18
+ - `sb_page_create` giờ mở trang danh sách bài viết (khớp theo tên, giống các layout trang thường dùng khác) với một tiêu đề trên một repeater đã gắn sẵn với `article.url`, `article.title`, `article.summary` và `article.date`, kèm trạng thái rỗng, thay vì một canvas trống; gợi ý `usually_also` khi thiếu trang danh sách blog giờ nêu đích danh đây là cách khắc phục.
19
+
9
20
  ## [0.55.0] - 2026-09-15
10
21
 
11
22
  ### Added
@@ -1,6 +1,6 @@
1
1
  export const DEAD_KEY_SOURCE = {
2
2
  "files": 4247,
3
- "identifiers": 77158,
3
+ "identifiers": 77159,
4
4
  "seededKeys": 384,
5
5
  "dead": 0
6
6
  };
@@ -599,6 +599,538 @@ export const PAGE_LAYOUT_SEEDS = {
599
599
  "bindings": []
600
600
  }
601
601
  }
602
+ },
603
+ "articles": {
604
+ "schema_version": 2,
605
+ "root_node_id": "plart_1",
606
+ "nodes": {
607
+ "plart_1": {
608
+ "id": "plart_1",
609
+ "data": {
610
+ "type": "root",
611
+ "parent": null,
612
+ "nodes": [
613
+ "plart_13"
614
+ ],
615
+ "isCanvas": true,
616
+ "hidden": false,
617
+ "custom": {}
618
+ },
619
+ "style": {},
620
+ "config": {},
621
+ "specials": {},
622
+ "responsive": {},
623
+ "events": [],
624
+ "bindings": []
625
+ },
626
+ "plart_2": {
627
+ "id": "plart_2",
628
+ "data": {
629
+ "type": "heading",
630
+ "parent": "plart_13",
631
+ "nodes": [],
632
+ "isCanvas": false,
633
+ "hidden": false,
634
+ "custom": {}
635
+ },
636
+ "style": {
637
+ "width": "100%",
638
+ "height": "fit-content"
639
+ },
640
+ "config": {
641
+ "textGlobalStyle": "heading-1"
642
+ },
643
+ "specials": {
644
+ "htmlTag": "h2",
645
+ "text": "Heading",
646
+ "stylePreset": "heading-default"
647
+ },
648
+ "responsive": {},
649
+ "events": [],
650
+ "bindings": []
651
+ },
652
+ "plart_3": {
653
+ "id": "plart_3",
654
+ "data": {
655
+ "type": "list-dataset",
656
+ "parent": "plart_13",
657
+ "nodes": [
658
+ "plart_4"
659
+ ],
660
+ "isCanvas": true,
661
+ "hidden": false,
662
+ "custom": {}
663
+ },
664
+ "style": {
665
+ "width": "100%",
666
+ "gap": "24px"
667
+ },
668
+ "config": {
669
+ "datasetSource": "article",
670
+ "articleSourceType": "category",
671
+ "loadingMode": "none",
672
+ "layout": "grid",
673
+ "quantity": 4,
674
+ "itemsPerRow": 4,
675
+ "collectionType": "all_products",
676
+ "collectionId": "all_products",
677
+ "articleCategoryId": "all_articles",
678
+ "collectionListType": "all_collections",
679
+ "listNavIcon": "ArrowLeftSLine",
680
+ "listNavPosition": "inside",
681
+ "listNavIconSize": 16,
682
+ "listNavIconColor": "#171717",
683
+ "listNavButtonWidth": 32,
684
+ "listNavButtonHeight": 32,
685
+ "listNavButtonBg": "#ffffff",
686
+ "paginationItemWidth": 8,
687
+ "paginationItemHeight": 8,
688
+ "paginationItemGap": 4,
689
+ "paginationItemBg": "rgba(0,0,0,0.25)",
690
+ "paginationItemActiveBg": "rgba(0,0,0,0.8)",
691
+ "emptyStateId": "plart_9"
692
+ },
693
+ "specials": {
694
+ "loadMoreLabel": "Load more",
695
+ "collectionIds": []
696
+ },
697
+ "responsive": {
698
+ "tablet": {
699
+ "style": {
700
+ "gap": "20px"
701
+ },
702
+ "config": {
703
+ "itemsPerRow": 2
704
+ }
705
+ },
706
+ "mobile": {
707
+ "style": {
708
+ "gap": "16px"
709
+ },
710
+ "config": {
711
+ "itemsPerRow": 1
712
+ }
713
+ }
714
+ },
715
+ "events": [],
716
+ "bindings": [
717
+ {
718
+ "id": "bind-target",
719
+ "source": "",
720
+ "field": "",
721
+ "target": {
722
+ "type": "article",
723
+ "id": "",
724
+ "kind": "article_list"
725
+ }
726
+ }
727
+ ]
728
+ },
729
+ "plart_4": {
730
+ "id": "plart_4",
731
+ "data": {
732
+ "type": "dataset-block",
733
+ "parent": "plart_3",
734
+ "nodes": [
735
+ "plart_5",
736
+ "plart_6",
737
+ "plart_7",
738
+ "plart_8"
739
+ ],
740
+ "isCanvas": true,
741
+ "hidden": false,
742
+ "custom": {}
743
+ },
744
+ "style": {
745
+ "display": "flex",
746
+ "flexDirection": "column",
747
+ "gap": "24px",
748
+ "padding": "24px",
749
+ "backgroundColor": "#ffffff",
750
+ "width": "100%",
751
+ "height": "fit-content"
752
+ },
753
+ "config": {
754
+ "contentWidth": "fill_container",
755
+ "contentWidthCustom": 0,
756
+ "backgroundSceneSource": "",
757
+ "backgroundSceneEffect": "gradient-mesh",
758
+ "backgroundSceneGallery": "podium",
759
+ "backgroundSceneSpeed": "normal",
760
+ "backgroundSceneIntensity": "normal",
761
+ "backgroundSceneColors": "theme",
762
+ "backgroundSceneColor1": "#171717",
763
+ "backgroundSceneColor2": "#ffffff",
764
+ "backgroundSceneColor3": "#6b7280",
765
+ "backgroundSceneUrl": "",
766
+ "backgroundSceneModelUrl": "",
767
+ "backgroundSceneVeil": 0,
768
+ "backgroundSceneVeilColor": "#000000",
769
+ "datasetSource": "article"
770
+ },
771
+ "specials": {},
772
+ "responsive": {
773
+ "tablet": {
774
+ "style": {
775
+ "padding": "20px",
776
+ "gap": "20px"
777
+ }
778
+ },
779
+ "mobile": {
780
+ "style": {
781
+ "padding": "16px",
782
+ "gap": "16px"
783
+ }
784
+ }
785
+ },
786
+ "events": [],
787
+ "bindings": [
788
+ {
789
+ "id": "bind-href",
790
+ "source": "article.url",
791
+ "field": "specials.boundHref",
792
+ "target": {
793
+ "type": "article",
794
+ "id": "",
795
+ "kind": "article_general"
796
+ }
797
+ },
798
+ {
799
+ "id": "bind-href-label",
800
+ "source": "article.title",
801
+ "field": "specials.boundHrefLabel"
802
+ }
803
+ ]
804
+ },
805
+ "plart_5": {
806
+ "id": "plart_5",
807
+ "data": {
808
+ "type": "collection-media",
809
+ "parent": "plart_4",
810
+ "nodes": [],
811
+ "isCanvas": false,
812
+ "hidden": false,
813
+ "custom": {}
814
+ },
815
+ "style": {
816
+ "width": "100%",
817
+ "overflow": "hidden"
818
+ },
819
+ "config": {
820
+ "imageRatio": "auto",
821
+ "customImageRatioWidth": 16,
822
+ "customImageRatioHeight": 9,
823
+ "datasetSource": "article"
824
+ },
825
+ "specials": {
826
+ "src": "",
827
+ "alt": ""
828
+ },
829
+ "responsive": {},
830
+ "events": [],
831
+ "bindings": [
832
+ {
833
+ "id": "bind-image",
834
+ "source": "article.image",
835
+ "field": "specials.boundImage",
836
+ "target": {
837
+ "type": "article",
838
+ "id": "",
839
+ "kind": "media"
840
+ }
841
+ }
842
+ ]
843
+ },
844
+ "plart_6": {
845
+ "id": "plart_6",
846
+ "data": {
847
+ "type": "text-dataset",
848
+ "parent": "plart_4",
849
+ "nodes": [],
850
+ "isCanvas": false,
851
+ "hidden": false,
852
+ "custom": {}
853
+ },
854
+ "style": {
855
+ "fontSize": "20px"
856
+ },
857
+ "config": {
858
+ "datasetSource": "article",
859
+ "kind": "title",
860
+ "textValue": "Article title",
861
+ "descriptionDisplayType": "Full",
862
+ "descriptionLines": 3,
863
+ "moreText": "Show more",
864
+ "lessText": "Show less",
865
+ "icon": true,
866
+ "moreButtonColor": "#000000",
867
+ "textGlobalStyle": "text-1"
868
+ },
869
+ "specials": {
870
+ "htmlTag": "h4",
871
+ "moreButtonEnabled": false,
872
+ "stylePreset": "text-dataset-default"
873
+ },
874
+ "responsive": {},
875
+ "events": [],
876
+ "bindings": [
877
+ {
878
+ "id": "bind-text",
879
+ "source": "article.title",
880
+ "field": "specials.boundText",
881
+ "target": {
882
+ "type": "article",
883
+ "id": "",
884
+ "kind": "title"
885
+ }
886
+ }
887
+ ]
888
+ },
889
+ "plart_7": {
890
+ "id": "plart_7",
891
+ "data": {
892
+ "type": "text-dataset",
893
+ "parent": "plart_4",
894
+ "nodes": [],
895
+ "isCanvas": false,
896
+ "hidden": false,
897
+ "custom": {}
898
+ },
899
+ "style": {},
900
+ "config": {
901
+ "datasetSource": "article",
902
+ "kind": "summary",
903
+ "textValue": "Article summary",
904
+ "descriptionDisplayType": "Full",
905
+ "descriptionLines": 3,
906
+ "moreText": "Show more",
907
+ "lessText": "Show less",
908
+ "icon": true,
909
+ "moreButtonColor": "#000000",
910
+ "textGlobalStyle": "text-1"
911
+ },
912
+ "specials": {
913
+ "htmlTag": "p",
914
+ "moreButtonEnabled": false,
915
+ "stylePreset": "text-dataset-default"
916
+ },
917
+ "responsive": {},
918
+ "events": [],
919
+ "bindings": [
920
+ {
921
+ "id": "bind-text",
922
+ "source": "article.summary",
923
+ "field": "specials.boundText",
924
+ "target": {
925
+ "type": "article",
926
+ "id": "",
927
+ "kind": "summary"
928
+ }
929
+ }
930
+ ]
931
+ },
932
+ "plart_8": {
933
+ "id": "plart_8",
934
+ "data": {
935
+ "type": "text-dataset",
936
+ "parent": "plart_4",
937
+ "nodes": [],
938
+ "isCanvas": false,
939
+ "hidden": false,
940
+ "custom": {}
941
+ },
942
+ "style": {},
943
+ "config": {
944
+ "datasetSource": "article",
945
+ "kind": "date",
946
+ "textValue": "2026-08-13",
947
+ "descriptionDisplayType": "Full",
948
+ "descriptionLines": 3,
949
+ "moreText": "Show more",
950
+ "lessText": "Show less",
951
+ "icon": true,
952
+ "moreButtonColor": "#000000",
953
+ "textGlobalStyle": "text-1"
954
+ },
955
+ "specials": {
956
+ "htmlTag": "p",
957
+ "moreButtonEnabled": false,
958
+ "stylePreset": "text-dataset-default"
959
+ },
960
+ "responsive": {},
961
+ "events": [],
962
+ "bindings": [
963
+ {
964
+ "id": "bind-text",
965
+ "source": "article.date",
966
+ "field": "specials.boundText",
967
+ "target": {
968
+ "type": "article",
969
+ "id": "",
970
+ "kind": "date"
971
+ }
972
+ }
973
+ ]
974
+ },
975
+ "plart_9": {
976
+ "id": "plart_9",
977
+ "data": {
978
+ "type": "list-empty",
979
+ "parent": "plart_3",
980
+ "nodes": [
981
+ "plart_10",
982
+ "plart_11",
983
+ "plart_12"
984
+ ],
985
+ "isCanvas": true,
986
+ "hidden": false,
987
+ "custom": {}
988
+ },
989
+ "style": {
990
+ "display": "flex",
991
+ "flexDirection": "column",
992
+ "alignItems": "center",
993
+ "justifyContent": "center",
994
+ "gap": "12px",
995
+ "width": "100%",
996
+ "padding": "48px 24px 48px 24px"
997
+ },
998
+ "config": {},
999
+ "specials": {},
1000
+ "responsive": {},
1001
+ "events": [],
1002
+ "bindings": []
1003
+ },
1004
+ "plart_10": {
1005
+ "id": "plart_10",
1006
+ "data": {
1007
+ "type": "icon",
1008
+ "parent": "plart_9",
1009
+ "nodes": [],
1010
+ "isCanvas": false,
1011
+ "hidden": false,
1012
+ "custom": {}
1013
+ },
1014
+ "style": {
1015
+ "width": "fit-content",
1016
+ "height": "fit-content",
1017
+ "color": "#d4d4d4"
1018
+ },
1019
+ "config": {
1020
+ "iconSize": 32
1021
+ },
1022
+ "specials": {
1023
+ "name": "FileListLine",
1024
+ "stylePreset": "icon-default"
1025
+ },
1026
+ "responsive": {},
1027
+ "events": [],
1028
+ "bindings": []
1029
+ },
1030
+ "plart_11": {
1031
+ "id": "plart_11",
1032
+ "data": {
1033
+ "type": "heading",
1034
+ "parent": "plart_9",
1035
+ "nodes": [],
1036
+ "isCanvas": false,
1037
+ "hidden": false,
1038
+ "custom": {}
1039
+ },
1040
+ "style": {
1041
+ "width": "auto",
1042
+ "height": "fit-content",
1043
+ "fontSize": "20px",
1044
+ "fontWeight": "600",
1045
+ "color": "#171717",
1046
+ "textAlign": "center"
1047
+ },
1048
+ "config": {
1049
+ "textGlobalStyle": "heading-1"
1050
+ },
1051
+ "specials": {
1052
+ "htmlTag": "h3",
1053
+ "text": "No posts yet",
1054
+ "stylePreset": "heading-default"
1055
+ },
1056
+ "responsive": {},
1057
+ "events": [],
1058
+ "bindings": []
1059
+ },
1060
+ "plart_12": {
1061
+ "id": "plart_12",
1062
+ "data": {
1063
+ "type": "text",
1064
+ "parent": "plart_9",
1065
+ "nodes": [],
1066
+ "isCanvas": false,
1067
+ "hidden": false,
1068
+ "custom": {}
1069
+ },
1070
+ "style": {
1071
+ "width": "auto",
1072
+ "height": "fit-content",
1073
+ "fontSize": "14px",
1074
+ "color": "#737373",
1075
+ "textAlign": "center"
1076
+ },
1077
+ "config": {
1078
+ "textGlobalStyle": "text-1"
1079
+ },
1080
+ "specials": {
1081
+ "htmlTag": "p",
1082
+ "text": "New stories will show up here. Check back soon.",
1083
+ "stylePreset": "text-default"
1084
+ },
1085
+ "responsive": {},
1086
+ "events": [],
1087
+ "bindings": []
1088
+ },
1089
+ "plart_13": {
1090
+ "id": "plart_13",
1091
+ "data": {
1092
+ "type": "flex-section",
1093
+ "parent": "plart_1",
1094
+ "nodes": [
1095
+ "plart_2",
1096
+ "plart_3"
1097
+ ],
1098
+ "isCanvas": true,
1099
+ "hidden": false,
1100
+ "custom": {}
1101
+ },
1102
+ "style": {
1103
+ "display": "flex",
1104
+ "flexDirection": "column",
1105
+ "width": "100%",
1106
+ "height": "fit-content",
1107
+ "gap": "24px",
1108
+ "paddingTop": "48px",
1109
+ "paddingBottom": "48px"
1110
+ },
1111
+ "config": {
1112
+ "backgroundSceneSource": "",
1113
+ "backgroundSceneEffect": "gradient-mesh",
1114
+ "backgroundSceneGallery": "podium",
1115
+ "backgroundSceneSpeed": "normal",
1116
+ "backgroundSceneIntensity": "normal",
1117
+ "backgroundSceneColors": "theme",
1118
+ "backgroundSceneColor1": "#171717",
1119
+ "backgroundSceneColor2": "#ffffff",
1120
+ "backgroundSceneColor3": "#6b7280",
1121
+ "backgroundSceneUrl": "",
1122
+ "backgroundSceneModelUrl": "",
1123
+ "backgroundSceneVeil": 0,
1124
+ "backgroundSceneVeilColor": "#000000"
1125
+ },
1126
+ "specials": {
1127
+ "stylePreset": "container-section"
1128
+ },
1129
+ "responsive": {},
1130
+ "events": [],
1131
+ "bindings": []
1132
+ }
1133
+ }
602
1134
  }
603
1135
  };
604
1136
  /**
@@ -52,7 +52,8 @@ export const USUAL_PAGES = [
52
52
  {
53
53
  key: 'about',
54
54
  match: ['about', 'gioi-thieu', 'giới thiệu', 've-chung-toi'],
55
- why: 'Nothing says who the shop is, which is the page a first-time buyer opens before paying.',
55
+ why: 'Nothing says who the shop is, which is the page a first-time buyer opens before paying. ' +
56
+ 'sb_page_create name:"Giới thiệu" opens it as a heading, a story and a picture.',
56
57
  layout: 'about',
57
58
  },
58
59
  // TWO POLICIES, NOT ONE BUCKET. These were a single entry, and it read a shop
@@ -67,7 +68,8 @@ export const USUAL_PAGES = [
67
68
  'shipping', 'van-chuyen', 'vận chuyển', 'giao-hang', 'giao hàng', 'delivery',
68
69
  ],
69
70
  why: 'No delivery or return terms a shopper can read before paying. This is the page a buyer ' +
70
- 'looks for when the parcel is late and the one a dispute is settled against.',
71
+ 'looks for when the parcel is late and the one a dispute is settled against. ' +
72
+ 'sb_page_create with a name carrying "giao hàng" or "đổi trả" opens it as prose.',
71
73
  layout: 'policy',
72
74
  },
73
75
  {
@@ -77,14 +79,16 @@ export const USUAL_PAGES = [
77
79
  'quy-dinh', 'quy định',
78
80
  ],
79
81
  why: 'No privacy policy or terms of use. Payment providers and marketplaces ask for both ' +
80
- 'before they will list a shop, and a checkout form collects personal data either way.',
82
+ 'before they will list a shop, and a checkout form collects personal data either way. ' +
83
+ 'sb_page_create with a name carrying "bảo mật" or "điều khoản" opens it as prose.',
81
84
  layout: 'policy',
82
85
  },
83
86
  {
84
87
  key: 'faq',
85
88
  match: ['faq', 'cau-hoi', 'câu hỏi', 'hoi-dap', 'hỏi đáp', 'help', 'tro-giup', 'trợ giúp'],
86
89
  why: 'The same handful of questions reach support one message at a time, with no page to link ' +
87
- 'an answer to. The accordion element is what this page is built from.',
90
+ 'an answer to. sb_page_create name:"Câu hỏi thường gặp" opens it on the accordion, which ' +
91
+ 'is the element this page is made of.',
88
92
  layout: 'faq',
89
93
  },
90
94
  {
@@ -97,7 +101,9 @@ export const USUAL_PAGES = [
97
101
  when: (pages) => pages.some((x) => x.type === 'post'),
98
102
  match: ['blog', 'tin-tuc', 'tin tức', 'news', 'bai-viet', 'bài viết', 'kien-thuc', 'cẩm nang'],
99
103
  why: 'This site has an article template, so /blog/{slug} works — but no page LISTS the ' +
100
- 'articles, so each one is reachable only by someone who already has its URL.',
104
+ 'articles, so each one is reachable only by someone who already has its URL. ' +
105
+ 'sb_page_create name:"Tin tức" opens it on a repeater already bound to them.',
106
+ layout: 'articles',
101
107
  },
102
108
  ];
103
109
  /**
@@ -24,7 +24,7 @@ export async function gatherReadiness(ctx, siteId, pageNodes) {
24
24
  }
25
25
  };
26
26
  const site = encodeURIComponent(siteId);
27
- const [pageList, gateways, shipping, globals, productList, categoryList, pageLinks, formList] = await Promise.all([
27
+ const [pageList, gateways, shipping, globals, productList, categoryList, pageLinks, formList, articleList] = await Promise.all([
28
28
  get(`/api/sites/${site}/pages`),
29
29
  get(`/api/sites/${site}/payment-gateways`),
30
30
  get(`/api/sites/${site}/shipping-methods`),
@@ -48,6 +48,10 @@ export async function gatherReadiness(ctx, siteId, pageNodes) {
48
48
  // blindness is what let one page quietly become the site's whole account
49
49
  // area, which is the shape `mergedAuthPage` reports.
50
50
  get(`/api/sites/${site}/forms`),
51
+ // THE ARTICLES, for the same reason the products are read: /blog/{slug}
52
+ // resolves to the site's `post` template, so a site that has written
53
+ // articles and has no template 404s every one of them.
54
+ get(`/api/sites/${site}/articles?limit=1`),
51
55
  ]);
52
56
  // A gateway counts only when it is BOTH enabled and configured — the editor's
53
57
  // `live` getter also filters by the store's currency, which is a narrowing:
@@ -94,5 +98,8 @@ export async function gatherReadiness(ctx, siteId, pageNodes) {
94
98
  categories,
95
99
  categoryPageLinks,
96
100
  forms: formList?.forms ?? null,
101
+ articles: Array.isArray(articleList?.articles)
102
+ ? (articleList?.total ?? articleList.articles.length)
103
+ : null,
97
104
  };
98
105
  }
@@ -178,6 +178,31 @@ export function readinessGaps(input) {
178
178
  });
179
179
  }
180
180
  }
181
+ // ARTICLES WRITTEN AND NOTHING TO RENDER THEM IN.
182
+ //
183
+ // `post` is the ARTICLE template: /blog/{slug} resolves to the site's
184
+ // published page of that type, so a site that has written articles and has
185
+ // none 404s every single one — including the links its own listing page
186
+ // carries, which is the page that makes the articles findable in the first
187
+ // place.
188
+ //
189
+ // ASKED OF EVERY SITE, above the store gate: a blog is not a commerce
190
+ // feature, and a brochure site with a news section has exactly this problem.
191
+ // Gated on having WRITTEN something, so a site with no blog hears nothing.
192
+ if (pages && (input.articles ?? 0) > 0 && !published(pages, 'post')) {
193
+ const draft = drafted(pages, 'post');
194
+ gaps.push({
195
+ id: 'articleTemplate',
196
+ draft,
197
+ problem: `This site has ${input.articles} article${input.articles === 1 ? '' : 's'} and no ` +
198
+ 'published page of the "post" type. /blog/{slug} needs one, so every article 404s — ' +
199
+ 'including the links a listing page carries.',
200
+ fix: draft
201
+ ? 'Publish the article template page that already exists.'
202
+ : 'Create a page of type "post" and publish it. It opens seeded with the cover, ' +
203
+ 'headline, date and body an article cannot be read without.',
204
+ });
205
+ }
181
206
  if (!isStore(input))
182
207
  return gaps;
183
208
  if (pages && !published(pages, 'checkout')) {
@@ -219,6 +244,36 @@ export function readinessGaps(input) {
219
244
  : 'Create a page of type "product" and publish it.',
220
245
  });
221
246
  }
247
+ // AND THE SAME HOLE ON THE OTHER SIDE OF THE CATALOGUE.
248
+ //
249
+ // `/collections/{slug}` resolves the same way /products/{slug} does — through
250
+ // PublishedForEntity, to the category's own page or to the DEFAULT TEMPLATE
251
+ // for the `category` type — so a store with categories and no published one
252
+ // 404s every collection link, including the ones its own menu carries.
253
+ //
254
+ // `categoryScope` below is a different defect and assumes this page EXISTS:
255
+ // it reports a template SHARED across categories, which is the complaint you
256
+ // can only make once there is a template to share. With none, every URL fails
257
+ // outright and the scope question does not arise.
258
+ //
259
+ // GATED ON HAVING CATEGORIES, unlike productPage. A store can genuinely sell
260
+ // without collections — one shop, one flat catalogue — and telling it to build
261
+ // a template for a thing it does not use is the nag this file keeps warning
262
+ // about. Silent when the count could not be read, like everything else here.
263
+ if (pages && (input.categories ?? 0) > 0 && !published(pages, 'category')) {
264
+ const draft = drafted(pages, 'category');
265
+ gaps.push({
266
+ id: 'categoryPage',
267
+ draft,
268
+ problem: `This store has ${input.categories} categor${input.categories === 1 ? 'y' : 'ies'} and no ` +
269
+ 'published page of the "category" type. /collections/{slug} needs one, so every ' +
270
+ 'collection link 404s — including the ones in the site\'s own menu.',
271
+ fix: draft
272
+ ? 'Publish the category template page that already exists.'
273
+ : 'Create a page of type "category" and publish it. It opens seeded with the collection ' +
274
+ 'title and a product repeater.',
275
+ });
276
+ }
222
277
  // NOTHING TO SELL. Checked before the delivery option, because a shipping
223
278
  // method for an empty catalogue is furniture.
224
279
  if (input.products) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbuilder-mcp",
3
- "version": "0.55.0",
3
+ "version": "0.57.0",
4
4
  "description": "MCP server that designs and operates a Store Builder site — pages, data, theme and publish — through the platform's own API and live-edit protocol.",
5
5
  "mcpName": "io.github.vuluu2k/sbuilder-mcp",
6
6
  "type": "module",