@rubytech/create-maxy-code 0.1.27 → 0.1.29

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 (526) hide show
  1. package/dist/index.js +18 -8
  2. package/package.json +1 -1
  3. package/payload/platform/lib/oauth-llm/dist/index.d.ts +4 -6
  4. package/payload/platform/lib/oauth-llm/dist/index.d.ts.map +1 -1
  5. package/payload/platform/lib/oauth-llm/dist/index.js +4 -6
  6. package/payload/platform/lib/oauth-llm/dist/index.js.map +1 -1
  7. package/payload/platform/lib/oauth-llm/src/index.ts +4 -6
  8. package/payload/platform/package-lock.json +0 -41
  9. package/payload/platform/plugins/admin/mcp/dist/index.js +1 -1
  10. package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
  11. package/payload/platform/plugins/admin/skills/plugin-management/SKILL.md +1 -1
  12. package/payload/platform/plugins/buyers/.claude-plugin/plugin.json +1 -1
  13. package/payload/platform/plugins/buyers/PLUGIN.md +1 -1
  14. package/payload/platform/plugins/docs/references/deployment.md +2 -2
  15. package/payload/platform/plugins/docs/references/plugins-guide.md +1 -1
  16. package/payload/platform/plugins/email/mcp/package.json +0 -1
  17. package/payload/platform/plugins/estate-business/.claude-plugin/plugin.json +1 -1
  18. package/payload/platform/plugins/estate-business/PLUGIN.md +1 -1
  19. package/payload/platform/plugins/estate-coaching/.claude-plugin/plugin.json +1 -1
  20. package/payload/platform/plugins/estate-coaching/PLUGIN.md +1 -1
  21. package/payload/platform/plugins/estate-onboarding/.claude-plugin/plugin.json +1 -1
  22. package/payload/platform/plugins/estate-onboarding/PLUGIN.md +1 -1
  23. package/payload/platform/plugins/estate-sales/.claude-plugin/plugin.json +1 -1
  24. package/payload/platform/plugins/estate-sales/PLUGIN.md +1 -1
  25. package/payload/platform/plugins/estate-teaching/.claude-plugin/plugin.json +1 -1
  26. package/payload/platform/plugins/estate-teaching/PLUGIN.md +1 -1
  27. package/payload/platform/plugins/leads/.claude-plugin/plugin.json +1 -1
  28. package/payload/platform/plugins/leads/PLUGIN.md +1 -1
  29. package/payload/platform/plugins/listings/.claude-plugin/plugin.json +1 -1
  30. package/payload/platform/plugins/listings/PLUGIN.md +1 -1
  31. package/payload/platform/plugins/loop/.claude-plugin/plugin.json +2 -2
  32. package/payload/platform/plugins/loop/PLUGIN.md +47 -24
  33. package/payload/platform/plugins/memory/mcp/package.json +0 -1
  34. package/payload/platform/plugins/real-agency/plugins/.claude-plugin/marketplace.json +13 -0
  35. package/payload/platform/plugins/real-agency/plugins/loop/.claude-plugin/plugin.json +17 -0
  36. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/index.d.ts +2 -0
  37. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/index.d.ts.map +1 -0
  38. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/index.js +293 -0
  39. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/index.js.map +1 -0
  40. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.d.ts +10 -0
  41. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.d.ts.map +1 -0
  42. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.js +88 -0
  43. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.js.map +1 -0
  44. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.d.ts +82 -0
  45. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.d.ts.map +1 -0
  46. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.js +427 -0
  47. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.js.map +1 -0
  48. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.d.ts +5 -0
  49. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.d.ts.map +1 -0
  50. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.js +40 -0
  51. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.js.map +1 -0
  52. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.d.ts +10 -0
  53. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.d.ts.map +1 -0
  54. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.js +24 -0
  55. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.js.map +1 -0
  56. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.d.ts +16 -0
  57. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.d.ts.map +1 -0
  58. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.js +35 -0
  59. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.js.map +1 -0
  60. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.d.ts +5 -0
  61. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.d.ts.map +1 -0
  62. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.js +19 -0
  63. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.js.map +1 -0
  64. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.d.ts +4 -0
  65. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.d.ts.map +1 -0
  66. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.js +14 -0
  67. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.js.map +1 -0
  68. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.d.ts +9 -0
  69. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.d.ts.map +1 -0
  70. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.js +60 -0
  71. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.js.map +1 -0
  72. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts +13 -0
  73. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts.map +1 -0
  74. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.js +41 -0
  75. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.js.map +1 -0
  76. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts +9 -0
  77. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts.map +1 -0
  78. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.js +16 -0
  79. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.js.map +1 -0
  80. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts +15 -0
  81. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts.map +1 -0
  82. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.js +11 -0
  83. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.js.map +1 -0
  84. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.d.ts +10 -0
  85. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.d.ts.map +1 -0
  86. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.js +39 -0
  87. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.js.map +1 -0
  88. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.d.ts +9 -0
  89. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.d.ts.map +1 -0
  90. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.js +125 -0
  91. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.js.map +1 -0
  92. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.d.ts +18 -0
  93. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.d.ts.map +1 -0
  94. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.js +87 -0
  95. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.js.map +1 -0
  96. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.d.ts +10 -0
  97. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.d.ts.map +1 -0
  98. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.js +82 -0
  99. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.js.map +1 -0
  100. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.d.ts +12 -0
  101. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.d.ts.map +1 -0
  102. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.js +32 -0
  103. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.js.map +1 -0
  104. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.d.ts +15 -0
  105. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.d.ts.map +1 -0
  106. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.js +11 -0
  107. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.js.map +1 -0
  108. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.d.ts +16 -0
  109. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.d.ts.map +1 -0
  110. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.js +41 -0
  111. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.js.map +1 -0
  112. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.d.ts +13 -0
  113. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.d.ts.map +1 -0
  114. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.js +49 -0
  115. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.js.map +1 -0
  116. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.d.ts +7 -0
  117. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.d.ts.map +1 -0
  118. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.js +19 -0
  119. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.js.map +1 -0
  120. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.d.ts +5 -0
  121. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.d.ts.map +1 -0
  122. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.js +32 -0
  123. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.js.map +1 -0
  124. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.d.ts +14 -0
  125. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.d.ts.map +1 -0
  126. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.js +11 -0
  127. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.js.map +1 -0
  128. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.d.ts +9 -0
  129. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.d.ts.map +1 -0
  130. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.js +85 -0
  131. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.js.map +1 -0
  132. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.d.ts +13 -0
  133. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.d.ts.map +1 -0
  134. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.js +44 -0
  135. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.js.map +1 -0
  136. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.d.ts +14 -0
  137. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.d.ts.map +1 -0
  138. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.js +18 -0
  139. package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.js.map +1 -0
  140. package/payload/platform/plugins/vendors/.claude-plugin/plugin.json +1 -1
  141. package/payload/platform/plugins/vendors/PLUGIN.md +1 -1
  142. package/payload/premium-plugins/real-agency/plugins/.claude-plugin/marketplace.json +0 -50
  143. package/payload/premium-plugins/real-agency/plugins/loop/.claude-plugin/plugin.json +3 -3
  144. package/payload/premium-plugins/{real-agency → real-agent}/BUNDLE.md +2 -2
  145. package/payload/premium-plugins/{real-agency → real-agent}/agents/buyer-enquiry/template.json +1 -1
  146. package/payload/premium-plugins/real-agent/plugins/.claude-plugin/marketplace.json +63 -0
  147. package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/.claude-plugin/plugin.json +1 -1
  148. package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/PLUGIN.md +1 -1
  149. package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/.claude-plugin/plugin.json +1 -1
  150. package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/PLUGIN.md +1 -1
  151. package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/.claude-plugin/plugin.json +1 -1
  152. package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/PLUGIN.md +1 -1
  153. package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-onboarding/.claude-plugin/plugin.json +1 -1
  154. package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-onboarding/PLUGIN.md +1 -1
  155. package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/.claude-plugin/plugin.json +1 -1
  156. package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/PLUGIN.md +1 -1
  157. package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-teaching/.claude-plugin/plugin.json +1 -1
  158. package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-teaching/PLUGIN.md +1 -1
  159. package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/.claude-plugin/plugin.json +1 -1
  160. package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/PLUGIN.md +1 -1
  161. package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/.claude-plugin/plugin.json +1 -1
  162. package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/PLUGIN.md +1 -1
  163. package/payload/premium-plugins/real-agent/plugins/loop/.claude-plugin/plugin.json +17 -0
  164. package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/PLUGIN.md +47 -24
  165. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/index.d.ts +2 -0
  166. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/index.d.ts.map +1 -0
  167. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/index.js +293 -0
  168. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/index.js.map +1 -0
  169. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/crypto.d.ts +10 -0
  170. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/crypto.d.ts.map +1 -0
  171. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/crypto.js +88 -0
  172. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/crypto.js.map +1 -0
  173. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/loop-api.d.ts +82 -0
  174. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/loop-api.d.ts.map +1 -0
  175. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/loop-api.js +427 -0
  176. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/loop-api.js.map +1 -0
  177. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/neo4j.d.ts +5 -0
  178. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/neo4j.d.ts.map +1 -0
  179. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/neo4j.js +40 -0
  180. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/neo4j.js.map +1 -0
  181. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/customer-preferences.d.ts +10 -0
  182. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/customer-preferences.d.ts.map +1 -0
  183. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/customer-preferences.js +24 -0
  184. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/customer-preferences.js.map +1 -0
  185. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/feedback.d.ts +16 -0
  186. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/feedback.d.ts.map +1 -0
  187. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/feedback.js +35 -0
  188. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/feedback.js.map +1 -0
  189. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-deregister.d.ts +5 -0
  190. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-deregister.d.ts.map +1 -0
  191. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-deregister.js +19 -0
  192. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-deregister.js.map +1 -0
  193. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-list.d.ts +4 -0
  194. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-list.d.ts.map +1 -0
  195. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-list.js +14 -0
  196. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-list.js.map +1 -0
  197. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-register.d.ts +9 -0
  198. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-register.d.ts.map +1 -0
  199. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-register.js +60 -0
  200. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-register.js.map +1 -0
  201. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts +13 -0
  202. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts.map +1 -0
  203. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-enquiry.js +41 -0
  204. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-enquiry.js.map +1 -0
  205. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts +9 -0
  206. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts.map +1 -0
  207. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match-batch.js +16 -0
  208. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match-batch.js.map +1 -0
  209. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts +15 -0
  210. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts.map +1 -0
  211. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match-request.js +11 -0
  212. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match-request.js.map +1 -0
  213. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match.d.ts +10 -0
  214. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match.d.ts.map +1 -0
  215. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match.js +39 -0
  216. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match.js.map +1 -0
  217. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/people-detail.d.ts +9 -0
  218. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/people-detail.d.ts.map +1 -0
  219. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/people-detail.js +125 -0
  220. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/people-detail.js.map +1 -0
  221. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/people-search.d.ts +18 -0
  222. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/people-search.d.ts.map +1 -0
  223. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/people-search.js +87 -0
  224. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/people-search.js.map +1 -0
  225. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-detail.d.ts +10 -0
  226. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-detail.d.ts.map +1 -0
  227. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-detail.js +82 -0
  228. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-detail.js.map +1 -0
  229. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-listed.d.ts +12 -0
  230. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-listed.d.ts.map +1 -0
  231. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-listed.js +32 -0
  232. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-listed.js.map +1 -0
  233. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-request.d.ts +15 -0
  234. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-request.d.ts.map +1 -0
  235. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-request.js +11 -0
  236. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-request.js.map +1 -0
  237. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-search.d.ts +16 -0
  238. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-search.d.ts.map +1 -0
  239. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-search.js +41 -0
  240. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-search.js.map +1 -0
  241. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/supplier.d.ts +13 -0
  242. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/supplier.d.ts.map +1 -0
  243. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/supplier.js +49 -0
  244. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/supplier.js.map +1 -0
  245. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/team-availability.d.ts +7 -0
  246. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/team-availability.d.ts.map +1 -0
  247. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/team-availability.js +19 -0
  248. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/team-availability.js.map +1 -0
  249. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/team-info.d.ts +5 -0
  250. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/team-info.d.ts.map +1 -0
  251. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/team-info.js +32 -0
  252. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/team-info.js.map +1 -0
  253. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-create.d.ts +14 -0
  254. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-create.d.ts.map +1 -0
  255. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-create.js +11 -0
  256. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-create.js.map +1 -0
  257. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-detail.d.ts +9 -0
  258. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-detail.d.ts.map +1 -0
  259. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-detail.js +85 -0
  260. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-detail.js.map +1 -0
  261. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-search.d.ts +13 -0
  262. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-search.d.ts.map +1 -0
  263. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-search.js +44 -0
  264. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-search.js.map +1 -0
  265. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-update.d.ts +14 -0
  266. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-update.d.ts.map +1 -0
  267. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-update.js +18 -0
  268. package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-update.js.map +1 -0
  269. package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/.claude-plugin/plugin.json +1 -1
  270. package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/PLUGIN.md +1 -1
  271. package/payload/server/public/assets/{admin-DW8IJcLc.js → admin-CDvF5de6.js} +5 -5
  272. package/payload/server/public/index.html +1 -1
  273. /package/payload/premium-plugins/{real-agency → real-agent}/agents/buyer-enquiry/IDENTITY.md +0 -0
  274. /package/payload/premium-plugins/{real-agency → real-agent}/agents/buyer-enquiry/SOUL.md +0 -0
  275. /package/payload/premium-plugins/{real-agency → real-agent}/agents/compliance.md +0 -0
  276. /package/payload/premium-plugins/{real-agency → real-agent}/agents/negotiator.md +0 -0
  277. /package/payload/premium-plugins/{real-agency → real-agent}/agents/valuer.md +0 -0
  278. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/.claude-plugin/plugin.json +0 -0
  279. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/PLUGIN.md +0 -0
  280. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/commands/make-brochure.md +0 -0
  281. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/a4-print-documents/SKILL.md +0 -0
  282. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/brand-design/SKILL.md +0 -0
  283. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/make-brochure/SKILL.md +0 -0
  284. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/make-brochure/references/seller-brief-template.md +0 -0
  285. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/SKILL.md +0 -0
  286. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/build.md +0 -0
  287. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/copy.md +0 -0
  288. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/images.md +0 -0
  289. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/index-landing.md +0 -0
  290. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/index.html +0 -0
  291. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/placeholders.md +0 -0
  292. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/registers.md +0 -0
  293. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/seller-brief.md +0 -0
  294. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/structure.md +0 -0
  295. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/template.html +0 -0
  296. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-extract/SKILL.md +0 -0
  297. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-feedback/SKILL.md +0 -0
  298. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/SKILL.md +0 -0
  299. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/references/buyer-qualification-questions.md +0 -0
  300. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/references/buyer-qualification.md +0 -0
  301. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/references/buyer-scripts.md +0 -0
  302. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/references/buyer-working-scripts.md +0 -0
  303. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/references/feedback-collection.md +0 -0
  304. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/references/offer-capture.md +0 -0
  305. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/references/viewing-booking.md +0 -0
  306. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/references/viewing-management.md +0 -0
  307. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-seller-guides/SKILL.md +0 -0
  308. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-seller-guides/references/care-fees-guide.md +0 -0
  309. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-seller-guides/references/divorce-sales-guide.md +0 -0
  310. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-seller-guides/references/downsizing-guide.md +0 -0
  311. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-seller-guides/references/first-time-buyers.md +0 -0
  312. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-seller-guides/references/first-time-sellers.md +0 -0
  313. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-seller-guides/references/probate-guide.md +0 -0
  314. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-seller-guides/references/upsizing-guide.md +0 -0
  315. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/property-enquiry/SKILL.md +0 -0
  316. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/viewing-management/SKILL.md +0 -0
  317. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/SKILL.md +0 -0
  318. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/buy-back-your-time.md +0 -0
  319. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/firewave-gost-scorecards.md +0 -0
  320. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/keller-org-model.md +0 -0
  321. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/lencioni-team-models.md +0 -0
  322. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/listing-management-system.md +0 -0
  323. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/net-figure-form.md +0 -0
  324. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/serhant-bizinbox-notes.md +0 -0
  325. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/team-roles-commission.md +0 -0
  326. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/va-2026-ops.md +0 -0
  327. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/wingman-structure.md +0 -0
  328. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-operations/SKILL.md +0 -0
  329. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-operations/references/crm-systems.md +0 -0
  330. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-operations/references/hiring-guide.md +0 -0
  331. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-operations/references/impact-framework.md +0 -0
  332. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-operations/references/minutes-equal-money.md +0 -0
  333. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-operations/references/team-management.md +0 -0
  334. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/commission-calculator/SKILL.md +0 -0
  335. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/exp-partnership/SKILL.md +0 -0
  336. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/exp-partnership/references/12-reasons.md +0 -0
  337. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/exp-partnership/references/95-5-system.md +0 -0
  338. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/exp-partnership/references/agent-attraction-scripts.md +0 -0
  339. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/exp-partnership/references/business-partnership.md +0 -0
  340. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/exp-partnership/references/exp-model-overview.md +0 -0
  341. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/exp-partnership/references/model-comparison.md +0 -0
  342. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/exp-partnership/references/revenue-share-explained.md +0 -0
  343. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/month-end-close/SKILL.md +0 -0
  344. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/payment-batch-stager/SKILL.md +0 -0
  345. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/period-reconciler/SKILL.md +0 -0
  346. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/SKILL.md +0 -0
  347. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/attraction-agent-notes.md +0 -0
  348. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/attraction-agent.md +0 -0
  349. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/authenticity-boundaries.md +0 -0
  350. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/become-a-brand-leader-notes.md +0 -0
  351. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/blast-formula.md +0 -0
  352. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/brand-leader.md +0 -0
  353. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/brand-strategy-system.md +0 -0
  354. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/content-engine.md +0 -0
  355. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/firewave-blast-and-blogging.md +0 -0
  356. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/gary-v-content.md +0 -0
  357. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/gary-v-principles.md +0 -0
  358. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/oversubscribed-positioning.md +0 -0
  359. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/platforms.md +0 -0
  360. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/priestley-oversubscribed.md +0 -0
  361. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/storeys-style-examples.md +0 -0
  362. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/visual-identity.md +0 -0
  363. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/agent-performance/SKILL.md +0 -0
  364. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/agent-performance/references/atomic-habits.md +0 -0
  365. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/agent-performance/references/daily-routine-scorecard.md +0 -0
  366. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/agent-performance/references/hp6-model.md +0 -0
  367. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/agent-performance/references/twelve-week-year.md +0 -0
  368. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/bespoke-coaching/SKILL.md +0 -0
  369. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/bespoke-coaching/references/coaching-boundaries.md +0 -0
  370. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/bespoke-coaching/references/feedback-framework.md +0 -0
  371. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/bespoke-coaching/references/performance-framework.md +0 -0
  372. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/coaching-toolkit/SKILL.md +0 -0
  373. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/coaching-toolkit/references/coaching-exercises.md +0 -0
  374. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/coaching-toolkit/references/goal-setting.md +0 -0
  375. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/coaching-toolkit/references/one-to-one-framework.md +0 -0
  376. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/coaching-toolkit/references/soi-workbook.md +0 -0
  377. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/serhant-training/SKILL.md +0 -0
  378. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/serhant-training/references/agent-training-guide.md +0 -0
  379. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/serhant-training/references/business-in-a-box.md +0 -0
  380. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/serhant-training/references/buyers-guide.md +0 -0
  381. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/serhant-training/references/codo-method.md +0 -0
  382. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/serhant-training/references/website-planning-guide.md +0 -0
  383. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-onboarding/skills/bootstrap/SKILL.md +0 -0
  384. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-onboarding/skills/bootstrap/references/onboarding-flow.md +0 -0
  385. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/chase-progression/SKILL.md +0 -0
  386. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/negotiation/SKILL.md +0 -0
  387. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/negotiation/references/deal-saving.md +0 -0
  388. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/negotiation/references/negotiation-deep-guide.md +0 -0
  389. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/negotiation/references/negotiation-prep-principles.md +0 -0
  390. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/negotiation/references/negotiation-techniques.md +0 -0
  391. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/negotiation/references/offer-presentation.md +0 -0
  392. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/risk-scorer/SKILL.md +0 -0
  393. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-closer/SKILL.md +0 -0
  394. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-closer/references/serhant-emotion-stages.md +0 -0
  395. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-discovery/SKILL.md +0 -0
  396. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-discovery/references/chris-voss-discovery.md +0 -0
  397. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-discovery/references/firewave-gost-journey.md +0 -0
  398. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-discovery/references/phil-jones-openers.md +0 -0
  399. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-discovery/references/pre-listing-checklist.md +0 -0
  400. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-discovery/references/serhant-improv.md +0 -0
  401. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-discovery/references/tom-ferry-discovery.md +0 -0
  402. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-discovery/references/vendor-motivation-competitor.md +0 -0
  403. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-negotiation/SKILL.md +0 -0
  404. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-negotiation/references/chris-voss-negotiation.md +0 -0
  405. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-negotiation/references/phil-jones-price-words.md +0 -0
  406. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-negotiation/references/serhant-negotiation-plus.md +0 -0
  407. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-negotiation/references/tom-panos-commission-pricing.md +0 -0
  408. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-negotiation/references/tony-morris-questioning.md +0 -0
  409. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-progression/SKILL.md +0 -0
  410. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-progression/references/conveyancing-guide.md +0 -0
  411. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-progression/references/transaction-tracking.md +0 -0
  412. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-teaching/skills/content-directory/SKILL.md +0 -0
  413. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-teaching/skills/content-directory/references/module-delivery.md +0 -0
  414. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-teaching/skills/content-directory/references/progress-tracking.md +0 -0
  415. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/chain-progression-tracker/SKILL.md +0 -0
  416. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/diary-builder/SKILL.md +0 -0
  417. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/enquiry-triage/SKILL.md +0 -0
  418. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/SKILL.md +0 -0
  419. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/buyer-search-letter.md +0 -0
  420. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/buyer-search-letters.md +0 -0
  421. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/database-reactivation.md +0 -0
  422. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/email-nurture-sequences.md +0 -0
  423. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/facebook-referrals.md +0 -0
  424. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/firewave-email-nurture-sequences.md +0 -0
  425. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/keller-33-touch.md +0 -0
  426. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/neighbour-letters.md +0 -0
  427. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/neighbour-notification-letter.md +0 -0
  428. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/ofi-follow-up-dialogue.md +0 -0
  429. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/ofi-follow-up.md +0 -0
  430. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/serhant-three-fs-plus.md +0 -0
  431. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/sharran-10x10x10.md +0 -0
  432. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/sms-templates.md +0 -0
  433. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/sphere-of-influence-notes.md +0 -0
  434. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/sphere-of-influence.md +0 -0
  435. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/tom-panos-sms-templates.md +0 -0
  436. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/morning-round/SKILL.md +0 -0
  437. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/prospecting/SKILL.md +0 -0
  438. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/prospecting/references/database-matching.md +0 -0
  439. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/prospecting/references/database-value.md +0 -0
  440. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/prospecting/references/prospecting-dialogues.md +0 -0
  441. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/prospecting/references/reactivation.md +0 -0
  442. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/comparable-finder/SKILL.md +0 -0
  443. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/epc-checker/SKILL.md +0 -0
  444. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/home-preparation/SKILL.md +0 -0
  445. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/home-preparation/references/kerb-appeal.md +0 -0
  446. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/home-preparation/references/photo-day.md +0 -0
  447. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/home-preparation/references/situational-tips.md +0 -0
  448. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/home-preparation/references/staging-guide.md +0 -0
  449. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/listing-copy-writer/SKILL.md +0 -0
  450. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/listing-presentation/SKILL.md +0 -0
  451. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/listing-presentation/references/booking-script.md +0 -0
  452. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/listing-presentation/references/objection-scripts.md +0 -0
  453. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/listing-presentation/references/penhaul-presentation.md +0 -0
  454. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/listing-presentation/references/pre-listing-kit.md +0 -0
  455. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/listing-presentation/references/set-to-sell.md +0 -0
  456. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/listing-presentation/references/sharran-frameworks.md +0 -0
  457. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/local-market-stats/SKILL.md +0 -0
  458. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/new-instruction/SKILL.md +0 -0
  459. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/particulars-builder/SKILL.md +0 -0
  460. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/portal-launch-scheduler/SKILL.md +0 -0
  461. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/pricing-scenario-builder/SKILL.md +0 -0
  462. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/property-marketing/SKILL.md +0 -0
  463. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/property-marketing/references/auction-report-template.md +0 -0
  464. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/property-marketing/references/coming-soon-campaign.md +0 -0
  465. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/property-marketing/references/direct-mail-templates.md +0 -0
  466. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/property-marketing/references/eoi-form-template.md +0 -0
  467. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/property-marketing/references/monthly-scorecard.md +0 -0
  468. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/supplier-booker/SKILL.md +0 -0
  469. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/talk-track-composer/SKILL.md +0 -0
  470. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/terms-of-business-drafter/SKILL.md +0 -0
  471. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/valuation-prep/SKILL.md +0 -0
  472. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/package-lock.json +0 -0
  473. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/package.json +0 -0
  474. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/__tests__/loop-swagger.snapshot.json +0 -0
  475. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/__tests__/swagger-write-coverage.test.ts +0 -0
  476. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/index.ts +0 -0
  477. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/lib/crypto.ts +0 -0
  478. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/lib/loop-api.ts +0 -0
  479. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/lib/neo4j.ts +0 -0
  480. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/customer-preferences.ts +0 -0
  481. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/feedback.ts +0 -0
  482. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/key-deregister.ts +0 -0
  483. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/key-list.ts +0 -0
  484. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/key-register.ts +0 -0
  485. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/marketing-enquiry.ts +0 -0
  486. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/marketing-match-batch.ts +0 -0
  487. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/marketing-match-request.ts +0 -0
  488. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/marketing-match.ts +0 -0
  489. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/people-detail.ts +0 -0
  490. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/people-search.ts +0 -0
  491. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/property-detail.ts +0 -0
  492. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/property-listed.ts +0 -0
  493. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/property-request.ts +0 -0
  494. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/property-search.ts +0 -0
  495. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/supplier.ts +0 -0
  496. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/team-availability.ts +0 -0
  497. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/team-info.ts +0 -0
  498. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/viewing-create.ts +0 -0
  499. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/viewing-detail.ts +0 -0
  500. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/viewing-search.ts +0 -0
  501. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/viewing-update.ts +0 -0
  502. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/tsconfig.json +0 -0
  503. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/vitest.config.ts +0 -0
  504. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/skills/compliance-flag-checker/SKILL.md +0 -0
  505. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/skills/priority-ranker/SKILL.md +0 -0
  506. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/skills/tone-matched-drafter/SKILL.md +0 -0
  507. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/skills/variance-narrator/SKILL.md +0 -0
  508. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/skills/vendor-research/SKILL.md +0 -0
  509. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/SKILL.md +0 -0
  510. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/fee-protection-and-agenda.md +0 -0
  511. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/listing-scripts.md +0 -0
  512. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/negotiation-deep-guide.md +0 -0
  513. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/price-alignment-scripts.md +0 -0
  514. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/price-alignment.md +0 -0
  515. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/scenario-scripts.md +0 -0
  516. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/seller-engagement.md +0 -0
  517. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/valuation-booking.md +0 -0
  518. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/vendor-scripts.md +0 -0
  519. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/vendor-updates.md +0 -0
  520. /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-updates/SKILL.md +0 -0
  521. /package/payload/premium-plugins/{real-agency → real-agent}/specs/00-architecture-and-customization.md +0 -0
  522. /package/payload/premium-plugins/{real-agency → real-agent}/specs/01-morning-round.md +0 -0
  523. /package/payload/premium-plugins/{real-agency → real-agent}/specs/02-valuation-prep.md +0 -0
  524. /package/payload/premium-plugins/{real-agency → real-agent}/specs/03-new-instruction.md +0 -0
  525. /package/payload/premium-plugins/{real-agency → real-agent}/specs/04-chase-progression.md +0 -0
  526. /package/payload/premium-plugins/{real-agency → real-agent}/specs/05-month-end-close.md +0 -0
