@rubytech/create-maxy-code 0.1.59 → 0.1.61

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 (284) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/plugins/admin/PLUGIN.md +1 -1
  3. package/payload/platform/plugins/brochures/skills/property-brochure/SKILL.md +26 -3
  4. package/payload/platform/plugins/brochures/skills/property-brochure/references/registers.md +1 -1
  5. package/payload/platform/plugins/docs/references/admin-session.md +2 -2
  6. package/payload/platform/plugins/docs/references/internals.md +1 -1
  7. package/payload/platform/plugins/docs/references/plugins-guide.md +1 -1
  8. package/payload/platform/plugins/epc/.claude-plugin/plugin.json +17 -0
  9. package/payload/platform/plugins/epc/PLUGIN.md +85 -0
  10. package/payload/platform/plugins/epc/mcp/dist/index.d.ts +2 -0
  11. package/payload/platform/plugins/epc/mcp/dist/index.d.ts.map +1 -0
  12. package/payload/platform/plugins/epc/mcp/dist/index.js +117 -0
  13. package/payload/platform/plugins/epc/mcp/dist/index.js.map +1 -0
  14. package/payload/platform/plugins/epc/mcp/dist/lib/crypto.d.ts +3 -0
  15. package/payload/platform/plugins/epc/mcp/dist/lib/crypto.d.ts.map +1 -0
  16. package/payload/platform/plugins/epc/mcp/dist/lib/crypto.js +72 -0
  17. package/payload/platform/plugins/epc/mcp/dist/lib/crypto.js.map +1 -0
  18. package/payload/platform/plugins/epc/mcp/dist/lib/epc-api.d.ts +60 -0
  19. package/payload/platform/plugins/epc/mcp/dist/lib/epc-api.d.ts.map +1 -0
  20. package/payload/platform/plugins/epc/mcp/dist/lib/epc-api.js +181 -0
  21. package/payload/platform/plugins/epc/mcp/dist/lib/epc-api.js.map +1 -0
  22. package/payload/platform/plugins/epc/mcp/dist/lib/file-crypto.d.ts +3 -0
  23. package/payload/platform/plugins/epc/mcp/dist/lib/file-crypto.d.ts.map +1 -0
  24. package/payload/platform/plugins/epc/mcp/dist/lib/file-crypto.js +49 -0
  25. package/payload/platform/plugins/epc/mcp/dist/lib/file-crypto.js.map +1 -0
  26. package/payload/platform/plugins/epc/mcp/dist/lib/key-store.d.ts +15 -0
  27. package/payload/platform/plugins/epc/mcp/dist/lib/key-store.d.ts.map +1 -0
  28. package/payload/platform/plugins/epc/mcp/dist/lib/key-store.js +130 -0
  29. package/payload/platform/plugins/epc/mcp/dist/lib/key-store.js.map +1 -0
  30. package/payload/platform/plugins/epc/mcp/dist/lib/neo4j.d.ts +5 -0
  31. package/payload/platform/plugins/epc/mcp/dist/lib/neo4j.d.ts.map +1 -0
  32. package/payload/platform/plugins/epc/mcp/dist/lib/neo4j.js +38 -0
  33. package/payload/platform/plugins/epc/mcp/dist/lib/neo4j.js.map +1 -0
  34. package/payload/platform/plugins/epc/mcp/dist/tools/key-deregister.d.ts +4 -0
  35. package/payload/platform/plugins/epc/mcp/dist/tools/key-deregister.d.ts.map +1 -0
  36. package/payload/platform/plugins/epc/mcp/dist/tools/key-deregister.js +9 -0
  37. package/payload/platform/plugins/epc/mcp/dist/tools/key-deregister.js.map +1 -0
  38. package/payload/platform/plugins/epc/mcp/dist/tools/key-list.d.ts +4 -0
  39. package/payload/platform/plugins/epc/mcp/dist/tools/key-list.d.ts.map +1 -0
  40. package/payload/platform/plugins/epc/mcp/dist/tools/key-list.js +10 -0
  41. package/payload/platform/plugins/epc/mcp/dist/tools/key-list.js.map +1 -0
  42. package/payload/platform/plugins/epc/mcp/dist/tools/key-register.d.ts +5 -0
  43. package/payload/platform/plugins/epc/mcp/dist/tools/key-register.d.ts.map +1 -0
  44. package/payload/platform/plugins/epc/mcp/dist/tools/key-register.js +36 -0
  45. package/payload/platform/plugins/epc/mcp/dist/tools/key-register.js.map +1 -0
  46. package/payload/platform/plugins/epc/mcp/dist/tools/lookup.d.ts +10 -0
  47. package/payload/platform/plugins/epc/mcp/dist/tools/lookup.d.ts.map +1 -0
  48. package/payload/platform/plugins/epc/mcp/dist/tools/lookup.js +30 -0
  49. package/payload/platform/plugins/epc/mcp/dist/tools/lookup.js.map +1 -0
  50. package/payload/platform/plugins/epc/mcp/package-lock.json +2566 -0
  51. package/payload/platform/plugins/epc/mcp/package.json +21 -0
  52. package/payload/platform/plugins/epc/mcp/src/__tests__/epc-api.test.ts +251 -0
  53. package/payload/platform/plugins/epc/mcp/src/__tests__/key-roundtrip.test.ts +113 -0
  54. package/payload/platform/plugins/epc/mcp/src/__tests__/lookup.test.ts +181 -0
  55. package/payload/platform/plugins/epc/mcp/src/__tests__/schema-parity.test.ts +54 -0
  56. package/payload/platform/plugins/epc/mcp/src/index.ts +156 -0
  57. package/payload/platform/plugins/epc/mcp/src/lib/crypto.ts +79 -0
  58. package/payload/platform/plugins/epc/mcp/src/lib/epc-api.ts +241 -0
  59. package/payload/platform/plugins/epc/mcp/src/lib/file-crypto.ts +55 -0
  60. package/payload/platform/plugins/epc/mcp/src/lib/key-store.ts +172 -0
  61. package/payload/platform/plugins/epc/mcp/src/lib/neo4j.ts +47 -0
  62. package/payload/platform/plugins/epc/mcp/src/tools/key-deregister.ts +9 -0
  63. package/payload/platform/plugins/epc/mcp/src/tools/key-list.ts +10 -0
  64. package/payload/platform/plugins/epc/mcp/src/tools/key-register.ts +44 -0
  65. package/payload/platform/plugins/epc/mcp/src/tools/lookup.ts +43 -0
  66. package/payload/platform/plugins/epc/mcp/tsconfig.json +20 -0
  67. package/payload/platform/plugins/epc/mcp/vitest.config.ts +8 -0
  68. package/payload/platform/plugins/loop/PLUGIN.md +13 -1
  69. package/payload/platform/plugins/loop/mcp/dist/index.js +8 -7
  70. package/payload/platform/plugins/loop/mcp/dist/index.js.map +1 -1
  71. package/payload/platform/plugins/loop/mcp/dist/lib/file-crypto.d.ts +3 -0
  72. package/payload/platform/plugins/loop/mcp/dist/lib/file-crypto.d.ts.map +1 -0
  73. package/payload/platform/plugins/loop/mcp/dist/lib/file-crypto.js +48 -0
  74. package/payload/platform/plugins/loop/mcp/dist/lib/file-crypto.js.map +1 -0
  75. package/payload/platform/plugins/loop/mcp/dist/lib/key-store.d.ts +22 -0
  76. package/payload/platform/plugins/loop/mcp/dist/lib/key-store.d.ts.map +1 -0
  77. package/payload/platform/plugins/loop/mcp/dist/lib/key-store.js +165 -0
  78. package/payload/platform/plugins/loop/mcp/dist/lib/key-store.js.map +1 -0
  79. package/payload/platform/plugins/loop/mcp/dist/lib/loop-api.d.ts +1 -1
  80. package/payload/platform/plugins/loop/mcp/dist/lib/loop-api.d.ts.map +1 -1
  81. package/payload/platform/plugins/loop/mcp/dist/lib/loop-api.js +4 -39
  82. package/payload/platform/plugins/loop/mcp/dist/lib/loop-api.js.map +1 -1
  83. package/payload/platform/plugins/loop/mcp/dist/tools/key-deregister.d.ts.map +1 -1
  84. package/payload/platform/plugins/loop/mcp/dist/tools/key-deregister.js +5 -15
  85. package/payload/platform/plugins/loop/mcp/dist/tools/key-deregister.js.map +1 -1
  86. package/payload/platform/plugins/loop/mcp/dist/tools/key-register.d.ts.map +1 -1
  87. package/payload/platform/plugins/loop/mcp/dist/tools/key-register.js +11 -28
  88. package/payload/platform/plugins/loop/mcp/dist/tools/key-register.js.map +1 -1
  89. package/payload/platform/plugins/loop/mcp/src/index.ts +10 -7
  90. package/payload/platform/plugins/loop/mcp/src/lib/file-crypto.ts +54 -0
  91. package/payload/platform/plugins/loop/mcp/src/lib/key-store.ts +221 -0
  92. package/payload/platform/plugins/loop/mcp/src/lib/loop-api.ts +5 -42
  93. package/payload/platform/plugins/loop/mcp/src/tools/key-deregister.ts +5 -20
  94. package/payload/platform/plugins/loop/mcp/src/tools/key-register.ts +14 -39
  95. package/payload/platform/plugins/preval/.claude-plugin/plugin.json +1 -1
  96. package/payload/platform/plugins/preval/PLUGIN.md +23 -17
  97. package/payload/platform/plugins/preval/skills/property-preval/SKILL.md +78 -38
  98. package/payload/platform/plugins/preval/skills/property-preval/references/render.py +288 -81
  99. package/payload/platform/plugins/preval/skills/property-preval/references/template-inputs.schema.json +125 -80
  100. package/payload/platform/plugins/preval/skills/property-preval/references/template.html +184 -124
  101. package/payload/platform/plugins/property-data/PLUGIN.md +14 -1
  102. package/payload/platform/plugins/property-data/mcp/dist/index.js +14 -11
  103. package/payload/platform/plugins/property-data/mcp/dist/index.js.map +1 -1
  104. package/payload/platform/plugins/property-data/mcp/dist/lib/file-crypto.d.ts +3 -0
  105. package/payload/platform/plugins/property-data/mcp/dist/lib/file-crypto.d.ts.map +1 -0
  106. package/payload/platform/plugins/property-data/mcp/dist/lib/file-crypto.js +49 -0
  107. package/payload/platform/plugins/property-data/mcp/dist/lib/file-crypto.js.map +1 -0
  108. package/payload/platform/plugins/property-data/mcp/dist/lib/key-store.d.ts +15 -0
  109. package/payload/platform/plugins/property-data/mcp/dist/lib/key-store.d.ts.map +1 -0
  110. package/payload/platform/plugins/property-data/mcp/dist/lib/key-store.js +135 -0
  111. package/payload/platform/plugins/property-data/mcp/dist/lib/key-store.js.map +1 -0
  112. package/payload/platform/plugins/property-data/mcp/dist/lib/propertydata-api.d.ts +0 -1
  113. package/payload/platform/plugins/property-data/mcp/dist/lib/propertydata-api.d.ts.map +1 -1
  114. package/payload/platform/plugins/property-data/mcp/dist/lib/propertydata-api.js +11 -22
  115. package/payload/platform/plugins/property-data/mcp/dist/lib/propertydata-api.js.map +1 -1
  116. package/payload/platform/plugins/property-data/mcp/dist/tools/endpoints.d.ts.map +1 -1
  117. package/payload/platform/plugins/property-data/mcp/dist/tools/endpoints.js +2 -2
  118. package/payload/platform/plugins/property-data/mcp/dist/tools/endpoints.js.map +1 -1
  119. package/payload/platform/plugins/property-data/mcp/dist/tools/key-deregister.d.ts.map +1 -1
  120. package/payload/platform/plugins/property-data/mcp/dist/tools/key-deregister.js +5 -15
  121. package/payload/platform/plugins/property-data/mcp/dist/tools/key-deregister.js.map +1 -1
  122. package/payload/platform/plugins/property-data/mcp/dist/tools/key-register.d.ts.map +1 -1
  123. package/payload/platform/plugins/property-data/mcp/dist/tools/key-register.js +30 -23
  124. package/payload/platform/plugins/property-data/mcp/dist/tools/key-register.js.map +1 -1
  125. package/payload/platform/plugins/property-data/mcp/src/index.ts +16 -11
  126. package/payload/platform/plugins/property-data/mcp/src/lib/file-crypto.ts +55 -0
  127. package/payload/platform/plugins/property-data/mcp/src/lib/key-store.ts +181 -0
  128. package/payload/platform/plugins/property-data/mcp/src/lib/propertydata-api.ts +9 -24
  129. package/payload/platform/plugins/property-data/mcp/src/tools/endpoints.ts +2 -2
  130. package/payload/platform/plugins/property-data/mcp/src/tools/key-deregister.ts +5 -17
  131. package/payload/platform/plugins/property-data/mcp/src/tools/key-register.ts +29 -33
  132. package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
  133. package/payload/platform/services/claude-session-manager/dist/http-server.js +6 -1
  134. package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
  135. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +7 -0
  136. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
  137. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +8 -0
  138. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
  139. package/payload/platform/templates/agents/admin/IDENTITY.md +1 -1
  140. package/payload/platform/templates/agents/admin/SOUL.md +1 -1
  141. package/payload/premium-plugins/real-agent/BUNDLE.md +4 -2
  142. package/payload/premium-plugins/real-agent/agents/valuer.md +1 -1
  143. package/payload/premium-plugins/real-agent/plugins/.claude-plugin/marketplace.json +5 -0
  144. package/payload/premium-plugins/real-agent/plugins/brochures/skills/property-brochure/SKILL.md +26 -3
  145. package/payload/premium-plugins/real-agent/plugins/brochures/skills/property-brochure/references/registers.md +1 -1
  146. package/payload/premium-plugins/real-agent/plugins/epc/.claude-plugin/plugin.json +17 -0
  147. package/payload/premium-plugins/real-agent/plugins/epc/PLUGIN.md +85 -0
  148. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/index.d.ts +2 -0
  149. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/index.d.ts.map +1 -0
  150. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/index.js +117 -0
  151. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/index.js.map +1 -0
  152. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/crypto.d.ts +3 -0
  153. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/crypto.d.ts.map +1 -0
  154. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/crypto.js +72 -0
  155. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/crypto.js.map +1 -0
  156. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/epc-api.d.ts +60 -0
  157. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/epc-api.d.ts.map +1 -0
  158. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/epc-api.js +181 -0
  159. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/epc-api.js.map +1 -0
  160. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/file-crypto.d.ts +3 -0
  161. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/file-crypto.d.ts.map +1 -0
  162. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/file-crypto.js +49 -0
  163. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/file-crypto.js.map +1 -0
  164. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/key-store.d.ts +15 -0
  165. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/key-store.d.ts.map +1 -0
  166. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/key-store.js +130 -0
  167. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/key-store.js.map +1 -0
  168. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/neo4j.d.ts +5 -0
  169. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/neo4j.d.ts.map +1 -0
  170. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/neo4j.js +38 -0
  171. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/neo4j.js.map +1 -0
  172. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-deregister.d.ts +4 -0
  173. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-deregister.d.ts.map +1 -0
  174. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-deregister.js +9 -0
  175. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-deregister.js.map +1 -0
  176. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-list.d.ts +4 -0
  177. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-list.d.ts.map +1 -0
  178. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-list.js +10 -0
  179. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-list.js.map +1 -0
  180. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-register.d.ts +5 -0
  181. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-register.d.ts.map +1 -0
  182. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-register.js +36 -0
  183. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-register.js.map +1 -0
  184. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/lookup.d.ts +10 -0
  185. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/lookup.d.ts.map +1 -0
  186. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/lookup.js +30 -0
  187. package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/lookup.js.map +1 -0
  188. package/payload/premium-plugins/real-agent/plugins/epc/mcp/package-lock.json +2566 -0
  189. package/payload/premium-plugins/real-agent/plugins/epc/mcp/package.json +21 -0
  190. package/payload/premium-plugins/real-agent/plugins/epc/mcp/src/__tests__/epc-api.test.ts +251 -0
  191. package/payload/premium-plugins/real-agent/plugins/epc/mcp/src/__tests__/key-roundtrip.test.ts +113 -0
  192. package/payload/premium-plugins/real-agent/plugins/epc/mcp/src/__tests__/lookup.test.ts +181 -0
  193. package/payload/premium-plugins/real-agent/plugins/epc/mcp/src/__tests__/schema-parity.test.ts +54 -0
  194. package/payload/premium-plugins/real-agent/plugins/epc/mcp/src/index.ts +156 -0
  195. package/payload/premium-plugins/real-agent/plugins/epc/mcp/src/lib/crypto.ts +79 -0
  196. package/payload/premium-plugins/real-agent/plugins/epc/mcp/src/lib/epc-api.ts +241 -0
  197. package/payload/premium-plugins/real-agent/plugins/epc/mcp/src/lib/file-crypto.ts +55 -0
  198. package/payload/premium-plugins/real-agent/plugins/epc/mcp/src/lib/key-store.ts +172 -0
  199. package/payload/premium-plugins/real-agent/plugins/epc/mcp/src/lib/neo4j.ts +47 -0
  200. package/payload/premium-plugins/real-agent/plugins/epc/mcp/src/tools/key-deregister.ts +9 -0
  201. package/payload/premium-plugins/real-agent/plugins/epc/mcp/src/tools/key-list.ts +10 -0
  202. package/payload/premium-plugins/real-agent/plugins/epc/mcp/src/tools/key-register.ts +44 -0
  203. package/payload/premium-plugins/real-agent/plugins/epc/mcp/src/tools/lookup.ts +43 -0
  204. package/payload/premium-plugins/real-agent/plugins/epc/mcp/tsconfig.json +20 -0
  205. package/payload/premium-plugins/real-agent/plugins/epc/mcp/vitest.config.ts +8 -0
  206. package/payload/premium-plugins/real-agent/plugins/loop/PLUGIN.md +13 -1
  207. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/index.js +8 -7
  208. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/index.js.map +1 -1
  209. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/file-crypto.d.ts +3 -0
  210. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/file-crypto.d.ts.map +1 -0
  211. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/file-crypto.js +48 -0
  212. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/file-crypto.js.map +1 -0
  213. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/key-store.d.ts +22 -0
  214. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/key-store.d.ts.map +1 -0
  215. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/key-store.js +165 -0
  216. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/key-store.js.map +1 -0
  217. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/loop-api.d.ts +1 -1
  218. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/loop-api.d.ts.map +1 -1
  219. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/loop-api.js +4 -39
  220. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/loop-api.js.map +1 -1
  221. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-deregister.d.ts.map +1 -1
  222. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-deregister.js +5 -15
  223. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-deregister.js.map +1 -1
  224. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-register.d.ts.map +1 -1
  225. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-register.js +11 -28
  226. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-register.js.map +1 -1
  227. package/payload/premium-plugins/real-agent/plugins/loop/mcp/src/index.ts +10 -7
  228. package/payload/premium-plugins/real-agent/plugins/loop/mcp/src/lib/file-crypto.ts +54 -0
  229. package/payload/premium-plugins/real-agent/plugins/loop/mcp/src/lib/key-store.ts +221 -0
  230. package/payload/premium-plugins/real-agent/plugins/loop/mcp/src/lib/loop-api.ts +5 -42
  231. package/payload/premium-plugins/real-agent/plugins/loop/mcp/src/tools/key-deregister.ts +5 -20
  232. package/payload/premium-plugins/real-agent/plugins/loop/mcp/src/tools/key-register.ts +14 -39
  233. package/payload/premium-plugins/real-agent/plugins/preval/.claude-plugin/plugin.json +1 -1
  234. package/payload/premium-plugins/real-agent/plugins/preval/PLUGIN.md +23 -17
  235. package/payload/premium-plugins/real-agent/plugins/preval/skills/property-preval/SKILL.md +78 -38
  236. package/payload/premium-plugins/real-agent/plugins/preval/skills/property-preval/references/render.py +288 -81
  237. package/payload/premium-plugins/real-agent/plugins/preval/skills/property-preval/references/template-inputs.schema.json +125 -80
  238. package/payload/premium-plugins/real-agent/plugins/preval/skills/property-preval/references/template.html +184 -124
  239. package/payload/premium-plugins/real-agent/plugins/property-data/PLUGIN.md +14 -1
  240. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/index.js +14 -11
  241. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/index.js.map +1 -1
  242. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/file-crypto.d.ts +3 -0
  243. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/file-crypto.d.ts.map +1 -0
  244. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/file-crypto.js +49 -0
  245. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/file-crypto.js.map +1 -0
  246. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/key-store.d.ts +15 -0
  247. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/key-store.d.ts.map +1 -0
  248. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/key-store.js +135 -0
  249. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/key-store.js.map +1 -0
  250. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/propertydata-api.d.ts +0 -1
  251. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/propertydata-api.d.ts.map +1 -1
  252. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/propertydata-api.js +11 -22
  253. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/propertydata-api.js.map +1 -1
  254. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/endpoints.d.ts.map +1 -1
  255. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/endpoints.js +2 -2
  256. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/endpoints.js.map +1 -1
  257. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-deregister.d.ts.map +1 -1
  258. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-deregister.js +5 -15
  259. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-deregister.js.map +1 -1
  260. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-register.d.ts.map +1 -1
  261. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-register.js +30 -23
  262. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-register.js.map +1 -1
  263. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/index.ts +16 -11
  264. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/lib/file-crypto.ts +55 -0
  265. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/lib/key-store.ts +181 -0
  266. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/lib/propertydata-api.ts +9 -24
  267. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/tools/endpoints.ts +2 -2
  268. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/tools/key-deregister.ts +5 -17
  269. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/tools/key-register.ts +29 -33
  270. package/payload/server/public/assets/{admin-nqCBFiSl.js → admin-DhN3G8W7.js} +51 -51
  271. package/payload/server/public/assets/{data-BGUAGVkV.js → data-B2ZVXOcE.js} +1 -1
  272. package/payload/server/public/assets/{graph-MvYxZOBF.js → graph-BAMGPHrK.js} +1 -1
  273. package/payload/server/public/assets/{graph-labels-D865qb3K.js → graph-labels-D9eBbvxo.js} +1 -1
  274. package/payload/server/public/assets/{page-C2b1nlOc.js → page-CV27Al6Z.js} +1 -1
  275. package/payload/server/public/assets/{page--hOVRrgN.js → page-DjdVMWCz.js} +1 -1
  276. package/payload/server/public/data.html +3 -3
  277. package/payload/server/public/graph.html +3 -3
  278. package/payload/server/public/index.html +4 -4
  279. package/payload/server/server.js +7 -19
  280. package/payload/premium-plugins/real-agent/lib/mcp-stderr-tee/dist/index.d.ts +0 -51
  281. package/payload/premium-plugins/real-agent/lib/mcp-stderr-tee/dist/index.d.ts.map +0 -1
  282. package/payload/premium-plugins/real-agent/lib/mcp-stderr-tee/dist/index.js +0 -196
  283. package/payload/premium-plugins/real-agent/lib/mcp-stderr-tee/dist/index.js.map +0 -1
  284. package/payload/premium-plugins/real-agent/lib/mcp-stderr-tee/package.json +0 -7
