@rubytech/create-sitedesk-code 0.1.446 → 0.1.448

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 (224) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/lib/graph-style/dist/index.d.ts.map +1 -1
  3. package/payload/platform/lib/graph-style/dist/index.js +6 -0
  4. package/payload/platform/lib/graph-style/dist/index.js.map +1 -1
  5. package/payload/platform/lib/graph-style/src/index.ts +7 -0
  6. package/payload/platform/neo4j/schema.cypher +35 -1
  7. package/payload/platform/plugins/.claude-plugin/marketplace.json +5 -0
  8. package/payload/platform/plugins/admin/hooks/lib/maxy-mcp-plugins.txt +1 -0
  9. package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +42 -5
  10. package/payload/platform/plugins/docs/references/calendar-booking.md +18 -1
  11. package/payload/platform/plugins/docs/references/claudeai-connectors.md +15 -0
  12. package/payload/platform/plugins/docs/references/outlook-guide.md +8 -3
  13. package/payload/platform/plugins/email/skills/email-composition/SKILL.md +4 -4
  14. package/payload/platform/plugins/memory/references/schema-construction.md +7 -2
  15. package/payload/platform/plugins/outlook/.claude-plugin/plugin.json +1 -1
  16. package/payload/platform/plugins/outlook/PLUGIN.md +23 -5
  17. package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit.test.d.ts +2 -0
  18. package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit.test.d.ts.map +1 -0
  19. package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit.test.js +70 -0
  20. package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit.test.js.map +1 -0
  21. package/payload/platform/plugins/outlook/mcp/dist/__tests__/html-to-text.test.d.ts +2 -0
  22. package/payload/platform/plugins/outlook/mcp/dist/__tests__/html-to-text.test.d.ts.map +1 -0
  23. package/payload/platform/plugins/outlook/mcp/dist/__tests__/html-to-text.test.js +22 -0
  24. package/payload/platform/plugins/outlook/mcp/dist/__tests__/html-to-text.test.js.map +1 -0
  25. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-delete.test.d.ts +2 -0
  26. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-delete.test.d.ts.map +1 -0
  27. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-delete.test.js +60 -0
  28. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-delete.test.js.map +1 -0
  29. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-fetch-body.test.d.ts +2 -0
  30. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-fetch-body.test.d.ts.map +1 -0
  31. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-fetch-body.test.js +80 -0
  32. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-fetch-body.test.js.map +1 -0
  33. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-otp-extract.test.d.ts +2 -0
  34. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-otp-extract.test.d.ts.map +1 -0
  35. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-otp-extract.test.js +90 -0
  36. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-otp-extract.test.js.map +1 -0
  37. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-reply.test.d.ts +2 -0
  38. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-reply.test.d.ts.map +1 -0
  39. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-reply.test.js +194 -0
  40. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-reply.test.js.map +1 -0
  41. package/payload/platform/plugins/outlook/mcp/dist/__tests__/otp.test.d.ts +2 -0
  42. package/payload/platform/plugins/outlook/mcp/dist/__tests__/otp.test.d.ts.map +1 -0
  43. package/payload/platform/plugins/outlook/mcp/dist/__tests__/otp.test.js +16 -0
  44. package/payload/platform/plugins/outlook/mcp/dist/__tests__/otp.test.js.map +1 -0
  45. package/payload/platform/plugins/outlook/mcp/dist/__tests__/outbound-attachments.test.d.ts +2 -0
  46. package/payload/platform/plugins/outlook/mcp/dist/__tests__/outbound-attachments.test.d.ts.map +1 -0
  47. package/payload/platform/plugins/outlook/mcp/dist/__tests__/outbound-attachments.test.js +103 -0
  48. package/payload/platform/plugins/outlook/mcp/dist/__tests__/outbound-attachments.test.js.map +1 -0
  49. package/payload/platform/plugins/outlook/mcp/dist/index.js +88 -0
  50. package/payload/platform/plugins/outlook/mcp/dist/index.js.map +1 -1
  51. package/payload/platform/plugins/outlook/mcp/dist/lib/html-to-text.d.ts +9 -0
  52. package/payload/platform/plugins/outlook/mcp/dist/lib/html-to-text.d.ts.map +1 -0
  53. package/payload/platform/plugins/outlook/mcp/dist/lib/html-to-text.js +24 -0
  54. package/payload/platform/plugins/outlook/mcp/dist/lib/html-to-text.js.map +1 -0
  55. package/payload/platform/plugins/outlook/mcp/dist/lib/otp.d.ts +2 -0
  56. package/payload/platform/plugins/outlook/mcp/dist/lib/otp.d.ts.map +1 -0
  57. package/payload/platform/plugins/outlook/mcp/dist/lib/otp.js +49 -0
  58. package/payload/platform/plugins/outlook/mcp/dist/lib/otp.js.map +1 -0
  59. package/payload/platform/plugins/outlook/mcp/dist/lib/outbound-attachments.d.ts +58 -0
  60. package/payload/platform/plugins/outlook/mcp/dist/lib/outbound-attachments.d.ts.map +1 -0
  61. package/payload/platform/plugins/outlook/mcp/dist/lib/outbound-attachments.js +127 -0
  62. package/payload/platform/plugins/outlook/mcp/dist/lib/outbound-attachments.js.map +1 -0
  63. package/payload/platform/plugins/outlook/mcp/dist/lib/upload-session.d.ts +28 -0
  64. package/payload/platform/plugins/outlook/mcp/dist/lib/upload-session.d.ts.map +1 -0
  65. package/payload/platform/plugins/outlook/mcp/dist/lib/upload-session.js +54 -0
  66. package/payload/platform/plugins/outlook/mcp/dist/lib/upload-session.js.map +1 -0
  67. package/payload/platform/plugins/outlook/mcp/dist/tools/draft-edit.d.ts +21 -0
  68. package/payload/platform/plugins/outlook/mcp/dist/tools/draft-edit.d.ts.map +1 -0
  69. package/payload/platform/plugins/outlook/mcp/dist/tools/draft-edit.js +38 -0
  70. package/payload/platform/plugins/outlook/mcp/dist/tools/draft-edit.js.map +1 -0
  71. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-delete.d.ts +14 -0
  72. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-delete.d.ts.map +1 -0
  73. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-delete.js +39 -0
  74. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-delete.js.map +1 -0
  75. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-fetch-body.d.ts +23 -0
  76. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-fetch-body.d.ts.map +1 -0
  77. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-fetch-body.js +44 -0
  78. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-fetch-body.js.map +1 -0
  79. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-otp-extract.d.ts +22 -0
  80. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-otp-extract.d.ts.map +1 -0
  81. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-otp-extract.js +90 -0
  82. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-otp-extract.js.map +1 -0
  83. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-reply.d.ts +27 -0
  84. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-reply.d.ts.map +1 -0
  85. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-reply.js +75 -0
  86. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-reply.js.map +1 -0
  87. package/payload/platform/plugins/outlook/references/graph-surfaces.md +57 -1
  88. package/payload/platform/plugins/outlook/skills/outlook/SKILL.md +15 -4
  89. package/payload/platform/plugins/scheduling/PLUGIN.md +15 -0
  90. package/payload/platform/plugins/scheduling/mcp/dist/index.js +29 -1
  91. package/payload/platform/plugins/scheduling/mcp/dist/index.js.map +1 -1
  92. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/booking-reconcile.test.js +53 -1
  93. package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/booking-reconcile.test.js.map +1 -1
  94. package/payload/platform/plugins/scheduling/mcp/dist/lib/booking-reconcile.d.ts +21 -0
  95. package/payload/platform/plugins/scheduling/mcp/dist/lib/booking-reconcile.d.ts.map +1 -1
  96. package/payload/platform/plugins/scheduling/mcp/dist/lib/booking-reconcile.js +80 -0
  97. package/payload/platform/plugins/scheduling/mcp/dist/lib/booking-reconcile.js.map +1 -1
  98. package/payload/platform/plugins/scheduling/mcp/dist/scripts/reconcile-bookings.d.ts +4 -0
  99. package/payload/platform/plugins/scheduling/mcp/dist/scripts/reconcile-bookings.d.ts.map +1 -1
  100. package/payload/platform/plugins/scheduling/mcp/dist/scripts/reconcile-bookings.js +68 -1
  101. package/payload/platform/plugins/scheduling/mcp/dist/scripts/reconcile-bookings.js.map +1 -1
  102. package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-connector-busy-sync.test.d.ts +2 -0
  103. package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-connector-busy-sync.test.d.ts.map +1 -0
  104. package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-connector-busy-sync.test.js +75 -0
  105. package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-connector-busy-sync.test.js.map +1 -0
  106. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-connector-busy-sync.d.ts +31 -0
  107. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-connector-busy-sync.d.ts.map +1 -0
  108. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-connector-busy-sync.js +41 -0
  109. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-connector-busy-sync.js.map +1 -0
  110. package/payload/platform/plugins/voice-mirror/.claude-plugin/plugin.json +21 -0
  111. package/payload/platform/plugins/voice-mirror/PLUGIN.md +72 -0
  112. package/payload/platform/plugins/voice-mirror/lib/mcp-spawn-tee/index.js +193 -0
  113. package/payload/platform/plugins/voice-mirror/lib/mcp-spawn-tee/package.json +3 -0
  114. package/payload/platform/plugins/voice-mirror/mcp/dist/index.d.ts +3 -0
  115. package/payload/platform/plugins/voice-mirror/mcp/dist/index.d.ts.map +1 -0
  116. package/payload/platform/plugins/voice-mirror/mcp/dist/index.js +403 -0
  117. package/payload/platform/plugins/voice-mirror/mcp/dist/index.js.map +1 -0
  118. package/payload/platform/plugins/voice-mirror/mcp/dist/lib/neo4j.d.ts +14 -0
  119. package/payload/platform/plugins/voice-mirror/mcp/dist/lib/neo4j.d.ts.map +1 -0
  120. package/payload/platform/plugins/voice-mirror/mcp/dist/lib/neo4j.js +47 -0
  121. package/payload/platform/plugins/voice-mirror/mcp/dist/lib/neo4j.js.map +1 -0
  122. package/payload/platform/plugins/voice-mirror/mcp/dist/lib/voice-corpus.d.ts +117 -0
  123. package/payload/platform/plugins/voice-mirror/mcp/dist/lib/voice-corpus.d.ts.map +1 -0
  124. package/payload/platform/plugins/voice-mirror/mcp/dist/lib/voice-corpus.js +138 -0
  125. package/payload/platform/plugins/voice-mirror/mcp/dist/lib/voice-corpus.js.map +1 -0
  126. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-distil-profile.d.ts +90 -0
  127. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-distil-profile.d.ts.map +1 -0
  128. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-distil-profile.js +609 -0
  129. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-distil-profile.js.map +1 -0
  130. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-ingest-session-text.d.ts +19 -0
  131. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-ingest-session-text.d.ts.map +1 -0
  132. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-ingest-session-text.js +124 -0
  133. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-ingest-session-text.js.map +1 -0
  134. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-record-feedback.d.ts +38 -0
  135. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-record-feedback.d.ts.map +1 -0
  136. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-record-feedback.js +93 -0
  137. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-record-feedback.js.map +1 -0
  138. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-retrieve-conditioning.d.ts +61 -0
  139. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-retrieve-conditioning.d.ts.map +1 -0
  140. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-retrieve-conditioning.js +171 -0
  141. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-retrieve-conditioning.js.map +1 -0
  142. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-tag-content.d.ts +35 -0
  143. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-tag-content.d.ts.map +1 -0
  144. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-tag-content.js +127 -0
  145. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-tag-content.js.map +1 -0
  146. package/payload/platform/plugins/voice-mirror/mcp/package-lock.json +1327 -0
  147. package/payload/platform/plugins/voice-mirror/mcp/package.json +19 -0
  148. package/payload/platform/plugins/voice-mirror/mcp/scripts/smoke.mjs +420 -0
  149. package/payload/platform/plugins/voice-mirror/skills/voice-mirror/SKILL.md +241 -0
  150. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.d.ts.map +1 -1
  151. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js +12 -0
  152. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js.map +1 -1
  153. package/payload/platform/services/claude-session-manager/dist/http-server.js +1 -1
  154. package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
  155. package/payload/platform/templates/agents/admin/AGENTS.md +1 -1
  156. package/payload/platform/templates/specialists/agents/content-producer.md +1 -1
  157. package/payload/platform/templates/specialists/agents/personal-assistant.md +6 -2
  158. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/PLUGIN.md +15 -9
  159. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/index.js +2 -0
  160. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/index.js.map +1 -1
  161. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/lib/neo4j.d.ts +5 -0
  162. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/lib/neo4j.d.ts.map +1 -0
  163. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/lib/neo4j.js +41 -0
  164. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/lib/neo4j.js.map +1 -0
  165. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/tools/note-capture.d.ts +25 -0
  166. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/tools/note-capture.d.ts.map +1 -0
  167. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/tools/note-capture.js +114 -0
  168. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/tools/note-capture.js.map +1 -0
  169. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/package-lock.json +137 -0
  170. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/package.json +1 -0
  171. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/src/index.ts +2 -0
  172. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/src/lib/__tests__/note-capture.test.ts +55 -0
  173. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/src/lib/neo4j.ts +51 -0
  174. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/src/tools/note-capture.ts +153 -0
  175. package/payload/server/public/assets/{AdminLoginScreens-D9L-CuWi.js → AdminLoginScreens-Bvf4HKmq.js} +1 -1
  176. package/payload/server/public/assets/AdminShell-CaGc8ODG.js +2 -0
  177. package/payload/server/public/assets/{Checkbox-CFdt8ljo.js → Checkbox-2SswiICc.js} +1 -1
  178. package/payload/server/public/assets/admin-B7GPCzpr.js +1 -0
  179. package/payload/server/public/assets/browser-CodHC_MO.js +1 -0
  180. package/payload/server/public/assets/calendar-DH7cyXKF.js +1 -0
  181. package/payload/server/public/assets/chat-BQyPAEMv.js +1 -0
  182. package/payload/server/public/assets/chevron-left-Cmev0R9v.js +1 -0
  183. package/payload/server/public/assets/data-DWxZzMfL.js +1 -0
  184. package/payload/server/public/assets/{graph-DrE7KupQ.js → graph-BToB78LG.js} +2 -2
  185. package/payload/server/public/assets/graph-labels-JRGrstzM.js +1 -0
  186. package/payload/server/public/assets/maximize-2-CEQRv64B.js +1 -0
  187. package/payload/server/public/assets/operator-Cx8cq2wf.js +1 -0
  188. package/payload/server/public/assets/page-D6kzsk18.js +32 -0
  189. package/payload/server/public/assets/page-TCsQy4eP.js +1 -0
  190. package/payload/server/public/assets/public-B61xcmAr.js +1 -0
  191. package/payload/server/public/assets/{rotate-ccw-Cqp4oqHV.js → rotate-ccw-7_3ol0Z4.js} +1 -1
  192. package/payload/server/public/assets/{tasks-bQKOhMga.js → tasks-BY9ajKXf.js} +1 -1
  193. package/payload/server/public/assets/{time-entry-format-BIL4ZaDK.js → time-entry-format-DmNhIJnM.js} +1 -1
  194. package/payload/server/public/assets/useCopyFeedback-C5-GOl5l.js +1 -0
  195. package/payload/server/public/assets/useSelectionMode-UOUVnP9B.js +1 -0
  196. package/payload/server/public/assets/{useSubAccountSwitcher-CVHKTSst.css → useSubAccountSwitcher-DgM1ergs.css} +1 -1
  197. package/payload/server/public/assets/useVoiceRecorder-BAP3yGxs.js +2 -0
  198. package/payload/server/public/browser.html +5 -5
  199. package/payload/server/public/calendar.html +6 -6
  200. package/payload/server/public/chat.html +12 -12
  201. package/payload/server/public/data.html +10 -10
  202. package/payload/server/public/graph.html +11 -11
  203. package/payload/server/public/index.html +13 -13
  204. package/payload/server/public/operator.html +14 -14
  205. package/payload/server/public/public.html +12 -12
  206. package/payload/server/public/tasks.html +5 -5
  207. package/payload/server/server.js +349 -171
  208. package/payload/server/public/assets/AdminShell-DSQrvZXq.js +0 -2
  209. package/payload/server/public/assets/admin-Ch4n-G0j.js +0 -1
  210. package/payload/server/public/assets/browser-B2AIxiuk.js +0 -1
  211. package/payload/server/public/assets/calendar-BvItH3B0.js +0 -1
  212. package/payload/server/public/assets/chat-eQFMaX9y.js +0 -1
  213. package/payload/server/public/assets/chevron-left-D2AnCEyE.js +0 -1
  214. package/payload/server/public/assets/data-BzOmbHoe.js +0 -1
  215. package/payload/server/public/assets/file-download-CK9j_Jx2.js +0 -1
  216. package/payload/server/public/assets/graph-labels-CwEtvIRV.js +0 -1
  217. package/payload/server/public/assets/maximize-2-CuzEom3K.js +0 -1
  218. package/payload/server/public/assets/operator-DlboYPPu.js +0 -1
  219. package/payload/server/public/assets/page-BuWH5gNK.js +0 -1
  220. package/payload/server/public/assets/page-Co9E8U5x.js +0 -32
  221. package/payload/server/public/assets/public-DtFpPMTG.js +0 -1
  222. package/payload/server/public/assets/useCopyFeedback-rB8QuqyH.js +0 -1
  223. package/payload/server/public/assets/useVoiceRecorder-Ctny8qWx.js +0 -2
  224. /package/payload/server/public/assets/{useSubAccountSwitcher-CHEt_m6q.js → useSubAccountSwitcher-DF6bohQA.js} +0 -0
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Cypher fragment that excludes trashed nodes for the given alias.
3
+ *
4
+ * Mirrors the platform's soft-delete model: a node is trashed if it
5
+ * carries the `:Trashed` label OR a non-null `deletedAt` timestamp.
6
+ * Inlined here (Task 473) instead of imported from
7
+ * `platform/lib/graph-trash` — the cross-package import path did not
8
+ * survive `tsc` emit (the `rootDir: "src"` config collapsed
9
+ * `../../../../../platform/...` to `../../...`, pointing the dist
10
+ * file at a non-existent location and crashing the MCP on boot). The
11
+ * predicate is one line; copying it costs less than the build coupling.
12
+ */
13
+ export function notTrashed(alias) {
14
+ return `(NOT \`${alias}\`:Trashed AND \`${alias}\`.deletedAt IS NULL)`;
15
+ }
16
+ /**
17
+ * Shared corpus-filter clauses and format helpers for the voice-mirror tools.
18
+ *
19
+ * Imported by `voice-distil-profile` (count + sample walks),
20
+ * `voice-retrieve-conditioning` (exemplar walk), `voice-tag-content` (tag
21
+ * writes), and `voice-ingest-session-text` (on-demand session-text ingest). The single
22
+ * load-bearing filter — when the corpus rules change, this is the only place
23
+ * to edit.
24
+ *
25
+ * Three predicates in VOICE_CORPUS_WHERE:
26
+ *
27
+ * 1. `authorshipMode IN ['human-only', 'human-led-agent-assisted']`.
28
+ * `human-only` is the operator's own writing verbatim;
29
+ * `human-led-agent-assisted` is operator-authored with light agent
30
+ * polish, which still carries voice signal (the operator chose the
31
+ * claims and the structure). Including this expands the available
32
+ * corpus to match how most modern writing actually happens.
33
+ *
34
+ * 2. Label is one of the four primary content labels OR is a
35
+ * conversation-document `:Section` chunk (unguarded chat voice from
36
+ * WhatsApp / Telegram / Signal / Granola / Otter / Circleback etc.
37
+ * archives). After the Task 324 collapse, conversation transcripts
38
+ * land as `:KnowledgeDocument` parents carrying `conversationIdentity`
39
+ * with plain `:Section` children — no `:Conversation` secondary label.
40
+ * Conversation-document sections are identified by their parent's
41
+ * `conversationIdentity` property via an EXISTS sub-pattern. The
42
+ * conversation parent must itself be live — a trashed parent excludes
43
+ * its child chunks.
44
+ * Chat captures voice in a way email rarely does — this is the
45
+ * single highest-leverage corpus addition for voice fidelity.
46
+ *
47
+ * 3. The node is not trashed — `notTrashed("n")` filters both the
48
+ * `:Trashed` label and the `deletedAt` property (Task 472). This is
49
+ * the read-side equivalent of `graph-trash`'s soft-delete model: a
50
+ * node marked by either signal is excluded from every voice-mirror
51
+ * walk that goes through VOICE_CORPUS_WHERE.
52
+ *
53
+ * The clause expects `$accountId` to be bound in the calling Cypher
54
+ * parameters. It does not bind any other parameters.
55
+ */
56
+ export const VOICE_CORPUS_WHERE = `n.accountId = $accountId
57
+ AND n.authorshipMode IN ['human-only', 'human-led-agent-assisted']
58
+ AND ${notTrashed("n")}
59
+ AND (
60
+ any(lbl IN labels(n) WHERE lbl IN ['KnowledgeDocument', 'Message', 'SocialPost'])
61
+ OR ('Section' IN labels(n) AND EXISTS {
62
+ MATCH (parent:KnowledgeDocument)-[:HAS_SECTION]->(n)
63
+ WHERE parent.conversationIdentity IS NOT NULL
64
+ AND ${notTrashed("parent")}
65
+ })
66
+ )`;
67
+ /**
68
+ * The label set the tag tool accepts when stamping `authorshipMode`.
69
+ * Mirrors the label predicate inside VOICE_CORPUS_WHERE so the tag tool
70
+ * and the corpus walk stay in lockstep. The tag tool does not filter
71
+ * by authorshipMode (that's the property it's setting).
72
+ *
73
+ * `:Email` retired with Task 321 — email threads now land as
74
+ * `:KnowledgeDocument {source:'email'}` and are already covered.
75
+ */
76
+ export const TAGGABLE_PRIMARY_LABELS = [
77
+ "KnowledgeDocument",
78
+ "Message",
79
+ "SocialPost",
80
+ ];
81
+ /**
82
+ * Closed enum of writing-format values. One `:VoiceProfile` exists per
83
+ * `(accountId, userId, format)`. Adding a new value is a separate task.
84
+ *
85
+ * Format is an editorial classification set by the operator at tag time.
86
+ * The only auto-tagged path is `voice-ingest-session-text`, which hard-codes
87
+ * `format='text'` on `:Message` because chat turns are unambiguously text and
88
+ * the operator is not in the loop on session end.
89
+ */
90
+ export const FORMAT_VALUES = [
91
+ "text",
92
+ "email",
93
+ "social-post",
94
+ "article",
95
+ "marketing-copy",
96
+ "note",
97
+ ];
98
+ /**
99
+ * Returns VOICE_CORPUS_WHERE with an additional `n.format = $format`
100
+ * predicate appended. Requires `$format` to be bound alongside `$accountId`
101
+ * in the calling Cypher parameters.
102
+ *
103
+ * Format-discovery queries (which enumerate distinct formats from the
104
+ * corpus) use the base `VOICE_CORPUS_WHERE` directly; per-format corpus
105
+ * walks use this function.
106
+ */
107
+ export function voiceCorpusWhereWithFormat(format) {
108
+ return `${VOICE_CORPUS_WHERE}\n AND n.format = $format`;
109
+ }
110
+ /**
111
+ * Reserved sentinel userId for the per-account org voice profile (Task 676).
112
+ *
113
+ * Keeps the `(accountId, userId, format)` UNIQUE constraint valid with no
114
+ * migration: exactly one org profile per `(account, format)`. A real
115
+ * `:AdminUser` must never hold this userId — `voice-distil-profile` surfaces
116
+ * a Neo4j constraint error (does not swallow it) if one does.
117
+ */
118
+ export const ORG_USER_ID = "__org__";
119
+ /**
120
+ * The profile-key userId for a scope: the operator's own id for personal, the
121
+ * reserved sentinel for org. The single place that maps scope → key userId, so
122
+ * distillation, retrieval, and feedback agree on where an org profile lives.
123
+ */
124
+ export function profileUserIdForScope(scope, userId) {
125
+ return scope === "org" ? ORG_USER_ID : userId;
126
+ }
127
+ /**
128
+ * `VOICE_CORPUS_WHERE` + format predicate + author predicate. Requires both
129
+ * `$format` and `$voiceAuthor` bound in the calling Cypher parameters.
130
+ *
131
+ * Personal distillation and personal retrieval use this to narrow the
132
+ * account-wide corpus to one author's content; org walks use the unchanged
133
+ * account-wide `voiceCorpusWhereWithFormat`.
134
+ */
135
+ export function voiceCorpusWhereWithFormatAndAuthor(format) {
136
+ return `${VOICE_CORPUS_WHERE}\n AND n.format = $format\n AND n.voiceAuthor = $voiceAuthor`;
137
+ }
138
+ //# sourceMappingURL=voice-corpus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice-corpus.js","sourceRoot":"","sources":["../../src/lib/voice-corpus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,OAAO,UAAU,KAAK,oBAAoB,KAAK,uBAAuB,CAAC;AACzE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;;QAE1B,UAAU,CAAC,GAAG,CAAC;;;;;;cAMT,UAAU,CAAC,QAAQ,CAAC;;IAE9B,CAAC;AAEL;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,mBAAmB;IACnB,SAAS;IACT,YAAY;CACJ,CAAC;AAEX;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,MAAM;IACN,OAAO;IACP,aAAa;IACb,SAAS;IACT,gBAAgB;IAChB,MAAM;CACE,CAAC;AAIX;;;;;;;;GAQG;AACH,MAAM,UAAU,0BAA0B,CAAC,MAAmB;IAC5D,OAAO,GAAG,kBAAkB,4BAA4B,CAAC;AAC3D,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC;AAUrC;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAiB,EAAE,MAAc;IACrE,OAAO,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC;AAChD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mCAAmC,CAAC,MAAmB;IACrE,OAAO,GAAG,kBAAkB,gEAAgE,CAAC;AAC/F,CAAC"}
@@ -0,0 +1,90 @@
1
+ import { type VoiceFormat, type VoiceScope } from "../lib/voice-corpus.js";
2
+ export interface VoiceDistilProfileParams {
3
+ accountId: string;
4
+ userId: string;
5
+ /**
6
+ * Profile scope (Task 676). `'personal'` (default) distils the operator's
7
+ * own author-filtered corpus onto `:AdminUser`; `'org'` distils the whole
8
+ * account onto `:LocalBusiness` under the reserved sentinel userId.
9
+ */
10
+ scope?: VoiceScope;
11
+ force?: boolean;
12
+ /**
13
+ * Writing format to distil. When omitted on `sample`, enumerates distinct
14
+ * format values in the corpus and distils each that fires the cadence
15
+ * guard. Required on `amend` and `write`.
16
+ */
17
+ format?: VoiceFormat;
18
+ /**
19
+ * Operation mode:
20
+ * - `'sample'` (default, Task 424) — walk the full per-format corpus and
21
+ * return exemplars + feedback intents. No write. The calling agent
22
+ * composes the style-card YAML in-turn.
23
+ * - `'write'` (Task 424) — persist the style card the agent produced.
24
+ * Requires `styleCardYaml`. Optional `amendedFromNodeIds` adds
25
+ * `LEARNED_FROM` edges to the named nodes (additive — MERGE preserves
26
+ * prior edges).
27
+ * - `'amend'` (Task 472) — operator-initiated incremental update from
28
+ * one or more named documents. Reads only those nodes plus the
29
+ * existing `:VoiceProfile.styleCard` so the agent can decide whether
30
+ * the document moves the profile. Format predicate is dropped on the
31
+ * read (the operator picked the docs); `authorshipMode` + trashed +
32
+ * label predicates still apply per-document. Cadence guard does not
33
+ * apply.
34
+ */
35
+ mode?: "sample" | "write" | "amend";
36
+ /** Required when `mode='write'`. The style-card YAML produced by the agent. */
37
+ styleCardYaml?: string;
38
+ /**
39
+ * Required when `mode='amend'`. ElementIds of the documents to fold into
40
+ * the profile. Each id is eligibility-checked; ineligible ones are
41
+ * reported in the return payload (the agent surfaces them to the operator).
42
+ */
43
+ nodeIds?: string[];
44
+ /**
45
+ * Optional on `mode='write'` after an `amend` sample. ElementIds the
46
+ * agent decided moved the profile. Each becomes a `LEARNED_FROM` edge
47
+ * from the persisted `:VoiceProfile`. Additive — pre-existing edges
48
+ * remain via `MERGE`.
49
+ */
50
+ amendedFromNodeIds?: string[];
51
+ }
52
+ export interface VoiceCorpusExemplar {
53
+ id: string;
54
+ label: string;
55
+ body: string;
56
+ }
57
+ export interface VoiceDistilProfileResult {
58
+ profileId: string | null;
59
+ corpusSize: number;
60
+ generatedAt: string | null;
61
+ feedbackEntries: number;
62
+ skipped: boolean;
63
+ /** Present only on the multi-format path: the format this result was distilled for. */
64
+ format?: VoiceFormat;
65
+ skipReason?: "below-threshold" | "recent" | "empty-corpus" | "missing-style-card" | "no-format-tagged-content" | "amend-no-eligible-documents";
66
+ errorReason?: string;
67
+ /** Present when `mode='sample'` or `mode='amend'`: corpus exemplars for the agent to read. */
68
+ exemplars?: VoiceCorpusExemplar[];
69
+ /** Present when `mode='sample'` or `mode='amend'`: operator-edit intents to fold into the style card. */
70
+ feedbackIntents?: string[];
71
+ /**
72
+ * Present when `mode='amend'`: the current `:VoiceProfile.styleCard` (or
73
+ * null if no profile exists yet) so the agent can compare the named
74
+ * documents against the prior card and decide update-or-skip.
75
+ */
76
+ existingStyleCard?: string | null;
77
+ /** Present when `mode='amend'`: count of input nodeIds that passed eligibility. */
78
+ eligible?: number;
79
+ /**
80
+ * Present when `mode='amend'`: per-input-id ineligibility records. Each
81
+ * entry names the nodeId and the first failing predicate so the agent
82
+ * can tell the operator which documents were rejected and why.
83
+ */
84
+ ineligible?: {
85
+ nodeId: string;
86
+ reason: string;
87
+ }[];
88
+ }
89
+ export declare function voiceDistilProfile(params: VoiceDistilProfileParams): Promise<VoiceDistilProfileResult | VoiceDistilProfileResult[]>;
90
+ //# sourceMappingURL=voice-distil-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice-distil-profile.d.ts","sourceRoot":"","sources":["../../src/tools/voice-distil-profile.ts"],"names":[],"mappings":"AA4BA,OAAO,EAML,KAAK,WAAW,EAChB,KAAK,UAAU,EAChB,MAAM,wBAAwB,CAAC;AA0BhC,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;IACpC,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,uFAAuF;IACvF,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EACP,iBAAiB,GACjB,QAAQ,GACR,cAAc,GACd,oBAAoB,GACpB,0BAA0B,GAC1B,6BAA6B,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8FAA8F;IAC9F,SAAS,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAClC,yGAAyG;IACzG,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,mFAAmF;IACnF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACnD;AA8jBD,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,wBAAwB,GAAG,wBAAwB,EAAE,CAAC,CAuGhE"}