@rubytech/create-maxy 1.0.704 → 1.0.706

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 (209) hide show
  1. package/dist/__tests__/apt-resolve.test.js +179 -0
  2. package/dist/apt-resolve.js +73 -0
  3. package/dist/index.js +48 -46
  4. package/package.json +3 -3
  5. package/payload/platform/lib/graph-mcp/dist/__tests__/schema-cypher-parser.test.d.ts +2 -0
  6. package/payload/platform/lib/graph-mcp/dist/__tests__/schema-cypher-parser.test.d.ts.map +1 -0
  7. package/payload/platform/lib/graph-mcp/dist/__tests__/schema-cypher-parser.test.js +89 -0
  8. package/payload/platform/lib/graph-mcp/dist/__tests__/schema-cypher-parser.test.js.map +1 -0
  9. package/payload/platform/lib/graph-mcp/dist/schema-cypher-parser.d.ts +42 -0
  10. package/payload/platform/lib/graph-mcp/dist/schema-cypher-parser.d.ts.map +1 -0
  11. package/payload/platform/lib/graph-mcp/dist/schema-cypher-parser.js +87 -0
  12. package/payload/platform/lib/graph-mcp/dist/schema-cypher-parser.js.map +1 -0
  13. package/payload/platform/lib/graph-mcp/src/__tests__/schema-cypher-parser.test.ts +99 -0
  14. package/payload/platform/lib/graph-mcp/src/schema-cypher-parser.ts +84 -0
  15. package/payload/platform/neo4j/edge-annotations.json +134 -0
  16. package/payload/platform/package-lock.json +249 -67
  17. package/payload/platform/plugins/admin/PLUGIN.md +1 -0
  18. package/payload/platform/plugins/admin/mcp/dist/index.js +30 -0
  19. package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
  20. package/payload/platform/plugins/admin/skills/business-profile/SKILL.md +2 -2
  21. package/payload/platform/plugins/admin/skills/onboarding/SKILL.md +46 -5
  22. package/payload/platform/plugins/memory/PLUGIN.md +3 -1
  23. package/payload/platform/plugins/memory/mcp/dist/index.js +56 -6
  24. package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
  25. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/live-schema-source.test.d.ts +2 -0
  26. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/live-schema-source.test.d.ts.map +1 -0
  27. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/live-schema-source.test.js +92 -0
  28. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/live-schema-source.test.js.map +1 -0
  29. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-loader.test.d.ts +2 -0
  30. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-loader.test.d.ts.map +1 -0
  31. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-loader.test.js +51 -0
  32. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-loader.test.js.map +1 -0
  33. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-validator.test.d.ts +2 -0
  34. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-validator.test.d.ts.map +1 -0
  35. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-validator.test.js +222 -0
  36. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-validator.test.js.map +1 -0
  37. package/payload/platform/plugins/memory/mcp/dist/lib/graph-write-gate.d.ts +16 -0
  38. package/payload/platform/plugins/memory/mcp/dist/lib/graph-write-gate.d.ts.map +1 -1
  39. package/payload/platform/plugins/memory/mcp/dist/lib/graph-write-gate.js +38 -11
  40. package/payload/platform/plugins/memory/mcp/dist/lib/graph-write-gate.js.map +1 -1
  41. package/payload/platform/plugins/memory/mcp/dist/lib/live-schema-source.d.ts +136 -0
  42. package/payload/platform/plugins/memory/mcp/dist/lib/live-schema-source.d.ts.map +1 -0
  43. package/payload/platform/plugins/memory/mcp/dist/lib/live-schema-source.js +180 -0
  44. package/payload/platform/plugins/memory/mcp/dist/lib/live-schema-source.js.map +1 -0
  45. package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.d.ts +11 -2
  46. package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.d.ts.map +1 -1
  47. package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.js +6 -3
  48. package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.js.map +1 -1
  49. package/payload/platform/plugins/memory/mcp/dist/lib/schema-validator.d.ts +44 -22
  50. package/payload/platform/plugins/memory/mcp/dist/lib/schema-validator.d.ts.map +1 -1
  51. package/payload/platform/plugins/memory/mcp/dist/lib/schema-validator.js +94 -57
  52. package/payload/platform/plugins/memory/mcp/dist/lib/schema-validator.js.map +1 -1
  53. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.d.ts +7 -5
  54. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.d.ts.map +1 -1
  55. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.js +2 -2
  56. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.js.map +1 -1
  57. package/payload/platform/plugins/memory/references/schema-base.md +4 -0
  58. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/index.d.ts +2 -0
  59. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/index.d.ts.map +1 -0
  60. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/index.js +293 -0
  61. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/index.js.map +1 -0
  62. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/crypto.d.ts +10 -0
  63. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/crypto.d.ts.map +1 -0
  64. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/crypto.js +88 -0
  65. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/crypto.js.map +1 -0
  66. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.d.ts +80 -0
  67. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.d.ts.map +1 -0
  68. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.js +355 -0
  69. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.js.map +1 -0
  70. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/neo4j.d.ts +5 -0
  71. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/neo4j.d.ts.map +1 -0
  72. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/neo4j.js +34 -0
  73. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/neo4j.js.map +1 -0
  74. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/customer-preferences.d.ts +10 -0
  75. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/customer-preferences.d.ts.map +1 -0
  76. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/customer-preferences.js +24 -0
  77. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/customer-preferences.js.map +1 -0
  78. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback-list.d.ts +6 -0
  79. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback-list.d.ts.map +1 -0
  80. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback-list.js +18 -0
  81. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback-list.js.map +1 -0
  82. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.d.ts +16 -0
  83. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.d.ts.map +1 -0
  84. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.js +35 -0
  85. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.js.map +1 -0
  86. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-deregister.d.ts +5 -0
  87. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-deregister.d.ts.map +1 -0
  88. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-deregister.js +19 -0
  89. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-deregister.js.map +1 -0
  90. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-list.d.ts +4 -0
  91. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-list.d.ts.map +1 -0
  92. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-list.js +14 -0
  93. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-list.js.map +1 -0
  94. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-register.d.ts +9 -0
  95. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-register.d.ts.map +1 -0
  96. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-register.js +60 -0
  97. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-register.js.map +1 -0
  98. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-enquiry.d.ts +13 -0
  99. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-enquiry.d.ts.map +1 -0
  100. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-enquiry.js +41 -0
  101. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-enquiry.js.map +1 -0
  102. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-batch.d.ts +9 -0
  103. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-batch.d.ts.map +1 -0
  104. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-batch.js +16 -0
  105. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-batch.js.map +1 -0
  106. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-request.d.ts +15 -0
  107. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-request.d.ts.map +1 -0
  108. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-request.js +11 -0
  109. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-request.js.map +1 -0
  110. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match.d.ts +10 -0
  111. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match.d.ts.map +1 -0
  112. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match.js +39 -0
  113. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match.js.map +1 -0
  114. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.d.ts +9 -0
  115. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.d.ts.map +1 -0
  116. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.js +125 -0
  117. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.js.map +1 -0
  118. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-list.d.ts +7 -0
  119. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-list.d.ts.map +1 -0
  120. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-list.js +16 -0
  121. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-list.js.map +1 -0
  122. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.d.ts +18 -0
  123. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.d.ts.map +1 -0
  124. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.js +87 -0
  125. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.js.map +1 -0
  126. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/properties-list.d.ts +7 -0
  127. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/properties-list.d.ts.map +1 -0
  128. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/properties-list.js +19 -0
  129. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/properties-list.js.map +1 -0
  130. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-detail.d.ts +10 -0
  131. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-detail.d.ts.map +1 -0
  132. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-detail.js +82 -0
  133. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-detail.js.map +1 -0
  134. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-listed.d.ts +12 -0
  135. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-listed.d.ts.map +1 -0
  136. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-listed.js +32 -0
  137. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-listed.js.map +1 -0
  138. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-request.d.ts +15 -0
  139. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-request.d.ts.map +1 -0
  140. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-request.js +11 -0
  141. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-request.js.map +1 -0
  142. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-search.d.ts +16 -0
  143. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-search.d.ts.map +1 -0
  144. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-search.js +41 -0
  145. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-search.js.map +1 -0
  146. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/supplier.d.ts +13 -0
  147. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/supplier.d.ts.map +1 -0
  148. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/supplier.js +49 -0
  149. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/supplier.js.map +1 -0
  150. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-availability.d.ts +7 -0
  151. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-availability.d.ts.map +1 -0
  152. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-availability.js +19 -0
  153. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-availability.js.map +1 -0
  154. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-info.d.ts +5 -0
  155. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-info.d.ts.map +1 -0
  156. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-info.js +32 -0
  157. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-info.js.map +1 -0
  158. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-create.d.ts +14 -0
  159. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-create.d.ts.map +1 -0
  160. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-create.js +11 -0
  161. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-create.js.map +1 -0
  162. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-detail.d.ts +9 -0
  163. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-detail.d.ts.map +1 -0
  164. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-detail.js +85 -0
  165. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-detail.js.map +1 -0
  166. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-search.d.ts +13 -0
  167. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-search.d.ts.map +1 -0
  168. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-search.js +44 -0
  169. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-search.js.map +1 -0
  170. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-update.d.ts +14 -0
  171. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-update.d.ts.map +1 -0
  172. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-update.js +18 -0
  173. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-update.js.map +1 -0
  174. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewings-list.d.ts +9 -0
  175. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewings-list.d.ts.map +1 -0
  176. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewings-list.js +25 -0
  177. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewings-list.js.map +1 -0
  178. package/payload/server/chunk-32ZHQJNX.js +11395 -0
  179. package/payload/server/chunk-3RBKKDHC.js +783 -0
  180. package/payload/server/chunk-3VVHVJK2.js +11405 -0
  181. package/payload/server/chunk-5YIXIF6C.js +726 -0
  182. package/payload/server/chunk-B54KBAK4.js +72 -0
  183. package/payload/server/chunk-IAIGB5WN.js +11406 -0
  184. package/payload/server/chunk-LQ5GSMEW.js +12036 -0
  185. package/payload/server/chunk-O2FWENOD.js +11530 -0
  186. package/payload/server/chunk-PE76FPYP.js +12040 -0
  187. package/payload/server/chunk-Q6NDXCM6.js +11448 -0
  188. package/payload/server/chunk-U3W5YIXU.js +11450 -0
  189. package/payload/server/chunk-ZL2A4ROK.js +11416 -0
  190. package/payload/server/maxy-edge.js +1 -1
  191. package/payload/server/public/assets/{Checkbox-CDUmQ1Bu.js → Checkbox-CjbS9JcG.js} +1 -1
  192. package/payload/server/public/assets/{admin-picYWZfn.js → admin-Ce9DbUuu.js} +30 -30
  193. package/payload/server/public/assets/{data-yYbcrFrc.js → data-C-SxjLC9.js} +1 -1
  194. package/payload/server/public/assets/{file-CzLc4Rvq.js → file-D4cbAAuo.js} +1 -1
  195. package/payload/server/public/assets/{graph-BRzC0ZtS.js → graph-D-Rqh0Md.js} +1 -1
  196. package/payload/server/public/assets/{house-lM4gLKkH.js → house-CYsVygEQ.js} +1 -1
  197. package/payload/server/public/assets/jsx-runtime-DPXE45W9.css +1 -0
  198. package/payload/server/public/assets/{public-scZadgzt.js → public-BTOF98iO.js} +1 -1
  199. package/payload/server/public/assets/{share-2-CNdrRWue.js → share-2-B-sbkB36.js} +1 -1
  200. package/payload/server/public/assets/{useVoiceRecorder-D2kfoqVB.js → useVoiceRecorder-DLVFx3ms.js} +1 -1
  201. package/payload/server/public/assets/{x-CsDhB6Vr.js → x-BNidzSAn.js} +1 -1
  202. package/payload/server/public/data.html +6 -6
  203. package/payload/server/public/graph.html +7 -7
  204. package/payload/server/public/index.html +8 -8
  205. package/payload/server/public/public.html +5 -5
  206. package/payload/server/server.js +114 -54
  207. package/payload/server/upgrade-progress-server.js +83 -0
  208. package/payload/server/public/assets/jsx-runtime-I6ZqIGn8.css +0 -1
  209. /package/payload/server/public/assets/{jsx-runtime-BK2hplUC.js → jsx-runtime-BUs3sHtV.js} +0 -0