@@ -0,0 +1,181 @@
1
+ import { readFileSync, writeFileSync, existsSync, mkdirSync } from "node:fs";
2
+ import { resolve, dirname } from "node:path";
3
+ import { homedir } from "node:os";
4
+ import { getSession } from "./neo4j.js";
5
+ import { encrypt, decrypt } from "./crypto.js";
6
+ import { encryptWith, decryptWith } from "./file-crypto.js";
7
+
8
+ // Storage abstraction so the same MCP body runs against Neo4j (platform mode)
9
+ // or an on-disk encrypted file (standalone mode, e.g. spawned by Claude Code
10
+ // from ~/.claude/). Selected by the PROPERTY_DATA_STANDALONE env flag at
11
+ // boot. See .docs/realagent-mcps-standalone-mode.md for the contract.
12
+
13
+ export interface StoredKey {
14
+ apiKey: string;
15
+ createdAt: string;
16
+ updatedAt: string;
17
+ }
18
+
19
+ export interface KeyStore {
20
+ readonly backendName: string;
21
+ readonly backendPath: string;
22
+ load(accountId: string): Promise<StoredKey | null>;
23
+ save(accountId: string, apiKey: string): Promise<void>;
24
+ delete(accountId: string): Promise<boolean>;
25
+ }
26
+
27
+ class Neo4jKeyStore implements KeyStore {
28
+ readonly backendName = "neo4j";
29
+ readonly backendPath = process.env.NEO4J_URI ?? "<unset>";
30
+
31
+ async load(accountId: string): Promise<StoredKey | null> {
32
+ const session = getSession();
33
+ try {
34
+ const result = await session.run(
35
+ `MATCH (k:PropertyDataKey {accountId: $accountId})
36
+ RETURN k.encryptedKey AS encryptedKey,
37
+ k.createdAt AS createdAt,
38
+ k.updatedAt AS updatedAt`,
39
+ { accountId },
40
+ );
41
+ if (result.records.length === 0) return null;
42
+ const r = result.records[0];
43
+ return {
44
+ apiKey: decrypt(r.get("encryptedKey")),
45
+ createdAt: r.get("createdAt") ?? "",
46
+ updatedAt: r.get("updatedAt") ?? "",
47
+ };
48
+ } finally {
49
+ await session.close();
50
+ }
51
+ }
52
+
53
+ async save(accountId: string, apiKey: string): Promise<void> {
54
+ const encryptedKey = encrypt(apiKey);
55
+ const now = new Date().toISOString();
56
+ const session = getSession();
57
+ try {
58
+ await session.run(
59
+ `CREATE INDEX property_data_key_account IF NOT EXISTS
60
+ FOR (k:PropertyDataKey) ON (k.accountId)`,
61
+ {},
62
+ );
63
+ await session.run(
64
+ `MERGE (k:PropertyDataKey {accountId: $accountId})
65
+ ON CREATE SET k.encryptedKey = $encryptedKey, k.createdAt = $now, k.updatedAt = $now
66
+ ON MATCH SET k.encryptedKey = $encryptedKey, k.updatedAt = $now`,
67
+ { accountId, encryptedKey, now },
68
+ );
69
+ } finally {
70
+ await session.close();
71
+ }
72
+ }
73
+
74
+ async delete(accountId: string): Promise<boolean> {
75
+ const session = getSession();
76
+ try {
77
+ const result = await session.run(
78
+ `MATCH (k:PropertyDataKey {accountId: $accountId})
79
+ DELETE k
80
+ RETURN count(k) AS deleted`,
81
+ { accountId },
82
+ );
83
+ const deleted = result.records[0]?.get("deleted")?.toNumber?.() ?? 0;
84
+ return deleted > 0;
85
+ } finally {
86
+ await session.close();
87
+ }
88
+ }
89
+ }
90
+
91
+ // FileKeyStore — single key per accountId stored as an AES-256-GCM-encrypted
92
+ // JSON blob. The file holds a map { [accountId]: { encryptedKey, createdAt,
93
+ // updatedAt } } so it parallels the Neo4j shape, but in standalone mode the
94
+ // accountId is "local" (only one).
95
+
96
+ interface FileEnvelope {
97
+ [accountId: string]: { encryptedKey: string; createdAt: string; updatedAt: string };
98
+ }
99
+
100
+ const LABEL = "property-data";
101
+
102
+ class FileKeyStore implements KeyStore {
103
+ readonly backendName = "file";
104
+ readonly backendPath: string;
105
+ private readonly storePath: string;
106
+ private readonly keyFilePath: string;
107
+
108
+ constructor() {
109
+ const home = homedir();
110
+ this.storePath = resolve(home, ".claude/.realagent-property-data-key.enc");
111
+ this.keyFilePath = resolve(home, ".claude/.realagent-property-data-encryption-key");
112
+ this.backendPath = this.storePath;
113
+ }
114
+
115
+ private ensureDir(): void {
116
+ mkdirSync(dirname(this.storePath), { recursive: true });
117
+ }
118
+
119
+ private readAll(): FileEnvelope {
120
+ if (!existsSync(this.storePath)) return {};
121
+ const blob = readFileSync(this.storePath, "utf-8").trim();
122
+ if (!blob) return {};
123
+ const json = decryptWith(blob, this.keyFilePath, LABEL);
124
+ return JSON.parse(json) as FileEnvelope;
125
+ }
126
+
127
+ private writeAll(env: FileEnvelope): void {
128
+ this.ensureDir();
129
+ const blob = encryptWith(JSON.stringify(env), this.keyFilePath, LABEL);
130
+ writeFileSync(this.storePath, blob, { mode: 0o600 });
131
+ }
132
+
133
+ async load(accountId: string): Promise<StoredKey | null> {
134
+ const env = this.readAll();
135
+ const entry = env[accountId];
136
+ if (!entry) return null;
137
+ // The encryptedKey field is double-encrypted: the file blob is decrypted
138
+ // above, the inner field is the original AES-GCM-wrapped key. Keep the
139
+ // inner layer so an unauthenticated read of decrypted JSON still doesn't
140
+ // expose the API key directly in process memory until decryptWith runs.
141
+ return {
142
+ apiKey: decryptWith(entry.encryptedKey, this.keyFilePath, LABEL),
143
+ createdAt: entry.createdAt,
144
+ updatedAt: entry.updatedAt,
145
+ };
146
+ }
147
+
148
+ async save(accountId: string, apiKey: string): Promise<void> {
149
+ const env = this.readAll();
150
+ const now = new Date().toISOString();
151
+ const encryptedKey = encryptWith(apiKey, this.keyFilePath, LABEL);
152
+ const prev = env[accountId];
153
+ env[accountId] = {
154
+ encryptedKey,
155
+ createdAt: prev?.createdAt ?? now,
156
+ updatedAt: now,
157
+ };
158
+ this.writeAll(env);
159
+ }
160
+
161
+ async delete(accountId: string): Promise<boolean> {
162
+ const env = this.readAll();
163
+ if (!(accountId in env)) return false;
164
+ delete env[accountId];
165
+ this.writeAll(env);
166
+ return true;
167
+ }
168
+ }
169
+
170
+ let cached: KeyStore | null = null;
171
+
172
+ export function selectKeyStore(): KeyStore {
173
+ if (cached) return cached;
174
+ cached = process.env.PROPERTY_DATA_STANDALONE === "1" ? new FileKeyStore() : new Neo4jKeyStore();
175
+ return cached;
176
+ }
177
+
178
+ // Test seam — used by unit tests to reset the cached store between cases.
179
+ export function _resetKeyStoreForTests(): void {
180
+ cached = null;
181
+ }
@@ -1,5 +1,4 @@
1
- import { getSession } from "./neo4j.js";
2
- import { decrypt } from "./crypto.js";
1
+ import { selectKeyStore } from "./key-store.js";
3
2
 
