@rubytech/create-maxy-code 0.1.172 → 0.1.175

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 (59) hide show
  1. package/dist/index.js +12 -1
  2. package/package.json +1 -1
  3. package/payload/platform/neo4j/schema.cypher +49 -10
  4. package/payload/platform/plugins/docs/references/voice-mirror-guide.md +18 -16
  5. package/payload/platform/scripts/setup-account.sh +8 -0
  6. package/payload/platform/scripts/verify-skill-tool-surface.sh +117 -0
  7. package/payload/platform/services/claude-session-manager/dist/specialist-drift.d.ts.map +1 -1
  8. package/payload/platform/services/claude-session-manager/dist/specialist-drift.js +1 -0
  9. package/payload/platform/services/claude-session-manager/dist/specialist-drift.js.map +1 -1
  10. package/payload/platform/templates/specialists/agents/content-producer.md +4 -4
  11. package/payload/platform/templates/specialists/agents/librarian.md +2 -2
  12. package/payload/platform/templates/specialists/agents/personal-assistant.md +4 -4
  13. package/payload/platform/templates/specialists/agents/project-manager.md +2 -2
  14. package/payload/platform/templates/specialists/agents/research-assistant.md +2 -2
  15. package/payload/premium-plugins/writer-craft/PLUGIN.md +11 -7
  16. package/payload/premium-plugins/writer-craft/hooks/__tests__/voice-session-end-text.test.sh +284 -0
  17. package/payload/premium-plugins/writer-craft/hooks/voice-session-end-text.sh +75 -0
  18. package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.d.ts +3 -0
  19. package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.d.ts.map +1 -0
  20. package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.js +58 -0
  21. package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.js.map +1 -0
  22. package/payload/premium-plugins/writer-craft/mcp/dist/index.d.ts.map +1 -1
  23. package/payload/premium-plugins/writer-craft/mcp/dist/index.js +113 -36
  24. package/payload/premium-plugins/writer-craft/mcp/dist/index.js.map +1 -1
  25. package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.d.ts +47 -6
  26. package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.d.ts.map +1 -1
  27. package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.js +69 -6
  28. package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.js.map +1 -1
  29. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.d.ts +9 -3
  30. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.d.ts.map +1 -1
  31. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.js +86 -57
  32. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.js.map +1 -1
  33. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.d.ts +23 -0
  34. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.d.ts.map +1 -0
  35. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.js +191 -0
  36. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.js.map +1 -0
  37. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.d.ts +7 -1
  38. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.d.ts.map +1 -1
  39. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.js +20 -12
  40. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.js.map +1 -1
  41. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.d.ts +13 -2
  42. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.d.ts.map +1 -1
  43. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.js +26 -15
  44. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.js.map +1 -1
  45. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.d.ts +3 -0
  46. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.d.ts.map +1 -1
  47. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.js +33 -5
  48. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.js.map +1 -1
  49. package/payload/premium-plugins/writer-craft/mcp/scripts/smoke.mjs +289 -28
  50. package/payload/premium-plugins/writer-craft/mcp/src/cli/ingest-session-text.ts +65 -0
  51. package/payload/premium-plugins/writer-craft/mcp/src/index.ts +126 -36
  52. package/payload/premium-plugins/writer-craft/mcp/src/lib/voice-corpus.ts +78 -6
  53. package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-distil-profile.ts +120 -61
  54. package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-ingest-session-text.ts +229 -0
  55. package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-record-feedback.ts +27 -13
  56. package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-retrieve-conditioning.ts +42 -17
  57. package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-tag-content.ts +42 -5
  58. package/payload/premium-plugins/writer-craft/skills/voice-mirror/SKILL.md +65 -31
  59. package/payload/server/server.js +12 -3
@@ -7,6 +7,8 @@ import { voiceTagContent, AUTHORSHIP_MODES } from "./tools/voice-tag-content.js"
7
7
  import { voiceDistilProfile } from "./tools/voice-distil-profile.js";
8
8
  import { voiceRetrieveConditioning } from "./tools/voice-retrieve-conditioning.js";
9
9
  import { voiceRecordFeedback } from "./tools/voice-record-feedback.js";
10
+ import { voiceIngestSessionText } from "./tools/voice-ingest-session-text.js";
11
+ import { FORMAT_VALUES } from "./lib/voice-corpus.js";
10
12
  import { closeDriver } from "./lib/neo4j.js";
