@rubytech/create-maxy-code 0.1.148 → 0.1.151

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 (84) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/lib/graph-style/dist/index.d.ts +5 -5
  3. package/payload/platform/lib/graph-style/dist/index.d.ts.map +1 -1
  4. package/payload/platform/lib/graph-style/dist/index.js +11 -9
  5. package/payload/platform/lib/graph-style/dist/index.js.map +1 -1
  6. package/payload/platform/lib/graph-style/src/index.ts +11 -9
  7. package/payload/platform/lib/graph-trash/dist/index.js +6 -6
  8. package/payload/platform/lib/graph-trash/dist/index.js.map +1 -1
  9. package/payload/platform/lib/graph-trash/src/index.ts +6 -6
  10. package/payload/platform/neo4j/edge-annotations.json +4 -4
  11. package/payload/platform/neo4j/schema.cypher +107 -46
  12. package/payload/platform/plugins/admin/PLUGIN.md +1 -1
  13. package/payload/platform/plugins/admin/hooks/__tests__/{post-turn-graph-pass.test.sh → pre-turn-graph-pass.test.sh} +184 -112
  14. package/payload/platform/plugins/admin/hooks/archive-ingest-surface-gate.sh +2 -2
  15. package/payload/platform/plugins/admin/hooks/{post-turn-graph-pass.sh → pre-turn-graph-pass.sh} +83 -53
  16. package/payload/platform/plugins/docs/references/linkedin-extension.md +1 -1
  17. package/payload/platform/plugins/docs/references/platform.md +1 -1
  18. package/payload/platform/plugins/docs/references/plugins-guide.md +2 -2
  19. package/payload/platform/plugins/linkedin-import/skills/linkedin-import/SKILL.md +5 -5
  20. package/payload/platform/plugins/memory/.claude-plugin/plugin.json +1 -1
  21. package/payload/platform/plugins/memory/PLUGIN.md +4 -4
  22. package/payload/platform/plugins/memory/bin/conversation-archive-ingest.mjs +5 -5
  23. package/payload/platform/plugins/memory/bin/conversation-archive-ingest.sh +1 -1
  24. package/payload/platform/plugins/memory/mcp/dist/index.js +14 -14
  25. package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
  26. package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-citation-audit.d.ts +1 -1
  27. package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-citation-audit.js +2 -2
  28. package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-orphans.d.ts +1 -1
  29. package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-orphans.js +1 -1
  30. package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.d.ts +2 -2
  31. package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.d.ts.map +1 -1
  32. package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.js +3 -4
  33. package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.js.map +1 -1
  34. package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-schema.d.ts.map +1 -1
  35. package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-schema.js +6 -0
  36. package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-schema.js.map +1 -1
  37. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights.test.js +2 -2
  38. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights.test.js.map +1 -1
  39. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest.test.js +17 -17
  40. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest.test.js.map +1 -1
  41. package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.d.ts +3 -3
  42. package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.js +6 -6
  43. package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.js.map +1 -1
  44. package/payload/platform/plugins/memory/mcp/dist/tools/memory-delete.d.ts +1 -1
  45. package/payload/platform/plugins/memory/mcp/dist/tools/memory-delete.js +9 -3
  46. package/payload/platform/plugins/memory/mcp/dist/tools/memory-delete.js.map +1 -1
  47. package/payload/platform/plugins/memory/mcp/dist/tools/memory-empty-trash.d.ts +2 -0
  48. package/payload/platform/plugins/memory/mcp/dist/tools/memory-empty-trash.d.ts.map +1 -1
  49. package/payload/platform/plugins/memory/mcp/dist/tools/memory-empty-trash.js.map +1 -1
  50. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.d.ts +6 -5
  51. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.d.ts.map +1 -1
  52. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js +30 -29
  53. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js.map +1 -1
  54. package/payload/platform/plugins/memory/mcp/dist/tools/memory-restore.d.ts +1 -1
  55. package/payload/platform/plugins/memory/mcp/dist/tools/memory-restore.js +4 -1
  56. package/payload/platform/plugins/memory/mcp/dist/tools/memory-restore.js.map +1 -1
  57. package/payload/platform/plugins/memory/references/schema-base.md +2 -2
  58. package/payload/platform/plugins/memory/skills/conversation-archive/SKILL.md +12 -12
  59. package/payload/platform/plugins/scheduling/skills/daily-prep/SKILL.md +2 -2
  60. package/payload/platform/plugins/whatsapp/PLUGIN.md +1 -1
  61. package/payload/platform/plugins/x-import/PLUGIN.md +3 -3
  62. package/payload/platform/plugins/x-import/skills/x-import/SKILL.md +7 -7
  63. package/payload/platform/scripts/seed-neo4j.sh +3 -3
  64. package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
  65. package/payload/platform/services/claude-session-manager/dist/http-server.js +22 -3
  66. package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
  67. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +16 -1
  68. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
  69. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +29 -3
  70. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
  71. package/payload/platform/templates/agents/admin/IDENTITY.md +7 -7
  72. package/payload/platform/templates/specialists/agents/database-operator.md +6 -6
  73. package/payload/platform/templates/specialists/agents/librarian.md +2 -2
  74. package/payload/server/public/assets/{admin-_pm0RRTE.js → admin-CnLGltuE.js} +1 -1
  75. package/payload/server/public/assets/{data-b6q64Ot4.js → data-MB2EWZUP.js} +1 -1
  76. package/payload/server/public/assets/{graph-D1SVlBLb.js → graph-B2FnDRz-.js} +1 -1
  77. package/payload/server/public/assets/graph-labels-DDYqDlu3.js +1 -0
  78. package/payload/server/public/assets/{page-DwFigpyR.js → page-BJKRa6Db.js} +1 -1
  79. package/payload/server/public/assets/{page-BV6E4J2q.js → page-Bx2p3W1k.js} +1 -1
  80. package/payload/server/public/data.html +3 -3
  81. package/payload/server/public/graph.html +3 -3
  82. package/payload/server/public/index.html +4 -4
  83. package/payload/server/server.js +20 -18
  84. package/payload/server/public/assets/graph-labels-BiDGzVs2.js +0 -1
