Skip to content

Commit 85082da

Browse files
neo-gpttobiu
andauthored
feat(ai): add graphlog compaction maintenance (#12329) (#12337)
* feat(ai): add graphlog compaction maintenance (#12329) * fix(memory-core): source graphlog paths from config (#12329) * test(ai): isolate graphlog config import (#12329) --------- Co-authored-by: tobiu <tobiasuhlig78@gmail.com>
1 parent 17eb59c commit 85082da

6 files changed

Lines changed: 890 additions & 13 deletions

File tree

ai/mcp/server/memory-core/config.template.mjs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ function parseMemorySharingPolicy(envVarName, {env = process.env} = {}) {
1717
const __filename = fileURLToPath(import.meta.url);
1818
const __dirname = path.dirname(__filename);
1919

20-
const neoRootDir = path.resolve(__dirname, '../../../../');
21-
const cwd = neoRootDir;
22-
const DAY_MS = 24 * 60 * 60 * 1000;
20+
const neoRootDir = path.resolve(__dirname, '../../../../');
21+
const cwd = neoRootDir;
22+
const wakeDaemonDataDir = path.resolve(process.env.NEO_AI_DAEMON_DIR || path.resolve(cwd, '.neo-ai-data/wake-daemon'));
23+
const DAY_MS = 24 * 60 * 60 * 1000;
2324

2425
/**
2526
* @summary Configuration manager for the Memory Core MCP server.
@@ -111,6 +112,14 @@ class Config extends BaseConfig {
111112
storagePaths: {
112113
graph: leaf(process.env.UNIT_TEST_MODE === 'true' ? ':memory:' : path.resolve(cwd, '.neo-ai-data/sqlite/memory-core-graph.sqlite'), 'NEO_MEMORY_DB_PATH', 'string')
113114
},
115+
/**
116+
* Durable wake-daemon watermarks consumed by GraphLog maintenance.
117+
*/
118+
wakeDaemon: {
119+
dataDir: leaf(wakeDaemonDataDir, 'NEO_AI_DAEMON_DIR', 'string'),
120+
bridgeLastSyncIdPath: leaf(path.join(wakeDaemonDataDir, 'lastSyncId'), 'NEO_BRIDGE_LAST_SYNC_ID_PATH', 'string'),
121+
wakeSubscriptionLiveCursorPath: leaf(path.join(wakeDaemonDataDir, 'wakeSubscriptionLiveCursor'), 'NEO_AI_WAKE_SUBSCRIPTION_CURSOR_FILE', 'string')
122+
},
114123
/**
115124
* Data Schema/Table Names
116125
* This defines WHAT the tables/collections are called logically.

0 commit comments

Comments
 (0)