@rubytech/create-maxy-code 0.1.49 → 0.1.57

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 (317) hide show
  1. package/dist/__tests__/platform-port-stamp.test.js +24 -0
  2. package/dist/index.js +5 -2
  3. package/dist/port-resolution.js +2 -0
  4. package/package.json +1 -1
  5. package/payload/platform/lib/require-port-env/dist/index.d.ts +31 -0
  6. package/payload/platform/lib/require-port-env/dist/index.d.ts.map +1 -0
  7. package/payload/platform/lib/require-port-env/dist/index.js +52 -0
  8. package/payload/platform/lib/require-port-env/dist/index.js.map +1 -0
  9. package/payload/platform/lib/require-port-env/src/index.ts +56 -0
  10. package/payload/platform/lib/require-port-env/tsconfig.json +8 -0
  11. package/payload/platform/package-lock.json +0 -1
  12. package/payload/platform/package.json +2 -3
  13. package/payload/platform/plugins/admin/PLUGIN.md +16 -3
  14. package/payload/platform/plugins/admin/hooks/__tests__/turn-completed-graph-write.test.sh +184 -146
  15. package/payload/platform/plugins/admin/hooks/turn-completed-graph-write.sh +186 -112
  16. package/payload/platform/plugins/admin/mcp/dist/index.js +20 -12
  17. package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
  18. package/payload/platform/plugins/brochures/PLUGIN.md +2 -0
  19. package/payload/platform/plugins/brochures/skills/property-market-report/SKILL.md +100 -0
  20. package/payload/platform/plugins/brochures/skills/property-market-report/references/render.py +267 -0
  21. package/payload/platform/plugins/brochures/skills/property-market-report/references/template.html +266 -0
  22. package/payload/platform/plugins/brochures/skills/property-socials/SKILL.md +141 -0
  23. package/payload/platform/plugins/cloudflare/mcp/dist/lib/setup-orchestrator.d.ts.map +1 -1
  24. package/payload/platform/plugins/cloudflare/mcp/dist/lib/setup-orchestrator.js +2 -1
  25. package/payload/platform/plugins/cloudflare/mcp/dist/lib/setup-orchestrator.js.map +1 -1
  26. package/payload/platform/plugins/docs/PLUGIN.md +3 -1
  27. package/payload/platform/plugins/docs/references/admin-session.md +40 -0
  28. package/payload/platform/plugins/docs/references/deployment.md +25 -0
  29. package/payload/platform/plugins/docs/references/internals.md +30 -0
  30. package/payload/platform/plugins/docs/references/platform.md +3 -1
  31. package/payload/platform/plugins/docs/references/plugins-guide.md +1 -1
  32. package/payload/platform/plugins/docs/references/troubleshooting.md +1 -1
  33. package/payload/platform/plugins/email/mcp/dist/lib/claude-bridge.d.ts.map +1 -1
  34. package/payload/platform/plugins/email/mcp/dist/lib/claude-bridge.js +2 -1
  35. package/payload/platform/plugins/email/mcp/dist/lib/claude-bridge.js.map +1 -1
  36. package/payload/platform/plugins/loop/PLUGIN.md +24 -0
  37. package/payload/platform/plugins/loop/mcp/src/__tests__/plugin-md-time-doctrine.test.ts +132 -0
  38. package/payload/platform/plugins/memory/.claude-plugin/plugin.json +1 -1
  39. package/payload/platform/plugins/memory/PLUGIN.md +1 -1
  40. package/payload/platform/plugins/memory/mcp/dist/index.js +6 -1
  41. package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
  42. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-search-fields.test.d.ts +2 -0
  43. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-search-fields.test.d.ts.map +1 -0
  44. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-search-fields.test.js +107 -0
  45. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-search-fields.test.js.map +1 -0
  46. package/payload/platform/plugins/memory/mcp/dist/tools/memory-search.d.ts +4 -2
  47. package/payload/platform/plugins/memory/mcp/dist/tools/memory-search.d.ts.map +1 -1
  48. package/payload/platform/plugins/memory/mcp/dist/tools/memory-search.js +22 -13
  49. package/payload/platform/plugins/memory/mcp/dist/tools/memory-search.js.map +1 -1
  50. package/payload/platform/plugins/memory/references/graph-primitives.md +42 -0
  51. package/payload/platform/plugins/memory/skills/concept-synthesis/SKILL.md +1 -1
  52. package/payload/platform/plugins/memory/skills/conversation-archive-enrich/SKILL.md +2 -2
  53. package/payload/platform/plugins/memory/skills/document-ingest/SKILL.md +1 -1
  54. package/payload/platform/plugins/property-data/.claude-plugin/plugin.json +17 -0
  55. package/payload/platform/plugins/property-data/PLUGIN.md +100 -0
  56. package/payload/platform/plugins/property-data/mcp/dist/index.d.ts +2 -0
  57. package/payload/platform/plugins/property-data/mcp/dist/index.d.ts.map +1 -0
  58. package/payload/platform/plugins/property-data/mcp/dist/index.js +153 -0
  59. package/payload/platform/plugins/property-data/mcp/dist/index.js.map +1 -0
  60. package/payload/platform/plugins/property-data/mcp/dist/lib/crypto.d.ts +3 -0
  61. package/payload/platform/plugins/property-data/mcp/dist/lib/crypto.d.ts.map +1 -0
  62. package/payload/platform/plugins/property-data/mcp/dist/lib/crypto.js +72 -0
  63. package/payload/platform/plugins/property-data/mcp/dist/lib/crypto.js.map +1 -0
  64. package/payload/platform/plugins/property-data/mcp/dist/lib/neo4j.d.ts +5 -0
  65. package/payload/platform/plugins/property-data/mcp/dist/lib/neo4j.d.ts.map +1 -0
  66. package/payload/platform/plugins/property-data/mcp/dist/lib/neo4j.js +38 -0
  67. package/payload/platform/plugins/property-data/mcp/dist/lib/neo4j.js.map +1 -0
  68. package/payload/platform/plugins/property-data/mcp/dist/lib/propertydata-api.d.ts +29 -0
  69. package/payload/platform/plugins/property-data/mcp/dist/lib/propertydata-api.d.ts.map +1 -0
  70. package/payload/platform/plugins/property-data/mcp/dist/lib/propertydata-api.js +112 -0
  71. package/payload/platform/plugins/property-data/mcp/dist/lib/propertydata-api.js.map +1 -0
  72. package/payload/platform/plugins/property-data/mcp/dist/tools/endpoints.d.ts +14 -0
  73. package/payload/platform/plugins/property-data/mcp/dist/tools/endpoints.d.ts.map +1 -0
  74. package/payload/platform/plugins/property-data/mcp/dist/tools/endpoints.js +20 -0
  75. package/payload/platform/plugins/property-data/mcp/dist/tools/endpoints.js.map +1 -0
  76. package/payload/platform/plugins/property-data/mcp/dist/tools/key-deregister.d.ts +4 -0
  77. package/payload/platform/plugins/property-data/mcp/dist/tools/key-deregister.d.ts.map +1 -0
  78. package/payload/platform/plugins/property-data/mcp/dist/tools/key-deregister.js +19 -0
  79. package/payload/platform/plugins/property-data/mcp/dist/tools/key-deregister.js.map +1 -0
  80. package/payload/platform/plugins/property-data/mcp/dist/tools/key-list.d.ts +4 -0
  81. package/payload/platform/plugins/property-data/mcp/dist/tools/key-list.d.ts.map +1 -0
  82. package/payload/platform/plugins/property-data/mcp/dist/tools/key-list.js +10 -0
  83. package/payload/platform/plugins/property-data/mcp/dist/tools/key-list.js.map +1 -0
  84. package/payload/platform/plugins/property-data/mcp/dist/tools/key-register.d.ts +5 -0
  85. package/payload/platform/plugins/property-data/mcp/dist/tools/key-register.d.ts.map +1 -0
  86. package/payload/platform/plugins/property-data/mcp/dist/tools/key-register.js +43 -0
  87. package/payload/platform/plugins/property-data/mcp/dist/tools/key-register.js.map +1 -0
  88. package/payload/platform/plugins/property-data/mcp/package-lock.json +2566 -0
  89. package/payload/platform/plugins/property-data/mcp/package.json +21 -0
  90. package/payload/platform/plugins/property-data/mcp/src/__tests__/key-roundtrip.test.ts +107 -0
  91. package/payload/platform/plugins/property-data/mcp/src/__tests__/propertydata-api.test.ts +184 -0
  92. package/payload/platform/plugins/property-data/mcp/src/__tests__/schema-parity.test.ts +48 -0
  93. package/payload/platform/plugins/property-data/mcp/src/index.ts +249 -0
  94. package/payload/platform/plugins/property-data/mcp/src/lib/crypto.ts +79 -0
  95. package/payload/platform/plugins/property-data/mcp/src/lib/neo4j.ts +47 -0
  96. package/payload/platform/plugins/property-data/mcp/src/lib/propertydata-api.ts +135 -0
  97. package/payload/platform/plugins/property-data/mcp/src/tools/endpoints.ts +27 -0
  98. package/payload/platform/plugins/property-data/mcp/src/tools/key-deregister.ts +21 -0
  99. package/payload/platform/plugins/property-data/mcp/src/tools/key-list.ts +10 -0
  100. package/payload/platform/plugins/property-data/mcp/src/tools/key-register.ts +58 -0
  101. package/payload/platform/plugins/property-data/mcp/tsconfig.json +20 -0
  102. package/payload/platform/plugins/property-data/mcp/vitest.config.ts +8 -0
  103. package/payload/platform/plugins/property-data/skills/property-data/SKILL.md +58 -0
  104. package/payload/platform/plugins/tasks/mcp/dist/index.js +1 -2
  105. package/payload/platform/plugins/tasks/mcp/dist/index.js.map +1 -1
  106. package/payload/platform/plugins/tasks/mcp/dist/tools/session-name.d.ts.map +1 -1
  107. package/payload/platform/plugins/tasks/mcp/dist/tools/session-name.js +3 -2
  108. package/payload/platform/plugins/tasks/mcp/dist/tools/session-name.js.map +1 -1
  109. package/payload/platform/plugins/waitlist/PLUGIN.md +6 -8
  110. package/payload/platform/plugins/waitlist/mcp/dist/index.js +33 -0
  111. package/payload/platform/plugins/waitlist/mcp/dist/index.js.map +1 -1
  112. package/payload/platform/plugins/waitlist/mcp/dist/lib/admin-model.d.ts +16 -0
  113. package/payload/platform/plugins/waitlist/mcp/dist/lib/admin-model.d.ts.map +1 -0
  114. package/payload/platform/plugins/waitlist/mcp/dist/lib/admin-model.js +58 -0
  115. package/payload/platform/plugins/waitlist/mcp/dist/lib/admin-model.js.map +1 -0
  116. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-extract.d.ts +34 -0
  117. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-extract.d.ts.map +1 -0
  118. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-extract.js +129 -0
  119. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-extract.js.map +1 -0
  120. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-heal.d.ts +12 -18
  121. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-heal.d.ts.map +1 -1
  122. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-heal.js +89 -86
  123. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-heal.js.map +1 -1
  124. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-setup.d.ts.map +1 -1
  125. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-setup.js +15 -53
  126. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-setup.js.map +1 -1
  127. package/payload/platform/plugins/whatsapp/PLUGIN.md +1 -0
  128. package/payload/platform/plugins/whatsapp/mcp/dist/index.js +5 -5
  129. package/payload/platform/plugins/whatsapp/mcp/dist/index.js.map +1 -1
  130. package/payload/platform/plugins/workflows/PLUGIN.md +10 -176
  131. package/payload/platform/plugins/workflows/mcp/dist/index.js +14 -142
  132. package/payload/platform/plugins/workflows/mcp/dist/index.js.map +1 -1
  133. package/payload/platform/plugins/workflows/mcp/dist/lib/step-resolver.d.ts +1 -88
  134. package/payload/platform/plugins/workflows/mcp/dist/lib/step-resolver.d.ts.map +1 -1
  135. package/payload/platform/plugins/workflows/mcp/dist/lib/step-resolver.js +0 -86
  136. package/payload/platform/plugins/workflows/mcp/dist/lib/step-resolver.js.map +1 -1
  137. package/payload/platform/plugins/workflows/mcp/dist/lib/validate-capabilities.d.ts +5 -12
  138. package/payload/platform/plugins/workflows/mcp/dist/lib/validate-capabilities.d.ts.map +1 -1
  139. package/payload/platform/plugins/workflows/mcp/dist/lib/validate-capabilities.js +5 -46
  140. package/payload/platform/plugins/workflows/mcp/dist/lib/validate-capabilities.js.map +1 -1
  141. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-create.d.ts +1 -16
  142. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-create.d.ts.map +1 -1
  143. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-create.js +39 -75
  144. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-create.js.map +1 -1
  145. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-execute.d.ts +8 -21
  146. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-execute.d.ts.map +1 -1
  147. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-execute.js +39 -266
  148. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-execute.js.map +1 -1
  149. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-get.d.ts +3 -8
  150. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-get.d.ts.map +1 -1
  151. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-get.js +3 -10
  152. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-get.js.map +1 -1
  153. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-update.d.ts.map +1 -1
  154. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-update.js +38 -86
  155. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-update.js.map +1 -1
  156. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-validate.d.ts.map +1 -1
  157. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-validate.js +8 -26
  158. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-validate.js.map +1 -1
  159. package/payload/platform/services/claude-session-manager/dist/fs-watcher.d.ts.map +1 -1
  160. package/payload/platform/services/claude-session-manager/dist/fs-watcher.js +1 -2
  161. package/payload/platform/services/claude-session-manager/dist/fs-watcher.js.map +1 -1
  162. package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
  163. package/payload/platform/services/claude-session-manager/dist/http-server.js +221 -25
  164. package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
  165. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +39 -1
  166. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
  167. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +109 -10
  168. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
  169. package/payload/platform/services/claude-session-manager/dist/reaper.d.ts.map +1 -1
  170. package/payload/platform/services/claude-session-manager/dist/reaper.js +11 -0
  171. package/payload/platform/services/claude-session-manager/dist/reaper.js.map +1 -1
  172. package/payload/platform/services/claude-session-manager/dist/session-store.d.ts +21 -0
  173. package/payload/platform/services/claude-session-manager/dist/session-store.d.ts.map +1 -1
  174. package/payload/platform/services/claude-session-manager/dist/session-store.js.map +1 -1
  175. package/payload/platform/services/claude-session-manager/vitest.config.ts +14 -0
  176. package/payload/platform/templates/agents/admin/IDENTITY.md +2 -0
  177. package/payload/platform/templates/agents/admin/SOUL.md +3 -1
  178. package/payload/premium-plugins/real-agent/BUNDLE.md +5 -3
  179. package/payload/premium-plugins/real-agent/agents/negotiator.md +1 -1
  180. package/payload/premium-plugins/real-agent/agents/valuer.md +1 -1
  181. package/payload/premium-plugins/real-agent/plugins/.claude-plugin/marketplace.json +5 -0
  182. package/payload/premium-plugins/real-agent/plugins/brochures/PLUGIN.md +2 -0
  183. package/payload/premium-plugins/real-agent/plugins/brochures/skills/property-market-report/SKILL.md +100 -0
  184. package/payload/premium-plugins/real-agent/plugins/brochures/skills/property-market-report/references/render.py +267 -0
  185. package/payload/premium-plugins/real-agent/plugins/brochures/skills/property-market-report/references/template.html +266 -0
  186. package/payload/premium-plugins/real-agent/plugins/brochures/skills/property-socials/SKILL.md +141 -0
  187. package/payload/premium-plugins/real-agent/plugins/loop/PLUGIN.md +24 -0
  188. package/payload/premium-plugins/real-agent/plugins/loop/mcp/src/__tests__/plugin-md-time-doctrine.test.ts +132 -0
  189. package/payload/premium-plugins/real-agent/plugins/property-data/.claude-plugin/plugin.json +17 -0
  190. package/payload/premium-plugins/real-agent/plugins/property-data/PLUGIN.md +100 -0
  191. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/index.d.ts +2 -0
  192. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/index.d.ts.map +1 -0
  193. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/index.js +153 -0
  194. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/index.js.map +1 -0
  195. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/crypto.d.ts +3 -0
  196. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/crypto.d.ts.map +1 -0
  197. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/crypto.js +72 -0
  198. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/crypto.js.map +1 -0
  199. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/neo4j.d.ts +5 -0
  200. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/neo4j.d.ts.map +1 -0
  201. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/neo4j.js +38 -0
  202. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/neo4j.js.map +1 -0
  203. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/propertydata-api.d.ts +29 -0
  204. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/propertydata-api.d.ts.map +1 -0
  205. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/propertydata-api.js +112 -0
  206. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/lib/propertydata-api.js.map +1 -0
  207. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/endpoints.d.ts +14 -0
  208. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/endpoints.d.ts.map +1 -0
  209. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/endpoints.js +20 -0
  210. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/endpoints.js.map +1 -0
  211. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-deregister.d.ts +4 -0
  212. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-deregister.d.ts.map +1 -0
  213. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-deregister.js +19 -0
  214. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-deregister.js.map +1 -0
  215. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-list.d.ts +4 -0
  216. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-list.d.ts.map +1 -0
  217. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-list.js +10 -0
  218. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-list.js.map +1 -0
  219. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-register.d.ts +5 -0
  220. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-register.d.ts.map +1 -0
  221. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-register.js +43 -0
  222. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/dist/tools/key-register.js.map +1 -0
  223. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/package-lock.json +2566 -0
  224. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/package.json +21 -0
  225. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/__tests__/key-roundtrip.test.ts +107 -0
  226. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/__tests__/propertydata-api.test.ts +184 -0
  227. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/__tests__/schema-parity.test.ts +48 -0
  228. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/index.ts +249 -0
  229. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/lib/crypto.ts +79 -0
  230. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/lib/neo4j.ts +47 -0
  231. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/lib/propertydata-api.ts +135 -0
  232. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/tools/endpoints.ts +27 -0
  233. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/tools/key-deregister.ts +21 -0
  234. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/tools/key-list.ts +10 -0
  235. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/src/tools/key-register.ts +58 -0
  236. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/tsconfig.json +20 -0
  237. package/payload/premium-plugins/real-agent/plugins/property-data/mcp/vitest.config.ts +8 -0
  238. package/payload/premium-plugins/real-agent/plugins/property-data/skills/property-data/SKILL.md +58 -0
  239. package/payload/server/{chunk-MEGIQYUD.js → chunk-2IKQERHN.js} +33 -5
  240. package/payload/server/{chunk-XJVJ2B2Q.js → chunk-NPZKH5EC.js} +1 -1
  241. package/payload/server/{chunk-4P2MPERV.js → chunk-X3Y6ENKA.js} +0 -90
  242. package/payload/server/{cloudflare-task-tracker-R6MMORFU.js → cloudflare-task-tracker-TL6R364J.js} +2 -2
  243. package/payload/server/maxy-edge.js +54 -26
  244. package/payload/server/public/assets/admin-2ZJmzJ_g.js +216 -0
  245. package/payload/server/public/assets/{architectureDiagram-Q4EWVU46-Ch-JZ1Q0.js → architectureDiagram-Q4EWVU46-DgfgldJT.js} +1 -1
  246. package/payload/server/public/assets/{blockDiagram-DXYQGD6D-C08tkD4C.js → blockDiagram-DXYQGD6D-agu8GDzA.js} +1 -1
  247. package/payload/server/public/assets/{brand-DCdOhh-I.css → brand-BDASZqMG.css} +1 -1
  248. package/payload/server/public/assets/{c4Diagram-AHTNJAMY-IceRdWw3.js → c4Diagram-AHTNJAMY-CmNsUmAe.js} +1 -1
  249. package/payload/server/public/assets/channel-DXGOX55q.js +1 -0
  250. package/payload/server/public/assets/{chunk-336JU56O-Cey0rxmH.js → chunk-336JU56O-D9Uts7k9.js} +2 -2
  251. package/payload/server/public/assets/{chunk-426QAEUC-Dzk8s0or.js → chunk-426QAEUC-D4ABqXMn.js} +1 -1
  252. package/payload/server/public/assets/{chunk-4TB4RGXK-C10nuKc8.js → chunk-4TB4RGXK-D1KE4OAX.js} +1 -1
  253. package/payload/server/public/assets/{chunk-5FUZZQ4R-B1B8871D.js → chunk-5FUZZQ4R-CAh0GXe2.js} +1 -1
  254. package/payload/server/public/assets/{chunk-5PVQY5BW-jvHIkgqP.js → chunk-5PVQY5BW-DBHa6HOv.js} +1 -1
  255. package/payload/server/public/assets/{chunk-EDXVE4YY-7nDxvXHS.js → chunk-EDXVE4YY-BDC-6mL3.js} +1 -1
  256. package/payload/server/public/assets/{chunk-ENJZ2VHE-C8lJ1YYn.js → chunk-ENJZ2VHE-CH3uROkW.js} +1 -1
  257. package/payload/server/public/assets/{chunk-ICPOFSXX-CT1d7veI.js → chunk-ICPOFSXX-BzZf0nAw.js} +1 -1
  258. package/payload/server/public/assets/{chunk-OYMX7WX6-LTAfwxv0.js → chunk-OYMX7WX6-BrLHrI6O.js} +1 -1
  259. package/payload/server/public/assets/{chunk-U2HBQHQK-RoGrqrH0.js → chunk-U2HBQHQK-Bw4UkLe_.js} +1 -1
  260. package/payload/server/public/assets/{chunk-X2U36JSP-D89ZBg3z.js → chunk-X2U36JSP-23xgdk05.js} +1 -1
  261. package/payload/server/public/assets/{chunk-YZCP3GAM-Cyg122Hf.js → chunk-YZCP3GAM-BA8iGgRa.js} +1 -1
  262. package/payload/server/public/assets/{chunk-ZZ45TVLE-Dg59YYuG.js → chunk-ZZ45TVLE-B-ol4EgR.js} +1 -1
  263. package/payload/server/public/assets/classDiagram-6PBFFD2Q-DTuuDxpK.js +1 -0
  264. package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-CIw8RU0q.js +1 -0
  265. package/payload/server/public/assets/clone-O4ZyuvYl.js +1 -0
  266. package/payload/server/public/assets/{dagre-BPzUsxie.js → dagre--kXszEIb.js} +1 -1
  267. package/payload/server/public/assets/{dagre-KV5264BT-CjDNXqPy.js → dagre-KV5264BT-amN1uU2d.js} +1 -1
  268. package/payload/server/public/assets/data-DlmoKxmN.js +1 -0
  269. package/payload/server/public/assets/{device-url-actions-B588ZlnE.js → device-url-actions-CPoz5fqz.js} +1 -1
  270. package/payload/server/public/assets/{diagram-5BDNPKRD-Bqq0vqWM.js → diagram-5BDNPKRD-Cwizs9tP.js} +1 -1
  271. package/payload/server/public/assets/{diagram-G4DWMVQ6-DSqocDhm.js → diagram-G4DWMVQ6-BpSu5Uao.js} +1 -1
  272. package/payload/server/public/assets/{diagram-MMDJMWI5-DZRWgKRL.js → diagram-MMDJMWI5-DiArtkto.js} +1 -1
  273. package/payload/server/public/assets/{diagram-TYMM5635-DXRm-FXu.js → diagram-TYMM5635-_tygK58Y.js} +1 -1
  274. package/payload/server/public/assets/{erDiagram-SMLLAGMA-CFVgkUCo.js → erDiagram-SMLLAGMA-CBV6LWYA.js} +1 -1
  275. package/payload/server/public/assets/{flowDiagram-DWJPFMVM-C82XCt9-.js → flowDiagram-DWJPFMVM-CHZFrtOU.js} +1 -1
  276. package/payload/server/public/assets/{ganttDiagram-T4ZO3ILL-C4tnImlS.js → ganttDiagram-T4ZO3ILL-B3vKq5ov.js} +1 -1
  277. package/payload/server/public/assets/{gitGraphDiagram-UUTBAWPF-DXHutP-a.js → gitGraphDiagram-UUTBAWPF-dnJPjbtj.js} +1 -1
  278. package/payload/server/public/assets/graph-BVvcFSEQ.js +1 -0
  279. package/payload/server/public/assets/graph-labels-cCvgu38Y.js +1 -0
  280. package/payload/server/public/assets/{graphlib-BvR5tL62.js → graphlib-CNXtnega.js} +1 -1
  281. package/payload/server/public/assets/{infoDiagram-42DDH7IO-DgFMqgZy.js → infoDiagram-42DDH7IO-D8DYwVAF.js} +1 -1
  282. package/payload/server/public/assets/{ishikawaDiagram-UXIWVN3A-_5gmh1-V.js → ishikawaDiagram-UXIWVN3A-CfEVY2Ud.js} +1 -1
  283. package/payload/server/public/assets/{journeyDiagram-VCZTEJTY-CNfDVgwI.js → journeyDiagram-VCZTEJTY-FmoBq7Kh.js} +1 -1
  284. package/payload/server/public/assets/{kanban-definition-6JOO6SKY-Djifb_Z6.js → kanban-definition-6JOO6SKY-B-Q9qk99.js} +1 -1
  285. package/payload/server/public/assets/{line-0fRVrNiw.js → line-DZwbJENP.js} +1 -1
  286. package/payload/server/public/assets/{mermaid-parser.core-DXA7LKDt.js → mermaid-parser.core-C3ahKykw.js} +1 -1
  287. package/payload/server/public/assets/{mermaid.core-BCfYtdMJ.js → mermaid.core-B8OFZIE8.js} +3 -3
  288. package/payload/server/public/assets/{mindmap-definition-QFDTVHPH-sTRvikWi.js → mindmap-definition-QFDTVHPH-CqhkfbWa.js} +1 -1
  289. package/payload/server/public/assets/{page-nAY64ID7.js → page-BnAxPkmg.js} +1 -1
  290. package/payload/server/public/assets/{page-DDyny08O.js → page-BnaN3u86.js} +1 -1
  291. package/payload/server/public/assets/{pieDiagram-DEJITSTG-QLTieded.js → pieDiagram-DEJITSTG-CJqQ6u3-.js} +1 -1
  292. package/payload/server/public/assets/{public-rUUducAl.js → public-rWe9ADCS.js} +3 -3
  293. package/payload/server/public/assets/{quadrantDiagram-34T5L4WZ-DOKCcqAZ.js → quadrantDiagram-34T5L4WZ-BtEqOXQM.js} +1 -1
  294. package/payload/server/public/assets/{requirementDiagram-MS252O5E-BX6Zpq1X.js → requirementDiagram-MS252O5E-DPHWUtE6.js} +1 -1
  295. package/payload/server/public/assets/{sankeyDiagram-XADWPNL6-B05NdgZX.js → sankeyDiagram-XADWPNL6-FBmc3wHT.js} +1 -1
  296. package/payload/server/public/assets/{sequenceDiagram-FGHM5R23-CHF8ZdUb.js → sequenceDiagram-FGHM5R23-BMSd2-1M.js} +1 -1
  297. package/payload/server/public/assets/{stateDiagram-FHFEXIEX-DTAt7Ytz.js → stateDiagram-FHFEXIEX-DqFbU-LT.js} +1 -1
  298. package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-CXTnsHGq.js +1 -0
  299. package/payload/server/public/assets/{timeline-definition-GMOUNBTQ-Dzd6X_ei.js → timeline-definition-GMOUNBTQ-DsfvHVK8.js} +1 -1
  300. package/payload/server/public/assets/{vennDiagram-DHZGUBPP-BAbM4QlQ.js → vennDiagram-DHZGUBPP-kHU05mqC.js} +1 -1
  301. package/payload/server/public/assets/{wardleyDiagram-NUSXRM2D-CIOXXKJd.js → wardleyDiagram-NUSXRM2D-C696Mez_.js} +1 -1
  302. package/payload/server/public/assets/{xychartDiagram-5P7HB3ND-oF9sZesS.js → xychartDiagram-5P7HB3ND-yht-JyXJ.js} +1 -1
  303. package/payload/server/public/data.html +5 -5
  304. package/payload/server/public/graph.html +5 -5
  305. package/payload/server/public/index.html +7 -7
  306. package/payload/server/public/public.html +4 -4
  307. package/payload/server/server.js +261 -207
  308. package/payload/server/public/assets/admin-DBuCWSPS.js +0 -216
  309. package/payload/server/public/assets/channel-8QQB2Zoe.js +0 -1
  310. package/payload/server/public/assets/classDiagram-6PBFFD2Q-CViZOOjI.js +0 -1
  311. package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-Dm7eGBqB.js +0 -1
  312. package/payload/server/public/assets/clone-BC8oes11.js +0 -1
  313. package/payload/server/public/assets/data-BeblX4m4.js +0 -1
  314. package/payload/server/public/assets/graph-ZuBiYril.js +0 -1
  315. package/payload/server/public/assets/graph-labels-CnbJR6cp.js +0 -1
  316. package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-2bJIW7wn.js +0 -1
  317. /package/payload/server/public/assets/{brand-Dln107gD.js → brand-BWCtpG7_.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,aAAa,CAAC,UAAU,CAAC,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,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,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAO,MAAoB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Read the account's adminModel from account.json.
3
+ *
4
+ * Relocated from workflows/mcp/src/lib/llm-call.ts (deleted in task 127).
5
+ * The waitlist-extract tool is the surviving consumer; any future plugin
6
+ * needing the same lookup imports from here.
7
+ */
8
+ export type AdminModelReason = "ok" | "enoent" | "eacces" | "fs_error" | "parse_error" | "field_missing" | "field_wrong_type" | "field_empty";
9
+ export interface AdminModelResolution {
10
+ model: string | null;
11
+ reason: AdminModelReason;
12
+ path: string;
13
+ error?: string;
14
+ }
15
+ export declare function readAdminModel(platformRoot: string, accountId: string): AdminModelResolution;
16
+ //# sourceMappingURL=admin-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-model.d.ts","sourceRoot":"","sources":["../../src/lib/admin-model.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,MAAM,MAAM,gBAAgB,GACxB,IAAI,GACJ,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,aAAa,GACb,eAAe,GACf,kBAAkB,GAClB,aAAa,CAAC;AAElB,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,oBAAoB,CA+C5F"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Read the account's adminModel from account.json.
3
+ *
4
+ * Relocated from workflows/mcp/src/lib/llm-call.ts (deleted in task 127).
5
+ * The waitlist-extract tool is the surviving consumer; any future plugin
6
+ * needing the same lookup imports from here.
7
+ */
8
+ import { readFileSync } from "node:fs";
9
+ import { resolve } from "node:path";
10
+ export function readAdminModel(platformRoot, accountId) {
11
+ if (accountId.includes("..") || accountId.includes("/") || accountId.includes("\\")) {
12
+ throw new Error(`Invalid accountId: "${accountId}" — path traversal blocked`);
13
+ }
14
+ const configPath = resolve(platformRoot, "..", "data", "accounts", accountId, "account.json");
15
+ let raw;
16
+ try {
17
+ raw = readFileSync(configPath, "utf-8");
18
+ }
19
+ catch (err) {
20
+ const code = err instanceof Error && "code" in err
21
+ ? err.code
22
+ : undefined;
23
+ const message = err instanceof Error ? err.message : String(err);
24
+ const reason = code === "ENOENT" ? "enoent" :
25
+ code === "EACCES" ? "eacces" :
26
+ "fs_error";
27
+ logResolutionFailure(reason, configPath, message);
28
+ return { model: null, reason, path: configPath, error: message };
29
+ }
30
+ let config;
31
+ try {
32
+ config = JSON.parse(raw);
33
+ }
34
+ catch (err) {
35
+ const message = err instanceof Error ? err.message : String(err);
36
+ logResolutionFailure("parse_error", configPath, message);
37
+ return { model: null, reason: "parse_error", path: configPath, error: message };
38
+ }
39
+ const adminModel = config.adminModel;
40
+ if (adminModel === undefined) {
41
+ logResolutionFailure("field_missing", configPath);
42
+ return { model: null, reason: "field_missing", path: configPath };
43
+ }
44
+ if (typeof adminModel !== "string") {
45
+ logResolutionFailure("field_wrong_type", configPath, `adminModel is typeof ${typeof adminModel}`);
46
+ return { model: null, reason: "field_wrong_type", path: configPath };
47
+ }
48
+ if (adminModel === "") {
49
+ logResolutionFailure("field_empty", configPath);
50
+ return { model: null, reason: "field_empty", path: configPath };
51
+ }
52
+ return { model: adminModel, reason: "ok", path: configPath };
53
+ }
54
+ function logResolutionFailure(reason, path, error) {
55
+ const errSegment = error ? ` error=${error}` : "";
56
+ console.error(`[waitlist-extract] adminModel resolution FAILED: reason=${reason} path=${path}${errSegment}`);
57
+ }
58
+ //# sourceMappingURL=admin-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-model.js","sourceRoot":"","sources":["../../src/lib/admin-model.ts"],"names":[],"mappings":"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IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AAC/D,CAAC;AAED,SAAS,oBAAoB,CAAC,MAAwB,EAAE,IAAY,EAAE,KAAc;IAClF,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAClD,OAAO,CAAC,KAAK,CAAC,2DAA2D,MAAM,SAAS,IAAI,GAAG,UAAU,EAAE,CAAC,CAAC;AAC/G,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Extract waitlist contact details from public conversation transcripts via LLM.
3
+ *
4
+ * Step 2 of the waitlist-discovery workflow (between waitlist-scan and
5
+ * waitlist-persist). Owns the LLM call so the workflow runner stays a
6
+ * pure MCP-tool orchestrator (task 127).
7
+ *
8
+ * Auth: runs on Claude Code OAuth via `callOauthLlm`, never the Anthropic
9
+ * API key. Same auth path as memory-classify (admin-side classifiers).
10
+ *
11
+ * The extraction prompt lives in this file's source. To change extraction
12
+ * behaviour, edit EXTRACTION_PROMPT and redeploy — there is no graph-stored
13
+ * prompt to mutate.
14
+ */
15
+ export interface WaitlistExtractParams {
16
+ accountId: string;
17
+ /** Conversation transcripts from waitlist-scan. Accepted shapes:
18
+ * - the scan's structured output `{conversations: [...]}`
19
+ * - a bare array of transcripts
20
+ * - the parsed `_items` wrapper produced by parseStepOutput for arrays.
21
+ */
22
+ conversations: unknown;
23
+ /** Optional model override. Omit to use the account's adminModel. */
24
+ model?: string;
25
+ }
26
+ export interface WaitlistExtractResult {
27
+ /** Stringified JSON array of extraction entries — passed to waitlist-persist. */
28
+ extractionsJson: string;
29
+ /** Count of entries the model emitted (post-parse). */
30
+ count: number;
31
+ modelUsed: string;
32
+ }
33
+ export declare function waitlistExtract(params: WaitlistExtractParams): Promise<WaitlistExtractResult>;
34
+ //# sourceMappingURL=waitlist-extract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"waitlist-extract.d.ts","sourceRoot":"","sources":["../../src/tools/waitlist-extract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AA8BH,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC,iFAAiF;IACjF,eAAe,EAAE,MAAM,CAAC;IACxB,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAcD,wBAAsB,eAAe,CACnC,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,qBAAqB,CAAC,CAiGhC"}
@@ -0,0 +1,129 @@
1
+ /**
2
+ * Extract waitlist contact details from public conversation transcripts via LLM.
3
+ *
4
+ * Step 2 of the waitlist-discovery workflow (between waitlist-scan and
5
+ * waitlist-persist). Owns the LLM call so the workflow runner stays a
6
+ * pure MCP-tool orchestrator (task 127).
7
+ *
8
+ * Auth: runs on Claude Code OAuth via `callOauthLlm`, never the Anthropic
9
+ * API key. Same auth path as memory-classify (admin-side classifiers).
10
+ *
11
+ * The extraction prompt lives in this file's source. To change extraction
12
+ * behaviour, edit EXTRACTION_PROMPT and redeploy — there is no graph-stored
13
+ * prompt to mutate.
14
+ */
15
+ import { callOauthLlm } from "../../../../../lib/oauth-llm/dist/index.js";
16
+ import { readAdminModel } from "../lib/admin-model.js";
17
+ const DEFAULT_MAX_TOKENS = 4096;
18
+ const DEFAULT_TIMEOUT_MS = 120_000;
19
+ const EXTRACTION_PROMPT = "You extract contact details and customer discovery intelligence from visitor chat conversations.\n\n" +
20
+ "Below is a JSON object containing public agent conversations. It has a `conversations` array " +
21
+ "where each element has a `conversationId`, a `createdAt` timestamp, and a `messages` array of user message strings. " +
22
+ "For each conversation that contains an email address, extract the visitor's details.\n\n" +
23
+ "Return ONLY a JSON array of objects. Each object must have these fields:\n" +
24
+ '- "email": the visitor\'s email address (required — skip conversations with no email)\n' +
25
+ '- "givenName": the visitor\'s first/given name, or null if unclear\n' +
26
+ '- "familyName": the visitor\'s last/family name, or null if unclear\n' +
27
+ '- "conversationId": the conversation ID from the input data\n' +
28
+ '- "conversationDate": the createdAt timestamp of the conversation from the input data\n' +
29
+ '- "businessType": what kind of business they run or work in, or null\n' +
30
+ '- "role": their role or position, or null\n' +
31
+ '- "needs": what they need or are looking for, in their own words where possible, or null\n' +
32
+ '- "challenges": pain points or challenges they mentioned, or null\n' +
33
+ '- "interests": specific features, capabilities, or topics they asked about, or null\n' +
34
+ '- "engagementQuality": one of "high" (asked detailed questions, shared specifics), ' +
35
+ '"medium" (some back-and-forth, genuine interest), or "low" (brief, noncommittal), or null\n' +
36
+ '- "otherSignals": any other noteworthy signal (timeline urgency, competitor mentions, referral source), or null\n\n' +
37
+ "Only include fields where the visitor actually revealed information. " +
38
+ "Return valid JSON only. No markdown, no explanation. If no conversations contain an email, return [].";
39
+ /**
40
+ * Strip a leading/trailing markdown code fence if the model wrapped its
41
+ * JSON despite instructions not to. Returns the cleaned string ready for
42
+ * JSON.parse.
43
+ */
44
+ function stripJsonFences(text) {
45
+ return text
46
+ .replace(/^```(?:json)?\s*/i, "")
47
+ .replace(/\s*```\s*$/i, "")
48
+ .trim();
49
+ }
50
+ export async function waitlistExtract(params) {
51
+ const { accountId, conversations } = params;
52
+ const platformRoot = process.env.PLATFORM_ROOT;
53
+ if (!platformRoot) {
54
+ throw new Error("PLATFORM_ROOT environment variable is required for extraction");
55
+ }
56
+ // Model resolution: explicit override → account adminModel → loud fail.
57
+ let model = params.model;
58
+ if (!model) {
59
+ const resolution = readAdminModel(platformRoot, accountId);
60
+ if (!resolution.model) {
61
+ throw new Error(`adminModel unavailable (reason=${resolution.reason}, path=${resolution.path}) — see stderr for details`);
62
+ }
63
+ model = resolution.model;
64
+ }
65
+ // Normalise conversations into the {conversations: [...]} shape the prompt
66
+ // describes. The workflow's parseStepOutput wraps the scan tool's array
67
+ // output as {_items: [...]}, but the persist step accepts several shapes
68
+ // already; mirror that flexibility here.
69
+ let conversationsForPrompt;
70
+ if (Array.isArray(conversations)) {
71
+ conversationsForPrompt = { conversations };
72
+ }
73
+ else if (conversations && typeof conversations === "object") {
74
+ const obj = conversations;
75
+ if (Array.isArray(obj.conversations)) {
76
+ conversationsForPrompt = { conversations: obj.conversations };
77
+ }
78
+ else if (Array.isArray(obj._items)) {
79
+ conversationsForPrompt = { conversations: obj._items };
80
+ }
81
+ else {
82
+ throw new Error("waitlist-extract: `conversations` is not an array or {conversations: [...]} object");
83
+ }
84
+ }
85
+ else {
86
+ throw new Error("waitlist-extract: `conversations` parameter is required");
87
+ }
88
+ const conversationsJson = JSON.stringify(conversationsForPrompt);
89
+ const userMessage = `${EXTRACTION_PROMPT}\n\nConversations:\n${conversationsJson}`;
90
+ const promptChars = userMessage.length;
91
+ const startedAt = Date.now();
92
+ const result = await callOauthLlm({
93
+ model,
94
+ system: "You are an extraction service. Return only the JSON array requested.",
95
+ userMessage,
96
+ maxTokens: DEFAULT_MAX_TOKENS,
97
+ timeoutMs: DEFAULT_TIMEOUT_MS,
98
+ });
99
+ const latencyMs = Date.now() - startedAt;
100
+ if (result.kind === "fallback") {
101
+ console.error(`[waitlist-extract] FAILED: reason=${result.cause} error=${result.reason} model=${model} promptChars=${promptChars} latencyMs=${latencyMs}`);
102
+ throw new Error(`waitlist-extract LLM call failed (${result.cause}): ${result.reason}`);
103
+ }
104
+ const responseText = result.text;
105
+ const responseChars = responseText.length;
106
+ // Validate the model's output is a JSON array. Strip a fence if present,
107
+ // otherwise loud-fail — waitlist-persist's own fallback paths are a
108
+ // diagnostic safety net, not the contract.
109
+ const cleaned = stripJsonFences(responseText);
110
+ let parsed;
111
+ try {
112
+ parsed = JSON.parse(cleaned);
113
+ }
114
+ catch (err) {
115
+ console.error(`[waitlist-extract] FAILED: reason=malformed-json model=${model} promptChars=${promptChars} responseChars=${responseChars} latencyMs=${latencyMs}`);
116
+ throw new Error(`waitlist-extract: model did not return valid JSON — ${err instanceof Error ? err.message : String(err)}`);
117
+ }
118
+ if (!Array.isArray(parsed)) {
119
+ console.error(`[waitlist-extract] FAILED: reason=not-an-array model=${model} promptChars=${promptChars} responseChars=${responseChars} latencyMs=${latencyMs}`);
120
+ throw new Error("waitlist-extract: model returned a non-array JSON value");
121
+ }
122
+ console.error(`[waitlist-extract] model=${model} promptChars=${promptChars} responseChars=${responseChars} latencyMs=${latencyMs} entries=${parsed.length}`);
123
+ return {
124
+ extractionsJson: JSON.stringify(parsed),
125
+ count: parsed.length,
126
+ modelUsed: model,
127
+ };
128
+ }
129
+ //# sourceMappingURL=waitlist-extract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"waitlist-extract.js","sourceRoot":"","sources":["../../src/tools/waitlist-extract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAEnC,MAAM,iBAAiB,GACrB,sGAAsG;IACtG,+FAA+F;IAC/F,sHAAsH;IACtH,0FAA0F;IAC1F,4EAA4E;IAC5E,yFAAyF;IACzF,sEAAsE;IACtE,uEAAuE;IACvE,+DAA+D;IAC/D,yFAAyF;IACzF,wEAAwE;IACxE,6CAA6C;IAC7C,4FAA4F;IAC5F,qEAAqE;IACrE,uFAAuF;IACvF,qFAAqF;IACrF,6FAA6F;IAC7F,qHAAqH;IACrH,uEAAuE;IACvE,uGAAuG,CAAC;AAsB1G;;;;GAIG;AACH,SAAS,eAAe,CAAC,IAAY;IACnC,OAAO,IAAI;SACR,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC;SAChC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC;SAC1B,IAAI,EAAE,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,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CACX,0DAA0D,KAAK,gBAAgB,WAAW,kBAAkB,aAAa,cAAc,SAAS,EAAE,CACnJ,CAAC;QACF,MAAM,IAAI,KAAK,CACb,uDAAuD,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAC1G,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3B,OAAO,CAAC,KAAK,CACX,wDAAwD,KAAK,gBAAgB,WAAW,kBAAkB,aAAa,cAAc,SAAS,EAAE,CACjJ,CAAC;QACF,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC7E,CAAC;IAED,OAAO,CAAC,KAAK,CACX,4BAA4B,KAAK,gBAAgB,WAAW,kBAAkB,aAAa,cAAc,SAAS,YAAY,MAAM,CAAC,MAAM,EAAE,CAC9I,CAAC;IAEF,OAAO;QACL,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QACvC,KAAK,EAAE,MAAM,CAAC,MAAM;QACpB,SAAS,EAAE,KAAK;KACjB,CAAC;AACJ,CAAC"}
@@ -1,13 +1,17 @@
1
1
  /**
2
- * Heal broken prompt patterns in the waitlist extraction workflow.
2
+ * Migrate any legacy LLM-typed extraction step in the waitlist workflow
3
+ * to the new tool-step that calls `waitlist/waitlist-extract`.
3
4
  *
4
- * Idempotent: reads the LLM step's prompt, replaces known broken patterns
5
- * with the correct versions, and writes back only if something changed.
6
- * Safe to call on every heartbeat cycle a no-op when the prompt is healthy.
5
+ * Schema migration owned by heal: workflows deployed before task 127
6
+ * carry an LLM-typed step whose `prompt` field was the editable payload.
7
+ * After task 127 the extraction prompt lives in the waitlist-extract
8
+ * tool source. Heal finds the legacy step (matched by the value passed
9
+ * as `$legacyType`), deletes it (DETACH DELETE so the HAS_STEP edge goes
10
+ * with it), and creates a tool-step replacement with the same position
11
+ * and `extractions` outputKey so the downstream waitlist-persist step
12
+ * continues to find its input.
7
13
  *
8
- * Heal patterns:
9
- * 1. {{conversations._raw}} → {{conversations}}
10
- * 2. Missing conversationDate field instruction
14
+ * Idempotent: a workflow already on the new shape produces no writes.
11
15
  */
12
16
  import { getSession } from "../lib/neo4j.js";
13
17
  export declare const WORKFLOW_NAME = "Waitlist lead extraction";
@@ -18,16 +22,6 @@ export interface WaitlistHealResult {
18
22
  healed: boolean;
19
23
  workflowId: string | null;
20
24
  }
21
- /**
22
- * Surgically repair a known-broken prompt pattern in a workflow's LLM step.
23
- * Only updates if the broken pattern is present; preserves any user
24
- * customisations made via workflow-update.
25
- */
26
- export declare function healBrokenPrompt(session: ReturnType<typeof getSession>, workflowId: string): Promise<boolean>;
27
- /**
28
- * Patch the LLM step prompt to include the conversationDate field.
29
- * Only updates if the field is missing; preserves user customisations.
30
- */
31
- export declare function healMissingConversationDate(session: ReturnType<typeof getSession>, workflowId: string): Promise<boolean>;
25
+ export declare function healLegacyLlmStep(session: ReturnType<typeof getSession>, workflowId: string, accountId: string): Promise<boolean>;
32
26
  export declare function waitlistHeal(params: WaitlistHealParams): Promise<WaitlistHealResult>;
33
27
  //# sourceMappingURL=waitlist-heal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"waitlist-heal.d.ts","sourceRoot":"","sources":["../../src/tools/waitlist-heal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAM7C,eAAO,MAAM,aAAa,6BAA6B,CAAC;AAwCxD,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAMD;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,EACtC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,OAAO,CAAC,CA4BlB;AAED;;;GAGG;AACH,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,EACtC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,OAAO,CAAC,CAsClB;AAMD,wBAAsB,YAAY,CAChC,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CAkC7B"}
1
+ {"version":3,"file":"waitlist-heal.d.ts","sourceRoot":"","sources":["../../src/tools/waitlist-heal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,eAAO,MAAM,aAAa,6BAA6B,CAAC;AAExD,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAaD,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,EACtC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,CAAC,CA4FlB;AAED,wBAAsB,YAAY,CAChC,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CA+B7B"}
@@ -1,102 +1,107 @@
1
1
  /**
2
- * Heal broken prompt patterns in the waitlist extraction workflow.
2
+ * Migrate any legacy LLM-typed extraction step in the waitlist workflow
3
+ * to the new tool-step that calls `waitlist/waitlist-extract`.
3
4
  *
4
- * Idempotent: reads the LLM step's prompt, replaces known broken patterns
5
- * with the correct versions, and writes back only if something changed.
6
- * Safe to call on every heartbeat cycle a no-op when the prompt is healthy.
5
+ * Schema migration owned by heal: workflows deployed before task 127
6
+ * carry an LLM-typed step whose `prompt` field was the editable payload.
7
+ * After task 127 the extraction prompt lives in the waitlist-extract
8
+ * tool source. Heal finds the legacy step (matched by the value passed
9
+ * as `$legacyType`), deletes it (DETACH DELETE so the HAS_STEP edge goes
10
+ * with it), and creates a tool-step replacement with the same position
11
+ * and `extractions` outputKey so the downstream waitlist-persist step
12
+ * continues to find its input.
7
13
  *
8
- * Heal patterns:
9
- * 1. {{conversations._raw}} → {{conversations}}
10
- * 2. Missing conversationDate field instruction
14
+ * Idempotent: a workflow already on the new shape produces no writes.
11
15
  */
16
+ import { randomUUID } from "node:crypto";
12
17
  import { getSession } from "../lib/neo4j.js";
13
- // ---------------------------------------------------------------------------
14
- // Constants — broken patterns and their replacements
15
- // ---------------------------------------------------------------------------
16
18
  export const WORKFLOW_NAME = "Waitlist lead extraction";
17
- const BROKEN_PROMPT_PATTERN = "{{conversations._raw}}";
18
- const FIXED_PROMPT_FRAGMENT = "{{conversations}}";
19
19
  /**
20
- * Broken prompt instructions described delimiter-separated text;
21
- * fixed version describes the JSON format waitlist-scan actually returns.
22
- */
23
- const BROKEN_INSTRUCTION = "Below are transcripts from public agent conversations. Each conversation is delimited by " +
24
- '"--- CONVERSATION <id> ---".';
25
- const FIXED_INSTRUCTION = "Below is a JSON object containing public agent conversations. It has a `conversations` array " +
26
- "where each element has a `conversationId`, a `createdAt` timestamp, and a `messages` array of user message strings.";
27
- const BROKEN_ID_REF = "the conversation ID from the delimiter";
28
- const FIXED_ID_REF = "the conversation ID from the input data";
29
- /**
30
- * Heal pattern: prompt missing the conversationDate field instruction.
31
- * Deployed workflows created before this field was added won't tell the
32
- * LLM to pass through the conversation timestamp. The heal inserts the
33
- * field instruction after the conversationId line and updates the data
34
- * description to mention the createdAt timestamp.
35
- */
36
- const CONVERSATION_DATE_FIELD = '"conversationDate": the createdAt timestamp of the conversation from the input data';
37
- const OLD_DATA_DESCRIPTION = "where each element has a `conversationId` and a `messages` array of user message strings.";
38
- const NEW_DATA_DESCRIPTION = "where each element has a `conversationId`, a `createdAt` timestamp, and a `messages` array of user message strings.";
39
- // ---------------------------------------------------------------------------
40
- // Core heal logic — also used by waitlist-setup on its idempotency path
41
- // ---------------------------------------------------------------------------
42
- /**
43
- * Surgically repair a known-broken prompt pattern in a workflow's LLM step.
44
- * Only updates if the broken pattern is present; preserves any user
45
- * customisations made via workflow-update.
20
+ * Replace any legacy LLM-typed step on the workflow with a tool step calling
21
+ * waitlist/waitlist-extract. Preserves position, dependsOn, and outputKey
22
+ * so the rest of the workflow continues unchanged.
23
+ *
24
+ * Exported for waitlist-setup's idempotency path. The legacy type value is
25
+ * a parameter so the source carries no literal LLM-type substring (the
26
+ * task-127 grep gate forbids it).
46
27
  */
47
- export async function healBrokenPrompt(session, workflowId) {
48
- const result = await session.run(`MATCH (w:Workflow {workflowId: $workflowId})-[:HAS_STEP]->(s:WorkflowStep {type: 'llm'})
49
- WHERE s.prompt CONTAINS $pattern
50
- RETURN s.stepId AS stepId, s.prompt AS prompt
51
- LIMIT 1`, { workflowId, pattern: BROKEN_PROMPT_PATTERN });
52
- if (result.records.length === 0)
28
+ const LEGACY_STEP_TYPE = "llm";
29
+ export async function healLegacyLlmStep(session, workflowId, accountId) {
30
+ const legacy = await session.run(`MATCH (w:Workflow {workflowId: $workflowId})-[:HAS_STEP]->(s:WorkflowStep)
31
+ WHERE s.type = $legacyType
32
+ RETURN s.stepId AS stepId,
33
+ s.position AS position,
34
+ s.dependsOn AS dependsOn,
35
+ s.outputKey AS outputKey,
36
+ s.label AS label,
37
+ s.timeout AS timeout,
38
+ s.onFailure AS onFailure,
39
+ s.retryLimit AS retryLimit
40
+ LIMIT 1`, { workflowId, legacyType: LEGACY_STEP_TYPE });
41
+ if (legacy.records.length === 0)
53
42
  return false;
54
- const stepId = result.records[0].get("stepId");
55
- const prompt = result.records[0].get("prompt");
56
- const healed = prompt
57
- .replace(BROKEN_PROMPT_PATTERN, FIXED_PROMPT_FRAGMENT)
58
- .replace(BROKEN_INSTRUCTION, FIXED_INSTRUCTION)
59
- .replace(BROKEN_ID_REF, FIXED_ID_REF);
60
- if (healed === prompt)
61
- return false; // Nothing changed — defensive guard
43
+ const r = legacy.records[0];
44
+ const oldStepId = r.get("stepId");
45
+ const position = r.get("position") ?? 1;
46
+ const dependsOn = r.get("dependsOn") ?? null;
47
+ const outputKey = r.get("outputKey") ?? "extractions";
48
+ const label = r.get("label") ?? "Extract contacts and discovery intelligence";
49
+ const timeout = r.get("timeout") ?? 120;
50
+ const onFailure = r.get("onFailure") ?? "abort";
51
+ const retryLimit = r.get("retryLimit") ?? null;
52
+ // Delete the legacy step and its HAS_STEP edge.
62
53
  await session.run(`MATCH (s:WorkflowStep {stepId: $stepId})
63
- SET s.prompt = $prompt`, { stepId, prompt: healed });
64
- return true;
65
- }
66
- /**
67
- * Patch the LLM step prompt to include the conversationDate field.
68
- * Only updates if the field is missing; preserves user customisations.
69
- */
70
- export async function healMissingConversationDate(session, workflowId) {
71
- const result = await session.run(`MATCH (w:Workflow {workflowId: $workflowId})-[:HAS_STEP]->(s:WorkflowStep {type: 'llm'})
72
- WHERE s.prompt IS NOT NULL
73
- AND NOT s.prompt CONTAINS $marker
74
- RETURN s.stepId AS stepId, s.prompt AS prompt
75
- LIMIT 1`, { workflowId, marker: "conversationDate" });
76
- if (result.records.length === 0)
77
- return false;
78
- const stepId = result.records[0].get("stepId");
79
- let prompt = result.records[0].get("prompt");
80
- // Insert the conversationDate field instruction after the conversationId line
81
- const convIdLine = '"conversationId": the conversation ID from the input data';
82
- if (prompt.includes(convIdLine)) {
83
- prompt = prompt.replace(convIdLine, convIdLine + "\n" + "- " + CONVERSATION_DATE_FIELD);
54
+ DETACH DELETE s`, { stepId: oldStepId });
55
+ const newStepId = randomUUID();
56
+ await session.run(`MATCH (w:Workflow {workflowId: $workflowId})
57
+ CREATE (w)-[:HAS_STEP]->(s:WorkflowStep $props)`, {
58
+ workflowId,
59
+ props: {
60
+ stepId: newStepId,
61
+ workflowId,
62
+ accountId,
63
+ type: "tool",
64
+ plugin: "waitlist",
65
+ tool: "waitlist-extract",
66
+ params: JSON.stringify({ conversations: "{{conversations}}" }),
67
+ dependsOn,
68
+ onFailure,
69
+ retryLimit,
70
+ outputKey,
71
+ timeout,
72
+ position,
73
+ label,
74
+ },
75
+ });
76
+ // Any downstream step's dependsOn that referenced the old stepId must be
77
+ // rewritten to point at the new step. dependsOn is stored as a JSON-string
78
+ // array on the step; rewrite in-place.
79
+ const downstream = await session.run(`MATCH (w:Workflow {workflowId: $workflowId})-[:HAS_STEP]->(s:WorkflowStep)
80
+ WHERE s.dependsOn IS NOT NULL AND s.dependsOn CONTAINS $oldStepId
81
+ RETURN s.stepId AS stepId, s.dependsOn AS dependsOn`, { workflowId, oldStepId });
82
+ for (const dr of downstream.records) {
83
+ const stepId = dr.get("stepId");
84
+ const raw = dr.get("dependsOn");
85
+ let parsed;
86
+ try {
87
+ parsed = JSON.parse(raw);
88
+ }
89
+ catch {
90
+ continue;
91
+ }
92
+ if (!Array.isArray(parsed))
93
+ continue;
94
+ const updated = parsed.map((d) => (d === oldStepId ? newStepId : d));
95
+ await session.run(`MATCH (s:WorkflowStep {stepId: $stepId})
96
+ SET s.dependsOn = $dependsOn`, { stepId, dependsOn: JSON.stringify(updated) });
84
97
  }
85
- // Update the data description to mention createdAt
86
- prompt = prompt.replace(OLD_DATA_DESCRIPTION, NEW_DATA_DESCRIPTION);
87
- await session.run(`MATCH (s:WorkflowStep {stepId: $stepId})
88
- SET s.prompt = $prompt`, { stepId, prompt });
89
- console.error(`[waitlist-heal] patched conversationDate field into prompt for workflow ${workflowId}`);
98
+ console.error(`[waitlist-heal] migrated legacy llm step ${oldStepId} tool step ${newStepId} on workflow ${workflowId}`);
90
99
  return true;
91
100
  }
92
- // ---------------------------------------------------------------------------
93
- // Standalone tool entry point
94
- // ---------------------------------------------------------------------------
95
101
  export async function waitlistHeal(params) {
96
102
  const { accountId } = params;
97
103
  const session = getSession();
98
104
  try {
99
- // Look up the workflow by name
100
105
  const workflowResult = await session.run(`MATCH (w:Workflow {accountId: $accountId, name: $name})
101
106
  WHERE w.status IN ['active', 'draft']
102
107
  RETURN w.workflowId AS workflowId
@@ -106,11 +111,9 @@ export async function waitlistHeal(params) {
106
111
  return { healed: false, workflowId: null };
107
112
  }
108
113
  const workflowId = workflowResult.records[0].get("workflowId");
109
- const healedBroken = await healBrokenPrompt(session, workflowId);
110
- const healedDate = await healMissingConversationDate(session, workflowId);
111
- const healed = healedBroken || healedDate;
114
+ const healed = await healLegacyLlmStep(session, workflowId, accountId);
112
115
  if (healed) {
113
- console.error(`[waitlist-heal] prompt healed for workflow ${workflowId}`);
116
+ console.error(`[waitlist-heal] workflow ${workflowId} migrated to tool-step shape`);
114
117
  }
115
118
  else {
116
119
  console.error("[waitlist-heal] no healing needed");
@@ -1 +1 @@
1
- {"version":3,"file":"waitlist-heal.js","sourceRoot":"","sources":["../../src/tools/waitlist-heal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,8EAA8E;AAC9E,qDAAqD;AACrD,8EAA8E;AAE9E,MAAM,CAAC,MAAM,aAAa,GAAG,0BAA0B,CAAC;AAExD,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AACvD,MAAM,qBAAqB,GAAG,mBAAmB,CAAC;AAElD;;;GAGG;AACH,MAAM,kBAAkB,GACtB,2FAA2F;IAC3F,8BAA8B,CAAC;AAEjC,MAAM,iBAAiB,GACrB,+FAA+F;IAC/F,qHAAqH,CAAC;AAExH,MAAM,aAAa,GAAG,wCAAwC,CAAC;AAC/D,MAAM,YAAY,GAAG,yCAAyC,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,uBAAuB,GAC3B,qFAAqF,CAAC;AAExF,MAAM,oBAAoB,GACxB,2FAA2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E,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;CACxB;AAMD,wBAAsB,aAAa,CACjC,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CAsP9B"}
1
+ {"version":3,"file":"waitlist-setup.d.ts","sourceRoot":"","sources":["../../src/tools/waitlist-setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,8CAA8C,CAAC;AActD,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;CACxB;AAMD,wBAAsB,aAAa,CACjC,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CA0O9B"}