@shadowforge0/aquifer-memory 1.5.12 → 1.7.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/.env.example +23 -0
- package/README.md +84 -73
- package/README_CN.md +676 -0
- package/README_TW.md +684 -0
- package/aquifer.config.example.json +34 -0
- package/consumers/claude-code.js +11 -11
- package/consumers/cli.js +421 -53
- package/consumers/codex-handoff.js +258 -0
- package/consumers/codex.js +1676 -0
- package/consumers/default/daily-entries.js +23 -4
- package/consumers/default/index.js +2 -2
- package/consumers/default/prompts/summary.js +6 -6
- package/consumers/mcp.js +96 -5
- package/consumers/openclaw-ext/index.js +0 -1
- package/consumers/openclaw-plugin.js +1 -1
- package/consumers/shared/config.js +8 -0
- package/consumers/shared/factory.js +1 -0
- package/consumers/shared/ingest.js +1 -1
- package/consumers/shared/normalize.js +14 -3
- package/consumers/shared/recall-format.js +27 -0
- package/consumers/shared/summary-parser.js +151 -0
- package/core/aquifer.js +380 -18
- package/core/finalization-review.js +319 -0
- package/core/mcp-manifest.js +52 -2
- package/core/memory-bootstrap.js +200 -0
- package/core/memory-consolidation.js +1590 -0
- package/core/memory-promotion.js +544 -0
- package/core/memory-recall.js +247 -0
- package/core/memory-records.js +797 -0
- package/core/memory-safety-gate.js +224 -0
- package/core/session-finalization.js +365 -0
- package/core/storage.js +385 -2
- package/docs/getting-started.md +105 -0
- package/docs/postprocess-contract.md +2 -2
- package/docs/setup.md +92 -2
- package/package.json +25 -11
- package/pipeline/normalize/adapters/codex.js +106 -0
- package/pipeline/normalize/detect.js +3 -2
- package/schema/001-base.sql +3 -0
- package/schema/007-v1-foundation.sql +273 -0
- package/schema/008-session-finalizations.sql +50 -0
- package/schema/009-v1-assertion-plane.sql +193 -0
- package/schema/010-v1-finalization-review.sql +160 -0
- package/schema/011-v1-compaction-claim.sql +46 -0
- package/schema/012-v1-compaction-lease.sql +39 -0
- package/schema/013-v1-compaction-lineage.sql +193 -0
- package/scripts/codex-recovery.js +672 -0
- package/consumers/miranda/context-inject.js +0 -120
- package/consumers/miranda/daily-entries.js +0 -224
- package/consumers/miranda/index.js +0 -364
- package/consumers/miranda/instance.js +0 -55
- package/consumers/miranda/llm.js +0 -99
- package/consumers/miranda/profile.json +0 -145
- package/consumers/miranda/prompts/summary.js +0 -303
- package/consumers/miranda/recall-format.js +0 -76
- package/consumers/miranda/render-daily-md.js +0 -186
- package/consumers/miranda/workspace-files.js +0 -91
- package/scripts/drop-entity-state-history.sql +0 -17
- package/scripts/drop-insights.sql +0 -12
- package/scripts/install-openclaw.sh +0 -59
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"db": {
|
|
3
|
+
"url": "postgresql://user:password@localhost:5432/mydb",
|
|
4
|
+
"max": 10
|
|
5
|
+
},
|
|
6
|
+
"schema": "aquifer",
|
|
7
|
+
"tenantId": "default",
|
|
8
|
+
"defaults": {
|
|
9
|
+
"agentId": "main",
|
|
10
|
+
"source": "api"
|
|
11
|
+
},
|
|
12
|
+
"memory": {
|
|
13
|
+
"servingMode": "legacy",
|
|
14
|
+
"activeScopeKey": null,
|
|
15
|
+
"activeScopePath": null
|
|
16
|
+
},
|
|
17
|
+
"embed": {
|
|
18
|
+
"baseUrl": "http://localhost:11434/v1",
|
|
19
|
+
"model": "bge-m3",
|
|
20
|
+
"dim": null
|
|
21
|
+
},
|
|
22
|
+
"llm": {
|
|
23
|
+
"baseUrl": null,
|
|
24
|
+
"model": null
|
|
25
|
+
},
|
|
26
|
+
"entities": {
|
|
27
|
+
"enabled": false,
|
|
28
|
+
"scope": "default"
|
|
29
|
+
},
|
|
30
|
+
"rerank": {
|
|
31
|
+
"enabled": false,
|
|
32
|
+
"provider": null
|
|
33
|
+
}
|
|
34
|
+
}
|
package/consumers/claude-code.js
CHANGED
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
// ---------------------------------------------------------------------------
|
|
4
4
|
// Claude Code host adapter.
|
|
5
5
|
//
|
|
6
|
-
// Generic entry points for CC-side afterburn hooks. No persona logic —
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
// `entityParseFn`.
|
|
6
|
+
// Generic entry points for CC-side afterburn hooks. No persona logic — callers
|
|
7
|
+
// construct any persona-specific hooks outside this package and inject them via
|
|
8
|
+
// `postProcess`, `summaryFn`, `entityParseFn`, or `contextInjector`.
|
|
10
9
|
//
|
|
11
10
|
// API:
|
|
12
11
|
// runEnrich({ aquifer, sessionId, agentId, ... })
|
|
@@ -16,9 +15,9 @@
|
|
|
16
15
|
// runBackfill({ aquifer, sessionIds, ... })
|
|
17
16
|
// Iterate enrich() over pending sessions (for catch-up after a gap).
|
|
18
17
|
//
|
|
19
|
-
// runContextInject({
|
|
20
|
-
// Return
|
|
21
|
-
//
|
|
18
|
+
// runContextInject({ contextInjector, ... })
|
|
19
|
+
// Return a host-specific system context string for a CC session start
|
|
20
|
+
// hook. The injector is supplied by the deployment, not by Aquifer core.
|
|
22
21
|
// ---------------------------------------------------------------------------
|
|
23
22
|
|
|
24
23
|
/**
|
|
@@ -106,12 +105,13 @@ async function runBackfill({
|
|
|
106
105
|
}
|
|
107
106
|
|
|
108
107
|
/**
|
|
109
|
-
* Build
|
|
110
|
-
*
|
|
108
|
+
* Build a host-specific system context for a CC SessionStart hook.
|
|
109
|
+
* The caller supplies the context injector so this public adapter stays generic.
|
|
111
110
|
*/
|
|
112
111
|
async function runContextInject(opts = {}) {
|
|
113
|
-
const
|
|
114
|
-
|
|
112
|
+
const injector = opts.contextInjector || opts.computeInjection;
|
|
113
|
+
if (typeof injector !== 'function') throw new Error('runContextInject: contextInjector is required');
|
|
114
|
+
return injector(opts);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
module.exports = { runEnrich, runBackfill, runContextInject };
|