4
3
  // PropertyData API V1 client. Every endpoint is a GET against
5
4
  // https://api.propertydata.co.uk/<endpoint> with `key=<api-key>` plus
@@ -42,37 +41,23 @@ export class BadResponseError extends Error {
42
41
  }
43
42
 
44
43
  export interface PropertyDataKey {
45
- encryptedKey: string;
46
44
  createdAt: string;
47
45
  updatedAt: string;
48
46
  }
49
47
 
50
48
  export async function loadAccountKey(accountId: string): Promise<PropertyDataKey | null> {
51
- const session = getSession();
52
- try {
53
- const result = await session.run(
54
- `MATCH (k:PropertyDataKey {accountId: $accountId})
55
- RETURN k.encryptedKey AS encryptedKey,
56
- k.createdAt AS createdAt,
57
- k.updatedAt AS updatedAt`,
58
- { accountId },
59
- );
60
- if (result.records.length === 0) return null;
61
- const r = result.records[0];
62
- return {
63
- encryptedKey: r.get("encryptedKey"),
64
- createdAt: r.get("createdAt") ?? "",
65
- updatedAt: r.get("updatedAt") ?? "",
66
- };
67
- } finally {
68
- await session.close();
69
- }
49
+ const stored = await selectKeyStore().load(accountId);
50
+ if (!stored) return null;
51
+ return { createdAt: stored.createdAt, updatedAt: stored.updatedAt };
70
52
  }
