@rubytech/create-realagent-code 0.1.114 → 0.1.116

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 (414) hide show
  1. package/dist/__tests__/installer-specialist-registration.test.js +40 -1
  2. package/dist/__tests__/premium-bundle-gate.test.js +59 -0
  3. package/dist/index.js +24 -1
  4. package/dist/specialist-registration.js +15 -0
  5. package/package.json +1 -1
  6. package/payload/platform/config/brand.json +2 -2
  7. package/payload/platform/neo4j/schema.cypher +1 -1
  8. package/payload/platform/plugins/.claude-plugin/marketplace.json +0 -20
  9. package/payload/platform/plugins/admin/PLUGIN.md +1 -0
  10. package/payload/platform/plugins/admin/hooks/signal-detector-stop.sh +309 -0
  11. package/payload/platform/plugins/contacts/mcp/dist/index.js +3 -3
  12. package/payload/platform/plugins/contacts/mcp/dist/index.js.map +1 -1
  13. package/payload/platform/plugins/contacts/mcp/dist/tools/contact-create.js +1 -1
  14. package/payload/platform/plugins/docs/references/contacts-guide.md +1 -9
  15. package/payload/platform/plugins/docs/references/getting-started.md +1 -1
  16. package/payload/platform/plugins/docs/references/internals.md +1 -1
  17. package/payload/platform/plugins/docs/references/platform.md +1 -1
  18. package/payload/platform/plugins/docs/references/plugins-guide.md +1 -2
  19. package/payload/platform/plugins/linkedin-import/PLUGIN.md +1 -1
  20. package/payload/platform/plugins/memory/PLUGIN.md +8 -1
  21. package/payload/platform/plugins/memory/mcp/dist/index.js +32 -0
  22. package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
  23. package/payload/platform/plugins/memory/mcp/dist/tools/memory-signals-recent.d.ts +35 -0
  24. package/payload/platform/plugins/memory/mcp/dist/tools/memory-signals-recent.d.ts.map +1 -0
  25. package/payload/platform/plugins/memory/mcp/dist/tools/memory-signals-recent.js +73 -0
  26. package/payload/platform/plugins/memory/mcp/dist/tools/memory-signals-recent.js.map +1 -0
  27. package/payload/platform/plugins/sales/.claude-plugin/plugin.json +1 -1
  28. package/payload/platform/plugins/sales/PLUGIN.md +9 -9
  29. package/payload/platform/plugins/sales/references/close-tracking.md +6 -6
  30. package/payload/platform/plugins/sales/references/faq.md +1 -5
  31. package/payload/platform/plugins/sales/references/objection-handling.md +2 -2
  32. package/payload/platform/plugins/scheduling/PLUGIN.md +1 -1
  33. package/payload/platform/plugins/scheduling/mcp/dist/index.js +2 -2
  34. package/payload/platform/plugins/scheduling/mcp/dist/index.js.map +1 -1
  35. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/getUserTimezone.test.js +1 -1
  36. package/payload/platform/plugins/workflows/PLUGIN.md +1 -1
  37. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-execute.d.ts +1 -1
  38. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-execute.js +2 -2
  39. package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-execute.js.map +1 -1
  40. package/payload/platform/scripts/conversation-id-allowlist.txt +0 -7
  41. package/payload/platform/scripts/seed-neo4j.sh +2 -1
  42. package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
  43. package/payload/platform/services/claude-session-manager/dist/http-server.js +42 -1
  44. package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
  45. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +34 -0
  46. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
  47. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +83 -2
  48. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
  49. package/payload/platform/templates/agents/admin/IDENTITY.md +12 -0
  50. package/payload/platform/templates/specialists/agents/project-manager.md +1 -3
  51. package/payload/platform/templates/specialists/agents/signal-detector.md +129 -0
  52. package/payload/server/{chunk-FSPPVVWM.js → chunk-FJCI6X3H.js} +192 -0
  53. package/payload/server/maxy-edge.js +1 -1
  54. package/payload/server/public/assets/{ChatInput-CsnIedhS.js → ChatInput-CJo_77bp.js} +5 -1
  55. package/payload/server/public/assets/{Checkbox-CWugFyFT.js → Checkbox-YrQovXpN.js} +1 -1
  56. package/payload/server/public/assets/{admin-D3gZuyUn.js → admin-DloKrK2i.js} +25 -25
  57. package/payload/server/public/assets/{architectureDiagram-Q4EWVU46-CeTRKWDb.js → architectureDiagram-Q4EWVU46-Breg9-99.js} +1 -1
  58. package/payload/server/public/assets/{blockDiagram-DXYQGD6D-DeeIX5U3.js → blockDiagram-DXYQGD6D-DXf1_673.js} +1 -1
  59. package/payload/server/public/assets/{c4Diagram-AHTNJAMY-CFsqZuil.js → c4Diagram-AHTNJAMY-CSZ36W4-.js} +1 -1
  60. package/payload/server/public/assets/channel-BmZnt3PP.js +1 -0
  61. package/payload/server/public/assets/{chunk-336JU56O-DpIXuFM0.js → chunk-336JU56O-DsrLk2eK.js} +2 -2
  62. package/payload/server/public/assets/{chunk-426QAEUC-Qk8qqrvA.js → chunk-426QAEUC-JpNfNf81.js} +1 -1
  63. package/payload/server/public/assets/{chunk-4TB4RGXK-DtM8-CUn.js → chunk-4TB4RGXK-DmClEAD0.js} +1 -1
  64. package/payload/server/public/assets/{chunk-5FUZZQ4R-CrSQ4ySU.js → chunk-5FUZZQ4R-BI9blW3N.js} +1 -1
  65. package/payload/server/public/assets/{chunk-5PVQY5BW-Bn2nQwdj.js → chunk-5PVQY5BW-BbgttEFO.js} +1 -1
  66. package/payload/server/public/assets/{chunk-EDXVE4YY-CzCPnR0P.js → chunk-EDXVE4YY-BX_LCFOx.js} +1 -1
  67. package/payload/server/public/assets/{chunk-ENJZ2VHE-CgZj9RoG.js → chunk-ENJZ2VHE-Bb7EoD0w.js} +1 -1
  68. package/payload/server/public/assets/{chunk-ICPOFSXX-wy-eNjwW.js → chunk-ICPOFSXX-DH8uQk-s.js} +1 -1
  69. package/payload/server/public/assets/{chunk-OYMX7WX6-CMmJtL8S.js → chunk-OYMX7WX6-FH5kgXsw.js} +1 -1
  70. package/payload/server/public/assets/{chunk-U2HBQHQK-CFCW7OaT.js → chunk-U2HBQHQK-D_ljlkHr.js} +1 -1
  71. package/payload/server/public/assets/{chunk-X2U36JSP-Bgh-CJSN.js → chunk-X2U36JSP-BX3EmZvm.js} +1 -1
  72. package/payload/server/public/assets/{chunk-YZCP3GAM-BXKwZ4vN.js → chunk-YZCP3GAM-Vu7-E93h.js} +1 -1
  73. package/payload/server/public/assets/{chunk-ZZ45TVLE-BiOuK5NP.js → chunk-ZZ45TVLE-CwjhNPX5.js} +1 -1
  74. package/payload/server/public/assets/classDiagram-6PBFFD2Q-kmMLFUpV.js +1 -0
  75. package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-BV7Ae8ct.js +1 -0
  76. package/payload/server/public/assets/clone-B5eqoN9I.js +1 -0
  77. package/payload/server/public/assets/{dagre-DyCxa9Q2.js → dagre-Ce6gsj0C.js} +1 -1
  78. package/payload/server/public/assets/{dagre-KV5264BT-Cffo_hmf.js → dagre-KV5264BT-BaMGpsoy.js} +1 -1
  79. package/payload/server/public/assets/data-NMvGx6jm.js +1 -0
  80. package/payload/server/public/assets/{diagram-5BDNPKRD-Bt93Du3V.js → diagram-5BDNPKRD-CHEE9rjq.js} +1 -1
  81. package/payload/server/public/assets/{diagram-G4DWMVQ6-v4r-tBsC.js → diagram-G4DWMVQ6-C98sZLW1.js} +1 -1
  82. package/payload/server/public/assets/{diagram-MMDJMWI5-DKrVPOP-.js → diagram-MMDJMWI5-DNvMGsTZ.js} +1 -1
  83. package/payload/server/public/assets/{diagram-TYMM5635-B1PzWQb9.js → diagram-TYMM5635-Cdte4IBa.js} +1 -1
  84. package/payload/server/public/assets/{erDiagram-SMLLAGMA-ClQzsQAs.js → erDiagram-SMLLAGMA-C9VZsWXK.js} +1 -1
  85. package/payload/server/public/assets/{flowDiagram-DWJPFMVM-h3IbpN_7.js → flowDiagram-DWJPFMVM-tuP5fzzR.js} +1 -1
  86. package/payload/server/public/assets/{ganttDiagram-T4ZO3ILL-ClaxOJi8.js → ganttDiagram-T4ZO3ILL-SJgRPUwx.js} +1 -1
  87. package/payload/server/public/assets/{gitGraphDiagram-UUTBAWPF-pM-U4ClD.js → gitGraphDiagram-UUTBAWPF-DU_cI_50.js} +1 -1
  88. package/payload/server/public/assets/graph-CN60KyTy.js +1 -0
  89. package/payload/server/public/assets/graph-labels-h39S93Xo.js +1 -0
  90. package/payload/server/public/assets/{graphlib-CwimOv_M.js → graphlib-D_nAsvmx.js} +1 -1
  91. package/payload/server/public/assets/{infoDiagram-42DDH7IO-DcO3Giwe.js → infoDiagram-42DDH7IO-Cj2Y19m6.js} +1 -1
  92. package/payload/server/public/assets/{ishikawaDiagram-UXIWVN3A-BcdSL5VS.js → ishikawaDiagram-UXIWVN3A-DMc1xq1y.js} +1 -1
  93. package/payload/server/public/assets/{journeyDiagram-VCZTEJTY-CYahHYzf.js → journeyDiagram-VCZTEJTY-C4CRAQma.js} +1 -1
  94. package/payload/server/public/assets/{kanban-definition-6JOO6SKY-Cl5KhoS4.js → kanban-definition-6JOO6SKY-CTr4AldU.js} +1 -1
  95. package/payload/server/public/assets/lib-Bnh57com.js +29 -0
  96. package/payload/server/public/assets/{line-d_2oTxLp.js → line-Btlm_IAl.js} +1 -1
  97. package/payload/server/public/assets/{mermaid-parser.core-CMMDGv3x.js → mermaid-parser.core-DXFdj_y1.js} +1 -1
  98. package/payload/server/public/assets/{mermaid.core-DK9ENGbr.js → mermaid.core-DFBhoCr5.js} +3 -3
  99. package/payload/server/public/assets/{mindmap-definition-QFDTVHPH-mA3x3MFG.js → mindmap-definition-QFDTVHPH-r9gVQybo.js} +1 -1
  100. package/payload/server/public/assets/{page-CgDmg_fX.js → page-B0iMmY6t.js} +1 -1
  101. package/payload/server/public/assets/{page-D9lluVl7.js → page-CFRU-BdJ.js} +2 -2
  102. package/payload/server/public/assets/{pieDiagram-DEJITSTG-CW1nGFlY.js → pieDiagram-DEJITSTG-CHKZjSaH.js} +1 -1
  103. package/payload/server/public/assets/{public-DdLMkNdS.js → public-DyGWgfaZ.js} +4 -4
  104. package/payload/server/public/assets/{quadrantDiagram-34T5L4WZ-DI5igJhR.js → quadrantDiagram-34T5L4WZ-CSGR1HJr.js} +1 -1
  105. package/payload/server/public/assets/{requirementDiagram-MS252O5E-DyVeI4e_.js → requirementDiagram-MS252O5E-DZ6hX9D6.js} +1 -1
  106. package/payload/server/public/assets/{sankeyDiagram-XADWPNL6-CCTTBYKY.js → sankeyDiagram-XADWPNL6-DbZBKh0m.js} +1 -1
  107. package/payload/server/public/assets/{sequenceDiagram-FGHM5R23-hVVf35ly.js → sequenceDiagram-FGHM5R23-BHHpb8dt.js} +1 -1
  108. package/payload/server/public/assets/{stateDiagram-FHFEXIEX-CSLuQDUX.js → stateDiagram-FHFEXIEX-DQ1jiLB4.js} +1 -1
  109. package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-CByT2RzF.js +1 -0
  110. package/payload/server/public/assets/{timeline-definition-GMOUNBTQ-sxC3W8Q4.js → timeline-definition-GMOUNBTQ-BlGiEU7p.js} +1 -1
  111. package/payload/server/public/assets/{vennDiagram-DHZGUBPP-Ro-ton6Z.js → vennDiagram-DHZGUBPP-DmEH-hsB.js} +1 -1
  112. package/payload/server/public/assets/{wardleyDiagram-NUSXRM2D-T-dKD0Zx.js → wardleyDiagram-NUSXRM2D-C7KJJ40d.js} +1 -1
  113. package/payload/server/public/assets/{xychartDiagram-5P7HB3ND-CfProPts.js → xychartDiagram-5P7HB3ND-JDnusCaa.js} +1 -1
  114. package/payload/server/public/data.html +4 -4
  115. package/payload/server/public/graph.html +5 -5
  116. package/payload/server/public/index.html +7 -7
  117. package/payload/server/public/public.html +4 -4
  118. package/payload/server/server.js +52 -8
  119. package/payload/platform/plugins/teaching/.claude-plugin/plugin.json +0 -8
  120. package/payload/platform/plugins/teaching/PLUGIN.md +0 -58
  121. package/payload/platform/plugins/teaching/skills/interactive-tutor/SKILL.md +0 -59
  122. package/payload/platform/plugins/teaching/skills/interactive-tutor/references/assessment.md +0 -70
  123. package/payload/platform/plugins/teaching/skills/interactive-tutor/references/classroom-conduct.md +0 -43
  124. package/payload/platform/plugins/teaching/skills/interactive-tutor/references/teaching-modes.md +0 -83
  125. package/payload/platform/plugins/teaching/skills/lesson-planner/SKILL.md +0 -48
  126. package/payload/platform/plugins/teaching/skills/lesson-planner/references/context-gathering.md +0 -41
  127. package/payload/platform/plugins/teaching/skills/lesson-planner/references/plan-structure.md +0 -94
  128. package/payload/platform/plugins/teaching/skills/study-pack-builder/SKILL.md +0 -52
  129. package/payload/platform/plugins/teaching/skills/study-pack-builder/references/disaggregation.md +0 -49
  130. package/payload/platform/plugins/teaching/skills/study-pack-builder/references/materials.md +0 -116
  131. package/payload/platform/plugins/venture-studio/.claude-plugin/plugin.json +0 -8
  132. package/payload/platform/plugins/venture-studio/PLUGIN.md +0 -119
  133. package/payload/platform/plugins/venture-studio/bin/scaffold.sh +0 -116
  134. package/payload/platform/plugins/venture-studio/skills/brand-pack/SKILL.md +0 -256
  135. package/payload/platform/plugins/venture-studio/skills/brand-pack/references/color-psychology.md +0 -118
  136. package/payload/platform/plugins/venture-studio/skills/investor-data-room/SKILL.md +0 -374
  137. package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/business-plan-template.md +0 -64
  138. package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/compliance-research-checklist.md +0 -53
  139. package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/data-room-structure.md +0 -88
  140. package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/deck-blueprint-template.md +0 -39
  141. package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/design-tokens-application.md +0 -79
  142. package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/html-pdf-pipeline.md +0 -236
  143. package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/internal-workings-scrub.md +0 -33
  144. package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/termsheet-template.md +0 -88
  145. package/payload/platform/plugins/venture-studio/skills/investor-data-room/templates/prospectus/index.html +0 -1565
  146. package/payload/platform/plugins/venture-studio/skills/investor-data-room/templates/prospectus/render-pdf.mjs +0 -91
  147. package/payload/platform/plugins/venture-studio/skills/investor-data-room/templates/prospectus/term_sheet.html +0 -715
  148. package/payload/platform/plugins/venture-studio/skills/office-hours/SKILL.md +0 -587
  149. package/payload/platform/plugins/venture-studio/skills/prototype-host/SKILL.md +0 -179
  150. package/payload/platform/plugins/venture-studio/skills/prototype-host/references/cloudflared-ingress-edit.md +0 -81
  151. package/payload/platform/plugins/venture-studio/skills/prototype-host/references/scaffold-frameworks.md +0 -60
  152. package/payload/platform/plugins/venture-studio/skills/prototype-host/references/systemd-user-service.md +0 -104
  153. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/SKILL.md +0 -336
  154. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/aarrr-metrics.md +0 -275
  155. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/assumption-testing.md +0 -93
  156. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/boolean-search.md +0 -308
  157. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/build-measure-learn.md +0 -262
  158. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/business-model-canvas.md +0 -171
  159. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/commitment-signals.md +0 -246
  160. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/design-thinking.md +0 -183
  161. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/earlyvangelist.md +0 -190
  162. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/first-principles.md +0 -58
  163. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/fishbone.md +0 -114
  164. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/five-whys.md +0 -43
  165. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/ice-scoring.md +0 -237
  166. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/innovation-accounting.md +0 -290
  167. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/jtbd.md +0 -105
  168. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/landing-page.md +0 -361
  169. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/market-type.md +0 -167
  170. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/mom-test.md +0 -193
  171. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/mvp-types.md +0 -200
  172. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/og-images.md +0 -239
  173. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/pareto.md +0 -103
  174. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/persona-development.md +0 -291
  175. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/pivot-types.md +0 -225
  176. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/positioning-statement.md +0 -179
  177. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/prd.md +0 -363
  178. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/pre-mortem.md +0 -74
  179. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/problem-validation.md +0 -253
  180. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/product-market-fit.md +0 -256
  181. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/research-synthesis.md +0 -276
  182. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/three-engines-of-growth.md +0 -248
  183. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/validation-tests.md +0 -89
  184. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/value-proposition-canvas.md +0 -121
  185. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/win-loss-analysis.md +0 -242
  186. package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/workflow-mapping.md +0 -271
  187. package/payload/platform/plugins/waitlist/.claude-plugin/plugin.json +0 -17
  188. package/payload/platform/plugins/waitlist/PLUGIN.md +0 -86
  189. package/payload/platform/plugins/waitlist/mcp/dist/index.d.ts +0 -2
  190. package/payload/platform/plugins/waitlist/mcp/dist/index.d.ts.map +0 -1
  191. package/payload/platform/plugins/waitlist/mcp/dist/index.js +0 -388
  192. package/payload/platform/plugins/waitlist/mcp/dist/index.js.map +0 -1
  193. package/payload/platform/plugins/waitlist/mcp/dist/lib/admin-model.d.ts +0 -16
  194. package/payload/platform/plugins/waitlist/mcp/dist/lib/admin-model.d.ts.map +0 -1
  195. package/payload/platform/plugins/waitlist/mcp/dist/lib/admin-model.js +0 -58
  196. package/payload/platform/plugins/waitlist/mcp/dist/lib/admin-model.js.map +0 -1
  197. package/payload/platform/plugins/waitlist/mcp/dist/lib/embedding.d.ts +0 -3
  198. package/payload/platform/plugins/waitlist/mcp/dist/lib/embedding.d.ts.map +0 -1
  199. package/payload/platform/plugins/waitlist/mcp/dist/lib/embedding.js +0 -48
  200. package/payload/platform/plugins/waitlist/mcp/dist/lib/embedding.js.map +0 -1
  201. package/payload/platform/plugins/waitlist/mcp/dist/lib/neo4j.d.ts +0 -5
  202. package/payload/platform/plugins/waitlist/mcp/dist/lib/neo4j.d.ts.map +0 -1
  203. package/payload/platform/plugins/waitlist/mcp/dist/lib/neo4j.js +0 -40
  204. package/payload/platform/plugins/waitlist/mcp/dist/lib/neo4j.js.map +0 -1
  205. package/payload/platform/plugins/waitlist/mcp/dist/tools/__tests__/waitlist-persist.test.d.ts +0 -2
  206. package/payload/platform/plugins/waitlist/mcp/dist/tools/__tests__/waitlist-persist.test.d.ts.map +0 -1
  207. package/payload/platform/plugins/waitlist/mcp/dist/tools/__tests__/waitlist-persist.test.js +0 -70
  208. package/payload/platform/plugins/waitlist/mcp/dist/tools/__tests__/waitlist-persist.test.js.map +0 -1
  209. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-extract.d.ts +0 -34
  210. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-extract.d.ts.map +0 -1
  211. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-extract.js +0 -129
  212. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-extract.js.map +0 -1
  213. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-heal.d.ts +0 -27
  214. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-heal.d.ts.map +0 -1
  215. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-heal.js +0 -127
  216. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-heal.js.map +0 -1
  217. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-list.d.ts +0 -23
  218. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-list.d.ts.map +0 -1
  219. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-list.js +0 -58
  220. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-list.js.map +0 -1
  221. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-persist.d.ts +0 -83
  222. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-persist.d.ts.map +0 -1
  223. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-persist.js +0 -433
  224. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-persist.js.map +0 -1
  225. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-review.d.ts +0 -19
  226. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-review.d.ts.map +0 -1
  227. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-review.js +0 -81
  228. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-review.js.map +0 -1
  229. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-scan.d.ts +0 -28
  230. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-scan.d.ts.map +0 -1
  231. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-scan.js +0 -50
  232. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-scan.js.map +0 -1
  233. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-setup.d.ts +0 -33
  234. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-setup.d.ts.map +0 -1
  235. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-setup.js +0 -297
  236. package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-setup.js.map +0 -1
  237. package/payload/platform/plugins/waitlist/mcp/package.json +0 -23
  238. package/payload/platform/plugins/waitlist/mcp/vitest.config.ts +0 -9
  239. package/payload/platform/plugins/writer-craft/.claude-plugin/plugin.json +0 -8
  240. package/payload/platform/plugins/writer-craft/PLUGIN.md +0 -88
  241. package/payload/platform/plugins/writer-craft/agents/writer-craft--manuscript-reviewer.md +0 -92
  242. package/payload/platform/plugins/writer-craft/skills/citation-style/SKILL.md +0 -94
  243. package/payload/platform/plugins/writer-craft/skills/citation-style/references/book-and-chapter-models.md +0 -77
  244. package/payload/platform/plugins/writer-craft/skills/citation-style/references/citation-rules.md +0 -103
  245. package/payload/platform/plugins/writer-craft/skills/citation-style/references/journal-article-models.md +0 -74
  246. package/payload/platform/plugins/writer-craft/skills/citation-style/references/other-source-models.md +0 -146
  247. package/payload/platform/plugins/writer-craft/skills/citation-style/references/reference-list-rules.md +0 -70
  248. package/payload/platform/plugins/writer-craft/skills/editorial-practice/SKILL.md +0 -108
  249. package/payload/platform/plugins/writer-craft/skills/editorial-practice/references/copyediting.md +0 -73
  250. package/payload/platform/plugins/writer-craft/skills/editorial-practice/references/developmental-editing.md +0 -85
  251. package/payload/platform/plugins/writer-craft/skills/editorial-practice/references/genre-specific-editing.md +0 -78
  252. package/payload/platform/plugins/writer-craft/skills/editorial-practice/references/line-editing.md +0 -55
  253. package/payload/platform/plugins/writer-craft/skills/editorial-practice/references/self-editing.md +0 -89
  254. package/payload/platform/plugins/writer-craft/skills/persuasive-storytelling/SKILL.md +0 -114
  255. package/payload/platform/plugins/writer-craft/skills/persuasive-storytelling/references/audience-analysis.md +0 -73
  256. package/payload/platform/plugins/writer-craft/skills/persuasive-storytelling/references/crafting-persuasive-story.md +0 -76
  257. package/payload/platform/plugins/writer-craft/skills/persuasive-storytelling/references/persuasion-case-studies.md +0 -67
  258. package/payload/platform/plugins/writer-craft/skills/persuasive-storytelling/references/transformation-framework.md +0 -86
  259. package/payload/platform/plugins/writer-craft/skills/point-of-view/SKILL.md +0 -97
  260. package/payload/platform/plugins/writer-craft/skills/point-of-view/references/indirect-narration.md +0 -72
  261. package/payload/platform/plugins/writer-craft/skills/point-of-view/references/pov-types-and-voice.md +0 -91
  262. package/payload/platform/plugins/writer-craft/skills/point-of-view/references/protagonist-filter.md +0 -71
  263. package/payload/platform/plugins/writer-craft/skills/point-of-view/references/tense-and-person.md +0 -85
  264. package/payload/platform/plugins/writer-craft/skills/prose-craft/SKILL.md +0 -100
  265. package/payload/platform/plugins/writer-craft/skills/prose-craft/references/punctuation-and-grammar.md +0 -72
  266. package/payload/platform/plugins/writer-craft/skills/prose-craft/references/repetition.md +0 -71
  267. package/payload/platform/plugins/writer-craft/skills/prose-craft/references/sound-and-rhythm.md +0 -64
  268. package/payload/platform/plugins/writer-craft/skills/prose-craft/references/word-economy.md +0 -93
  269. package/payload/platform/plugins/writer-craft/skills/reader-engagement/SKILL.md +0 -100
  270. package/payload/platform/plugins/writer-craft/skills/reader-engagement/references/cause-effect-setup-payoff.md +0 -79
  271. package/payload/platform/plugins/writer-craft/skills/reader-engagement/references/conflict-escalation.md +0 -81
  272. package/payload/platform/plugins/writer-craft/skills/reader-engagement/references/hooking-readers.md +0 -67
  273. package/payload/platform/plugins/writer-craft/skills/reader-engagement/references/neurochemistry-of-engagement.md +0 -94
  274. package/payload/platform/plugins/writer-craft/skills/review-manuscript/SKILL.md +0 -111
  275. package/payload/platform/plugins/writer-craft/skills/review-manuscript/references/review-manuscript-checklist.md +0 -119
  276. package/payload/platform/plugins/writer-craft/skills/review-prose/SKILL.md +0 -99
  277. package/payload/platform/plugins/writer-craft/skills/review-prose/references/prose-review-checklist.md +0 -112
  278. package/payload/platform/plugins/writer-craft/skills/review-scene/SKILL.md +0 -99
  279. package/payload/platform/plugins/writer-craft/skills/review-scene/references/scene-analysis-framework.md +0 -95
  280. package/payload/platform/plugins/writer-craft/skills/story-architecture/SKILL.md +0 -106
  281. package/payload/platform/plugins/writer-craft/skills/story-architecture/references/blueprinting-and-scene-cards.md +0 -118
  282. package/payload/platform/plugins/writer-craft/skills/story-architecture/references/inner-issue-and-protagonist-goal.md +0 -66
  283. package/payload/platform/plugins/writer-craft/skills/story-architecture/references/misbelief-desire-worldview.md +0 -87
  284. package/payload/platform/plugins/writer-craft/skills/story-architecture/references/origin-scenes-and-escalation.md +0 -82
  285. package/payload/platform/plugins/writer-craft/skills/story-blueprint/SKILL.md +0 -133
  286. package/payload/platform/plugins/writer-craft/skills/story-blueprint/references/blueprinting-exercises.md +0 -118
  287. package/payload/platform/plugins/writer-craft/skills/story-blueprint/references/blueprinting-process.md +0 -128
  288. package/payload/premium-plugins/.claude-plugin/marketplace.json +0 -23
  289. package/payload/premium-plugins/teaching/.claude-plugin/plugin.json +0 -8
  290. package/payload/premium-plugins/teaching/PLUGIN.md +0 -58
  291. package/payload/premium-plugins/teaching/skills/interactive-tutor/SKILL.md +0 -59
  292. package/payload/premium-plugins/teaching/skills/interactive-tutor/references/assessment.md +0 -70
  293. package/payload/premium-plugins/teaching/skills/interactive-tutor/references/classroom-conduct.md +0 -43
  294. package/payload/premium-plugins/teaching/skills/interactive-tutor/references/teaching-modes.md +0 -83
  295. package/payload/premium-plugins/teaching/skills/lesson-planner/SKILL.md +0 -48
  296. package/payload/premium-plugins/teaching/skills/lesson-planner/references/context-gathering.md +0 -41
  297. package/payload/premium-plugins/teaching/skills/lesson-planner/references/plan-structure.md +0 -94
  298. package/payload/premium-plugins/teaching/skills/study-pack-builder/SKILL.md +0 -52
  299. package/payload/premium-plugins/teaching/skills/study-pack-builder/references/disaggregation.md +0 -49
  300. package/payload/premium-plugins/teaching/skills/study-pack-builder/references/materials.md +0 -116
  301. package/payload/premium-plugins/venture-studio/.claude-plugin/plugin.json +0 -8
  302. package/payload/premium-plugins/venture-studio/PLUGIN.md +0 -119
  303. package/payload/premium-plugins/venture-studio/bin/scaffold.sh +0 -116
  304. package/payload/premium-plugins/venture-studio/skills/brand-pack/SKILL.md +0 -256
  305. package/payload/premium-plugins/venture-studio/skills/brand-pack/references/color-psychology.md +0 -118
  306. package/payload/premium-plugins/venture-studio/skills/investor-data-room/SKILL.md +0 -374
  307. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/business-plan-template.md +0 -64
  308. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/compliance-research-checklist.md +0 -53
  309. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/data-room-structure.md +0 -88
  310. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/deck-blueprint-template.md +0 -39
  311. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/design-tokens-application.md +0 -79
  312. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/html-pdf-pipeline.md +0 -236
  313. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/internal-workings-scrub.md +0 -33
  314. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/termsheet-template.md +0 -88
  315. package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/index.html +0 -1565
  316. package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/render-pdf.mjs +0 -91
  317. package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/term_sheet.html +0 -715
  318. package/payload/premium-plugins/venture-studio/skills/office-hours/SKILL.md +0 -587
  319. package/payload/premium-plugins/venture-studio/skills/prototype-host/SKILL.md +0 -179
  320. package/payload/premium-plugins/venture-studio/skills/prototype-host/references/cloudflared-ingress-edit.md +0 -81
  321. package/payload/premium-plugins/venture-studio/skills/prototype-host/references/scaffold-frameworks.md +0 -60
  322. package/payload/premium-plugins/venture-studio/skills/prototype-host/references/systemd-user-service.md +0 -104
  323. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/SKILL.md +0 -336
  324. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/aarrr-metrics.md +0 -275
  325. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/assumption-testing.md +0 -93
  326. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/boolean-search.md +0 -308
  327. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/build-measure-learn.md +0 -262
  328. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/business-model-canvas.md +0 -171
  329. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/commitment-signals.md +0 -246
  330. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/design-thinking.md +0 -183
  331. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/earlyvangelist.md +0 -190
  332. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/first-principles.md +0 -58
  333. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/fishbone.md +0 -114
  334. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/five-whys.md +0 -43
  335. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/ice-scoring.md +0 -237
  336. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/innovation-accounting.md +0 -290
  337. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/jtbd.md +0 -105
  338. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/landing-page.md +0 -361
  339. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/market-type.md +0 -167
  340. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/mom-test.md +0 -193
  341. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/mvp-types.md +0 -200
  342. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/og-images.md +0 -239
  343. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/pareto.md +0 -103
  344. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/persona-development.md +0 -291
  345. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/pivot-types.md +0 -225
  346. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/positioning-statement.md +0 -179
  347. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/prd.md +0 -363
  348. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/pre-mortem.md +0 -74
  349. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/problem-validation.md +0 -253
  350. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/product-market-fit.md +0 -256
  351. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/research-synthesis.md +0 -276
  352. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/three-engines-of-growth.md +0 -248
  353. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/validation-tests.md +0 -89
  354. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/value-proposition-canvas.md +0 -121
  355. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/win-loss-analysis.md +0 -242
  356. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/workflow-mapping.md +0 -271
  357. package/payload/premium-plugins/writer-craft/.claude-plugin/plugin.json +0 -8
  358. package/payload/premium-plugins/writer-craft/PLUGIN.md +0 -88
  359. package/payload/premium-plugins/writer-craft/agents/writer-craft--manuscript-reviewer.md +0 -92
  360. package/payload/premium-plugins/writer-craft/skills/citation-style/SKILL.md +0 -94
  361. package/payload/premium-plugins/writer-craft/skills/citation-style/references/book-and-chapter-models.md +0 -77
  362. package/payload/premium-plugins/writer-craft/skills/citation-style/references/citation-rules.md +0 -103
  363. package/payload/premium-plugins/writer-craft/skills/citation-style/references/journal-article-models.md +0 -74
  364. package/payload/premium-plugins/writer-craft/skills/citation-style/references/other-source-models.md +0 -146
  365. package/payload/premium-plugins/writer-craft/skills/citation-style/references/reference-list-rules.md +0 -70
  366. package/payload/premium-plugins/writer-craft/skills/editorial-practice/SKILL.md +0 -108
  367. package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/copyediting.md +0 -73
  368. package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/developmental-editing.md +0 -85
  369. package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/genre-specific-editing.md +0 -78
  370. package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/line-editing.md +0 -55
  371. package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/self-editing.md +0 -89
  372. package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/SKILL.md +0 -114
  373. package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/audience-analysis.md +0 -73
  374. package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/crafting-persuasive-story.md +0 -76
  375. package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/persuasion-case-studies.md +0 -67
  376. package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/transformation-framework.md +0 -86
  377. package/payload/premium-plugins/writer-craft/skills/point-of-view/SKILL.md +0 -97
  378. package/payload/premium-plugins/writer-craft/skills/point-of-view/references/indirect-narration.md +0 -72
  379. package/payload/premium-plugins/writer-craft/skills/point-of-view/references/pov-types-and-voice.md +0 -91
  380. package/payload/premium-plugins/writer-craft/skills/point-of-view/references/protagonist-filter.md +0 -71
  381. package/payload/premium-plugins/writer-craft/skills/point-of-view/references/tense-and-person.md +0 -85
  382. package/payload/premium-plugins/writer-craft/skills/prose-craft/SKILL.md +0 -100
  383. package/payload/premium-plugins/writer-craft/skills/prose-craft/references/punctuation-and-grammar.md +0 -72
  384. package/payload/premium-plugins/writer-craft/skills/prose-craft/references/repetition.md +0 -71
  385. package/payload/premium-plugins/writer-craft/skills/prose-craft/references/sound-and-rhythm.md +0 -64
  386. package/payload/premium-plugins/writer-craft/skills/prose-craft/references/word-economy.md +0 -93
  387. package/payload/premium-plugins/writer-craft/skills/reader-engagement/SKILL.md +0 -100
  388. package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/cause-effect-setup-payoff.md +0 -79
  389. package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/conflict-escalation.md +0 -81
  390. package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/hooking-readers.md +0 -67
  391. package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/neurochemistry-of-engagement.md +0 -94
  392. package/payload/premium-plugins/writer-craft/skills/review-manuscript/SKILL.md +0 -111
  393. package/payload/premium-plugins/writer-craft/skills/review-manuscript/references/review-manuscript-checklist.md +0 -119
  394. package/payload/premium-plugins/writer-craft/skills/review-prose/SKILL.md +0 -99
  395. package/payload/premium-plugins/writer-craft/skills/review-prose/references/prose-review-checklist.md +0 -112
  396. package/payload/premium-plugins/writer-craft/skills/review-scene/SKILL.md +0 -99
  397. package/payload/premium-plugins/writer-craft/skills/review-scene/references/scene-analysis-framework.md +0 -95
  398. package/payload/premium-plugins/writer-craft/skills/story-architecture/SKILL.md +0 -106
  399. package/payload/premium-plugins/writer-craft/skills/story-architecture/references/blueprinting-and-scene-cards.md +0 -118
  400. package/payload/premium-plugins/writer-craft/skills/story-architecture/references/inner-issue-and-protagonist-goal.md +0 -66
  401. package/payload/premium-plugins/writer-craft/skills/story-architecture/references/misbelief-desire-worldview.md +0 -87
  402. package/payload/premium-plugins/writer-craft/skills/story-architecture/references/origin-scenes-and-escalation.md +0 -82
  403. package/payload/premium-plugins/writer-craft/skills/story-blueprint/SKILL.md +0 -133
  404. package/payload/premium-plugins/writer-craft/skills/story-blueprint/references/blueprinting-exercises.md +0 -118
  405. package/payload/premium-plugins/writer-craft/skills/story-blueprint/references/blueprinting-process.md +0 -128
  406. package/payload/server/public/assets/channel-CrSx5mnG.js +0 -1
  407. package/payload/server/public/assets/classDiagram-6PBFFD2Q-C3IDJsqN.js +0 -1
  408. package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-BOIrJ5Zb.js +0 -1
  409. package/payload/server/public/assets/clone-P8Fkz7JD.js +0 -1
  410. package/payload/server/public/assets/data-DRfwJPja.js +0 -1
  411. package/payload/server/public/assets/graph-B4FFYwus.js +0 -1
  412. package/payload/server/public/assets/graph-labels-Cpk9Ktt0.js +0 -1
  413. package/payload/server/public/assets/lib--yuBd0Xi.js +0 -33
  414. package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-C5JejhQU.js +0 -1
