@open-mercato/cli 0.9.1-develop.7575.1.8480826a9b → 0.10.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.
Files changed (641) hide show
  1. package/.turbo/turbo-build.log +16 -2
  2. package/build.mjs +1 -0
  3. package/dist/agentic/claude-code/mcp.json.example +5 -1
  4. package/dist/agentic/codex/mcp.json.example +3 -0
  5. package/dist/agentic/cursor/mcp.json.example +4 -1
  6. package/dist/agentic/github-copilot/mcp.json.example +5 -1
  7. package/dist/agentic/guides/ai-workflows.md +1 -0
  8. package/dist/agentic/guides/architecture.md +9 -5
  9. package/dist/agentic/guides/customers-calendar.md +57 -0
  10. package/dist/agentic/guides/extensions.md +2 -0
  11. package/dist/agentic/guides/module-facts.json +25282 -6677
  12. package/dist/agentic/guides/module-facts.v2.json +25371 -6677
  13. package/dist/agentic/guides/module-tool.md +56 -0
  14. package/dist/agentic/guides/modules/agent_orchestrator/acl-features.md +2 -1
  15. package/dist/agentic/guides/modules/agent_orchestrator/active-extension-bindings.md +1 -1
  16. package/dist/agentic/guides/modules/agent_orchestrator/backend-pages.md +3 -0
  17. package/dist/agentic/guides/modules/agent_orchestrator/cli-commands.md +4 -0
  18. package/dist/agentic/guides/modules/agent_orchestrator/contribution-resolutions.md +6 -0
  19. package/dist/agentic/guides/modules/agent_orchestrator/di-registrations-rich.md +32 -32
  20. package/dist/agentic/guides/modules/agent_orchestrator/di-service-tokens.md +14 -14
  21. package/dist/agentic/guides/modules/agent_orchestrator/domain-commands.md +3 -0
  22. package/dist/agentic/guides/modules/agent_orchestrator/events.md +30 -29
  23. package/dist/agentic/guides/modules/agent_orchestrator/exact-override-targets.md +104 -35
  24. package/dist/agentic/guides/modules/agent_orchestrator/index.md +17 -6
  25. package/dist/agentic/guides/modules/agent_orchestrator/setup.md +1 -1
  26. package/dist/agentic/guides/modules/agent_orchestrator/umes-contributions.md +6 -0
  27. package/dist/agentic/guides/modules/agent_orchestrator/umes-hosts.md +2 -1
  28. package/dist/agentic/guides/modules/agent_orchestrator/workers.md +2 -0
  29. package/dist/agentic/guides/modules/ai_assistant/acl-features.md +4 -1
  30. package/dist/agentic/guides/modules/ai_assistant/ai-tools-mcp-capabilities.md +1 -0
  31. package/dist/agentic/guides/modules/ai_assistant/backend-pages.md +4 -0
  32. package/dist/agentic/guides/modules/ai_assistant/cli-commands.md +1 -0
  33. package/dist/agentic/guides/modules/ai_assistant/contribution-resolutions.md +3 -0
  34. package/dist/agentic/guides/modules/ai_assistant/di-registrations-rich.md +5 -3
  35. package/dist/agentic/guides/modules/ai_assistant/di-service-tokens.md +4 -2
  36. package/dist/agentic/guides/modules/ai_assistant/encryption.md +3 -0
  37. package/dist/agentic/guides/modules/ai_assistant/entities.md +3 -0
  38. package/dist/agentic/guides/modules/ai_assistant/events.md +9 -8
  39. package/dist/agentic/guides/modules/ai_assistant/exact-override-targets.md +23 -6
  40. package/dist/agentic/guides/modules/ai_assistant/index.md +9 -9
  41. package/dist/agentic/guides/modules/ai_assistant/notifications.md +1 -0
  42. package/dist/agentic/guides/modules/ai_assistant/setup.md +1 -1
  43. package/dist/agentic/guides/modules/ai_assistant/umes-contributions.md +3 -0
  44. package/dist/agentic/guides/modules/ai_assistant/umes-hosts.md +4 -0
  45. package/dist/agentic/guides/modules/ai_assistant/workers.md +2 -1
  46. package/dist/agentic/guides/modules/api_docs/index.md +1 -1
  47. package/dist/agentic/guides/modules/api_keys/index.md +1 -1
  48. package/dist/agentic/guides/modules/attachments/active-extension-bindings.md +12 -0
  49. package/dist/agentic/guides/modules/attachments/ai-tools-mcp-capabilities.md +11 -0
  50. package/dist/agentic/guides/modules/attachments/backend-pages.md +1 -0
  51. package/dist/agentic/guides/modules/attachments/cli-commands.md +1 -0
  52. package/dist/agentic/guides/modules/attachments/contribution-resolutions.md +13 -0
  53. package/dist/agentic/guides/modules/attachments/di-registrations-rich.md +6 -6
  54. package/dist/agentic/guides/modules/attachments/di-service-tokens.md +5 -5
  55. package/dist/agentic/guides/modules/attachments/domain-commands.md +11 -0
  56. package/dist/agentic/guides/modules/attachments/encryption.md +12 -0
  57. package/dist/agentic/guides/modules/attachments/entities.md +2 -0
  58. package/dist/agentic/guides/modules/attachments/events.md +3 -3
  59. package/dist/agentic/guides/modules/attachments/exact-override-targets.md +17 -7
  60. package/dist/agentic/guides/modules/attachments/generator-plugins.md +11 -0
  61. package/dist/agentic/guides/modules/attachments/index.md +13 -5
  62. package/dist/agentic/guides/modules/attachments/search-entities.md +11 -0
  63. package/dist/agentic/guides/modules/attachments/setup.md +1 -1
  64. package/dist/agentic/guides/modules/attachments/umes-contributions.md +13 -0
  65. package/dist/agentic/guides/modules/attachments/umes-hosts.md +4 -0
  66. package/dist/agentic/guides/modules/attachments/workers.md +2 -0
  67. package/dist/agentic/guides/modules/audit_logs/active-extension-bindings.md +11 -0
  68. package/dist/agentic/guides/modules/audit_logs/incoming-installed-contributions.md +12 -0
  69. package/dist/agentic/guides/modules/audit_logs/index.md +4 -2
  70. package/dist/agentic/guides/modules/auth/events.md +12 -12
  71. package/dist/agentic/guides/modules/auth/index.md +1 -1
  72. package/dist/agentic/guides/modules/availability/events.md +3 -3
  73. package/dist/agentic/guides/modules/availability/index.md +1 -1
  74. package/dist/agentic/guides/modules/business_rules/events.md +1 -1
  75. package/dist/agentic/guides/modules/business_rules/index.md +1 -1
  76. package/dist/agentic/guides/modules/carrier_inpost/acl-features.md +12 -0
  77. package/dist/agentic/guides/modules/carrier_inpost/contribution-resolutions.md +13 -0
  78. package/dist/agentic/guides/modules/carrier_inpost/di-registrations-rich.md +11 -0
  79. package/dist/agentic/guides/modules/carrier_inpost/exact-override-targets.md +16 -0
  80. package/dist/agentic/guides/modules/carrier_inpost/index.md +18 -0
  81. package/dist/agentic/guides/modules/carrier_inpost/owned-contract-module-metadata.md +11 -0
  82. package/dist/agentic/guides/modules/carrier_inpost/setup.md +11 -0
  83. package/dist/agentic/guides/modules/carrier_inpost/umes-contributions.md +13 -0
  84. package/dist/agentic/guides/modules/cart/acl-features.md +19 -0
  85. package/dist/agentic/guides/modules/cart/contribution-resolutions.md +24 -0
  86. package/dist/agentic/guides/modules/cart/di-registrations-rich.md +11 -0
  87. package/dist/agentic/guides/modules/cart/di-service-tokens.md +11 -0
  88. package/dist/agentic/guides/modules/cart/domain-commands.md +24 -0
  89. package/dist/agentic/guides/modules/cart/encryption.md +11 -0
  90. package/dist/agentic/guides/modules/cart/entities.md +15 -0
  91. package/dist/agentic/guides/modules/cart/events.md +35 -0
  92. package/dist/agentic/guides/modules/cart/exact-override-targets.md +27 -0
  93. package/dist/agentic/guides/modules/cart/index.md +25 -0
  94. package/dist/agentic/guides/modules/cart/owned-contract-module-metadata.md +11 -0
  95. package/dist/agentic/guides/modules/cart/setup.md +11 -0
  96. package/dist/agentic/guides/modules/cart/umes-contributions.md +24 -0
  97. package/dist/agentic/guides/modules/cart/umes-hosts.md +40 -0
  98. package/dist/agentic/guides/modules/cart/workers.md +14 -0
  99. package/dist/agentic/guides/modules/catalog/acl-features.md +3 -1
  100. package/dist/agentic/guides/modules/catalog/active-extension-bindings.md +3 -3
  101. package/dist/agentic/guides/modules/catalog/cli-commands.md +1 -0
  102. package/dist/agentic/guides/modules/catalog/contribution-resolutions.md +2 -0
  103. package/dist/agentic/guides/modules/catalog/di-registrations-rich.md +7 -4
  104. package/dist/agentic/guides/modules/catalog/di-service-tokens.md +4 -1
  105. package/dist/agentic/guides/modules/catalog/entities.md +1 -0
  106. package/dist/agentic/guides/modules/catalog/events.md +18 -18
  107. package/dist/agentic/guides/modules/catalog/exact-override-targets.md +12 -4
  108. package/dist/agentic/guides/modules/catalog/index.md +6 -6
  109. package/dist/agentic/guides/modules/catalog/owned-contract-module-metadata.md +1 -1
  110. package/dist/agentic/guides/modules/catalog/umes-contributions.md +2 -0
  111. package/dist/agentic/guides/modules/catalog/umes-hosts.md +1 -0
  112. package/dist/agentic/guides/modules/channel_apns/index.md +1 -1
  113. package/dist/agentic/guides/modules/channel_discord/index.md +1 -1
  114. package/dist/agentic/guides/modules/channel_expo/index.md +1 -1
  115. package/dist/agentic/guides/modules/channel_fcm/index.md +1 -1
  116. package/dist/agentic/guides/modules/channel_gmail/index.md +1 -1
  117. package/dist/agentic/guides/modules/channel_imap/index.md +1 -1
  118. package/dist/agentic/guides/modules/channel_resend/index.md +1 -1
  119. package/dist/agentic/guides/modules/channel_ses/index.md +1 -1
  120. package/dist/agentic/guides/modules/channel_smtp/acl-features.md +12 -0
  121. package/dist/agentic/guides/modules/channel_smtp/contribution-resolutions.md +11 -0
  122. package/dist/agentic/guides/modules/channel_smtp/di-registrations-rich.md +12 -0
  123. package/dist/agentic/guides/modules/channel_smtp/exact-override-targets.md +16 -0
  124. package/dist/agentic/guides/modules/channel_smtp/index.md +18 -0
  125. package/dist/agentic/guides/modules/channel_smtp/owned-contract-module-metadata.md +11 -0
  126. package/dist/agentic/guides/modules/channel_smtp/setup.md +11 -0
  127. package/dist/agentic/guides/modules/channel_smtp/umes-contributions.md +11 -0
  128. package/dist/agentic/guides/modules/checkout/events.md +16 -16
  129. package/dist/agentic/guides/modules/checkout/exact-override-targets.md +5 -4
  130. package/dist/agentic/guides/modules/checkout/index.md +1 -1
  131. package/dist/agentic/guides/modules/checkout/setup.md +1 -1
  132. package/dist/agentic/guides/modules/checkout/workers.md +1 -1
  133. package/dist/agentic/guides/modules/communication_channels/events.md +17 -17
  134. package/dist/agentic/guides/modules/communication_channels/exact-override-targets.md +5 -4
  135. package/dist/agentic/guides/modules/communication_channels/index.md +2 -2
  136. package/dist/agentic/guides/modules/communication_channels/setup.md +1 -1
  137. package/dist/agentic/guides/modules/communication_channels/workers.md +2 -2
  138. package/dist/agentic/guides/modules/configs/active-extension-bindings.md +1 -1
  139. package/dist/agentic/guides/modules/configs/index.md +1 -1
  140. package/dist/agentic/guides/modules/content/index.md +1 -1
  141. package/dist/agentic/guides/modules/currencies/di-registrations-rich.md +11 -0
  142. package/dist/agentic/guides/modules/currencies/di-service-tokens.md +11 -0
  143. package/dist/agentic/guides/modules/currencies/events.md +6 -6
  144. package/dist/agentic/guides/modules/currencies/exact-override-targets.md +1 -0
  145. package/dist/agentic/guides/modules/currencies/index.md +4 -2
  146. package/dist/agentic/guides/modules/customer_accounts/active-extension-bindings.md +1 -0
  147. package/dist/agentic/guides/modules/customer_accounts/contribution-resolutions.md +2 -2
  148. package/dist/agentic/guides/modules/customer_accounts/domain-commands.md +11 -0
  149. package/dist/agentic/guides/modules/customer_accounts/events.md +27 -26
  150. package/dist/agentic/guides/modules/customer_accounts/exact-override-targets.md +1 -1
  151. package/dist/agentic/guides/modules/customer_accounts/incoming-installed-contributions.md +13 -0
  152. package/dist/agentic/guides/modules/customer_accounts/index.md +6 -4
  153. package/dist/agentic/guides/modules/customer_accounts/umes-contributions.md +2 -2
  154. package/dist/agentic/guides/modules/customer_accounts/umes-hosts.md +1 -0
  155. package/dist/agentic/guides/modules/customer_groups/active-extension-bindings.md +1 -1
  156. package/dist/agentic/guides/modules/customer_groups/contribution-resolutions.md +2 -2
  157. package/dist/agentic/guides/modules/customer_groups/events.md +7 -7
  158. package/dist/agentic/guides/modules/customer_groups/incoming-installed-contributions.md +11 -0
  159. package/dist/agentic/guides/modules/customer_groups/index.md +3 -2
  160. package/dist/agentic/guides/modules/customer_groups/umes-contributions.md +2 -2
  161. package/dist/agentic/guides/modules/customers/active-extension-bindings.md +12 -13
  162. package/dist/agentic/guides/modules/customers/di-registrations-rich.md +6 -3
  163. package/dist/agentic/guides/modules/customers/encryption.md +1 -1
  164. package/dist/agentic/guides/modules/customers/events.md +51 -51
  165. package/dist/agentic/guides/modules/customers/exact-override-targets.md +6 -3
  166. package/dist/agentic/guides/modules/customers/incoming-installed-contributions.md +12 -8
  167. package/dist/agentic/guides/modules/customers/index.md +12 -4
  168. package/dist/agentic/guides/modules/customers/owned-contract-module-metadata.md +1 -1
  169. package/dist/agentic/guides/modules/customers/umes-hosts.md +48 -0
  170. package/dist/agentic/guides/modules/dashboards/active-extension-bindings.md +1 -1
  171. package/dist/agentic/guides/modules/dashboards/index.md +1 -1
  172. package/dist/agentic/guides/modules/data_sync/di-registrations-rich.md +8 -8
  173. package/dist/agentic/guides/modules/data_sync/di-service-tokens.md +4 -4
  174. package/dist/agentic/guides/modules/data_sync/events.md +4 -4
  175. package/dist/agentic/guides/modules/data_sync/exact-override-targets.md +8 -8
  176. package/dist/agentic/guides/modules/data_sync/index.md +1 -1
  177. package/dist/agentic/guides/modules/design_system/index.md +1 -1
  178. package/dist/agentic/guides/modules/devices/events.md +5 -5
  179. package/dist/agentic/guides/modules/devices/index.md +1 -1
  180. package/dist/agentic/guides/modules/dictionaries/events.md +3 -3
  181. package/dist/agentic/guides/modules/dictionaries/index.md +1 -1
  182. package/dist/agentic/guides/modules/directory/active-extension-bindings.md +1 -1
  183. package/dist/agentic/guides/modules/directory/contribution-resolutions.md +1 -0
  184. package/dist/agentic/guides/modules/directory/events.md +6 -6
  185. package/dist/agentic/guides/modules/directory/exact-override-targets.md +1 -0
  186. package/dist/agentic/guides/modules/directory/incoming-installed-contributions.md +4 -0
  187. package/dist/agentic/guides/modules/directory/index.md +2 -2
  188. package/dist/agentic/guides/modules/directory/umes-contributions.md +1 -0
  189. package/dist/agentic/guides/modules/documents/contribution-resolutions.md +3 -3
  190. package/dist/agentic/guides/modules/documents/events.md +15 -15
  191. package/dist/agentic/guides/modules/documents/index.md +1 -1
  192. package/dist/agentic/guides/modules/documents/umes-contributions.md +5 -5
  193. package/dist/agentic/guides/modules/ecommerce/acl-features.md +15 -0
  194. package/dist/agentic/guides/modules/ecommerce/active-extension-bindings.md +12 -0
  195. package/dist/agentic/guides/modules/ecommerce/backend-pages.md +12 -0
  196. package/dist/agentic/guides/modules/ecommerce/contribution-resolutions.md +33 -0
  197. package/dist/agentic/guides/modules/ecommerce/di-registrations-rich.md +11 -0
  198. package/dist/agentic/guides/modules/ecommerce/di-service-tokens.md +11 -0
  199. package/dist/agentic/guides/modules/ecommerce/entities.md +13 -0
  200. package/dist/agentic/guides/modules/ecommerce/events.md +22 -0
  201. package/dist/agentic/guides/modules/ecommerce/exact-override-targets.md +42 -0
  202. package/dist/agentic/guides/modules/ecommerce/index.md +26 -0
  203. package/dist/agentic/guides/modules/ecommerce/notifications.md +12 -0
  204. package/dist/agentic/guides/modules/ecommerce/owned-contract-module-metadata.md +11 -0
  205. package/dist/agentic/guides/modules/ecommerce/search-entities.md +11 -0
  206. package/dist/agentic/guides/modules/ecommerce/setup.md +11 -0
  207. package/dist/agentic/guides/modules/ecommerce/umes-contributions.md +33 -0
  208. package/dist/agentic/guides/modules/ecommerce/umes-hosts.md +27 -0
  209. package/dist/agentic/guides/modules/entities/contribution-resolutions.md +14 -0
  210. package/dist/agentic/guides/modules/entities/exact-override-targets.md +4 -0
  211. package/dist/agentic/guides/modules/entities/index.md +5 -3
  212. package/dist/agentic/guides/modules/entities/umes-contributions.md +14 -0
  213. package/dist/agentic/guides/modules/eudr/events.md +23 -23
  214. package/dist/agentic/guides/modules/eudr/index.md +1 -1
  215. package/dist/agentic/guides/modules/eudr/owned-contract-module-metadata.md +1 -1
  216. package/dist/agentic/guides/modules/events/index.md +1 -1
  217. package/dist/agentic/guides/modules/feature_toggles/index.md +1 -1
  218. package/dist/agentic/guides/modules/forms/events.md +18 -18
  219. package/dist/agentic/guides/modules/forms/index.md +1 -1
  220. package/dist/agentic/guides/modules/forms/owned-contract-module-metadata.md +1 -1
  221. package/dist/agentic/guides/modules/gateway_autopay/acl-features.md +12 -0
  222. package/dist/agentic/guides/modules/gateway_autopay/cli-commands.md +12 -0
  223. package/dist/agentic/guides/modules/gateway_autopay/contribution-resolutions.md +12 -0
  224. package/dist/agentic/guides/modules/gateway_autopay/di-registrations-rich.md +11 -0
  225. package/dist/agentic/guides/modules/gateway_autopay/exact-override-targets.md +17 -0
  226. package/dist/agentic/guides/modules/gateway_autopay/index.md +19 -0
  227. package/dist/agentic/guides/modules/gateway_autopay/owned-contract-module-metadata.md +11 -0
  228. package/dist/agentic/guides/modules/gateway_autopay/setup.md +11 -0
  229. package/dist/agentic/guides/modules/gateway_autopay/umes-contributions.md +12 -0
  230. package/dist/agentic/guides/modules/gateway_stripe/di-registrations-rich.md +1 -1
  231. package/dist/agentic/guides/modules/gateway_stripe/exact-override-targets.md +1 -1
  232. package/dist/agentic/guides/modules/gateway_stripe/index.md +1 -1
  233. package/dist/agentic/guides/modules/gateway_tpay/acl-features.md +12 -0
  234. package/dist/agentic/guides/modules/gateway_tpay/cli-commands.md +12 -0
  235. package/dist/agentic/guides/modules/gateway_tpay/contribution-resolutions.md +13 -0
  236. package/dist/agentic/guides/modules/gateway_tpay/di-registrations-rich.md +11 -0
  237. package/dist/agentic/guides/modules/gateway_tpay/exact-override-targets.md +20 -0
  238. package/dist/agentic/guides/modules/gateway_tpay/index.md +20 -0
  239. package/dist/agentic/guides/modules/gateway_tpay/owned-contract-module-metadata.md +11 -0
  240. package/dist/agentic/guides/modules/gateway_tpay/setup.md +11 -0
  241. package/dist/agentic/guides/modules/gateway_tpay/umes-contributions.md +13 -0
  242. package/dist/agentic/guides/modules/gateway_tpay/workers.md +11 -0
  243. package/dist/agentic/guides/modules/generators/index.md +1 -1
  244. package/dist/agentic/guides/modules/inbox_ops/events.md +13 -13
  245. package/dist/agentic/guides/modules/inbox_ops/index.md +2 -2
  246. package/dist/agentic/guides/modules/integrations/di-registrations-rich.md +9 -8
  247. package/dist/agentic/guides/modules/integrations/di-service-tokens.md +5 -4
  248. package/dist/agentic/guides/modules/integrations/events.md +4 -4
  249. package/dist/agentic/guides/modules/integrations/exact-override-targets.md +12 -10
  250. package/dist/agentic/guides/modules/integrations/incoming-installed-contributions.md +11 -0
  251. package/dist/agentic/guides/modules/integrations/index.md +3 -2
  252. package/dist/agentic/guides/modules/integrations/setup.md +1 -1
  253. package/dist/agentic/guides/modules/messages/entities.md +2 -0
  254. package/dist/agentic/guides/modules/messages/events.md +9 -9
  255. package/dist/agentic/guides/modules/messages/index.md +1 -1
  256. package/dist/agentic/guides/modules/messages/umes-hosts.md +2 -0
  257. package/dist/agentic/guides/modules/notifications/index.md +1 -1
  258. package/dist/agentic/guides/modules/onboarding/index.md +1 -1
  259. package/dist/agentic/guides/modules/payment_gateways/active-extension-bindings.md +1 -1
  260. package/dist/agentic/guides/modules/payment_gateways/di-registrations-rich.md +4 -4
  261. package/dist/agentic/guides/modules/payment_gateways/di-service-tokens.md +2 -2
  262. package/dist/agentic/guides/modules/payment_gateways/events.md +9 -9
  263. package/dist/agentic/guides/modules/payment_gateways/exact-override-targets.md +5 -4
  264. package/dist/agentic/guides/modules/payment_gateways/index.md +1 -1
  265. package/dist/agentic/guides/modules/payment_gateways/setup.md +1 -1
  266. package/dist/agentic/guides/modules/perspectives/index.md +1 -1
  267. package/dist/agentic/guides/modules/phone_calls/events.md +3 -3
  268. package/dist/agentic/guides/modules/phone_calls/index.md +1 -1
  269. package/dist/agentic/guides/modules/planner/active-extension-bindings.md +1 -1
  270. package/dist/agentic/guides/modules/planner/events.md +6 -6
  271. package/dist/agentic/guides/modules/planner/exact-override-targets.md +3 -3
  272. package/dist/agentic/guides/modules/planner/index.md +1 -1
  273. package/dist/agentic/guides/modules/planner/setup.md +1 -1
  274. package/dist/agentic/guides/modules/portal/exact-override-targets.md +1 -0
  275. package/dist/agentic/guides/modules/portal/frontend-pages.md +1 -0
  276. package/dist/agentic/guides/modules/portal/index.md +1 -1
  277. package/dist/agentic/guides/modules/portal/owned-contract-module-metadata.md +1 -1
  278. package/dist/agentic/guides/modules/progress/events.md +6 -6
  279. package/dist/agentic/guides/modules/progress/index.md +2 -2
  280. package/dist/agentic/guides/modules/promotions/acl-features.md +18 -0
  281. package/dist/agentic/guides/modules/promotions/active-extension-bindings.md +12 -0
  282. package/dist/agentic/guides/modules/promotions/backend-pages.md +16 -0
  283. package/dist/agentic/guides/modules/promotions/contribution-resolutions.md +18 -0
  284. package/dist/agentic/guides/modules/promotions/di-registrations-rich.md +15 -0
  285. package/dist/agentic/guides/modules/promotions/di-service-tokens.md +15 -0
  286. package/dist/agentic/guides/modules/promotions/domain-commands.md +23 -0
  287. package/dist/agentic/guides/modules/promotions/entities.md +19 -0
  288. package/dist/agentic/guides/modules/promotions/events.md +24 -0
  289. package/dist/agentic/guides/modules/promotions/exact-override-targets.md +41 -0
  290. package/dist/agentic/guides/modules/promotions/index.md +26 -0
  291. package/dist/agentic/guides/modules/promotions/owned-contract-module-metadata.md +11 -0
  292. package/dist/agentic/guides/modules/promotions/setup.md +11 -0
  293. package/dist/agentic/guides/modules/promotions/umes-contributions.md +18 -0
  294. package/dist/agentic/guides/modules/promotions/umes-hosts.md +33 -0
  295. package/dist/agentic/guides/modules/promotions/workers.md +12 -0
  296. package/dist/agentic/guides/modules/push_notifications/active-extension-bindings.md +11 -0
  297. package/dist/agentic/guides/modules/push_notifications/events.md +2 -2
  298. package/dist/agentic/guides/modules/push_notifications/index.md +3 -2
  299. package/dist/agentic/guides/modules/query_index/events.md +8 -8
  300. package/dist/agentic/guides/modules/query_index/index.md +1 -1
  301. package/dist/agentic/guides/modules/record_locks/events.md +10 -10
  302. package/dist/agentic/guides/modules/record_locks/index.md +1 -1
  303. package/dist/agentic/guides/modules/resources/events.md +15 -15
  304. package/dist/agentic/guides/modules/resources/index.md +1 -1
  305. package/dist/agentic/guides/modules/sales/active-extension-bindings.md +5 -0
  306. package/dist/agentic/guides/modules/sales/di-registrations-rich.md +30 -30
  307. package/dist/agentic/guides/modules/sales/di-service-tokens.md +5 -5
  308. package/dist/agentic/guides/modules/sales/domain-commands.md +1 -0
  309. package/dist/agentic/guides/modules/sales/events.md +44 -44
  310. package/dist/agentic/guides/modules/sales/exact-override-targets.md +30 -30
  311. package/dist/agentic/guides/modules/sales/incoming-installed-contributions.md +3 -1
  312. package/dist/agentic/guides/modules/sales/index.md +4 -4
  313. package/dist/agentic/guides/modules/sales/umes-hosts.md +5 -2
  314. package/dist/agentic/guides/modules/scheduler/events.md +4 -4
  315. package/dist/agentic/guides/modules/scheduler/exact-override-targets.md +1 -1
  316. package/dist/agentic/guides/modules/scheduler/index.md +1 -1
  317. package/dist/agentic/guides/modules/scheduler/workers.md +1 -1
  318. package/dist/agentic/guides/modules/search/events.md +1 -1
  319. package/dist/agentic/guides/modules/search/exact-override-targets.md +1 -1
  320. package/dist/agentic/guides/modules/search/index.md +1 -1
  321. package/dist/agentic/guides/modules/search/workers.md +1 -1
  322. package/dist/agentic/guides/modules/security/contribution-resolutions.md +2 -0
  323. package/dist/agentic/guides/modules/security/events.md +22 -21
  324. package/dist/agentic/guides/modules/security/exact-override-targets.md +2 -0
  325. package/dist/agentic/guides/modules/security/index.md +2 -2
  326. package/dist/agentic/guides/modules/security/notifications.md +1 -0
  327. package/dist/agentic/guides/modules/security/umes-contributions.md +2 -0
  328. package/dist/agentic/guides/modules/security/umes-hosts.md +1 -0
  329. package/dist/agentic/guides/modules/seeds/index.md +1 -1
  330. package/dist/agentic/guides/modules/shipping_carriers/contribution-resolutions.md +1 -1
  331. package/dist/agentic/guides/modules/shipping_carriers/events.md +7 -7
  332. package/dist/agentic/guides/modules/shipping_carriers/exact-override-targets.md +1 -1
  333. package/dist/agentic/guides/modules/shipping_carriers/index.md +1 -1
  334. package/dist/agentic/guides/modules/shipping_carriers/umes-contributions.md +1 -1
  335. package/dist/agentic/guides/modules/shipping_carriers/workers.md +1 -1
  336. package/dist/agentic/guides/modules/sso/di-registrations-rich.md +8 -7
  337. package/dist/agentic/guides/modules/sso/di-service-tokens.md +7 -6
  338. package/dist/agentic/guides/modules/sso/events.md +12 -12
  339. package/dist/agentic/guides/modules/sso/exact-override-targets.md +8 -7
  340. package/dist/agentic/guides/modules/sso/index.md +1 -1
  341. package/dist/agentic/guides/modules/staff/active-extension-bindings.md +5 -3
  342. package/dist/agentic/guides/modules/staff/backend-pages.md +1 -0
  343. package/dist/agentic/guides/modules/staff/cli-commands.md +1 -0
  344. package/dist/agentic/guides/modules/staff/contribution-resolutions.md +23 -0
  345. package/dist/agentic/guides/modules/staff/di-registrations-rich.md +8 -8
  346. package/dist/agentic/guides/modules/staff/domain-commands.md +2 -0
  347. package/dist/agentic/guides/modules/staff/encryption.md +1 -0
  348. package/dist/agentic/guides/modules/staff/entities.md +3 -0
  349. package/dist/agentic/guides/modules/staff/events.md +75 -70
  350. package/dist/agentic/guides/modules/staff/exact-override-targets.md +99 -12
  351. package/dist/agentic/guides/modules/staff/frontend-pages.md +3 -0
  352. package/dist/agentic/guides/modules/staff/index.md +26 -13
  353. package/dist/agentic/guides/modules/staff/notifications.md +4 -0
  354. package/dist/agentic/guides/modules/staff/owned-contract-module-metadata.md +1 -1
  355. package/dist/agentic/guides/modules/staff/setup.md +1 -1
  356. package/dist/agentic/guides/modules/staff/umes-contributions.md +24 -1
  357. package/dist/agentic/guides/modules/staff/umes-hosts.md +9 -0
  358. package/dist/agentic/guides/modules/storage_s3/di-registrations-rich.md +3 -3
  359. package/dist/agentic/guides/modules/storage_s3/di-service-tokens.md +1 -1
  360. package/dist/agentic/guides/modules/storage_s3/exact-override-targets.md +3 -3
  361. package/dist/agentic/guides/modules/storage_s3/index.md +1 -1
  362. package/dist/agentic/guides/modules/sync_akeneo/index.md +1 -1
  363. package/dist/agentic/guides/modules/sync_excel/index.md +1 -1
  364. package/dist/agentic/guides/modules/sync_excel/owned-contract-module-metadata.md +1 -1
  365. package/dist/agentic/guides/modules/system_status_overlays/index.md +1 -1
  366. package/dist/agentic/guides/modules/telemetry/index.md +1 -1
  367. package/dist/agentic/guides/modules/tillio/index.md +1 -1
  368. package/dist/agentic/guides/modules/translations/active-extension-bindings.md +1 -1
  369. package/dist/agentic/guides/modules/translations/events.md +2 -2
  370. package/dist/agentic/guides/modules/translations/index.md +1 -1
  371. package/dist/agentic/guides/modules/warranty_claims/contribution-resolutions.md +2 -2
  372. package/dist/agentic/guides/modules/warranty_claims/events.md +14 -14
  373. package/dist/agentic/guides/modules/warranty_claims/exact-override-targets.md +5 -4
  374. package/dist/agentic/guides/modules/warranty_claims/index.md +2 -2
  375. package/dist/agentic/guides/modules/warranty_claims/setup.md +1 -1
  376. package/dist/agentic/guides/modules/warranty_claims/umes-contributions.md +2 -2
  377. package/dist/agentic/guides/modules/warranty_claims/workers.md +1 -1
  378. package/dist/agentic/guides/modules/webhooks/events.md +12 -12
  379. package/dist/agentic/guides/modules/webhooks/exact-override-targets.md +2 -2
  380. package/dist/agentic/guides/modules/webhooks/index.md +1 -1
  381. package/dist/agentic/guides/modules/webhooks/workers.md +2 -2
  382. package/dist/agentic/guides/modules/wms/acl-features.md +3 -1
  383. package/dist/agentic/guides/modules/wms/backend-pages.md +4 -0
  384. package/dist/agentic/guides/modules/wms/contribution-resolutions.md +7 -1
  385. package/dist/agentic/guides/modules/wms/custom-entities.md +3 -0
  386. package/dist/agentic/guides/modules/wms/domain-commands.md +16 -0
  387. package/dist/agentic/guides/modules/wms/entities.md +3 -0
  388. package/dist/agentic/guides/modules/wms/events.md +40 -28
  389. package/dist/agentic/guides/modules/wms/exact-override-targets.md +10 -0
  390. package/dist/agentic/guides/modules/wms/host-extension-points.md +1 -1
  391. package/dist/agentic/guides/modules/wms/index.md +14 -10
  392. package/dist/agentic/guides/modules/wms/owned-contract-module-metadata.md +1 -1
  393. package/dist/agentic/guides/modules/wms/search-entities.md +2 -0
  394. package/dist/agentic/guides/modules/wms/umes-contributions.md +7 -1
  395. package/dist/agentic/guides/modules/wms/umes-diagnostics.md +2 -0
  396. package/dist/agentic/guides/modules/wms/umes-hosts.md +54 -0
  397. package/dist/agentic/guides/modules/workflows/contribution-resolutions.md +3 -3
  398. package/dist/agentic/guides/modules/workflows/events.md +32 -32
  399. package/dist/agentic/guides/modules/workflows/exact-override-targets.md +2 -1
  400. package/dist/agentic/guides/modules/workflows/index.md +1 -1
  401. package/dist/agentic/guides/modules/workflows/owned-contract-module-metadata.md +1 -1
  402. package/dist/agentic/guides/modules/workflows/setup.md +1 -1
  403. package/dist/agentic/guides/modules/workflows/umes-contributions.md +3 -3
  404. package/dist/agentic/guides/production-deployment.md +82 -0
  405. package/dist/agentic/guides/reference-module-facts.json +819 -33
  406. package/dist/agentic/guides/reference-modules/example/active-extension-bindings.md +2 -0
  407. package/dist/agentic/guides/reference-modules/example/contribution-resolutions.md +15 -4
  408. package/dist/agentic/guides/reference-modules/example/di-registrations-rich.md +3 -2
  409. package/dist/agentic/guides/reference-modules/example/di-service-tokens.md +1 -1
  410. package/dist/agentic/guides/reference-modules/example/events.md +5 -5
  411. package/dist/agentic/guides/reference-modules/example/exact-override-targets.md +21 -11
  412. package/dist/agentic/guides/reference-modules/example/index.md +4 -4
  413. package/dist/agentic/guides/reference-modules/example/setup.md +1 -1
  414. package/dist/agentic/guides/reference-modules/example/umes-contributions.md +16 -5
  415. package/dist/agentic/guides/reference-modules/example/umes-hosts.md +1 -0
  416. package/dist/agentic/guides/template-tool.md +38 -0
  417. package/dist/agentic/guides/testing-debugging.md +2 -2
  418. package/dist/agentic/guides/upstream/AGENTS.md +3 -3
  419. package/dist/agentic/guides/upstream/BACKWARD_COMPATIBILITY.md +343 -206
  420. package/dist/agentic/guides/upstream/manifest.json +3 -3
  421. package/dist/agentic/shared/AGENTS.md.template +16 -10
  422. package/dist/agentic/shared/ai/harness/README.md +10 -2
  423. package/dist/agentic/shared/ai/harness/RELEASE.md +4 -4
  424. package/dist/agentic/shared/ai/harness/cases.json +639 -44
  425. package/dist/agentic/shared/ai/harness/cases.schema.json +4 -4
  426. package/dist/agentic/shared/ai/harness/design-system-inventory.json +63 -3
  427. package/dist/agentic/shared/ai/harness/source-link-inventory.json +516 -8
  428. package/dist/agentic/shared/ai/harness/validators.json +1 -1
  429. package/dist/agentic/shared/ai/qa/tests/playwright.config.ts +1 -0
  430. package/dist/agentic/shared/ai/skills/om-auto-upgrade-0.9.0-to-0.10.0/SKILL.md +269 -0
  431. package/dist/agentic/shared/ai/skills/om-create-ai-agent/SKILL.md +6 -5
  432. package/dist/agentic/shared/ai/skills/om-create-ai-agent/references/surface-selector.md +27 -0
  433. package/dist/agentic/shared/ai/skills/om-data-model-design/references/integrity-and-concurrency.md +1 -1
  434. package/dist/agentic/shared/ai/skills/om-data-model-design/references/sensitive-data.md +13 -1
  435. package/dist/agentic/shared/ai/skills/om-find-module/SKILL.md +52 -0
  436. package/dist/agentic/shared/ai/skills/om-help/references/task-families.md +1 -0
  437. package/dist/agentic/shared/ai/skills/om-implement-spec/SKILL.md +1 -0
  438. package/dist/agentic/shared/ai/skills/om-integration-builder/references/provider-families.md +1 -1
  439. package/dist/agentic/shared/ai/skills/om-module-scaffold/SKILL.md +2 -0
  440. package/dist/agentic/shared/ai/skills/om-module-scaffold/references/api-and-domain.md +7 -5
  441. package/dist/agentic/shared/ai/skills/om-setup-ci/SKILL.md +42 -0
  442. package/dist/agentic/shared/ai/skills/om-setup-ci/scripts/setup-ci.mjs +525 -0
  443. package/dist/agentic/shared/ai/skills/om-setup-ci/scripts/verify-semgrep-rules.mjs +54 -0
  444. package/dist/agentic/shared/ai/skills/om-setup-ci/templates/docs/README.md +463 -0
  445. package/dist/agentic/shared/ai/skills/om-setup-ci/templates/github/actions/gitleaks/action.yml +25 -0
  446. package/dist/agentic/shared/ai/skills/om-setup-ci/templates/github/actions/playwright/action.yml +31 -0
  447. package/dist/agentic/shared/ai/skills/om-setup-ci/templates/github/actions/setup/action.yml +55 -0
  448. package/dist/agentic/shared/ai/skills/om-setup-ci/templates/github/dependabot.yml +27 -0
  449. package/dist/agentic/shared/ai/skills/om-setup-ci/templates/github/workflows/audit.yml +193 -0
  450. package/dist/agentic/shared/ai/skills/om-setup-ci/templates/github/workflows/ci.yml +477 -0
  451. package/dist/agentic/shared/ai/skills/om-setup-ci/templates/github/workflows/codeql.yml +63 -0
  452. package/dist/agentic/shared/ai/skills/om-setup-ci/templates/github/workflows/security.yml +254 -0
  453. package/dist/agentic/shared/ai/skills/om-setup-ci/templates/scripts/ci/audit-ci-allowlist.json +4 -0
  454. package/dist/agentic/shared/ai/skills/om-setup-ci/templates/scripts/ci/audit-ci.mjs +283 -0
  455. package/dist/agentic/shared/ai/skills/om-setup-ci/templates/scripts/ci/semgrep/open-mercato.fixture.txt +89 -0
  456. package/dist/agentic/shared/ai/skills/om-setup-ci/templates/scripts/ci/semgrep/open-mercato.yml +146 -0
  457. package/dist/agentic/shared/ai/skills/om-setup-ci/templates/scripts/ci/time-bomb-scanner.mjs +286 -0
  458. package/dist/agentic/shared/ai/skills/om-setup-ci/templates/scripts/ci/zap-rules.tsv +11 -0
  459. package/dist/agentic/shared/ai/skills/om-system-extension/references/unified-overrides.md +1 -1
  460. package/dist/agentic/shared/ai/skills/tiers.json +5 -2
  461. package/dist/agentic/shared/ai/trackers/github.md +314 -44
  462. package/dist/agentic/shared/scripts/evaluate-agent-harness.mjs +78 -9
  463. package/dist/agentic/shared/scripts/execution-sandbox.mjs +9 -7
  464. package/dist/agentic/shared/scripts/run-agent-harness-release.mjs +3 -3
  465. package/dist/bin.js +2 -0
  466. package/dist/bin.js.map +2 -2
  467. package/dist/i18n/de.json +4 -0
  468. package/dist/i18n/en.json +4 -0
  469. package/dist/i18n/es.json +4 -0
  470. package/dist/i18n/ko.json +4 -0
  471. package/dist/i18n/pl.json +4 -0
  472. package/dist/lib/__fixtures__/module-search/built-in.json +235 -0
  473. package/dist/lib/__fixtures__/module-search/catalog-parity.json +4076 -0
  474. package/dist/lib/__fixtures__/module-search/modules-index.json +1980 -0
  475. package/dist/lib/__fixtures__/official-module-package/package.json +33 -0
  476. package/dist/lib/__integration__/TC-INT-007.spec.js +241 -21
  477. package/dist/lib/__integration__/TC-INT-007.spec.js.map +2 -2
  478. package/dist/lib/__integration__/TC-INT-009.spec.js +267 -0
  479. package/dist/lib/__integration__/TC-INT-009.spec.js.map +7 -0
  480. package/dist/lib/db/commands.js +2 -0
  481. package/dist/lib/db/commands.js.map +2 -2
  482. package/dist/lib/db/numeric-snapshots.js +13 -0
  483. package/dist/lib/db/numeric-snapshots.js.map +7 -0
  484. package/dist/lib/eject.js +25 -9
  485. package/dist/lib/eject.js.map +2 -2
  486. package/dist/lib/env-example.js +25 -0
  487. package/dist/lib/env-example.js.map +7 -0
  488. package/dist/lib/generate-child-process.js +23 -0
  489. package/dist/lib/generate-child-process.js.map +7 -0
  490. package/dist/lib/generators/ast/imports.js +9 -4
  491. package/dist/lib/generators/ast/imports.js.map +2 -2
  492. package/dist/lib/generators/entity-ids.js +12 -12
  493. package/dist/lib/generators/entity-ids.js.map +2 -2
  494. package/dist/lib/generators/extensions/agent-files.js +119 -4
  495. package/dist/lib/generators/extensions/agent-files.js.map +2 -2
  496. package/dist/lib/generators/module-di.js +8 -9
  497. package/dist/lib/generators/module-di.js.map +2 -2
  498. package/dist/lib/generators/module-entities.js +8 -9
  499. package/dist/lib/generators/module-entities.js.map +2 -2
  500. package/dist/lib/generators/module-facts.js +7 -5
  501. package/dist/lib/generators/module-facts.js.map +2 -2
  502. package/dist/lib/generators/module-override-targets.js +6 -1
  503. package/dist/lib/generators/module-override-targets.js.map +2 -2
  504. package/dist/lib/generators/module-package-sources.js +6 -4
  505. package/dist/lib/generators/module-package-sources.js.map +2 -2
  506. package/dist/lib/generators/module-registry.js +157 -144
  507. package/dist/lib/generators/module-registry.js.map +2 -2
  508. package/dist/lib/generators/openapi.js +9 -2
  509. package/dist/lib/generators/openapi.js.map +2 -2
  510. package/dist/lib/generators/source-exports.js +73 -0
  511. package/dist/lib/generators/source-exports.js.map +7 -0
  512. package/dist/lib/in-process-generate-watcher.js +11 -5
  513. package/dist/lib/in-process-generate-watcher.js.map +2 -2
  514. package/dist/lib/init-existing-database.js +26 -0
  515. package/dist/lib/init-existing-database.js.map +7 -0
  516. package/dist/lib/init-secrets.js +33 -1
  517. package/dist/lib/init-secrets.js.map +2 -2
  518. package/dist/lib/init-summary.js +44 -0
  519. package/dist/lib/init-summary.js.map +7 -0
  520. package/dist/lib/module-github.js +98 -0
  521. package/dist/lib/module-github.js.map +7 -0
  522. package/dist/lib/module-identity.js +131 -0
  523. package/dist/lib/module-identity.js.map +7 -0
  524. package/dist/lib/module-inspection.js +124 -0
  525. package/dist/lib/module-inspection.js.map +7 -0
  526. package/dist/lib/module-install.js +186 -19
  527. package/dist/lib/module-install.js.map +3 -3
  528. package/dist/lib/module-package.js +205 -15
  529. package/dist/lib/module-package.js.map +2 -2
  530. package/dist/lib/module-search-args.js +97 -0
  531. package/dist/lib/module-search-args.js.map +7 -0
  532. package/dist/lib/module-search-index.js +681 -0
  533. package/dist/lib/module-search-index.js.map +7 -0
  534. package/dist/lib/module-search.js +727 -0
  535. package/dist/lib/module-search.js.map +7 -0
  536. package/dist/lib/modules-config.js +210 -66
  537. package/dist/lib/modules-config.js.map +2 -2
  538. package/dist/lib/queue-worker-supervisor.js +3 -0
  539. package/dist/lib/queue-worker-supervisor.js.map +2 -2
  540. package/dist/lib/resolver.js +54 -35
  541. package/dist/lib/resolver.js.map +2 -2
  542. package/dist/lib/telemetry-init.js +1 -1
  543. package/dist/lib/telemetry-init.js.map +1 -1
  544. package/dist/lib/testing/integration-discovery.js +61 -21
  545. package/dist/lib/testing/integration-discovery.js.map +2 -2
  546. package/dist/lib/testing/integration.js +35 -4
  547. package/dist/lib/testing/integration.js.map +2 -2
  548. package/dist/mercato.js +209 -79
  549. package/dist/mercato.js.map +2 -2
  550. package/jest.config.cjs +1 -1
  551. package/package.json +9 -9
  552. package/src/__tests__/documented-queue-subcommands.test.ts +63 -0
  553. package/src/__tests__/mercato.test.ts +905 -0
  554. package/src/bin.ts +5 -0
  555. package/src/i18n/de.json +4 -0
  556. package/src/i18n/en.json +4 -0
  557. package/src/i18n/es.json +4 -0
  558. package/src/i18n/ko.json +4 -0
  559. package/src/i18n/pl.json +4 -0
  560. package/src/lib/__fixtures__/module-search/README.md +97 -0
  561. package/src/lib/__fixtures__/module-search/built-in.json +235 -0
  562. package/src/lib/__fixtures__/module-search/catalog-parity.json +4076 -0
  563. package/src/lib/__fixtures__/module-search/modules-index.json +1980 -0
  564. package/src/lib/__fixtures__/official-module-package/dist/modules/test_package/widgets/injection/test/widget.js +1 -0
  565. package/src/lib/__integration__/TC-INT-007.spec.ts +259 -21
  566. package/src/lib/__integration__/TC-INT-009.spec.ts +279 -0
  567. package/src/lib/__tests__/agentic-setup.ownership.test.ts +4 -0
  568. package/src/lib/__tests__/bin-next-subpath-hook.test.ts +25 -0
  569. package/src/lib/__tests__/eject.test.ts +98 -4
  570. package/src/lib/__tests__/env-example.test.ts +58 -0
  571. package/src/lib/__tests__/generate-child-process.test.ts +185 -0
  572. package/src/lib/__tests__/generate-quiet-entrypoint.test.ts +47 -0
  573. package/src/lib/__tests__/in-process-generate-watcher.test.ts +91 -0
  574. package/src/lib/__tests__/init-existing-database.test.ts +27 -0
  575. package/src/lib/__tests__/init-secrets.test.ts +85 -1
  576. package/src/lib/__tests__/init-summary.test.ts +50 -0
  577. package/src/lib/__tests__/module-github.test.ts +108 -0
  578. package/src/lib/__tests__/module-identity.test.ts +144 -0
  579. package/src/lib/__tests__/module-inspection.test.ts +195 -0
  580. package/src/lib/__tests__/module-install.test.ts +614 -19
  581. package/src/lib/__tests__/module-package.test.ts +154 -0
  582. package/src/lib/__tests__/module-search.test.ts +1040 -0
  583. package/src/lib/__tests__/modules-config.test.ts +453 -1
  584. package/src/lib/__tests__/queue-worker-supervisor.test.ts +145 -1
  585. package/src/lib/__tests__/resolver.enterprise.test.ts +60 -0
  586. package/src/lib/__tests__/resolver.packages.test.ts +29 -0
  587. package/src/lib/__tests__/telemetry-init.test.ts +1 -1
  588. package/src/lib/db/__tests__/identifiers.test.ts +19 -0
  589. package/src/lib/db/__tests__/numeric-snapshots.test.ts +79 -0
  590. package/src/lib/db/commands.ts +2 -0
  591. package/src/lib/db/numeric-snapshots.ts +12 -0
  592. package/src/lib/eject.ts +28 -10
  593. package/src/lib/env-example.ts +31 -0
  594. package/src/lib/generate-child-process.ts +35 -0
  595. package/src/lib/generators/__tests__/agent-files-extension.test.ts +178 -0
  596. package/src/lib/generators/__tests__/attachment-access.test.ts +70 -0
  597. package/src/lib/generators/__tests__/module-extension-activations.test.ts +42 -18
  598. package/src/lib/generators/__tests__/module-facts.bc-guard.test.ts +9 -8
  599. package/src/lib/generators/__tests__/module-facts.owned-contracts.test.ts +5 -1
  600. package/src/lib/generators/__tests__/module-id-collisions.test.ts +146 -0
  601. package/src/lib/generators/__tests__/module-override-targets.test.ts +8 -2
  602. package/src/lib/generators/__tests__/module-package-sources.test.ts +26 -6
  603. package/src/lib/generators/__tests__/module-registry-requires-enforcement.test.ts +130 -0
  604. package/src/lib/generators/__tests__/module-requirements.test.ts +56 -0
  605. package/src/lib/generators/__tests__/module-requires.test.ts +242 -0
  606. package/src/lib/generators/__tests__/module-subset.test.ts +103 -0
  607. package/src/lib/generators/__tests__/openapi.test.ts +24 -0
  608. package/src/lib/generators/ast/imports.ts +14 -4
  609. package/src/lib/generators/entity-ids.ts +12 -12
  610. package/src/lib/generators/extensions/agent-files.ts +154 -4
  611. package/src/lib/generators/module-di.ts +8 -9
  612. package/src/lib/generators/module-entities.ts +8 -9
  613. package/src/lib/generators/module-facts.ts +9 -5
  614. package/src/lib/generators/module-override-targets.ts +6 -1
  615. package/src/lib/generators/module-package-sources.ts +7 -5
  616. package/src/lib/generators/module-registry.ts +224 -182
  617. package/src/lib/generators/openapi.ts +10 -2
  618. package/src/lib/generators/source-exports.ts +93 -0
  619. package/src/lib/in-process-generate-watcher.ts +14 -6
  620. package/src/lib/init-existing-database.ts +24 -0
  621. package/src/lib/init-secrets.ts +37 -0
  622. package/src/lib/init-summary.ts +54 -0
  623. package/src/lib/module-github.ts +109 -0
  624. package/src/lib/module-identity.ts +145 -0
  625. package/src/lib/module-inspection.ts +133 -0
  626. package/src/lib/module-install.ts +214 -22
  627. package/src/lib/module-package.ts +243 -16
  628. package/src/lib/module-search-args.ts +116 -0
  629. package/src/lib/module-search-index.ts +1037 -0
  630. package/src/lib/module-search.ts +1013 -0
  631. package/src/lib/modules-config.ts +278 -80
  632. package/src/lib/queue-worker-supervisor.ts +3 -0
  633. package/src/lib/resolver.ts +58 -40
  634. package/src/lib/telemetry-init.ts +1 -1
  635. package/src/lib/testing/__tests__/integration-discovery.test.ts +89 -0
  636. package/src/lib/testing/__tests__/integration.test.ts +55 -0
  637. package/src/lib/testing/integration-discovery.ts +101 -32
  638. package/src/lib/testing/integration.ts +36 -4
  639. package/src/mercato.ts +267 -94
  640. package/src/types/cross-spawn.d.ts +2 -2
  641. package/src/lib/__tests__/agentic-build-artifacts.test.ts +0 -28
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+ // Verifies the Open Mercato Semgrep rules against their annotated fixture.
3
+ //
4
+ // Usage (needs Docker):
5
+ // node .ai/skills/om-setup-ci/scripts/verify-semgrep-rules.mjs
6
+ //
7
+ // templates/scripts/ci/semgrep/open-mercato.fixture.txt is deliberately
8
+ // vulnerable TSX. It is stored with a .txt extension so the app's TypeScript
9
+ // and ESLint never pick it up; this script copies it to a temporary .tsx file,
10
+ // runs the pinned Semgrep image over it, and checks that every
11
+ // `// ruleid: <id>` line produces exactly that finding and every
12
+ // `// ok: <id>` line produces none. Run it after changing any rule.
13
+ // (`semgrep --test` would be the natural tool, but its rule-id matching is
14
+ // broken for this layout in the pinned release.)
15
+
16
+ import { execFileSync } from 'node:child_process'
17
+ import { copyFileSync, mkdtempSync, readFileSync, rmSync } from 'node:fs'
18
+ import os from 'node:os'
19
+ import path from 'node:path'
20
+ import { fileURLToPath } from 'node:url'
21
+ import { TOOLS } from './setup-ci.mjs'
22
+
23
+ const semgrepDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', 'templates', 'scripts', 'ci', 'semgrep')
24
+ const workDir = mkdtempSync(path.join(os.tmpdir(), 'om-semgrep-rules-'))
25
+
26
+ try {
27
+ copyFileSync(path.join(semgrepDir, 'open-mercato.yml'), path.join(workDir, 'rules.yml'))
28
+ copyFileSync(path.join(semgrepDir, 'open-mercato.fixture.txt'), path.join(workDir, 'fixture.tsx'))
29
+ const output = execFileSync('docker', [
30
+ 'run', '--rm', '-v', `${workDir}:/src`, '-w', '/src', TOOLS.SEMGREP_IMAGE,
31
+ 'semgrep', 'scan', '--metrics=off', '--quiet', '--json', '--config', 'rules.yml', 'fixture.tsx',
32
+ ], { encoding: 'utf8', maxBuffer: 64 * 1024 * 1024 })
33
+ const result = JSON.parse(output)
34
+ const found = new Set(result.results.map((finding) => `${finding.start.line} ${finding.check_id.split('.').pop()}`))
35
+ const problems = []
36
+ readFileSync(path.join(workDir, 'fixture.tsx'), 'utf8').split('\n').forEach((line, index) => {
37
+ const annotation = line.match(/\b(ruleid|ok): (om-[a-z-]+)/)
38
+ if (!annotation) return
39
+ const key = `${index + 2} ${annotation[2]}`
40
+ const expected = annotation[1] === 'ruleid'
41
+ if (expected !== found.has(key)) problems.push(`${expected ? 'missed' : 'false positive'}: ${annotation[2]} at fixture line ${index + 2}`)
42
+ found.delete(key)
43
+ })
44
+ for (const extra of found) problems.push(`unannotated finding: ${extra}`)
45
+ for (const error of result.errors) problems.push(`semgrep error: ${error.message}`)
46
+ if (problems.length > 0) {
47
+ console.error(problems.join('\n'))
48
+ process.exitCode = 1
49
+ } else {
50
+ console.log(`verify-semgrep-rules: all annotations match (${result.results.length} expected findings).`)
51
+ }
52
+ } finally {
53
+ rmSync(workDir, { recursive: true, force: true })
54
+ }
@@ -0,0 +1,463 @@
1
+ # Continuous Integration
2
+
3
+ This repository's CI was generated by the Open Mercato `om-setup-ci` skill. It
4
+ carries over the checks and conventions the Open Mercato framework uses in its
5
+ own CI, trimmed to what applies to an app created with `create-mercato-app`,
6
+ and adds a layered set of security scans.
7
+
8
+ Every pull request to __OM_BRANCHES_INLINE__, and every push to those branches,
9
+ runs the pipeline in `.github/workflows/ci.yml`. A pull request is ready to
10
+ merge when the single **`CI`** check is green.
11
+
12
+ ## Contents
13
+
14
+ - [What runs, and why](#what-runs-and-why)
15
+ - [Security coverage](#security-coverage)
16
+ - [Status in this repository](#status-in-this-repository)
17
+ - [Running the checks locally](#running-the-checks-locally)
18
+ - [Branch protection and repository settings](#branch-protection-and-repository-settings)
19
+ - [When a check fails](#when-a-check-fails)
20
+ - [Handling false positives](#handling-false-positives)
21
+ - [Customizing the pipeline](#customizing-the-pipeline)
22
+ - [Files in this setup](#files-in-this-setup)
23
+ - [Regenerating and upgrading](#regenerating-and-upgrading)
24
+
25
+ ## What runs, and why
26
+
27
+ The pipeline is a set of GitHub Actions jobs. Independent jobs run in parallel,
28
+ and the `CI` job at the end collects their results.
29
+
30
+ ```text
31
+ push / PR ─► changes ─┬─► audit (dependencies changed)
32
+ ├─► secrets
33
+ ├─► sast
34
+ ├─► workflow-lint (.github changed, or a push)
35
+ └─► docker + Trivy (image inputs changed, or a push)
36
+ lint ──────────┐
37
+ validate ──────┼─► integration
38
+ ▼
39
+ CI ◄── the one required check
40
+ ```
41
+
42
+ ### `changes`: detect what the change touches
43
+
44
+ Compares the change with its base: for a pull request, the commit it branches
45
+ from; for a push, the previous commit on the branch. Two things depend on it:
46
+
47
+ - **Which conditional jobs run.** Skipping the audit, Docker build and workflow
48
+ scan when nothing relevant changed keeps pull requests fast. The nightly
49
+ workflows and post-merge pushes still cover them.
50
+ - **The baseline.** The audit, secret scan and SAST block only problems the
51
+ change **introduces**, so a pull request is never red for something that was
52
+ already on the base branch. The nightly scans own existing problems and keep
53
+ a tracking issue open until they are fixed.
54
+
55
+ ### `audit`: dependency vulnerabilities (SCA)
56
+
57
+ - **What:** `node scripts/ci/audit-ci.mjs --severity __OM_AUDIT_SEVERITY__ --baseline <base yarn.lock>`
58
+ checks every package resolved in `yarn.lock` against the npm advisory
59
+ database.
60
+ - **Why:** a dependency with a known vulnerability is the cheapest security
61
+ problem to catch and the most expensive to find in production.
62
+ - **Fails on:** advisories at severity `__OM_AUDIT_SEVERITY__` or higher that the
63
+ change introduces. If the advisory database can't be reached, the job fails
64
+ instead of passing silently.
65
+ - **Why not `yarn npm audit`:** the npm bulk-advisory endpoint currently returns
66
+ a gzip body without a `Content-Encoding` header, which makes Yarn 4 crash
67
+ before it evaluates anything. The script runs the same check and decompresses
68
+ the response defensively.
69
+
70
+ ### `secrets`: secret scan (Gitleaks)
71
+
72
+ - **What:** Gitleaks scans **every commit** the change adds, not only the final
73
+ files.
74
+ - **Why:** a key committed and removed in a later commit is still in the Git
75
+ history, and anyone with read access can recover it. Leaked credentials are
76
+ the most common real-world compromise of application repositories.
77
+ - **How it is installed:** a pinned release whose SHA-256 checksum is verified
78
+ before the binary is unpacked (`.github/actions/gitleaks`).
79
+
80
+ ### `sast`: static analysis (Semgrep)
81
+
82
+ - **What:** Semgrep over the app code in `src/`, test files excluded, with two
83
+ rule sets:
84
+ - **Open Mercato rules** (`scripts/ci/semgrep/open-mercato.yml`), every
85
+ severity: runtime code execution (`eval`, `new Function`), shell commands
86
+ built from variables, raw SQL with interpolated values, `dangerouslySetInnerHTML`
87
+ with non-constant HTML, open redirects from request parameters, and cookies
88
+ with `httpOnly: false`.
89
+ - **Semgrep registry `p/default`**, ERROR severity only.
90
+ - **Why custom rules:** Semgrep's free rulesets barely cover Next.js route
91
+ handlers and server actions. On a deliberately vulnerable route they missed
92
+ `exec()` with user input and `dangerouslySetInnerHTML`. The Open Mercato
93
+ rules target exactly those patterns and allow the framework's safe idioms:
94
+ constants, `?` placeholder lists, and `{ sql, params }` clause builders.
95
+ - **Fails on:** findings the change introduces.
96
+
97
+ ### `workflow-lint`: workflow security (zizmor)
98
+
99
+ - **What:** zizmor audits the files in `.github/`: expression injection,
100
+ over-broad token permissions, credentials left in checkouts, cache poisoning,
101
+ unpinned actions, Dependabot cooldowns.
102
+ - **Why:** CI workflows run with access to your code and secrets. A workflow
103
+ that interpolates a pull request title into a shell script can be taken over
104
+ by anyone who can open a pull request.
105
+ - **When:** pull requests that touch `.github/`, and every push.
106
+
107
+ ### `lint`: code quality
108
+
109
+ - **What:** `yarn lint` (ESLint with the Next.js core-web-vitals rules).
110
+ - **Why:** catches bugs such as hook misuse, unused code and accessibility
111
+ problems before review. It doesn't need generated files, so it runs in
112
+ parallel and fails fast.
113
+
114
+ ### `validate`: the build gate
115
+
116
+ Runs the steps of the validation gate that coding agents use before opening a
117
+ pull request (`.ai/agentic.config.json` → `validation.commands`), in the same
118
+ order:
119
+
120
+ | Step | Command | Why |
121
+ | --- | --- | --- |
122
+ | Generate | `yarn generate` | Rebuilds every registry in `.mercato/generated/` from `src/modules.ts` and the installed packages. This proves the app builds from committed sources alone. |
123
+ | Clean-tree check | `git status --porcelain` | Generated output is never edited by hand. If `yarn generate` changes a tracked file, the committed copy is stale. |
124
+ | Typecheck | `yarn typecheck` | `tsc --noEmit` over the whole app, including the generated registries. |
125
+ | Design-system check | `yarn ds:check` | Blocks hard-coded palette colours (`text-red-500`), arbitrary Tailwind values (`p-[13px]`) and manual `dark:` overrides, so the UI stays consistent with Open Mercato's tokens and dark mode. |
126
+ | Time-bomb tests | `node scripts/ci/time-bomb-scanner.mjs --fail src .ai/qa/tests` | Finds tests that assert a hard-coded future date as "still valid". They pass today and fail on an unrelated pull request once the date passes. |
127
+ | Unit tests | `__OM_TEST_COMMAND__` | Jest unit tests under `src/`. A fresh app has none, and the run passes until you add some. |
128
+ | Production build | `yarn build` | `next build` in production mode. It catches server/client boundary errors, missing environment handling and anything else that only fails in a real build. |
129
+
130
+ Dependencies are installed with `yarn install --immutable`. If `package.json`
131
+ and `yarn.lock` disagree, the install fails, so a dependency change that was
132
+ never installed locally can't reach the main branch.
133
+
134
+ ### `integration`: end-to-end tests
135
+
136
+ - **What:** `yarn test:integration:ephemeral` builds the app, starts it against a
137
+ throwaway PostgreSQL container (testcontainers, using the Docker daemon on
138
+ GitHub-hosted runners), runs the Playwright suites, and tears everything
139
+ down.
140
+ - **Which tests:** specs in `src/modules/<module>/__integration__/*.spec.ts`
141
+ and `.ai/qa/tests/**/*.spec.ts`. If there are none, the job reports
142
+ "skipping" and passes.
143
+ - **Why:** unit tests can't show that an API route, a CRUD form or an
144
+ access-control rule works in the running app. Each run starts from an empty
145
+ database, so the tests have to create their own fixtures. That keeps them
146
+ stable and independent of demo data.
147
+ - **When it fails:** the Playwright report, traces and screenshots are uploaded
148
+ as the `integration-test-results` artifact on the run page.
149
+
150
+ ### `docker`: production image and Trivy scan
151
+
152
+ - **What:** builds the image from `Dockerfile` without pushing it (layers cached
153
+ in the GitHub Actions cache), then scans its **OS packages** with Trivy.
154
+ - **Why:** a broken `Dockerfile` otherwise only shows up at deploy time, and the
155
+ npm audit can't see vulnerabilities in the base image's Alpine packages.
156
+ - **Fails on:** HIGH or CRITICAL vulnerabilities that have a fix available.
157
+ Unfixed ones are left to the nightly scan, since there is nothing to upgrade
158
+ to yet.
159
+ - **When:** on every push, and on pull requests that touch `Dockerfile`,
160
+ `.dockerignore`, `.trivyignore`, `docker/`, `package.json`, `yarn.lock`,
161
+ `.yarnrc.yml` or `next.config.*`.
162
+
163
+ ### `CI`: the aggregate verdict
164
+
165
+ Waits for all jobs and fails if any of them failed or was cancelled. A skipped
166
+ job counts as passed. Mark only this check as required, so you never have to
167
+ edit branch protection when a job is added or renamed.
168
+
169
+ ### Nightly dependency audit: `.github/workflows/audit.yml`
170
+
171
+ Runs every day (`__OM_AUDIT_CRON__`, UTC) on each protected branch, and on
172
+ demand from the Actions tab. It audits **without** a baseline, so it catches
173
+ advisories published after a dependency was merged. It keeps one issue per
174
+ branch open (labels `security`, `dependencies`) while advisories exist, and
175
+ closes it on the first clean run.
176
+
177
+ ### Nightly security scan: `.github/workflows/security.yml`
178
+
179
+ Runs every day (`__OM_SECURITY_CRON__`, UTC) on `__OM_DEFAULT_BRANCH__`, and on
180
+ demand. It runs the full versions of the pull-request scans:
181
+
182
+ | Job | Scope |
183
+ | --- | --- |
184
+ | Secret scan | The **entire** Git history. |
185
+ | Static analysis | All of `src/` with the Open Mercato rules, not just new findings. |
186
+ | Image scan | OS **and** npm packages in the production image, including vulnerabilities with no fix yet. The base image's own global npm toolchain is skipped: only a newer Node base image can fix it. |
187
+ | Dynamic scan (opt-in, `--with-dast`) | An OWASP ZAP baseline scan of the running app (next section). |
188
+
189
+ Any failure opens or refreshes one issue labelled `security`, and the first
190
+ clean run closes it.
191
+
192
+ ### Dynamic scan (DAST): OWASP ZAP, opt-in
193
+
194
+ - **What:** boots the app the same way as the integration tests (ephemeral
195
+ database) and runs a passive ZAP baseline scan against it. It checks security
196
+ headers, cookie flags, information leaks and error disclosure.
197
+ - **What decides failure:** `scripts/ci/zap-rules.tsv`. Out of the box,
198
+ missing anti-clickjacking and `X-Content-Type-Options` headers and
199
+ application error disclosure fail the job; everything else is reported. The
200
+ HTML and JSON reports are uploaded as the `zap-report` artifact.
201
+ - **Limits:** the scan is unauthenticated and passive. It sees public pages and
202
+ the login screen, not the backend behind it, and it does not attack the app.
203
+
204
+ ### CodeQL: opt-in (`--with-code-scanning`)
205
+
206
+ `.github/workflows/codeql.yml` runs GitHub's dataflow-aware analysis on the
207
+ app's TypeScript and on the workflows, on every pull request and weekly.
208
+ Findings appear under *Security → Code scanning*. With this option, the
209
+ Semgrep and zizmor results are uploaded there as well. CodeQL requires a
210
+ public repository or **GitHub Code Security** on a private one, which is why
211
+ it is off by default.
212
+
213
+ ### Dependabot: `.github/dependabot.yml`
214
+
215
+ Opens a weekly grouped pull request that keeps the GitHub Actions used here up
216
+ to date. It waits **14 days** after a release before proposing it, which gives
217
+ the community time to catch a compromised release. npm packages are
218
+ deliberately not bumped this way: `@open-mercato/*` packages move in lockstep
219
+ and are upgraded with the `om-auto-upgrade-*` skills. For third-party security
220
+ fixes, enable Dependabot security updates (see below).
221
+
222
+ ### Conventions applied to every job
223
+
224
+ - **Least privilege:** the workflow token is read-only (`contents: read`). Only
225
+ the jobs that need more get it, each at job level: `issues: write` for the
226
+ tracking issues, and `security-events: write` for code scanning.
227
+ - **Pinned supply chain:** every third-party action is pinned to a commit SHA
228
+ (with its version as a comment), container images to a digest, and the
229
+ Gitleaks binary to a checksum. Tags can be moved; SHAs and digests can't.
230
+ Every pinned release was at least two weeks old when it was chosen.
231
+ - **No credentials in checkouts:** every checkout uses
232
+ `persist-credentials: false`, so later steps can't read or leak the token.
233
+ - **No untrusted expressions in scripts:** event data (commit SHAs, branch
234
+ names) reaches shell and JavaScript steps through environment variables,
235
+ never through `${{ }}` interpolation, which is the classic
236
+ workflow-injection vector.
237
+ - **One run per pull request:** a new push cancels the previous run for the
238
+ same pull request. Pushes to protected branches always finish.
239
+ - **Pinned toolchain:** Node.js comes from __OM_NODE_SOURCE__, and Yarn from
240
+ `package.json#packageManager` via Corepack.
241
+ - **Shared setup:** jobs install dependencies through `.github/actions/setup`, so
242
+ a Node, cache or install fix is made in one place.
243
+ - **Timeouts:** every job has a `timeout-minutes`, so a hung process can't use
244
+ up your Actions minutes.
245
+
246
+ ## Security coverage
247
+
248
+ | Risk | On every pull request | Nightly | Tool |
249
+ | --- | --- | --- | --- |
250
+ | Vulnerable npm dependencies | New advisories | All advisories, every protected branch | `audit-ci.mjs` (npm advisory DB) |
251
+ | Leaked secrets | Commits in the change | Full history | Gitleaks |
252
+ | Injection, XSS, RCE patterns in app code | New findings | All of `src/` | Semgrep + Open Mercato rules |
253
+ | Dataflow vulnerabilities | With `--with-code-scanning` | Weekly | CodeQL |
254
+ | Insecure CI workflows | When `.github/` changes | (every push) | zizmor |
255
+ | Vulnerable base-image packages | Fixable HIGH/CRITICAL | All HIGH/CRITICAL | Trivy |
256
+ | Missing security headers, cookie flags, error leaks | — | With `--with-dast` | OWASP ZAP baseline |
257
+
258
+ **What these tools don't cover.** Automated scanners don't understand your
259
+ business rules. They won't notice that an API route forgets to check a
260
+ permission, filter by `organization_id`, or that a user can read another
261
+ tenant's records. They also don't test authenticated pages dynamically.
262
+ Code review against Open Mercato's rules (feature-based guards, tenant
263
+ scoping, `findWithDecryption` for encrypted entities) and periodic manual
264
+ penetration testing remain necessary.
265
+
266
+ ## Status in this repository
267
+
268
+ When the pipeline was generated, the generator detected the following:
269
+
270
+ __OM_CHECKS_TABLE__
271
+
272
+ A check is disabled when the script or file it runs is missing, when it is off
273
+ by default, or when it was switched off with a `--no-<check>` option. Add the
274
+ missing piece or pass `--with-<check>`, then regenerate (see
275
+ [Regenerating and upgrading](#regenerating-and-upgrading)).
276
+
277
+ ## Running the checks locally
278
+
279
+ Before you push, run the same commands CI runs, from the app root:
280
+
281
+ ```bash
282
+ yarn install --immutable
283
+ yarn generate
284
+ git status --porcelain --untracked-files=no # must print nothing
285
+ yarn typecheck
286
+ yarn lint
287
+ yarn ds:check
288
+ node scripts/ci/time-bomb-scanner.mjs --fail src .ai/qa/tests
289
+ yarn test
290
+ yarn build
291
+ yarn test:integration:ephemeral # needs Docker running
292
+ node scripts/ci/audit-ci.mjs --severity __OM_AUDIT_SEVERITY__
293
+ ```
294
+
295
+ The security scanners run in Docker, with the same pinned versions as CI:
296
+
297
+ ```bash
298
+ # Secret scan (needs the gitleaks binary: https://github.com/gitleaks/gitleaks/releases)
299
+ gitleaks git --redact .
300
+
301
+ # Static analysis
302
+ docker run --rm -v "$PWD:/src" -w /src __OM_SEMGREP_IMAGE__ \
303
+ semgrep scan --metrics=off --config scripts/ci/semgrep/open-mercato.yml \
304
+ --exclude '**/__tests__/**' --exclude '**/__integration__/**' --exclude '*.test.*' --exclude '*.spec.*' src
305
+
306
+ # Image scan (after `docker build -t app:local .`)
307
+ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock __OM_TRIVY_IMAGE__ \
308
+ image --severity HIGH,CRITICAL --ignore-unfixed app:local
309
+ ```
310
+
311
+ To run one integration suite, use
312
+ `yarn test:integration:ephemeral --filter <module-or-path>`. To keep the
313
+ ephemeral app running while you iterate on a test, use
314
+ `yarn test:integration:ephemeral:start`.
315
+
316
+ ## Branch protection and repository settings
317
+
318
+ The pipeline reports results but doesn't block merges by itself. To make the
319
+ `CI` check required on each protected branch:
320
+
321
+ 1. Open *Settings → Branches* (or *Settings → Rules → Rulesets*).
322
+ 2. Add a rule for __OM_BRANCHES_INLINE__.
323
+ 3. Enable **Require status checks to pass** and add the check named **`CI`**.
324
+ The check only appears in the list after the workflow has run once, so open
325
+ a pull request first.
326
+ 4. Recommended: also enable **Require branches to be up to date before
327
+ merging** and **Require a pull request before merging**.
328
+
329
+ To set this up with the GitHub CLI instead (admin rights required; this replaces
330
+ the branch's existing protection settings):
331
+
332
+ ```bash
333
+ gh api -X PUT repos/{owner}/{repo}/branches/<branch>/protection \
334
+ -H "Accept: application/vnd.github+json" \
335
+ -F 'required_status_checks[strict]=true' \
336
+ -f 'required_status_checks[contexts][]=CI' \
337
+ -F 'enforce_admins=false' \
338
+ -F 'required_pull_request_reviews[required_approving_review_count]=1' \
339
+ -F 'restrictions=null'
340
+ ```
341
+
342
+ Also enable these repository settings in *Settings → Code security*. They
343
+ complement CI, which can only report a problem after it has been pushed:
344
+
345
+ - **Secret scanning with push protection** blocks a push that contains a
346
+ recognised secret before it reaches the repository. Free for public
347
+ repositories; private ones need GitHub Secret Protection.
348
+ - **Dependabot alerts** and **Dependabot security updates** open pull requests
349
+ for vulnerable third-party packages.
350
+
351
+ ## When a check fails
352
+
353
+ | Failing step | What to do |
354
+ | --- | --- |
355
+ | Install dependencies | `yarn.lock` doesn't match `package.json`. Run `yarn install` locally and commit `yarn.lock`. |
356
+ | Dependency audit | Upgrade the affected package (`yarn up <pkg>`, or a `resolutions` entry for a transitive one). Only when **no patched release exists**, add the advisory to `scripts/ci/audit-ci-allowlist.json` (see [Handling false positives](#handling-false-positives)). |
357
+ | Secret scan | **Treat the secret as compromised: revoke and rotate it first**, at the provider. Removing the commit is not enough, because forks, clones and caches keep it. Then move the value to an environment variable or secret store and remove it from the code. Rewriting history is optional once the secret is revoked. |
358
+ | Static analysis | Fix the flagged code using the rule's message: an argument array instead of a shell string, bound SQL parameters, text instead of HTML. If the line is genuinely safe, suppress it with a reason. |
359
+ | Workflow security | Follow the zizmor message. Its documentation link explains each audit and the safe pattern. |
360
+ | Verify generation left tracked files untouched | Run `yarn generate` and commit the changed files. Never edit generated files by hand. |
361
+ | Typecheck / Lint / Unit tests | Reproduce with the same command locally (see above). |
362
+ | Design-system check | Replace the flagged classes with design-system tokens (for example `text-status-error-text` instead of `text-red-600`). The error message names the rule. |
363
+ | Time-bomb test literals | Compute the date relative to now (`new Date(Date.now() + 86_400_000)`), or freeze time in the test. If the literal really is safe, add it to `.ai/time-bomb-allowlist.json` with a reason. |
364
+ | Production build | Run `yarn build` locally. These failures are usually server-only code imported into a client component, or a missing environment default. |
365
+ | Integration tests | Download the `integration-test-results` artifact and open `html/index.html`. Traces open at <https://trace.playwright.dev>. |
366
+ | Docker image | Run `docker build .` locally. Check that `.dockerignore` doesn't exclude a file the build needs. |
367
+ | Image scan | Rebuild on a newer base image (`docker pull node:24-alpine`, then rebuild). Add `apk upgrade --no-cache` to the runner stage if the fix is newer than the base image. |
368
+ | Dynamic scan | Open the `zap-report` artifact. Most findings are fixed with a response header in `next.config.ts` → `headers()`, or with cookie options. |
369
+
370
+ ## Handling false positives
371
+
372
+ Every suppression mechanism expects a written reason, so it stays reviewable:
373
+
374
+ | Tool | How to suppress | Example |
375
+ | --- | --- | --- |
376
+ | Semgrep | Comment on the flagged line | `// nosemgrep: om-dangerously-set-inner-html — sanitized with DOMPurify above` |
377
+ | Gitleaks | Fingerprint in `.gitleaksignore` (printed in the job log) | `a1b2c3…:src/fixtures/sample.ts:generic-api-key:12` |
378
+ | Trivy | CVE id in `.trivyignore`, with a comment | `CVE-2026-12345 # not reachable: build-time only tool` |
379
+ | OWASP ZAP | Change the rule's action in `scripts/ci/zap-rules.tsv` | `10054 WARN (reason)` |
380
+ | Dependency audit | Entry in `scripts/ci/audit-ci-allowlist.json` | see below |
381
+
382
+ ```json
383
+ {
384
+ "version": 1,
385
+ "advisories": {
386
+ "GHSA-xxxx-xxxx-xxxx": {
387
+ "package": "some-package",
388
+ "reason": "No patched release exists; only reachable from a build-time tool that never sees user input. Re-check when upstream ships a fix.",
389
+ "addedAt": "2026-01-31"
390
+ }
391
+ }
392
+ }
393
+ ```
394
+
395
+ Use suppressions for genuine false positives and for problems with no fix yet,
396
+ never to get a red build to merge.
397
+
398
+ ## Customizing the pipeline
399
+
400
+ All generated files are ordinary files in your repository, so you can edit
401
+ them. A few changes come up often:
402
+
403
+ - **Bigger runners:** the build and typecheck use up to 8 GB of Node heap. If
404
+ the standard runner of a private repository runs out of memory, switch to a
405
+ larger runner with `--runner <label>` (for example
406
+ `ubuntu-latest-4-cores`). Larger runners are configured under
407
+ *Settings → Actions → Runners*.
408
+ - **Environment variables for the build:** add them under the `env:` key of the
409
+ `validate` job. Use repository secrets (`${{ secrets.NAME }}`) for anything
410
+ sensitive, and never commit real values.
411
+ - **Enterprise modules or feature flags:** variables that `src/modules.ts`
412
+ reads must be set at build time. Put them in the workflow-level `env:` so the
413
+ `validate` and `integration` jobs build the same app.
414
+ - **Your own Semgrep rules:** add them to `scripts/ci/semgrep/open-mercato.yml`,
415
+ or to a new file plus another `--config` line in the `sast` job.
416
+ - **Deployments:** keep them in a separate workflow that runs after `CI`
417
+ succeeds (`on: workflow_run`), or use your hosting provider's Git
418
+ integration. Don't add deploy steps to `ci.yml`.
419
+
420
+ If you edit the generated files, `--force` will overwrite your changes on the
421
+ next regeneration. Either re-apply them afterwards, or record the change as a
422
+ generator option instead. The audit allowlist and `zap-rules.tsv` are never
423
+ overwritten.
424
+
425
+ ## Files in this setup
426
+
427
+ | File | Purpose |
428
+ | --- | --- |
429
+ | `.github/workflows/ci.yml` | The pipeline described above. |
430
+ | `.github/workflows/audit.yml` | Nightly dependency audit and its tracking issue. |
431
+ | `.github/workflows/security.yml` | Nightly full security scans and their tracking issue. |
432
+ | `.github/workflows/codeql.yml` | CodeQL (only with `--with-code-scanning`). |
433
+ | `.github/actions/setup/action.yml` | Shared Node, Yarn, cache and install steps. |
434
+ | `.github/actions/gitleaks/action.yml` | Checksum-verified Gitleaks install. |
435
+ | `.github/actions/playwright/action.yml` | Cached Playwright browser install. |
436
+ | `.github/dependabot.yml` | Weekly GitHub Actions updates with a 14-day cooldown. |
437
+ | `.github/om-ci.json` | The options this pipeline was generated with, reused on regeneration. |
438
+ | `scripts/ci/audit-ci.mjs` | Dependency audit (no dependencies, fails closed). |
439
+ | `scripts/ci/audit-ci-allowlist.json` | Your justified audit exceptions. Never overwritten. |
440
+ | `scripts/ci/semgrep/open-mercato.yml` | Open Mercato Semgrep rules. |
441
+ | `scripts/ci/zap-rules.tsv` | Which ZAP alerts fail the dynamic scan. Never overwritten. |
442
+ | `scripts/ci/time-bomb-scanner.mjs` | Time-bomb test literal scanner. |
443
+ | `docs/ci/README.md` | This document. |
444
+
445
+ ## Regenerating and upgrading
446
+
447
+ The generator is part of the `om-setup-ci` skill in `.ai/skills/om-setup-ci/`.
448
+ Ask your coding agent to "set up CI", or run it directly:
449
+
450
+ ```bash
451
+ node .ai/skills/om-setup-ci/scripts/setup-ci.mjs --dry-run # show the plan
452
+ node .ai/skills/om-setup-ci/scripts/setup-ci.mjs --force # refresh to the latest templates
453
+ node .ai/skills/om-setup-ci/scripts/setup-ci.mjs --with-dast --force # enable the nightly ZAP scan
454
+ ```
455
+
456
+ Options you pass once are saved in `.github/om-ci.json` and reused on later
457
+ runs. After upgrading Open Mercato, refresh the skill with
458
+ `yarn mercato agentic:init --update-harness`, then re-run the generator with
459
+ `--force` to pick up template improvements and newer pinned tool versions.
460
+ Review the diff before you commit it. Between upgrades, Dependabot keeps the
461
+ pinned actions current. Its bumps edit generated files, so a later run reports
462
+ them as conflicts, and `--force` resets those actions to the generator's own
463
+ pins. Dependabot proposes the newer pins again on its next run.
@@ -0,0 +1,25 @@
1
+ # Generated by the Open Mercato om-setup-ci skill. Documentation: docs/ci/README.md
2
+ #
3
+ # Installs a pinned Gitleaks release to "$RUNNER_TEMP/gitleaks-bin/gitleaks"
4
+ # and refuses to unpack it unless the archive matches the published SHA-256, so
5
+ # a tampered download can never execute. PATH is deliberately left untouched.
6
+ # Gitleaks reads .gitleaks.toml and .gitleaksignore from the repository root.
7
+ name: Install Gitleaks
8
+ description: Download a pinned, checksum-verified Gitleaks binary to $RUNNER_TEMP/gitleaks-bin/gitleaks.
9
+
10
+ runs:
11
+ using: composite
12
+ steps:
13
+ - name: Download and verify Gitleaks
14
+ shell: bash
15
+ env:
16
+ GITLEAKS_VERSION: '__OM_GITLEAKS_VERSION__'
17
+ GITLEAKS_SHA256: '__OM_GITLEAKS_SHA256__'
18
+ run: |
19
+ set -euo pipefail
20
+ INSTALL_DIR="$RUNNER_TEMP/gitleaks-bin"
21
+ ARCHIVE="$RUNNER_TEMP/gitleaks.tar.gz"
22
+ mkdir -p "$INSTALL_DIR"
23
+ curl -fsSL -o "$ARCHIVE" "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz"
24
+ echo "${GITLEAKS_SHA256} ${ARCHIVE}" | sha256sum --check --strict
25
+ tar -xzf "$ARCHIVE" -C "$INSTALL_DIR" gitleaks
@@ -0,0 +1,31 @@
1
+ # Generated by the Open Mercato om-setup-ci skill. Documentation: docs/ci/README.md
2
+ #
3
+ # Installs the Chromium build that matches the app's @playwright/test version,
4
+ # caching the browser between runs. Run the setup action before this one.
5
+ name: Install Playwright browser
6
+ description: Install (and cache) the Chromium version the app's Playwright expects.
7
+
8
+ runs:
9
+ using: composite
10
+ steps:
11
+ - name: Resolve Playwright version
12
+ id: playwright
13
+ shell: bash
14
+ run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> "$GITHUB_OUTPUT"
15
+
16
+ - name: Cache Playwright browsers
17
+ id: playwright-cache
18
+ uses: __OM_ACTION_CACHE__
19
+ with:
20
+ path: ~/.cache/ms-playwright
21
+ key: playwright-${{ runner.os }}-${{ steps.playwright.outputs.version }}
22
+
23
+ - name: Install Playwright browser
24
+ if: steps.playwright-cache.outputs.cache-hit != 'true'
25
+ shell: bash
26
+ run: npx playwright install --with-deps chromium
27
+
28
+ - name: Install Playwright system dependencies
29
+ if: steps.playwright-cache.outputs.cache-hit == 'true'
30
+ shell: bash
31
+ run: npx playwright install-deps chromium
@@ -0,0 +1,55 @@
1
+ # Generated by the Open Mercato om-setup-ci skill. Documentation: docs/ci/README.md
2
+ #
3
+ # One install path for every CI job, so a lockfile, Node or cache fix lands in
4
+ # exactly one place. Run actions/checkout before using this action.
5
+ name: Setup Node and dependencies
6
+ description: Install the pinned Node.js and Yarn, restore caches, and install dependencies from the lockfile.
7
+
8
+ runs:
9
+ using: composite
10
+ steps:
11
+ - name: Setup Node.js
12
+ id: node
13
+ uses: __OM_ACTION_SETUP_NODE__
14
+ with:
15
+ #@if nodeVersionFile
16
+ node-version-file: __OM_NODE_VERSION_FILE__
17
+ #@endif
18
+ #@if !nodeVersionFile
19
+ node-version: '__OM_NODE_VERSION__'
20
+ #@endif
21
+
22
+ # Corepack provisions the exact Yarn release pinned in package.json#packageManager.
23
+ # It must run before any `yarn` call; actions/setup-node's built-in Yarn cache
24
+ # would invoke a global Yarn first, so the caches below are managed by hand.
25
+ - name: Enable Corepack
26
+ shell: bash
27
+ run: corepack enable
28
+
29
+ - name: Resolve Yarn cache folder
30
+ id: yarn-cache
31
+ shell: bash
32
+ run: echo "dir=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT"
33
+
34
+ - name: Cache Yarn packages
35
+ uses: __OM_ACTION_CACHE__
36
+ with:
37
+ path: ${{ steps.yarn-cache.outputs.dir }}
38
+ key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
39
+ restore-keys: yarn-${{ runner.os }}-
40
+
41
+ # node_modules is keyed on the exact lockfile and Node version, so a hit is
42
+ # byte-for-byte what `yarn install --immutable` would produce.
43
+ - name: Cache node_modules
44
+ id: node-modules
45
+ uses: __OM_ACTION_CACHE__
46
+ with:
47
+ path: node_modules
48
+ key: node-modules-${{ runner.os }}-node${{ steps.node.outputs.node-version }}-${{ hashFiles('yarn.lock', 'package.json') }}
49
+
50
+ # `--immutable` fails when package.json and yarn.lock disagree, so a
51
+ # dependency change that was never installed locally cannot reach main.
52
+ - name: Install dependencies
53
+ if: steps.node-modules.outputs.cache-hit != 'true'
54
+ shell: bash
55
+ run: yarn install --immutable
@@ -0,0 +1,27 @@
1
+ # Generated by the Open Mercato om-setup-ci skill. Documentation: docs/ci/README.md
2
+ #
3
+ # Keeps the GitHub Actions used by .github/workflows current. Actions are
4
+ # pinned to commit SHAs; Dependabot moves the SHA and its `# vX.Y.Z` comment
5
+ # together. The cooldown waits 14 days after a release before proposing it,
6
+ # so a compromised release is usually caught upstream before it reaches you.
7
+ #
8
+ # npm dependencies are deliberately not version-bumped here: @open-mercato/*
9
+ # packages move in lockstep and are upgraded with the om-auto-upgrade-* skills,
10
+ # and security fixes for third-party packages arrive through Dependabot
11
+ # security updates (Settings → Code security).
12
+ version: 2
13
+ updates:
14
+ - package-ecosystem: github-actions
15
+ directories:
16
+ - /
17
+ - /.github/actions/*
18
+ schedule:
19
+ interval: weekly
20
+ cooldown:
21
+ default-days: 14
22
+ groups:
23
+ github-actions:
24
+ patterns:
25
+ - '*'
26
+ commit-message:
27
+ prefix: ci