71
53
 
72
54
  export async function resolveAccountApiKey(accountId: string): Promise<string> {
73
- const stored = await loadAccountKey(accountId);
55
+ // Bypass for one-shot CLI runs: explicit env var beats stored key.
56
+ const envKey = process.env.PROPERTY_DATA_API_KEY;
57
+ if (envKey && envKey.trim()) return envKey.trim();
58
+ const stored = await selectKeyStore().load(accountId);
74
59
  if (!stored) throw new KeyNotRegisteredError();
75
- return decrypt(stored.encryptedKey);
60
+ return stored.apiKey;
76
61
  }
77
62
 
78
63
  export interface CallOptions {
@@ -19,12 +19,12 @@ function call(toolName: string, endpoint: string, args: Args): Promise<string> {
19
19
  export const valuationSale = (a: Args) => call("property-data-valuation-sale", "valuation-sale", a);
20
20
  export const valuationRent = (a: Args) => call("property-data-valuation-rent", "valuation-rent", a);
21
21
  export const prices = (a: Args) => call("property-data-prices", "prices", a);
22
- export const pricesRent = (a: Args) => call("property-data-prices-rent", "prices-rent", a);
22
+ export const pricesRent = (a: Args) => call("property-data-prices-rent", "rents", a);
23
23
  export const soldPrices = (a: Args) => call("property-data-sold-prices", "sold-prices", a);
24
24
  export const demand = (a: Args) => call("property-data-demand", "demand", a);
25
25
  export const yields = (a: Args) => call("property-data-yields", "yields", a);
26
26
  export const growth = (a: Args) => call("property-data-growth", "growth", a);
27
- export const nationalHpi = (a: Args) => call("property-data-national-hpi", "national-hpi", a);
27
+ export const nationalHpi = (a: Args) => call("property-data-national-hpi", "national-data", a);
28
28
 
29
29
  // Task 144 — 10 additional read endpoints (£/sqft, area risk,
30
30
  // planning precedent, UPRN, demand-rent, property-type mix).
@@ -1,21 +1,9 @@
1
- import { getSession } from "../lib/neo4j.js";
1
+ import { selectKeyStore } from "../lib/key-store.js";
2
2
 
3
3
  export async function keyDeregister(params: { accountId: string }): Promise<void> {
4
- const { accountId } = params;
5
- const session = getSession();
6
- try {
7
- const result = await session.run(
8
- `MATCH (k:PropertyDataKey {accountId: $accountId})
9
- DELETE k
10
- RETURN count(k) AS deleted`,
11
- { accountId },
12
- );
13
- const deleted = result.records[0]?.get("deleted")?.toNumber?.() ?? 0;
14
- if (deleted === 0) {
15
- throw new Error("No PropertyData API key is registered for this account.");
16
- }
17
- } finally {
18
- await session.close();
4
+ const deleted = await selectKeyStore().delete(params.accountId);
5
+ if (!deleted) {
6
+ throw new Error("No PropertyData API key is registered for this account.");
19
7
  }
20
- console.error(`[property-data] key-op op=deregister account=${accountId}`);
8
+ console.error(`[property-data] key-op op=deregister account=${params.accountId}`);
21
9
  }
@@ -1,27 +1,45 @@
1
- import { getSession } from "../lib/neo4j.js";
2
- import { encrypt } from "../lib/crypto.js";
1
+ import { selectKeyStore } from "../lib/key-store.js";
3
2
  import { PropertyDataError } from "../lib/propertydata-api.js";
4
3
 
5
4
  const BASE_URL = "https://api.propertydata.co.uk";
6
5
  const REQUEST_TIMEOUT_MS = 15_000;
7
6
 
8
- // Validate by hitting a cheap endpoint that returns success on any valid key:
9
- // /national-hpi takes no postcode and is rate-cheap. Treat a 200 as the key
10
- // passing PropertyData's authentication check; treat 401/403 as an explicit
11
- // key rejection so the operator gets an actionable message; treat anything
12
- // else as an unverified-key error (network, upstream outage).
7
+ // Validate the key against PropertyData's /valuation-sale endpoint with no
8
+ // inputs a valid key returns HTTP 400 + body code 701 "Missing input:
9
+ // property_type" (proof the key was accepted), without consuming a credit.
10
+ // An invalid key returns auth failure (401/403) or a different upstream code.
11
+ // Evidence: probing `/national-hpi` returns code X01 "Invalid API endpoint"
12
+ // — that path does not exist on PropertyData; `/valuation-sale` does.
13
+
13
14
  async function validateApiKey(apiKey: string): Promise<void> {
14
- const url = `${BASE_URL}/national-hpi?key=${encodeURIComponent(apiKey)}`;
15
+ // Probe /valuation-sale with one input. Evidence-backed envelopes:
16
+ // invalid key → {code:"X03", message:"Invalid input: key"}
17
+ // valid key → {code:"701", message:"Missing input: property_type"} (no credit)
18
+ // PropertyData does not charge for missing-input errors, so this is a free probe.
19
+ const url = `${BASE_URL}/valuation-sale?key=${encodeURIComponent(apiKey)}&postcode=SW1A1AA`;
15
20
  const response = await fetch(url, {
16
21
  headers: { Accept: "application/json" },
17
22
  signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
18
23
  });
24
+ const body = await response.text().catch(() => "");
19
25
  if (response.status === 401 || response.status === 403) {
20
26
  throw new Error(`PropertyData rejected the API key (HTTP ${response.status}).`);
21
27
  }
28
+ let parsed: { status?: string; code?: string; message?: string } = {};
29
+ try { parsed = JSON.parse(body); } catch { /* fall through */ }
30
+ if (parsed.code === "X03") {
31
+ throw new Error(`PropertyData rejected the API key (code=X03 ${parsed.message ?? "Invalid input: key"}).`);
32
+ }
33
+ // 701 (missing-input) or status:"success" both prove the key was authenticated.
34
+ // Any other envelope: surface raw so the operator sees the upstream error.
35
+ if (parsed.status === "success" || parsed.code === "701") return;
36
+ if (parsed.status === "error") {
37
+ throw new Error(
38
+ `PropertyData validate probe returned unexpected envelope (code=${parsed.code ?? "?"} message=${parsed.message ?? "?"}).`,
39
+ );
40
+ }
22
41
  if (!response.ok) {
23
- const body = await response.text().catch(() => "");
24
- throw new PropertyDataError(response.status, "national-hpi", body.slice(0, 200));
42
+ throw new PropertyDataError(response.status, "valuation-sale", body.slice(0, 200));
25
43
  }
26
44
  }
27
45
 
@@ -30,29 +48,7 @@ export async function keyRegister(params: {
30
48
  accountId: string;
31
49
  }): Promise<void> {
32
50
  const { apiKey, accountId } = params;
33
-
34
51
  await validateApiKey(apiKey);
35
-
36
- const encryptedKey = encrypt(apiKey);
37
- const now = new Date().toISOString();
38
-
39
- const session = getSession();
40
- try {
41
- await session.run(
42
- `CREATE INDEX property_data_key_account IF NOT EXISTS
43
- FOR (k:PropertyDataKey) ON (k.accountId)`,
44
- {},
45
- );
46
-
47
- await session.run(
48
- `MERGE (k:PropertyDataKey {accountId: $accountId})
49
- ON CREATE SET k.encryptedKey = $encryptedKey, k.createdAt = $now, k.updatedAt = $now
50
- ON MATCH SET k.encryptedKey = $encryptedKey, k.updatedAt = $now`,
51
- { accountId, encryptedKey, now },
52
- );
53
- } finally {
54
- await session.close();
55
- }
56
-
52
+ await selectKeyStore().save(accountId, apiKey);
57
53
  console.error(`[property-data] key-op op=register account=${accountId}`);
58
54
  }