@rubytech/create-realagent 1.0.823 → 1.0.825
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/neo4j/migrations/006-prune-bogus-whatsapp-persons.ts +132 -0
- package/payload/platform/neo4j/schema.cypher +11 -0
- package/payload/platform/plugins/admin/hooks/__tests__/archive-ingest-surface-gate.test.sh +1 -1
- package/payload/platform/plugins/admin/hooks/archive-ingest-surface-gate.sh +2 -2
- package/payload/platform/plugins/admin/skills/onboarding/SKILL.md +2 -0
- package/payload/platform/plugins/docs/references/memory-guide.md +1 -1
- package/payload/platform/plugins/docs/references/plugins-guide.md +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-not-applicable.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-not-applicable.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-not-applicable.test.js +87 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-not-applicable.test.js.map +1 -0
- 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 +10 -5
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js +100 -8
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.d.ts +19 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.js +60 -27
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/whatsapp-export-insight-pass.d.ts +4 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/whatsapp-export-insight-pass.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/whatsapp-export-insight-pass.js +106 -30
- package/payload/platform/plugins/memory/mcp/dist/tools/whatsapp-export-insight-pass.js.map +1 -1
- package/payload/platform/plugins/whatsapp-import/bin/ingest.mjs +174 -115
- package/payload/platform/plugins/whatsapp-import/bin/whatsapp-ingest.sh +18 -7
- package/payload/platform/plugins/whatsapp-import/lib/dist/parse-export.js +24 -0
- package/payload/platform/plugins/whatsapp-import/lib/dist/parse-export.js.map +1 -1
- package/payload/platform/plugins/whatsapp-import/lib/src/__tests__/filter-gate.test.ts +2 -0
- package/payload/platform/plugins/whatsapp-import/lib/src/__tests__/parse-export-lrm.test.ts +83 -0
- package/payload/platform/plugins/whatsapp-import/lib/src/parse-export.ts +25 -0
- package/payload/platform/plugins/whatsapp-import/skills/whatsapp-import/SKILL.md +11 -9
- package/payload/platform/templates/agents/admin/IDENTITY.md +1 -1
- package/payload/platform/templates/specialists/agents/database-operator.md +1 -1
- package/payload/server/chunk-AEHTLEC3.js +2302 -0
- package/payload/server/chunk-F5QBVHLS.js +1116 -0
- package/payload/server/chunk-HAXOJNAM.js +10079 -0
- package/payload/server/chunk-JNVZQMTZ.js +593 -0
- package/payload/server/chunk-L3T7ECLI.js +1116 -0
- package/payload/server/chunk-LFOR2ACU.js +10079 -0
- package/payload/server/chunk-NAP6XMLW.js +2233 -0
- package/payload/server/chunk-TDTQEKNP.js +593 -0
- package/payload/server/client-pool-FXCFSUXR.js +32 -0
- package/payload/server/client-pool-M2DU74ZP.js +32 -0
- package/payload/server/cloudflare-task-tracker-3WV7DZKQ.js +17 -0
- package/payload/server/cloudflare-task-tracker-6S23B7QX.js +17 -0
- package/payload/server/maxy-edge.js +3 -3
- package/payload/server/neo4j-migrations-5FVPIWDW.js +428 -0
- package/payload/server/neo4j-migrations-YED5CFPF.js +428 -0
- package/payload/server/public/assets/{admin-Bnj-1qCb.js → admin-DOkUspG1.js} +1 -1
- package/payload/server/public/index.html +1 -1
- package/payload/server/server.js +120 -7
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: whatsapp-import
|
|
3
|
-
description: Phase 1 of the WhatsApp `_chat.txt` ingest contract — deterministic, LLM-free. Preview the archive (parsed counts, date range, sender histogram), ask the operator to choose a filter (`all`, `senders=<csv>`, `date-range=<isoFrom>..<isoTo>`), then write Conversation + Messages + NEXT chain
|
|
3
|
+
description: Phase 1 of the WhatsApp `_chat.txt` ingest contract — deterministic, LLM-free. Preview the archive (parsed counts, date range, sender histogram), confirm the owner + third-party `:Person`, ask the operator to choose a filter (`all`, `senders=<csv>`, `date-range=<isoFrom>..<isoTo>`), then write Conversation + Messages + NEXT chain via the single Bash entry `whatsapp-ingest.sh`. The writer binds participants to the owner + subject pair: any parsed senderName outside that closed set LOUD-FAILs (Task 887 §A0). NO observations and NO LLM at this phase — semantic enrichment lives in the `whatsapp-import-enrich` skill (Phase 2). Triggers when the user asks to import a WhatsApp chat, ingest a `_chat.txt` file, or drops the contents of an "Export Chat" folder into chat. Distinct from the live `whatsapp` plugin (Baileys); this is import-from-export only.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# WhatsApp Import — Phase 1 (Load)
|
|
7
7
|
|
|
8
8
|
Phase 1 of the two-phase WhatsApp ingest contract. Deterministic only: parse → preview → operator-supplied filter → archive-write. NO LLM is invoked at this phase. The chunked Haiku insight pass moved to Phase 2 (`whatsapp-import-enrich` skill) so one ingest cannot blow the operator's context window with `:Observation` enumeration prose.
|
|
9
9
|
|
|
10
|
-
## Owner confirmation (mandatory first step)
|
|
10
|
+
## Owner + subject confirmation (mandatory first step)
|
|
11
11
|
|
|
12
|
-
A WhatsApp
|
|
12
|
+
A WhatsApp DM has exactly two participants. The **owner** is the operator who exported the `_chat.txt`; the **subject** is the third party in the conversation. Both must resolve to existing graph nodes (`:AdminUser` or `:Person`) before the script runs — Task 887 §A0 closes the auto-Person leak by binding the writer to that closed pair.
|
|
13
13
|
|
|
14
|
-
1. List every `:AdminUser`
|
|
14
|
+
1. List every `:AdminUser` and the senders surfaced by Step 1 preview via `mcp__graph__maxy-graph-read_neo4j_cypher`:
|
|
15
15
|
`MATCH (u:AdminUser) RETURN elementId(u) AS elementId, u.name AS name, u.userId AS userId, u.accountId AS accountId`
|
|
16
16
|
2. Ask the operator: "Who exported this `_chat.txt`?" — accept either an existing `:AdminUser` elementId or, if the operator names someone not in the graph, surface that as a blocker (auto-creating an unknown owner is refused).
|
|
17
|
-
3.
|
|
18
|
-
4.
|
|
17
|
+
3. Identify the third party from the preview's sender histogram. Look up the matching `:Person` (by name); if no match, ask the operator to confirm a `:Person` elementId or block until one exists. **Auto-creating the third-party `:Person` is forbidden** — the operator must confirm the canonical node.
|
|
18
|
+
4. Echo both back verbatim and require explicit yes/no confirmation.
|
|
19
|
+
5. Persist the owner's `elementId` as `--owner-element-id` and the subject's as `--subject-person-id`.
|
|
19
20
|
|
|
20
21
|
## Step 1 — preview (mandatory before any write)
|
|
21
22
|
|
|
@@ -53,6 +54,7 @@ Single Bash call:
|
|
|
53
54
|
```bash
|
|
54
55
|
bash platform/plugins/whatsapp-import/bin/whatsapp-ingest.sh <archive.zip|dir|_chat.txt> \
|
|
55
56
|
--owner-element-id <id> \
|
|
57
|
+
--subject-person-id <id> \
|
|
56
58
|
--scope <admin|public> \
|
|
57
59
|
--filter <all|senders=<csv>|date-range=<isoFrom>..<isoTo>>
|
|
58
60
|
```
|
|
@@ -64,9 +66,9 @@ Optional flags:
|
|
|
64
66
|
|
|
65
67
|
The script:
|
|
66
68
|
- Unzips the archive if needed; locates `_chat.txt`.
|
|
67
|
-
- Parses the file deterministically (year shape, sender/body grammar, timezone offset).
|
|
69
|
+
- Parses the file deterministically (year shape, sender/body grammar, timezone offset, U+200E/U+200F leading-bidi-strip).
|
|
68
70
|
- Applies the operator-supplied filter to `parseResult.parsedLines` BEFORE archive-write.
|
|
69
|
-
-
|
|
71
|
+
- Validates every distinct parsed senderName against the canonical-name candidates of `{owner, subject}` (NFKC-trim-lower normalisation). Any miss LOUD-FAILs with `[whatsapp-ingest] FAIL parser-miss reason="senderName=<verbatim> not in preview histogram (parser failure — re-export or report)"` and exits non-zero. **Never auto-creates a participant** — Task 887 §A0 deleted that fallback path.
|
|
70
72
|
- Writes the Conversation + Messages + edges + NEXT chronology via `memoryArchiveWrite` directly (no MCP envelope between steps).
|
|
71
73
|
|
|
72
74
|
NO insight pass runs. The `--no-insight` flag of older releases is gone — Phase 1 always means parse + filter + archive-write, nothing else.
|
|
@@ -87,7 +89,7 @@ Stdout JSON shape (success — full diagnostic counters per Task 871 success cri
|
|
|
87
89
|
"messagesAlreadyExisted": 0,
|
|
88
90
|
"nextEdgesProcessed": 1706,
|
|
89
91
|
"nextEdgesCreated": 1706,
|
|
90
|
-
"participantsAlreadyExisted":
|
|
92
|
+
"participantsAlreadyExisted": 2,
|
|
91
93
|
"ms": 6800
|
|
92
94
|
}
|
|
93
95
|
```
|
|
@@ -186,7 +186,7 @@ You learn about the owner through conversation — never through questionnaires
|
|
|
186
186
|
- When the owner says "remember this" or "forget that", use `profile-update` or `profile-delete` accordingly and confirm what you did.
|
|
187
187
|
- When the owner asks "what do you know about me?", call `profile-read` with `detail: true` and present the results conversationally — preferences grouped by category, with confidence levels and where you learned each one. Offer to correct or remove anything.
|
|
188
188
|
- Memory informs but does not override. If the current conversation contradicts a stored preference, follow the current conversation and call `profile-update` with `mode: "contradict"` to adjust.
|
|
189
|
-
- The `## About the Owner` block in your system prompt is the per-turn signal source. Its `### Coverage` sub-block, when present, lists the canonical Preference
|
|
189
|
+
- The `## About the Owner` block in your system prompt is the per-turn signal source. Its `### Coverage` sub-block, when present, lists the absent canonical Preference fields as `category.field` rows (e.g. `communication.preferredChannel, scheduling.workdayStartTime, …`) — these names are the agent's elicitation targets AND the canonical key source for `profile-update` writes. While ≥1 field is absent, bias one organic question per turn toward an absent field — never a questionnaire, never more than one elicitation per turn, never a field already covered. When you store a Preference satisfying a Missing field, use that exact `category` and `key` on `profile-update` (the Coverage list is the canonical key dictionary; ad-hoc keys never shrink Coverage and the user gets re-asked). On user declination ("doesn't apply", "I don't have one"), call `profile-update({category, key, value: "", notApplicable: true})` — this counts as covered AND stops re-prompting; declination is immutable (the tool rejects `mode: merge|contradict` for notApplicable rows). When no `### Coverage` block appears, the profile is full — go silent on elicitation entirely. The bias never overrides a more pressing concern (a pending owner question, a tool-failure acknowledgement, an in-flight task) — it shapes what you ask when you would otherwise ask a generic question.
|
|
190
190
|
|
|
191
191
|
## Premium Plugin Delivery
|
|
192
192
|
|
|
@@ -123,7 +123,7 @@ Per-source archive imports keep their own skill because their CSVs already encod
|
|
|
123
123
|
- **Phase 1 — preview-then-filtered-write** (`whatsapp-import` skill). Phase 1 is LLM-FREE. Three steps:
|
|
124
124
|
1. **Preview** via `mcp__memory__whatsapp-export-preview` — read-only parse that returns `{conversationSha256, parsed, mediaSkipped, systemSkipped, dateRange:{first,last}, senders:[{name,messageCount}], totalMessages, archiveBytes}`. No Cypher writes.
|
|
125
125
|
2. **Operator chooses a filter.** Surface the preview to the operator and ask: "Filter to apply: `all`, `senders=<csv>`, or `date-range=<isoFrom>..<isoTo>`?". `--filter` is mandatory — the deterministic Bash entry refuses to write without it (`feedback_compress_at_ingest_for_bulk_archives.md`).
|
|
126
|
-
3. **Archive-write** via `bash platform/plugins/whatsapp-import/bin/whatsapp-ingest.sh <archive> --owner-element-id <id> --scope <admin|public> --filter <chosen>`. Parses, applies the filter, writes Conversation + Messages with chronological NEXT chain,
|
|
126
|
+
3. **Archive-write** via `bash platform/plugins/whatsapp-import/bin/whatsapp-ingest.sh <archive> --owner-element-id <id> --subject-person-id <id> --scope <admin|public> --filter <chosen>`. Parses, applies the filter, writes Conversation + Messages with chronological NEXT chain. Writer is bound to the `{owner, subject}` pair from the preview histogram — any parsed senderName outside that closed set LOUD-FAILs (Task 887 §A0); the script does NOT auto-create participant `:Person` nodes. ZERO `:Observation` writes — the LLM insight pass moved to Phase 2.
|
|
127
127
|
|
|
128
128
|
Phase 1 agent-return is COUNTERS ONLY — no inline enumeration of mention/task/preference counts, no multi-paragraph "ask to enrich" prose. Surface as one chat message: the JSON shape `{conversationElementId, conversationId, parsed, written, alreadyExisted, nextEdgesCreated, ms}` plus one sentence: "Preview before any future re-import via `mcp__memory__whatsapp-export-preview`; enrich semantically when ready via the `whatsapp-import-enrich` skill." The legacy `mcp__memory__whatsapp-export-parse` / `whatsapp-export-insight-write` / `memory-archive-write{archiveType:whatsapp-export}` MCP tools remain blocked at the harness; the Bash script is the only supported archive-write invocation. SKILL: `platform/plugins/whatsapp-import/skills/whatsapp-import/SKILL.md`.
|
|
129
129
|
- **Phase 2 — enrich** (`whatsapp-import-enrich` skill). Operator-triggered ("enrich the X chat"). First runs `mcp__memory__whatsapp-export-insight-pass` against the already-loaded Conversation (chunkSize=50, overlap=5, server-side `confidence>=0.8` gate) to lay down `:Observation {observationStatus:'auto-extracted'}` rows. Then walks the auto-created participants and auto-extracted observations, surfacing evidence per row, and writes operator-confirmed wiring (`apoc.refactor.mergeNodes` for participant promotion/merge, `:MENTIONS` and `:RELATED_TO` edges with `evidenceSnippet`/`evidenceMessageIds`, `:Task` via `mcp__tasks__task-create`, `:Preference` via `memory-write`). Idempotent — re-running surfaces only items still in `auto-created`/`auto-extracted` state. SKILL: `platform/plugins/whatsapp-import/skills/whatsapp-import-enrich/SKILL.md`.
|