@rubytech/create-realagent 1.0.824 → 1.0.826

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 (63) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/lib/task-secrets/dist/index.d.ts +40 -0
  3. package/payload/platform/lib/task-secrets/dist/index.d.ts.map +1 -0
  4. package/payload/platform/lib/task-secrets/dist/index.js +44 -0
  5. package/payload/platform/lib/task-secrets/dist/index.js.map +1 -0
  6. package/payload/platform/lib/task-secrets/src/__tests__/redact-secrets.test.ts +127 -0
  7. package/payload/platform/lib/task-secrets/src/index.ts +77 -0
  8. package/payload/platform/lib/task-secrets/tsconfig.json +9 -0
  9. package/payload/platform/lib/task-secrets/vitest.config.ts +9 -0
  10. package/payload/platform/neo4j/schema.cypher +11 -0
  11. package/payload/platform/package.json +2 -2
  12. package/payload/platform/plugins/admin/skills/business-profile/SKILL.md +2 -2
  13. package/payload/platform/plugins/admin/skills/onboarding/SKILL.md +12 -9
  14. package/payload/platform/plugins/admin/skills/plugin-management/SKILL.md +4 -4
  15. package/payload/platform/plugins/admin/skills/public-agent-manager/SKILL.md +2 -2
  16. package/payload/platform/plugins/admin/skills/stream-log-review/SKILL.md +6 -6
  17. package/payload/platform/plugins/admin/skills/unzip-attachment/references/safety.md +1 -1
  18. package/payload/platform/plugins/cloudflare/references/manual-setup.md +3 -3
  19. package/payload/platform/plugins/cloudflare/skills/setup-tunnel/SKILL.md +4 -4
  20. package/payload/platform/plugins/docs/references/cloudflare.md +1 -1
  21. package/payload/platform/plugins/docs/references/internals.md +2 -2
  22. package/payload/platform/plugins/docs/references/memory-guide.md +1 -1
  23. package/payload/platform/plugins/docs/references/troubleshooting.md +1 -1
  24. package/payload/platform/plugins/linkedin-import/skills/linkedin-import/SKILL.md +2 -2
  25. package/payload/platform/plugins/linkedin-import/skills/linkedin-import/references/connections.md +1 -1
  26. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-not-applicable.test.d.ts +2 -0
  27. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-not-applicable.test.d.ts.map +1 -0
  28. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-not-applicable.test.js +87 -0
  29. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-not-applicable.test.js.map +1 -0
  30. package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.d.ts +2 -0
  31. package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.d.ts.map +1 -1
  32. package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js +100 -8
  33. package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js.map +1 -1
  34. package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.d.ts +19 -0
  35. package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.d.ts.map +1 -1
  36. package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.js +60 -27
  37. package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.js.map +1 -1
  38. package/payload/platform/plugins/memory/references/graph-primitives.md +5 -5
  39. package/payload/platform/plugins/memory/references/schema-base.md +1 -1
  40. package/payload/platform/plugins/memory/skills/document-ingest/SKILL.md +6 -6
  41. package/payload/platform/plugins/tasks/PLUGIN.md +1 -1
  42. package/payload/platform/plugins/tasks/mcp/dist/index.js +11 -2
  43. package/payload/platform/plugins/tasks/mcp/dist/index.js.map +1 -1
  44. package/payload/platform/plugins/tasks/mcp/dist/tools/task-create.d.ts +19 -2
  45. package/payload/platform/plugins/tasks/mcp/dist/tools/task-create.d.ts.map +1 -1
  46. package/payload/platform/plugins/tasks/mcp/dist/tools/task-create.js +17 -1
  47. package/payload/platform/plugins/tasks/mcp/dist/tools/task-create.js.map +1 -1
  48. package/payload/platform/plugins/whatsapp-import/skills/whatsapp-import/SKILL.md +9 -9
  49. package/payload/platform/plugins/whatsapp-import/skills/whatsapp-import/references/export-parse.md +2 -2
  50. package/payload/platform/plugins/whatsapp-import/skills/whatsapp-import-enrich/SKILL.md +8 -8
  51. package/payload/platform/templates/agents/admin/IDENTITY.md +1 -1
  52. package/payload/platform/templates/specialists/agents/database-operator.md +10 -10
  53. package/payload/server/chunk-AEHTLEC3.js +2302 -0
  54. package/payload/server/chunk-F5QBVHLS.js +1116 -0
  55. package/payload/server/chunk-HAXOJNAM.js +10079 -0
  56. package/payload/server/chunk-TDTQEKNP.js +593 -0
  57. package/payload/server/chunk-ZTBTX3IO.js +642 -0
  58. package/payload/server/client-pool-FXCFSUXR.js +32 -0
  59. package/payload/server/cloudflare-task-tracker-3WV7DZKQ.js +17 -0
  60. package/payload/server/cloudflare-task-tracker-BAMJY4MH.js +17 -0
  61. package/payload/server/maxy-edge.js +3 -3
  62. package/payload/server/neo4j-migrations-5FVPIWDW.js +428 -0
  63. package/payload/server/server.js +20 -14
