@rubytech/create-maxy-code 0.1.140 → 0.1.143

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 (139) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/config/brand.json +1 -1
  3. package/payload/platform/lib/graph-style/dist/index.d.ts +6 -4
  4. package/payload/platform/lib/graph-style/dist/index.d.ts.map +1 -1
  5. package/payload/platform/lib/graph-style/dist/index.js +10 -23
  6. package/payload/platform/lib/graph-style/dist/index.js.map +1 -1
  7. package/payload/platform/lib/graph-style/src/index.ts +10 -20
  8. package/payload/platform/lib/graph-trash/dist/index.d.ts.map +1 -1
  9. package/payload/platform/lib/graph-trash/dist/index.js +6 -1
  10. package/payload/platform/lib/graph-trash/dist/index.js.map +1 -1
  11. package/payload/platform/lib/graph-trash/src/index.ts +6 -1
  12. package/payload/platform/neo4j/edge-annotations.json +3 -3
  13. package/payload/platform/neo4j/schema.cypher +81 -119
  14. package/payload/platform/plugins/.claude-plugin/marketplace.json +5 -0
  15. package/payload/platform/plugins/admin/hooks/archive-ingest-surface-gate.sh +2 -2
  16. package/payload/platform/plugins/contacts/mcp/dist/tools/contact-erase.d.ts.map +1 -1
  17. package/payload/platform/plugins/contacts/mcp/dist/tools/contact-erase.js +14 -8
  18. package/payload/platform/plugins/contacts/mcp/dist/tools/contact-erase.js.map +1 -1
  19. package/payload/platform/plugins/contacts/mcp/dist/tools/contact-export.d.ts +1 -1
  20. package/payload/platform/plugins/contacts/mcp/dist/tools/contact-export.d.ts.map +1 -1
  21. package/payload/platform/plugins/contacts/mcp/dist/tools/contact-export.js +10 -7
  22. package/payload/platform/plugins/contacts/mcp/dist/tools/contact-export.js.map +1 -1
  23. package/payload/platform/plugins/docs/references/internals.md +1 -1
  24. package/payload/platform/plugins/docs/references/linkedin-extension.md +1 -1
  25. package/payload/platform/plugins/docs/references/neo4j.md +3 -3
  26. package/payload/platform/plugins/docs/references/plugins-guide.md +3 -2
  27. package/payload/platform/plugins/email/.claude-plugin/plugin.json +1 -1
  28. package/payload/platform/plugins/email/PLUGIN.md +3 -7
  29. package/payload/platform/plugins/email/mcp/dist/index.js +7 -46
  30. package/payload/platform/plugins/email/mcp/dist/index.js.map +1 -1
  31. package/payload/platform/plugins/email/mcp/dist/lib/credentials.d.ts.map +1 -1
  32. package/payload/platform/plugins/email/mcp/dist/lib/credentials.js +4 -15
  33. package/payload/platform/plugins/email/mcp/dist/lib/credentials.js.map +1 -1
  34. package/payload/platform/plugins/email/mcp/dist/lib/graph.d.ts +51 -43
  35. package/payload/platform/plugins/email/mcp/dist/lib/graph.d.ts.map +1 -1
  36. package/payload/platform/plugins/email/mcp/dist/lib/graph.js +223 -229
  37. package/payload/platform/plugins/email/mcp/dist/lib/graph.js.map +1 -1
  38. package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.js +7 -4
  39. package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.js.map +1 -1
  40. package/payload/platform/plugins/email/mcp/dist/tools/email-graph-query.d.ts +14 -4
  41. package/payload/platform/plugins/email/mcp/dist/tools/email-graph-query.d.ts.map +1 -1
  42. package/payload/platform/plugins/email/mcp/dist/tools/email-graph-query.js +69 -84
  43. package/payload/platform/plugins/email/mcp/dist/tools/email-graph-query.js.map +1 -1
  44. package/payload/platform/plugins/email/mcp/dist/tools/email-reply.d.ts.map +1 -1
  45. package/payload/platform/plugins/email/mcp/dist/tools/email-reply.js +49 -64
  46. package/payload/platform/plugins/email/mcp/dist/tools/email-reply.js.map +1 -1
  47. package/payload/platform/plugins/email/mcp/dist/tools/email-setup.d.ts.map +1 -1
  48. package/payload/platform/plugins/email/mcp/dist/tools/email-setup.js +1 -2
  49. package/payload/platform/plugins/email/mcp/dist/tools/email-setup.js.map +1 -1
  50. package/payload/platform/plugins/memory/.claude-plugin/plugin.json +1 -1
  51. package/payload/platform/plugins/memory/PLUGIN.md +1 -1
  52. package/payload/platform/plugins/memory/bin/conversation-archive-ingest.mjs +12 -13
  53. package/payload/platform/plugins/memory/bin/conversation-archive-ingest.sh +1 -1
  54. package/payload/platform/plugins/memory/mcp/dist/index.js +17 -15
  55. package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
  56. package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/index.d.ts +1 -0
  57. package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/index.d.ts.map +1 -1
  58. package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/index.js +3 -0
  59. package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/index.js.map +1 -1
  60. package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/types.d.ts +1 -1
  61. package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/types.d.ts.map +1 -1
  62. package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/types.js +13 -7
  63. package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/types.js.map +1 -1
  64. package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/x-dm.d.ts +3 -0
  65. package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/x-dm.d.ts.map +1 -0
  66. package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/x-dm.js +101 -0
  67. package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/x-dm.js.map +1 -0
  68. package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/sender-bind.d.ts.map +1 -1
  69. package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/sender-bind.js +2 -1
  70. package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/sender-bind.js.map +1 -1
  71. package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.d.ts +5 -3
  72. package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.d.ts.map +1 -1
  73. package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.js +12 -10
  74. package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.js.map +1 -1
  75. package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-schema.d.ts.map +1 -1
  76. package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-schema.js +7 -4
  77. package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-schema.js.map +1 -1
  78. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights.test.js +3 -3
  79. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights.test.js.map +1 -1
  80. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-emit.test.js +1 -1
  81. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-emit.test.js.map +1 -1
  82. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest.test.js +47 -39
  83. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest.test.js.map +1 -1
  84. package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.d.ts +7 -6
  85. package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.d.ts.map +1 -1
  86. package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.js +12 -11
  87. package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.js.map +1 -1
  88. package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.d.ts +59 -1
  89. package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.d.ts.map +1 -1
  90. package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.js +326 -4
  91. package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.js.map +1 -1
  92. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.d.ts +31 -27
  93. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.d.ts.map +1 -1
  94. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js +72 -49
  95. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js.map +1 -1
  96. package/payload/platform/plugins/memory/references/schema-base.md +5 -6
  97. package/payload/platform/plugins/memory/skills/archive-crawler/SKILL.md +1 -1
  98. package/payload/platform/plugins/memory/skills/conversation-archive/SKILL.md +16 -15
  99. package/payload/platform/plugins/memory/skills/conversation-archive-enrich/SKILL.md +8 -8
  100. package/payload/platform/plugins/memory/skills/document-ingest/SKILL.md +14 -13
  101. package/payload/platform/plugins/notion-import/skills/notion-import/SKILL.md +13 -9
  102. package/payload/platform/plugins/notion-import/skills/notion-import/references/databases.md +11 -9
  103. package/payload/platform/plugins/notion-import/skills/notion-import/references/page-tree.md +12 -12
  104. package/payload/platform/plugins/scheduling/PLUGIN.md +18 -0
  105. package/payload/platform/plugins/scheduling/mcp/dist/index.js +93 -0
  106. package/payload/platform/plugins/scheduling/mcp/dist/index.js.map +1 -1
  107. package/payload/platform/plugins/scheduling/mcp/dist/lib/ics-graph-ingest.d.ts +80 -0
  108. package/payload/platform/plugins/scheduling/mcp/dist/lib/ics-graph-ingest.d.ts.map +1 -0
  109. package/payload/platform/plugins/scheduling/mcp/dist/lib/ics-graph-ingest.js +395 -0
  110. package/payload/platform/plugins/scheduling/mcp/dist/lib/ics-graph-ingest.js.map +1 -0
  111. package/payload/platform/plugins/scheduling/mcp/dist/lib/ics.d.ts +16 -0
  112. package/payload/platform/plugins/scheduling/mcp/dist/lib/ics.d.ts.map +1 -1
  113. package/payload/platform/plugins/scheduling/mcp/dist/lib/ics.js +111 -2
  114. package/payload/platform/plugins/scheduling/mcp/dist/lib/ics.js.map +1 -1
  115. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-archive-ics.d.ts +20 -0
  116. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-archive-ics.d.ts.map +1 -0
  117. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-archive-ics.js +63 -0
  118. package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-archive-ics.js.map +1 -0
  119. package/payload/platform/plugins/scheduling/skills/daily-prep/SKILL.md +2 -2
  120. package/payload/platform/plugins/whatsapp/PLUGIN.md +1 -1
  121. package/payload/platform/plugins/x-import/.claude-plugin/plugin.json +8 -0
  122. package/payload/platform/plugins/x-import/PLUGIN.md +33 -0
  123. package/payload/platform/plugins/x-import/references/archive-shape.md +124 -0
  124. package/payload/platform/plugins/x-import/references/transcript-shape.md +121 -0
  125. package/payload/platform/plugins/x-import/skills/x-import/SKILL.md +123 -0
  126. package/payload/platform/scripts/check-no-conversation-id-leaks.mjs +1 -1
  127. package/payload/platform/templates/specialists/agents/database-operator.md +6 -2
  128. package/payload/platform/templates/specialists/agents/librarian.md +4 -4
  129. package/payload/server/public/assets/{admin-BM9aXUUh.js → admin-_pm0RRTE.js} +1 -1
  130. package/payload/server/public/assets/{data-Ds2ECtfP.js → data-b6q64Ot4.js} +1 -1
  131. package/payload/server/public/assets/{graph-BzxObKMM.js → graph-D1SVlBLb.js} +1 -1
  132. package/payload/server/public/assets/graph-labels-BiDGzVs2.js +1 -0
  133. package/payload/server/public/assets/{page-BlkBsjP2.js → page-BV6E4J2q.js} +1 -1
  134. package/payload/server/public/assets/{page-h_SA5SVQ.js → page-DwFigpyR.js} +1 -1
  135. package/payload/server/public/data.html +3 -3
  136. package/payload/server/public/graph.html +3 -3
  137. package/payload/server/public/index.html +4 -4
  138. package/payload/server/server.js +18 -21
  139. package/payload/server/public/assets/graph-labels-Dwgep_nr.js +0 -1