@@ -0,0 +1,180 @@
1
+ /**
2
+ * Live schema source for the memory-write / memory-update validator (Task 736).
3
+ *
4
+ * Three sources, one decision rule:
5
+ *
6
+ * liveLabels — `db.labels()` snapshot from Neo4j (refreshed every 60s
7
+ * by SchemaCache from platform/lib/graph-mcp).
8
+ * declaredLabels — labels declared in `platform/neo4j/schema.cypher`
9
+ * (constraint + index FOR (alias:Label) forms).
10
+ * markdownLabels — labels with documented required-property groups in
11
+ * `platform/plugins/memory/references/schema-*.md`.
12
+ *
13
+ * recognised = liveLabels ∪ declaredLabels ← gates label existence
14
+ * markdown documented? → run required-property check, else skip
15
+ *
16
+ * Why a per-process cache rather than a shared one. The graph-mcp proxy and
17
+ * the memory plugin run as separate stdio MCP servers spawned by Claude Code
18
+ * (each with its own Neo4j driver). "In-process" in the Task 736 brief means
19
+ * "no per-decision tool round-trip" — *not* a shared cache instance, which
20
+ * would require IPC. Two SchemaCache instances polling the same Neo4j every
21
+ * 60s costs roughly two `db.labels()` calls per minute and avoids the IPC
22
+ * surface entirely.
23
+ *
24
+ * Why drift runs from the cache's emit hook. SchemaCache uses single-flight
25
+ * refresh — concurrent `refresh()` calls share an in-flight promise. A
26
+ * parallel timer could race against an in-progress refresh and read a stale
27
+ * snapshot during the comparison. The cache's own `emit()` callback fires
28
+ * synchronously after a successful refresh swap, so tapping it guarantees
29
+ * the snapshot we read is the one the refresh just produced.
30
+ *
31
+ * Bootstrap posture. Fresh installs have no nodes yet, so `db.labels()`
32
+ * returns []. The validator must still accept the very first
33
+ * `LocalBusiness` write because that label is *declared* in schema.cypher
34
+ * even when no node carries it. The recognised-set union resolves this
35
+ * directly; no fail-open branch needed for that case.
36
+ *
37
+ * db.labels() declared in cypher recognised?
38
+ * ───────── ────────────────── ───────────
39
+ * [] [LocalBusiness] LocalBusiness ✓ (bootstrap)
40
+ * [LocalBusiness] [LocalBusiness] LocalBusiness ✓ (steady state)
41
+ * [Person] [LocalBusiness] Person + LocalBusiness ✓
42
+ * [] [] {} reject all (Neo4j
43
+ * unreachable AND
44
+ * schema.cypher
45
+ * unreadable — both
46
+ * logged loudly)
47
+ */
48
+ import { readFileSync } from "node:fs";
49
+ import { resolve } from "node:path";
50
+ import { SchemaCache, neo4jSchemaFetcher, } from "../../../../../lib/graph-mcp/dist/schema-cache.js";
51
+ import { parseLabelsFromSchemaCypher } from "../../../../../lib/graph-mcp/dist/schema-cypher-parser.js";
52
+ /**
53
+ * Build the live schema source plus its backing cache.
54
+ *
55
+ * The caller (memory MCP `index.ts`) owns lifecycle: it must `await
56
+ * runtime.ready` (or fire-and-forget) and call `runtime.cache.stop()` on
57
+ * shutdown. Tests pass a stub fetcher and a synthetic interval.
58
+ */
59
+ export function buildLiveSchemaSource(options) {
60
+ const declared = new Set(loadDeclaredLabels(options.schemaCypherPath));
61
+ const markdown = new Set(options.markdownLabels);
62
+ const emit = options.emit ?? defaultEmit;
63
+ const cache = new SchemaCache(options.fetcher, {
64
+ refreshIntervalMs: options.refreshIntervalMs,
65
+ emit: (line) => {
66
+ // Forward the cache's own log line first so operators see refresh
67
+ // outcomes even when drift is empty. Then run the drift comparison
68
+ // against the fresh snapshot — single-flight in SchemaCache means the
69
+ // snapshot is final by the time emit fires.
70
+ emit(line);
71
+ runDriftCheck({
72
+ live: cache.snapshot().labels,
73
+ declared,
74
+ markdown,
75
+ emit,
76
+ });
77
+ },
78
+ });
79
+ const ready = cache.start();
80
+ const source = {
81
+ recognisedLabels() {
82
+ return new Set([...cache.snapshot().labels, ...declared]);
83
+ },
84
+ liveLabels() {
85
+ return new Set(cache.snapshot().labels);
86
+ },
87
+ declaredLabels() {
88
+ return new Set(declared);
89
+ },
90
+ liveReady() {
91
+ return cache.ready();
92
+ },
93
+ };
94
+ return { source, cache, ready };
95
+ }
96
+ /** Re-export the fetcher factory so index.ts can wire one up cleanly. */
97
+ export { neo4jSchemaFetcher };
98
+ /**
99
+ * Emit one log line per drifted token. Pure aside from the supplied emitter.
100
+ * Returns the drift entries for tests.
101
+ *
102
+ * Three drift kinds:
103
+ * live-not-declared : a label that nodes carry but schema.cypher does not
104
+ * declare a constraint/index for. Migration-drift
105
+ * signal — someone created a node with a fresh label
106
+ * without adding the canonical declaration.
107
+ * declared-not-live : declared in schema.cypher but no node carries it
108
+ * yet. Expected on fresh installs (bootstrap labels);
109
+ * suspicious on populated graphs (dead declaration).
110
+ * markdown-orphan : documented in schema-*.md but missing from both
111
+ * live and declared. Stale-doc signal — markdown
112
+ * describing a label that no longer exists in the
113
+ * graph or its constraint declarations.
114
+ */
115
+ export function runDriftCheck(input) {
116
+ const drifts = [];
117
+ for (const token of input.live) {
118
+ if (!input.declared.has(token)) {
119
+ drifts.push({ kind: "live-not-declared", token });
120
+ }
121
+ }
122
+ for (const token of input.declared) {
123
+ if (!input.live.has(token)) {
124
+ drifts.push({ kind: "declared-not-live", token });
125
+ }
126
+ }
127
+ for (const token of input.markdown) {
128
+ if (!input.live.has(token) && !input.declared.has(token)) {
129
+ drifts.push({ kind: "markdown-orphan", token });
130
+ }
131
+ }
132
+ drifts.sort((a, b) => {
133
+ if (a.kind !== b.kind)
134
+ return a.kind.localeCompare(b.kind);
135
+ return a.token.localeCompare(b.token);
136
+ });
137
+ for (const d of drifts) {
138
+ input.emit(`[schema-validator] drift kind=${d.kind} token=${d.token}`);
139
+ }
140
+ return drifts;
141
+ }
142
+ // ---------------------------------------------------------------------------
143
+ // schema.cypher loading
144
+ // ---------------------------------------------------------------------------
145
+ function loadDeclaredLabels(schemaCypherPath) {
146
+ try {
147
+ const text = readFileSync(schemaCypherPath, "utf-8");
148
+ return parseLabelsFromSchemaCypher(text);
149
+ }
150
+ catch (err) {
151
+ // schema.cypher unreadable is a deployment-shape problem — surface it
152
+ // loudly. Rather than throwing, return [] so the validator falls back to
153
+ // pure live-snapshot mode. The memory server still starts; operators see
154
+ // the warning and can fix the deployment without taking the agent down.
155
+ const msg = err instanceof Error ? err.message : String(err);
156
+ process.stderr.write(`[schema-validator] schema.cypher unreadable path=${schemaCypherPath} error="${msg.replace(/"/g, "'")}" declared=[]\n`);
157
+ return [];
158
+ }
159
+ }
160
+ /**
161
+ * Resolve the absolute path to `platform/neo4j/schema.cypher`.
162
+ *
163
+ * Layout (compiled and source paths are siblings, so the offset is the same):
164
+ * platform/plugins/memory/mcp/{src,dist}/lib/live-schema-source.{ts,js}
165
+ * platform/neo4j/schema.cypher
166
+ *
167
+ * From `import.meta.dirname` (mcp/{src,dist}/lib/) the relative path is
168
+ * `../../../../../neo4j/schema.cypher` — 5 hops to platform/, then down.
169
+ * `PLATFORM_ROOT` overrides for production where the layout may differ.
170
+ */
171
+ export function defaultSchemaCypherPath() {
172
+ if (process.env.PLATFORM_ROOT) {
173
+ return resolve(process.env.PLATFORM_ROOT, "neo4j/schema.cypher");
174
+ }
175
+ return resolve(import.meta.dirname, "../../../../../neo4j/schema.cypher");
176
+ }
177
+ function defaultEmit(line) {
178
+ process.stderr.write(`${line}\n`);
179
+ }
180
+ //# sourceMappingURL=live-schema-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live-schema-source.js","sourceRoot":"","sources":["../../src/lib/live-schema-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,WAAW,EACX,kBAAkB,GAEnB,MAAM,mDAAmD,CAAC;AAC3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AC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC;AACpC,CAAC"}
@@ -60,8 +60,17 @@ export interface LabelDefinition {
60
60
  inheritsFrom?: string;
61
61
  }