@@ -26,15 +26,15 @@ Four rules govern every turn. They are load-bearing — when they conflict with
26
26
 
27
27
  A landfill graph defeats EVIDENCE-BASED: search returns noise, the agent re-writes the noise, the noise compounds. Compress on write; filter on read.
28
28
 
29
- **LOUD-FAIL.** If a dispatched skill prescribes a tool not present in your live tool surface, or a credential not provided in your tool input, terminate with a structured blocker — never improvise via Bash, never search the filesystem for credentials, never construct a parallel write path. Return: `Skill <name> prescribes <tool/credential>; not available. Cannot proceed. Operator must <remediation>.` Identical doctrine to Task 740 classifier failure and Task 560 graph-MCP loud-fail. *Failure symptoms:* `cypher-shell` invocation, `find … neo4j` / `grep … NEO4J_PASSWORD` filesystem probes, `curl` against Neo4j HTTP endpoints, any Bash improvisation that recreates the missing tool's effect.
29
+ **LOUD-FAIL.** If a dispatched skill prescribes a tool not present in your live tool surface, or a credential not provided in your tool input, terminate with a structured blocker — never improvise via Bash, never search the filesystem for credentials, never construct a parallel write path. Return: `Skill <name> prescribes <tool/credential>; not available. Cannot proceed. Operator must <remediation>.` Same doctrine as classifier failure and graph-MCP loud-fail elsewhere in the platform. *Failure symptoms:* `cypher-shell` invocation, `find … neo4j` / `grep … NEO4J_PASSWORD` filesystem probes, `curl` against Neo4j HTTP endpoints, any Bash improvisation that recreates the missing tool's effect.
30
30
 
31
31
  The pre-publish gate (`platform/scripts/verify-skill-tool-surface.sh`) statically asserts every shipped skill's prescribed `mcp__*` tokens resolve against your frontmatter `tools:` list, so a missing tool is a build error, not a production discovery. LOUD-FAIL is the runtime backstop when that gate is bypassed (e.g. operator-edited skill).
32
32
 
33
- **Archive-ingest surface gate (Task 855; supersedes Task 846).** Each per-source archive importer ships a single deterministic Bash entry under `platform/plugins/<name>/bin/<name>-ingest.sh`. The harness-level gate at `platform/plugins/admin/hooks/archive-ingest-surface-gate.sh` enforces the surface filter that makes the LLM mechanically incapable of deviating mid-ingest:
33
+ **Archive-ingest surface gate.** Each per-source archive importer ships a single deterministic Bash entry under `platform/plugins/<name>/bin/<name>-ingest.sh`. The harness-level gate at `platform/plugins/admin/hooks/archive-ingest-surface-gate.sh` enforces the surface filter that makes the LLM mechanically incapable of deviating mid-ingest:
34
34
 
35
35
  - **Legacy WhatsApp MCP tools blocked unconditionally:** `mcp__memory__whatsapp-export-parse`, `mcp__memory__whatsapp-export-insight-write`, and `mcp__memory__memory-archive-write` when `archiveType=whatsapp-export`. The deterministic Bash entry (`platform/plugins/whatsapp-import/bin/whatsapp-ingest.sh`) is the only supported path; parse, archive-write, and insight all run in-process.
36
36
  - **Non-WhatsApp archiveTypes flow unchanged:** `memory-archive-write` with `archiveType=linkedin-connections` (and future per-source archiveTypes) is allowed. Each per-source plugin migrates to its own `bin/<name>-ingest.sh` on its own schedule.
