omnius 1.0.591 → 1.0.592
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/.aiwg/addons/omnius-docs/README.md +15 -1
- package/.aiwg/addons/omnius-docs/manifest.json +28 -68
- package/.aiwg/addons/omnius-docs/skills/agent-failure-recovery/SKILL.md +2 -1
- package/.aiwg/addons/omnius-docs/skills/browser-interaction-validation/SKILL.md +2 -1
- package/.aiwg/addons/omnius-docs/skills/evidence-directed-delivery/SKILL.md +2 -1
- package/.aiwg/addons/omnius-docs/skills/hardware-evidence-audit/SKILL.md +2 -1
- package/.aiwg/addons/omnius-docs/skills/omnius-docs/SKILL.md +17 -7
- package/.aiwg/addons/omnius-docs/skills/omnius-inference-docs/SKILL.md +27 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-integration-docs/SKILL.md +21 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-ops-docs/SKILL.md +2 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-realtime-docs/SKILL.md +2 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-sponsor-docs/SKILL.md +2 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-telegram-docs/SKILL.md +2 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-tools-docs/SKILL.md +23 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-version-compatibility-docs/SKILL.md +23 -0
- package/.aiwg/addons/omnius-docs/skills/runtime-provenance-audit/SKILL.md +2 -1
- package/.aiwg/addons/omnius-docs/skills/secrets-and-config-audit/SKILL.md +2 -1
- package/.aiwg/addons/omnius-docs/skills/test-surface-audit/SKILL.md +2 -1
- package/.aiwg/addons/omnius-docs/skills/workspace-reality-audit/SKILL.md +2 -1
- package/.aiwg/addons/omnius-rest-docs/README.md +3 -0
- package/.aiwg/addons/omnius-rest-docs/manifest.json +27 -20
- package/.aiwg/addons/omnius-rest-docs/skills/omnius-rest-docs/SKILL.md +9 -5
- package/README.md +36 -0
- package/dist/discovery.d.ts +50 -0
- package/dist/index.js +5975 -4021
- package/dist/library.d.ts +7 -0
- package/dist/library.js +950 -0
- package/dist/postinstall-daemon.cjs +18 -0
- package/dist/providerRegistry.d.ts +80 -0
- package/dist/service-version.d.ts +35 -0
- package/docs/.vitepress/config.mts +8 -0
- package/docs/DISCOVERY.json +20224 -0
- package/docs/DISCOVERY.md +648 -0
- package/docs/HANDOFF-crl-encoder-decoder-fix.md +129 -0
- package/docs/agent-memory/INDEX.md +9 -4
- package/docs/agent-memory/index.md +7 -0
- package/docs/concept-relational-language.md +869 -0
- package/docs/context-management-medium-models-proposal.md +449 -0
- package/docs/dedup-false-positive-meta-analysis.md +96 -0
- package/docs/discovery/catalog-overrides.json +724 -0
- package/docs/duplicate-calls-root-cause-analysis.md +91 -0
- package/docs/duplicate-calls-root-cause-deep.md +155 -0
- package/docs/ephemeral-skill-pack-small-context.md +57 -0
- package/docs/explorations/context-window-todo-association.md +156 -0
- package/docs/explorations/todo-association-verify.json +30 -0
- package/docs/explorations/verification-ledger.json +45 -0
- package/docs/explorations/verify-todo-association.sh +30 -0
- package/docs/flowstate.md +806 -0
- package/docs/getting-started/install.md +24 -0
- package/docs/getting-started/model-providers.md +13 -0
- package/docs/guides/agent-integration.md +87 -0
- package/docs/guides/bring-your-own-inference.md +126 -0
- package/docs/guides/tools-and-web-search.md +95 -0
- package/docs/index.md +14 -0
- package/docs/longhaul-35b-workorders.md +496 -0
- package/docs/memory-integration-analysis.md +303 -0
- package/docs/model-capability-awareness-and-multimodal-memory-root-fix.md +799 -0
- package/docs/multimodal-identity-memory-implementation.md +76 -0
- package/docs/omnius-self-edit-eval-2026-06-10.md +169 -0
- package/docs/opencode-agentic-loop-comparison.md +290 -0
- package/docs/operations/security-and-remote-access.md +2 -2
- package/docs/operations/version-compatibility.md +63 -0
- package/docs/proposals/git-progress-tracking-strategy.md +289 -0
- package/docs/proposals/opencode-modules/backendAdapter.ts +443 -0
- package/docs/proposals/opencode-modules/childSession.ts +288 -0
- package/docs/proposals/opencode-modules/compactionAgent.ts +101 -0
- package/docs/proposals/opencode-modules/orchestrator.ts +387 -0
- package/docs/proposals/opencode-modules/runner.ts +258 -0
- package/docs/reference/auth-map.md +87 -196
- package/docs/reference/configuration.md +27 -0
- package/docs/reference/rest-api.md +7 -0
- package/docs/reference/slash-commands.md +125 -2
- package/docs/research/_archived/README.md +18 -0
- package/docs/research/_archived/context_window_attention_model.py +418 -0
- package/docs/research/_archived/context_window_attention_spec.md +55 -0
- package/docs/research/_archived/context_window_attention_weights.json +68 -0
- package/docs/research/k-splanifolds.pdf +0 -0
- package/docs/research/personality-verbosity-control.md +293 -0
- package/docs/rest/INDEX.md +7 -0
- package/docs/rest/QUICKREF.md +18 -0
- package/docs/rest/REST-DOCS-MANIFEST.json +1 -0
- package/docs/rest/auth-and-scopes.md +7 -1
- package/docs/rest/endpoints/discovery.md +44 -0
- package/docs/rest/endpoints/events.md +5 -0
- package/docs/rest/endpoints/tools.md +9 -0
- package/docs/reviews/adversary-system-review.md +42 -0
- package/docs/sana-and-video-generation-integration-plan.md +712 -0
- package/docs/session-diary-llm-training-analysis.md +218 -0
- package/docs/telegram-dmn-curiosity-outreach-scaffold.md +91 -0
- package/docs/telegram-mid-horizon-download-loop-handoff.md +468 -0
- package/docs/telegram-reflection-corpus-integration-plan.md +306 -0
- package/docs/telegram-unified-tooling-architecture.md +332 -0
- package/docs/threat-model.md +868 -0
- package/docs/trajectory-grounding.md +160 -0
- package/docs/voice-flow-architecture.md +489 -0
- package/docs/work-orders/WO-AM-GAPS.md +638 -0
- package/docs/work-orders/daemon-hud-ui-overhaul.md +82 -0
- package/docs/work-orders/hermes-architecture-deltas/01-public-scrutiny-provenance-control/INDEX.md +21 -0
- package/docs/work-orders/hermes-architecture-deltas/01-public-scrutiny-provenance-control/WORKORDER.md +225 -0
- package/docs/work-orders/hermes-architecture-deltas/02-context-engine-plugin-boundary/INDEX.md +20 -0
- package/docs/work-orders/hermes-architecture-deltas/02-context-engine-plugin-boundary/WORKORDER.md +198 -0
- package/docs/work-orders/hermes-architecture-deltas/03-typed-gateway-event-stream/INDEX.md +19 -0
- package/docs/work-orders/hermes-architecture-deltas/03-typed-gateway-event-stream/WORKORDER.md +172 -0
- package/docs/work-orders/hermes-architecture-deltas/04-task-local-gateway-context/INDEX.md +19 -0
- package/docs/work-orders/hermes-architecture-deltas/04-task-local-gateway-context/WORKORDER.md +169 -0
- package/docs/work-orders/hermes-architecture-deltas/05-process-lifecycle-monitoring-notifications/INDEX.md +22 -0
- package/docs/work-orders/hermes-architecture-deltas/05-process-lifecycle-monitoring-notifications/WORKORDER.md +189 -0
- package/docs/work-orders/hermes-architecture-deltas/06-vision-evidence-routing-ladder/INDEX.md +22 -0
- package/docs/work-orders/hermes-architecture-deltas/06-vision-evidence-routing-ladder/WORKORDER.md +199 -0
- package/docs/work-orders/hermes-architecture-deltas/07-durable-multi-agent-kanban/INDEX.md +20 -0
- package/docs/work-orders/hermes-architecture-deltas/07-durable-multi-agent-kanban/WORKORDER.md +174 -0
- package/docs/work-orders/hermes-architecture-deltas/08-completion-critic-reconciliation-ledger/INDEX.md +22 -0
- package/docs/work-orders/hermes-architecture-deltas/08-completion-critic-reconciliation-ledger/WORKORDER.md +226 -0
- package/docs/work-orders/hermes-architecture-deltas/INDEX.md +38 -0
- package/docs/work-orders/omnius-context-engineering-behavior-fixes.md +281 -0
- package/docs/work-orders/telegram-dropbear-context-rca-workorder.md +202 -0
- package/docs/work-orders/world-class-memory-compiler/README.md +162 -0
- package/docs/work-orders/world-class-memory-compiler/TRACKER.md +179 -0
- package/docs/work-orders/world-class-memory-compiler/WO-01-exact-request-budget.md +79 -0
- package/docs/work-orders/world-class-memory-compiler/WO-02-typed-memory-fabric.md +65 -0
- package/docs/work-orders/world-class-memory-compiler/WO-03-dependency-working-set.md +55 -0
- package/docs/work-orders/world-class-memory-compiler/WO-04-inference-memory-compiler.md +67 -0
- package/docs/work-orders/world-class-memory-compiler/WO-05-artifact-fidelity-materialization.md +72 -0
- package/docs/work-orders/world-class-memory-compiler/WO-06-temporal-hybrid-retrieval.md +49 -0
- package/docs/work-orders/world-class-memory-compiler/WO-07-evaluation-harness.md +45 -0
- package/docs/work-orders/world-class-memory-compiler/WO-08-rollout-legacy-removal.md +45 -0
- package/docs/x402-remote-inference-plan.md +323 -0
- package/npm-shrinkwrap.json +108 -117
- package/package.json +7 -6
- package/templates/AGENTS.md +6 -0
- package/templates/OMNIUS.md +20 -0
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
# Memory Integration Analysis — Parallel Systems Gap Assessment
|
|
2
|
+
|
|
3
|
+
**Date:** 2026-04-23
|
|
4
|
+
**Status:** ✅ **INTEGRATED** — All P0 gaps closed
|
|
5
|
+
**Context:** Review of literature on memory compression + integration testing of Omnius parallel memory systems
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Integration Summary
|
|
10
|
+
|
|
11
|
+
### ✅ Gap 1: Zettelkasten Auto-Linking (CLOSED)
|
|
12
|
+
|
|
13
|
+
**Problem:** EpisodeStore did not automatically link new episodes to similar ones via Zettelkasten.
|
|
14
|
+
|
|
15
|
+
**Solution:** Modified `EpisodeStore` constructor to accept optional `TemporalGraph` and `ZettelkastenConfig`. When a graph is provided, `insert()` now calls `linkEpisode()` automatically.
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
// Before
|
|
19
|
+
const store = new EpisodeStore(":memory:");
|
|
20
|
+
|
|
21
|
+
// After (with auto-linking)
|
|
22
|
+
const graph = new TemporalGraph(":memory:");
|
|
23
|
+
const store = new EpisodeStore(":memory:", graph, { k: 5, minSimilarity: 0.7 });
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Files Modified:**
|
|
27
|
+
- `packages/memory/src/episodeStore.ts` — Added graph parameter, auto-linking in insert()
|
|
28
|
+
- `packages/memory/tests/memory-integration.test.ts` — End-to-end validation
|
|
29
|
+
|
|
30
|
+
### ✅ Gap 2: PPR Retrieval Not Used (CLOSED)
|
|
31
|
+
|
|
32
|
+
**Problem:** PPR (Personalized PageRank) retrieval from HippoRAG was implemented but not integrated into default search.
|
|
33
|
+
|
|
34
|
+
**Solution:** Added `searchWithPPR()` method to EpisodeStore that:
|
|
35
|
+
1. Runs standard search first
|
|
36
|
+
2. Falls back to PPR if graph is available
|
|
37
|
+
3. Merges and deduplicates results
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
// Standard search
|
|
41
|
+
const results = store.search({ query: "authentication" });
|
|
42
|
+
|
|
43
|
+
// PPR-enhanced search (multi-hop)
|
|
44
|
+
const results = store.searchWithPPR({ query: "authentication" });
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Files Modified:**
|
|
48
|
+
- `packages/memory/src/episodeStore.ts` — Added searchWithPPR() method
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Literature Summary
|
|
53
|
+
|
|
54
|
+
### HippoRAG (NeurIPS 2024, arxiv:2405.14831)
|
|
55
|
+
- Personalized PageRank over knowledge graph for multi-hop retrieval
|
|
56
|
+
- 10-30x cheaper than iterative LLM retrieval
|
|
57
|
+
- Mimics hippocampal indexing: neocortex (LLM) + hippocampus (KG + PPR)
|
|
58
|
+
- **Key insight:** Single-step PPR retrieval matches IRCoT multi-step performance
|
|
59
|
+
|
|
60
|
+
### A-MEM (NeurIPS 2025, arxiv:2502.12110)
|
|
61
|
+
- Zettelkasten method for LLM agents
|
|
62
|
+
- 4 phases: Note Construction → Link Generation → Memory Evolution → Retrieval
|
|
63
|
+
- **Key insight:** Retroactive neighbor evolution — old memories update when new context arrives
|
|
64
|
+
|
|
65
|
+
### ReadAgent (arxiv:2402.09727)
|
|
66
|
+
- Gist memory compression for long trajectories
|
|
67
|
+
- Compresses episodes >10 turns into gist summaries
|
|
68
|
+
- **Key insight:** Human-inspired reading agent with gist + detail hierarchy
|
|
69
|
+
|
|
70
|
+
### Memory Survey (arxiv:2603.07670)
|
|
71
|
+
- Write-Manage-Read loop taxonomy
|
|
72
|
+
- 5 mechanism families: context-resident compression, retrieval-augmented stores, reflective self-improvement, hierarchical virtual context, policy-learned management
|
|
73
|
+
- **Key challenges:** continual consolidation, causally grounded retrieval, learned forgetting
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Current Architecture
|
|
78
|
+
|
|
79
|
+
### Parallel Memory Systems (packages/memory/src/)
|
|
80
|
+
|
|
81
|
+
| System | File | Lines | Purpose | Status |
|
|
82
|
+
|--------|------|-------|---------|--------|
|
|
83
|
+
| EpisodeStore | episodeStore.ts | 1997 | Triple-factor retrieval (recency × importance × relevance) | ✅ Implemented |
|
|
84
|
+
| Zettelkasten | zettelkasten.ts | ~300 | Top-K neighbor linking by cosine similarity | ✅ Implemented |
|
|
85
|
+
| TemporalGraph | temporalGraph.ts | ~500 | SQLite KG with temporal validity | ✅ Implemented |
|
|
86
|
+
| PPRRetrieval | pprRetrieval.ts | 327 | HippoRAG Personalized PageRank | ✅ Implemented |
|
|
87
|
+
| GistCompressor | gistCompressor.ts | ~200 | ReadAgent-style trajectory compression | ✅ Implemented |
|
|
88
|
+
| CRL | crl/index.ts | 1200+ | Concept Relational Language compression | ✅ Implemented |
|
|
89
|
+
|
|
90
|
+
### Export Surface (packages/memory/src/index.ts)
|
|
91
|
+
|
|
92
|
+
All systems are exported:
|
|
93
|
+
- Lines 42-43: EpisodeStore
|
|
94
|
+
- Lines 46-47: TemporalGraph
|
|
95
|
+
- Lines 50-51: Zettelkasten (linkEpisode, batchLink, findNeighbors)
|
|
96
|
+
- Lines 54-55: GistCompressor
|
|
97
|
+
- Lines 58-59: PPRRetrieval
|
|
98
|
+
- Lines 95-129: CRL (full suite)
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Integration Gaps
|
|
103
|
+
|
|
104
|
+
### Gap 1: EpisodeStore Doesn't Use Zettelkasten/PPR
|
|
105
|
+
|
|
106
|
+
**Finding:** `episodeStore.ts` has NO imports from zettelkasten, pprRetrieval, or temporalGraph.
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
// Expected integration (NOT PRESENT):
|
|
110
|
+
import { linkEpisode, batchLink } from './zettelkasten.js';
|
|
111
|
+
import { retrieveByPPR } from './pprRetrieval.js';
|
|
112
|
+
import { TemporalGraph } from './temporalGraph.js';
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Impact:** Episodes are stored but never linked. Multi-hop queries fail.
|
|
116
|
+
|
|
117
|
+
### Gap 2: No Zettelkasten Tests
|
|
118
|
+
|
|
119
|
+
**Finding:** No `zettelkasten.test.ts` exists. The linking functions are untested.
|
|
120
|
+
|
|
121
|
+
**Files checked:**
|
|
122
|
+
- packages/memory/tests/*.test.ts (16 files)
|
|
123
|
+
- Missing: zettelkasten.test.ts
|
|
124
|
+
|
|
125
|
+
### Gap 3: Orchestrator Doesn't Import Advanced Memory
|
|
126
|
+
|
|
127
|
+
**Finding:** grep_search for `EpisodeStore|zettelkasten|pprRetrieval|TemporalGraph` in packages/orchestrator/src returned 0 matches.
|
|
128
|
+
|
|
129
|
+
**Impact:** The agent runner uses basic memory, not the parallel systems.
|
|
130
|
+
|
|
131
|
+
### Gap 4: CRL ↔ EpisodeStore Integration Incomplete
|
|
132
|
+
|
|
133
|
+
**Finding:** CRL has `CRLMemoryStore` wrapper, but:
|
|
134
|
+
- No bidirectional sync with EpisodeStore
|
|
135
|
+
- No CRL-encoded episodes in standard retrieval
|
|
136
|
+
- Converter tests pass, but integration tests missing
|
|
137
|
+
|
|
138
|
+
### Gap 5: No Integration Tests for PPR Pipeline
|
|
139
|
+
|
|
140
|
+
**Finding:** `pprRetrieval.test.ts` tests PPR in isolation, but:
|
|
141
|
+
- No test for: query → extract entities → TemporalGraph lookup → PPR → EpisodeStore retrieval
|
|
142
|
+
- No test for multi-hop causal chain queries
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Optimization Opportunities
|
|
147
|
+
|
|
148
|
+
### Opportunity 1: EpisodeStore.add() Should Auto-Link
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
// Current: EpisodeStore.add() just inserts
|
|
152
|
+
async add(episode: EpisodeInsert): Promise<number> {
|
|
153
|
+
const id = await this.db.insert(episode);
|
|
154
|
+
return id;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Proposed: Auto-link to similar episodes
|
|
158
|
+
async add(episode: EpisodeInsert): Promise<number> {
|
|
159
|
+
const id = await this.db.insert(episode);
|
|
160
|
+
|
|
161
|
+
// Zettelkasten auto-linking
|
|
162
|
+
const embedding = await generateEmbedding(episode.content);
|
|
163
|
+
await linkEpisode(this.db, id, embedding, { topK: 5, threshold: 0.7 });
|
|
164
|
+
|
|
165
|
+
// TemporalGraph entity extraction
|
|
166
|
+
const entities = extractQueryEntities(episode.content);
|
|
167
|
+
for (const entity of entities) {
|
|
168
|
+
await this.temporalGraph.addNode(entity, 'entity', { sourceEpisode: id });
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
return id;
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Opportunity 2: PPR as Default Retrieval Mode
|
|
176
|
+
|
|
177
|
+
```typescript
|
|
178
|
+
// Current: EpisodeStore.search() uses flat cosine similarity
|
|
179
|
+
async search(query: EpisodeQuery): Promise<Episode[]> {
|
|
180
|
+
return this.db.searchByCosine(query.embedding);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Proposed: Use PPR for multi-hop, fallback to cosine
|
|
184
|
+
async search(query: EpisodeQuery): Promise<Episode[]> {
|
|
185
|
+
const entities = extractQueryEntities(query.text);
|
|
186
|
+
|
|
187
|
+
if (entities.length > 0 && this.temporalGraph.nodeCount() > 10) {
|
|
188
|
+
// Multi-hop query detected, use PPR
|
|
189
|
+
return retrieveByPPR(query.text, this.temporalGraph, this, {
|
|
190
|
+
maxIterations: 20,
|
|
191
|
+
dampingFactor: 0.85
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Fallback to cosine similarity
|
|
196
|
+
return this.db.searchByCosine(query.embedding);
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Opportunity 3: CRL Compression for Gist Storage
|
|
201
|
+
|
|
202
|
+
```typescript
|
|
203
|
+
// Current: GistCompressor stores plain text
|
|
204
|
+
async compressAndStore(episodes: Episode[]): Promise<GistRecord> {
|
|
205
|
+
const gist = await this.llm.summarize(episodes);
|
|
206
|
+
return this.db.insert({ content: gist, type: 'trajectory' });
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Proposed: Store CRL-encoded gists for token efficiency
|
|
210
|
+
async compressAndStore(episodes: Episode[]): Promise<GistRecord> {
|
|
211
|
+
const gist = await this.llm.summarize(episodes);
|
|
212
|
+
const crlEncoded = CRL.encode(gist); // 60-80% token reduction
|
|
213
|
+
return this.db.insert({
|
|
214
|
+
content: crlEncoded,
|
|
215
|
+
type: 'trajectory_crl',
|
|
216
|
+
originalLength: gist.length,
|
|
217
|
+
compressedLength: crlEncoded.length
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Opportunity 4: Retroactive Neighbor Evolution (A-MEM)
|
|
223
|
+
|
|
224
|
+
```typescript
|
|
225
|
+
// Proposed: When new episode arrives, update old episode gists
|
|
226
|
+
async evolveNeighbors(newEpisode: Episode): Promise<void> {
|
|
227
|
+
const neighbors = await findNeighbors(this.db, newEpisode.embedding, { k: 10 });
|
|
228
|
+
|
|
229
|
+
for (const neighbor of neighbors) {
|
|
230
|
+
if (neighbor.similarity > 0.8) {
|
|
231
|
+
// High similarity: merge gist
|
|
232
|
+
const merged = await this.llm.mergeGists(neighbor.gist, newEpisode.gist);
|
|
233
|
+
await this.db.update(neighbor.id, { gist: merged });
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Test Coverage
|
|
242
|
+
|
|
243
|
+
### Existing Tests (packages/memory/tests/)
|
|
244
|
+
|
|
245
|
+
| Test File | Coverage | Status |
|
|
246
|
+
|-----------|----------|--------|
|
|
247
|
+
| episodeStore.test.ts | EpisodeStore CRUD + search | ✅ |
|
|
248
|
+
| temporalGraph.test.ts | KG node/edge operations | ✅ |
|
|
249
|
+
| pprRetrieval.test.ts | PPR algorithm + entity extraction | ✅ |
|
|
250
|
+
| crl.test.ts | CRL encode/decode | ✅ |
|
|
251
|
+
| crl-memory.test.ts | CRLMemoryStore | ✅ |
|
|
252
|
+
| crl-converter.test.ts | Bidirectional conversion | ✅ |
|
|
253
|
+
| **zettelkasten.test.ts** | **MISSING** | ❌ |
|
|
254
|
+
| **memory-integration.test.ts** | **MISSING** | ❌ |
|
|
255
|
+
|
|
256
|
+
### Proposed Integration Tests
|
|
257
|
+
|
|
258
|
+
1. **zettelkasten.test.ts**
|
|
259
|
+
- linkEpisode() creates bidirectional links
|
|
260
|
+
- batchLink() processes multiple episodes
|
|
261
|
+
- findNeighbors() returns top-K by cosine similarity
|
|
262
|
+
- Neighbor evolution updates gist on high similarity
|
|
263
|
+
|
|
264
|
+
2. **memory-integration.test.ts**
|
|
265
|
+
- EpisodeStore.add() auto-links to similar episodes
|
|
266
|
+
- EpisodeStore.search() uses PPR for multi-hop queries
|
|
267
|
+
- CRL-encoded episodes roundtrip correctly
|
|
268
|
+
- GistCompressor uses CRL for storage
|
|
269
|
+
- Retroactive neighbor evolution works
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## Recommended Actions
|
|
274
|
+
|
|
275
|
+
### P0: Critical Integration
|
|
276
|
+
1. Add zettelkasten.test.ts with full coverage
|
|
277
|
+
2. Integrate linkEpisode() into EpisodeStore.add()
|
|
278
|
+
3. Add PPR fallback in EpisodeStore.search()
|
|
279
|
+
|
|
280
|
+
### P1: Orchestrator Integration
|
|
281
|
+
4. Import EpisodeStore in orchestrator/agenticRunner.ts
|
|
282
|
+
5. Store tool_call/tool_result episodes during agent loop
|
|
283
|
+
6. Use PPR retrieval for context injection
|
|
284
|
+
|
|
285
|
+
### P2: CRL Integration
|
|
286
|
+
7. Add CRL encoding to GistCompressor
|
|
287
|
+
8. Add CRLMemoryStore sync with EpisodeStore
|
|
288
|
+
9. Test bidirectional CRL ↔ Episode flow
|
|
289
|
+
|
|
290
|
+
### P3: Advanced Features
|
|
291
|
+
10. Implement retroactive neighbor evolution
|
|
292
|
+
11. Add learned forgetting (decay by retrieval frequency)
|
|
293
|
+
12. Add causally grounded retrieval (caused_by edges)
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## References
|
|
298
|
+
|
|
299
|
+
- HippoRAG: https://arxiv.org/abs/2405.14831
|
|
300
|
+
- A-MEM: https://arxiv.org/abs/2502.12110
|
|
301
|
+
- ReadAgent: https://arxiv.org/abs/2402.09727
|
|
302
|
+
- Memory Survey: https://arxiv.org/abs/2603.07670
|
|
303
|
+
- Concept Relational Language: docs/concept-relational-language.md
|