@agentmemory/agentmemory 0.9.7 → 0.9.8

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.
@@ -1,5 +1,5 @@
1
1
  import { a as jaccardSimilarity, i as generateId, n as STREAM, r as fingerprintId, t as KV } from "./cli.mjs";
2
- import { _ as loadSnapshotConfig, a as detectLlmProviderKind, d as isContextInjectionEnabled, f as isGraphExtractionEnabled, g as loadFallbackConfig, h as loadEmbeddingConfig, i as detectEmbeddingProvider, l as isAutoCompressEnabled, m as loadConfig, n as getVisibleTools, o as getConsolidationDecayDays, p as loadClaudeBridgeConfig, r as VERSION, s as getEnvVar, t as getAllTools, u as isConsolidationEnabled, v as loadTeamConfig } from "./tools-registry-UpRrZBDD.mjs";
2
+ import { _ as loadSnapshotConfig, a as detectLlmProviderKind, d as isContextInjectionEnabled, f as isGraphExtractionEnabled, g as loadFallbackConfig, h as loadEmbeddingConfig, i as detectEmbeddingProvider, l as isAutoCompressEnabled, m as loadConfig, n as getVisibleTools, o as getConsolidationDecayDays, p as loadClaudeBridgeConfig, r as VERSION, s as getEnvVar, t as getAllTools, u as isConsolidationEnabled, v as loadTeamConfig } from "./tools-registry-Ca8FvveU.mjs";
3
3
  import { execFile } from "node:child_process";
4
4
  import { constants, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
5
5
  import { basename, dirname, extname, join, resolve, sep } from "node:path";
@@ -2600,10 +2600,10 @@ function registerObserveFunction(sdk, kv, dedupMap, maxObservationsPerSession) {
2600
2600
  };
2601
2601
  }
2602
2602
  if (pendingImageData && (pendingImageData.startsWith("data:image/") || pendingImageData.startsWith("iVBORw0KGgo") || pendingImageData.startsWith("/9j/"))) {
2603
- const { saveImageToDisk } = await import("./image-store-Bx3J2RQ8.mjs");
2603
+ const { saveImageToDisk } = await import("./image-store-D2kqrFwI.mjs");
2604
2604
  const { filePath, bytesWritten } = await saveImageToDisk(pendingImageData);
2605
2605
  raw.imageData = filePath;
2606
- const { incrementImageRef } = await import("./image-refs-B2vyIEyZ.mjs");
2606
+ const { incrementImageRef } = await import("./image-refs-DcOzlSR9.mjs");
2607
2607
  await incrementImageRef(kv, filePath);
2608
2608
  sdk.triggerVoid("mem::disk-size-delta", { deltaBytes: bytesWritten });
2609
2609
  if (process.env["AGENTMEMORY_IMAGE_EMBEDDINGS"] === "true") sdk.triggerVoid("mem::vision-embed", {
@@ -2616,7 +2616,7 @@ function registerObserveFunction(sdk, kv, dedupMap, maxObservationsPerSession) {
2616
2616
  await kv.set(KV.observations(payload.sessionId), obsId, raw);
2617
2617
  } catch (error) {
2618
2618
  if (raw.imageData) {
2619
- const { deleteImage } = await import("./image-store-Bx3J2RQ8.mjs");
2619
+ const { deleteImage } = await import("./image-store-D2kqrFwI.mjs");
2620
2620
  const { deletedBytes } = await deleteImage(raw.imageData);
2621
2621
  if (deletedBytes > 0) sdk.triggerVoid("mem::disk-size-delta", { deltaBytes: -deletedBytes });
2622
2622
  }
@@ -4657,7 +4657,7 @@ function registerRememberFunction(sdk, kv) {
4657
4657
  const deletedMemoryIds = [];
4658
4658
  const deletedObservationIds = [];
4659
4659
  let deletedSession = false;
4660
- const { decrementImageRef } = await import("./image-refs-B2vyIEyZ.mjs");
4660
+ const { decrementImageRef } = await import("./image-refs-DcOzlSR9.mjs");
4661
4661
  if (data.memoryId) {
4662
4662
  const mem = await kv.get(KV.memories, data.memoryId);
4663
4663
  await kv.delete(KV.memories, data.memoryId);
@@ -4716,7 +4716,7 @@ const DEFAULTS$1 = {
4716
4716
  function registerEvictFunction(sdk, kv) {
4717
4717
  sdk.registerFunction("mem::evict", async (data) => {
4718
4718
  const dryRun = data?.dryRun ?? false;
4719
- const { decrementImageRef } = await import("./image-refs-B2vyIEyZ.mjs");
4719
+ const { decrementImageRef } = await import("./image-refs-DcOzlSR9.mjs");
4720
4720
  const configOverride = await kv.get(KV.config, "eviction").catch(() => null);
4721
4721
  const cfg = {
4722
4722
  ...DEFAULTS$1,
@@ -5319,7 +5319,7 @@ function registerAutoForgetFunction(sdk, kv) {
5319
5319
  sdk.registerFunction("mem::auto-forget", async (data) => {
5320
5320
  const dryRun = data?.dryRun ?? false;
5321
5321
  const now = Date.now();
5322
- const { decrementImageRef } = await import("./image-refs-B2vyIEyZ.mjs");
5322
+ const { decrementImageRef } = await import("./image-refs-DcOzlSR9.mjs");
5323
5323
  const result = {
5324
5324
  ttlExpired: [],
5325
5325
  contradictions: [],
@@ -5555,7 +5555,8 @@ function registerExportImportFunction(sdk, kv) {
5555
5555
  "0.9.4",
5556
5556
  "0.9.5",
5557
5557
  "0.9.6",
5558
- "0.9.7"
5558
+ "0.9.7",
5559
+ "0.9.8"
5559
5560
  ]).has(importData.version)) return {
5560
5561
  success: false,
5561
5562
  error: `Unsupported export version: ${importData.version}`
@@ -11912,7 +11913,7 @@ function registerRetentionFunctions(sdk, kv) {
11912
11913
  const threshold = typeof data?.threshold === "number" && Number.isFinite(data.threshold) ? data.threshold : DEFAULT_DECAY.tierThresholds.cold;
11913
11914
  const maxEvictRaw = typeof data?.maxEvict === "number" && Number.isInteger(data.maxEvict) ? data.maxEvict : 50;
11914
11915
  const maxEvict = Math.min(1e3, Math.max(0, maxEvictRaw));
11915
- const { decrementImageRef } = await import("./image-refs-B2vyIEyZ.mjs");
11916
+ const { decrementImageRef } = await import("./image-refs-DcOzlSR9.mjs");
11916
11917
  const candidates = (await kv.list(KV.retentionScores)).filter((s) => s.score < threshold).sort((a, b) => a.score - b.score).slice(0, maxEvict);
11917
11918
  if (data?.dryRun) return {
11918
11919
  success: true,
@@ -18266,4 +18267,4 @@ main().catch((err) => {
18266
18267
 
18267
18268
  //#endregion
18268
18269
  export { deleteImage as a, saveImageToDisk as c, IMAGES_DIR as i, touchImage as l, getImageRefCount as n, getMaxBytes as o, incrementImageRef as r, isManagedImagePath as s, decrementImageRef as t };
18269
- //# sourceMappingURL=src-DbgW4F8O.mjs.map
18270
+ //# sourceMappingURL=src-CMt8D9OY.mjs.map