@agentmemory/agentmemory 0.9.14 → 0.9.16
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/README.md +44 -0
- package/dist/cli.mjs +1956 -40
- package/dist/cli.mjs.map +1 -1
- package/dist/{image-refs-HVu22rfu.mjs → image-refs-R3tin9MR.mjs} +2 -2
- package/dist/{image-refs-HVu22rfu.mjs.map → image-refs-R3tin9MR.mjs.map} +1 -1
- package/dist/{image-store-BfN1vDbj.mjs → image-store-DyrKZKqZ.mjs} +1 -1
- package/dist/index.mjs +64 -35
- package/dist/index.mjs.map +1 -1
- package/dist/{src-BBI-ah3h.mjs → src-3Oy_OOlF.mjs} +63 -72
- package/dist/src-3Oy_OOlF.mjs.map +1 -0
- package/dist/{standalone-Cf5sp0XM.mjs → standalone-BQOaGF4z.mjs} +3 -3
- package/dist/{standalone-Cf5sp0XM.mjs.map → standalone-BQOaGF4z.mjs.map} +1 -1
- package/dist/standalone.mjs +1 -1
- package/dist/standalone.mjs.map +1 -1
- package/dist/{tools-registry-BDimtXJb.mjs → tools-registry-BF0pgZmI.mjs} +2 -6
- package/dist/tools-registry-BF0pgZmI.mjs.map +1 -0
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/dist/src-BBI-ah3h.mjs.map +0 -1
- package/dist/tools-registry-BDimtXJb.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as jaccardSimilarity, i as
|
|
2
|
-
import { a as isManagedImagePath, getImageRefCount, i as getMaxBytes, n as IMAGES_DIR, r as deleteImage, t as withKeyedLock } from "./image-refs-
|
|
3
|
-
import { _ as
|
|
1
|
+
import { a as STREAM, c as jaccardSimilarity, i as KV, n as bootLog, o as fingerprintId, r as logger, s as generateId, t as VERSION } from "./cli.mjs";
|
|
2
|
+
import { a as isManagedImagePath, getImageRefCount, i as getMaxBytes, n as IMAGES_DIR, r as deleteImage, t as withKeyedLock } from "./image-refs-R3tin9MR.mjs";
|
|
3
|
+
import { _ as loadTeamConfig, a as getConsolidationDecayDays, c as isAutoCompressEnabled, d as isGraphExtractionEnabled, f as loadClaudeBridgeConfig, g as loadSnapshotConfig, h as loadFallbackConfig, i as detectLlmProviderKind, l as isConsolidationEnabled, m as loadEmbeddingConfig, n as getVisibleTools, o as getEnvVar, p as loadConfig, r as detectEmbeddingProvider, t as getAllTools, u as isContextInjectionEnabled } from "./tools-registry-BF0pgZmI.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { execFile } from "node:child_process";
|
|
6
6
|
import { constants, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
@@ -1143,33 +1143,6 @@ var GraphRetrieval = class {
|
|
|
1143
1143
|
}
|
|
1144
1144
|
};
|
|
1145
1145
|
|
|
1146
|
-
//#endregion
|
|
1147
|
-
//#region src/logger.ts
|
|
1148
|
-
function fmt(level, msg, fields) {
|
|
1149
|
-
if (!fields || Object.keys(fields).length === 0) return `[agentmemory] ${level} ${msg}`;
|
|
1150
|
-
try {
|
|
1151
|
-
return `[agentmemory] ${level} ${msg} ${JSON.stringify(fields)}`;
|
|
1152
|
-
} catch {
|
|
1153
|
-
return `[agentmemory] ${level} ${msg}`;
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
function emit(level, msg, fields) {
|
|
1157
|
-
try {
|
|
1158
|
-
process.stderr.write(fmt(level, msg, fields) + "\n");
|
|
1159
|
-
} catch {}
|
|
1160
|
-
}
|
|
1161
|
-
const logger = {
|
|
1162
|
-
info(msg, fields) {
|
|
1163
|
-
emit("info", msg, fields);
|
|
1164
|
-
},
|
|
1165
|
-
warn(msg, fields) {
|
|
1166
|
-
emit("warn", msg, fields);
|
|
1167
|
-
},
|
|
1168
|
-
error(msg, fields) {
|
|
1169
|
-
emit("error", msg, fields);
|
|
1170
|
-
}
|
|
1171
|
-
};
|
|
1172
|
-
|
|
1173
1146
|
//#endregion
|
|
1174
1147
|
//#region src/functions/query-expansion.ts
|
|
1175
1148
|
const QUERY_EXPANSION_SYSTEM = `You are a query expansion engine for a memory retrieval system. Given a user query, generate diverse reformulations to maximize recall.
|
|
@@ -2674,10 +2647,10 @@ function registerObserveFunction(sdk, kv, dedupMap, maxObservationsPerSession) {
|
|
|
2674
2647
|
};
|
|
2675
2648
|
}
|
|
2676
2649
|
if (pendingImageData && (pendingImageData.startsWith("data:image/") || pendingImageData.startsWith("iVBORw0KGgo") || pendingImageData.startsWith("/9j/"))) {
|
|
2677
|
-
const { saveImageToDisk } = await import("./image-store-
|
|
2650
|
+
const { saveImageToDisk } = await import("./image-store-DyrKZKqZ.mjs");
|
|
2678
2651
|
const { filePath, bytesWritten } = await saveImageToDisk(pendingImageData);
|
|
2679
2652
|
raw.imageData = filePath;
|
|
2680
|
-
const { incrementImageRef } = await import("./image-refs-
|
|
2653
|
+
const { incrementImageRef } = await import("./image-refs-R3tin9MR.mjs");
|
|
2681
2654
|
await incrementImageRef(kv, filePath);
|
|
2682
2655
|
sdk.triggerVoid("mem::disk-size-delta", { deltaBytes: bytesWritten });
|
|
2683
2656
|
if (process.env["AGENTMEMORY_IMAGE_EMBEDDINGS"] === "true") sdk.triggerVoid("mem::vision-embed", {
|
|
@@ -2690,7 +2663,7 @@ function registerObserveFunction(sdk, kv, dedupMap, maxObservationsPerSession) {
|
|
|
2690
2663
|
await kv.set(KV.observations(payload.sessionId), obsId, raw);
|
|
2691
2664
|
} catch (error) {
|
|
2692
2665
|
if (raw.imageData) {
|
|
2693
|
-
const { deleteImage } = await import("./image-store-
|
|
2666
|
+
const { deleteImage } = await import("./image-store-DyrKZKqZ.mjs");
|
|
2694
2667
|
const { deletedBytes } = await deleteImage(raw.imageData);
|
|
2695
2668
|
if (deletedBytes > 0) sdk.triggerVoid("mem::disk-size-delta", { deltaBytes: -deletedBytes });
|
|
2696
2669
|
}
|
|
@@ -4776,7 +4749,7 @@ function registerRememberFunction(sdk, kv) {
|
|
|
4776
4749
|
const deletedMemoryIds = [];
|
|
4777
4750
|
const deletedObservationIds = [];
|
|
4778
4751
|
let deletedSession = false;
|
|
4779
|
-
const { decrementImageRef } = await import("./image-refs-
|
|
4752
|
+
const { decrementImageRef } = await import("./image-refs-R3tin9MR.mjs");
|
|
4780
4753
|
if (data.memoryId) {
|
|
4781
4754
|
const mem = await kv.get(KV.memories, data.memoryId);
|
|
4782
4755
|
await kv.delete(KV.memories, data.memoryId);
|
|
@@ -4835,7 +4808,7 @@ const DEFAULTS$1 = {
|
|
|
4835
4808
|
function registerEvictFunction(sdk, kv) {
|
|
4836
4809
|
sdk.registerFunction("mem::evict", async (data) => {
|
|
4837
4810
|
const dryRun = data?.dryRun ?? false;
|
|
4838
|
-
const { decrementImageRef } = await import("./image-refs-
|
|
4811
|
+
const { decrementImageRef } = await import("./image-refs-R3tin9MR.mjs");
|
|
4839
4812
|
const configOverride = await kv.get(KV.config, "eviction").catch(() => null);
|
|
4840
4813
|
const cfg = {
|
|
4841
4814
|
...DEFAULTS$1,
|
|
@@ -5438,7 +5411,7 @@ function registerAutoForgetFunction(sdk, kv) {
|
|
|
5438
5411
|
sdk.registerFunction("mem::auto-forget", async (data) => {
|
|
5439
5412
|
const dryRun = data?.dryRun ?? false;
|
|
5440
5413
|
const now = Date.now();
|
|
5441
|
-
const { decrementImageRef } = await import("./image-refs-
|
|
5414
|
+
const { decrementImageRef } = await import("./image-refs-R3tin9MR.mjs");
|
|
5442
5415
|
const result = {
|
|
5443
5416
|
ttlExpired: [],
|
|
5444
5417
|
contradictions: [],
|
|
@@ -5681,7 +5654,9 @@ function registerExportImportFunction(sdk, kv) {
|
|
|
5681
5654
|
"0.9.11",
|
|
5682
5655
|
"0.9.12",
|
|
5683
5656
|
"0.9.13",
|
|
5684
|
-
"0.9.14"
|
|
5657
|
+
"0.9.14",
|
|
5658
|
+
"0.9.15",
|
|
5659
|
+
"0.9.16"
|
|
5685
5660
|
]).has(importData.version)) return {
|
|
5686
5661
|
success: false,
|
|
5687
5662
|
error: `Unsupported export version: ${importData.version}`
|
|
@@ -12038,7 +12013,7 @@ function registerRetentionFunctions(sdk, kv) {
|
|
|
12038
12013
|
const threshold = typeof data?.threshold === "number" && Number.isFinite(data.threshold) ? data.threshold : DEFAULT_DECAY.tierThresholds.cold;
|
|
12039
12014
|
const maxEvictRaw = typeof data?.maxEvict === "number" && Number.isInteger(data.maxEvict) ? data.maxEvict : 50;
|
|
12040
12015
|
const maxEvict = Math.min(1e3, Math.max(0, maxEvictRaw));
|
|
12041
|
-
const { decrementImageRef } = await import("./image-refs-
|
|
12016
|
+
const { decrementImageRef } = await import("./image-refs-R3tin9MR.mjs");
|
|
12042
12017
|
const candidates = (await kv.list(KV.retentionScores)).filter((s) => s.score < threshold).sort((a, b) => a.score - b.score).slice(0, maxEvict);
|
|
12043
12018
|
if (data?.dryRun) return {
|
|
12044
12019
|
success: true,
|
|
@@ -17915,8 +17890,10 @@ function readBody(req) {
|
|
|
17915
17890
|
req.on("error", reject);
|
|
17916
17891
|
});
|
|
17917
17892
|
}
|
|
17893
|
+
const MAX_VIEWER_PORT_RETRIES = 10;
|
|
17918
17894
|
function startViewerServer(port, _kv, _sdk, secret, restPort) {
|
|
17919
17895
|
const resolvedRestPort = restPort ?? port - 2;
|
|
17896
|
+
const requestedPort = port;
|
|
17920
17897
|
const server = createServer(async (req, res) => {
|
|
17921
17898
|
const raw = req.url || "/";
|
|
17922
17899
|
const qIdx = raw.indexOf("?");
|
|
@@ -17953,13 +17930,26 @@ function startViewerServer(port, _kv, _sdk, secret, restPort) {
|
|
|
17953
17930
|
json(res, 502, { error: "upstream error" }, req);
|
|
17954
17931
|
}
|
|
17955
17932
|
});
|
|
17933
|
+
let attempt = 0;
|
|
17934
|
+
let currentPort = requestedPort;
|
|
17935
|
+
const tryListen = () => {
|
|
17936
|
+
server.listen(currentPort, "127.0.0.1");
|
|
17937
|
+
};
|
|
17938
|
+
server.on("listening", () => {
|
|
17939
|
+
if (currentPort === requestedPort) console.log(`[agentmemory] Viewer: http://localhost:${currentPort}`);
|
|
17940
|
+
else console.log(`[agentmemory] Viewer started on http://localhost:${currentPort} (fallback from ${requestedPort})`);
|
|
17941
|
+
});
|
|
17956
17942
|
server.on("error", (err) => {
|
|
17957
|
-
if (err.code === "EADDRINUSE"
|
|
17943
|
+
if (err.code === "EADDRINUSE" && attempt < MAX_VIEWER_PORT_RETRIES) {
|
|
17944
|
+
attempt++;
|
|
17945
|
+
currentPort = requestedPort + attempt;
|
|
17946
|
+
setImmediate(tryListen);
|
|
17947
|
+
return;
|
|
17948
|
+
}
|
|
17949
|
+
if (err.code === "EADDRINUSE") console.warn(`[agentmemory] Viewer ports ${requestedPort}-${requestedPort + MAX_VIEWER_PORT_RETRIES} all in use, skipping viewer.`);
|
|
17958
17950
|
else console.error(`[agentmemory] Viewer error:`, err.message);
|
|
17959
17951
|
});
|
|
17960
|
-
|
|
17961
|
-
console.log(`[agentmemory] Viewer: http://localhost:${port}`);
|
|
17962
|
-
});
|
|
17952
|
+
tryListen();
|
|
17963
17953
|
return server;
|
|
17964
17954
|
}
|
|
17965
17955
|
async function proxyToRestApi(restPort, pathname, qs, method, req, res, secret) {
|
|
@@ -18153,14 +18143,14 @@ async function main() {
|
|
|
18153
18143
|
const provider = fallbackConfig.providers.length > 0 ? createFallbackProvider(config.provider, fallbackConfig) : createProvider(config.provider);
|
|
18154
18144
|
const embeddingProvider = createEmbeddingProvider();
|
|
18155
18145
|
const imageEmbeddingProvider = createImageEmbeddingProvider();
|
|
18156
|
-
|
|
18157
|
-
|
|
18158
|
-
|
|
18159
|
-
if (embeddingProvider)
|
|
18160
|
-
else
|
|
18161
|
-
if (imageEmbeddingProvider)
|
|
18162
|
-
|
|
18163
|
-
|
|
18146
|
+
bootLog(`Starting worker v${VERSION}...`);
|
|
18147
|
+
bootLog(`Engine: ${config.engineUrl}`);
|
|
18148
|
+
bootLog(`Provider: ${config.provider.provider} (${config.provider.model})`);
|
|
18149
|
+
if (embeddingProvider) bootLog(`Embedding provider: ${embeddingProvider.name} (${embeddingProvider.dimensions} dims)`);
|
|
18150
|
+
else bootLog(`Embedding provider: none (BM25-only mode)`);
|
|
18151
|
+
if (imageEmbeddingProvider) bootLog(`Image embedding provider: ${imageEmbeddingProvider.name} (${imageEmbeddingProvider.dimensions} dims) — vision-search active`);
|
|
18152
|
+
bootLog(`REST API: http://localhost:${config.restPort}/agentmemory/*`);
|
|
18153
|
+
bootLog(`Streams: ws://localhost:${config.streamsPort}`);
|
|
18164
18154
|
const sdk = registerWorker(config.engineUrl, {
|
|
18165
18155
|
workerName: "agentmemory",
|
|
18166
18156
|
invocationTimeoutMs: 18e4,
|
|
@@ -18203,22 +18193,22 @@ async function main() {
|
|
|
18203
18193
|
const claudeBridgeConfig = loadClaudeBridgeConfig();
|
|
18204
18194
|
if (claudeBridgeConfig.enabled) {
|
|
18205
18195
|
registerClaudeBridgeFunction(sdk, kv, claudeBridgeConfig);
|
|
18206
|
-
|
|
18196
|
+
bootLog(`Claude bridge: syncing to ${claudeBridgeConfig.memoryFilePath}`);
|
|
18207
18197
|
}
|
|
18208
18198
|
if (isGraphExtractionEnabled()) {
|
|
18209
18199
|
registerGraphFunction(sdk, kv, provider);
|
|
18210
|
-
|
|
18200
|
+
bootLog(`Knowledge graph: extraction enabled`);
|
|
18211
18201
|
}
|
|
18212
18202
|
registerConsolidationPipelineFunction(sdk, kv, provider);
|
|
18213
|
-
|
|
18214
|
-
if (isAutoCompressEnabled())
|
|
18215
|
-
else
|
|
18216
|
-
if (isContextInjectionEnabled())
|
|
18217
|
-
else
|
|
18203
|
+
bootLog(`Consolidation pipeline: registered (CONSOLIDATION_ENABLED=${isConsolidationEnabled() ? "true" : "false"})`);
|
|
18204
|
+
if (isAutoCompressEnabled()) bootLog(`WARNING: AGENTMEMORY_AUTO_COMPRESS=true — every PostToolUse observation will be sent to your LLM provider for compression. This spends API tokens proportional to your session tool-use frequency (see #138). Set AGENTMEMORY_AUTO_COMPRESS=false to disable.`);
|
|
18205
|
+
else bootLog(`Auto-compress: OFF (default, #138) — observations indexed via zero-LLM synthetic compression. Set AGENTMEMORY_AUTO_COMPRESS=true to opt-in to LLM-powered summaries (uses your API key).`);
|
|
18206
|
+
if (isContextInjectionEnabled()) bootLog(`WARNING: AGENTMEMORY_INJECT_CONTEXT=true — the PreToolUse and SessionStart hooks will inject up to ~4000 chars of memory context into every tool turn. On Claude Pro this burns session tokens proportional to your tool-call frequency (see #143). Set AGENTMEMORY_INJECT_CONTEXT=false to disable.`);
|
|
18207
|
+
else bootLog(`Context injection: OFF (default, #143) — hooks capture observations but do not inject context into Claude Code's conversation. Set AGENTMEMORY_INJECT_CONTEXT=true to opt-in (warning: expect your Claude Pro allocation to drain faster).`);
|
|
18218
18208
|
const teamConfig = loadTeamConfig();
|
|
18219
18209
|
if (teamConfig) {
|
|
18220
18210
|
registerTeamFunction(sdk, kv, teamConfig);
|
|
18221
|
-
|
|
18211
|
+
bootLog(`Team memory: ${teamConfig.teamId} (${teamConfig.mode})`);
|
|
18222
18212
|
}
|
|
18223
18213
|
registerGovernanceFunction(sdk, kv);
|
|
18224
18214
|
registerActionsFunction(sdk, kv);
|
|
@@ -18248,13 +18238,13 @@ async function main() {
|
|
|
18248
18238
|
registerRetentionFunctions(sdk, kv);
|
|
18249
18239
|
registerCompressFileFunction(sdk, kv, provider);
|
|
18250
18240
|
registerReplayFunctions(sdk, kv);
|
|
18251
|
-
|
|
18252
|
-
|
|
18253
|
-
if (isSlotsEnabled())
|
|
18241
|
+
bootLog(`v0.6 advanced retrieval: sliding-window, query-expansion, temporal-graph, retention-scoring`);
|
|
18242
|
+
bootLog(`Orchestration layer: actions, frontier, leases, routines, signals, checkpoints, flow-compress, mesh, branch-aware, sentinels, sketches, crystallize, diagnostics, facets`);
|
|
18243
|
+
if (isSlotsEnabled()) bootLog(`Slots: enabled (pinned editable memory). Reflect on Stop hook: ${isReflectEnabled() ? "on" : "off"}`);
|
|
18254
18244
|
const snapshotConfig = loadSnapshotConfig();
|
|
18255
18245
|
if (snapshotConfig.enabled) {
|
|
18256
18246
|
registerSnapshotFunction(sdk, kv, snapshotConfig.dir);
|
|
18257
|
-
|
|
18247
|
+
bootLog(`Git snapshots: ${snapshotConfig.dir} (every ${snapshotConfig.interval}s)`);
|
|
18258
18248
|
}
|
|
18259
18249
|
const bm25Index = getSearchIndex();
|
|
18260
18250
|
const graphWeight = parseFloat(getEnvVar("AGENTMEMORY_GRAPH_WEIGHT") || "0.3");
|
|
@@ -18271,7 +18261,7 @@ async function main() {
|
|
|
18271
18261
|
});
|
|
18272
18262
|
if (loaded?.bm25 && loaded.bm25.size > 0) {
|
|
18273
18263
|
bm25Index.restoreFrom(loaded.bm25);
|
|
18274
|
-
|
|
18264
|
+
bootLog(`Loaded persisted BM25 index (${bm25Index.size} docs)`);
|
|
18275
18265
|
}
|
|
18276
18266
|
if (loaded?.vector && vectorIndex && loaded.vector.size > 0) {
|
|
18277
18267
|
const activeDim = embeddingProvider?.dimensions ?? 0;
|
|
@@ -18286,7 +18276,7 @@ async function main() {
|
|
|
18286
18276
|
else throw new Error(`[agentmemory] Refusing to start: persisted vector index has ${mismatches.length} of ${loaded.vector.size} vectors with the wrong dimension. Active provider (${embeddingProvider?.name}) declares ${activeDim}; dimensions seen on disk: ${distinct}. First mismatched obsIds: ${sample}. Loading would silently corrupt search (cross-dimension cosine returns 0). Choose one:\n - Re-embed the existing index against the new provider, then start.\n - Set AGENTMEMORY_DROP_STALE_INDEX=true to discard the persisted vectors and rebuild from live observations.\n - Switch the embedding provider back to the one that wrote the index.`);
|
|
18287
18277
|
} else {
|
|
18288
18278
|
vectorIndex.restoreFrom(loaded.vector);
|
|
18289
|
-
|
|
18279
|
+
bootLog(`Loaded persisted vector index (${vectorIndex.size} vectors)`);
|
|
18290
18280
|
}
|
|
18291
18281
|
}
|
|
18292
18282
|
if (bm25Index.size === 0) {
|
|
@@ -18295,7 +18285,7 @@ async function main() {
|
|
|
18295
18285
|
return 0;
|
|
18296
18286
|
});
|
|
18297
18287
|
if (indexCount > 0) {
|
|
18298
|
-
|
|
18288
|
+
bootLog(`Search index rebuilt: ${indexCount} entries`);
|
|
18299
18289
|
indexPersistence.scheduleSave();
|
|
18300
18290
|
}
|
|
18301
18291
|
} else try {
|
|
@@ -18320,14 +18310,15 @@ async function main() {
|
|
|
18320
18310
|
backfilled++;
|
|
18321
18311
|
}
|
|
18322
18312
|
if (backfilled > 0) {
|
|
18323
|
-
|
|
18313
|
+
bootLog(`Backfilled ${backfilled} memories into BM25 (legacy gap before #257)`);
|
|
18324
18314
|
indexPersistence.scheduleSave();
|
|
18325
18315
|
}
|
|
18326
18316
|
} catch (err) {
|
|
18327
18317
|
console.warn(`[agentmemory] Failed to backfill memories into BM25:`, err);
|
|
18328
18318
|
}
|
|
18329
|
-
|
|
18330
|
-
|
|
18319
|
+
bootLog(`Ready. ${embeddingProvider ? "Triple-stream (BM25+Vector+Graph)" : "BM25+Graph"} search active.`);
|
|
18320
|
+
bootLog(`REST API: 107 endpoints at http://localhost:${config.restPort}/agentmemory/*`);
|
|
18321
|
+
bootLog(`MCP surface (opt-in via \`npx @agentmemory/mcp\`): ${getAllTools().length} tools · 6 resources · 3 prompts`);
|
|
18331
18322
|
const viewerServer = startViewerServer(config.restPort + 2, kv, sdk, secret, config.restPort);
|
|
18332
18323
|
const autoForgetIntervalMs = parseInt(process.env.AUTO_FORGET_INTERVAL_MS || "3600000", 10);
|
|
18333
18324
|
const consolidationIntervalMs = parseInt(process.env.CONSOLIDATION_INTERVAL_MS || "7200000", 10);
|
|
@@ -18340,7 +18331,7 @@ async function main() {
|
|
|
18340
18331
|
});
|
|
18341
18332
|
} catch {}
|
|
18342
18333
|
}, autoForgetIntervalMs).unref();
|
|
18343
|
-
|
|
18334
|
+
bootLog(`Auto-forget: enabled (every ${autoForgetIntervalMs / 6e4}m)`);
|
|
18344
18335
|
}
|
|
18345
18336
|
if (process.env.LESSON_DECAY_ENABLED !== "false") {
|
|
18346
18337
|
setInterval(async () => {
|
|
@@ -18351,7 +18342,7 @@ async function main() {
|
|
|
18351
18342
|
});
|
|
18352
18343
|
} catch {}
|
|
18353
18344
|
}, 864e5).unref();
|
|
18354
|
-
|
|
18345
|
+
bootLog(`Lesson decay sweep: enabled (every 24h)`);
|
|
18355
18346
|
}
|
|
18356
18347
|
if (process.env.INSIGHT_DECAY_ENABLED !== "false") setInterval(async () => {
|
|
18357
18348
|
try {
|
|
@@ -18370,7 +18361,7 @@ async function main() {
|
|
|
18370
18361
|
});
|
|
18371
18362
|
} catch {}
|
|
18372
18363
|
}, consolidationIntervalMs).unref();
|
|
18373
|
-
|
|
18364
|
+
bootLog(`Auto-consolidation: enabled (every ${consolidationIntervalMs / 6e4}m)`);
|
|
18374
18365
|
}
|
|
18375
18366
|
const shutdown = async () => {
|
|
18376
18367
|
console.log(`\n[agentmemory] Shutting down...`);
|
|
@@ -18394,4 +18385,4 @@ main().catch((err) => {
|
|
|
18394
18385
|
|
|
18395
18386
|
//#endregion
|
|
18396
18387
|
export { };
|
|
18397
|
-
//# sourceMappingURL=src-
|
|
18388
|
+
//# sourceMappingURL=src-3Oy_OOlF.mjs.map
|