@@ -98,19 +98,31 @@ function bumpEdge(breakdown, edgeType) {
98
98
  // Main entry point
99
99
  // ---------------------------------------------------------------------------
100
100
  export async function memoryIngest(params) {
101
- const parentLabel = params.parentLabel ?? "KnowledgeDocument";
102
- return withWriteEvent({ tool: "memory-ingest", accountId: params.accountId, labels: [parentLabel], name: params.attachmentId }, () => memoryIngestImpl(params));
101
+ // Exactly one of `attachmentId` or `conversationIdentity` is set; the
102
+ // dispatcher signal is *which one*. Both paths produce `:KnowledgeDocument`
103
+ // parents — the label tag below is uniform.
104
+ if (!params.attachmentId && !params.conversationIdentity) {
105
+ throw new Error("memory-ingest: exactly one of `attachmentId` (document path) or `conversationIdentity` (conversation-document path) must be set");
106
+ }
107
+ if (params.attachmentId && params.conversationIdentity) {
108
+ throw new Error("memory-ingest: `attachmentId` and `conversationIdentity` are mutually exclusive — set exactly one");
109
+ }
110
+ const mergeKey = (params.attachmentId ?? params.conversationIdentity);
111
+ return withWriteEvent({ tool: "memory-ingest", accountId: params.accountId, labels: ["KnowledgeDocument"], name: mergeKey }, () => memoryIngestImpl(params));
103
112
  }
104
113
  async function memoryIngestImpl(params) {
105
- // ConversationArchive branch. Diverges enough from the document
106
- // path (no extract cache, no anchor edges, no related entities, delta-append
114
+ // Conversation-document branch. Diverges enough from the document path
115
+ // (no extract cache, no anchor edges, no related entities, delta-append
107
116
  // semantics) that it has its own end-to-end implementation in
108
- // ingestConversationArchive(). The brief consolidates these as one entry
109
- // (`memoryIngest` with `parentLabel`) so callers see one tool.
110
- if (params.parentLabel === "ConversationArchive") {
111
- return ingestConversationArchive(params);
117
+ // `ingestConversationDocument()`. Both writers produce `:KnowledgeDocument`
118
+ // parents the split is the algorithm, not the label.
119
+ if (params.conversationIdentity) {
120
+ return ingestConversationDocument(params);
112
121
  }
113
- const { accountId, attachmentId, documentSummary, anchorNodeId, anchorLabel, sections, documentEdges = [], orphanCandidates = [], scope, sourceUrl, sourceType, documentKeywords: rawDocKeywords, userKeywords: rawUserKeywords, sessionId, } = params;
122
+ const { accountId, documentSummary, anchorNodeId, anchorLabel, sections, documentEdges = [], orphanCandidates = [], scope, sourceUrl, sourceType, documentKeywords: rawDocKeywords, userKeywords: rawUserKeywords, sessionId, } = params;
123
+ // The dispatcher already verified exactly one of attachmentId /
124
+ // conversationIdentity is set. On this branch attachmentId is the one.
125
+ const attachmentId = params.attachmentId;
114
126
  if (!scope) {
115
127
  throw new Error("scope is required — valid values: 'public', 'shared', 'admin', 'user:{identifier}'");
116
128
  }
@@ -547,25 +559,27 @@ async function writeRelatedNode(opts) {
547
559
  return result.records[0].get("nodeId");
548
560
  }
549
561
  // ---------------------------------------------------------------------------
550
- // ConversationArchive ingest — chat-mode branch.
562
+ // Conversation-document ingest — chat-mode branch.
551
563
  //
552
- // MERGE :ConversationArchive on conversationIdentity → cleanup THIS export's
564
+ // MERGE :KnowledgeDocument on conversationIdentity → cleanup THIS export's
553
565
  // chunks by archiveSha256 (delta discipline: prior exports' chunks survive)
554
566
  // → CREATE new chunks → extend NEXT chain from existing tail → MERGE
555
567
  // :PARTICIPANT_IN edges → update lastIngestedMessageHash + lastIngestedMessageAt.
556
568
  //
557
569
  // No anchor edges, no related entities, no documentEdges, no orphan candidates.
558
- // Sections in this branch are :Section:Conversation chunks; properties pass
559
- // through verbatim (summary, keywords, firstMessageAt, lastMessageAt,
560
- // participantNames, messageCount).
570
+ // Sections in this branch are :Section chunks (no secondary label — source
571
+ // is the parent's discriminator); properties pass through verbatim (summary,
572
+ // keywords, firstMessageAt, lastMessageAt, participantNames, messageCount).
573
+ // Doctrinally, conversations land as :KnowledgeDocument with :Section children
574
+ // just like documents do — the writer's choice of MERGE key + edge set is
575
+ // what distinguishes them, not the parent label.
561
576
  // ---------------------------------------------------------------------------
562
577
  // Source-agnostic provenance. The orchestrator is one bash entry
563
578
  // regardless of source, so the agent stamp is the same across every ingest;
564
579
  // the source format flows into `source` instead.
565
580
  const CHAT_PROVENANCE_AGENT = "conversation-archive";
566
- async function ingestConversationArchive(params) {
567
- const { accountId, attachmentId: conversationIdentity, // semantic rename per parentLabel
568
- documentSummary, sections, scope, documentKeywords: rawDocKeywords, userKeywords: rawUserKeywords, sessionId, archiveSha256, archiveSourceFile, lastIngestedMessageHash, lastIngestedMessageAt, participantElementIds = [], source,
581
+ async function ingestConversationDocument(params) {
582
+ const { accountId, conversationIdentity: rawConversationIdentity, documentSummary, sections, scope, documentKeywords: rawDocKeywords, userKeywords: rawUserKeywords, sessionId, archiveSha256, archiveSourceFile, lastIngestedMessageHash, lastIngestedMessageAt, participantElementIds = [], source,
569
583
  // sub-scope B — default `false` is the non-destructive contract.
570
584
  // The bin previously defaulted this to `true` (cleanup-on-every-
571
585
  // run-by-archiveSha256), which combined with `--session-gap-hours` to
@@ -573,23 +587,25 @@ async function ingestConversationArchive(params) {
573
587
  // `false` means cleanup never fires unless the caller explicitly opts in;
574
588
  // the bin only opts in under `--rebuild` AND on the first session.
575
589
  cleanupPriorChunks = false, archiveTitle, } = params;
590
+ // The dispatcher verified conversationIdentity is set on this branch.
591
+ const conversationIdentity = rawConversationIdentity;
576
592
  if (!scope) {
577
593
  throw new Error("scope is required");
578
594
  }
579
595
  if (!source || !isConversationSource(source)) {
580
- throw new Error(`source is required for parentLabel='ConversationArchive' and must be one of the closed enum (got ${JSON.stringify(source)}).`);
596
+ throw new Error(`source is required on the conversation-document path and must be one of the closed enum (got ${JSON.stringify(source)}).`);
581
597
  }
582
598
  if (!archiveSha256 || !archiveSha256.trim()) {
583
- throw new Error("archiveSha256 is required for parentLabel='ConversationArchive'");
599
+ throw new Error("archiveSha256 is required on the conversation-document path");
584
600
  }
585
601
  if (!archiveSourceFile || !archiveSourceFile.trim()) {
586
- throw new Error("archiveSourceFile is required for parentLabel='ConversationArchive'");
602
+ throw new Error("archiveSourceFile is required on the conversation-document path");
587
603
  }
588
604
  if (!lastIngestedMessageHash || !lastIngestedMessageHash.trim()) {
589
- throw new Error("lastIngestedMessageHash is required for parentLabel='ConversationArchive'");
605
+ throw new Error("lastIngestedMessageHash is required on the conversation-document path");
590
606
  }
591
607
  if (!lastIngestedMessageAt || !lastIngestedMessageAt.trim()) {
592
- throw new Error("lastIngestedMessageAt is required for parentLabel='ConversationArchive'");
608
+ throw new Error("lastIngestedMessageAt is required on the conversation-document path");
593
609
  }
594
610
  const keywords = (() => {
595
611
  const u = (rawUserKeywords ?? []).map((k) => k.toLowerCase().trim()).filter(Boolean);
@@ -599,7 +615,7 @@ async function ingestConversationArchive(params) {
599
615
  return [...new Set([...u, ...d])];
600
616
  })();
601
617
  const t0 = Date.now();
602
- const log = (stage, detail) => console.error(`[memory-ingest] [CA:${conversationIdentity.slice(0, 8)}] ${stage}${detail ? ` — ${detail}` : ""} (${Date.now() - t0}ms)`);
618
+ const log = (stage, detail) => console.error(`[memory-ingest] [CD:${conversationIdentity.slice(0, 8)}] ${stage}${detail ? ` — ${detail}` : ""} (${Date.now() - t0}ms)`);
603
619
  log("start", `${sections.length} chunks, archiveSha256=${archiveSha256.slice(0, 12)}, scope=${scope}`);
604
620
  const now = new Date().toISOString();
605
621
  const dbSession = getSession();
@@ -607,30 +623,31 @@ async function ingestConversationArchive(params) {
607
623
  const kindBreakdown = {};
608
624
  const edgeBreakdown = {};
609
625
  try {
610
- // 1. Trash-revival mirror of the KnowledgeDocument path above.
611
- // `:ConversationArchive` is NOT in graph-trash's UNIQUE_KEYS_BY_LABEL,
612
- // so trashing leaves `conversationIdentity` populated; the lookup is by
613
- // property directly rather than `_trashedKeys CONTAINS`. Without this,
614
- // re-ingesting into a previously-trashed archive (operator manually
615
- // drag-trashed, then re-ran) MERGEs into the trashed node, writes
616
- // chunks under a `:Trashed` parent, and the graph UI hides the whole
617
- // chain the chunks land but are invisible until something else
618
- // clears the label.
619
- const trashedArchive = await dbSession.run(`MATCH (a:ConversationArchive:Trashed)
626
+ // 1. Trash-revival. `:KnowledgeDocument` is in graph-trash's
627
+ // UNIQUE_KEYS_BY_LABEL for both `attachmentId` and
628
+ // `conversationIdentity`, so a trashed conversation-document parent
629
+ // has `conversationIdentity` snapshotted into `_trashedKeys` and
630
+ // nulled on the live property. Look it up via the snapshot — direct
631
+ // property lookup would miss a trashed-then-revived MERGE target.
632
+ // Without this, re-ingesting into a previously-trashed parent
633
+ // (operator manually drag-trashed, then re-ran) MERGEs into a fresh
634
+ // node and leaves the trashed twin behind.
635
+ const trashedArchive = await dbSession.run(`MATCH (a:KnowledgeDocument:Trashed)
620
636
  WHERE a.accountId = $accountId
621
- AND a.conversationIdentity = $conversationIdentity
637
+ AND (a.conversationIdentity = $conversationIdentity
638
+ OR a._trashedKeys CONTAINS $conversationIdentity)
622
639
  RETURN elementId(a) AS eid LIMIT 1`, { accountId, conversationIdentity });
623
640
  if (trashedArchive.records.length > 0) {
624
641
  const eid = trashedArchive.records[0].get("eid");
625
642
  await restoreNode({ session: dbSession, accountId, elementId: eid });
626
- log("revived", `restored trashed ConversationArchive elementId=${eid}`);
643
+ log("revived", `restored trashed conversation-document elementId=${eid}`);
627
644
  }
628
645
  // 2. Embed every chunk body. Summary too (parent embedding).
629
646
  const textsToEmbed = [documentSummary, ...sections.map((s) => s.body)];
630
647
  log("embedding", `${textsToEmbed.length} texts`);
631
648
  const embeddings = await embedBatch(textsToEmbed);
632
649
  const archiveEmbedding = embeddings[0];
633
- // 3. MERGE :ConversationArchive on conversationIdentity. ON CREATE stamps
650
+ // 3. MERGE :KnowledgeDocument on conversationIdentity. ON CREATE stamps
634
651
  // immutable identity props; ON MATCH bumps the cursor + last-ingest
635
652
  // timestamps so the next delta-append run finds the right point.
636
653
  //
@@ -638,8 +655,8 @@ async function ingestConversationArchive(params) {
638
655
  // ON CREATE sets it; ON MATCH uses COALESCE so an existing title is
639
656
  // NEVER overwritten (re-ingests must produce the same title anyway,
640
657
  // but the COALESCE makes the contract explicit). UI prefers `title`
641
- // via display-helpers' :ConversationArchive branch.
642
- const archiveResult = await dbSession.run(`MERGE (a:ConversationArchive { conversationIdentity: $conversationIdentity })
658
+ // via display-helpers' conversation-document branch.
659
+ const archiveResult = await dbSession.run(`MERGE (a:KnowledgeDocument { conversationIdentity: $conversationIdentity })
643
660
  ON CREATE SET a.accountId = $accountId,
644
661
  a.scope = $scope,
645
662
  a.title = $archiveTitle,
@@ -676,7 +693,7 @@ async function ingestConversationArchive(params) {
676
693
  archiveSha256,
677
694
  });
678
695
  if (archiveResult.records[0]?.get("affected")?.toNumber?.() !== 1) {
679
- throw new Error("memory-ingest: ConversationArchive MERGE returned no row — Cypher silent no-op");
696
+ throw new Error("memory-ingest: conversation-document MERGE returned no row — Cypher silent no-op");
680
697
  }
681
698
  archiveNodeId = archiveResult.records[0].get("nodeId");
682
699
  log("archive-merged", `nodeId=${archiveNodeId.slice(0, 12)}`);
@@ -688,8 +705,8 @@ async function ingestConversationArchive(params) {
688
705
  // (matching conversationIdentity + matching archiveSha256).
689
706
  let cleanedPriorChunks = 0;
690
707
  if (cleanupPriorChunks) {
691
- const cleanup = await dbSession.run(`MATCH (a:ConversationArchive { conversationIdentity: $conversationIdentity })
692
- -[hs:HAS_SECTION]->(c:Section:Conversation { archiveSha256: $archiveSha256 })
708
+ const cleanup = await dbSession.run(`MATCH (a:KnowledgeDocument { conversationIdentity: $conversationIdentity })
709
+ -[hs:HAS_SECTION]->(c:Section { archiveSha256: $archiveSha256 })
693
710
  DETACH DELETE c
694
711
  RETURN count(c) AS removed`, { conversationIdentity, archiveSha256 });
695
712
  cleanedPriorChunks = cleanup.records[0]?.get("removed")?.toNumber?.() ?? 0;
@@ -702,9 +719,14 @@ async function ingestConversationArchive(params) {
702
719
  }
703
720
  // 5. Find existing tail of NEXT chain (if any). Delta-append wires the
704
721
  // new first chunk after this tail; first-ever ingest finds nothing.
705
- const tailResult = await dbSession.run(`MATCH (a:ConversationArchive { conversationIdentity: $conversationIdentity })
706
- -[:HAS_SECTION]->(c:Section:Conversation)
707
- WHERE NOT (c)-[:NEXT]->(:Section:Conversation)
722
+ // Restrict the NEXT chain match to this conversation-document's
723
+ // sections by going through HAS_SECTION rather than by section label;
724
+ // a plain `:Section` would also match document-path siblings.
725
+ const tailResult = await dbSession.run(`MATCH (a:KnowledgeDocument { conversationIdentity: $conversationIdentity })
726
+ -[:HAS_SECTION]->(c:Section)
727
+ WHERE NOT EXISTS {
728
+ MATCH (c)-[:NEXT]->(:Section)<-[:HAS_SECTION]-(a)
729
+ }
708
730
  RETURN elementId(c) AS tailId LIMIT 1`, { conversationIdentity });
709
731
  let previousChunkId = tailResult.records[0]?.get("tailId") ?? null;
710
732
  if (previousChunkId) {
@@ -734,10 +756,10 @@ async function ingestConversationArchive(params) {
734
756
  archiveSourceFile,
735
757
  };
736
758
  const chunkProps = { ...section.properties, ...baseProps };
737
- const r = await dbSession.run(`CREATE (c:Section:Conversation)
759
+ const r = await dbSession.run(`CREATE (c:Section)
738
760
  SET c = $props
739
761
  WITH c
740
- MATCH (a:ConversationArchive { conversationIdentity: $conversationIdentity })
762
+ MATCH (a:KnowledgeDocument { conversationIdentity: $conversationIdentity })
741
763
  CREATE (a)-[hs:HAS_SECTION]->(c)
742
764
  SET hs.createdByAgent = $createdByAgent,
743
765
  hs.createdBySession = $createdBySession,
@@ -758,7 +780,7 @@ async function ingestConversationArchive(params) {
758
780
  bumpKind(kindBreakdown, "Conversation");
759
781
  bumpEdge(edgeBreakdown, "HAS_SECTION");
760
782
  if (previousChunkId) {
761
- const nextRes = await dbSession.run(`MATCH (prev:Section:Conversation), (cur:Section:Conversation)
783
+ const nextRes = await dbSession.run(`MATCH (prev:Section), (cur:Section)
762
784
  WHERE elementId(prev) = $prev AND elementId(cur) = $cur
763
785
  CREATE (prev)-[n:NEXT]->(cur)
764
786
  SET n.createdByAgent = $createdByAgent,
@@ -784,10 +806,11 @@ async function ingestConversationArchive(params) {
784
806
  previousChunkId = chunkId;
785
807
  }
786
808
  // 7. MERGE :PARTICIPANT_IN edges from each operator-confirmed participant
787
- // to the archive. Idempotent — re-runs are no-ops on the edge set.
809
+ // to the conversation-document parent. Idempotent — re-runs are no-ops
810
+ // on the edge set.
788
811
  let participantEdgesMerged = 0;
789
812
  for (const elemId of participantElementIds) {
790
- const pres = await dbSession.run(`MATCH (a:ConversationArchive { conversationIdentity: $conversationIdentity })
813
+ const pres = await dbSession.run(`MATCH (a:KnowledgeDocument { conversationIdentity: $conversationIdentity })
791
814
  MATCH (p) WHERE elementId(p) = $elemId AND (p:Person OR p:AdminUser)
792
815
  MERGE (p)-[r:PARTICIPANT_IN]->(a)
793
816
  ON CREATE SET r.createdByAgent = $createdByAgent,
@@ -1 +1 @@
1
- {"version":3,"file":"mem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M,SAAS,CAAC,GAAG,CAC9B;;;;;;;mCAO2B,EAC3B;gBACE,oBAAoB;gBACpB,MAAM;gBACN,cAAc,EAAE,qBAAqB;gBACrC,gBAAgB,EAAE,SAAS,IAAI,EAAE;gBACjC,MAAM,EAAE,MAAM;gBACd,SAAS,EAAE,GAAG;aACf,CACF,CAAC;YACF,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC;YACjE,IAAI,MAAM,KAAK,CAAC,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CACb,qDAAqD,MAAM,qEAAqE,CACjI,CAAC;YACJ,CAAC;YACD,sBAAsB,EAAE,CAAC;YACzB,QAAQ,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;QAC5C,CAAC;QAED,GAAG,CACD,YAAY,EACZ,WAAW,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,aAAa,eAAe,gBAAgB,iBAAiB,sBAAsB,EAAE,CACtI,CAAC;QAEF,OAAO;YACL,cAAc,EAAE,aAAa;YAC7B,YAAY,EAAE,aAAa;YAC3B,aAAa;YACb,aAAa;YACb,YAAY,EAAE,CAAC;YACf,eAAe,EAAE,CAAC;YAClB,gBAAgB,EAAE,EAAE;YACpB,eAAe;YACf,QAAQ;YACR,kBAAkB;SACnB,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;QACxB,GAAG,CAAC,UAAU,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -39,8 +39,7 @@ When loading this reference, confirm which schema files were consulted by noting
39
39
  | Position | `Position` | platform-native (analogue of `schema:OrganizationRole`) | — | `accountId`, `title`, `startDate` |
40
40
  | WhatsApp Conversation (legacy) | `WhatsAppConversation` | extends `schema:Conversation` | — | `accountId`, `conversationId`, `archiveSourceFile`, `firstMessageAt`, `lastMessageAt`, `participantCount`, `messageCount`, `scope`, `createdByAgent`, `createdBySession`, `createdAt` |
41
41
  | WhatsApp Message (legacy) | `WhatsAppMessage` | extends `schema:Message` | — | `accountId`, `conversationId`, `messageId`, `dateSent`, `body`, `senderName`, `sequenceIndex`, `scope`, `createdByAgent`, `createdBySession`, `createdAt` |
42
- | ConversationArchive | `ConversationArchive` | platform-native (chunked conversation archive parent) | | `accountId`, `conversationIdentity`, `archiveSourceFile`, `summary`, `keywords`, `lastIngestedMessageHash`, `lastIngestedMessageAt`, `lastIngestedArchiveSha256`, `scope`, `createdByAgent`, `createdBySession`, `createdAt` |
43
- | Email | `Email` | extends `schema:Message` | RFC 5322 | `accountId`, `messageId`, `dateSent`, `sender`, `recipient`, `subject`, `body`, `authorshipMode` |
42
+ | Email thread | `KnowledgeDocument {source:'email'}` | Per-thread document (Task 321 retired the `:Email` label) | RFC 5322 | `accountId`, `attachmentId`, `subject`, `body` (chronological transcript), `messageIds` (array), `messages` (JSON-serialized per-message envelopes), `firstReceivedAt`, `lastReceivedAt`, `direction`, `authorshipMode` |
44
43
  | SocialPost | `SocialPost` | `schema:SocialMediaPosting` | — | `accountId`, `platform` (linkedin/twitter/instagram/…), `body`, `datePublished`, `authorshipMode` |
45
44
  | VoiceProfile | `VoiceProfile` | platform-native (Task 356 — authorial-voice style card) | — | `accountId`, `adminUserId`, `styleCard`, `generatedAt`, `corpusSize`, `feedbackEntries` |
46
45
  | VoiceEdit | `VoiceEdit` | platform-native (Task 356 — operator edit on an agent draft) | — | `accountId`, `adminUserId`, `originalText`, `editedText`, `intent`, `occurredAt` |
@@ -62,9 +61,9 @@ When loading this reference, confirm which schema files were consulted by noting
62
61
 
63
62
  **Position** carries a single role held by a `UserProfile` at an `Organization` — its title, dates, and per-role properties (e.g. achievement bullets in `description`, `endDate` for a finished role). Each role is its own node so it can carry its own structure; multiple Positions per UserProfile (career history); one Organization may host many Positions across many UserProfiles. Written by the `document-ingest` skill when a CV section classifies as `Position`. The natural pattern is `(:UserProfile)-[:HAS_POSITION]->(:Position)-[:AT]->(:Organization)` — never set the employer name as a property on Position; always create the AT edge to the (MERGEd) Organization.
64
63
 
65
- **`authorshipMode` on content labels (Task 356).** Every `:KnowledgeDocument`, `:Email`, `:Message`, `:SocialPost`, and `:Section:Conversation` write carries an `authorshipMode` enum drawn from `human-only | human-led-agent-assisted | agent-led-human-reviewed | agent-only | unknown`. The value records who actually wrote the content body, not who triggered the write. `human-only` means every word of the body came from the operator; `human-led-agent-assisted` is operator-authored with light agent polish (the operator chose every claim and structure); `agent-led-human-reviewed` is agent-drafted then operator-edited before send; `agent-only` is pure agent output the operator did not touch. The voice-mirror distillation walks the corpus where `authorshipMode IN ['human-only', 'human-led-agent-assisted']` — both modes carry voice signal. `:Section:Conversation` chat-archive chunks (WhatsApp / Telegram / Signal exports ingested under `:ConversationArchive`-[:HAS_SECTION]->`) are first-class voice corpus and the highest-leverage signal source because chat captures the unguarded voice in a way email rarely does. Legacy nodes default to `unknown` until reclassified via the voice-mirror backfill flow. The per-label authorshipMode index makes the distillation walk filter cheap; the `:Section` index covers `:Section:Conversation` via the base label. Writers that cannot determine the mode (e.g. bulk archive imports) write `unknown` rather than guessing.
64
+ **`authorshipMode` on content labels (Task 356).** Every `:KnowledgeDocument` (including email-source threads), `:Message`, `:SocialPost`, and conversation-document `:Section` write carries an `authorshipMode` enum drawn from `human-only | human-led-agent-assisted | agent-led-human-reviewed | agent-only | unknown`. The value records who actually wrote the content body, not who triggered the write. `human-only` means every word of the body came from the operator; `human-led-agent-assisted` is operator-authored with light agent polish (the operator chose every claim and structure); `agent-led-human-reviewed` is agent-drafted then operator-edited before send; `agent-only` is pure agent output the operator did not touch. The voice-mirror distillation walks the corpus where `authorshipMode IN ['human-only', 'human-led-agent-assisted']` — both modes carry voice signal. Conversation-document `:Section` chunks (WhatsApp / Telegram / Signal / Granola / Otter / Circleback exports ingested under `:KnowledgeDocument`-[:HAS_SECTION]->`, where the parent carries `conversationIdentity`) are first-class voice corpus and the highest-leverage signal source because chat captures the unguarded voice in a way email rarely does. Legacy nodes default to `unknown` until reclassified via the voice-mirror backfill flow. The per-label authorshipMode index on `:Section` covers conversation-document chunks without a secondary label. Writers that cannot determine the mode (e.g. bulk archive imports) write `unknown` rather than guessing.
66
65
 
67
- **Voice profile pattern (Task 356).** `(:AdminUser)-[:HAS_VOICE_PROFILE]->(:VoiceProfile)`. The styleCard is YAML serialized to a string property containing sentence-length distribution, register, favoured/avoided constructions and words, taboos, opening/closing patterns, and exemplar sentences. `(:VoiceProfile)-[:LEARNED_FROM]->(:KnowledgeDocument|:Email|:Message|:SocialPost|:Section)` links the profile to every node in its source corpus so the operator can audit what drove the distillation. Each operator edit on an agent draft becomes `(:VoiceEdit)-[:FEEDBACK_FOR]->(:VoiceProfile)` with the original/edited bodies plus a Haiku-summarised `intent` so the next distillation knows what to adjust.
66
+ **Voice profile pattern (Task 356).** `(:AdminUser)-[:HAS_VOICE_PROFILE]->(:VoiceProfile)`. The styleCard is YAML serialized to a string property containing sentence-length distribution, register, favoured/avoided constructions and words, taboos, opening/closing patterns, and exemplar sentences. `(:VoiceProfile)-[:LEARNED_FROM]->(:KnowledgeDocument|:Message|:SocialPost|:Section)` links the profile to every node in its source corpus so the operator can audit what drove the distillation. Each operator edit on an agent draft becomes `(:VoiceEdit)-[:FEEDBACK_FOR]->(:VoiceProfile)` with the original/edited bodies plus a Haiku-summarised `intent` so the next distillation knows what to adjust.
68
67
 
69
68
  **Idea** is a forward-only write surface for original-thinking candidates extracted from admin-side conversations by the `signal-detector` specialist (dispatched only by the admin agent's Stop hook). `body` is the verbatim operator statement; `conversationId` denormalises the source conversation; `scope` is always `"admin"`. Never written by any other path. No dedup or clustering at write time — let the brain accumulate first.
70
69
 
@@ -189,7 +188,7 @@ Do not write placeholder values ("TBD", "unknown", empty strings) for properties
189
188
  (:KnowledgeDocument)-[:REFERENCES]->(:*)
190
189
  (:KnowledgeDocument)-[:HAS_SECTION]->(:Section)
191
190
  (:AdminUser)-[:HAS_VOICE_PROFILE]->(:VoiceProfile)
192
- (:VoiceProfile)-[:LEARNED_FROM]->(:KnowledgeDocument|:Email|:Message|:SocialPost|:Section)
191
+ (:VoiceProfile)-[:LEARNED_FROM]->(:KnowledgeDocument|:Message|:SocialPost|:Section)
193
192
  (:VoiceEdit)-[:FEEDBACK_FOR]->(:VoiceProfile)
194
193
  (:KnowledgeDocument)-[:HAS_AEO_AUDIT]->(:AEOAudit)
195
194
  (:Message)-[:PART_OF]->(:Conversation)
@@ -231,7 +230,7 @@ The closed enumeration:
231
230
 
232
231
  `Preface`, `Abstract` (alias for Summary / ExecutiveSummary), `Introduction`, `TableOfContents`, `Chapter`, `Conclusion`, `Appendix`, `Bibliography` (alias for References), `Glossary`, `Acknowledgments` — each becomes `:Section:<Kind>` linked to the document via `(:KnowledgeDocument)-[:HAS_SECTION]->` and chained to siblings via `(:Section)-[:NEXT]->(:Section)` in reading order.
233
232
 
234
- `Conversation` — chat-mode chunks emitted by `memory-classify` with `mode='chat'`. Becomes `:Section:Conversation` linked via `(:ConversationArchive)-[:HAS_SECTION]->` (a different parent than KnowledgeDocument). Properties beyond the base section shape: `summary`, `keywords`, `firstMessageAt`, `lastMessageAt`, `participantNames`, `messageCount`, `archiveSha256`. The `:Section` validator rules (embedding, body, position) apply uniformly.
233
+ `Conversation` — chat-mode chunks emitted by `memory-classify` with `mode='chat'`. Becomes `:Section` linked via `(:KnowledgeDocument)-[:HAS_SECTION]->` exactly as document-mode sections are. The parent `:KnowledgeDocument` is distinguished by carrying `conversationIdentity` (and `source`) rather than `attachmentId`; readers that need conversation-vs-document filtering query that property at the parent. Properties beyond the base section shape: `summary`, `keywords`, `firstMessageAt`, `lastMessageAt`, `participantNames`, `messageCount`, `archiveSha256`. The `:Section` validator rules (embedding, body, position) apply uniformly.
235
234
 
236
235
  **Contract-clause kinds (HAS_SECTION + NEXT, plus special-case extras for two kinds):**
237
236
 
@@ -7,7 +7,7 @@ description: "Walks a folder of files the owner has accumulated over time (Downl
7
7
 
8
8
  This skill imports volume in a controlled way. It walks a folder, classifies each file, asks the owner to filter, and routes only the approved set through the existing ingest skills. It does not invent a new write path; it sits in front of `document-ingest` and `conversation-archive` and gates them.
9
9
 
10
- **Default parent.** This skill performs no graph writes itself. The downstream ingest skill it dispatches to (`document-ingest`, `conversation-archive`, or a per-source archive importer) is responsible for naming the parent in the canonical hierarchy `LocalBusiness → Project → KnowledgeDocument | ConversationArchive`. The operator's filter selection answers the parent question implicitly — "scan my Downloads for pricing notes" names the topical scope that the downstream skill resolves into a `:Project` anchor before any write.
10
+ **Default parent.** This skill performs no graph writes itself. The downstream ingest skill it dispatches to (`document-ingest`, `conversation-archive`, or a per-source archive importer) is responsible for naming the parent in the canonical hierarchy `LocalBusiness → Project → KnowledgeDocument`. The operator's filter selection answers the parent question implicitly — "scan my Downloads for pricing notes" names the topical scope that the downstream skill resolves into a `:Project` anchor before any write.
11
11
 
12
12
  ## When to run
13
13
 
@@ -1,19 +1,19 @@
1
1
  ---
2
2
  name: conversation-archive
3
- description: Source-agnostic ingest for conversation transcripts. One skill for WhatsApp `_chat.txt`, Telegram, Signal, LinkedIn DMs, Zoom transcript, meeting minutes, iMessage, Slack, and any future source — `source` is a property on `:ConversationArchive`, never a separate skill or plugin. Confirms the owner + every distinct sender against existing `:AdminUser` / `:Person` nodes (no auto-creation), then invokes the deterministic Bash entry `conversation-archive-ingest.sh` with `--source <enum>`. The script normalises the source (per-source pluggable function), sessionizes at gap-hours boundaries, classifies each session via Haiku (mode='chat') into `:Section:Conversation` chunks with summary + topic keywords, and writes them under a parent `:ConversationArchive` MERGEd on `conversationIdentity = sha256(accountId + ":" + sortedParticipantElementIds)`. Re-imports are delta-append: prior chunks are never touched; only messages after `lastIngestedMessageHash` flow through the pipeline. Triggers when the operator drops any conversation export (file or directory) into chat.
3
+ description: Source-agnostic ingest for conversation transcripts. One skill for WhatsApp `_chat.txt`, Telegram, Signal, LinkedIn DMs, Zoom transcript, meeting minutes, iMessage, Slack, and any future source — `source` is a property on `:KnowledgeDocument`, never a separate skill or plugin. Confirms the owner + every distinct sender against existing `:AdminUser` / `:Person` nodes (no auto-creation), then invokes the deterministic Bash entry `conversation-archive-ingest.sh` with `--source <enum>`. The script normalises the source (per-source pluggable function), sessionizes at gap-hours boundaries, classifies each session via Haiku (mode='chat') into `:Section` chunks with summary + topic keywords, and writes them under a parent `:KnowledgeDocument` MERGEd on `conversationIdentity = sha256(accountId + ":" + sortedParticipantElementIds)`. Re-imports are delta-append: prior chunks are never touched; only messages after `lastIngestedMessageHash` flow through the pipeline. Triggers when the operator drops any conversation export (file or directory) into chat.
4
4
  ---
5
5
 
6
6
  # Conversation Archive — source-agnostic transcript ingestion
7
7
 
8
8
  **Invoked from `specialists:librarian`** — the admin agent dispatches the librarian when the operator drops a conversation transcript; the librarian loads this skill.
9
9
 
10
- **Default parent.** Every `:ConversationArchive` is anchored to the operator-confirmed owner (`:AdminUser` for the account owner, `:Person` for a third-party archive). The owner's elementId is supplied to the bash entry as `--owner-element-id` and becomes the containment parent for the archive node. Per-session `:Section:Conversation` chunks attach to the archive via `:PART_OF`. Participant cross-edges from the archive to each distinct sender (`:Person` / `:AdminUser`) are added alongside the containment edge — they describe the conversation, they do not substitute for the parent.
10
+ **Default parent.** Every `:KnowledgeDocument` is anchored to the operator-confirmed owner (`:AdminUser` for the account owner, `:Person` for a third-party archive). The owner's elementId is supplied to the bash entry as `--owner-element-id` and becomes the containment parent for the archive node. Per-session `:Section` chunks attach to the archive via `:PART_OF`. Participant cross-edges from the archive to each distinct sender (`:Person` / `:AdminUser`) are added alongside the containment edge — they describe the conversation, they do not substitute for the parent.
11
11
 
12
12
  One skill, one bash entry, one writer. The pipeline is identical for every conversation source. The only source-specific code is the per-source normaliser (a pluggable function under [`platform/plugins/memory/mcp/src/lib/conversation-normalisers/`](../../mcp/src/lib/conversation-normalisers/)). New sources = a new normaliser file + an enum entry, never a new skill.
13
13
 
14
14
  ## Confirmed sources (Phase 0)
15
15
 
16
- `whatsapp` ships today (relocated grammar from the retired `whatsapp-import` plugin). Other sources land as needed:
16
+ `whatsapp` ships today (relocated grammar from the retired `whatsapp-import` plugin). `x-dm` ships alongside the `x-import` plugin (Task 323) — driven by the x-import skill, one invocation per dmConversation slice. Other sources land as needed:
17
17
  - `telegram` — Telegram JSON export
18
18
  - `signal` — Signal text export
19
19
  - `linkedin-messages` — LinkedIn DM thread export (LinkedIn *connections* stay flat-dataset; only DMs route here)
@@ -21,6 +21,7 @@ One skill, one bash entry, one writer. The pipeline is identical for every conve
21
21
  - `meeting-minutes` — operator-supplied meeting notes
22
22
  - `imessage` — iMessage backup export
23
23
  - `slack` — Slack channel export
24
+ - `x-dm` — X (Twitter) Direct Messages, dispatched by the `x-import` skill from `data/direct-messages.js` / `data/direct-messages-group.js` — one bash invocation per dmConversation slice; senders carry numeric X senderIds resolved to `:Person` / `:AdminUser` upstream in the x-import skill
24
25
 
25
26
  Until a normaliser ships, the bash entry loud-fails with the implemented set listed in the error.
26
27
 
@@ -76,7 +77,7 @@ Optional flags:
76
77
 
77
78
  Sessions split deterministically at 8h gap (fixed code constant). The legacy `--session-gap-hours` flag is removed: chunked chat-mode classify absorbs oversize sessions internally so the gap value is no longer an operational lever. Passing the legacy flag FAILs at `phase=argv`.
78
79
 
79
- `--rebuild` (operator-issued only; never agent-autonomous — see Doctrine below): treats the run as first-ingest, deletes prior `:Section:Conversation` chunks for THIS export's `archiveSha256`, and re-classifies the entire archive. The skipped-cursor-lookup means a `--rebuild` and a fresh-export-with-different-bytes are operationally equivalent — one is destructive on identifiable bytes, the other is additive.
80
+ `--rebuild` (operator-issued only; never agent-autonomous — see Doctrine below): treats the run as first-ingest, deletes prior `:Section` chunks for THIS export's `archiveSha256`, and re-classifies the entire archive. The skipped-cursor-lookup means a `--rebuild` and a fresh-export-with-different-bytes are operationally equivalent — one is destructive on identifiable bytes, the other is additive.
80
81
 
81
82
  ### Heartbeat protocol
82
83
 
@@ -126,11 +127,11 @@ Forbidden: blind-reissue without reading the progress file first.
126
127
  - Picks the normaliser for `--source`. WhatsApp: locates `_chat.txt` (zip / dir / direct file), parses deterministically, computes `archiveSha256`. Other sources interpret the path according to their own format.
127
128
  - Validates every distinct parsed senderName against the closed set of `{owner, participants...}` candidate names. Any miss LOUD-FAILs `parser-miss reason="senderName=<verbatim> not in confirmed participant set ..."`.
128
129
  - Computes `conversationIdentity` from accountId + sorted participant elementIds.
129
- - **Without `--rebuild`** (default): looks up any prior `:ConversationArchive` carrying that identity → reads `lastIngestedMessageHash`. If found, slices parsed lines after the cursor (delta-append). Cursor not found → `FAIL delta-cursor-missing`. Cursor at last line → empty-delta noop (exit 0, no writes; existing chunk count surfaced in JSON summary). **With `--rebuild`**: skips the prior-cursor lookup entirely; every line is treated as first-ingest delta; the first session's `memory-ingest` deletes prior chunks for THIS `archiveSha256` and the new cursor overwrites the stale one in the same MERGE.
130
+ - **Without `--rebuild`** (default): looks up any prior `:KnowledgeDocument` carrying that identity → reads `lastIngestedMessageHash`. If found, slices parsed lines after the cursor (delta-append). Cursor not found → `FAIL delta-cursor-missing`. Cursor at last line → empty-delta noop (exit 0, no writes; existing chunk count surfaced in JSON summary). **With `--rebuild`**: skips the prior-cursor lookup entirely; every line is treated as first-ingest delta; the first session's `memory-ingest` deletes prior chunks for THIS `archiveSha256` and the new cursor overwrites the stale one in the same MERGE.
130
131
  - Sessionizes the delta lines at the fixed 8h gap (code constant, no flag).
131
132
  - Computes the stable archive `title` once: `<source> · <owner> ↔ <others> · <YYYY-MM-DD>→<YYYY-MM-DD>`.
132
- - For each session: renders as turn-attributed text (`[ts] Sender: body\n…`) and calls `memory-classify` with `mode='chat'`. Oversize sessions dispatch to the chunked-chat path internally — sessionize size is no longer an operator concern. Returns one or more `:Section:Conversation` chunk specs.
133
- - **Per-session checkpoint:** immediately after each successful classify, calls `memory-ingest` for THAT session's chunks AND advances `lastIngestedMessageHash` / `lastIngestedMessageAt` on the parent `:ConversationArchive` to the last message of that session — atomic (chunk writes + cursor advance happen inside one Cypher transaction). A kill mid-loop leaves the cursor at session N-1's last message; re-issuing with the same argv and `--session-id` resumes from session N onward without re-classifying prior sessions.
133
+ - For each session: renders as turn-attributed text (`[ts] Sender: body\n…`) and calls `memory-classify` with `mode='chat'`. Oversize sessions dispatch to the chunked-chat path internally — sessionize size is no longer an operator concern. Returns one or more `:Section` chunk specs.
134
+ - **Per-session checkpoint:** immediately after each successful classify, calls `memory-ingest` for THAT session's chunks AND advances `lastIngestedMessageHash` / `lastIngestedMessageAt` on the parent `:KnowledgeDocument` to the last message of that session — atomic (chunk writes + cursor advance happen inside one Cypher transaction). A kill mid-loop leaves the cursor at session N-1's last message; re-issuing with the same argv and `--session-id` resumes from session N onward without re-classifying prior sessions.
134
135
  - Server MERGEs the parent on `conversationIdentity` (writing `title` ON CREATE and COALESCE-on-MATCH so a stable title is never overwritten), MERGEs `:PARTICIPANT_IN` edges, CREATEs new chunks, extends the `:NEXT` chain from its tail. The cleanup-by-`archiveSha256` step runs ONLY when `--rebuild` is set AND only on the FIRST per-session call of a run. Every node and edge stamps `source=<enum>` and `createdByAgent='conversation-archive'`.
135
136
 
136
137
  NO insight pass runs. Phase 2 (operator-driven `:Observation` / `:Task` / `:Preference` derivation against chunks) is its own follow-up task — and applies uniformly to every source once chunks exist.
@@ -141,7 +142,7 @@ After the script succeeds, formulate the three operator-facing messages from the
141
142
 
142
143
  1. **Parse summary.** `Parsed <archiveSourceFile> (source=<enum>): <parsed> messages across <sessions> sessions, date range <dateRange.first> → <dateRange.last>. Participants: <senderHistogram[i].name (count), …>.`
143
144
  2. **Classify summary.** `Classified into <chunks> chunks, covering: <topicKeywords[0], topicKeywords[1], …>.`
144
- 3. **Write summary.** `Created :ConversationArchive <archiveElementId> with <chunks> :Section:Conversation chunks (NEXT chain length <chunks - 1>). Participants linked via :PARTICIPANT_IN: <participantsLinked>.`
145
+ 3. **Write summary.** `Created :KnowledgeDocument <archiveElementId> with <chunks> :Section chunks (NEXT chain length <chunks - 1>). Participants linked via :PARTICIPANT_IN: <participantsLinked>.`
145
146
 
146
147
  For an empty-delta re-import (`delta.kind === "empty-delta"`): emit only message 1 + a noop line `noop reason="no new messages since <priorLastIngestedMessageAt>"`.
147
148
 
@@ -180,7 +181,7 @@ For an empty-delta re-import (`delta.kind === "empty-delta"`): emit only message
180
181
  - **Re-running the same export bytes is a no-op by default.** The bin reports the existing chunk count and exits 0; cursor and chunks are unchanged. An earlier contract that ran cleanup-by-`archiveSha256` on every same-bytes re-run was the destructive primitive that combined with `--session-gap-hours` to silently destroy 138 chunks (Adam Mackay incident, 2026-05-04) — that path is closed.
181
182
  - **Re-running with appended messages** (a fresh export from the same chat with new messages at the tail): cursor lookup finds the prior `lastIngestedMessageHash`, slices new messages, sessionizes only those, and appends new chunks at the tail of the existing `:NEXT` chain. Pre-existing chunks are never touched.
182
183
  - **Destructive rebuild** requires the explicit `--rebuild` flag — and only the operator may pass it (see Doctrine below). With `--rebuild`, the bin treats the run as first-ingest, the FIRST session's writer cleans prior chunks for the matching `archiveSha256`, the cursor is overwritten by that session's MERGE, and the heartbeat surfaces a WARN line so the destructive action is operator-visible.
183
- - **Re-ingesting into a previously-trashed archive** revives the parent before MERGE. If the operator drag-trashed a `:ConversationArchive` and then re-runs ingest (delta or `--rebuild`), `memory-ingest`'s `ingestConversationArchive` strips `:Trashed` from the matching `conversationIdentity` so the MERGE binds to a non-trashed parent — otherwise the chunks would land under a `:Trashed` parent the graph UI hides, making the entire archive (and every freshly-written chunk under it) invisible until something else clears the label. Mirrors the KnowledgeDocument trash-revival path.
184
+ - **Re-ingesting into a previously-trashed archive** revives the parent before MERGE. If the operator drag-trashed a conversation-document `:KnowledgeDocument` and then re-runs ingest (delta or `--rebuild`), `memory-ingest`'s `ingestConversationDocument` strips `:Trashed` from the matching `conversationIdentity` so the MERGE binds to a non-trashed parent — otherwise the chunks would land under a `:Trashed` parent the graph UI hides, making the entire archive (and every freshly-written chunk under it) invisible until something else clears the label. Same revival shape as the document-path KnowledgeDocument.
184
185
 
185
186
  ## Doctrine
186
187
 
@@ -191,16 +192,16 @@ For an empty-delta re-import (`delta.kind === "empty-delta"`): emit only message
191
192
 
192
193
  Run via `mcp__graph__maxy-graph-read_neo4j_cypher`:
193
194
 
194
- - `MATCH (a:ConversationArchive { conversationIdentity: $cid }) RETURN elementId(a), a.source, a.lastIngestedMessageAt, a.lastIngestedMessageHash` — `source` matches `--source`; counters agree with the JSON summary.
195
- - `MATCH (a:ConversationArchive { conversationIdentity: $cid })-[:HAS_SECTION]->(c:Section:Conversation) RETURN count(c)` — equals `chunks`.
196
- - `MATCH (a:ConversationArchive { source: $source }) RETURN count(a)` — uses the `(accountId, source)` index.
197
- - `MATCH (p)-[:PARTICIPANT_IN]->(:ConversationArchive { conversationIdentity: $cid }) RETURN count(p)` — equals `participantsLinked` after a first-ingest.
198
- - Phase 1 wrote ZERO observations: `MATCH (o:Observation)-[:OBSERVED_IN]->(:ConversationArchive { conversationIdentity: $cid }) RETURN count(o)` — should be 0 today (Phase 2 deferred).
195
+ - `MATCH (a:KnowledgeDocument { conversationIdentity: $cid }) RETURN elementId(a), a.source, a.lastIngestedMessageAt, a.lastIngestedMessageHash` — `source` matches `--source`; counters agree with the JSON summary.
196
+ - `MATCH (a:KnowledgeDocument { conversationIdentity: $cid })-[:HAS_SECTION]->(c:Section) RETURN count(c)` — equals `chunks`.
197
+ - `MATCH (a:KnowledgeDocument { source: $source }) RETURN count(a)` — uses the `(accountId, source)` index.
198
+ - `MATCH (p)-[:PARTICIPANT_IN]->(:KnowledgeDocument { conversationIdentity: $cid }) RETURN count(p)` — equals `participantsLinked` after a first-ingest.
199
+ - Phase 1 wrote ZERO observations: `MATCH (o:Observation)-[:OBSERVED_IN]->(:KnowledgeDocument { conversationIdentity: $cid }) RETURN count(o)` — should be 0 today (Phase 2 deferred).
199
200
 
200
201
  ## What this is not
201
202
 
202
203
  - **Not** the live `whatsapp` plugin. That plugin (Baileys QR pairing) holds messages in an in-memory store cleared on restart. This skill imports historical exports into Neo4j as persistent graph nodes.
203
204
  - **Not** a media-transcription pipeline. Voice notes, photos, PDFs are skipped at parse with a counter logged.
204
205
  - **Not** an insight-extraction pass. Phase 2 (`:Observation` / `:Task` / `:Preference` / `:MENTIONS` derivation, anchored to chunks) ships in its own task and applies uniformly to every source.
205
- - **Not** an archive-wide importer. Flat datasets (LinkedIn connections, CRM exports) are first-class entities + natural edges, not `:ConversationArchive` — `feedback_archives_are_not_documents.md` stands.
206
+ - **Not** an archive-wide importer. Flat datasets (LinkedIn connections, CRM exports) are first-class entities + natural edges, not `:KnowledgeDocument` — `feedback_archives_are_not_documents.md` stands.
206
207
  - **Not** automatic. The owner + all-participants confirmation gate is mandatory before any line is written.