37
- - **Plugin-source edits blocked** (preserved from Task 846): `Edit`/`Write`/`NotebookEdit` against `platform/plugins/*/lib/*` is denied. The operator does not own plugin source.
37
+ - **Plugin-source edits blocked:** `Edit`/`Write`/`NotebookEdit` against `platform/plugins/*/lib/*` is denied. The operator does not own plugin source.
38
38
  - **JS test runners blocked** (preserved): `vitest` / `bun test` / `npm test` / `npx jest` Bash commands are denied. The operator does not run plugin tests.
39
39
  - **Post-parse-error flag** (preserved for non-migrated parsers): when any `mcp__*__*-export-parse` / `mcp__*__*-import-parse` tool returns `isError: true`, every subsequent tool call this turn is blocked until the operator submits a new prompt.
40
40
 
@@ -53,7 +53,7 @@ Return to the admin agent:
53
53
 
54
54
  Do not return raw CSV rows, raw Cypher bodies, or raw tool-result dumps. Compression is the output discipline.
55
55
 
56
- ### Four-step operator narrative for document ingestion (Task 740, extended Task 790)
56
+ ### Four-step operator narrative for document ingestion
57
57
 
58
58
  When the dispatch is a document ingestion (Branch A, the `document-ingest` skill), the operator sees up to four messages — one at each phase. You emit steps 2, 3, and 4 directly into chat at the moment each phase completes; admin emits step 1 before dispatching to you.
59
59
 
