@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.
- package/package.json +1 -1
- package/payload/platform/config/brand.json +1 -1
- package/payload/platform/lib/graph-style/dist/index.d.ts +6 -4
- package/payload/platform/lib/graph-style/dist/index.d.ts.map +1 -1
- package/payload/platform/lib/graph-style/dist/index.js +10 -23
- package/payload/platform/lib/graph-style/dist/index.js.map +1 -1
- package/payload/platform/lib/graph-style/src/index.ts +10 -20
- package/payload/platform/lib/graph-trash/dist/index.d.ts.map +1 -1
- package/payload/platform/lib/graph-trash/dist/index.js +6 -1
- package/payload/platform/lib/graph-trash/dist/index.js.map +1 -1
- package/payload/platform/lib/graph-trash/src/index.ts +6 -1
- package/payload/platform/neo4j/edge-annotations.json +3 -3
- package/payload/platform/neo4j/schema.cypher +81 -119
- package/payload/platform/plugins/.claude-plugin/marketplace.json +5 -0
- package/payload/platform/plugins/admin/hooks/archive-ingest-surface-gate.sh +2 -2
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-erase.d.ts.map +1 -1
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-erase.js +14 -8
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-erase.js.map +1 -1
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-export.d.ts +1 -1
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-export.d.ts.map +1 -1
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-export.js +10 -7
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-export.js.map +1 -1
- package/payload/platform/plugins/docs/references/internals.md +1 -1
- package/payload/platform/plugins/docs/references/linkedin-extension.md +1 -1
- package/payload/platform/plugins/docs/references/neo4j.md +3 -3
- package/payload/platform/plugins/docs/references/plugins-guide.md +3 -2
- package/payload/platform/plugins/email/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/email/PLUGIN.md +3 -7
- package/payload/platform/plugins/email/mcp/dist/index.js +7 -46
- package/payload/platform/plugins/email/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/lib/credentials.d.ts.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/lib/credentials.js +4 -15
- package/payload/platform/plugins/email/mcp/dist/lib/credentials.js.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/lib/graph.d.ts +51 -43
- package/payload/platform/plugins/email/mcp/dist/lib/graph.d.ts.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/lib/graph.js +223 -229
- package/payload/platform/plugins/email/mcp/dist/lib/graph.js.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.js +7 -4
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.js.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/tools/email-graph-query.d.ts +14 -4
- package/payload/platform/plugins/email/mcp/dist/tools/email-graph-query.d.ts.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/tools/email-graph-query.js +69 -84
- package/payload/platform/plugins/email/mcp/dist/tools/email-graph-query.js.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/tools/email-reply.d.ts.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/tools/email-reply.js +49 -64
- package/payload/platform/plugins/email/mcp/dist/tools/email-reply.js.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/tools/email-setup.d.ts.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/tools/email-setup.js +1 -2
- package/payload/platform/plugins/email/mcp/dist/tools/email-setup.js.map +1 -1
- package/payload/platform/plugins/memory/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/memory/PLUGIN.md +1 -1
- package/payload/platform/plugins/memory/bin/conversation-archive-ingest.mjs +12 -13
- package/payload/platform/plugins/memory/bin/conversation-archive-ingest.sh +1 -1
- package/payload/platform/plugins/memory/mcp/dist/index.js +17 -15
- package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/index.d.ts +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/index.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/index.js +3 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/index.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/types.d.ts +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/types.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/types.js +13 -7
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/types.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/x-dm.d.ts +3 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/x-dm.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/x-dm.js +101 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/x-dm.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/sender-bind.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/sender-bind.js +2 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/sender-bind.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.d.ts +5 -3
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.js +12 -10
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-schema.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-schema.js +7 -4
- package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-schema.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights.test.js +3 -3
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights.test.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-emit.test.js +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-emit.test.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest.test.js +47 -39
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest.test.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.d.ts +7 -6
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.js +12 -11
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.d.ts +59 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.js +326 -4
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.d.ts +31 -27
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js +72 -49
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js.map +1 -1
- package/payload/platform/plugins/memory/references/schema-base.md +5 -6
- package/payload/platform/plugins/memory/skills/archive-crawler/SKILL.md +1 -1
- package/payload/platform/plugins/memory/skills/conversation-archive/SKILL.md +16 -15
- package/payload/platform/plugins/memory/skills/conversation-archive-enrich/SKILL.md +8 -8
- package/payload/platform/plugins/memory/skills/document-ingest/SKILL.md +14 -13
- package/payload/platform/plugins/notion-import/skills/notion-import/SKILL.md +13 -9
- package/payload/platform/plugins/notion-import/skills/notion-import/references/databases.md +11 -9
- package/payload/platform/plugins/notion-import/skills/notion-import/references/page-tree.md +12 -12
- package/payload/platform/plugins/scheduling/PLUGIN.md +18 -0
- package/payload/platform/plugins/scheduling/mcp/dist/index.js +93 -0
- package/payload/platform/plugins/scheduling/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/lib/ics-graph-ingest.d.ts +80 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/ics-graph-ingest.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/ics-graph-ingest.js +395 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/ics-graph-ingest.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/ics.d.ts +16 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/ics.d.ts.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/lib/ics.js +111 -2
- package/payload/platform/plugins/scheduling/mcp/dist/lib/ics.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-archive-ics.d.ts +20 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-archive-ics.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-archive-ics.js +63 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-archive-ics.js.map +1 -0
- package/payload/platform/plugins/scheduling/skills/daily-prep/SKILL.md +2 -2
- package/payload/platform/plugins/whatsapp/PLUGIN.md +1 -1
- package/payload/platform/plugins/x-import/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/x-import/PLUGIN.md +33 -0
- package/payload/platform/plugins/x-import/references/archive-shape.md +124 -0
- package/payload/platform/plugins/x-import/references/transcript-shape.md +121 -0
- package/payload/platform/plugins/x-import/skills/x-import/SKILL.md +123 -0
- package/payload/platform/scripts/check-no-conversation-id-leaks.mjs +1 -1
- package/payload/platform/templates/specialists/agents/database-operator.md +6 -2
- package/payload/platform/templates/specialists/agents/librarian.md +4 -4
- package/payload/server/public/assets/{admin-BM9aXUUh.js → admin-_pm0RRTE.js} +1 -1
- package/payload/server/public/assets/{data-Ds2ECtfP.js → data-b6q64Ot4.js} +1 -1
- package/payload/server/public/assets/{graph-BzxObKMM.js → graph-D1SVlBLb.js} +1 -1
- package/payload/server/public/assets/graph-labels-BiDGzVs2.js +1 -0
- package/payload/server/public/assets/{page-BlkBsjP2.js → page-BV6E4J2q.js} +1 -1
- package/payload/server/public/assets/{page-h_SA5SVQ.js → page-DwFigpyR.js} +1 -1
- package/payload/server/public/data.html +3 -3
- package/payload/server/public/graph.html +3 -3
- package/payload/server/public/index.html +4 -4
- package/payload/server/server.js +18 -21
- package/payload/server/public/assets/graph-labels-Dwgep_nr.js +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: conversation-archive-enrich
|
|
3
|
-
description: Source-agnostic Phase 2 for any `:
|
|
3
|
+
description: Source-agnostic Phase 2 for any `:KnowledgeDocument` — walks the `:Section` chunks of one named archive and asks the operator to confirm derived claims row-by-row. Fires only when the operator names a specific archive and asks for insights/enrichment; never auto-fires on Phase 1 completion. Per-row gate (wire / skip / reject) over four kinds — `mention`, `task`, `preference`, `observed-relationship`. Re-runs are idempotent on `(elementId(chunk), kind, contentHash)`, so collapsing duplicates is structural. Invokes the read-only MCP tool `mcp__memory__conversation-archive-derive-insights` to obtain proposals; never writes from the tool's return path. Each `wire` decision runs the proposal's returned `mergeCypher` via `mcp__graph__maxy-graph-write_neo4j_cypher`, or, for `task`, mints the `:Task` via `mcp__work__work-create` first and then runs the REFERENCES merge.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Conversation Archive — chunk-anchored insight derivation
|
|
7
7
|
|
|
8
|
-
**Invoked from `specialists:librarian`** — the admin agent dispatches the librarian when the operator names an existing `:
|
|
8
|
+
**Invoked from `specialists:librarian`** — the admin agent dispatches the librarian when the operator names an existing `:KnowledgeDocument` and asks for enrichment / derived insights; the librarian loads this skill.
|
|
9
9
|
|
|
10
|
-
One skill. Walks one `:
|
|
10
|
+
One skill. Walks one `:KnowledgeDocument`'s chunks in pages. Per chunk, Haiku surfaces high-confidence claims via `mcp__memory__conversation-archive-derive-insights`; per claim, the operator decides `wire / skip / reject`. The tool is read-only; the only writes happen through this skill's per-row dispatch.
|
|
11
11
|
|
|
12
12
|
## When to invoke
|
|
13
13
|
|
|
@@ -15,7 +15,7 @@ When the operator names a specific archive AND asks for insights, enrichment, or
|
|
|
15
15
|
|
|
16
16
|
- "Derive insights from the Adam Mackay WhatsApp archive."
|
|
17
17
|
- "Enrich the Joel × Adam conversation archive — surface anything actionable."
|
|
18
|
-
- "Run Phase 2 on `:
|
|
18
|
+
- "Run Phase 2 on `:KnowledgeDocument elementId=4:abcd…:42`."
|
|
19
19
|
|
|
20
20
|
Never auto-fire after a Phase 1 ingest completes — `conversation-archive` (the ingest skill) explicitly writes ZERO observations. Phase 2 is operator-gated by design.
|
|
21
21
|
|
|
@@ -24,10 +24,10 @@ Never auto-fire after a Phase 1 ingest completes — `conversation-archive` (the
|
|
|
24
24
|
Operator phrasing usually names participants or the source file, not an `elementId`. Resolve via `mcp__memory__memory-search`:
|
|
25
25
|
|
|
26
26
|
```
|
|
27
|
-
memory-search { query: "<operator's phrasing>", labels: ["
|
|
27
|
+
memory-search { query: "<operator's phrasing>", labels: ["KnowledgeDocument"], expandHops: 0, fields: ["title"] }
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
If multiple `:
|
|
30
|
+
If multiple `:KnowledgeDocument` rows match, ask the operator to pick by `title` (DM and group archives have stable titles per the predecessor task). If zero match, surface the empty result and yield — never run Phase 2 against the wrong archive. `fields: ["title"]` keeps the response payload-minimal — you only need the elementId match and the title for disambiguation; participant lists and metadata are not needed here. See `platform/plugins/memory/references/graph-primitives.md` § Projecting `memory-search` fields.
|
|
31
31
|
|
|
32
32
|
## Walk the chunks in pages
|
|
33
33
|
|
|
@@ -134,7 +134,7 @@ And one end-of-walk summary:
|
|
|
134
134
|
|
|
135
135
|
## Failure paths
|
|
136
136
|
|
|
137
|
-
- **`archive-not-found`** — the named elementId did not resolve, or the archive has zero `:Section
|
|
137
|
+
- **`archive-not-found`** — the named elementId did not resolve, or the archive has zero `:Section` chunks. LOUD-FAIL surfaced verbatim; the skill yields back to admin. Never silently substitute a different archive.
|
|
138
138
|
- **`haiku` per-chunk fail** — Haiku call failed (rate-limit, network, malformed). The tool continues to the next chunk; the operator sees a `FAIL phase=haiku chunk=i/N` line. Once the page finishes, the skill can be re-invoked with the same `chunkOffset` to retry only the failed chunks.
|
|
139
139
|
- **Entity resolution zero-or-multi** — handled inline in the per-row flow above. Never auto-resolve.
|
|
140
140
|
|
|
@@ -144,7 +144,7 @@ Run via `mcp__graph__maxy-graph-read_neo4j_cypher`:
|
|
|
144
144
|
|
|
145
145
|
- All wired writes carry `createdByTool='conversation-archive-derive-insights'`. Count per kind:
|
|
146
146
|
```
|
|
147
|
-
MATCH (c:Section
|
|
147
|
+
MATCH (c:Section)-[m:MENTIONS]->()
|
|
148
148
|
WHERE m.createdByTool = 'conversation-archive-derive-insights'
|
|
149
149
|
AND elementId(c) IN $chunkElementIds
|
|
150
150
|
RETURN count(m)
|
|
@@ -7,23 +7,24 @@ description: Universal document ingestion — maps any unstructured document (PD
|
|
|
7
7
|
|
|
8
8
|
**Invoked from `specialists:librarian`** — the admin agent dispatches the librarian when the operator hands over a document or chat archive, and the librarian loads this skill. The admin agent never calls this skill directly.
|
|
9
9
|
|
|
10
|
-
**Default parent.** Every `:KnowledgeDocument` (document
|
|
10
|
+
**Default parent.** Every `:KnowledgeDocument` (whether the document or the conversation-document writer wrote it) is anchored to a `:Project` when the dispatch brief names one, or to the account's `:LocalBusiness` when the document is account-scoped rather than project-scoped. The admin agent's brief carries the parent elementId; `memory-ingest` refuses the write if the parent is missing or does not exist. Brief-named entity wiring (Persons, Organizations, Tasks) creates cross-hierarchy edges from the document — never substitutes for the containment parent.
|
|
11
11
|
|
|
12
|
-
Ingests any unstructured input — documents (PDF, text, transcript, web page) and chat archives (WhatsApp `_chat.txt`) — into the graph. Every classified section becomes one `:Section` node. **
|
|
12
|
+
Ingests any unstructured input — documents (PDF, text, transcript, web page) and chat archives (WhatsApp `_chat.txt`) — into the graph. Every classified section becomes one `:Section` node under a `:KnowledgeDocument` parent. **One parent label, two writer paths chosen by identity property:**
|
|
13
13
|
|
|
14
|
-
| Input shape | Parent label |
|
|
14
|
+
| Input shape | Parent label | Identity property (dispatcher signal) | Section secondary label | mode |
|
|
15
15
|
|---|---|---|---|---|
|
|
16
|
-
| PDF / text / web (default) | `:KnowledgeDocument` | `:Section:<Kind>` from closed enumeration (`Position`, `Chapter`, `Parties`, …) | `
|
|
17
|
-
| Chat archive (`_chat.txt
|
|
16
|
+
| PDF / text / web (default) | `:KnowledgeDocument` | `attachmentId` | `:Section:<Kind>` from closed enumeration (`Position`, `Chapter`, `Parties`, …) | `document` |
|
|
17
|
+
| Chat archive (`_chat.txt`, X DMs, Telegram, …) | `:KnowledgeDocument` | `conversationIdentity` | `:Section` (no secondary label — source distinguishes at the parent) | `chat` |
|
|
18
|
+
| X (Twitter) tweet-stream transcript (rendered by `x-import`) | `:KnowledgeDocument` (`source='x'`) | `attachmentId` | `:Section:<Kind>` from closed enumeration | `document` |
|
|
18
19
|
|
|
19
|
-
The classifier in `memory-classify` decides which section kinds each section maps to (document mode) or chunks the archive into topic-bounded `:Section
|
|
20
|
+
The classifier in `memory-classify` decides which section kinds each section maps to (document mode) or chunks the archive into topic-bounded `:Section` nodes (chat mode). The skill orchestrates the pipeline; the classifier reads the loaded ontology; the writer enforces the validator. **Classifier failure is terminal — the ingest aborts entirely; nothing is written. Loud failures, never silent landfill.**
|
|
20
21
|
|
|
21
22
|
## Routing — chat vs document (mandatory first decision)
|
|
22
23
|
|
|
23
|
-
Before anchor confirmation, decide
|
|
24
|
+
Before anchor confirmation, decide which identity property to pass to `memory-ingest`:
|
|
24
25
|
|
|
25
|
-
- **Chat archive** — input filename ends in `_chat.txt`, the dispatch brief names the input as a WhatsApp chat / messaging-channel export, or the operator labels it as such. Set `mode='chat'` and `
|
|
26
|
-
- **Document** — everything else. Set `mode='document'` and `
|
|
26
|
+
- **Chat archive** — input filename ends in `_chat.txt`, the dispatch brief names the input as a WhatsApp chat / messaging-channel export, or the operator labels it as such. Set `mode='chat'` and pass `conversationIdentity` (omit `attachmentId`). Skip anchor confirmation; run participant confirmation instead (see § Participant confirmation). The classifier produces `:Section` chunks; no anchor edges, no related entities.
|
|
27
|
+
- **Document** — everything else. Set `mode='document'` and pass `attachmentId` (omit `conversationIdentity`). Run the anchor confirmation flow below.
|
|
27
28
|
|
|
28
29
|
Both branches go through the same three tools (`memory-ingest-extract` → `memory-classify` → `memory-ingest`); only the parameters differ.
|
|
29
30
|
|
|
@@ -65,7 +66,7 @@ Persist `$ownerElementId` and `$participantElementIds` (array, owner excluded) f
|
|
|
65
66
|
Compute archive metadata before classify:
|
|
66
67
|
- `archiveSha256` — `bash sha256sum "<file>" | cut -d' ' -f1`. Stamped on the parent + every chunk.
|
|
67
68
|
- `archiveSourceFile` — the basename (e.g. `_chat.txt`).
|
|
68
|
-
- `conversationIdentity` — pass as the `
|
|
69
|
+
- `conversationIdentity` — pass as the `conversationIdentity` parameter to `memory-ingest` (in place of `attachmentId`; the two are mutually exclusive). Format: `chat:<sha256(accountId + ":" + sortedParticipantElementIds)>` where `sortedParticipantElementIds` is the sorted-then-comma-joined list of `[owner, ...participants]`. Same conversation across re-exports → same identity → idempotent MERGE on the conversation-document `:KnowledgeDocument`.
|
|
69
70
|
|
|
70
71
|
## Pipeline
|
|
71
72
|
|
|
@@ -115,7 +116,7 @@ Calls Haiku with the loaded ontology and the cached text.
|
|
|
115
116
|
|
|
116
117
|
**Document mode (default).** Inputs: `attachmentId` (same one), `anchorDescription` (a short sentence built from the confirmed anchor — e.g. `"subject = UserProfile (the account owner); edges from UserProfile."` or `"subject = LocalBusiness {name: 'Acme Roofing'} (the operator's business); edges from LocalBusiness."`).
|
|
117
118
|
|
|
118
|
-
**Chat mode.** Inputs: `attachmentId` (same one), `mode='chat'`, `anchorDescription` (a short sentence naming the conversation — e.g. `"WhatsApp conversation between Joel and Adam (2 participants)"`). The chat prompt drops the natural-edge map, the closed enumeration, and the orphan logic — Haiku produces topic-bounded `:Section
|
|
119
|
+
**Chat mode.** Inputs: `attachmentId` (same one, used as the classify cache key only — does NOT flow to the writer in chat mode), `mode='chat'`, `anchorDescription` (a short sentence naming the conversation — e.g. `"WhatsApp conversation between Joel and Adam (2 participants)"`). The chat prompt drops the natural-edge map, the closed enumeration, and the orphan logic — Haiku produces topic-bounded `:Section` chunks (kind `'Conversation'`) with `summary`, `keywords`, `firstMessageAt`, `lastMessageAt`, `participantNames`, `messageCount` per chunk. The whole archive may produce one chunk (short conversation) or many (long chat with topic transitions); chunks cover every message in chronological order with no gaps.
|
|
119
120
|
|
|
120
121
|
Returns:
|
|
121
122
|
|
|
@@ -136,7 +137,7 @@ Writes the classified document or chat archive.
|
|
|
136
137
|
|
|
137
138
|
**Document mode (default).** Inputs: `attachmentId`, `documentSummary`, `anchorNodeId`, `anchorLabel`, `sections`, `documentEdges` (pass through if present), `orphanCandidates` (pass through if present), `scope` (from the brief — confirm with the operator if absent), optional `documentKeywords`, `userKeywords`, `sourceUrl`, `sourceType`.
|
|
138
139
|
|
|
139
|
-
**Chat mode.** Inputs: `
|
|
140
|
+
**Chat mode.** Inputs: `conversationIdentity` (passed instead of `attachmentId` — the dispatcher signal), `documentSummary`, `sections` (the chunks from chat-mode classify), `scope`, plus the chat-archive metadata: `archiveSha256` (cleanup discriminator), `archiveSourceFile` (audit), `participantElementIds` (owner + others, for `:PARTICIPANT_IN` edges). Pass `anchorNodeId` and `anchorLabel` as any non-empty placeholder (e.g. the owner's elementId + `'AdminUser'`) — they are unused on the chat path but the parameter is non-optional. The writer MERGEs `:KnowledgeDocument { conversationIdentity }`, drops any chunks stamped with this `archiveSha256` (idempotent re-ingest), CREATEs new `:Section` chunks chained by `:NEXT`, and MERGEs `:PARTICIPANT_IN` edges from each participant.
|
|
140
141
|
|
|
141
142
|
Returns:
|
|
142
143
|
|
|
@@ -154,7 +155,7 @@ Re-ingesting the same `attachmentId` is safe — the writer drops prior `:Sectio
|
|
|
154
155
|
|
|
155
156
|
### 4. `wire-brief-entities`
|
|
156
157
|
|
|
157
|
-
**Skipped in chat mode** —
|
|
158
|
+
**Skipped in chat mode** — conversation-document parents do not carry KD-level brief-wired edges; participants are already attached via `:PARTICIPANT_IN` and message bodies stay verbatim inside chunk text (mention extraction is deferred to a separate insight-derivation task). Document mode only.
|
|
158
159
|
|
|
159
160
|
After `memory-ingest` returns the new KnowledgeDocument's `documentNodeId`, this step iterates the entities the dispatch brief named and connects each to the new document with the natural KD-level edge.
|
|
160
161
|
|
|
@@ -40,18 +40,22 @@ The skill refuses to read the export directory until both values are echo-confir
|
|
|
40
40
|
4. **Account isolation on fuzzy resolves.** Every inline `@person` mention resolves against `:Person {accountId: $accountId}` — never label-only. A "John Smith" mention in the importing account never matches a `:Person` in another account, even if the names are identical. When no in-account match is found, the mention is written as a new `:Person` with `givenName` / `familyName` parsed from the mention text and `source='notion'`.
|
|
41
41
|
5. **Idempotent MERGE on Notion IDs.** Every Notion page and row carries a stable Notion UUID. Pages MERGE on `(accountId, notionId)`; database rows MERGE on `(accountId, notionId)`; attachments MERGE on `(accountId, sha256)`. Re-import of the same export is a property-update no-op on existing nodes — `skipped` counter advances, no duplicates.
|
|
42
42
|
6. **Provenance stamps.** Every new node: `createdByAgent='notion-import'`, `createdBySource='notion'`, `createdBySession=$sessionId` (UUID per skill run), `createdAt=datetime()`, `importId=$importId`, plus `source='notion'`.
|
|
43
|
-
7. **
|
|
43
|
+
7. **Bulk writes route through `memory-archive-write`; per-node `memory-write` is only used for the workspace anchor.** The walk produces three buffered payloads (pages, database rows per label, deferred relations), each submitted as one `mcp__plugin_memory_memory__memory-archive-write` call with the matching `archiveType`. The server batches 500 rows per transaction, returns aggregate counters, and gives the import per-chunk atomicity. `mcp__plugin_memory_memory__memory-search` is still used for inline-mention and author resolution (per-mention lookup happens during the walk, before any write). No raw Cypher, no Bash improvisation. If a write shape the skill needs is missing from the archive-write surface, the gap is filed as a follow-up task — never improvised.
|
|
44
44
|
|
|
45
45
|
## Execution model
|
|
46
46
|
|
|
47
47
|
1. Run the provenance-confirmation flow. Persist `$importerNodeId`, `$workspaceName`, `$importId` (fresh UUID), `$sessionId`.
|
|
48
|
-
2. MERGE the `:NotionWorkspace { accountId, name }` and the `(:AdminUser)-[:IMPORTED]->(:NotionWorkspace)` edge
|
|
49
|
-
3. Walk the export directory per [workspace-export.md](references/workspace-export.md) — classify each entry as page (`.md`), database schema (`<db-name>.csv` paired with row CSVs), database rows, attachment subdirectory, or nested page subdirectory.
|
|
50
|
-
4. For each shape, follow the matching reference:
|
|
51
|
-
- Pages → [page-tree.md](references/page-tree.md).
|
|
52
|
-
- Databases → [databases.md](references/databases.md).
|
|
53
|
-
- Attachments → [attachments.md](references/attachments.md). Copied to `{accountDir}/archive/notion/<importId>/`, content-hashed, written as `:DigitalDocument {kind: 'notion-attachment', sha256}
|
|
54
|
-
5.
|
|
48
|
+
2. MERGE the `:NotionWorkspace { accountId, name }` and the `(:AdminUser)-[:IMPORTED]->(:NotionWorkspace)` edge via `memory-write`. Persist the resulting `:NotionWorkspace` `elementId` as `$workspaceNodeId` — every subsequent archive-write call passes it as `ownerNodeId`.
|
|
49
|
+
3. Walk the export directory per [workspace-export.md](references/workspace-export.md) — classify each entry as page (`.md`), database schema (`<db-name>.csv` paired with row CSVs), database rows, attachment subdirectory, or nested page subdirectory. The walk **buffers** parsed output into three lists: `pageBuffer`, `dbRowBufferByLabel` (keyed by canonical label + databaseNotionId), and `deferredRelations`. No writes are issued during the walk except inline-mention `memory-search` lookups.
|
|
50
|
+
4. For each shape, follow the matching reference to fill the buffers:
|
|
51
|
+
- Pages → [page-tree.md](references/page-tree.md). Each parsed page becomes one `NotionPageRow` in `pageBuffer`. Top-level pages set `parentNotionId: null`; nested pages keep the enclosing page's `notionId`. Inline `@person` mentions resolved per Invariant 4 — each match appends a `MENTIONS` entry to `deferredRelations`. Page-to-page `HAS_SECTION` (every non-workspace parent) is appended to `deferredRelations` with `edgeType: 'HAS_SECTION'`, regardless of in-batch ordering — the server resolves them once every node is MERGEd in pass-2.
|
|
52
|
+
- Databases → [databases.md](references/databases.md). The database itself is MERGEd via `memory-write` as `:KnowledgeDocument {kind: 'notion-database', notionId}` before any rows are queued (the row handler verifies the parent exists). Each row joins `dbRowBufferByLabel[label][databaseNotionId]`. Notion's typed relation columns become entries in `deferredRelations` (canonical edge type when the schema maps, `MENTIONS` with `mentionContext` otherwise).
|
|
53
|
+
- Attachments → [attachments.md](references/attachments.md). Copied to `{accountDir}/archive/notion/<importId>/`, content-hashed, written as `:DigitalDocument {kind: 'notion-attachment', sha256}` via `memory-write` (one per attachment — attachments are not bulk-batched because the file copy itself is the long pole). Each attachment appends a `MENTIONS` or canonical `HAS_ATTACHMENT` entry to `deferredRelations` when wired into the typed-edge schema.
|
|
54
|
+
5. **Flush phase — three batched archive-write calls.** After the walk completes:
|
|
55
|
+
1. `memory-archive-write archiveType='notion-pages' ownerNodeId=$workspaceNodeId importId=$importId rows=pageBuffer` — server MERGEs every page and attaches workspace-root `HAS_SECTION` for `parentNotionId: null` rows. Optional `AUTHORED` edges write when `authorPersonNodeId` is set.
|
|
56
|
+
2. For each `(label, databaseNotionId)` key: `memory-archive-write archiveType='notion-database-rows' ownerNodeId=$workspaceNodeId importId=$importId databaseNotionId=<…> label=<…> rows=<bufferedRows>`.
|
|
57
|
+
3. `memory-archive-write archiveType='notion-relations-pass-2' ownerNodeId=$workspaceNodeId rows=deferredRelations` — server buckets relations by `edgeType` from the closed allowlist (`MENTIONS`, `WORKS_FOR`, `OWNS`, `ASSIGNED_TO`, `PART_OF`, `ATTENDED`, `HAS_SECTION`, `AUTHORED`). Unknown edge types and missing endpoints are counted, not thrown.
|
|
58
|
+
6. Emit `[notion-import] importId=<id> pages=<n> rows=<n> relations=<n> mentions=<n> attachments=<n> skipped=<n> ms=<elapsed>` at completion, aggregating the counters returned by each archive-write call. Per-file errors emit `[notion-import:error] file=<path> reason=<…>` during the walk; the skill continues past parse failures so a single bad file does not abort the entire import. Per-batch transaction failures surface in the archive-write `errors[]` array — log each as `[notion-import:batch-error] archiveType=<…> offset=<…> reason=<…>` and continue with subsequent batches; the same `importId` re-run is idempotent and replays only the chunks that did not commit.
|
|
55
59
|
|
|
56
60
|
## Selective-ingest gate (bulk imports)
|
|
57
61
|
|
|
@@ -83,7 +87,7 @@ The Notion export is a directory of:
|
|
|
83
87
|
- **Formulas, rollups, synced blocks.** The export materialises computed values as text; the skill imports the materialised text but not the formula source. Re-computing rollups against the graph is downstream work.
|
|
84
88
|
- **Notion Web Clipper saved pages.** Clipper pages live in a different export shape (HTML, not markdown) and have different semantics (third-party source ingest). They land in a future task, not here.
|
|
85
89
|
- **Back-sync to Notion.** Writing changes from the graph back into the Notion workspace is not in scope.
|
|
86
|
-
- **
|
|
90
|
+
- **Streaming progress events from the archive-write server.** Counters are returned only at completion of each archive-write call; per-row progress is a separate observability task if commissioned.
|
|
87
91
|
|
|
88
92
|
## Schema-mapping table
|
|
89
93
|
|
|
@@ -44,11 +44,13 @@ When admin's brief is ambiguous about which label a database should land in, the
|
|
|
44
44
|
|
|
45
45
|
For each row in the parsed CSV:
|
|
46
46
|
|
|
47
|
-
1. **
|
|
48
|
-
2. **Select the label** per the rules above.
|
|
47
|
+
1. **Confirm the parent database exists.** The database itself (`:KnowledgeDocument { kind: 'notion-database', notionId }`) is MERGEd via `memory-write` once, before any of its rows are queued. The `notion-database-rows` handler refuses the batch if the parent is missing.
|
|
48
|
+
2. **Select the label** per the rules above. Allowlist: `Person`, `Organization`, `Project`, `Task`, `Event`, `KnowledgeDocument`.
|
|
49
49
|
3. **Map CSV columns to schema-base properties.** Use canonical camelCase. Unknown columns land as properties on the node with their original column name preserved.
|
|
50
|
-
4. **
|
|
51
|
-
5. **
|
|
50
|
+
4. **Buffer the row.** Append `{ notionId, properties }` to `dbRowBufferByLabel[label][databaseNotionId]`. The row carries node properties only; the HAS_SECTION edge to the parent database is written server-side at flush time.
|
|
51
|
+
5. **Bucket relation columns into `deferredRelations`.** A relation column cell is `"Linked Row Title <32-hex-notionId>"`. For each cell, append a relation entry with `sourceNotionId` = this row's `notionId`, `targetNotionId` = the linked row's `notionId`. When the relation name maps to a canonical edge (table below), set `edgeType` accordingly; otherwise set `edgeType: 'MENTIONS'` and `properties: { mentionContext: '<relation-column-name>' }`. Pass-2 resolves targets — links to rows outside the import set are counted as `skippedUnknownTarget`, not errors.
|
|
52
|
+
|
|
53
|
+
The actual writes happen at flush time: one `memory-archive-write` call per `(label, databaseNotionId)` key, then one final `memory-archive-write archiveType='notion-relations-pass-2'` call carrying every relation across all databases and pages.
|
|
52
54
|
|
|
53
55
|
## Notion-relation → canonical-edge map
|
|
54
56
|
|
|
@@ -67,15 +69,15 @@ The mapping table lives in this reference — not in a server-side enum — so a
|
|
|
67
69
|
|
|
68
70
|
## Forward-reference resolution
|
|
69
71
|
|
|
70
|
-
A row's relation column may point at a row not yet written (later in the walk). The
|
|
72
|
+
A row's relation column may point at a row not yet written (later in the walk or in a later batch). The buffered execution model handles this naturally:
|
|
71
73
|
|
|
72
|
-
- **Pass 1
|
|
73
|
-
- **Pass 2
|
|
74
|
+
- **Pass 1 — node writes.** Pages flush via `notion-pages`; database rows flush via one `notion-database-rows` call per `(label, databaseNotionId)` key. No relations are written in pass 1.
|
|
75
|
+
- **Pass 2 — relations.** Once every page and row is MERGEd, `notion-relations-pass-2` flushes `deferredRelations`. Source and target are located by `(accountId, notionId)`; missing endpoints are counted as `skippedUnknownTarget`, not errors.
|
|
74
76
|
|
|
75
|
-
Two passes are deterministic and keep
|
|
77
|
+
Two passes are deterministic and keep every write idempotent. The completion log reports the `relationsCreated` / `relationsMatched` counters from pass 2.
|
|
76
78
|
|
|
77
79
|
## Failure modes
|
|
78
80
|
|
|
79
81
|
- `[notion-import:error] reason=row-schema-mismatch file=<path>` — the row's front-matter has properties not in the parent CSV's schema. Write the row with the union of properties; log the mismatch; continue.
|
|
80
|
-
- `[notion-import:error] reason=relation-target-not-found notionId=<id>` — pass 2
|
|
82
|
+
- `[notion-import:error] reason=relation-target-not-found notionId=<id>` — pass 2 reported `skippedUnknownTarget > 0` (a row outside the operator's filter, or an externally-linked workspace row). The pass-2 counter captures the total; per-edge detail is not logged because the server only sees the bucketed list, not the source manifest.
|
|
81
83
|
- `[notion-import:error] reason=label-ambiguous db=<name>` — the name + column heuristic matched no canonical label and the operator's brief did not specify. Fall back to `:KnowledgeDocument { kind: 'notion-row' }` and surface the gap in the completion log.
|
|
@@ -10,22 +10,25 @@ A page with children lives alongside a directory of the same basename containing
|
|
|
10
10
|
|
|
11
11
|
## What each page becomes
|
|
12
12
|
|
|
13
|
-
One `:KnowledgeDocument { kind: 'notion-page' }`
|
|
13
|
+
One `NotionPageRow` appended to `pageBuffer`; the server-side `notion-pages` handler MERGEs it as a `:KnowledgeDocument { kind: 'notion-page' }` at flush time. Row fields:
|
|
14
14
|
|
|
15
15
|
- `notionId` — 32-hex from the basename.
|
|
16
16
|
- `title` — human title from the basename.
|
|
17
|
-
- `text` — full markdown body (front-matter stripped; the front-matter fields are mapped to
|
|
18
|
-
- `
|
|
19
|
-
- `
|
|
17
|
+
- `text` — full markdown body (front-matter stripped; the front-matter fields are mapped to row fields below).
|
|
18
|
+
- `parentNotionId` — `null` for workspace-root pages; otherwise the basename `notionId` of the enclosing directory.
|
|
19
|
+
- `notionCreatedAt`, `notionLastEditedAt` — ISO 8601 strings from front-matter `Created` / `Last edited`, or `null`.
|
|
20
|
+
- `authorPersonNodeId` — elementId of an in-account `:Person` resolved per the Authorship section below, or `null`.
|
|
21
|
+
|
|
22
|
+
Provenance (`accountId`, `importId`, `source='notion'`, `createdByAgent='notion-import'`, `createdBySession`, `createdAt`) is stamped server-side; the row does not carry it.
|
|
20
23
|
|
|
21
24
|
## Hierarchy
|
|
22
25
|
|
|
23
26
|
Page hierarchy is written as `:HAS_SECTION` between `:KnowledgeDocument` nodes:
|
|
24
27
|
|
|
25
|
-
- **Top-level pages** —
|
|
26
|
-
- **Nested pages** —
|
|
28
|
+
- **Top-level pages** — `parentNotionId: null` in the row. The `notion-pages` handler attaches `(:NotionWorkspace)-[:HAS_SECTION]->(:KnowledgeDocument)` at insert time.
|
|
29
|
+
- **Nested pages** — every non-null `parentNotionId` is appended to `deferredRelations` with `edgeType: 'HAS_SECTION'`. The `notion-relations-pass-2` flush resolves them once every page is MERGEd, including parents that land in a later batch than their children.
|
|
27
30
|
|
|
28
|
-
The parent's `notionId` is the basename of the enclosing directory
|
|
31
|
+
The parent's `notionId` is the basename of the enclosing directory.
|
|
29
32
|
|
|
30
33
|
## Authorship
|
|
31
34
|
|
|
@@ -39,16 +42,13 @@ Notion exports inline person mentions as plain text in the markdown body — typ
|
|
|
39
42
|
|
|
40
43
|
1. Detect candidate mentions — bracketed names from Notion's link syntax `[Person Name](https://www.notion.so/...)`, plain `@`-prefixed tokens, and front-matter `Mentioned` lists (when present).
|
|
41
44
|
2. For each candidate, run `mcp__plugin_memory_memory__memory-search` with `accountId` filter and the candidate's display name as the search term. Use the search's existing fuzzy semantics — do not invent a new matcher.
|
|
42
|
-
3. On match,
|
|
45
|
+
3. On match, append a `MENTIONS` entry to `deferredRelations` (`sourceNotionId` = the page's `notionId`, `targetNotionId` requires the matched `:Person` to itself carry a `notionId` — if the `:Person` was created by this import the skill assigns one; if the match is an existing in-account `:Person` without a `notionId`, the mention is written via `memory-write` at walk time instead, because pass-2 endpoint resolution is by `(accountId, notionId)` only). On miss, the new `:Person { givenName, familyName, notionId: <fresh-uuid>, source='notion', accountId }` is created via `memory-write` immediately and the mention queued to pass-2 — the mention is preserved either way.
|
|
43
46
|
|
|
44
47
|
The account-filter step is load-bearing. A "John Smith" mention in the importing account never matches a `:Person` in another account, even if the names collide. See SKILL invariant 4.
|
|
45
48
|
|
|
46
49
|
## Inline `@page` mentions (page-to-page links)
|
|
47
50
|
|
|
48
|
-
A page-to-page link in Notion exports as `[Other Page Title](Other%20Page%20Title%20<32-hex-notionId>.md)`.
|
|
49
|
-
|
|
50
|
-
- If the target is in the current import (`:KnowledgeDocument {notionId}` exists or will exist after this pass), defer to pass 2 and write `(:KnowledgeDocument)-[:MENTIONS]->(:KnowledgeDocument)` with `mentionContext: 'page-link'`.
|
|
51
|
-
- If the target is outside the import (an externally-linked page the operator's filter excluded, or a page in a different workspace), skip the edge and log `[notion-import:error] reason=page-link-target-not-found notionId=<id>`.
|
|
51
|
+
A page-to-page link in Notion exports as `[Other Page Title](Other%20Page%20Title%20<32-hex-notionId>.md)`. Append a `MENTIONS` entry to `deferredRelations` with `sourceNotionId` = the current page, `targetNotionId` = the linked page, and `properties: { mentionContext: 'page-link' }`. Pass-2 handles resolution — links to pages outside the import set are counted as `skippedUnknownTarget` in the pass-2 counters, not errors.
|
|
52
52
|
|
|
53
53
|
## Idempotency
|
|
54
54
|
|
|
@@ -23,6 +23,9 @@ tools:
|
|
|
23
23
|
- name: schedule-import-ics
|
|
24
24
|
publicAllowlist: false
|
|
25
25
|
adminAllowlist: false
|
|
26
|
+
- name: schedule-archive-ics
|
|
27
|
+
publicAllowlist: false
|
|
28
|
+
adminAllowlist: false
|
|
26
29
|
- name: time-resolve
|
|
27
30
|
publicAllowlist: false
|
|
28
31
|
adminAllowlist: true
|
|
@@ -98,6 +101,21 @@ Dispatch results are recorded on the Event node (`lastDispatchResult`, `lastDisp
|
|
|
98
101
|
|
|
99
102
|
Users and plugins both create events with actions via the same `schedule-event` interface — the mechanism is symmetric.
|
|
100
103
|
|
|
104
|
+
## Ingesting calendar archives (.ics → graph)
|
|
105
|
+
|
|
106
|
+
`schedule-archive-ics` is the bulk-ingest path: it reads an `.ics` export from any calendar app (Google, Apple, Outlook, Fastmail, etc.) and writes one `:Meeting` per VEVENT into the graph, with attendees resolved to `:Person` by lowercased email. Distinct from `schedule-import-ics`, which only parses + returns events for the operator to recreate via `schedule-event` one at a time.
|
|
107
|
+
|
|
108
|
+
Two-mode flow:
|
|
109
|
+
|
|
110
|
+
- `mode: 'dry-run'` — parses the file, classifies every attendee against the existing graph, returns counts plus up to 20 sample resolutions (already-existing under this account, existing under a foreign account that will be skipped, new stub to be created, or non-mailto resource). No writes.
|
|
111
|
+
- `mode: 'commit'` — applies the import. Each meeting MERGEs on `(accountId, uid)` (idempotent re-ingest), anchors to the calling `:AdminUser` via `[:IMPORTED]`, and writes `(:Person)-[:ATTENDED]->(:Meeting)` edges with role + partstat.
|
|
112
|
+
|
|
113
|
+
Cross-account collision rule: when an attendee email already exists as a `:Person` under a different `accountId`, the import skips the attendance edge (no edge written, the foreign Person is untouched) and counts it as `skippedCrossAccountPerson`. Absolute brand isolation is preserved — one operator's import cannot graft attendance onto another operator's people.
|
|
114
|
+
|
|
115
|
+
Description bodies pass through unchanged on `:Meeting.description`. The typed-edge auto-extraction pass already iterates `:Meeting` and the `Meeting -[:MENTIONS]-> Person/Organization` plus `Person -[:ATTENDED]-> Meeting` schema, so commitments + mentions surface without extra extraction code in this plugin.
|
|
116
|
+
|
|
117
|
+
Out of scope on this surface: live Google/Outlook/Apple API sync, OAuth, incremental cursor, `:Day` aggregator, `:RecurringMeeting` parent, attendee auto-enrichment, write-back to the source calendar.
|
|
118
|
+
|
|
101
119
|
## Locale time formatting
|
|
102
120
|
|
|
103
121
|
All timestamps in tool responses (schedule-list, schedule-get, schedule-event) are formatted in the user's locale timezone with a relative delta. The user's timezone is read from `UserProfile.timezone` (IANA format, e.g. `Europe/London`).
|
|
@@ -11,6 +11,7 @@ import { scheduleUpdate } from "./tools/schedule-update.js";
|
|
|
11
11
|
import { scheduleCancel } from "./tools/schedule-cancel.js";
|
|
12
12
|
import { scheduleExportIcs } from "./tools/schedule-export-ics.js";
|
|
13
13
|
import { scheduleImportIcs } from "./tools/schedule-import-ics.js";
|
|
14
|
+
import { scheduleArchiveIcs } from "./tools/schedule-archive-ics.js";
|
|
14
15
|
import { closeDriver, getUserTimezone } from "./lib/neo4j.js";
|
|
15
16
|
import { formatCombined } from "./lib/time-format.js";
|
|
16
17
|
// Cast to `any` to avoid TS2589. TypeScript hits its 50-level instantiation
|
|
@@ -333,6 +334,98 @@ eagerTool(server, "schedule-import-ics", "Parse an uploaded .ics (iCalendar) fil
|
|
|
333
334
|
}
|
|
334
335
|
});
|
|
335
336
|
// ---------------------------------------------------------------------------
|
|
337
|
+
// schedule-archive-ics
|
|
338
|
+
// ---------------------------------------------------------------------------
|
|
339
|
+
eagerTool(server, "schedule-archive-ics", "Ingest an .ics (iCalendar) archive into the graph as :Meeting nodes with :Person attendees. " +
|
|
340
|
+
"Distinct from schedule-import-ics (which only previews events for the operator to recreate via schedule-event). " +
|
|
341
|
+
"Use mode='dry-run' first to preview attendee resolution: how many emails already exist as :Person in this account, " +
|
|
342
|
+
"how many would be cross-account-skipped (foreign accountId — edge will NOT be written), and how many new Person stubs " +
|
|
343
|
+
"would be created. Use mode='commit' to apply. Each VEVENT becomes one :Meeting MERGEd on (accountId, uid); attendees " +
|
|
344
|
+
"MERGE :Person by lowercased email and write (:Person)-[:ATTENDED]->(:Meeting) edges carrying role + partstat. " +
|
|
345
|
+
"Re-ingest of the same file is idempotent.", {
|
|
346
|
+
filePath: z.string().describe("Absolute path to the .ics file inside the account directory."),
|
|
347
|
+
mode: z.enum(["dry-run", "commit"]).describe("dry-run returns attendee-resolution preview without writing; commit writes."),
|
|
348
|
+
}, async ({ filePath, mode }) => {
|
|
349
|
+
if (!accountId)
|
|
350
|
+
return refuseNoAccount("schedule-archive-ics");
|
|
351
|
+
if (!userId) {
|
|
352
|
+
return {
|
|
353
|
+
content: [
|
|
354
|
+
{
|
|
355
|
+
type: "text",
|
|
356
|
+
text: "schedule-archive-ics requires USER_ID at spawn — every Meeting anchors to the importing AdminUser.",
|
|
357
|
+
},
|
|
358
|
+
],
|
|
359
|
+
isError: true,
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
try {
|
|
363
|
+
const result = await scheduleArchiveIcs({
|
|
364
|
+
filePath,
|
|
365
|
+
mode,
|
|
366
|
+
accountId,
|
|
367
|
+
userId,
|
|
368
|
+
...(sessionId !== undefined ? { sessionId } : {}),
|
|
369
|
+
});
|
|
370
|
+
if (result.mode === "dry-run") {
|
|
371
|
+
const lines = [
|
|
372
|
+
`[dry-run] ${result.filename} — ${result.events} VEVENT(s) parsed, ${result.validMeetings} writable meeting(s).`,
|
|
373
|
+
];
|
|
374
|
+
if (result.skippedNoUid > 0)
|
|
375
|
+
lines.push(` skippedNoUid: ${result.skippedNoUid}`);
|
|
376
|
+
if (result.skippedNoStartTime > 0)
|
|
377
|
+
lines.push(` skippedNoStartTime: ${result.skippedNoStartTime}`);
|
|
378
|
+
lines.push(`\nAttendee preview (would happen on commit):`);
|
|
379
|
+
lines.push(` attendees: ${result.preview.attendees}, organizers: ${result.preview.organizers}`);
|
|
380
|
+
lines.push(` non-mailto entries (rooms / resources / groups): ${result.preview.nonMailtoAttendees}`);
|
|
381
|
+
lines.push(` existing :Person in this account: ${result.preview.existingSameAccount}`);
|
|
382
|
+
lines.push(` existing :Person under foreign accountId (would be SKIPPED): ${result.preview.existingCrossAccount}`);
|
|
383
|
+
lines.push(` new :Person stubs to create: ${result.preview.willCreate}`);
|
|
384
|
+
if (result.sampleAttendees.length > 0) {
|
|
385
|
+
lines.push(`\nSample resolution (up to 20):`);
|
|
386
|
+
for (const s of result.sampleAttendees) {
|
|
387
|
+
const dn = s.displayName ? ` (${s.displayName})` : "";
|
|
388
|
+
const exDn = s.existingDisplayName ? ` → matches ${s.existingDisplayName}` : "";
|
|
389
|
+
lines.push(` [${s.status}] ${s.address}${dn}${exDn}`);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
if (result.parseErrors.length > 0) {
|
|
393
|
+
lines.push(`\nParse warnings:`);
|
|
394
|
+
for (const e of result.parseErrors)
|
|
395
|
+
lines.push(` ${e}`);
|
|
396
|
+
}
|
|
397
|
+
lines.push(`\nIf this looks right, re-run with mode='commit' to write.`);
|
|
398
|
+
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
399
|
+
}
|
|
400
|
+
const lines = [
|
|
401
|
+
`[commit] ${result.filename} — ${result.events} VEVENT(s) parsed.`,
|
|
402
|
+
` meetings: ${result.meetingsCreated} created, ${result.meetingsUpdated} updated`,
|
|
403
|
+
` people: ${result.peopleCreated} created, ${result.existingPersonsLinked} existing linked`,
|
|
404
|
+
` attendees: ${result.attendees}, organizers: ${result.organizers}`,
|
|
405
|
+
];
|
|
406
|
+
if (result.skippedCrossAccountPerson > 0) {
|
|
407
|
+
lines.push(` skippedCrossAccountPerson: ${result.skippedCrossAccountPerson} (foreign accountId — no edge written)`);
|
|
408
|
+
}
|
|
409
|
+
if (result.skippedNoUid > 0)
|
|
410
|
+
lines.push(` skippedNoUid: ${result.skippedNoUid}`);
|
|
411
|
+
if (result.skippedNoStartTime > 0)
|
|
412
|
+
lines.push(` skippedNoStartTime: ${result.skippedNoStartTime}`);
|
|
413
|
+
if (result.parseErrors.length > 0) {
|
|
414
|
+
lines.push(`\nParse warnings:`);
|
|
415
|
+
for (const e of result.parseErrors)
|
|
416
|
+
lines.push(` ${e}`);
|
|
417
|
+
}
|
|
418
|
+
lines.push(`\nimportId=${result.importId} ms=${result.ms}`);
|
|
419
|
+
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
420
|
+
}
|
|
421
|
+
catch (err) {
|
|
422
|
+
return {
|
|
423
|
+
content: [{ type: "text", text: `Archive failed: ${err instanceof Error ? err.message : String(err)}` }],
|
|
424
|
+
isError: true,
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
// ---------------------------------------------------------------------------
|
|
336
429
|
// Shutdown + start
|
|
337
430
|
// ---------------------------------------------------------------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AAO,MAAoB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graph-ingest path for ICS calendar archives.
|
|
3
|
+
*
|
|
4
|
+
* .ics file ──▶ parseICS ──▶ (dry-run preview │ commit writes)
|
|
5
|
+
*
|
|
6
|
+
* Writes one `:Meeting` per VEVENT, anchors it to the importing `:AdminUser`
|
|
7
|
+
* via `[:IMPORTED]`, resolves attendees to `:Person` by lowercased email, and
|
|
8
|
+
* MERGEs `[:ATTENDED]` edges with role + partstat.
|
|
9
|
+
*
|
|
10
|
+
* Cross-account collision rule: `Person.email` is globally unique in the
|
|
11
|
+
* schema. When an attendee email already exists under a different accountId,
|
|
12
|
+
* the import skips the attendance edge (no edge written, the foreign Person
|
|
13
|
+
* is untouched) and increments `skippedCrossAccountPerson`. The Meeting still
|
|
14
|
+
* lands, anchored to the importer's AdminUser. This preserves absolute brand
|
|
15
|
+
* / account isolation while keeping the import as a whole non-fatal.
|
|
16
|
+
*/
|
|
17
|
+
import { Session } from "neo4j-driver";
|
|
18
|
+
import { type ParsedAttendee } from "./ics.js";
|
|
19
|
+
export interface IcsIngestParams {
|
|
20
|
+
/** The .ics file content (already read by the tool wrapper). */
|
|
21
|
+
fileContent: string;
|
|
22
|
+
/** Path-cleansed filename used for diagnostics + `:Meeting.sourceFilename`. */
|
|
23
|
+
filename: string;
|
|
24
|
+
mode: "dry-run" | "commit";
|
|
25
|
+
accountId: string;
|
|
26
|
+
/** The importing AdminUser. Required — we anchor every Meeting to them. */
|
|
27
|
+
userId: string;
|
|
28
|
+
sessionId?: string;
|
|
29
|
+
session: Session;
|
|
30
|
+
}
|
|
31
|
+
export interface AttendeePreviewEntry {
|
|
32
|
+
address: string;
|
|
33
|
+
displayName?: string;
|
|
34
|
+
status: "existing-same-account" | "existing-cross-account" | "will-create" | "non-mailto";
|
|
35
|
+
/** Set when status is existing-*. */
|
|
36
|
+
existingDisplayName?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface IcsIngestDryRunResult {
|
|
39
|
+
mode: "dry-run";
|
|
40
|
+
filename: string;
|
|
41
|
+
importId: string;
|
|
42
|
+
events: number;
|
|
43
|
+
validMeetings: number;
|
|
44
|
+
skippedNoUid: number;
|
|
45
|
+
skippedNoStartTime: number;
|
|
46
|
+
/** Aggregate attendee preview. */
|
|
47
|
+
preview: {
|
|
48
|
+
attendees: number;
|
|
49
|
+
organizers: number;
|
|
50
|
+
nonMailtoAttendees: number;
|
|
51
|
+
existingSameAccount: number;
|
|
52
|
+
existingCrossAccount: number;
|
|
53
|
+
willCreate: number;
|
|
54
|
+
};
|
|
55
|
+
/** Up to 20 representative attendees, classified — surfaces what a commit would do. */
|
|
56
|
+
sampleAttendees: AttendeePreviewEntry[];
|
|
57
|
+
parseErrors: string[];
|
|
58
|
+
ms: number;
|
|
59
|
+
}
|
|
60
|
+
export interface IcsIngestCommitResult {
|
|
61
|
+
mode: "commit";
|
|
62
|
+
filename: string;
|
|
63
|
+
importId: string;
|
|
64
|
+
events: number;
|
|
65
|
+
meetingsCreated: number;
|
|
66
|
+
meetingsUpdated: number;
|
|
67
|
+
peopleCreated: number;
|
|
68
|
+
existingPersonsLinked: number;
|
|
69
|
+
attendees: number;
|
|
70
|
+
organizers: number;
|
|
71
|
+
skippedNoUid: number;
|
|
72
|
+
skippedNoStartTime: number;
|
|
73
|
+
skippedCrossAccountPerson: number;
|
|
74
|
+
parseErrors: string[];
|
|
75
|
+
ms: number;
|
|
76
|
+
}
|
|
77
|
+
export type IcsIngestResult = IcsIngestDryRunResult | IcsIngestCommitResult;
|
|
78
|
+
export declare function ingestIcs(params: IcsIngestParams): Promise<IcsIngestResult>;
|
|
79
|
+
export type { ParsedAttendee };
|
|
80
|
+
//# sourceMappingURL=ics-graph-ingest.d.ts.map
|