@psiclawops/hypermem 0.1.0 → 0.5.0
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/ARCHITECTURE.md +4 -3
- package/README.md +457 -174
- package/package.json +15 -5
- package/dist/background-indexer.d.ts +0 -117
- package/dist/background-indexer.d.ts.map +0 -1
- package/dist/background-indexer.js +0 -732
- package/dist/compaction-fence.d.ts +0 -89
- package/dist/compaction-fence.d.ts.map +0 -1
- package/dist/compaction-fence.js +0 -153
- package/dist/compositor.d.ts +0 -139
- package/dist/compositor.d.ts.map +0 -1
- package/dist/compositor.js +0 -1109
- package/dist/cross-agent.d.ts +0 -57
- package/dist/cross-agent.d.ts.map +0 -1
- package/dist/cross-agent.js +0 -254
- package/dist/db.d.ts +0 -131
- package/dist/db.d.ts.map +0 -1
- package/dist/db.js +0 -398
- package/dist/desired-state-store.d.ts +0 -100
- package/dist/desired-state-store.d.ts.map +0 -1
- package/dist/desired-state-store.js +0 -212
- package/dist/doc-chunk-store.d.ts +0 -115
- package/dist/doc-chunk-store.d.ts.map +0 -1
- package/dist/doc-chunk-store.js +0 -278
- package/dist/doc-chunker.d.ts +0 -99
- package/dist/doc-chunker.d.ts.map +0 -1
- package/dist/doc-chunker.js +0 -324
- package/dist/episode-store.d.ts +0 -48
- package/dist/episode-store.d.ts.map +0 -1
- package/dist/episode-store.js +0 -135
- package/dist/fact-store.d.ts +0 -57
- package/dist/fact-store.d.ts.map +0 -1
- package/dist/fact-store.js +0 -175
- package/dist/fleet-store.d.ts +0 -144
- package/dist/fleet-store.d.ts.map +0 -1
- package/dist/fleet-store.js +0 -276
- package/dist/hybrid-retrieval.d.ts +0 -60
- package/dist/hybrid-retrieval.d.ts.map +0 -1
- package/dist/hybrid-retrieval.js +0 -340
- package/dist/index.d.ts +0 -611
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -1042
- package/dist/knowledge-graph.d.ts +0 -110
- package/dist/knowledge-graph.d.ts.map +0 -1
- package/dist/knowledge-graph.js +0 -305
- package/dist/knowledge-store.d.ts +0 -72
- package/dist/knowledge-store.d.ts.map +0 -1
- package/dist/knowledge-store.js +0 -241
- package/dist/library-schema.d.ts +0 -22
- package/dist/library-schema.d.ts.map +0 -1
- package/dist/library-schema.js +0 -717
- package/dist/message-store.d.ts +0 -76
- package/dist/message-store.d.ts.map +0 -1
- package/dist/message-store.js +0 -273
- package/dist/preference-store.d.ts +0 -54
- package/dist/preference-store.d.ts.map +0 -1
- package/dist/preference-store.js +0 -109
- package/dist/preservation-gate.d.ts +0 -82
- package/dist/preservation-gate.d.ts.map +0 -1
- package/dist/preservation-gate.js +0 -150
- package/dist/provider-translator.d.ts +0 -40
- package/dist/provider-translator.d.ts.map +0 -1
- package/dist/provider-translator.js +0 -349
- package/dist/rate-limiter.d.ts +0 -76
- package/dist/rate-limiter.d.ts.map +0 -1
- package/dist/rate-limiter.js +0 -179
- package/dist/redis.d.ts +0 -188
- package/dist/redis.d.ts.map +0 -1
- package/dist/redis.js +0 -534
- package/dist/schema.d.ts +0 -15
- package/dist/schema.d.ts.map +0 -1
- package/dist/schema.js +0 -203
- package/dist/secret-scanner.d.ts +0 -51
- package/dist/secret-scanner.d.ts.map +0 -1
- package/dist/secret-scanner.js +0 -248
- package/dist/seed.d.ts +0 -108
- package/dist/seed.d.ts.map +0 -1
- package/dist/seed.js +0 -177
- package/dist/system-store.d.ts +0 -73
- package/dist/system-store.d.ts.map +0 -1
- package/dist/system-store.js +0 -182
- package/dist/topic-store.d.ts +0 -45
- package/dist/topic-store.d.ts.map +0 -1
- package/dist/topic-store.js +0 -136
- package/dist/types.d.ts +0 -329
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -9
- package/dist/vector-store.d.ts +0 -132
- package/dist/vector-store.d.ts.map +0 -1
- package/dist/vector-store.js +0 -498
- package/dist/work-store.d.ts +0 -112
- package/dist/work-store.d.ts.map +0 -1
- package/dist/work-store.js +0 -273
package/ARCHITECTURE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# hypermem Architecture
|
|
2
2
|
|
|
3
3
|
_Agent-centric memory that outlives sessions._
|
|
4
4
|
|
|
@@ -164,7 +164,7 @@ This means:
|
|
|
164
164
|
`plugin/src/index.ts` — OpenClaw context engine plugin (replaces basic hook integration):
|
|
165
165
|
|
|
166
166
|
```
|
|
167
|
-
gateway:startup → Init
|
|
167
|
+
gateway:startup → Init hypermem, auto-rotate DBs, hydrate fleet cache
|
|
168
168
|
agent:bootstrap → Warm session (history, facts, profile → Redis)
|
|
169
169
|
context:assemble → Full four-layer prompt assembly within token budget
|
|
170
170
|
agent:afterTurn → Ingest new messages to SQLite + Redis, trigger background indexer
|
|
@@ -227,12 +227,13 @@ Incident history: `specs/HYPERMEM_INCIDENT_HISTORY.md`
|
|
|
227
227
|
| Cross-session context boundary markers | WQ-20260402-001 | 🟡 OPEN | `buildCrossSessionContext()` renders flat previews, no per-message boundaries or sender identity. Incident 6. |
|
|
228
228
|
| Cursor durability (SQLite dual-write) | — | 🟡 DEFERRED | Cursor TTL = 24h. Dual-write to SQLite required before background indexer reads cursor. Gate 2. |
|
|
229
229
|
| Plugin type unification | — | 🟡 DEFERRED | Plugin uses dynamic imports; can't use TS types from core. Shims are intentional. Structural change needed. |
|
|
230
|
+
| Strict topic mode: legacy NULL backfill | — | 🟡 DEFERRED | After ≥2 weeks of topic detection in production, run backfill to assign `topic_id` to legacy NULL messages, then narrow `getRecentMessagesByTopic()` to exclude NULL. Gate: topic detection must be stable and coverage >80% of new messages before narrowing. Tracked in `specs/DEFERRED.md`. |
|
|
230
231
|
| ACA Step 4 — retrieval stubs replace static files | — | 🔲 PENDING | `systemPromptAddition` carries governance doc chunks instead of embedding full workspace files. Blocked on Step 3 ✅ |
|
|
231
232
|
| ACA Step 5 — governance context assembly | — | 🔲 PENDING | Full on-demand assembly replaces static prompt injection. Requires Step 4. |
|
|
232
233
|
|
|
233
234
|
### Runtime Contract
|
|
234
235
|
|
|
235
|
-
**Exclusive dispatch:** The OpenClaw runtime calls either `afterTurn()` OR `ingest()`/`ingestBatch()`, never both. Since
|
|
236
|
+
**Exclusive dispatch:** The OpenClaw runtime calls either `afterTurn()` OR `ingest()`/`ingestBatch()`, never both. Since hypermem implements `afterTurn`, it must handle message ingestion there. `ingest()` exists for API compatibility but is never called by the runtime in practice.
|
|
236
237
|
|
|
237
238
|
**Provider translation:** The plugin sets `skipProviderTranslation: true` on compose requests. The compositor returns NeutralMessages; the plugin converts to AgentMessages. The runtime handles provider-specific translation. Two-stage translation (compositor → provider format → plugin → agent format) was the root cause of Incident 1 (silent tool call drops).
|
|
238
239
|
|