@agentmemory/agentmemory 0.9.6 → 0.9.7

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-CKMeHaPN.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";
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-CF4gfkLr.mjs");
2603
+ const { saveImageToDisk } = await import("./image-store-Bx3J2RQ8.mjs");
2604
2604
  const { filePath, bytesWritten } = await saveImageToDisk(pendingImageData);
2605
2605
  raw.imageData = filePath;
2606
- const { incrementImageRef } = await import("./image-refs-CZVd2z6E.mjs");
2606
+ const { incrementImageRef } = await import("./image-refs-B2vyIEyZ.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-CF4gfkLr.mjs");
2619
+ const { deleteImage } = await import("./image-store-Bx3J2RQ8.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-CZVd2z6E.mjs");
4660
+ const { decrementImageRef } = await import("./image-refs-B2vyIEyZ.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-CZVd2z6E.mjs");
4719
+ const { decrementImageRef } = await import("./image-refs-B2vyIEyZ.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-CZVd2z6E.mjs");
5322
+ const { decrementImageRef } = await import("./image-refs-B2vyIEyZ.mjs");
5323
5323
  const result = {
5324
5324
  ttlExpired: [],
5325
5325
  contradictions: [],
@@ -5554,7 +5554,8 @@ function registerExportImportFunction(sdk, kv) {
5554
5554
  "0.9.3",
5555
5555
  "0.9.4",
5556
5556
  "0.9.5",
5557
- "0.9.6"
5557
+ "0.9.6",
5558
+ "0.9.7"
5558
5559
  ]).has(importData.version)) return {
5559
5560
  success: false,
5560
5561
  error: `Unsupported export version: ${importData.version}`
@@ -11911,7 +11912,7 @@ function registerRetentionFunctions(sdk, kv) {
11911
11912
  const threshold = typeof data?.threshold === "number" && Number.isFinite(data.threshold) ? data.threshold : DEFAULT_DECAY.tierThresholds.cold;
11912
11913
  const maxEvictRaw = typeof data?.maxEvict === "number" && Number.isInteger(data.maxEvict) ? data.maxEvict : 50;
11913
11914
  const maxEvict = Math.min(1e3, Math.max(0, maxEvictRaw));
11914
- const { decrementImageRef } = await import("./image-refs-CZVd2z6E.mjs");
11915
+ const { decrementImageRef } = await import("./image-refs-B2vyIEyZ.mjs");
11915
11916
  const candidates = (await kv.list(KV.retentionScores)).filter((s) => s.score < threshold).sort((a, b) => a.score - b.score).slice(0, maxEvict);
11916
11917
  if (data?.dryRun) return {
11917
11918
  success: true,
@@ -18265,4 +18266,4 @@ main().catch((err) => {
18265
18266
 
18266
18267
  //#endregion
18267
18268
  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 };
18268
- //# sourceMappingURL=src-C7vGxttN.mjs.map
18269
+ //# sourceMappingURL=src-DbgW4F8O.mjs.map