11
13
  const server = new McpServer({
12
14
  name: "maxy-writer-craft",
@@ -16,8 +18,8 @@ const server = new McpServer({
16
18
  // refusal preserves account isolation. Mirrors the memory plugin's
17
19
  // pattern (Task 202).
18
20
  const accountId = process.env.ACCOUNT_ID ?? null;
19
- const adminUserIdEnv = process.env.ADMIN_USER_ID ?? null;
20
- process.stderr.write(`[writer-craft] boot accountId=${accountId ?? "null"} adminUserId=${adminUserIdEnv ?? "null"}\n`);
21
+ const userIdEnv = process.env.ADMIN_USER_ID ?? null;
22
+ process.stderr.write(`[writer-craft] boot accountId=${accountId ?? "null"} userId=${userIdEnv ?? "null"}\n`);
21
23
  function refuseNoAccount(toolName) {
22
24
  process.stderr.write(`[writer-craft] tool=${toolName} refuse reason=no-account-context\n`);
23
25
  return {
@@ -30,13 +32,15 @@ function refuseNoAccount(toolName) {
30
32
  isError: true,
31
33
  };
32
34
  }
33
- function resolveAdminUserId() {
35
+ function resolveUserId() {
34
36
  // ADMIN_USER_ID is stamped by the admin session manager at spawn time.
35
37
  // When absent (e.g. specialist subagents), the operator must pass it as
36
38
  // a tool argument or the tools refuse rather than orphan a profile.
37
- return adminUserIdEnv;
39
+ return userIdEnv;
38
40
  }
39
- server.tool("voice-tag-content", "Stamp authorshipMode on one or many content nodes (:KnowledgeDocument | :Message | :SocialPost) the operator owns. Email threads live as :KnowledgeDocument {source:'email'} since Task 321. Valid modes: human-only, human-led-agent-assisted, agent-led-human-reviewed, agent-only, unknown.", {
41
+ // Format enum schema shared across tools that accept VoiceFormat.
42
+ const zFormat = z.enum([...FORMAT_VALUES]).describe("Writing format: text | email | social-post | article | marketing-copy | note. One :VoiceProfile per (accountId, userId, format).");
43
+ server.tool("voice-tag-content", "Stamp authorshipMode (and optionally format) on one or many content nodes (:KnowledgeDocument | :Message | :SocialPost) the operator owns. Email threads live as :KnowledgeDocument {source:'email'} since Task 321. Valid modes: human-only, human-led-agent-assisted, agent-led-human-reviewed, agent-only, unknown. Valid formats: text, email, social-post, article, marketing-copy, note. When format is omitted, it is derived per-node from labels and source property.", {
40
44
  nodeIds: z.array(z.string()).min(1).describe("Element IDs of nodes to tag"),
41
45
  mode: z
42
46
  .enum([
@@ -47,7 +51,8 @@ server.tool("voice-tag-content", "Stamp authorshipMode on one or many content no
47
51
  "unknown",
48
52
  ])
49
53
  .describe("Authorship mode to apply"),
50
- }, async ({ nodeIds, mode }) => {
54
+ format: zFormat.optional().describe("Writing format. When omitted, derived from each node's labels and source property."),
55
+ }, async ({ nodeIds, mode, format }) => {
51
56
  if (!accountId)
52
57
  return refuseNoAccount("voice-tag-content");
53
58
  try {
@@ -55,12 +60,13 @@ server.tool("voice-tag-content", "Stamp authorshipMode on one or many content no
55
60
  nodeIds,
56
61
  mode: mode,
57
62
  accountId,
63
+ format: format,
58
64
  });
59
65
  return {
60
66
  content: [
61
67
  {
62
68
  type: "text",
63
- text: `voice-tag: mode=${mode} updated=${result.updated} skipped=${result.skipped}`,
69
+ text: `voice-tag: mode=${mode} format=${format ?? "derived"} updated=${result.updated} skipped=${result.skipped}`,
64
70
  },
65
71
  ],
66
72
  };
@@ -77,11 +83,12 @@ server.tool("voice-tag-content", "Stamp authorshipMode on one or many content no
77
83
  };
78
84
  }
79
85
  });
80
- server.tool("voice-distil-profile", "Two-mode tool (Task 424). mode='sample' (default) walks the operator's human-only corpus, returns the exemplars + recent operator-edit intents for the agent to read. mode='write' persists the YAML style card the agent composed from the sample-mode response. Cadence-guarded: returns skip in 'write' mode without writing if corpus didn't grow ≥20% AND <30 days passed (pass force=true to override).", {
81
- adminUserId: z
86
+ server.tool("voice-distil-profile", "Two-mode tool (Task 424). mode='sample' (default) walks the operator's per-format human-only corpus, returns exemplars + recent edit intents for the agent to read. mode='write' persists the YAML style card the agent composed. Cadence-guarded: skips in 'write' mode without writing if corpus didn't grow ≥20% AND <30 days passed (pass force=true to override). When format is omitted, enumerates all formats in the corpus and distils each.", {
87
+ userId: z
82
88
  .string()
83
89
  .optional()
84
90
  .describe("Operator AdminUser identifier. Defaults to ADMIN_USER_ID env from spawn context."),
91
+ format: zFormat.optional().describe("Writing format to distil. When omitted, enumerates corpus formats and distils each that fires the cadence guard."),
85
92
  force: z
86
93
  .boolean()
87
94
  .optional()
@@ -94,16 +101,16 @@ server.tool("voice-distil-profile", "Two-mode tool (Task 424). mode='sample' (de
94
101
  .string()
95
102
  .optional()
96
103
  .describe("Required for mode='write'. The YAML style card the agent composed from the sample-mode exemplars + feedback intents."),
97
- }, async ({ adminUserId, force, mode, styleCardYaml }) => {
104
+ }, async ({ userId, format, force, mode, styleCardYaml }) => {
98
105
  if (!accountId)
99
106
  return refuseNoAccount("voice-distil-profile");
100
- const resolvedAdminUserId = adminUserId ?? resolveAdminUserId();
101
- if (!resolvedAdminUserId) {
107
+ const resolvedUserId = userId ?? resolveUserId();
108
+ if (!resolvedUserId) {
102
109
  return {
103
110
  content: [
104
111
  {
105
112
  type: "text",
106
- text: "voice-distil-profile: adminUserId required (no ADMIN_USER_ID in spawn env).",
113
+ text: "voice-distil-profile: userId required (no ADMIN_USER_ID in spawn env).",
107
114
  },
108
115
  ],
109
116
  isError: true,
@@ -112,16 +119,30 @@ server.tool("voice-distil-profile", "Two-mode tool (Task 424). mode='sample' (de
112
119
  try {
113
120
  const result = await voiceDistilProfile({
114
121
  accountId,
115
- adminUserId: resolvedAdminUserId,
122
+ userId: resolvedUserId,
123
+ format: format,
116
124
  force: force === true,
117
125
  mode,
118
126
  styleCardYaml,
119
127
  });
120
- const summary = result.skipped
121
- ? (result.exemplars
122
- ? `voice-distil sample: corpusSize=${result.corpusSize} exemplars=${result.exemplars.length} feedbackEntries=${result.feedbackEntries}\n${JSON.stringify({ exemplars: result.exemplars, feedbackIntents: result.feedbackIntents }, null, 2)}`
123
- : `voice-distil: skipped reason=${result.skipReason} corpusSize=${result.corpusSize}`)
124
- : `voice-distil: ok profileId=${result.profileId} corpusSize=${result.corpusSize} feedbackEntries=${result.feedbackEntries} generatedAt=${result.generatedAt}`;
128
+ // Summarise single-format or multi-format result.
129
+ const summariseOne = (r, fmt) => {
130
+ const tag = fmt ? ` format=${fmt}` : "";
131
+ if (r.skipped && r.exemplars) {
132
+ return `voice-distil sample${tag}: corpusSize=${r.corpusSize} exemplars=${r.exemplars.length} feedbackEntries=${r.feedbackEntries}\n${JSON.stringify({ exemplars: r.exemplars, feedbackIntents: r.feedbackIntents }, null, 2)}`;
133
+ }
134
+ if (r.skipped) {
135
+ return `voice-distil${tag}: skipped reason=${r.skipReason} corpusSize=${r.corpusSize}`;
136
+ }
137
+ return `voice-distil${tag}: ok profileId=${r.profileId} corpusSize=${r.corpusSize} feedbackEntries=${r.feedbackEntries} generatedAt=${r.generatedAt}`;
138
+ };
139
+ let summary;
140
+ if (Array.isArray(result)) {
141
+ summary = result.map((r, i) => summariseOne(r)).join("\n---\n");
142
+ }
143
+ else {
144
+ summary = summariseOne(result, format);
145
+ }
125
146
  return { content: [{ type: "text", text: summary }] };
126
147
  }
127
148
  catch (err) {
@@ -136,25 +157,27 @@ server.tool("voice-distil-profile", "Two-mode tool (Task 424). mode='sample' (de
136
157
  };
137
158
  }
138
159
  });
139
- server.tool("voice-retrieve-conditioning", "Return the operator's style card and K voice-matched exemplars for a drafting brief. K=5 short-form, K=15 long-form. Token-budget bounded. Returns empty {styleCard:null,exemplars:[]} when no profile exists.", {
140
- adminUserId: z
160
+ server.tool("voice-retrieve-conditioning", "Return the operator's per-format style card and K voice-matched exemplars for a drafting brief. K=5 short-form (length='short'), K=15 long-form (length='long'). Token-budget bounded. format is required (the writing type: text|email|social-post|article|marketing-copy|note). Returns empty {styleCard:null,exemplars:[]} when no profile exists.", {
161
+ userId: z
141
162
  .string()
142
163
  .optional()
143
164
  .describe("Operator AdminUser identifier. Defaults to ADMIN_USER_ID env."),
165
+ format: zFormat.describe("Writing format for corpus and profile scoping."),
144
166
  topic: z
145
167
  .string()
146
168
  .optional()
147
169
  .describe("Drafting topic keyword (filters exemplars to relevant ones)"),
148
- format: z
170
+ length: z
149
171
  .enum(["short", "long"])
150
- .describe("Short = email/post (K=5, 16k tokens); long = brochure/prospectus (K=15, 96k tokens)"),
172
+ .optional()
173
+ .describe("K-selector: short = K=5 (16k tokens, email/post); long = K=15 (96k tokens, brochure/prospectus). Defaults to short."),
151
174
  register: z.string().optional().describe("Optional register hint"),
152
175
  tokenBudget: z.number().int().positive().optional(),
153
- }, async ({ adminUserId, topic, format, register, tokenBudget }) => {
176
+ }, async ({ userId, format, topic, length, register, tokenBudget }) => {
154
177
  if (!accountId)
155
178
  return refuseNoAccount("voice-retrieve-conditioning");
156
- const resolvedAdminUserId = adminUserId ?? resolveAdminUserId();
157
- if (!resolvedAdminUserId) {
179
+ const resolvedUserId = userId ?? resolveUserId();
180
+ if (!resolvedUserId) {
158
181
  return {
159
182
  content: [
160
183
  {
@@ -167,8 +190,13 @@ server.tool("voice-retrieve-conditioning", "Return the operator's style card and
167
190
  try {
168
191
  const result = await voiceRetrieveConditioning({
169
192
  accountId,
170
- adminUserId: resolvedAdminUserId,
171
- brief: { topic, format, register },
193
+ userId: resolvedUserId,
194
+ brief: {
195
+ format: format,
196
+ topic,
197
+ length: length,
198
+ register,
199
+ },
172
200
  tokenBudget,
173
201
  });
174
202
  return {
@@ -191,8 +219,9 @@ server.tool("voice-retrieve-conditioning", "Return the operator's style card and
191
219
  };
192
220
  }
193
221
  });
194
- server.tool("voice-record-feedback", "Capture an operator's edit on an agent draft. Writes :VoiceEdit linked to :VoiceProfile via :FEEDBACK_FOR. The calling agent supplies `intent` (one sentence describing what the operator changed and what voice preference it reveals); Task 424 moved the diff-intent summarisation into the agent's turn.", {
195
- adminUserId: z.string().optional(),
222
+ server.tool("voice-record-feedback", "Capture an operator's edit on an agent draft. Writes :VoiceEdit linked to the per-format :VoiceProfile via :FEEDBACK_FOR. The calling agent supplies `intent` (one sentence describing what changed and what voice preference it reveals Task 424) and `format` (the writing format of the draft).", {
223
+ userId: z.string().optional(),
224
+ format: zFormat.describe("Writing format of the draft being edited."),
196
225
  originalText: z.string().min(1),
197
226
  editedText: z.string().min(1),
198
227
  intent: z
@@ -201,16 +230,16 @@ server.tool("voice-record-feedback", "Capture an operator's edit on an agent dra
201
230
  .describe("One sentence summarising what changed and what voice preference it reveals — produced by the calling agent in-turn from originalText vs editedText (Task 424)."),
202
231
  skill: z.string().optional().describe("Calling skill name, for provenance"),
203
232
  brief: z.string().optional().describe("Drafting brief that produced the original"),
204
- }, async ({ adminUserId, originalText, editedText, intent, skill, brief }) => {
233
+ }, async ({ userId, format, originalText, editedText, intent, skill, brief }) => {
205
234
  if (!accountId)
206
235
  return refuseNoAccount("voice-record-feedback");
207
- const resolvedAdminUserId = adminUserId ?? resolveAdminUserId();
208
- if (!resolvedAdminUserId) {
236
+ const resolvedUserId = userId ?? resolveUserId();
237
+ if (!resolvedUserId) {
209
238
  return {
210
239
  content: [
211
240
  {
212
241
  type: "text",
213
- text: "voice-record-feedback: adminUserId required (no ADMIN_USER_ID in spawn env).",
242
+ text: "voice-record-feedback: userId required (no ADMIN_USER_ID in spawn env).",
214
243
  },
215
244
  ],
216
245
  isError: true,
@@ -219,7 +248,8 @@ server.tool("voice-record-feedback", "Capture an operator's edit on an agent dra
219
248
  try {
220
249
  const result = await voiceRecordFeedback({
221
250
  accountId,
222
- adminUserId: resolvedAdminUserId,
251
+ userId: resolvedUserId,
252
+ format: format,
223
253
  originalText,
224
254
  editedText,
225
255
  intent,
@@ -229,7 +259,7 @@ server.tool("voice-record-feedback", "Capture an operator's edit on an agent dra
229
259
  content: [
230
260
  {
231
261
  type: "text",
232
- text: `voice-record-feedback: editId=${result.editId} intent="${result.intent}" hadProfile=${result.hadProfile}`,
262
+ text: `voice-record-feedback: editId=${result.editId} format=${format} intent="${result.intent}" hadProfile=${result.hadProfile}`,
233
263
  },
234
264
  ],
235
265
  };
@@ -246,6 +276,53 @@ server.tool("voice-record-feedback", "Capture an operator's edit on an agent dra
246
276
  };
247
277
  }
248
278
  });
279
+ server.tool("voice-ingest-session-text", "Ingest operator PTY turns from a Claude Code session JSONL as :Message {format:'text', source:'admin-pty', authorshipMode:'human-only'} corpus nodes. Deduplication via SHA256 contentHash — re-running against the same JSONL is a no-op. Triggers voice-distil-profile {format:'text'} after ingest (cadence guard decides whether distillation runs). Called automatically by the SessionEnd hook; can also be invoked manually.", {
280
+ sessionJsonlPath: z.string().min(1).describe("Absolute path to the Claude Code session JSONL file"),
281
+ sessionId: z.string().optional().describe("Session ID for provenance; read from the SessionEnd envelope"),
282
+ userId: z.string().optional().describe("Operator AdminUser identifier. Defaults to ADMIN_USER_ID env."),
283
+ }, async ({ sessionJsonlPath, sessionId, userId }) => {
284
+ if (!accountId)
285
+ return refuseNoAccount("voice-ingest-session-text");
286
+ const resolvedUserId = userId ?? resolveUserId();
287
+ if (!resolvedUserId) {
288
+ return {
289
+ content: [
290
+ {
291
+ type: "text",
292
+ text: "voice-ingest-session-text: userId required (no ADMIN_USER_ID in spawn env).",
293
+ },
294
+ ],
295
+ isError: true,
296
+ };
297
+ }
298
+ try {
299
+ const result = await voiceIngestSessionText({
300
+ sessionJsonlPath,
301
+ accountId,
302
+ userId: resolvedUserId,
303
+ sessionId,
304
+ });
305
+ return {
306
+ content: [
307
+ {
308
+ type: "text",
309
+ text: `voice-ingest-session-text: ingestedCount=${result.ingestedCount} skippedCount=${result.skippedCount} sessionId=${result.sessionId ?? "unknown"}`,
310
+ },
311
+ ],
312
+ };
313
+ }
314
+ catch (err) {
315
+ return {
316
+ content: [
317
+ {
318
+ type: "text",
319
+ text: `voice-ingest-session-text failed: ${err instanceof Error ? err.message : String(err)}`,
320
+ },
321
+ ],
322
+ isError: true,
323
+ };
324
+ }
325
+ });
249
326
  const transport = new StdioServerTransport();
250
327
  await server.connect(transport);
251
328
  process.on("SIGTERM", async () => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uDAAuD,CAAC;AACtF,aAAa,CAAC,cAAc,CAAC,CAAC;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC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ACd,CAAC;IACJ,CAAC;AACH,CAAC,CACF,CAAC;AAEF,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAEhC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IAC/B,MAAM,WAAW,EAAE,CAAC;IACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,0DAA0D;AAC1D,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1,11 +1,13 @@
1
1
  /**
2
- * Shared corpus-filter clause for the voice-mirror tools.
2
+ * Shared corpus-filter clauses and format helpers for the voice-mirror tools.
3
3
  *
4
- * Imported by `voice-distil-profile` (count + sample walks) and
5
- * `voice-retrieve-conditioning` (exemplar walk). The single load-bearing
6
- * filter — when the corpus rules change, this is the only place to edit.
4
+ * Imported by `voice-distil-profile` (count + sample walks),
5
+ * `voice-retrieve-conditioning` (exemplar walk), `voice-tag-content` (tag
6
+ * writes), and `voice-ingest-session-text` (SessionEnd ingest). The single
7
+ * load-bearing filter — when the corpus rules change, this is the only place
8
+ * to edit.
7
9
  *
8
- * Two predicates:
10
+ * Two predicates in VOICE_CORPUS_WHERE:
9
11
  *
10
12
  * 1. `authorshipMode IN ['human-only', 'human-led-agent-assisted']`.
11
13
  * `human-only` is the operator's own writing verbatim;
@@ -25,7 +27,7 @@
25
27
  * Chat captures voice in a way email rarely does — this is the
26
28
  * single highest-leverage corpus addition for voice fidelity.
27
29
  *
28
- * The clause expects `$accountId` to be bound in the calling cypher
30
+ * The clause expects `$accountId` to be bound in the calling Cypher
29
31
  * parameters. It does not bind any other parameters.
30
32
  */
31
33
  export declare const VOICE_CORPUS_WHERE = "n.accountId = $accountId\n AND n.authorshipMode IN ['human-only', 'human-led-agent-assisted']\n AND (\n any(lbl IN labels(n) WHERE lbl IN ['KnowledgeDocument', 'Message', 'SocialPost'])\n OR ('Section' IN labels(n) AND EXISTS {\n MATCH (parent:KnowledgeDocument)-[:HAS_SECTION]->(n)\n WHERE parent.conversationIdentity IS NOT NULL\n })\n )";
@@ -39,4 +41,43 @@ export declare const VOICE_CORPUS_WHERE = "n.accountId = $accountId\n AND n.aut
39
41
  * `:KnowledgeDocument {source:'email'}` and are already covered.
40
42
  */
41
43
  export declare const TAGGABLE_PRIMARY_LABELS: readonly ["KnowledgeDocument", "Message", "SocialPost"];
44
+ /**
45
+ * Closed enum of writing-format values. One `:VoiceProfile` exists per
46
+ * `(accountId, userId, format)`. Adding a new value is a separate task.
47
+ *
48
+ * `marketing-copy` has no auto-derivation path — operator-tagged only.
49
+ */
50
+ export declare const FORMAT_VALUES: readonly ["text", "email", "social-post", "article", "marketing-copy", "note"];
51
+ export type VoiceFormat = (typeof FORMAT_VALUES)[number];
52
+ /**
53
+ * Returns VOICE_CORPUS_WHERE with an additional `n.format = $format`
54
+ * predicate appended. Requires `$format` to be bound alongside `$accountId`
55
+ * in the calling Cypher parameters.
56
+ *
57
+ * Format-discovery queries (which enumerate distinct formats from the
58
+ * corpus) use the base `VOICE_CORPUS_WHERE` directly; per-format corpus
59
+ * walks use this function.
60
+ */
61
+ export declare function voiceCorpusWhereWithFormat(format: VoiceFormat): string;
62
+ /**
63
+ * Derives the default writing format for a corpus node from its labels
64
+ * and properties. Used by ingest writers and `voice-tag-content` when the
65
+ * operator does not specify a format explicitly.
66
+ *
67
+ * Derivation rules (first match wins):
68
+ *
69
+ * | Node shape | format |
70
+ * |-------------------------------------------------------------|---------------|
71
+ * | :Message | 'text' |
72
+ * | :SocialPost | 'social-post' |
73
+ * | :KnowledgeDocument {source:'email'} | 'email' |
74
+ * | :ConversationArchive {source:'email'} | 'email' |
75
+ * | :KnowledgeDocument (non-email), body.length > 1500 | 'article' |
76
+ * | :KnowledgeDocument (non-email), body.length ≤ 1500 | 'note' |
77
+ * | :Section (conversation-document chunk) | 'text' |
78
+ * | fallback | 'text' |
79
+ *
80
+ * `marketing-copy` has no auto-derivation path.
81
+ */
82
+ export declare function deriveFormat(labels: string[], source?: string | null, body?: string | null): VoiceFormat;
42
83
  //# sourceMappingURL=voice-corpus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"voice-corpus.d.ts","sourceRoot":"","sources":["../../src/lib/voice-corpus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,kBAAkB,8WAQ3B,CAAC;AAEL;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,yDAI1B,CAAC"}
1
+ {"version":3,"file":"voice-corpus.d.ts","sourceRoot":"","sources":["../../src/lib/voice-corpus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,kBAAkB,8WAQ3B,CAAC;AAEL;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,yDAI1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,aAAa,gFAOhB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAEtE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EAAE,EAChB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,EACtB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GACnB,WAAW,CAcb"}
@@ -1,11 +1,13 @@
1
1
  /**
2
- * Shared corpus-filter clause for the voice-mirror tools.
2
+ * Shared corpus-filter clauses and format helpers for the voice-mirror tools.
3
3
  *
4
- * Imported by `voice-distil-profile` (count + sample walks) and
5
- * `voice-retrieve-conditioning` (exemplar walk). The single load-bearing
6
- * filter — when the corpus rules change, this is the only place to edit.
4
+ * Imported by `voice-distil-profile` (count + sample walks),
5
+ * `voice-retrieve-conditioning` (exemplar walk), `voice-tag-content` (tag
6
+ * writes), and `voice-ingest-session-text` (SessionEnd ingest). The single
7
+ * load-bearing filter — when the corpus rules change, this is the only place
8
+ * to edit.
7
9
  *
8
- * Two predicates:
10
+ * Two predicates in VOICE_CORPUS_WHERE:
9
11
  *
10
12
  * 1. `authorshipMode IN ['human-only', 'human-led-agent-assisted']`.
11
13
  * `human-only` is the operator's own writing verbatim;
@@ -25,7 +27,7 @@
25
27
  * Chat captures voice in a way email rarely does — this is the
26
28
  * single highest-leverage corpus addition for voice fidelity.
27
29
  *
28
- * The clause expects `$accountId` to be bound in the calling cypher
30
+ * The clause expects `$accountId` to be bound in the calling Cypher
29
31
  * parameters. It does not bind any other parameters.
30
32
  */
31
33
  export const VOICE_CORPUS_WHERE = `n.accountId = $accountId
@@ -51,4 +53,65 @@ export const TAGGABLE_PRIMARY_LABELS = [
51
53
  "Message",
52
54
  "SocialPost",
53
55
  ];
56
+ /**
57
+ * Closed enum of writing-format values. One `:VoiceProfile` exists per
58
+ * `(accountId, userId, format)`. Adding a new value is a separate task.
59
+ *
60
+ * `marketing-copy` has no auto-derivation path — operator-tagged only.
61
+ */
62
+ export const FORMAT_VALUES = [
63
+ "text",
64
+ "email",
65
+ "social-post",
66
+ "article",
67
+ "marketing-copy",
68
+ "note",
69
+ ];
70
+ /**
71
+ * Returns VOICE_CORPUS_WHERE with an additional `n.format = $format`
72
+ * predicate appended. Requires `$format` to be bound alongside `$accountId`
73
+ * in the calling Cypher parameters.
74
+ *
75
+ * Format-discovery queries (which enumerate distinct formats from the
76
+ * corpus) use the base `VOICE_CORPUS_WHERE` directly; per-format corpus
77
+ * walks use this function.
78
+ */
79
+ export function voiceCorpusWhereWithFormat(format) {
80
+ return `${VOICE_CORPUS_WHERE}\n AND n.format = $format`;
81
+ }
82
+ /**
83
+ * Derives the default writing format for a corpus node from its labels
84
+ * and properties. Used by ingest writers and `voice-tag-content` when the
85
+ * operator does not specify a format explicitly.
86
+ *
87
+ * Derivation rules (first match wins):
88
+ *
89
+ * | Node shape | format |
90
+ * |-------------------------------------------------------------|---------------|
91
+ * | :Message | 'text' |
92
+ * | :SocialPost | 'social-post' |
93
+ * | :KnowledgeDocument {source:'email'} | 'email' |
94
+ * | :ConversationArchive {source:'email'} | 'email' |
95
+ * | :KnowledgeDocument (non-email), body.length > 1500 | 'article' |
96
+ * | :KnowledgeDocument (non-email), body.length ≤ 1500 | 'note' |
97
+ * | :Section (conversation-document chunk) | 'text' |
98
+ * | fallback | 'text' |
99
+ *
100
+ * `marketing-copy` has no auto-derivation path.
101
+ */
102
+ export function deriveFormat(labels, source, body) {
103
+ if (labels.includes("Message"))
104
+ return "text";
105
+ if (labels.includes("SocialPost"))
106
+ return "social-post";
107
+ if ((labels.includes("KnowledgeDocument") || labels.includes("ConversationArchive")) &&
108
+ source === "email") {
109
+ return "email";
110
+ }
111
+ if (labels.includes("KnowledgeDocument")) {
112
+ return (body?.length ?? 0) > 1500 ? "article" : "note";
113
+ }
114
+ // :Section (conversation-document chunk) and any other label → text.
115
+ return "text";
116
+ }
54
117
  //# sourceMappingURL=voice-corpus.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"voice-corpus.js","sourceRoot":"","sources":["../../src/lib/voice-corpus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;IAQ9B,CAAC;AAEL;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,mBAAmB;IACnB,SAAS;IACT,YAAY;CACJ,CAAC"}
1
+ {"version":3,"file":"voice-corpus.js","sourceRoot":"","sources":["../../src/lib/voice-corpus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;IAQ9B,CAAC;AAEL;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,mBAAmB;IACnB,SAAS;IACT,YAAY;CACJ,CAAC;AAEX;;;;;GAKG;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;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,YAAY,CAC1B,MAAgB,EAChB,MAAsB,EACtB,IAAoB;IAEpB,IAAI,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,OAAO,MAAM,CAAC;IAC9C,IAAI,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;QAAE,OAAO,aAAa,CAAC;IACxD,IACE,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;QAChF,MAAM,KAAK,OAAO,EAClB,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,IAAI,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC;QACzC,OAAO,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IACzD,CAAC;IACD,qEAAqE;IACrE,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,7 +1,13 @@
1
+ import { type VoiceFormat } from "../lib/voice-corpus.js";
1
2
  export interface VoiceDistilProfileParams {
2
3
  accountId: string;
3
- adminUserId: string;
4
+ userId: string;
4
5
  force?: boolean;
6
+ /**
7
+ * Writing format to distil. When omitted, enumerates distinct format
8
+ * values in the corpus and distils each that fires the cadence guard.
9
+ */
10
+ format?: VoiceFormat;
5
11
  /**
6
12
  * Operation mode (Task 424):
7
13
  * - `'sample'` (default) — read the corpus + feedback intents and return
@@ -25,12 +31,12 @@ export interface VoiceDistilProfileResult {
25
31
  generatedAt: string | null;
26
32
  feedbackEntries: number;
27
33
  skipped: boolean;
28
- skipReason?: "below-threshold" | "recent" | "empty-corpus" | "missing-style-card";
34
+ skipReason?: "below-threshold" | "recent" | "empty-corpus" | "missing-style-card" | "no-format-tagged-content";
29
35
  errorReason?: string;
30
36
  /** Present when `mode='sample'`: corpus exemplars for the agent to read. */
31
37
  exemplars?: VoiceCorpusExemplar[];
32
38
  /** Present when `mode='sample'`: operator-edit intents to fold into the style card. */
33
39
  feedbackIntents?: string[];
34
40
  }
35
- export declare function voiceDistilProfile(params: VoiceDistilProfileParams): Promise<VoiceDistilProfileResult>;
41
+ export declare function voiceDistilProfile(params: VoiceDistilProfileParams): Promise<VoiceDistilProfileResult | VoiceDistilProfileResult[]>;
36
42
  //# sourceMappingURL=voice-distil-profile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"voice-distil-profile.d.ts","sourceRoot":"","sources":["../../src/tools/voice-distil-profile.ts"],"names":[],"mappings":"AA4CA,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;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,CAA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