@@ -0,0 +1,82 @@
1
+ export interface LoopTeamKey {
2
+ teamName: string;
3
+ encryptedKey: string;
4
+ teamAddress: string;
5
+ agentId: string;
6
+ permissions: string[];
7
+ createdAt: string;
8
+ updatedAt: string;
9
+ }
10
+ export interface TeamResult<T> {
11
+ teamName: string;
12
+ data: T[];
13
+ }
14
+ export interface AggregationFailure {
15
+ teamName: string;
16
+ reason: string;
17
+ kind: "timeout" | "other";
18
+ }
19
+ export interface AggregationResult<T> {
20
+ results: TeamResult<T>[];
21
+ failures: AggregationFailure[];
22
+ skipped: {
23
+ teamName: string;
24
+ reason: string;
25
+ }[];
26
+ totalTeams: number;
27
+ }
28
+ /**
29
+ * Load all LoopTeamKey nodes for an account from Neo4j.
30
+ */
31
+ export declare function loadTeamKeys(accountId: string): Promise<LoopTeamKey[]>;
32
+ /**
33
+ * Make a GET request to the Loop API V2.
34
+ */
35
+ export declare function loopGet<T>(apiKey: string, path: string, toolName: string, teamName: string): Promise<T>;
36
+ /**
37
+ * Make a POST request to the Loop API V2.
38
+ * For write operations: create viewings, record feedback, submit enquiries, etc.
39
+ * Returns parsed JSON response. Treats 204 as success with empty result.
40
+ */
41
+ export declare function loopPost<T>(apiKey: string, path: string, body: unknown, toolName: string, teamName: string): Promise<T>;
42
+ /**
43
+ * Make a PUT request to the Loop API V2.
44
+ * For update operations: batch matching, submit quotes, update preferences, etc.
45
+ */
46
+ export declare function loopPut<T>(apiKey: string, path: string, body: unknown, toolName: string, teamName: string): Promise<T>;
47
+ export declare class LoopApiError extends Error {
48
+ readonly status: number;
49
+ readonly teamName: string;
50
+ readonly path: string;
51
+ readonly responseBody?: string | undefined;
52
+ constructor(status: number, teamName: string, path: string, responseBody?: string | undefined);
53
+ }
54
+ /**
55
+ * Fan out a request across all registered teams for an account, merging results.
56
+ *
57
+ * Each tool provides a `buildRequest` function that takes a decrypted API key
58
+ * and returns the data for that team. The aggregation engine handles:
59
+ * - Key loading and decryption
60
+ * - Permission checking
61
+ * - Concurrent fan-out via Promise.allSettled
62
+ * - Result merging with teamName tags
63
+ * - Aggregate logging
64
+ *
65
+ * When `teamName` is provided, only that team is queried (no fan-out).
66
+ */
67
+ export declare function aggregateAcrossTeams<T>(accountId: string, endpointGroup: string, toolName: string, buildRequest: (apiKey: string, teamName: string) => Promise<T[]>, options?: {
68
+ teamName?: string;
69
+ limitPerTeam?: number;
70
+ limitTotal?: number;
71
+ }): Promise<AggregationResult<T>>;
72
+ /**
73
+ * Resolve a single team's API key with permission checking.
74
+ * Handles key loading, decryption, and permission validation.
75
+ * Used for both reads and writes that target a specific team — no fan-out.
76
+ */
77
+ export declare function withTeamKey<T>(accountId: string, teamName: string, endpointGroup: string, toolName: string, execute: (apiKey: string) => Promise<T>): Promise<T>;
78
+ /**
79
+ * Format an aggregation result into a human-readable text response.
80
+ */
81
+ export declare function formatAggregationResult<T>(result: AggregationResult<T>, formatItem: (item: T, teamName: string) => string, entityName: string): string;
82
+ //# sourceMappingURL=loop-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loop-api.d.ts","sourceRoot":"","sources":["../../src/lib/loop-api.ts"],"names":[],"mappings":"AA0FA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC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MAAM;aACZ,YAAY,CAAC,EAAE,MAAM;gBAHrB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,YAAY,CAAC,EAAE,MAAM,YAAA;CAMxC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,oBAAoB,CAAC,CAAC,EAC1C,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,EAChE,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAC1E,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAgI/B;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,CAAC,EACjC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GACtC,OAAO,CAAC,CAAC,CAAC,CAqBZ;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,EACvC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAC5B,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,EACjD,UAAU,EAAE,MAAM,GACjB,MAAM,CA6DR"}
@@ -0,0 +1,427 @@
1
+ import { getSession } from "./neo4j.js";
2
+ import { decrypt } from "./crypto.js";
3
+ // ─────────────────────────────────────────────────────────────────
4
+ // Loop API V2 HTTP Client + Cross-Team Aggregation Engine
5
+ //
6
+ // ┌─ Load LoopTeamKey nodes (Neo4j) ─┐
7
+ // │ │
8
+ // ▼ │
9
+ // For each key: │
10
+ // 1. Decrypt API key │
11
+ // 2. Check permissions │
12
+ // 3. HTTP GET/POST/PUT → Loop API V2 │
13
+ // │ │
14
+ // ▼ │
15
+ // Promise.allSettled → merge results │
16
+ // Log aggregate summary │
17
+ // ─────────────────────────────────────────────────────────────────
18
+ const LOOP_BASE_URL = "https://api.loop.software";
19
+ const REQUEST_TIMEOUT_MS = 10_000;
20
+ const TIMEOUT_RETRY_BACKOFF_MS = 2_000;
21
+ const DEFAULT_LIMIT_PER_TEAM = 50;
22
+ const DEFAULT_LIMIT_TOTAL = 200;
23
+ // One bounded retry on transient timeout — recovers from intermittent
24
+ // Loop-API latency spikes that would otherwise drop a team from coverage.
25
+ function isTimeoutError(err) {
26
+ if (!(err instanceof Error))
27
+ return false;
28
+ return (err.name === "TimeoutError" ||
29
+ err.name === "AbortError" ||
30
+ /aborted due to timeout/i.test(err.message));
31
+ }
32
+ function isEnvelope(val) {
33
+ return (val !== null &&
34
+ typeof val === "object" &&
35
+ !Array.isArray(val) &&
36
+ "statusCode" in val &&
37
+ "httpResponseCode" in val &&
38
+ "data" in val);
39
+ }
40
+ function unwrapEnvelope(parsed, toolName, teamName) {
41
+ if (!isEnvelope(parsed)) {
42
+ return parsed;
43
+ }
44
+ if (parsed.statusCode !== "success") {
45
+ const errMsg = parsed.errors?.length
46
+ ? parsed.errors.join("; ")
47
+ : `statusCode=${parsed.statusCode}`;
48
+ throw new Error(`Loop API error for team=${teamName} tool=${toolName}: ${errMsg} (httpResponseCode=${parsed.httpResponseCode})`);
49
+ }
50
+ if (parsed.warnings?.length) {
51
+ console.error(`[loop] ${toolName} team=${teamName} warnings: ${parsed.warnings.join("; ")}`);
52
+ }
53
+ return parsed.data;
54
+ }
55
+ /**
56
+ * Load all LoopTeamKey nodes for an account from Neo4j.
57
+ */
58
+ export async function loadTeamKeys(accountId) {
59
+ const session = getSession();
60
+ try {
61
+ const result = await session.run(`MATCH (k:LoopTeamKey {accountId: $accountId})
62
+ RETURN k.teamName AS teamName, k.encryptedKey AS encryptedKey,
63
+ k.teamAddress AS teamAddress, k.agentId AS agentId,
64
+ k.permissions AS permissions, k.createdAt AS createdAt,
65
+ k.updatedAt AS updatedAt
66
+ ORDER BY k.teamName`, { accountId });
67
+ return result.records.map((r) => ({
68
+ teamName: r.get("teamName"),
69
+ encryptedKey: r.get("encryptedKey"),
70
+ teamAddress: r.get("teamAddress") ?? "",
71
+ agentId: r.get("agentId") ?? "",
72
+ permissions: r.get("permissions") ?? [],
73
+ createdAt: r.get("createdAt") ?? "",
74
+ updatedAt: r.get("updatedAt") ?? "",
75
+ }));
76
+ }
77
+ finally {
78
+ await session.close();
79
+ }
80
+ }
81
+ // Truncate to 200 chars, escape newlines, single line — `[loop] <tool> team=<t>
82
+ // status=<n> body="<...>"`. Emitted at the wrapper boundary before throwing so
83
+ // the body is visible regardless of how downstream catch sites format the error
84
+ // (the aggregator at line ~388 reduces LoopApiError to "HTTP <status>" and
85
+ // would otherwise discard the body).
86
+ function logErrorBody(toolName, teamName, status, body) {
87
+ const truncated = body.slice(0, 200).replace(/\n/g, "\\n");
88
+ console.error(`[loop] ${toolName} team=${teamName} status=${status} body="${truncated}"`);
89
+ }
90
+ /**
91
+ * Make a GET request to the Loop API V2.
92
+ */
93
+ export async function loopGet(apiKey, path, toolName, teamName) {
94
+ const url = `${LOOP_BASE_URL}${path}`;
95
+ const start = Date.now();
96
+ const response = await fetch(url, {
97
+ headers: { "X-Api-Key": apiKey, "Accept": "application/json" },
98
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
99
+ });
100
+ const duration = Date.now() - start;
101
+ console.error(`[loop] ${toolName} team=${teamName} endpoint=GET ${path} status=${response.status} duration=${duration}ms`);
102
+ if (response.status === 204) {
103
+ return [];
104
+ }
105
+ if (!response.ok) {
106
+ const errorBody = await response.text().catch(() => "");
107
+ logErrorBody(toolName, teamName, response.status, errorBody);
108
+ throw new LoopApiError(response.status, teamName, path, errorBody);
109
+ }
110
+ const text = await response.text();
111
+ try {
112
+ const parsed = JSON.parse(text);
113
+ return unwrapEnvelope(parsed, toolName, teamName);
114
+ }
115
+ catch (err) {
116
+ if (err instanceof SyntaxError) {
117
+ throw new Error(`Loop returned non-JSON response for team=${teamName} path=${path} ` +
118
+ `(status=${response.status}, length=${text.length})`);
119
+ }
120
+ throw err;
121
+ }
122
+ }
123
+ /**
124
+ * Make a POST request to the Loop API V2.
125
+ * For write operations: create viewings, record feedback, submit enquiries, etc.
126
+ * Returns parsed JSON response. Treats 204 as success with empty result.
127
+ */
128
+ export async function loopPost(apiKey, path, body, toolName, teamName) {
129
+ const url = `${LOOP_BASE_URL}${path}`;
130
+ const start = Date.now();
131
+ const response = await fetch(url, {
132
+ method: "POST",
133
+ headers: {
134
+ "X-Api-Key": apiKey,
135
+ "Accept": "application/json",
136
+ "Content-Type": "application/json",
137
+ },
138
+ body: JSON.stringify(body),
139
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
140
+ });
141
+ const duration = Date.now() - start;
142
+ console.error(`[loop] WRITE ${toolName} team=${teamName} endpoint=POST ${path} status=${response.status} duration=${duration}ms`);
143
+ if (response.status === 204) {
144
+ return { success: true };
145
+ }
146
+ if (!response.ok) {
147
+ const errorBody = await response.text().catch(() => "");
148
+ logErrorBody(toolName, teamName, response.status, errorBody);
149
+ throw new LoopApiError(response.status, teamName, path, errorBody);
150
+ }
151
+ const text = await response.text();
152
+ try {
153
+ const parsed = JSON.parse(text);
154
+ return unwrapEnvelope(parsed, toolName, teamName);
155
+ }
156
+ catch (err) {
157
+ if (err instanceof SyntaxError) {
158
+ throw new Error(`Loop returned non-JSON response for team=${teamName} path=${path} ` +
159
+ `(status=${response.status}, length=${text.length})`);
160
+ }
161
+ throw err;
162
+ }
163
+ }
164
+ /**
165
+ * Make a PUT request to the Loop API V2.
166
+ * For update operations: batch matching, submit quotes, update preferences, etc.
167
+ */
168
+ export async function loopPut(apiKey, path, body, toolName, teamName) {
169
+ const url = `${LOOP_BASE_URL}${path}`;
170
+ const start = Date.now();
171
+ const response = await fetch(url, {
172
+ method: "PUT",
173
+ headers: {
174
+ "X-Api-Key": apiKey,
175
+ "Accept": "application/json",
176
+ "Content-Type": "application/json",
177
+ },
178
+ body: JSON.stringify(body),
179
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
180
+ });
181
+ const duration = Date.now() - start;
182
+ console.error(`[loop] WRITE ${toolName} team=${teamName} endpoint=PUT ${path} status=${response.status} duration=${duration}ms`);
183
+ if (response.status === 204) {
184
+ return { success: true };
185
+ }
186
+ if (!response.ok) {
187
+ const errorBody = await response.text().catch(() => "");
188
+ logErrorBody(toolName, teamName, response.status, errorBody);
189
+ throw new LoopApiError(response.status, teamName, path, errorBody);
190
+ }
191
+ const text = await response.text();
192
+ try {
193
+ const parsed = JSON.parse(text);
194
+ return unwrapEnvelope(parsed, toolName, teamName);
195
+ }
196
+ catch (err) {
197
+ if (err instanceof SyntaxError) {
198
+ throw new Error(`Loop returned non-JSON response for team=${teamName} path=${path} ` +
199
+ `(status=${response.status}, length=${text.length})`);
200
+ }
201
+ throw err;
202
+ }
203
+ }
204
+ export class LoopApiError extends Error {
205
+ status;
206
+ teamName;
207
+ path;
208
+ responseBody;
209
+ constructor(status, teamName, path, responseBody) {
210
+ const detail = responseBody ? ` — ${responseBody.slice(0, 200)}` : "";
211
+ super(`Loop API returned ${status} for team=${teamName} path=${path}${detail}`);
212
+ this.status = status;
213
+ this.teamName = teamName;
214
+ this.path = path;
215
+ this.responseBody = responseBody;
216
+ this.name = "LoopApiError";
217
+ }
218
+ }
219
+ /**
220
+ * Fan out a request across all registered teams for an account, merging results.
221
+ *
222
+ * Each tool provides a `buildRequest` function that takes a decrypted API key
223
+ * and returns the data for that team. The aggregation engine handles:
224
+ * - Key loading and decryption
225
+ * - Permission checking
226
+ * - Concurrent fan-out via Promise.allSettled
227
+ * - Result merging with teamName tags
228
+ * - Aggregate logging
229
+ *
230
+ * When `teamName` is provided, only that team is queried (no fan-out).
231
+ */
232
+ export async function aggregateAcrossTeams(accountId, endpointGroup, toolName, buildRequest, options) {
233
+ const allKeys = await loadTeamKeys(accountId);
234
+ if (allKeys.length === 0) {
235
+ return { results: [], failures: [], skipped: [], totalTeams: 0 };
236
+ }
237
+ // Filter to specific team if requested
238
+ const keys = options?.teamName
239
+ ? allKeys.filter((k) => k.teamName === options.teamName)
240
+ : allKeys;
241
+ if (keys.length === 0 && options?.teamName) {
242
+ return {
243
+ results: [],
244
+ failures: [{ teamName: options.teamName, reason: "Team not found", kind: "other" }],
245
+ skipped: [],
246
+ totalTeams: allKeys.length,
247
+ };
248
+ }
249
+ const limitPerTeam = options?.limitPerTeam ?? DEFAULT_LIMIT_PER_TEAM;
250
+ const limitTotal = options?.limitTotal ?? DEFAULT_LIMIT_TOTAL;
251
+ const results = [];
252
+ const failures = [];
253
+ const skipped = [];
254
+ // Check permissions and build per-team request thunks. Thunks (not stored
255
+ // promises) are required so a timed-out attempt can be re-invoked on retry.
256
+ const tasks = [];
257
+ for (const key of keys) {
258
+ if (!key.permissions.includes(endpointGroup)) {
259
+ console.error(`[loop] ${toolName} team=${key.teamName} — permission denied (requires: ${endpointGroup})`);
260
+ skipped.push({
261
+ teamName: key.teamName,
262
+ reason: `No ${endpointGroup} permission`,
263
+ });
264
+ continue;
265
+ }
266
+ let apiKey;
267
+ try {
268
+ apiKey = decrypt(key.encryptedKey);
269
+ }
270
+ catch (err) {
271
+ const msg = err instanceof Error ? err.message : String(err);
272
+ console.error(`[loop] decrypt failed for team=${key.teamName}: ${msg}`);
273
+ failures.push({
274
+ teamName: key.teamName,
275
+ reason: "Decryption failed",
276
+ kind: "other",
277
+ });
278
+ continue;
279
+ }
280
+ const teamName = key.teamName;
281
+ tasks.push({
282
+ key,
283
+ run: async () => {
284
+ try {
285
+ return await buildRequest(apiKey, teamName);
286
+ }
287
+ catch (err) {
288
+ if (!isTimeoutError(err))
289
+ throw err;
290
+ console.error(`[loop] ${toolName} team=${teamName} timed out — retrying in ${TIMEOUT_RETRY_BACKOFF_MS}ms`);
291
+ await new Promise((resolve) => setTimeout(resolve, TIMEOUT_RETRY_BACKOFF_MS));
292
+ return await buildRequest(apiKey, teamName);
293
+ }
294
+ },
295
+ });
296
+ }
297
+ // Fan out concurrent requests
298
+ const settled = await Promise.allSettled(tasks.map((t) => t.run()));
299
+ for (let i = 0; i < settled.length; i++) {
300
+ const outcome = settled[i];
301
+ const teamName = tasks[i].key.teamName;
302
+ if (outcome.status === "fulfilled") {
303
+ const data = Array.isArray(outcome.value)
304
+ ? outcome.value.slice(0, limitPerTeam)
305
+ : [];
306
+ results.push({ teamName, data });
307
+ }
308
+ else {
309
+ const reason = outcome.reason instanceof LoopApiError
310
+ ? `HTTP ${outcome.reason.status}`
311
+ : outcome.reason instanceof Error
312
+ ? outcome.reason.message
313
+ : String(outcome.reason);
314
+ const kind = isTimeoutError(outcome.reason)
315
+ ? "timeout"
316
+ : "other";
317
+ console.error(`[loop] ${toolName} team=${teamName} failed: ${reason}`);
318
+ failures.push({ teamName, reason, kind });
319
+ }
320
+ }
321
+ // Apply total limit across all teams
322
+ let totalItems = 0;
323
+ for (const r of results) {
324
+ const remaining = limitTotal - totalItems;
325
+ if (remaining <= 0) {
326
+ r.data = [];
327
+ }
328
+ else if (r.data.length > remaining) {
329
+ r.data = r.data.slice(0, remaining);
330
+ }
331
+ totalItems += r.data.length;
332
+ }
333
+ const timedOutCount = failures.filter((f) => f.kind === "timeout").length;
334
+ const erroredCount = failures.length - timedOutCount;
335
+ console.error(`[loop] aggregate tool=${toolName} teams=${keys.length} ` +
336
+ `succeeded=${results.length} failed=${failures.length} skipped=${skipped.length}`);
337
+ console.error(`[loop] aggregate-coverage tool=${toolName} requested=${keys.length} ` +
338
+ `answered=${results.length} timed_out=${timedOutCount} errored=${erroredCount}`);
339
+ return { results, failures, skipped, totalTeams: allKeys.length };
340
+ }
341
+ /**
342
+ * Resolve a single team's API key with permission checking.
343
+ * Handles key loading, decryption, and permission validation.
344
+ * Used for both reads and writes that target a specific team — no fan-out.
345
+ */
346
+ export async function withTeamKey(accountId, teamName, endpointGroup, toolName, execute) {
347
+ const allKeys = await loadTeamKeys(accountId);
348
+ if (allKeys.length === 0) {
349
+ throw new Error("No Loop teams registered. Use loop-key-register to add team API keys.");
350
+ }
351
+ const key = allKeys.find((k) => k.teamName === teamName);
352
+ if (!key) {
353
+ const available = allKeys.map((k) => k.teamName).join(", ");
354
+ throw new Error(`Team "${teamName}" not found. Available teams: ${available}`);
355
+ }
356
+ if (!key.permissions.includes(endpointGroup)) {
357
+ throw new Error(`Team "${teamName}" does not have ${endpointGroup} permission. ` +
358
+ `Current permissions: ${key.permissions.join(", ")}`);
359
+ }
360
+ const apiKey = decrypt(key.encryptedKey);
361
+ return execute(apiKey);
362
+ }
363
+ /**
364
+ * Format an aggregation result into a human-readable text response.
365
+ */
366
+ export function formatAggregationResult(result, formatItem, entityName) {
367
+ if (result.totalTeams === 0) {
368
+ return "No Loop teams registered. Use loop-key-register to add team API keys.";
369
+ }
370
+ const allSkippedOrFailed = result.results.length === 0 && result.failures.length + result.skipped.length > 0;
371
+ if (allSkippedOrFailed) {
372
+ const reasons = [
373
+ ...result.failures.map((f) => `${f.teamName}: ${f.reason}`),
374
+ ...result.skipped.map((s) => `${s.teamName}: ${s.reason}`),
375
+ ];
376
+ return `All teams failed or were skipped:\n${reasons.join("\n")}`;
377
+ }
378
+ const lines = [];
379
+ let totalItems = 0;
380
+ for (const teamResult of result.results) {
381
+ if (teamResult.data.length === 0)
382
+ continue;
383
+ totalItems += teamResult.data.length;
384
+ lines.push(`\n## ${teamResult.teamName}`);
385
+ for (const item of teamResult.data) {
386
+ lines.push(formatItem(item, teamResult.teamName));
387
+ }
388
+ }
389
+ // Coverage = teams that had a chance to answer (succeeded + failed). Skipped
390
+ // teams are excluded from the denominator: they were configured-out, not lost.
391
+ const answered = result.results.length;
392
+ const failed = result.failures.length;
393
+ const totalCovered = answered + failed;
394
+ const coverageNote = formatCoverageNote(result.failures);
395
+ if (totalItems === 0) {
396
+ if (failed > 0) {
397
+ return `No ${entityName} found across ${answered} of ${totalCovered} teams (${coverageNote}).`;
398
+ }
399
+ const teamCount = result.results.length === 1
400
+ ? result.results[0].teamName
401
+ : `${result.results.length} teams`;
402
+ return `No ${entityName} found across ${teamCount}.`;
403
+ }
404
+ const teamCountFragment = failed > 0 ? `${answered} of ${totalCovered} team(s)` : `${answered} team(s)`;
405
+ let header = `${totalItems} ${entityName} across ${teamCountFragment}:`;
406
+ const parts = [header, ...lines];
407
+ if (failed > 0) {
408
+ parts.push(`\n---\nNote: ${coverageNote}.`);
409
+ }
410
+ if (result.skipped.length > 0) {
411
+ parts.push(`Note: ${result.skipped.length} team(s) skipped (insufficient permissions).`);
412
+ }
413
+ return parts.join("\n");
414
+ }
415
+ function formatCoverageNote(failures) {
416
+ const timedOut = failures.filter((f) => f.kind === "timeout");
417
+ const errored = failures.filter((f) => f.kind !== "timeout");
418
+ const fragments = [];
419
+ if (timedOut.length > 0) {
420
+ fragments.push(`${timedOut.length} timed out: ${timedOut.map((f) => f.teamName).join(", ")}`);
421
+ }
422
+ if (errored.length > 0) {
423
+ fragments.push(`${errored.length} errored: ${errored.map((f) => f.teamName).join(", ")}`);
424
+ }
425
+ return fragments.join("; ");
426
+ }
427
+ //# sourceMappingURL=loop-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loop-api.js","sourceRoot":"","sources":["../../src/lib/loop-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,oEAAoE;AACpE,0DAA0D;AAC1D,EAAE;AACF,yCAAyC;AACzC,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C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D,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;IAC7D,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,SAAS,CAAC,IAAI,CACZ,GAAG,QAAQ,CAAC,MAAM,eAAe,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC9E,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,SAAS,CAAC,IAAI,CACZ,GAAG,OAAO,CAAC,MAAM,aAAa,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC1E,CAAC;IACJ,CAAC;IACD,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Driver, Session } from "neo4j-driver";
2
+ export declare function getDriver(): Driver;
3
+ export declare function getSession(): Session;
4
+ export declare function closeDriver(): Promise<void>;
5
+ //# sourceMappingURL=neo4j.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"neo4j.d.ts","sourceRoot":"","sources":["../../src/lib/neo4j.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAuBtD,wBAAgB,SAAS,IAAI,MAAM,CAgBlC;AAED,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AAED,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAKjD"}
@@ -0,0 +1,40 @@
1
+ import neo4j from "neo4j-driver";
2
+ import { readFileSync } from "node:fs";
3
+ import { resolve } from "node:path";
4
+ let driver = null;
5
+ function readPassword() {
6
+ if (process.env.NEO4J_PASSWORD)
7
+ return process.env.NEO4J_PASSWORD;
8
+ const passwordFile = resolve(process.env.PLATFORM_ROOT ?? resolve(import.meta.dirname, "../../../.."), "config/.neo4j-password");
9
+ try {
10
+ return readFileSync(passwordFile, "utf-8").trim();
11
+ }
12
+ catch {
13
+ throw new Error(`Neo4j password not found. Expected at ${passwordFile} or in NEO4J_PASSWORD env var.`);
14
+ }
15
+ }
16
+ export function getDriver() {
17
+ if (!driver) {
18
+ // Task 580: NEO4J_URI must be explicit. Silent default to :7687 was the
19
+ // vector for Task 577's orphan data in Maxy's DB from a realagent install.
20
+ const uri = process.env.NEO4J_URI;
21
+ if (!uri) {
22
+ throw new Error("[loop] NEO4J_URI unset — refusing to default to bolt://localhost:7687 (Task 580)");
23
+ }
24
+ const user = process.env.NEO4J_USER ?? "neo4j";
25
+ const password = readPassword();
26
+ console.error(`[loop] resolved neo4j_uri=${uri}`);
27
+ driver = neo4j.driver(uri, neo4j.auth.basic(user, password));
28
+ }
29
+ return driver;
30
+ }
31
+ export function getSession() {
32
+ return getDriver().session();
33
+ }
34
+ export async function closeDriver() {
35
+ if (driver) {
36
+ await driver.close();
37
+ driver = null;
38
+ }
39
+ }
40
+ //# sourceMappingURL=neo4j.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"neo4j.js","sourceRoot":"","sources":["../../src/lib/neo4j.ts"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,IAAI,MAAM,GAAkB,IAAI,CAAC;AAEjC,SAAS,YAAY;IACnB,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc;QAAE,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IAElE,MAAM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ction = "read" | "write";
2
+ export declare function customerPreferences(params: {
3
+ accountId: string;
4
+ teamName: string;
5
+ personCode: number;
6
+ action: PreferencesAction;
7
+ preferences?: Record<string, unknown>;
8
+ }): Promise<string>;
9
+ export {};
10
+ //# sourceMappingURL=customer-preferences.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customer-preferences.d.ts","sourceRoot":"","sources":["../../src/tools/customer-preferences.ts"],"names":[],"mappings":"AAEA,KAAK,iBAAiB,GAAG,MAAM,GAAG,OAAO,CAAC;AAmB1C,wBAAsB,mBAAmB,CAAC,MAAM,EAAE;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC,GAAG,OAAO,CAAC,MAAM,CAAC,CAsClB"}
@@ -0,0 +1,24 @@
1
+ import { loopGet, loopPost, withTeamKey } from "../lib/loop-api.js";
2
+ export async function customerPreferences(params) {
3
+ const { accountId, teamName, personCode, action } = params;
4
+ if (action === "read") {
5
+ const result = await withTeamKey(accountId, teamName, "customer", "loop-customer-preferences", async (apiKey) => {
6
+ return loopGet(apiKey, `/customer/preferences/${personCode}`, "loop-customer-preferences", teamName);
7
+ });
8
+ if (!result || (Array.isArray(result) && result.length === 0)) {
9
+ return `No preferences found for person ${personCode} via team "${teamName}".`;
10
+ }
11
+ return JSON.stringify(result, null, 2);
12
+ }
13
+ if (action === "write") {
14
+ if (!params.preferences) {
15
+ throw new Error("preferences object is required when action is 'write'.");
16
+ }
17
+ await withTeamKey(accountId, teamName, "customer", "loop-customer-preferences", async (apiKey) => {
18
+ return loopPost(apiKey, `/customer/preferences/${personCode}`, params.preferences, "loop-customer-preferences", teamName);
19
+ });
20
+ return `Preferences updated for person ${personCode} via team "${teamName}".`;
21
+ }
22
+ throw new Error(`Unknown action: ${action}. Use "read" or "write".`);
23
+ }
24
+ //# sourceMappingURL=customer-preferences.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customer-preferences.js","sourceRoot":"","sources":["../../src/tools/customer-preferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAqBpE,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,MAMzC;IACC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAE3D,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,MAAM,MAAM,GAAG,MAAM,WAAW,CAC9B,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,2BAA2B,EAC5D,KAAK,EAAE,MAAM,EAAE,EAAE;YACf,OAAO,OAAO,CACZ,MAAM,EAAE,yBAAyB,UAAU,EAAE,EAC7C,2BAA2B,EAAE,QAAQ,CACtC,CAAC;QACJ,CAAC,CACF,CAAC;QAEF,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;YAC9D,OAAO,mCAAmC,UAAU,cAAc,QAAQ,IAAI,CAAC;QACjF,CAAC;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;QACvB,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAC5E,CAAC;QAED,MAAM,WAAW,CACf,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,2BAA2B,EAC5D,KAAK,EAAE,MAAM,EAAE,EAAE;YACf,OAAO,QAAQ,CACb,MAAM,EAAE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