@@ -1,83 +0,0 @@
1
- /**
2
- * Persist LLM extraction results as Person nodes.
3
- *
4
- * Takes the structured JSON output from an LLM extraction step
5
- * and creates/updates Person nodes idempotently via MERGE-on-email.
6
- *
7
- * LLM OUTPUT (JSON array)
8
- * │
9
- * ├─ Validate: must be an array of extraction objects
10
- * ├─ For each extraction:
11
- * │ ├─ Validate email present and well-formed
12
- * │ ├─ Hallucination guard: email must appear in source messages
13
- * │ ├─ MERGE Person node (idempotent on email + accountId)
14
- * │ ├─ ON CREATE: set all fields; createdOn = conversationDate
15
- * │ │ (fallback: extraction time); extractedOn = extraction time
16
- * │ ├─ ON MATCH: backfill name if existing is "Unknown";
17
- * │ │ preserve createdOn (earliest conversation date)
18
- * │ ├─ Merge discoveryNotes (new enriches existing)
19
- * │ └─ Recompute embedding with discovery context
20
- * │
21
- * v
22
- * SUMMARY STATS
23
- */
24
- export interface DiscoveryNotes {
25
- businessType: string | null;
26
- role: string | null;
27
- needs: string | null;
28
- challenges: string | null;
29
- interests: string | null;
30
- engagementQuality: string | null;
31
- otherSignals: string | null;
32
- }
33
- export interface ExtractionEntry {
34
- email: string;
35
- givenName?: string | null;
36
- familyName?: string | null;
37
- conversationId?: string | null;
38
- conversationDate?: string | null;
39
- businessType?: string | null;
40
- role?: string | null;
41
- needs?: string | null;
42
- challenges?: string | null;
43
- interests?: string | null;
44
- engagementQuality?: string | null;
45
- otherSignals?: string | null;
46
- }
47
- export interface WaitlistPersistParams {
48
- accountId: string;
49
- extractions: unknown;
50
- conversations: unknown;
51
- }
52
- export interface WaitlistPersistResult {
53
- processed: number;
54
- created: number;
55
- updated: number;
56
- existing: number;
57
- flaggedForReview: number;
58
- withDiscoveryNotes: number;
59
- filtered: number;
60
- errors: number;
61
- }
62
- /**
63
- * Cypher emitted on every waitlist extraction carrying a `conversationId`.
64
- * Exported so a unit test can assert the cypher shape (MATCH, OPTIONAL
65
- * MATCH, MERGE, ON CREATE SET) without spinning up a Neo4j driver.
66
- * Plain-text regression gate; behavioural verification is via the Real
67
- * Agent cron-cycle manual repro described in the Verification
68
- * section.
69
- *
70
- * CREATE-vs-MATCH detection: an additional `OPTIONAL MATCH` against an
71
- * `existing` edge runs before the MERGE and its `IS NOT NULL`
72
- * projection drives the returned `edgeCreated` boolean. This form
73
- * works across every Neo4j 5.x minor version; an `EXISTS { ... } AS
74
- * hadEdge` in a WITH projection is a 5.13+-only alias form and
75
- * produces `Neo.ClientError.Statement.SyntaxError` on older CE
76
- * installs, silently swallowed by the outer `catch (edgeErr)` in
77
- * `createOrUpdatePerson` — the Person would be written and the edge
78
- * never would. The OPTIONAL-MATCH-before-MERGE form is the safe
79
- * equivalent.
80
- */
81
- export declare const PARTICIPATES_IN_CYPHER = "MATCH (p:Person {email: $email, accountId: $accountId})\nOPTIONAL MATCH (c:Conversation {conversationId: $conversationId, accountId: $accountId})\nWHERE c IS NOT NULL\nOPTIONAL MATCH (p)-[existing:PARTICIPATES_IN]->(c)\nWITH p, c, existing IS NOT NULL AS hadEdge\nMERGE (p)-[r:PARTICIPATES_IN]->(c)\nON CREATE SET r.joinedAt = datetime()\nRETURN c.conversationId AS conversationId, NOT hadEdge AS edgeCreated";
82
- export declare function waitlistPersist(params: WaitlistPersistParams): Promise<WaitlistPersistResult>;
83
- //# sourceMappingURL=waitlist-persist.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"waitlist-persist.d.ts","sourceRoot":"","sources":["../../src/tools/waitlist-persist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAUH,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,E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AE,MAAM,CAAC;CAChB;AAgMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,sBAAsB,6ZAOmC,CAAC;AAgLvE,wBAAsB,eAAe,CACnC,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,qBAAqB,CAAC,CAqFhC"}
@@ -1,433 +0,0 @@
1
- /**
2
- * Persist LLM extraction results as Person nodes.
3
- *
4
- * Takes the structured JSON output from an LLM extraction step
5
- * and creates/updates Person nodes idempotently via MERGE-on-email.
6
- *
7
- * LLM OUTPUT (JSON array)
8
- * │
9
- * ├─ Validate: must be an array of extraction objects
10
- * ├─ For each extraction:
11
- * │ ├─ Validate email present and well-formed
12
- * │ ├─ Hallucination guard: email must appear in source messages
13
- * │ ├─ MERGE Person node (idempotent on email + accountId)
14
- * │ ├─ ON CREATE: set all fields; createdOn = conversationDate
15
- * │ │ (fallback: extraction time); extractedOn = extraction time
16
- * │ ├─ ON MATCH: backfill name if existing is "Unknown";
17
- * │ │ preserve createdOn (earliest conversation date)
18
- * │ ├─ Merge discoveryNotes (new enriches existing)
19
- * │ └─ Recompute embedding with discovery context
20
- * │
21
- * v
22
- * SUMMARY STATS
23
- */
24
- import { getSession } from "../lib/neo4j.js";
25
- import { computeEmbedding, buildPersonEmbeddingText } from "../lib/embedding.js";
26
- // ---------------------------------------------------------------------------
27
- // Discovery notes helpers
28
- // ---------------------------------------------------------------------------
29
- function buildDiscoveryNotes(entry) {
30
- const str = (v) => typeof v === "string" && v.trim() ? v.trim() : null;
31
- const notes = {
32
- businessType: str(entry.businessType),
33
- role: str(entry.role),
34
- needs: str(entry.needs),
35
- challenges: str(entry.challenges),
36
- interests: str(entry.interests),
37
- engagementQuality: str(entry.engagementQuality),
38
- otherSignals: str(entry.otherSignals),
39
- };
40
- const hasAny = Object.values(notes).some((v) => v !== null);
41
- return hasAny ? notes : null;
42
- }
43
- /**
44
- * Merge two DiscoveryNotes objects: new non-null values overwrite,
45
- * null values in the new extraction preserve existing values.
46
- */
47
- function mergeDiscoveryNotes(existing, incoming) {
48
- return {
49
- businessType: incoming.businessType ?? existing.businessType,
50
- role: incoming.role ?? existing.role,
51
- needs: incoming.needs ?? existing.needs,
52
- challenges: incoming.challenges ?? existing.challenges,
53
- interests: incoming.interests ?? existing.interests,
54
- engagementQuality: incoming.engagementQuality ?? existing.engagementQuality,
55
- otherSignals: incoming.otherSignals ?? existing.otherSignals,
56
- };
57
- }
58
- // ---------------------------------------------------------------------------
59
- // Input validation
60
- // ---------------------------------------------------------------------------
61
- function parseExtractions(raw) {
62
- // The workflow engine passes step outputs through parseStepOutput(),
63
- // which wraps non-JSON text as { _raw: text }. If the LLM returned
64
- // malformed JSON, we get that wrapper instead of an array.
65
- if (raw === null || raw === undefined) {
66
- throw new Error("No extraction data received — LLM step may have failed.");
67
- }
68
- // If raw is already an array (template resolved the full object)
69
- if (Array.isArray(raw)) {
70
- return raw;
71
- }
72
- // If raw is an object, check for _raw (malformed LLM output) or
73
- // try to find an array property
74
- if (typeof raw === "object" && !Array.isArray(raw)) {
75
- const obj = raw;
76
- // If it has a _raw field, the LLM output wasn't valid JSON
77
- if ("_raw" in obj && typeof obj._raw === "string") {
78
- // Try to parse the raw string as JSON array
79
- try {
80
- const parsed = JSON.parse(obj._raw);
81
- if (Array.isArray(parsed))
82
- return parsed;
83
- }
84
- catch {
85
- // Fall through to error
86
- }
87
- throw new Error("LLM returned malformed extraction data — expected a JSON array of contacts. " +
88
- "Check the extraction prompt or run workflow-get to inspect it.");
89
- }
90
- // Find the first top-level property that is an array — the LLM may
91
- // wrap results under any key (extractions, results, leads, contacts, etc.)
92
- const arrayProp = Object.values(obj).find(Array.isArray);
93
- if (arrayProp)
94
- return arrayProp;
95
- }
96
- throw new Error("Extraction data is not a JSON array. " +
97
- "The LLM extraction step must return a JSON array of contact objects.");
98
- }
99
- /**
100
- * Build a lookup of conversation messages for email hallucination validation.
101
- * Maps conversationId → joined lowercase messages.
102
- */
103
- function buildConversationIndex(conversations) {
104
- const index = new Map();
105
- if (!conversations || typeof conversations !== "object")
106
- return index;
107
- // Handle the structured output from waitlist-scan
108
- let convArray;
109
- if (Array.isArray(conversations)) {
110
- convArray = conversations;
111
- }
112
- else {
113
- const obj = conversations;
114
- if (Array.isArray(obj.conversations)) {
115
- convArray = obj.conversations;
116
- }
117
- else if ("_raw" in obj && typeof obj._raw === "string") {
118
- // Fallback: try parsing the _raw text
119
- try {
120
- const parsed = JSON.parse(obj._raw);
121
- if (parsed && Array.isArray(parsed.conversations)) {
122
- convArray = parsed.conversations;
123
- }
124
- else {
125
- return index;
126
- }
127
- }
128
- catch {
129
- return index;
130
- }
131
- }
132
- else {
133
- return index;
134
- }
135
- }
136
- // Build a combined text per conversation and a global combined text
137
- let allMessages = "";
138
- for (const conv of convArray) {
139
- const joined = (conv.messages ?? []).join(" ").toLowerCase();
140
- index.set(conv.conversationId, joined);
141
- allMessages += " " + joined;
142
- }
143
- // Store global text under a special key for entries without conversationId
144
- index.set("__all__", allMessages);
145
- return index;
146
- }
147
- /**
148
- * Check if an email appears in the source conversation messages.
149
- * Guards against LLM hallucination — if the model invents an email
150
- * that wasn't in the conversation, we skip rather than create a
151
- * spurious Person node.
152
- */
153
- function emailInSource(email, conversationId, index) {
154
- if (index.size === 0)
155
- return true; // No source data — skip validation
156
- const emailLower = email.toLowerCase();
157
- // Check specific conversation first
158
- if (conversationId && index.has(conversationId)) {
159
- return index.get(conversationId).includes(emailLower);
160
- }
161
- // Fall back to global search
162
- const allMessages = index.get("__all__");
163
- return allMessages ? allMessages.includes(emailLower) : true;
164
- }
165
- // ---------------------------------------------------------------------------
166
- // Participation edge
167
- //
168
- // The waitlist extraction writes `p.sessionId = $conversationId` as a scalar
169
- // join to the source PublicConversation, but `/graph` traverses edges only
170
- // — so waitlist-extracted Persons rendered as graph-orphans despite sharing
171
- // a Conversation with every other message on it. The canonical edge used
172
- // by `group-create`, `group-manage`, and `neo4j-store.ts` is
173
- // `(:Person)-[:PARTICIPATES_IN]->(:Conversation)` (.docs/neo4j.md "Group
174
- // conversations"); the fix extends waitlist-persist to write that edge
175
- // inside the same session as the Person MERGE, guarded by
176
- // `conversationId` presence.
177
- //
178
- // Constraints honoured:
179
- // - `r.joinedAt = datetime()` on CREATE mirrors group-manage.ts:51.
180
- // On MATCH the existing timestamp is preserved (idempotent).
181
- // - OPTIONAL MATCH on the Conversation so a reference to a deleted /
182
- // never-existed Conversation produces a zero-record result rather
183
- // than an error. The caller logs the skip, persists the Person,
184
- // continues.
185
- // - accountId scoping on both the Person MATCH and the Conversation
186
- // MATCH — the edge is brand-scoped exactly like the nodes.
187
- // - `EXISTS {}` subquery reports CREATE vs MATCH via a pre-check so
188
- // the log line distinguishes fresh edges from idempotent re-runs.
189
- // ---------------------------------------------------------------------------
190
- /**
191
- * Cypher emitted on every waitlist extraction carrying a `conversationId`.
192
- * Exported so a unit test can assert the cypher shape (MATCH, OPTIONAL
193
- * MATCH, MERGE, ON CREATE SET) without spinning up a Neo4j driver.
194
- * Plain-text regression gate; behavioural verification is via the Real
195
- * Agent cron-cycle manual repro described in the Verification
196
- * section.
197
- *
198
- * CREATE-vs-MATCH detection: an additional `OPTIONAL MATCH` against an
199
- * `existing` edge runs before the MERGE and its `IS NOT NULL`
200
- * projection drives the returned `edgeCreated` boolean. This form
201
- * works across every Neo4j 5.x minor version; an `EXISTS { ... } AS
202
- * hadEdge` in a WITH projection is a 5.13+-only alias form and
203
- * produces `Neo.ClientError.Statement.SyntaxError` on older CE
204
- * installs, silently swallowed by the outer `catch (edgeErr)` in
205
- * `createOrUpdatePerson` — the Person would be written and the edge
206
- * never would. The OPTIONAL-MATCH-before-MERGE form is the safe
207
- * equivalent.
208
- */
209
- export const PARTICIPATES_IN_CYPHER = `MATCH (p:Person {email: $email, accountId: $accountId})
210
- OPTIONAL MATCH (c:Conversation {conversationId: $conversationId, accountId: $accountId})
211
- WHERE c IS NOT NULL
212
- OPTIONAL MATCH (p)-[existing:PARTICIPATES_IN]->(c)
213
- WITH p, c, existing IS NOT NULL AS hadEdge
214
- MERGE (p)-[r:PARTICIPATES_IN]->(c)
215
- ON CREATE SET r.joinedAt = datetime()
216
- RETURN c.conversationId AS conversationId, NOT hadEdge AS edgeCreated`;
217
- // ---------------------------------------------------------------------------
218
- // Person node creation/update
219
- // ---------------------------------------------------------------------------
220
- async function createOrUpdatePerson(entry, accountId, discoveryNotes) {
221
- const email = entry.email.trim().toLowerCase();
222
- const rawGiven = typeof entry.givenName === "string" ? entry.givenName.trim() || null : null;
223
- const familyName = typeof entry.familyName === "string" ? entry.familyName.trim() || null : null;
224
- const hasName = !!rawGiven;
225
- const status = hasName ? "waitlist" : "review";
226
- const givenName = rawGiven ?? "Unknown";
227
- const session = getSession();
228
- try {
229
- const extractedOn = new Date().toISOString();
230
- const rawConvDate = typeof entry.conversationDate === "string" && entry.conversationDate.trim()
231
- ? entry.conversationDate.trim()
232
- : null;
233
- if (!rawConvDate) {
234
- console.error(`[waitlist-persist] conversationDate missing for ${email}, using extraction time`);
235
- }
236
- const createdOn = rawConvDate ?? extractedOn;
237
- const notesJson = discoveryNotes ? JSON.stringify(discoveryNotes) : null;
238
- const conversationId = entry.conversationId ?? null;
239
- const setProps = [
240
- "p.givenName = $givenName",
241
- ...(familyName ? ["p.familyName = $familyName"] : []),
242
- "p.source = 'waitlist'",
243
- "p.status = $status",
244
- "p.createdOn = $createdOn",
245
- "p.extractedOn = $extractedOn",
246
- ...(conversationId ? ["p.sessionId = $conversationId"] : []),
247
- ...(notesJson ? ["p.discoveryNotes = $notesJson"] : []),
248
- ].join(",\n ");
249
- // ON MATCH SET: update name and status only when:
250
- // - the existing node has no real name (givenName is "Unknown" or missing)
251
- // - the new extraction provides a real name
252
- // This preserves admin-reviewed names while backfilling from extraction.
253
- const matchProps = hasName
254
- ? [
255
- "p.givenName = CASE WHEN p.givenName = 'Unknown' OR p.givenName IS NULL THEN $givenName ELSE p.givenName END",
256
- ...(familyName
257
- ? [
258
- "p.familyName = CASE WHEN p.givenName = 'Unknown' OR p.givenName IS NULL THEN $familyName ELSE COALESCE(p.familyName, $familyName) END",
259
- ]
260
- : []),
261
- "p.status = CASE WHEN p.givenName = 'Unknown' OR p.givenName IS NULL THEN $status ELSE p.status END",
262
- ].join(",\n ")
263
- : "";
264
- const onMatchClause = matchProps
265
- ? `ON MATCH SET ${matchProps}`
266
- : "";
267
- const result = await session.run(`MERGE (p:Person {email: $email, accountId: $accountId})
268
- ON CREATE SET ${setProps}
269
- ${onMatchClause}
270
- RETURN p.createdOn = $createdOn AS created,
271
- p.givenName AS currentName,
272
- p.discoveryNotes AS existingNotes`, {
273
- email,
274
- accountId,
275
- givenName,
276
- ...(familyName ? { familyName } : {}),
277
- status,
278
- createdOn,
279
- extractedOn,
280
- ...(conversationId ? { conversationId } : {}),
281
- ...(notesJson ? { notesJson } : {}),
282
- });
283
- const record = result.records[0];
284
- if (!record)
285
- throw new Error(`MERGE returned no record for ${email}`);
286
- const created = record.get("created");
287
- const currentName = record.get("currentName");
288
- const existingNotesRaw = record.get("existingNotes");
289
- const updated = !created && currentName === givenName && givenName !== "Unknown";
290
- // On MATCH: merge discoveryNotes (new non-null fields enrich existing)
291
- let finalNotes = discoveryNotes;
292
- if (!created && discoveryNotes) {
293
- let existingNotes = null;
294
- if (existingNotesRaw) {
295
- try {
296
- existingNotes = JSON.parse(existingNotesRaw);
297
- }
298
- catch {
299
- // Malformed existing notes — overwrite with fresh extraction
300
- }
301
- }
302
- finalNotes = existingNotes
303
- ? mergeDiscoveryNotes(existingNotes, discoveryNotes)
304
- : discoveryNotes;
305
- const mergedJson = JSON.stringify(finalNotes);
306
- await session.run(`MATCH (p:Person {email: $email, accountId: $accountId})
307
- SET p.discoveryNotes = $mergedJson`, { email, accountId, mergedJson });
308
- }
309
- // write the canonical Person→Conversation participation
310
- // edge on the same session as the Person MERGE. Guarded by
311
- // `conversationId` presence (waitlist-scan only sets it when the
312
- // extraction came from a concrete Conversation). Missing Conversation
313
- // (tombstoned / race / never existed) returns zero records — we log
314
- // + skip rather than raise, because the Person record itself is the
315
- // primary artefact of this tool and should survive a dangling
316
- // reference. `p.sessionId` stays as-is for contact-export.ts (see
317
- // .docs/neo4j.md coexistence note).
318
- if (conversationId) {
319
- try {
320
- const edgeResult = await session.run(PARTICIPATES_IN_CYPHER, {
321
- email, accountId, conversationId,
322
- });
323
- const edgeRecord = edgeResult.records[0];
324
- if (!edgeRecord) {
325
- console.error(`[waitlist-persist] edge-skipped tombstone person=${email} conversation=${conversationId} accountId=${accountId}`);
326
- }
327
- else if (edgeRecord.get("edgeCreated")) {
328
- console.error(`[waitlist-persist] edge-created person=${email} conversation=${conversationId} accountId=${accountId}`);
329
- }
330
- }
331
- catch (edgeErr) {
332
- // Edge write is best-effort — a cypher error here must not
333
- // undo the Person MERGE the operator just logged as created.
334
- console.error(`[waitlist-persist] edge-error person=${email} conversation=${conversationId}: ${edgeErr instanceof Error ? edgeErr.message : String(edgeErr)}`);
335
- }
336
- }
337
- // Recompute embedding with discovery context
338
- if (created || updated || discoveryNotes) {
339
- try {
340
- const finalNotesJson = finalNotes ? JSON.stringify(finalNotes) : null;
341
- const textForEmbedding = buildPersonEmbeddingText(givenName, familyName, email, status, finalNotesJson);
342
- const embedding = await computeEmbedding(textForEmbedding);
343
- if (embedding.length > 0) {
344
- await session.run(`MATCH (p:Person {email: $email, accountId: $accountId})
345
- SET p.embedding = $embedding`, { email, accountId, embedding });
346
- }
347
- }
348
- catch {
349
- // Non-fatal — Person stored without embedding
350
- }
351
- }
352
- return { created, updated, status };
353
- }
354
- finally {
355
- await session.close();
356
- }
357
- }
358
- // ---------------------------------------------------------------------------
359
- // Main persist function
360
- // ---------------------------------------------------------------------------
361
- export async function waitlistPersist(params) {
362
- const { accountId, extractions: rawExtractions, conversations: rawConversations } = params;
363
- // Validate and parse the LLM extraction output
364
- const entries = parseExtractions(rawExtractions);
365
- if (entries.length === 0) {
366
- return {
367
- processed: 0, created: 0, updated: 0, existing: 0,
368
- flaggedForReview: 0, withDiscoveryNotes: 0, filtered: 0, errors: 0,
369
- };
370
- }
371
- // Build conversation index for email hallucination validation
372
- const convIndex = buildConversationIndex(rawConversations);
373
- let created = 0;
374
- let updated = 0;
375
- let existing = 0;
376
- let flaggedForReview = 0;
377
- let withDiscoveryNotes = 0;
378
- let filtered = 0;
379
- let errors = 0;
380
- for (const entry of entries) {
381
- try {
382
- // Validate email
383
- if (!entry.email || typeof entry.email !== "string") {
384
- filtered++;
385
- continue;
386
- }
387
- const email = entry.email.trim().toLowerCase();
388
- if (!email.includes("@")) {
389
- filtered++;
390
- continue;
391
- }
392
- // Hallucination guard: email must appear in source messages
393
- if (!emailInSource(email, entry.conversationId, convIndex)) {
394
- console.error(`[waitlist-persist] filtered hallucinated email: ${email}`);
395
- filtered++;
396
- continue;
397
- }
398
- const discoveryNotes = buildDiscoveryNotes(entry);
399
- if (discoveryNotes)
400
- withDiscoveryNotes++;
401
- const result = await createOrUpdatePerson({ ...entry, email }, accountId, discoveryNotes);
402
- if (result.created) {
403
- if (result.status === "review") {
404
- flaggedForReview++;
405
- }
406
- else {
407
- created++;
408
- }
409
- }
410
- else if (result.updated) {
411
- updated++;
412
- }
413
- else {
414
- existing++;
415
- }
416
- }
417
- catch (err) {
418
- console.error(`[waitlist-persist] error processing ${entry.email ?? "unknown"}: ${err instanceof Error ? err.message : String(err)}`);
419
- errors++;
420
- }
421
- }
422
- return {
423
- processed: entries.length,
424
- created,
425
- updated,
426
- existing,
427
- flaggedForReview,
428
- withDiscoveryNotes,
429
- filtered,
430
- errors,
431
- };
432
- }
433
- //# sourceMappingURL=waitlist-persist.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"waitlist-persist.js","sourceRoot":"","sources":["../../src/tools/waitlist-persist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,qBAAq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,KAAK,EAAE,KAAK,EAAE,EACnB,SAAS,EACT,cAAc,CACf,CAAC;YAEF,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;gBACnB,IAAI,MAAM,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;oBAC/B,gBAAgB,EAAE,CAAC;gBACrB,CAAC;qBAAM,CAAC;oBACN,OAAO,EAAE,CAAC;gBACZ,CAAC;YACH,CAAC;iBAAM,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;gBAC1B,OAAO,EAAE,CAAC;YACZ,CAAC;iBAAM,CAAC;gBACN,QAAQ,EAAE,CAAC;YACb,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CACX,uCAAuC,KAAK,CAAC,KAAK,IAAI,SAAS,KAAK,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CACvH,CAAC;YACF,MAAM,EAAE,CAAC;QACX,CAAC;IACH,CAAC;IAED,OAAO;QACL,SAAS,EAAE,OAAO,CAAC,MAAM;QACzB,OAAO;QACP,OAAO;QACP,QAAQ;QACR,gBAAgB;QAChB,kBAAkB;QAClB,QAAQ;QACR,MAAM;KACP,CAAC;AACJ,CAAC"}
@@ -1,19 +0,0 @@
1
- export interface WaitlistReviewParams {
2
- accountId: string;
3
- email?: string;
4
- nodeId?: string;
5
- name?: string;
6
- status?: string;
7
- givenName?: string;
8
- familyName?: string;
9
- }
10
- export interface WaitlistReviewResult {
11
- nodeId: string;
12
- email: string;
13
- previousStatus: string;
14
- newStatus: string;
15
- extractedOn?: string;
16
- discoveryNotes?: string;
17
- }
18
- export declare function waitlistReview(params: WaitlistReviewParams): Promise<WaitlistReviewResult>;
19
- //# sourceMappingURL=waitlist-review.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"waitlist-review.d.ts","sourceRoot":"","sources":["../../src/tools/waitlist-review.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAsB,cAAc,CAClC,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,oBAAoB,CAAC,CAuG/B"}
@@ -1,81 +0,0 @@
1
- import { getSession } from "../lib/neo4j.js";
2
- import { computeEmbedding, buildPersonEmbeddingText } from "../lib/embedding.js";
3
- export async function waitlistReview(params) {
4
- const { accountId, email, nodeId, name, status, givenName, familyName } = params;
5
- if (!email && !nodeId && !name) {
6
- throw new Error("Either email, nodeId, or name is required to identify the entry");
7
- }
8
- const session = getSession();
9
- try {
10
- // Find the Person node — by email, nodeId, or name (case-insensitive partial match)
11
- let matchClause;
12
- if (email) {
13
- matchClause = "MATCH (p:Person {email: $email, accountId: $accountId, source: 'waitlist'})";
14
- }
15
- else if (nodeId) {
16
- matchClause = "MATCH (p:Person {accountId: $accountId, source: 'waitlist'}) WHERE elementId(p) = $nodeId";
17
- }
18
- else {
19
- matchClause = `MATCH (p:Person {accountId: $accountId, source: 'waitlist'})
20
- WHERE toLower(p.givenName) CONTAINS toLower($name)
21
- OR toLower(COALESCE(p.familyName, '')) CONTAINS toLower($name)`;
22
- }
23
- const findResult = await session.run(`${matchClause}
24
- RETURN p, elementId(p) AS nodeId`, { email, nodeId, name, accountId });
25
- if (findResult.records.length === 0) {
26
- throw new Error(email
27
- ? `No waitlist entry found for email: ${email}`
28
- : `No waitlist entry found for node ID: ${nodeId}`);
29
- }
30
- const record = findResult.records[0];
31
- const person = record.get("p").properties;
32
- const resolvedNodeId = record.get("nodeId");
33
- const previousStatus = person.status;
34
- const resolvedStatus = status ?? previousStatus;
35
- // Build SET clause
36
- const setProps = ["p.status = $status", "p.updatedAt = $now"];
37
- const queryParams = {
38
- email: person.email,
39
- accountId,
40
- nodeId: resolvedNodeId,
41
- status: resolvedStatus,
42
- now: new Date().toISOString(),
43
- };
44
- if (givenName) {
45
- setProps.push("p.givenName = $givenName");
46
- queryParams.givenName = givenName;
47
- }
48
- if (familyName) {
49
- setProps.push("p.familyName = $familyName");
50
- queryParams.familyName = familyName;
51
- }
52
- // Update
53
- const updateClause = email
54
- ? "MATCH (p:Person {email: $email, accountId: $accountId, source: 'waitlist'})"
55
- : "MATCH (p:Person {accountId: $accountId, source: 'waitlist'}) WHERE elementId(p) = $nodeId";
56
- await session.run(`${updateClause} SET ${setProps.join(", ")}`, queryParams);
57
- // Re-embed with discovery context preserved
58
- const currentGivenName = (givenName ?? person.givenName);
59
- const currentFamilyName = (familyName ?? person.familyName);
60
- const textForEmbedding = buildPersonEmbeddingText(currentGivenName, currentFamilyName ?? null, person.email, resolvedStatus, person.discoveryNotes ?? null);
61
- const embedding = await computeEmbedding(textForEmbedding);
62
- if (embedding.length > 0) {
63
- const embedClause = email
64
- ? "MATCH (p:Person {email: $email, accountId: $accountId})"
65
- : "MATCH (p:Person {accountId: $accountId}) WHERE elementId(p) = $nodeId";
66
- await session.run(`${embedClause} SET p.embedding = $embedding`, { email: person.email, accountId, nodeId: resolvedNodeId, embedding });
67
- }
68
- return {
69
- nodeId: resolvedNodeId,
70
- email: person.email,
71
- previousStatus,
72
- newStatus: resolvedStatus,
73
- extractedOn: person.extractedOn,
74
- discoveryNotes: person.discoveryNotes,
75
- };
76
- }
77
- finally {
78
- await session.close();
79
- }
80
- }
81
- //# sourceMappingURL=waitlist-review.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"waitlist-review.js","sourceRoot":"","sources":["../../src/tools/waitlist-review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAqBjF,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,MAA4B;IAE5B,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAEjF,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;IACrF,CAAC;IAED,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,IAAI,CAAC;QACH,oFAAoF;QACpF,IAAI,WAAmB,CAAC;QACxB,IAAI,KAAK,EAAE,CAAC;YACV,WAAW,GAAG,6EAA6E,CAAC;QAC9F,CAAC;aAAM,IAAI,MAAM,EAAE,CAAC;YAClB,WAAW,GAAG,2FAA2F,CAAC;QAC5G,CAAC;aAAM,CAAC;YACN,WAAW,GAAG;;yEAEqD,CAAC;QACtE,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,GAAG,CAClC,GAAG,WAAW;wCACoB,EAClC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CACnC,CAAC;QAEF,IAAI,UAAU,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CACb,KAAK;gBACH,CAAC,CAAC,sCAAsC,KAAK,EAAE;gBAC/C,CAAC,CAAC,wCAAwC,MAAM,EAAE,CACr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