@agentmemory/agentmemory 0.9.13 → 0.9.15
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 +23 -21
- package/dist/cli.mjs +1612 -113
- package/dist/cli.mjs.map +1 -1
- package/dist/connect-hRTF7E2c.mjs +525 -0
- package/dist/connect-hRTF7E2c.mjs.map +1 -0
- 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 +63 -35
- package/dist/index.mjs.map +1 -1
- package/dist/{src-Ca9oX6Hq.mjs → src-BGcqJR1a.mjs} +62 -72
- package/dist/src-BGcqJR1a.mjs.map +1 -0
- package/dist/{standalone-BpbiNqr9.mjs → standalone-BQOaGF4z.mjs} +3 -3
- package/dist/{standalone-BpbiNqr9.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-D5l632PP.mjs → tools-registry-BF0pgZmI.mjs} +2 -6
- package/dist/tools-registry-BF0pgZmI.mjs.map +1 -0
- package/package.json +6 -6
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/dist/src-Ca9oX6Hq.mjs.map +0 -1
- package/dist/tools-registry-D5l632PP.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: [],
|
|
@@ -5680,7 +5653,9 @@ function registerExportImportFunction(sdk, kv) {
|
|
|
5680
5653
|
"0.9.10",
|
|
5681
5654
|
"0.9.11",
|
|
5682
5655
|
"0.9.12",
|
|
5683
|
-
"0.9.13"
|
|
5656
|
+
"0.9.13",
|
|
5657
|
+
"0.9.14",
|
|
5658
|
+
"0.9.15"
|
|
5684
5659
|
]).has(importData.version)) return {
|
|
5685
5660
|
success: false,
|
|
5686
5661
|
error: `Unsupported export version: ${importData.version}`
|
|
@@ -12037,7 +12012,7 @@ function registerRetentionFunctions(sdk, kv) {
|
|
|
12037
12012
|
const threshold = typeof data?.threshold === "number" && Number.isFinite(data.threshold) ? data.threshold : DEFAULT_DECAY.tierThresholds.cold;
|
|
12038
12013
|
const maxEvictRaw = typeof data?.maxEvict === "number" && Number.isInteger(data.maxEvict) ? data.maxEvict : 50;
|
|
12039
12014
|
const maxEvict = Math.min(1e3, Math.max(0, maxEvictRaw));
|
|
12040
|
-
const { decrementImageRef } = await import("./image-refs-
|
|
12015
|
+
const { decrementImageRef } = await import("./image-refs-R3tin9MR.mjs");
|
|
12041
12016
|
const candidates = (await kv.list(KV.retentionScores)).filter((s) => s.score < threshold).sort((a, b) => a.score - b.score).slice(0, maxEvict);
|
|
12042
12017
|
if (data?.dryRun) return {
|
|
12043
12018
|
success: true,
|
|
@@ -17914,8 +17889,10 @@ function readBody(req) {
|
|
|
17914
17889
|
req.on("error", reject);
|
|
17915
17890
|
});
|
|
17916
17891
|
}
|
|
17892
|
+
const MAX_VIEWER_PORT_RETRIES = 10;
|
|
17917
17893
|
function startViewerServer(port, _kv, _sdk, secret, restPort) {
|
|
17918
17894
|
const resolvedRestPort = restPort ?? port - 2;
|
|
17895
|
+
const requestedPort = port;
|
|
17919
17896
|
const server = createServer(async (req, res) => {
|
|
17920
17897
|
const raw = req.url || "/";
|
|
17921
17898
|
const qIdx = raw.indexOf("?");
|
|
@@ -17952,13 +17929,26 @@ function startViewerServer(port, _kv, _sdk, secret, restPort) {
|
|
|
17952
17929
|
json(res, 502, { error: "upstream error" }, req);
|
|
17953
17930
|
}
|
|
17954
17931
|
});
|
|
17932
|
+
let attempt = 0;
|
|
17933
|
+
let currentPort = requestedPort;
|
|
17934
|
+
const tryListen = () => {
|
|
17935
|
+
server.listen(currentPort, "127.0.0.1");
|
|
17936
|
+
};
|
|
17937
|
+
server.on("listening", () => {
|
|
17938
|
+
if (currentPort === requestedPort) console.log(`[agentmemory] Viewer: http://localhost:${currentPort}`);
|
|
17939
|
+
else console.log(`[agentmemory] Viewer started on http://localhost:${currentPort} (fallback from ${requestedPort})`);
|
|
17940
|
+
});
|
|
17955
17941
|
server.on("error", (err) => {
|
|
17956
|
-
if (err.code === "EADDRINUSE"
|
|
17942
|
+
if (err.code === "EADDRINUSE" && attempt < MAX_VIEWER_PORT_RETRIES) {
|
|
17943
|
+
attempt++;
|
|
17944
|
+
currentPort = requestedPort + attempt;
|
|
17945
|
+
setImmediate(tryListen);
|
|
17946
|
+
return;
|
|
17947
|
+
}
|
|
17948
|
+
if (err.code === "EADDRINUSE") console.warn(`[agentmemory] Viewer ports ${requestedPort}-${requestedPort + MAX_VIEWER_PORT_RETRIES} all in use, skipping viewer.`);
|
|
17957
17949
|
else console.error(`[agentmemory] Viewer error:`, err.message);
|
|
17958
17950
|
});
|
|
17959
|
-
|
|
17960
|
-
console.log(`[agentmemory] Viewer: http://localhost:${port}`);
|
|
17961
|
-
});
|
|
17951
|
+
tryListen();
|
|
17962
17952
|
return server;
|
|
17963
17953
|
}
|
|
17964
17954
|
async function proxyToRestApi(restPort, pathname, qs, method, req, res, secret) {
|
|
@@ -18152,14 +18142,14 @@ async function main() {
|
|
|
18152
18142
|
const provider = fallbackConfig.providers.length > 0 ? createFallbackProvider(config.provider, fallbackConfig) : createProvider(config.provider);
|
|
18153
18143
|
const embeddingProvider = createEmbeddingProvider();
|
|
18154
18144
|
const imageEmbeddingProvider = createImageEmbeddingProvider();
|
|
18155
|
-
|
|
18156
|
-
|
|
18157
|
-
|
|
18158
|
-
if (embeddingProvider)
|
|
18159
|
-
else
|
|
18160
|
-
if (imageEmbeddingProvider)
|
|
18161
|
-
|
|
18162
|
-
|
|
18145
|
+
bootLog(`Starting worker v${VERSION}...`);
|
|
18146
|
+
bootLog(`Engine: ${config.engineUrl}`);
|
|
18147
|
+
bootLog(`Provider: ${config.provider.provider} (${config.provider.model})`);
|
|
18148
|
+
if (embeddingProvider) bootLog(`Embedding provider: ${embeddingProvider.name} (${embeddingProvider.dimensions} dims)`);
|
|
18149
|
+
else bootLog(`Embedding provider: none (BM25-only mode)`);
|
|
18150
|
+
if (imageEmbeddingProvider) bootLog(`Image embedding provider: ${imageEmbeddingProvider.name} (${imageEmbeddingProvider.dimensions} dims) — vision-search active`);
|
|
18151
|
+
bootLog(`REST API: http://localhost:${config.restPort}/agentmemory/*`);
|
|
18152
|
+
bootLog(`Streams: ws://localhost:${config.streamsPort}`);
|
|
18163
18153
|
const sdk = registerWorker(config.engineUrl, {
|
|
18164
18154
|
workerName: "agentmemory",
|
|
18165
18155
|
invocationTimeoutMs: 18e4,
|
|
@@ -18202,22 +18192,22 @@ async function main() {
|
|
|
18202
18192
|
const claudeBridgeConfig = loadClaudeBridgeConfig();
|
|
18203
18193
|
if (claudeBridgeConfig.enabled) {
|
|
18204
18194
|
registerClaudeBridgeFunction(sdk, kv, claudeBridgeConfig);
|
|
18205
|
-
|
|
18195
|
+
bootLog(`Claude bridge: syncing to ${claudeBridgeConfig.memoryFilePath}`);
|
|
18206
18196
|
}
|
|
18207
18197
|
if (isGraphExtractionEnabled()) {
|
|
18208
18198
|
registerGraphFunction(sdk, kv, provider);
|
|
18209
|
-
|
|
18199
|
+
bootLog(`Knowledge graph: extraction enabled`);
|
|
18210
18200
|
}
|
|
18211
18201
|
registerConsolidationPipelineFunction(sdk, kv, provider);
|
|
18212
|
-
|
|
18213
|
-
if (isAutoCompressEnabled())
|
|
18214
|
-
else
|
|
18215
|
-
if (isContextInjectionEnabled())
|
|
18216
|
-
else
|
|
18202
|
+
bootLog(`Consolidation pipeline: registered (CONSOLIDATION_ENABLED=${isConsolidationEnabled() ? "true" : "false"})`);
|
|
18203
|
+
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.`);
|
|
18204
|
+
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).`);
|
|
18205
|
+
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.`);
|
|
18206
|
+
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).`);
|
|
18217
18207
|
const teamConfig = loadTeamConfig();
|
|
18218
18208
|
if (teamConfig) {
|
|
18219
18209
|
registerTeamFunction(sdk, kv, teamConfig);
|
|
18220
|
-
|
|
18210
|
+
bootLog(`Team memory: ${teamConfig.teamId} (${teamConfig.mode})`);
|
|
18221
18211
|
}
|
|
18222
18212
|
registerGovernanceFunction(sdk, kv);
|
|
18223
18213
|
registerActionsFunction(sdk, kv);
|
|
@@ -18247,13 +18237,13 @@ async function main() {
|
|
|
18247
18237
|
registerRetentionFunctions(sdk, kv);
|
|
18248
18238
|
registerCompressFileFunction(sdk, kv, provider);
|
|
18249
18239
|
registerReplayFunctions(sdk, kv);
|
|
18250
|
-
|
|
18251
|
-
|
|
18252
|
-
if (isSlotsEnabled())
|
|
18240
|
+
bootLog(`v0.6 advanced retrieval: sliding-window, query-expansion, temporal-graph, retention-scoring`);
|
|
18241
|
+
bootLog(`Orchestration layer: actions, frontier, leases, routines, signals, checkpoints, flow-compress, mesh, branch-aware, sentinels, sketches, crystallize, diagnostics, facets`);
|
|
18242
|
+
if (isSlotsEnabled()) bootLog(`Slots: enabled (pinned editable memory). Reflect on Stop hook: ${isReflectEnabled() ? "on" : "off"}`);
|
|
18253
18243
|
const snapshotConfig = loadSnapshotConfig();
|
|
18254
18244
|
if (snapshotConfig.enabled) {
|
|
18255
18245
|
registerSnapshotFunction(sdk, kv, snapshotConfig.dir);
|
|
18256
|
-
|
|
18246
|
+
bootLog(`Git snapshots: ${snapshotConfig.dir} (every ${snapshotConfig.interval}s)`);
|
|
18257
18247
|
}
|
|
18258
18248
|
const bm25Index = getSearchIndex();
|
|
18259
18249
|
const graphWeight = parseFloat(getEnvVar("AGENTMEMORY_GRAPH_WEIGHT") || "0.3");
|
|
@@ -18270,7 +18260,7 @@ async function main() {
|
|
|
18270
18260
|
});
|
|
18271
18261
|
if (loaded?.bm25 && loaded.bm25.size > 0) {
|
|
18272
18262
|
bm25Index.restoreFrom(loaded.bm25);
|
|
18273
|
-
|
|
18263
|
+
bootLog(`Loaded persisted BM25 index (${bm25Index.size} docs)`);
|
|
18274
18264
|
}
|
|
18275
18265
|
if (loaded?.vector && vectorIndex && loaded.vector.size > 0) {
|
|
18276
18266
|
const activeDim = embeddingProvider?.dimensions ?? 0;
|
|
@@ -18285,7 +18275,7 @@ async function main() {
|
|
|
18285
18275
|
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.`);
|
|
18286
18276
|
} else {
|
|
18287
18277
|
vectorIndex.restoreFrom(loaded.vector);
|
|
18288
|
-
|
|
18278
|
+
bootLog(`Loaded persisted vector index (${vectorIndex.size} vectors)`);
|
|
18289
18279
|
}
|
|
18290
18280
|
}
|
|
18291
18281
|
if (bm25Index.size === 0) {
|
|
@@ -18294,7 +18284,7 @@ async function main() {
|
|
|
18294
18284
|
return 0;
|
|
18295
18285
|
});
|
|
18296
18286
|
if (indexCount > 0) {
|
|
18297
|
-
|
|
18287
|
+
bootLog(`Search index rebuilt: ${indexCount} entries`);
|
|
18298
18288
|
indexPersistence.scheduleSave();
|
|
18299
18289
|
}
|
|
18300
18290
|
} else try {
|
|
@@ -18319,14 +18309,14 @@ async function main() {
|
|
|
18319
18309
|
backfilled++;
|
|
18320
18310
|
}
|
|
18321
18311
|
if (backfilled > 0) {
|
|
18322
|
-
|
|
18312
|
+
bootLog(`Backfilled ${backfilled} memories into BM25 (legacy gap before #257)`);
|
|
18323
18313
|
indexPersistence.scheduleSave();
|
|
18324
18314
|
}
|
|
18325
18315
|
} catch (err) {
|
|
18326
18316
|
console.warn(`[agentmemory] Failed to backfill memories into BM25:`, err);
|
|
18327
18317
|
}
|
|
18328
|
-
|
|
18329
|
-
|
|
18318
|
+
bootLog(`Ready. ${embeddingProvider ? "Triple-stream (BM25+Vector+Graph)" : "BM25+Graph"} search active.`);
|
|
18319
|
+
bootLog(`Endpoints: 107 REST + ${getAllTools().length} MCP tools + 6 MCP resources + 3 MCP prompts`);
|
|
18330
18320
|
const viewerServer = startViewerServer(config.restPort + 2, kv, sdk, secret, config.restPort);
|
|
18331
18321
|
const autoForgetIntervalMs = parseInt(process.env.AUTO_FORGET_INTERVAL_MS || "3600000", 10);
|
|
18332
18322
|
const consolidationIntervalMs = parseInt(process.env.CONSOLIDATION_INTERVAL_MS || "7200000", 10);
|
|
@@ -18339,7 +18329,7 @@ async function main() {
|
|
|
18339
18329
|
});
|
|
18340
18330
|
} catch {}
|
|
18341
18331
|
}, autoForgetIntervalMs).unref();
|
|
18342
|
-
|
|
18332
|
+
bootLog(`Auto-forget: enabled (every ${autoForgetIntervalMs / 6e4}m)`);
|
|
18343
18333
|
}
|
|
18344
18334
|
if (process.env.LESSON_DECAY_ENABLED !== "false") {
|
|
18345
18335
|
setInterval(async () => {
|
|
@@ -18350,7 +18340,7 @@ async function main() {
|
|
|
18350
18340
|
});
|
|
18351
18341
|
} catch {}
|
|
18352
18342
|
}, 864e5).unref();
|
|
18353
|
-
|
|
18343
|
+
bootLog(`Lesson decay sweep: enabled (every 24h)`);
|
|
18354
18344
|
}
|
|
18355
18345
|
if (process.env.INSIGHT_DECAY_ENABLED !== "false") setInterval(async () => {
|
|
18356
18346
|
try {
|
|
@@ -18369,7 +18359,7 @@ async function main() {
|
|
|
18369
18359
|
});
|
|
18370
18360
|
} catch {}
|
|
18371
18361
|
}, consolidationIntervalMs).unref();
|
|
18372
|
-
|
|
18362
|
+
bootLog(`Auto-consolidation: enabled (every ${consolidationIntervalMs / 6e4}m)`);
|
|
18373
18363
|
}
|
|
18374
18364
|
const shutdown = async () => {
|
|
18375
18365
|
console.log(`\n[agentmemory] Shutting down...`);
|
|
@@ -18393,4 +18383,4 @@ main().catch((err) => {
|
|
|
18393
18383
|
|
|
18394
18384
|
//#endregion
|
|
18395
18385
|
export { };
|
|
18396
|
-
//# sourceMappingURL=src-
|
|
18386
|
+
//# sourceMappingURL=src-BGcqJR1a.mjs.map
|