62
62
  export interface LoadedSchema {
63
- /** label string -> definition */
64
- labels: Map<string, LabelDefinition>;
63
+ /**
64
+ * Markdown-documented label -> definition. The map carries the
65
+ * required-property and source-file metadata used by the validator's
66
+ * required-property check. It does NOT determine label existence —
67
+ * existence is established by `LiveSchemaSource` (live `db.labels()` ∪
68
+ * `schema.cypher` declarations). A label not present here is "documented
69
+ * by markdown? no" → required-property check is skipped (with a structured
70
+ * log line) but the write is still accepted if the live source recognises
71
+ * the label. (Renamed from `labels` in Task 736 to make the role explicit.)
72
+ */
73
+ markdownLabels: Map<string, LabelDefinition>;
65
74
  /** wrong property name -> correct property name (from schema-base.md only) */
66
75
  wrongToCorrect: Map<string, {
67
76
  correct: string;
@@ -1 +1 @@
1
- {"version":3,"file":"schema-loader.d.ts","sourceRoot":"","sources":["../../src/lib/schema-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAKH,mDAAmD;AACnD,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAExC,MAAM,WAAW,eAAe;IAC9B,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,gEAAgE;IAChE,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,iCAAiC;IACjC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACrC,8EAA8E;IAC9E,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrE,wDAAwD;IACxD,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAwUD;;;;;;;GAOG;AACH,wBAAgB,UAAU,IAAI,YAAY,CA0EzC"}
1
+ {"version":3,"file":"schema-loader.d.ts","sourceRoot":"","sources":["../../src/lib/schema-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAKH,mDAAmD;AACnD,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAExC,MAAM,WAAW,eAAe;IAC9B,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,gEAAgE;IAChE,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B;;;;;;;;;OASG;IACH,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC7C,8EAA8E;IAC9E,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrE,wDAAwD;IACxD,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAwUD;;;;;;;GAOG;AACH,wBAAgB,UAAU,IAAI,YAAY,CA6EzC"}
@@ -381,12 +381,15 @@ export function loadSchema() {
381
381
  resolveInheritance(labelMap);
382
382
  // Stderr log: satisfies the project's "Observability Is Non-Negotiable"
383
383
  // principle — operators can confirm from server.log alone which schemas
384
- // are live and how many labels are enforced.
384
+ // are live and how many labels are documented. The wording shifted in
385
+ // Task 736: this number is now the count of *documented* labels (those
386
+ // with required-property groups), not the count of *recognised* labels
387
+ // (which is the live ∪ declared union resolved by LiveSchemaSource).
385
388
  const labelCount = labelMap.size;
386
389
  const synonymCount = wrongToCorrect.size;
387
- process.stderr.write(`[schema-loader] loaded ${labelCount} labels and ${synonymCount} naming-rule synonyms from ${fileNames.length} files: ${fileNames.join(", ")}\n`);
390
+ process.stderr.write(`[schema-loader] loaded ${labelCount} documented labels and ${synonymCount} naming-rule synonyms from ${fileNames.length} files: ${fileNames.join(", ")}\n`);
388
391
  return {
389
- labels: labelMap,
392
+ markdownLabels: labelMap,
390
393
  wrongToCorrect,
391
394
  sourceFiles,
392
395
  };
@@ -1 +1 @@
1
- {"version":3,"file":"schema-loader.js","sourceRoot":"","sources":["../../src/lib/schema-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8BpC,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,SAAS,cAAc,CAAC,KAAa;IACnC,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AACxC,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,sBAAsB,CAAC,KAAa;IAC3C,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACpC,IAAI,QAAQ,KAAK,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;IACzC,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,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A8B,SAAS,CAAC,MAAM,WAAW,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAC5J,CAAC;IAEF,OAAO;QACL,cAAc,EAAE,QAAQ;QACxB,cAAc;QACd,WAAW;KACZ,CAAC;AACJ,CAAC"}
@@ -1,37 +1,59 @@
1
1
  /**
2
- * Schema validator — validates memory-write inputs against the LoadedSchema
3
- * produced by schema-loader.ts. Pure function, no I/O, no side effects.
2
+ * Schema validator — validates memory-write inputs against two sources of
3
+ * truth (Task 736):
4
+ *
5
+ * 1. `LiveSchemaSource` — recognised-label set = `db.labels()` snapshot
6
+ * ∪ `schema.cypher` constraint/index declarations. This is the gate.
7
+ * A label is recognised iff it appears in either set.
8
+ * 2. `LoadedSchema` (markdown sidecar) — required-property and naming-rule
9
+ * metadata for documented labels. Markdown is no longer a label-existence
10
+ * gate; required-property checks are skipped (with a log line) when the
11
+ * label is recognised by the live source but absent from markdown.
4
12
  *
5
13
  * Checks run in order; first failure throws with a descriptive message.
6
- * Every error names the specific violation and the source file that defined
7
- * the rule so the agent can self-correct on retry.
8
14
  *
9
- * 1. accountId: non-empty trimmed string
10
- * 2. label: at least one input label is recognised in the loaded schema
11
- * 3. synonyms: no property key appears in the wrongToCorrect map — this
12
- * runs BEFORE required-props so that a `firstName` typo is reported as
13
- * "rename firstName givenName" (actionable) instead of
14
- * "missing required property givenName" (leaves the agent to figure
15
- * out why their write was incomplete).
16
- * 4. required properties: for the primary (first recognised) label, every
17
- * required group is satisfied simple groups by presence, any-of
18
- * groups by at least one disjunct present
15
+ * 1. accountId non-empty trimmed string
16
+ * 2. label existence — at least one input label is in live declared.
17
+ * Rejection cites both sources and the nearest
18
+ * documented match (Levenshtein) when there is one
19
+ * 3. property synonym — no property key is a known wrong-name alias.
20
+ * Runs before required-props so a `firstName`
21
+ * typo is reported as "rename firstName →
22
+ * givenName" rather than "missing givenName"
23
+ * 4. required properties — for the primary label, fires only when the
24
+ * label is documented in markdown. Skipped (with
25
+ * a structured log line) when the label is
26
+ * recognised but undocumented — that's a
27
+ * stale-doc signal, not a write error
28
+ *
29
+ * The `[schema-validator]` log lines are the single observability surface.
30
+ * Operators reading server.log can distinguish "validation didn't run" from
31
+ * "validation passed" from "validation rejected" without source access.
19
32
  *
20
- * "Present" means the properties object has the key and the value is not
21
- * null, not undefined, and not an empty string after trimming. `0`, `false`,
22
- * and empty arrays are considered present — those are legitimate values the
23
- * agent may want to persist.
33
+ * "Present" semantics for required-property values: defined, not null, and
34
+ * not a whitespace-only string. Numeric `0`, boolean `false`, and empty
35
+ * arrays count as present — the agent may legitimately persist those.
24
36
  */
25
37
  import type { LoadedSchema } from "./schema-loader.js";
38
+ import type { LiveSchemaSource } from "./live-schema-source.js";
26
39
  export interface ValidateWriteInput {
27
40
  labels: string[];
28
41
  properties: Record<string, unknown>;
29
42
  accountId?: string;
30
43
  }
44
+ export interface ValidatorEnv {
45
+ /** Markdown sidecar — required-property + synonym metadata. */
46
+ schema: LoadedSchema;
47
+ /** Live ∪ declared label source — gates label existence. */
48
+ liveSource: LiveSchemaSource;
49
+ /** Test-injectable log emitter. Default: process.stderr. */
50
+ emit?: (line: string) => void;
51
+ }
31
52
  /**
32
- * Validate a write against the loaded schema. Throws on the first violation.
33
- * The caller is responsible for logging the error before re-throwing this
34
- * function deliberately does not write to stderr so it stays a pure unit.
53
+ * Validate a write. Throws on the first violation. Caller is responsible
54
+ * for logging the thrown error in addition to the structured outcome lines
55
+ * this function emits this stays a (mostly) pure unit so test fixtures
56
+ * can capture both the throw path and the emit stream.
35
57
  */
36
- export declare function validateWrite(input: ValidateWriteInput, schema: LoadedSchema): void;
58
+ export declare function validateWrite(input: ValidateWriteInput, env: ValidatorEnv): void;
37
59
  //# sourceMappingURL=schema-validator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-validator.d.ts","sourceRoot":"","sources":["../../src/lib/schema-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,oBAAoB,CAAC;AAEtE,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,kBAAkB,EACzB,MAAM,EAAE,YAAY,GACnB,IAAI,CA8EN"}
1
+ {"version":3,"file":"schema-validator.d.ts","sourceRoot":"","sources":["../../src/lib/schema-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,oBAAoB,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,+DAA+D;IAC/D,MAAM,EAAE,YAAY,CAAC;IACrB,4DAA4D;IAC5D,UAAU,EAAE,gBAAgB,CAAC;IAC7B,4DAA4D;IAC5D,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,kBAAkB,EACzB,GAAG,EAAE,YAAY,GAChB,IAAI,CA+GN"}
@@ -1,34 +1,50 @@
1
1
  /**
2
- * Schema validator — validates memory-write inputs against the LoadedSchema
3
- * produced by schema-loader.ts. Pure function, no I/O, no side effects.
2
+ * Schema validator — validates memory-write inputs against two sources of
3
+ * truth (Task 736):
4
+ *
5
+ * 1. `LiveSchemaSource` — recognised-label set = `db.labels()` snapshot
6
+ * ∪ `schema.cypher` constraint/index declarations. This is the gate.
7
+ * A label is recognised iff it appears in either set.
8
+ * 2. `LoadedSchema` (markdown sidecar) — required-property and naming-rule
9
+ * metadata for documented labels. Markdown is no longer a label-existence
10
+ * gate; required-property checks are skipped (with a log line) when the
11
+ * label is recognised by the live source but absent from markdown.
4
12
  *
5
13
  * Checks run in order; first failure throws with a descriptive message.
6
- * Every error names the specific violation and the source file that defined
7
- * the rule so the agent can self-correct on retry.
8
14
  *
9
- * 1. accountId: non-empty trimmed string
10
- * 2. label: at least one input label is recognised in the loaded schema
11
- * 3. synonyms: no property key appears in the wrongToCorrect map — this
12
- * runs BEFORE required-props so that a `firstName` typo is reported as
13
- * "rename firstName givenName" (actionable) instead of
14
- * "missing required property givenName" (leaves the agent to figure
15
- * out why their write was incomplete).
16
- * 4. required properties: for the primary (first recognised) label, every
17
- * required group is satisfied simple groups by presence, any-of
18
- * groups by at least one disjunct present
15
+ * 1. accountId non-empty trimmed string
16
+ * 2. label existence — at least one input label is in live declared.
17
+ * Rejection cites both sources and the nearest
18
+ * documented match (Levenshtein) when there is one
19
+ * 3. property synonym — no property key is a known wrong-name alias.
20
+ * Runs before required-props so a `firstName`
21
+ * typo is reported as "rename firstName →
22
+ * givenName" rather than "missing givenName"
23
+ * 4. required properties — for the primary label, fires only when the
24
+ * label is documented in markdown. Skipped (with
25
+ * a structured log line) when the label is
26
+ * recognised but undocumented — that's a
27
+ * stale-doc signal, not a write error
28
+ *
29
+ * The `[schema-validator]` log lines are the single observability surface.
30
+ * Operators reading server.log can distinguish "validation didn't run" from
31
+ * "validation passed" from "validation rejected" without source access.
19
32
  *
20
- * "Present" means the properties object has the key and the value is not
21
- * null, not undefined, and not an empty string after trimming. `0`, `false`,
22
- * and empty arrays are considered present — those are legitimate values the
23
- * agent may want to persist.
33
+ * "Present" semantics for required-property values: defined, not null, and
34
+ * not a whitespace-only string. Numeric `0`, boolean `false`, and empty
35
+ * arrays count as present — the agent may legitimately persist those.
24
36
  */
37
+ import { nearestLabel } from "../../../../../lib/graph-mcp/dist/schema-cypher-parser.js";
25
38
  /**
26
- * Validate a write against the loaded schema. Throws on the first violation.
27
- * The caller is responsible for logging the error before re-throwing this
28
- * function deliberately does not write to stderr so it stays a pure unit.
39
+ * Validate a write. Throws on the first violation. Caller is responsible
40
+ * for logging the thrown error in addition to the structured outcome lines
41
+ * this function emits this stays a (mostly) pure unit so test fixtures
42
+ * can capture both the throw path and the emit stream.
29
43
  */
30
- export function validateWrite(input, schema) {
44
+ export function validateWrite(input, env) {
45
+ const startedMs = Date.now();
31
46
  const { labels, properties, accountId } = input;
47
+ const emit = env.emit ?? defaultEmit;
32
48
  // ---------------------------------------------------------------------
33
49
  // 1. accountId non-empty
34
50
  // ---------------------------------------------------------------------
@@ -36,67 +52,77 @@ export function validateWrite(input, schema) {
36
52
  throw new Error("memory-write: accountId is required and must be a non-empty string");
37
53
  }
38
54
  // ---------------------------------------------------------------------
39
- // 2. At least one label is recognised
55
+ // 2. At least one label is recognised by the live source
56
+ // (recognised = live ∪ declared)
40
57
  // ---------------------------------------------------------------------
41
58
  if (!Array.isArray(labels) || labels.length === 0) {
42
59
  throw new Error("memory-write: labels is required and must contain at least one Neo4j label");
43
60
  }
44
- const recognisedLabels = labels.filter((l) => schema.labels.has(l));
45
- if (recognisedLabels.length === 0) {
46
- const known = Array.from(schema.labels.keys()).sort().join(", ");
47
- throw new Error(`memory-write: unknown Neo4j label(s) [${labels.join(", ")}]. Recognised labels loaded from schema references: ${known}`);
61
+ const live = env.liveSource.liveLabels();
62
+ const declared = env.liveSource.declaredLabels();
63
+ const recognised = env.liveSource.recognisedLabels();
64
+ const hits = [];
65
+ for (const label of labels) {
66
+ if (recognised.has(label))
67
+ hits.push(label);
68
+ }
69
+ if (hits.length === 0) {
70
+ const liveList = [...live].sort().join(", ");
71
+ const declaredList = [...declared].sort().join(", ");
72
+ const suggestion = nearestLabel(labels[0], recognised);
73
+ const suggestionFragment = suggestion
74
+ ? ` Did you mean '${suggestion}'?`
75
+ : "";
76
+ const labelStr = labels.join(", ");
77
+ emit(`[schema-validator] check label=${primaryForLog(labels)} outcome=rejected source=neither ms=${Date.now() - startedMs}`);
78
+ throw new Error(`memory-write: unknown Neo4j label(s) [${labelStr}].${suggestionFragment} Live db.labels(): [${liveList}]. Declared in schema.cypher: [${declaredList}].`);
48
79
  }
49
- // The "primary" label is the first recognised one. If an input has
50
- // multiple recognised labels (e.g. ["Person", "Applicant"] where both are
51
- // defined) we take the first — the agent's stated intent comes first.
52
- const primaryLabelName = recognisedLabels[0];
53
- const primary = schema.labels.get(primaryLabelName);
80
+ const primaryLabel = hits[0];
81
+ const inLive = live.has(primaryLabel);
82
+ const inDeclared = declared.has(primaryLabel);
83
+ const recognisedSource = inLive && inDeclared ? "both" : inLive ? "live" : "declared";
54
84
  // ---------------------------------------------------------------------
55
85
  // 3. No property key is a known Schema.org synonym (wrong name)
56
86
  //
57
- // Runs before the required-properties check so that a `firstName` typo
58
- // is reported as "rename firstName givenName" (actionable) instead of
59
- // "missing required property givenName" (leaves the agent guessing why
60
- // the write was incomplete).
61
- //
62
- // Only the agent-supplied keys are checked — `accountId` is platform-
63
- // injected and never a synonym candidate.
87
+ // Synonym map is independent of label `firstName` is wrong on every
88
+ // Person variant. Runs even when the label is markdown-undocumented;
89
+ // the synonyms apply to property semantics, not to specific labels.
64
90
  // ---------------------------------------------------------------------
65
91
  for (const key of Object.keys(properties)) {
66
- const hit = schema.wrongToCorrect.get(key);
92
+ const hit = env.schema.wrongToCorrect.get(key);
67
93
  if (hit) {
68
94
  throw new Error(`memory-write: property name '${key}' is not Schema.org — use '${hit.correct}' instead (${hit.sourceFile} property naming rules)`);
69
95
  }
70
96
  }
71
97
  // ---------------------------------------------------------------------
72
- // 4. Required properties for the primary label
73
- //
74
- // The evaluation uses the EFFECTIVE node properties — what memory-write
75
- // will actually persist to Neo4j. That's the agent-supplied `properties`
76
- // merged with the top-level `accountId` parameter, which memoryWrite()
77
- // always spreads into the node at write time. Without this merge, the
78
- // schema's "accountId is required" rule would reject every write because
79
- // `accountId` arrives as a separate top-level param, not inside
80
- // `properties`.
98
+ // 4. Required-property check only when the primary label is documented
99
+ // in markdown. Markdown-undocumented labels (e.g. AdminUser,
100
+ // LocalBusiness, KnowledgeDocument as of 2026-04-25) are accepted by
101
+ // label existence but their property shape is the agent's responsibility
102
+ // until a markdown row is added.
81
103
  // ---------------------------------------------------------------------
104
+ const definition = env.schema.markdownLabels.get(primaryLabel);
105
+ if (!definition) {
106
+ emit(`[schema-validator] check label=${primaryLabel} outcome=accepted source=${recognisedSource} ms=${Date.now() - startedMs}`);
107
+ emit(`[schema-validator] markdown-undocumented label=${primaryLabel}`);
108
+ return;
109
+ }
82
110
  const effectiveProperties = {
83
111
  ...properties,
84
112
  accountId,
85
113
  };
86
- for (const group of primary.required) {
114
+ for (const group of definition.required) {
87
115
  if (!groupIsSatisfied(group, effectiveProperties)) {
88
- throw new Error(`memory-write: missing required property ${formatGroup(group)} for label ${primaryLabelName} (${primary.sourceFile})`);
116
+ emit(`[schema-validator] required-props label=${primaryLabel} outcome=missing-group group=${formatGroupForLog(group)}`);
117
+ throw new Error(`memory-write: missing required property ${formatGroup(group)} for label ${primaryLabel} (${definition.sourceFile})`);
89
118
  }
90
119
  }
120
+ emit(`[schema-validator] required-props label=${primaryLabel} outcome=satisfied`);
121
+ emit(`[schema-validator] check label=${primaryLabel} outcome=accepted source=${recognisedSource} ms=${Date.now() - startedMs}`);
91
122
  }
92
123
  // ---------------------------------------------------------------------------
93
124
  // Helpers
94
125
  // ---------------------------------------------------------------------------
95
- /**
96
- * A value is "present" if it is defined, not null, and not an empty string
97
- * after trimming. Numeric zero, boolean false, and empty arrays count as
98
- * present — the agent may legitimately want to persist those.
99
- */
100
126
  function isPresent(value) {
101
127
  if (value === undefined || value === null)
102
128
  return false;
@@ -108,7 +134,6 @@ function groupIsSatisfied(group, properties) {
108
134
  if (group.kind === "simple") {
109
135
  return isPresent(properties[group.name]);
110
136
  }
111
- // any-of
112
137
  return group.names.some((name) => isPresent(properties[name]));
113
138
  }
114
139
  function formatGroup(group) {
@@ -116,4 +141,16 @@ function formatGroup(group) {
116
141
  return `'${group.name}'`;
117
142
  return group.names.map((n) => `'${n}'`).join(" or ");
118
143
  }
144
+ function formatGroupForLog(group) {
145
+ if (group.kind === "simple")
146
+ return group.name;
147
+ return group.names.join("|");
148
+ }
149
+ /** Pick a representative label for the rejection log line. */
150
+ function primaryForLog(labels) {
151
+ return labels[0] ?? "<empty>";
152
+ }
153
+ function defaultEmit(line) {
154
+ process.stderr.write(`${line}\n`);
155
+ }
119
156
  //# sourceMappingURL=schema-validator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-validator.js","sourceRoot":"","sources":["../../src/lib/schema-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAUH;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,KAAyB,EACzB,MAAoB;IAEpB,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAEhD,wEAAwE;IACxE,yBAAyB;IACzB,wEAAwE;IACxE,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnE,MAAM,IAAI,KAAK,CACb,oEAAoE,CACrE,CAAC;IACJ,CAAC;IAED,wEAAwE;IACxE,sCAAsC;IACtC,wEAAwE;IACxE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClD,MAAM,IAAI,KAAK,CACb,4EAA4E,CAC7E,CAAC;IACJ,CAAC;IAED,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAA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