@@ -99,23 +99,26 @@ function bumpEdge(breakdown, edgeType) {
99
99
  // ---------------------------------------------------------------------------
100
100
  export async function memoryIngest(params) {
101
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.
102
+ // dispatcher signal is *which one*. The document path MERGEs under
103
+ // `:KnowledgeDocument`; the conversation path MERGEs under
104
+ // `:ConversationArchive` (Task 397).
104
105
  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
+ throw new Error("memory-ingest: exactly one of `attachmentId` (document path) or `conversationIdentity` (conversation-archive path) must be set");
106
107
  }
107
108
  if (params.attachmentId && params.conversationIdentity) {
108
109
  throw new Error("memory-ingest: `attachmentId` and `conversationIdentity` are mutually exclusive — set exactly one");
109
110
  }
110
111
  const mergeKey = (params.attachmentId ?? params.conversationIdentity);
111
- return withWriteEvent({ tool: "memory-ingest", accountId: params.accountId, labels: ["KnowledgeDocument"], name: mergeKey }, () => memoryIngestImpl(params));
112
+ const parentLabel = params.conversationIdentity ? "ConversationArchive" : "KnowledgeDocument";
113
+ return withWriteEvent({ tool: "memory-ingest", accountId: params.accountId, labels: [parentLabel], name: mergeKey }, () => memoryIngestImpl(params));
112
114
  }
