@rubytech/create-sitedesk-code 0.1.387 → 0.1.388

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 (201) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/config/brand.json +3 -3
  3. package/payload/platform/plugins/.claude-plugin/marketplace.json +0 -5
  4. package/payload/platform/plugins/whatsapp/references/channels-whatsapp.md +5 -3
  5. package/payload/platform/plugins/whatsapp/skills/manage-whatsapp-config/SKILL.md +2 -0
  6. package/payload/premium-plugins/.claude-plugin/marketplace.json +0 -15
  7. package/payload/server/server.js +169 -67
  8. package/payload/platform/plugins/sales/.claude-plugin/plugin.json +0 -8
  9. package/payload/platform/plugins/sales/PLUGIN.md +0 -106
  10. package/payload/platform/plugins/sales/references/close-tracking.md +0 -69
  11. package/payload/platform/plugins/sales/references/comparisons.md +0 -99
  12. package/payload/platform/plugins/sales/references/competitive-positioning.md +0 -51
  13. package/payload/platform/plugins/sales/references/faq.md +0 -73
  14. package/payload/platform/plugins/sales/references/objection-handling.md +0 -157
  15. package/payload/platform/plugins/sales/references/pricing.md +0 -101
  16. package/payload/premium-plugins/teaching/.claude-plugin/plugin.json +0 -8
  17. package/payload/premium-plugins/teaching/PLUGIN.md +0 -58
  18. package/payload/premium-plugins/teaching/skills/interactive-tutor/SKILL.md +0 -59
  19. package/payload/premium-plugins/teaching/skills/interactive-tutor/references/assessment.md +0 -70
  20. package/payload/premium-plugins/teaching/skills/interactive-tutor/references/classroom-conduct.md +0 -43
  21. package/payload/premium-plugins/teaching/skills/interactive-tutor/references/teaching-modes.md +0 -83
  22. package/payload/premium-plugins/teaching/skills/lesson-planner/SKILL.md +0 -48
  23. package/payload/premium-plugins/teaching/skills/lesson-planner/references/context-gathering.md +0 -41
  24. package/payload/premium-plugins/teaching/skills/lesson-planner/references/plan-structure.md +0 -94
  25. package/payload/premium-plugins/teaching/skills/study-pack-builder/SKILL.md +0 -52
  26. package/payload/premium-plugins/teaching/skills/study-pack-builder/references/disaggregation.md +0 -49
  27. package/payload/premium-plugins/teaching/skills/study-pack-builder/references/materials.md +0 -116
  28. package/payload/premium-plugins/venture-studio/.claude-plugin/plugin.json +0 -8
  29. package/payload/premium-plugins/venture-studio/PLUGIN.md +0 -128
  30. package/payload/premium-plugins/venture-studio/bin/scaffold.sh +0 -116
  31. package/payload/premium-plugins/venture-studio/skills/brand-pack/SKILL.md +0 -256
  32. package/payload/premium-plugins/venture-studio/skills/brand-pack/references/color-psychology.md +0 -118
  33. package/payload/premium-plugins/venture-studio/skills/investor-data-room/SKILL.md +0 -436
  34. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/business-plan-template.md +0 -64
  35. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/competitive-battlecard.md +0 -37
  36. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/competitor-analysis.md +0 -32
  37. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/compliance-research-checklist.md +0 -53
  38. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/data-room-structure.md +0 -88
  39. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/deck-blueprint-template.md +0 -39
  40. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/design-tokens-application.md +0 -79
  41. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/html-pdf-pipeline.md +0 -236
  42. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/internal-workings-scrub.md +0 -33
  43. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/monetization-strategy.md +0 -35
  44. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/pricing-strategy.md +0 -37
  45. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/strategy-frameworks.md +0 -46
  46. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/termsheet-template.md +0 -88
  47. package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/index.html +0 -1565
  48. package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/render-pdf.mjs +0 -91
  49. package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/term_sheet.html +0 -715
  50. package/payload/premium-plugins/venture-studio/skills/legal-essentials/SKILL.md +0 -65
  51. package/payload/premium-plugins/venture-studio/skills/office-hours/SKILL.md +0 -587
  52. package/payload/premium-plugins/venture-studio/skills/prototype-host/SKILL.md +0 -179
  53. package/payload/premium-plugins/venture-studio/skills/prototype-host/references/cloudflared-ingress-edit.md +0 -81
  54. package/payload/premium-plugins/venture-studio/skills/prototype-host/references/scaffold-frameworks.md +0 -60
  55. package/payload/premium-plugins/venture-studio/skills/prototype-host/references/systemd-user-service.md +0 -104
  56. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/SKILL.md +0 -342
  57. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/aarrr-metrics.md +0 -275
  58. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/assumption-testing.md +0 -93
  59. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/boolean-search.md +0 -308
  60. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/build-measure-learn.md +0 -262
  61. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/business-model-canvas.md +0 -171
  62. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/commitment-signals.md +0 -246
  63. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/design-thinking.md +0 -183
  64. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/earlyvangelist.md +0 -190
  65. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/first-principles.md +0 -58
  66. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/fishbone.md +0 -114
  67. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/five-whys.md +0 -43
  68. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/ice-scoring.md +0 -237
  69. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/innovation-accounting.md +0 -290
  70. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/jtbd.md +0 -105
  71. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/landing-page.md +0 -361
  72. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/market-sizing.md +0 -58
  73. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/market-type.md +0 -167
  74. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/mom-test.md +0 -193
  75. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/mvp-types.md +0 -200
  76. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/og-images.md +0 -239
  77. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/pareto.md +0 -103
  78. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/persona-development.md +0 -291
  79. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/pivot-types.md +0 -225
  80. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/positioning-statement.md +0 -179
  81. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/prd.md +0 -363
  82. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/pre-mortem.md +0 -74
  83. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/problem-validation.md +0 -253
  84. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/product-market-fit.md +0 -256
  85. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/research-synthesis.md +0 -276
  86. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/strategy-red-team.md +0 -41
  87. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/three-engines-of-growth.md +0 -248
  88. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/validation-tests.md +0 -89
  89. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/value-proposition-canvas.md +0 -121
  90. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/win-loss-analysis.md +0 -242
  91. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/workflow-mapping.md +0 -271
  92. package/payload/premium-plugins/writer-craft/.claude-plugin/plugin.json +0 -21
  93. package/payload/premium-plugins/writer-craft/PLUGIN.md +0 -134
  94. package/payload/premium-plugins/writer-craft/agents/writer-craft--manuscript-reviewer.md +0 -108
  95. package/payload/premium-plugins/writer-craft/lib/mcp-lifeline/dist/index.d.ts +0 -8
  96. package/payload/premium-plugins/writer-craft/lib/mcp-lifeline/dist/index.d.ts.map +0 -1
  97. package/payload/premium-plugins/writer-craft/lib/mcp-lifeline/dist/index.js +0 -71
  98. package/payload/premium-plugins/writer-craft/lib/mcp-lifeline/dist/index.js.map +0 -1
  99. package/payload/premium-plugins/writer-craft/lib/mcp-lifeline/package.json +0 -7
  100. package/payload/premium-plugins/writer-craft/lib/mcp-spawn-tee/index.js +0 -193
  101. package/payload/premium-plugins/writer-craft/lib/mcp-spawn-tee/package.json +0 -3
  102. package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.d.ts +0 -51
  103. package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.d.ts.map +0 -1
  104. package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.js +0 -196
  105. package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.js.map +0 -1
  106. package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/package.json +0 -7
  107. package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.d.ts +0 -3
  108. package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.d.ts.map +0 -1
  109. package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.js +0 -58
  110. package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.js.map +0 -1
  111. package/payload/premium-plugins/writer-craft/mcp/dist/index.d.ts +0 -3
  112. package/payload/premium-plugins/writer-craft/mcp/dist/index.d.ts.map +0 -1
  113. package/payload/premium-plugins/writer-craft/mcp/dist/index.js +0 -403
  114. package/payload/premium-plugins/writer-craft/mcp/dist/index.js.map +0 -1
  115. package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.d.ts +0 -14
  116. package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.d.ts.map +0 -1
  117. package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.js +0 -47
  118. package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.js.map +0 -1
  119. package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.d.ts +0 -117
  120. package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.d.ts.map +0 -1
  121. package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.js +0 -138
  122. package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.js.map +0 -1
  123. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.d.ts +0 -90
  124. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.d.ts.map +0 -1
  125. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.js +0 -609
  126. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.js.map +0 -1
  127. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.d.ts +0 -19
  128. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.d.ts.map +0 -1
  129. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.js +0 -124
  130. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.js.map +0 -1
  131. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.d.ts +0 -38
  132. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.d.ts.map +0 -1
  133. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.js +0 -93
  134. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.js.map +0 -1
  135. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.d.ts +0 -61
  136. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.d.ts.map +0 -1
  137. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.js +0 -171
  138. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.js.map +0 -1
  139. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.d.ts +0 -35
  140. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.d.ts.map +0 -1
  141. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.js +0 -127
  142. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.js.map +0 -1
  143. package/payload/premium-plugins/writer-craft/mcp/package-lock.json +0 -1327
  144. package/payload/premium-plugins/writer-craft/mcp/package.json +0 -19
  145. package/payload/premium-plugins/writer-craft/mcp/scripts/smoke.mjs +0 -420
  146. package/payload/premium-plugins/writer-craft/mcp/src/index.ts +0 -457
  147. package/payload/premium-plugins/writer-craft/mcp/src/lib/neo4j.ts +0 -56
  148. package/payload/premium-plugins/writer-craft/mcp/src/lib/voice-corpus.ts +0 -154
  149. package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-distil-profile.ts +0 -833
  150. package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-ingest-session-text.ts +0 -153
  151. package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-record-feedback.ts +0 -148
  152. package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-retrieve-conditioning.ts +0 -270
  153. package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-tag-content.ts +0 -181
  154. package/payload/premium-plugins/writer-craft/mcp/tsconfig.json +0 -8
  155. package/payload/premium-plugins/writer-craft/skills/citation-style/SKILL.md +0 -94
  156. package/payload/premium-plugins/writer-craft/skills/citation-style/references/book-and-chapter-models.md +0 -77
  157. package/payload/premium-plugins/writer-craft/skills/citation-style/references/citation-rules.md +0 -103
  158. package/payload/premium-plugins/writer-craft/skills/citation-style/references/journal-article-models.md +0 -74
  159. package/payload/premium-plugins/writer-craft/skills/citation-style/references/other-source-models.md +0 -146
  160. package/payload/premium-plugins/writer-craft/skills/citation-style/references/reference-list-rules.md +0 -70
  161. package/payload/premium-plugins/writer-craft/skills/editorial-practice/SKILL.md +0 -108
  162. package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/copyediting.md +0 -73
  163. package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/developmental-editing.md +0 -85
  164. package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/genre-specific-editing.md +0 -78
  165. package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/line-editing.md +0 -55
  166. package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/self-editing.md +0 -89
  167. package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/SKILL.md +0 -114
  168. package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/audience-analysis.md +0 -73
  169. package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/crafting-persuasive-story.md +0 -76
  170. package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/persuasion-case-studies.md +0 -67
  171. package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/transformation-framework.md +0 -86
  172. package/payload/premium-plugins/writer-craft/skills/point-of-view/SKILL.md +0 -97
  173. package/payload/premium-plugins/writer-craft/skills/point-of-view/references/indirect-narration.md +0 -72
  174. package/payload/premium-plugins/writer-craft/skills/point-of-view/references/pov-types-and-voice.md +0 -91
  175. package/payload/premium-plugins/writer-craft/skills/point-of-view/references/protagonist-filter.md +0 -71
  176. package/payload/premium-plugins/writer-craft/skills/point-of-view/references/tense-and-person.md +0 -85
  177. package/payload/premium-plugins/writer-craft/skills/prose-craft/SKILL.md +0 -100
  178. package/payload/premium-plugins/writer-craft/skills/prose-craft/references/punctuation-and-grammar.md +0 -72
  179. package/payload/premium-plugins/writer-craft/skills/prose-craft/references/repetition.md +0 -71
  180. package/payload/premium-plugins/writer-craft/skills/prose-craft/references/sound-and-rhythm.md +0 -64
  181. package/payload/premium-plugins/writer-craft/skills/prose-craft/references/word-economy.md +0 -93
  182. package/payload/premium-plugins/writer-craft/skills/reader-engagement/SKILL.md +0 -100
  183. package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/cause-effect-setup-payoff.md +0 -79
  184. package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/conflict-escalation.md +0 -81
  185. package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/hooking-readers.md +0 -67
  186. package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/neurochemistry-of-engagement.md +0 -94
  187. package/payload/premium-plugins/writer-craft/skills/review-manuscript/SKILL.md +0 -111
  188. package/payload/premium-plugins/writer-craft/skills/review-manuscript/references/review-manuscript-checklist.md +0 -119
  189. package/payload/premium-plugins/writer-craft/skills/review-prose/SKILL.md +0 -99
  190. package/payload/premium-plugins/writer-craft/skills/review-prose/references/prose-review-checklist.md +0 -112
  191. package/payload/premium-plugins/writer-craft/skills/review-scene/SKILL.md +0 -99
  192. package/payload/premium-plugins/writer-craft/skills/review-scene/references/scene-analysis-framework.md +0 -95
  193. package/payload/premium-plugins/writer-craft/skills/story-architecture/SKILL.md +0 -106
  194. package/payload/premium-plugins/writer-craft/skills/story-architecture/references/blueprinting-and-scene-cards.md +0 -118
  195. package/payload/premium-plugins/writer-craft/skills/story-architecture/references/inner-issue-and-protagonist-goal.md +0 -66
  196. package/payload/premium-plugins/writer-craft/skills/story-architecture/references/misbelief-desire-worldview.md +0 -87
  197. package/payload/premium-plugins/writer-craft/skills/story-architecture/references/origin-scenes-and-escalation.md +0 -82
  198. package/payload/premium-plugins/writer-craft/skills/story-blueprint/SKILL.md +0 -133
  199. package/payload/premium-plugins/writer-craft/skills/story-blueprint/references/blueprinting-exercises.md +0 -118
  200. package/payload/premium-plugins/writer-craft/skills/story-blueprint/references/blueprinting-process.md +0 -128
  201. package/payload/premium-plugins/writer-craft/skills/voice-mirror/SKILL.md +0 -241