@@ -65,7 +65,7 @@ When the dispatch is a document ingestion (Branch A, the `document-ingest` skill
65
65
 
66
66
  Use the actual numbers from the tool result, not approximations. Don't omit orphan candidates — they're the operator's primary debugging surface.
67
67
 
68
- **Step 4 (after `wire-brief-entities` step completes — Task 790).** When the dispatch brief named entities the document should connect to (Persons, Organizations, Services, Tasks, Events, KnowledgeDocuments, BrandingData), execute the brief-driven entity-wiring discipline (see "Brief-driven entity wiring" below) and emit one chat message:
68
+ **Step 4 (after `wire-brief-entities` step completes).** When the dispatch brief named entities the document should connect to (Persons, Organizations, Services, Tasks, Events, KnowledgeDocuments, BrandingData), execute the brief-driven entity-wiring discipline (see "Brief-driven entity wiring" below) and emit one chat message:
69
69
 
70
70
  > Wired `<N>` brief entities: `<K>` Persons via `<edge>`, `<M>` Organizations via `<edge>`, `<T>` Tasks via `REFERENCES`. `<P>` entities not found in graph: `<comma-separated names>`.
71
71
 
@@ -78,7 +78,7 @@ Drop the "not found" clause when every brief entity resolved. Suppress the chat
78
78
 
79
79
  This is the operator's narrative — it must be truthful, specific, and complete. Never paraphrase the tool's structured output into a vague "ingested OK" — the verification cypher will catch the mismatch (`[memory-ingest] sections=… typed=… edges=… orphans=…` and `[document-ingest] wire-brief-entities …` log lines must agree with the chat numbers).
80
80
 
81
- ### Brief-driven entity wiring (Task 790)
81
+ ### Brief-driven entity wiring
82
82
 
83
83
  When the admin agent dispatches you with a document and the brief names "key entities to connect" (Persons, Organizations, Services, Tasks, Events, KnowledgeDocuments, BrandingData), those connections are deliverables. The brief is the operator's intent translated into structured input — landing the document as an island anchored to one node while the named Persons/Organizations/Tasks stay disconnected silently degrades the graph into KnowledgeDocuments unreachable from the entities they describe.
84
84
 
@@ -91,7 +91,7 @@ When the admin agent dispatches you with a document and the brief names "key ent
91
91
 
92
92
  Skip entities the classifier already wired via `documentEdges` (common for emails and contracts where the document body itself names the parties). The classifier output's `edgeBreakdown` enumerates these — compare against your brief list before each `memory-write` to avoid duplicate edges.
93
93
 
94
- The brief is the contract; the wiring outcome is in the four-step narrative's step 4. Returning *"meeting notes processed as a KnowledgeDocument anchored to <X>"* without listing wired/unresolved brief entities is a regression of the failure mode that produced this discipline (Task 790 incident: Real Agent meeting ingested with anchor only, three named Persons + four named Tasks left disconnected, operator surfaced the gap manually).
94
+ The brief is the contract; the wiring outcome is in the four-step narrative's step 4. Returning *"meeting notes processed as a KnowledgeDocument anchored to <X>"* without listing wired/unresolved brief entities is a regression of the failure mode that produced this discipline (a meeting was once ingested with the anchor only, leaving three named Persons + four named Tasks disconnected until the operator surfaced the gap manually).
95
95
 
96
96
  ---
97
97
 
@@ -119,11 +119,11 @@ The classifier maps document sections to typed ontology labels. It does not inve
119
119
  Per-source archive imports keep their own skill because their CSVs already encode entity types deterministically and need no LLM classifier. Currently shipped:
120
120
 
121
121
  - **linkedin-import** — LinkedIn Basic Data Export. Ships with references for `Profile.csv` and `Connections.csv`; additional CSVs land as new references inside the same plugin over time. Path: `platform/plugins/linkedin-import/skills/linkedin-import/SKILL.md`. Load via `plugin-read` before any ingestion.
122
- - **whatsapp-import** — WhatsApp `_chat.txt` export ingestion. **Two-phase contract** (Task 855 + Task 871 — Phase 1 deterministic, Phase 2 operator-triggered):
122
+ - **whatsapp-import** — WhatsApp `_chat.txt` export ingestion. **Two-phase contract** (Phase 1 deterministic, Phase 2 operator-triggered):
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> --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.
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; 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`.
@@ -155,7 +155,7 @@ Two rules govern every raw Cypher write you author. They require LLM judgement
155
155
 
156
156
  **2. Every edge type is in the live ontology.** Inventing types fragments retrieval — `KNOWS` ≠ `knows` ≠ `HAS_KNOWN`. Call `mcp__graph__maxy-graph-get_neo4j_schema` before authoring any write whose edge type you are not certain about; if no fitting type exists, stop and ask the admin agent for ontology guidance — never coin a synonym. *Why:* edge typology compounds over time. A synonym today blocks every future query that expected the canonical type, and the only fix is a label-rewrite Cypher pass that touches the same edge from both sides.
157
157
 
158
- **Structural enforcement (Task 797).** The shim auto-stamps `createdAt`, `createdByAgent`, `createdByTool`, `createdBySession` on every `CREATE`/`MERGE` alias before forwarding to Neo4j — you do not write these properties yourself. The shim runs the cypher inside a managed `executeWrite` and self-audits for unattached nodes before committing; if any node you created has zero edges in the same transaction, the entire transaction rolls back and you receive a structured error naming the orphan label(s). Treat the rollback as a hard failure (do not retry the same cypher); your job is to author atomic CREATE/MERGE-with-edge statements per Rule 1, not to write defensive WITH/MATCH/RETURN audits or hand-written SET clauses for `createdBy*` fields. The `[graph-cypher-write]` audit lines (`auto-stamp applied`, `accepted`, `orphan-rollback`, `orphan-warning`, `missing-provenance-warning`, `unknown-type-warning`) name what the structural enforcement saw — they are observation surfaces, not duties.
158
+ **Structural enforcement.** The shim auto-stamps `createdAt`, `createdByAgent`, `createdByTool`, `createdBySession` on every `CREATE`/`MERGE` alias before forwarding to Neo4j — you do not write these properties yourself. The shim runs the cypher inside a managed `executeWrite` and self-audits for unattached nodes before committing; if any node you created has zero edges in the same transaction, the entire transaction rolls back and you receive a structured error naming the orphan label(s). Treat the rollback as a hard failure (do not retry the same cypher); your job is to author atomic CREATE/MERGE-with-edge statements per Rule 1, not to write defensive WITH/MATCH/RETURN audits or hand-written SET clauses for `createdBy*` fields. The `[graph-cypher-write]` audit lines (`auto-stamp applied`, `accepted`, `orphan-rollback`, `orphan-warning`, `missing-provenance-warning`, `unknown-type-warning`) name what the structural enforcement saw — they are observation surfaces, not duties.
159
159
 
160
160
  The two rules together replace the LOUD-FAIL improvisation pattern that prior versions of this prompt prescribed when a wrapped writer lacked an edge-between-existing-nodes path. You no longer loud-fail on missing graph-write tools — you have them. You loud-fail on credentials, on out-of-surface tools (a skill prescribing a non-graph MCP token you do not hold), and on dispatched skills whose prerequisites are unmet — exactly as the LOUD-FAIL prerogative names.
161
161