113
115
  async function memoryIngestImpl(params) {
114
- // Conversation-document branch. Diverges enough from the document path
116
+ // Conversation-archive branch. Diverges enough from the document path
115
117
  // (no extract cache, no anchor edges, no related entities, delta-append
116
118
  // semantics) that it has its own end-to-end implementation in
117
- // `ingestConversationDocument()`. Both writers produce `:KnowledgeDocument`
118
- // parents the split is the algorithm, not the label.
119
+ // `ingestConversationDocument()`. The conversation writer MERGEs under
120
+ // `:ConversationArchive`; the document writer below MERGEs under
121
+ // `:KnowledgeDocument`.
119
122
  if (params.conversationIdentity) {
120
123
  return ingestConversationDocument(params);
121
124
  }
@@ -559,9 +562,9 @@ async function writeRelatedNode(opts) {
559
562
  return result.records[0].get("nodeId");
560
563
  }
561
564
  // ---------------------------------------------------------------------------
562
- // Conversation-document ingest — chat-mode branch.
565
+ // Conversation-archive ingest — chat-mode branch (Task 397).
563
566
  //
564
- // MERGE :KnowledgeDocument on conversationIdentity → cleanup THIS export's
567
+ // MERGE :ConversationArchive on conversationIdentity → cleanup THIS export's
565
568
  // chunks by archiveSha256 (delta discipline: prior exports' chunks survive)
566
569
  // → CREATE new chunks → extend NEXT chain from existing tail → MERGE
567
570
  // :PARTICIPANT_IN edges → update lastIngestedMessageHash + lastIngestedMessageAt.
@@ -570,9 +573,8 @@ async function writeRelatedNode(opts) {
570
573
  // Sections in this branch are :Section chunks (no secondary label — source
571
574
  // is the parent's discriminator); properties pass through verbatim (summary,
572
575
  // 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.
576
+ // The parent label `:ConversationArchive` is what distinguishes a transcript
577
+ // from a narrative document; both use the same `:Section`+`:NEXT` chain shape.
576
578
  // ---------------------------------------------------------------------------
577
579
  // Source-agnostic provenance. The orchestrator is one bash entry
578
580
  // regardless of source, so the agent stamp is the same across every ingest;
@@ -623,16 +625,15 @@ async function ingestConversationDocument(params) {
623
625
  const kindBreakdown = {};
624
626
  const edgeBreakdown = {};
625
627
  try {
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)
628
+ // 1. Trash-revival. `:ConversationArchive` is in graph-trash's
629
+ // UNIQUE_KEYS_BY_LABEL with `conversationIdentity`, so a trashed
630
+ // conversation-archive parent has `conversationIdentity` snapshotted
631
+ // into `_trashedKeys` and nulled on the live property. Look it up
632
+ // via the snapshot direct property lookup would miss a
633
+ // trashed-then-revived MERGE target. Without this, re-ingesting into
634
+ // a previously-trashed parent (operator manually drag-trashed, then
635
+ // re-ran) MERGEs into a fresh node and leaves the trashed twin behind.
636
+ const trashedArchive = await dbSession.run(`MATCH (a:ConversationArchive:Trashed)
636
637
  WHERE a.accountId = $accountId
637
638
  AND (a.conversationIdentity = $conversationIdentity
638
639
  OR a._trashedKeys CONTAINS $conversationIdentity)
@@ -640,14 +641,14 @@ async function ingestConversationDocument(params) {
640
641
  if (trashedArchive.records.length > 0) {
641
642
  const eid = trashedArchive.records[0].get("eid");
642
643
  await restoreNode({ session: dbSession, accountId, elementId: eid });
643
- log("revived", `restored trashed conversation-document elementId=${eid}`);
644
+ log("revived", `restored trashed ConversationArchive elementId=${eid}`);
644
645
  }
645
646
  // 2. Embed every chunk body. Summary too (parent embedding).
646
647
  const textsToEmbed = [documentSummary, ...sections.map((s) => s.body)];
647
648
  log("embedding", `${textsToEmbed.length} texts`);
648
649
  const embeddings = await embedBatch(textsToEmbed);
649
650
  const archiveEmbedding = embeddings[0];
650
- // 3. MERGE :KnowledgeDocument on conversationIdentity. ON CREATE stamps
651
+ // 3. MERGE :ConversationArchive on conversationIdentity. ON CREATE stamps
651
652
  // immutable identity props; ON MATCH bumps the cursor + last-ingest
652
653
  // timestamps so the next delta-append run finds the right point.
653
654
  //
@@ -656,7 +657,7 @@ async function ingestConversationDocument(params) {
656
657
  // NEVER overwritten (re-ingests must produce the same title anyway,
657
658
  // but the COALESCE makes the contract explicit). UI prefers `title`
658
659
  // via display-helpers' conversation-document branch.
659
- const archiveResult = await dbSession.run(`MERGE (a:KnowledgeDocument { conversationIdentity: $conversationIdentity })
660
+ const archiveResult = await dbSession.run(`MERGE (a:ConversationArchive { conversationIdentity: $conversationIdentity })
660
661
  ON CREATE SET a.accountId = $accountId,
661
662
  a.scope = $scope,
662
663
  a.title = $archiveTitle,
@@ -705,7 +706,7 @@ async function ingestConversationDocument(params) {
705
706
  // (matching conversationIdentity + matching archiveSha256).
706
707
  let cleanedPriorChunks = 0;
707
708
  if (cleanupPriorChunks) {
708
- const cleanup = await dbSession.run(`MATCH (a:KnowledgeDocument { conversationIdentity: $conversationIdentity })
709
+ const cleanup = await dbSession.run(`MATCH (a:ConversationArchive { conversationIdentity: $conversationIdentity })
709
710
  -[hs:HAS_SECTION]->(c:Section { archiveSha256: $archiveSha256 })
710
711
  DETACH DELETE c
711
712
  RETURN count(c) AS removed`, { conversationIdentity, archiveSha256 });
@@ -722,7 +723,7 @@ async function ingestConversationDocument(params) {
722
723
  // Restrict the NEXT chain match to this conversation-document's
723
724
  // sections by going through HAS_SECTION rather than by section label;
724
725
  // a plain `:Section` would also match document-path siblings.
725
- const tailResult = await dbSession.run(`MATCH (a:KnowledgeDocument { conversationIdentity: $conversationIdentity })
726
+ const tailResult = await dbSession.run(`MATCH (a:ConversationArchive { conversationIdentity: $conversationIdentity })
726
727
  -[:HAS_SECTION]->(c:Section)
727
728
  WHERE NOT EXISTS {
728
729
  MATCH (c)-[:NEXT]->(:Section)<-[:HAS_SECTION]-(a)
@@ -759,7 +760,7 @@ async function ingestConversationDocument(params) {
759
760
  const r = await dbSession.run(`CREATE (c:Section)
760
761
  SET c = $props
761
762
  WITH c
762
- MATCH (a:KnowledgeDocument { conversationIdentity: $conversationIdentity })
763
+ MATCH (a:ConversationArchive { conversationIdentity: $conversationIdentity })
763
764
  CREATE (a)-[hs:HAS_SECTION]->(c)
764
765
  SET hs.createdByAgent = $createdByAgent,
765
766
  hs.createdBySession = $createdBySession,
@@ -810,7 +811,7 @@ async function ingestConversationDocument(params) {
810
811
  // on the edge set.
811
812
  let participantEdgesMerged = 0;
812
813
  for (const elemId of participantElementIds) {
813
- const pres = await dbSession.run(`MATCH (a:KnowledgeDocument { conversationIdentity: $conversationIdentity })
814
+ const pres = await dbSession.run(`MATCH (a:ConversationArchive { conversationIdentity: $conversationIdentity })
814
815
  MATCH (p) WHERE elementId(p) = $elemId AND (p:Person OR p:AdminUser)
815
816
  MERGE (p)-[r:PARTICIPANT_IN]->(a)
816
817
  ON CREATE SET r.createdByAgent = $createdByAgent,
@@ -1 +1 @@
1
- {"version":3,"file":"memory-ingest.js","sourceRoot":"","sources":["../../src/tools/memory-ingest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAO3E,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACx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ACH,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * memory-restore — undo a `memory-delete`. Removes the `:Trashed` label,
3
3
  * restores snapshotted unique-key properties, and walks `HAS_SECTION` /
4
- * `HAS_CHUNK` edges so a restored `KnowledgeDocument` brings its trashed
4
+ * `HAS_CHUNK` edges so a restored `KnowledgeDocument` or `ConversationArchive` brings its trashed
5
5
  * `Section` and `Chunk` children back with it.
6
6
  *
7
7
  * Fails loudly when an active node already holds a unique slot the trashed
@@ -11,7 +11,10 @@ async function memoryRestoreImpl(params) {
11
11
  const root = await restoreNode({ session, accountId, elementId });
12
12
  let sections = 0;
13
13
  let chunks = 0;
14
- if (root.labels.includes("KnowledgeDocument")) {
14
+ // Both :KnowledgeDocument (document path) and :ConversationArchive
15
+ // (conversation path — Task 397) own :Section/:Chunk children; revival
16
+ // cascade is identical for both parent labels.
17
+ if (root.labels.includes("KnowledgeDocument") || root.labels.includes("ConversationArchive")) {
15
18
  const childResult = await session.run(`MATCH (d) WHERE elementId(d) = $eid
16
19
  OPTIONAL MATCH (d)-[:HAS_SECTION]->(s:Section)
17
20
  WHERE s:Trashed
@@ -1 +1 @@
1
- {"version":3,"file":"memory-restore.js","sourceRoot":"","sources":["../../src/tools/memory-restore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAsB,MAAM,8CAA8C,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAwBtD,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,MAA2B;IAE3B,OAAO,cAAc,CACnB,EAAE,IAAI,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,EACvD,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAC/B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,MA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,EAAE,CAAC;YAC7F,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,GAAG,CACnC;;;;;;;+EAOuE,EACvE,EAAE,GAAG,EAAE,SAAS,EAAE,CACnB,CAAC;YACF,MAAM,UAAU,GAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,YAAY,CAAc,IAAI,EAAE,CAAC;YACjF,MAAM,QAAQ,GAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,UAAU,CAAc,IAAI,EAAE,CAAC;YAE7E,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;gBAC7B,MAAM,WAAW,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC;gBAC1D,QAAQ,EAAE,CAAC;YACb,CAAC;YACD,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;gBAC3B,MAAM,WAAW,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC;gBAC1D,MAAM,EAAE,CAAC;YACX,CAAC;QACH,CAAC;QAED,OAAO;YACL,SAAS;YACT,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,OAAO,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE;SAC9B,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;AACH,CAAC"}
@@ -61,7 +61,7 @@ When loading this reference, confirm which schema files were consulted by noting
61
61
 
62
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.
63
63
 
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.
64
+ **`authorshipMode` on content labels (Task 356).** Every `:KnowledgeDocument` (including email-source threads), `:ConversationArchive` (Task 397 — every chat transcript parent), `:Message`, `:SocialPost`, and `: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. `:ConversationArchive` `:Section` chunks (WhatsApp / Telegram / Signal / Granola / Otter / Circleback exports ingested under `(:ConversationArchive)-[:HAS_SECTION]->(:Section)` Task 397) 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 transcript chunks without a secondary label. Writers that cannot determine the mode (e.g. bulk archive imports) write `unknown` rather than guessing.
65
65
 
66
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.
67
67
 
@@ -235,7 +235,7 @@ The closed enumeration:
235
235
 
236
236
  `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.
237
237
 
238
- `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.
238
+ `Conversation` — chat-mode chunks emitted by `memory-classify` with `mode='chat'`. Becomes `:Section` linked via `(:ConversationArchive)-[:HAS_SECTION]->` (Task 397) — same Section shape as document-mode, only the parent label differs. The parent `:ConversationArchive` carries `conversationIdentity` (and `source`); readers that need conversation-vs-document filtering match on the parent label rather than a property heuristic. Properties beyond the base section shape: `summary`, `keywords`, `firstMessageAt`, `lastMessageAt`, `participantNames`, `messageCount`, `archiveSha256`. The `:Section` validator rules (embedding, body, position) apply uniformly.
239
239
 
240
240
  **Contract-clause kinds (HAS_SECTION + NEXT, plus special-case extras for two kinds):**
241
241
 
@@ -1,13 +1,13 @@
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 `: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.
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 the parent `: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` 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.
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 `:KnowledgeDocument` is anchored to the operator-confirmed owner (`:AdminUser` for the account owner, `:Person` for a third-party archive). The owner's elementId is derived inside the bash entry from `(ACCOUNT_ID, USER_ID)` env (see Identity below) 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.
10
+ **Default parent.** Every `:ConversationArchive` (Task 397 — previously a `:KnowledgeDocument` carrying `conversationIdentity`) is anchored to the operator-confirmed owner (`:AdminUser` for the account owner, `:Person` for a third-party archive). The owner's elementId is derived inside the bash entry from `(ACCOUNT_ID, USER_ID)` env (see Identity below) and becomes the containment parent for the archive node. Per-session `:Section` chunks attach to the archive via `:HAS_SECTION`, chained in reading order by `:NEXT`. Participant cross-edges from the archive to each distinct sender (`:Person` / `:AdminUser`) attach via `:PARTICIPANT_IN` — 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
 
@@ -127,11 +127,11 @@ Forbidden: blind-reissue without reading the progress file first.
127
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.
128
128
  - Verifies the operator-supplied participant elementIds exist in the graph under this `accountId` with the right label (`:AdminUser` / `:Person`). The script does NOT bind parsed senderNames back to those elementIds — any line authored by a sender outside the confirmed set lands under the archive's `:Section` chunks unchecked, and `:PARTICIPANT_IN` reflects only the confirmed owner + participants. Closing that gap is its own task ([Task 396](../../../../../.tasks/396-conversation-archive-sendername-binding.md)).
129
129
  - Computes `conversationIdentity` from accountId + sorted participant elementIds.
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
+ - **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.
131
131
  - Sessionizes the delta lines at the fixed 8h gap (code constant, no flag).
132
132
  - Computes the stable archive `title` once: `<source> · <owner> ↔ <others> · <YYYY-MM-DD>→<YYYY-MM-DD>`.
133
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
+ - **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.
135
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'`.
136
136
 
137
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.
@@ -142,7 +142,7 @@ After the script succeeds, formulate the three operator-facing messages from the
142
142
 
143
143
  1. **Parse summary.** `Parsed <archiveSourceFile> (source=<enum>): <parsed> messages across <sessions> sessions, date range <dateRange.first> → <dateRange.last>. Participants: <senderHistogram[i].name (count), …>.`
144
144
  2. **Classify summary.** `Classified into <chunks> chunks, covering: <topicKeywords[0], topicKeywords[1], …>.`
145
- 3. **Write summary.** `Created :KnowledgeDocument <archiveElementId> with <chunks> :Section chunks (NEXT chain length <chunks - 1>). Participants linked via :PARTICIPANT_IN: <participantsLinked>.`
145
+ 3. **Write summary.** `Created :ConversationArchive <archiveElementId> with <chunks> :Section chunks (NEXT chain length <chunks - 1>). Participants linked via :PARTICIPANT_IN: <participantsLinked>.`
146
146
 
147
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>"`.
148
148
 
@@ -180,7 +180,7 @@ For an empty-delta re-import (`delta.kind === "empty-delta"`): emit only message
180
180
  - **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
181
  - **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
182
  - **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 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.
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 `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
184
 
185
185
  ## Doctrine
186
186
 
@@ -191,16 +191,16 @@ For an empty-delta re-import (`delta.kind === "empty-delta"`): emit only message
191
191
 
192
192
  Run via `mcp__graph__maxy-graph-read_neo4j_cypher`:
193
193
 
194
- - `MATCH (a:KnowledgeDocument { conversationIdentity: $cid }) RETURN elementId(a), a.source, a.lastIngestedMessageAt, a.lastIngestedMessageHash` — `source` matches `--source`; counters agree with the JSON summary.
195
- - `MATCH (a:KnowledgeDocument { conversationIdentity: $cid })-[:HAS_SECTION]->(c:Section) RETURN count(c)` — equals `chunks`.
196
- - `MATCH (a:KnowledgeDocument { source: $source }) RETURN count(a)` — uses the `(accountId, source)` index.
197
- - `MATCH (p)-[:PARTICIPANT_IN]->(:KnowledgeDocument { conversationIdentity: $cid }) RETURN count(p)` — equals `participantsLinked` after a first-ingest.
198
- - Phase 1 wrote ZERO observations: `MATCH (o:Observation)-[:OBSERVED_IN]->(:KnowledgeDocument { conversationIdentity: $cid }) RETURN count(o)` — should be 0 today (Phase 2 deferred).
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) 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).
199
199
 
200
200
  ## What this is not
201
201
 
202
202
  - **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
203
  - **Not** a media-transcription pipeline. Voice notes, photos, PDFs are skipped at parse with a counter logged.
204
204
  - **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 `:KnowledgeDocument` — `feedback_archives_are_not_documents.md` stands.
205
+ - **Not** an archive-wide importer. Flat datasets (LinkedIn connections, CRM exports) are first-class entities + natural edges, not `:ConversationArchive` and not `:KnowledgeDocument` — `feedback_archives_are_not_documents.md` stands.
206
206
  - **Not** automatic. The owner + all-participants confirmation gate is mandatory before any line is written.
@@ -21,7 +21,7 @@ Run when the owner asks for a per-meeting brief for today. The trigger phrases a
21
21
  2. **For each event, list the attendees.** Read the event's `attendees` field or the `SCHEDULED_FOR` relationships in the graph. If the event has no attendees recorded, mark it as "solo or unspecified".
22
22
  3. **For each attendee, look up the graph.** Call `memory-search` with the attendee's name. Take the highest-confidence `:Person` node. From the node and its neighbours, pull:
23
23
  - Role and current company (one line).
24
- - The most recent conversation-document `:KnowledgeDocument` (carries `conversationIdentity` and `source`) or live `:Conversation` involving them, with the conversation's last-message timestamp.
24
+ - The most recent `:ConversationArchive` (carries `conversationIdentity` and `source`) or live `:Conversation` involving them, with the conversation's last-message timestamp.
25
25
  - Open `:Task` nodes that name them.
26
26
  - Open commitments the owner made to them (tasks with status `open` and the attendee in `SCHEDULED_FOR`).
27
27
  4. **Compose one context block per event.** Keep each block to three short sentences: who is attending, what the latest contact was, what is open between the owner and them.
@@ -44,7 +44,7 @@ When `memory-search` returns no `:Person` node for an attendee, say "no record y
44
44
  CFO at Acme Corp since 2024. Last conversation 11 days ago, where she asked for a referral introduction. One open task: send the intro to Sam Webber.
45
45
 
46
46
  ### Pricing review with the team
47
- Three attendees: Mark Lee, Priya Singh, Jordan Lee. No active commitments between the owner and any of them this week. Standing recurring meeting; last week's notes are in the graph as :Section nodes under the team's conversation-document :KnowledgeDocument.
47
+ Three attendees: Mark Lee, Priya Singh, Jordan Lee. No active commitments between the owner and any of them this week. Standing recurring meeting; last week's notes are in the graph as :Section nodes under the team's :ConversationArchive.
48
48
 
49
49
  ### Call with Daniel Park
50
50
  No record yet. The event was created from a calendar invite three days ago. The owner may want to add a one-line note on the meeting's purpose before joining.
@@ -88,7 +88,7 @@ When per-group activation is `mention`, the agent fires only if the inbound mess
88
88
 
89
89
  ## Live persistence
90
90
 
91
- Every `messages.upsert` event (both `notify` and `append`, both `fromMe` directions) writes a `:Message:WhatsAppMessage` row to Neo4j attached to the sessionKey-keyed `:Conversation`. A single capture site at `platform/ui/app/lib/whatsapp/manager.ts` covers inbound, outbound (Baileys echoes agent-sent messages back through `messages.upsert` with `fromMe=true`), and owner-mirror — without touching `outbound/send.ts`. `messageId` namespace is `whatsapp-live:<waName>:<remoteJid>:<msg.key.id>` where `<waName>` is the Baileys credential dirname (e.g. `default`); distinct from the conversation-document `:Section` chunks written by the source-agnostic `conversation-archive` skill (parent `:KnowledgeDocument` keyed on `conversationIdentity`, plus `:Section` children) — live and archive live in disjoint shapes. Persist failures are loud (`[whatsapp-persist] FAIL …`) and never block dispatch — silent loss is the worse failure mode.
91
+ Every `messages.upsert` event (both `notify` and `append`, both `fromMe` directions) writes a `:Message:WhatsAppMessage` row to Neo4j attached to the sessionKey-keyed `:Conversation`. A single capture site at `platform/ui/app/lib/whatsapp/manager.ts` covers inbound, outbound (Baileys echoes agent-sent messages back through `messages.upsert` with `fromMe=true`), and owner-mirror — without touching `outbound/send.ts`. `messageId` namespace is `whatsapp-live:<waName>:<remoteJid>:<msg.key.id>` where `<waName>` is the Baileys credential dirname (e.g. `default`); distinct from the `:ConversationArchive` `:Section` chunks written by the source-agnostic `conversation-archive` skill (parent `:ConversationArchive` keyed on `conversationIdentity`, plus `:Section` children) — live and archive live in disjoint shapes. Persist failures are loud (`[whatsapp-persist] FAIL …`) and never block dispatch — silent loss is the worse failure mode.
92
92
 
93
93
  **`accountId` contract.** `n.accountId` on every `:Conversation`, `:Person`, and `:Message:WhatsAppMessage` row stamped by this plugin is the **platform-side UUID** resolved by [`resolvePlatformAccountId()`](../../ui/app/lib/whatsapp/platform-account-id.ts) from `data/accounts/<uuid>/account.json` — NOT the Baileys credential dirname (which is only used as the `messageId`/`sessionKey` namespace token). The boot-time line `[whatsapp-persist] resolved-account-id waname=<dir> uuid=<uuid>` records the resolution. Doctrine: see `.docs/neo4j.md` "Account isolation invariant" — every writer that stamps `n.accountId` must verify the value against `${DATA_ROOT}/accounts/<id>/account.json` before write. The helper loud-throws on zero or multi accounts (Phase 0 single-account invariant), aborting the WhatsApp connection start before any write can occur. The same boot-validated identity (`process.env.ACCOUNT_ID`) backs the central live floor at [`writeNodeWithEdges`](../../lib/graph-write/src/index.ts) — any write whose `accountId` differs from the spawning process's `ACCOUNT_ID` is rejected by the gate; the WhatsApp helper is the writer-side discipline, the gate is the universal floor. The env itself is stamped onto the brand systemd unit by `buildMaxyUnitFile` and re-validated at every Hono boot (`[graph-health] account-id-env present=true matches-on-disk=true`) — see `.docs/neo4j.md` "Two boot-time surfaces" (added 2026-05-07).
94
94
 
@@ -17,11 +17,11 @@ Ingests an X (formerly Twitter) Basic Data Export (extracted ZIP — a directory
17
17
  The admin agent delegates to `specialists:database-operator` when the operator drops an extracted X archive directory (or a `twitter-<handle>-archive.zip` reference) into chat. The specialist runs the skill's owner + participant confirmation flow before any `.js` shim is read, then dispatches the two existing ingestion surfaces:
18
18
 
19
19
  - **Tweet stream** → `document-ingest` produces one `:KnowledgeDocument` with `source='x'` whose body is the verbatim chronological transcript of the operator's own tweets, replies, and quote-tweet authorship. `:Section` chunking is owned by `memory-classify` (document mode).
20
- - **Direct messages** → `conversation-archive-ingest.sh --source x-dm` once per distinct `dmConversation`, producing one conversation-document `:KnowledgeDocument` per participant set (keyed on `conversationIdentity`). Senders confirm to existing `:AdminUser` / `:Person` nodes — never auto-created.
20
+ - **Direct messages** → `conversation-archive-ingest.sh --source x-dm` once per distinct `dmConversation`, producing one `:ConversationArchive` per participant set (keyed on `conversationIdentity`). Senders confirm to existing `:AdminUser` / `:Person` nodes — never auto-created.
21
21
 
22
22
  ## What this plugin is not
23
23
 
24
- - **Not a new graph writer.** Every write routes through the existing `memory-ingest` surface — the document path keyed on `attachmentId` (tweet stream) or the conversation-document path keyed on `conversationIdentity` (DMs). Both produce `:KnowledgeDocument` parents with `:Section` children. No bespoke `:Post`, `:DirectMessage`, `:DMThread`, `:Attachment`, or `:Thread` label is introduced; per-thread KD granularity is explicitly rejected.
24
+ - **Not a new graph writer.** Every write routes through the existing `memory-ingest` surface — the document path keyed on `attachmentId` (tweet stream) writes `:KnowledgeDocument`, or the conversation-archive path keyed on `conversationIdentity` (DMs) writes `:ConversationArchive` (Task 397). Both attach `:Section` children. No bespoke `:Post`, `:DirectMessage`, `:DMThread`, `:Attachment`, or `:Thread` label is introduced; per-thread KD granularity is explicitly rejected.
25
25
  - **Not a live X API client.** Archive-only — the X API is rate-limited and paid.
26
26
  - **Not a retweet importer.** Retweets-without-comment are not persisted reliably in X archives; the skill drops them.
27
27
 
@@ -29,5 +29,5 @@ The admin agent delegates to `specialists:database-operator` when the operator d
29
29
 
30
30
  - **memory** — the underlying graph-write surface used by the skill (`mcp__plugin_memory_memory__memory-write` etc.). The skill passes `source='x'` / `source='x-dm'` and `createdByAgent='x-import'` for provenance on every write.
31
31
  - **document-ingest** (memory skill) — owns the tweet-stream KnowledgeDocument writes. `:Section` classification is its responsibility, not this plugin's.
32
- - **conversation-archive** (memory skill) — owns the DM conversation-document writes (`:KnowledgeDocument` with `conversationIdentity` set). The `x-dm` enum entry on `CONVERSATION_SOURCES` and the sibling normaliser in `platform/plugins/memory/mcp/src/lib/conversation-normalisers/x-dm.ts` are the only new code outside this plugin.
32
+ - **conversation-archive** (memory skill) — owns the DM transcript writes (`:ConversationArchive` keyed on `conversationIdentity` — Task 397). The `x-dm` enum entry on `CONVERSATION_SOURCES` and the sibling normaliser in `platform/plugins/memory/mcp/src/lib/conversation-normalisers/x-dm.ts` are the only new code outside this plugin.
33
33
  - **database-operator specialist** — owns execution. See [platform/templates/specialists/agents/database-operator.md](../../templates/specialists/agents/database-operator.md) external-archive ingestion clause.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: x-import
3
- description: Ingest an extracted X (Twitter) archive directory into the graph as one :KnowledgeDocument (tweet stream) plus one conversation-document :KnowledgeDocument per DM participant set. Triggers when the operator drops an `Archive of <handle>` directory or `twitter-<handle>-archive.zip` path into chat. Owner + every distinct participant confirms against existing `:AdminUser` / `:Person` nodes before any write. Idempotent on archive content hash.
3
+ description: Ingest an extracted X (Twitter) archive directory into the graph as one :KnowledgeDocument (tweet stream) plus one :ConversationArchive per DM participant set. Triggers when the operator drops an `Archive of <handle>` directory or `twitter-<handle>-archive.zip` path into chat. Owner + every distinct participant confirms against existing `:AdminUser` / `:Person` nodes before any write. Idempotent on archive content hash.
4
4
  ---
5
5
 
6
6
  # X Import
@@ -10,7 +10,7 @@ description: Ingest an extracted X (Twitter) archive directory into the graph as
10
10
  One X archive becomes:
11
11
 
12
12
  - **One `:KnowledgeDocument`** (`source='x'`) carrying the verbatim chronological transcript of the operator's authored content — root tweets, replies, quote-tweet authorship, deletion markers. `memory-classify` (document mode) splits the body into topic-bounded `:Section` children. Threading is a within-body concept rendered in the transcript; per-thread KDs are explicitly rejected.
13
- - **N `conversation-document :KnowledgeDocument` nodes** (`source='x-dm'`) — one per distinct DM participant set, MERGEd on the existing `conversationIdentity = sha256(accountId + ":" + sortedParticipantElementIds)` key. DM media attaches to the archive node via `HAS_ENCLOSURE`.
13
+ - **N `:ConversationArchive` nodes** (`source='x-dm'`) — one per distinct DM participant set, MERGEd on the existing `conversationIdentity = sha256(accountId + ":" + sortedParticipantElementIds)` key. DM media attaches to the archive node via `HAS_ENCLOSURE`.
14
14
  - **Person resolution** — every `@handle` mentioned, replied-to, or quoted in the tweet stream MERGEs against `:Person` on lowercased `xHandle` scoped by `accountId`. Existing `:Person` nodes gain `xHandle` on `ON CREATE SET` without overwriting operator edits.
15
15
 
16
16
  ## Archive shape
@@ -64,7 +64,7 @@ The dispatch brief names:
64
64
 
65
65
  After document-ingest returns, write the inverse `REPLIED_TO` edges from each inbound-reply author (`:Person`) to the tweet-stream KD — one Cypher MERGE per distinct inbound-replier resolved in Phase 0. Edges carry `accountId`, `sourceDocumentId = attachmentId`, and `createdByAgent = 'x-import'` so re-ingest cleans them up.
66
66
 
67
- ### Phase 3 — DM `conversation-document :KnowledgeDocument` ingests (one per dmConversation)
67
+ ### Phase 3 — DM `:ConversationArchive` ingests (one per dmConversation)
68
68
 
69
69
  For each `dmConversation` in `data/direct-messages.js` (and `data/direct-messages-group.js` when present):
70
70
 
@@ -87,11 +87,11 @@ For each `dmConversation` in `data/direct-messages.js` (and `data/direct-message
87
87
 
88
88
  ### Phase 4 — Media enclosures
89
89
 
90
- After both the KD and all `conversation-document :KnowledgeDocument` writes complete:
90
+ After both the KD and all `:ConversationArchive` writes complete:
91
91
 
92
92
  - For each tweet-media file, write `(:KnowledgeDocument {tweetStreamKd})-[:HAS_ENCLOSURE]->(:ImageObject)` (image media) or write `(:KnowledgeDocument)-[:HAS_ENCLOSURE { contentUrl }]->(...)` skipping body ingest for binary-only video.
93
93
  - Document-shaped media (OCR-able images, PDFs from quote-tweeted articles when archived) recurse through `document-ingest` to land a child `:KnowledgeDocument`, attached via `HAS_ENCLOSURE` from the parent tweet-stream KD.
94
- - DM media: same `HAS_ENCLOSURE` shape but attaches from the relevant `conversation-document :KnowledgeDocument`.
94
+ - DM media: same `HAS_ENCLOSURE` shape but attaches from the relevant `:ConversationArchive`.
95
95
 
96
96
  ## Diagnostic line
97
97
 
@@ -107,7 +107,7 @@ Surfaces to the operator as one chat line. `kdCreated + kdUpdated == 1` per twee
107
107
 
108
108
  - Re-running the same archive bytes is a no-op for the tweet-stream KD — `attachmentId = sha256(transcript-bytes)` matches the prior write; `document-ingest` skips on identical `attachmentId`.
109
109
  - A newer archive containing additional tweets produces a different transcript and therefore a different `attachmentId` — the prior KD is replaced (sections regenerated under the same `sourceDocumentId`).
110
- - DM `conversation-document :KnowledgeDocument` re-ingest follows the conversation-archive cursor model: same `conversationIdentity` → delta-append. No `--rebuild` is ever issued autonomously.
110
+ - DM `:ConversationArchive` re-ingest follows the conversation-archive cursor model: same `conversationIdentity` → delta-append. No `--rebuild` is ever issued autonomously.
111
111
  - Person `xHandle` writes are `ON CREATE SET` — re-import never overwrites operator edits.
112
112
 
113
113
  ## Wrapper-grammar defence
@@ -117,7 +117,7 @@ Every `.js` shim read by this skill is gated through the wrapper regex documente
117
117
  ## What this skill does not do
118
118
 
119
119
  - **Per-thread KDs.** One archive = one tweet-stream KD. Thread boundaries are section boundaries the classifier owns, not graph objects.
120
- - **Bespoke labels.** No `:Post`, `:Tweet`, `:DirectMessage`, `:DMThread`, `:Attachment`. Everything maps to the existing `:KnowledgeDocument` + `conversation-document :KnowledgeDocument` + `:ImageObject` shapes.
120
+ - **Bespoke labels.** No `:Post`, `:Tweet`, `:DirectMessage`, `:DMThread`, `:Attachment`. Everything maps to the existing `:KnowledgeDocument` + `:ConversationArchive` + `:ImageObject` shapes.
121
121
  - **Tweet-level typed edges.** `:REPLIES_TO` / `:QUOTES` as graph edges off individual tweets are rejected; document-level `REPLIED_TO` / `QUOTED` from the KD to each `:Person` covers the same traversals at the right granularity. The Task 305 typed-edge pass enumerates the new KD and writes any further `COMMITTED_TO` / `MENTIONS` / `REFERENCES` edges from in-body references.
122
122
  - **Retweets-without-comment.** Not persisted reliably in X archives; dropped at parse.
123
123
  - **Live X API.** Archive-only.
@@ -229,15 +229,15 @@ cat > "$ACCOUNT_SETTINGS" << SETTINGS_EOF
229
229
  "UserPromptSubmit": [
230
230
  {
231
231
  "hooks": [
232
- { "type": "command", "command": "bash $HOOKS_PATH/archive-ingest-surface-gate.sh" }
232
+ { "type": "command", "command": "bash $HOOKS_PATH/archive-ingest-surface-gate.sh" },
233
+ { "type": "command", "command": "bash $HOOKS_PATH/pre-turn-graph-pass.sh" }
233
234
  ]
234
235
  }
235
236
  ],
236
237
  "Stop": [
237
238
  {
238
239
  "hooks": [
239
- { "type": "command", "command": "bash $HOOKS_PATH/session-end-retrospective.sh" },
240
- { "type": "command", "command": "bash $HOOKS_PATH/post-turn-graph-pass.sh" }
240
+ { "type": "command", "command": "bash $HOOKS_PATH/session-end-retrospective.sh" }
241
241
  ]
242
242
  }
243
243
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"http-server.d.ts","sourceRoot":"","sources":["../src/http-server.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,OAAO,EAYL,KAAK,SAAS,EAEf,MAAM,kBAAkB,CAAA;AAYzB,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,iBAAiB,CAAA;AAE5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAwB9E;4CAC4C;AAC5C,wBAAgB,+BAA+B,IAAI,IAAI,CAEtD;AAwED,eAAO,MAAM,kBAAkB,QAA2B,CAAA;AAI1D,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,SAAS,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC7E,OAAO,EAAE,SAAS,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,iBAAiB,EAAE,MAAM,CAAA;IACzB,kBAAkB,EAAE,WAAW,CAAA;IAC/B,eAAe,EAAE,aAAa,CAAA;IAC9B;kFAC8E;IAC9E,cAAc,EAAE,cAAc,CAAA;CAC/B;AA+ID;;;kEAGkE;AAClE,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG;IAC3B,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACpD;;;+CAG2C;IAC3C,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CAChD,CAAA;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAu0CpD"}
1
+ {"version":3,"file":"http-server.d.ts","sourceRoot":"","sources":["../src/http-server.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,IAAI,EAA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