@@ -1,127 +0,0 @@
1
- /**
2
- * voice-tag-content — set `authorshipMode` and `format` on one or many
3
- * content nodes.
4
- *
5
- * The tool routes through neo4j directly with an account-scoped MERGE so
6
- * the operator can only mutate their own nodes. We do not go through
7
- * `memory-update` because that tool re-embeds and re-validates on every
8
- * call — overkill for a single-property authorship stamp.
9
- *
10
- * `format` is an editorial classification only the operator can set; it is
11
- * therefore required. The sole hard-coded exception lives in
12
- * `voice-ingest-session-text`, which stamps `format='text'` on auto-ingested
13
- * `:Message` rows where the operator is not in the loop (Task 471).
14
- */
15
- import { getSession } from "../lib/neo4j.js";
16
- import { TAGGABLE_PRIMARY_LABELS, FORMAT_VALUES, } from "../lib/voice-corpus.js";
17
- export const AUTHORSHIP_MODES = new Set([
18
- "human-only",
19
- "human-led-agent-assisted",
20
- "agent-led-human-reviewed",
21
- "agent-only",
22
- "unknown",
23
- ]);
24
- /**
25
- * Resolve the corpus author for a tag write (Task 676). An explicit, non-blank
26
- * `author` wins; otherwise the tagging operator's `userId`. Throws when neither
27
- * is available (no `author` argument and no `ADMIN_USER_ID` in spawn env), so a
28
- * tag can never silently land with a null author.
29
- *
30
- * This is why single-operator accounts get personal attribution for free: with
31
- * `author` omitted, the sole operator is the implicit author, so their personal
32
- * corpus equals the account-wide corpus and prior behaviour is reproduced.
33
- */
34
- export function resolveVoiceAuthor(author, operatorUserId) {
35
- const explicit = (author ?? "").trim();
36
- if (explicit)
37
- return explicit;
38
- if (operatorUserId)
39
- return operatorUserId;
40
- throw new Error("voice-tag-content: author required — no ADMIN_USER_ID in spawn env and no author given.");
41
- }
42
- export async function voiceTagContent(params) {
43
- const { nodeIds, mode, accountId, format, voiceAuthor } = params;
44
- if (!AUTHORSHIP_MODES.has(mode)) {
45
- throw new Error(`voice-tag-content: invalid authorshipMode '${mode}'. Valid values: ${[
46
- ...AUTHORSHIP_MODES,
47
- ].join(", ")}`);
48
- }
49
- if (!accountId) {
50
- throw new Error("voice-tag-content: accountId is required");
51
- }
52
- if (format === undefined || format === null) {
53
- throw new Error("voice-tag-content: format is required");
54
- }
55
- if (!FORMAT_VALUES.includes(format)) {
56
- throw new Error(`voice-tag-content: invalid format '${format}'. Valid values: ${FORMAT_VALUES.join(", ")}`);
57
- }
58
- if (!Array.isArray(nodeIds) || nodeIds.length === 0) {
59
- return { updated: 0, skipped: 0, skippedReasons: {} };
60
- }
61
- // voiceAuthor is checked after the empty-nodeIds early return: an empty tag is
62
- // a no-op, so there is nothing to attribute. With nodes to tag, the author
63
- // must be resolved (index.ts always supplies it via resolveVoiceAuthor).
64
- if (!voiceAuthor) {
65
- throw new Error("voice-tag-content: voiceAuthor is required (resolve via resolveVoiceAuthor before calling).");
66
- }
67
- const session = getSession();
68
- const now = new Date().toISOString();
69
- const skippedReasons = {};
70
- let updated = 0;
71
- try {
72
- // Bulk update in batches of 50 to keep transaction latency bounded.
73
- const BATCH = 50;
74
- for (let i = 0; i < nodeIds.length; i += BATCH) {
75
- const batch = nodeIds.slice(i, i + BATCH);
76
- const result = await session.run(
77
- // Tag any of the three primary content labels, or a conversation-
78
- // document :Section chunk (parent :KnowledgeDocument carries
79
- // `conversationIdentity`). The EXISTS sub-pattern guards against
80
- // accidentally tagging document-path :Section rows AND parent
81
- // `:Conversation` / `:AdminConversation` nodes (which are not
82
- // body-bearing content).
83
- `UNWIND $ids AS id
84
- MATCH (n) WHERE elementId(n) = id AND n.accountId = $accountId
85
- WITH n
86
- WHERE any(lbl IN labels(n) WHERE lbl IN $primaryLabels)
87
- OR ('Section' IN labels(n) AND EXISTS {
88
- MATCH (parent:KnowledgeDocument)-[:HAS_SECTION]->(n)
89
- WHERE parent.conversationIdentity IS NOT NULL
90
- })
91
- SET n.authorshipMode = $mode,
92
- n.authorshipTaggedAt = $now,
93
- n.format = $format,
94
- n.voiceAuthor = $voiceAuthor
95
- RETURN elementId(n) AS id`, {
96
- ids: batch,
97
- accountId,
98
- mode,
99
- now,
100
- format,
101
- voiceAuthor,
102
- primaryLabels: [...TAGGABLE_PRIMARY_LABELS],
103
- });
104
- const matched = new Set(result.records.map((r) => r.get("id")));
105
- updated += matched.size;
106
- for (const id of batch) {
107
- if (matched.has(id))
108
- continue;
109
- const reason = "not-found-or-not-content-label";
110
- skippedReasons[reason] = (skippedReasons[reason] ?? 0) + 1;
111
- }
112
- }
113
- }
114
- finally {
115
- await session.close();
116
- }
117
- // Tagging is always a personal-attribution act: every tagged node carries an
118
- // author and feeds both that author's personal walk and the account-wide org
119
- // walk. There is no org-only corpus node, so scope is constant `personal`.
120
- process.stderr.write(`[voice-tag] mode=${mode} format=${format} scope=personal author=${voiceAuthor} accountId=${accountId} updated=${updated} skipped=${nodeIds.length - updated}\n`);
121
- return {
122
- updated,
123
- skipped: nodeIds.length - updated,
124
- skippedReasons,
125
- };
126
- }
127
- //# sourceMappingURL=voice-tag-content.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"voice-tag-content.js","sourceRoot":"","sources":["../../src/tools/voice-tag-content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,uBAAuB,EACvB,aAAa,GAEd,MAAM,wBAAwB,CAAC;AAShC,MAAM,CAAC,MAAM,gBAAgB,GAAgC,IAAI,GAAG,CAAC;IACnE,YAAY;IACZ,0BAA0B;IAC1B,0BAA0B;IAC1B,YAAY;IACZ,SAAS;CACV,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAA0B,EAC1B,cAA6B;IAE7B,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACvC,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAC9B,IAAI,cAAc;QAAE,OAAO,cAAc,CAAC;IAC1C,MAAM,IAAI,K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