@hasna/mementos 0.14.68 → 0.14.69

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.
Files changed (37) hide show
  1. package/dist/cli/__fixtures__/clean-fallback-stub-server.d.ts +2 -0
  2. package/dist/cli/__fixtures__/clean-fallback-stub-server.d.ts.map +1 -0
  3. package/dist/cli/commands/io-clean.d.ts.map +1 -1
  4. package/dist/cli/commands/memory-cmd-crud.d.ts.map +1 -1
  5. package/dist/cli/commands/storage.d.ts.map +1 -1
  6. package/dist/cli/global-options.d.ts +27 -0
  7. package/dist/cli/global-options.d.ts.map +1 -0
  8. package/dist/cli/index.js +502 -241
  9. package/dist/cli/register-all.d.ts +17 -0
  10. package/dist/cli/register-all.d.ts.map +1 -0
  11. package/dist/cli/startup-side-effects.d.ts +9 -0
  12. package/dist/cli/startup-side-effects.d.ts.map +1 -0
  13. package/dist/db/__fixtures__/fail-closed-stub-server.d.ts +2 -0
  14. package/dist/db/__fixtures__/fail-closed-stub-server.d.ts.map +1 -0
  15. package/dist/db/api-mode.d.ts +70 -2
  16. package/dist/db/api-mode.d.ts.map +1 -1
  17. package/dist/db/locks.d.ts.map +1 -1
  18. package/dist/db/memories.d.ts +24 -6
  19. package/dist/db/memories.d.ts.map +1 -1
  20. package/dist/db/session-jobs.d.ts.map +1 -1
  21. package/dist/db/store-backend.d.ts +33 -0
  22. package/dist/db/store-backend.d.ts.map +1 -0
  23. package/dist/index.js +80 -20
  24. package/dist/lib/enum-validation.d.ts +20 -0
  25. package/dist/lib/enum-validation.d.ts.map +1 -0
  26. package/dist/mcp/index.js +147 -30
  27. package/dist/server/helpers.d.ts +11 -0
  28. package/dist/server/helpers.d.ts.map +1 -1
  29. package/dist/server/index.d.ts.map +1 -1
  30. package/dist/server/index.js +185 -30
  31. package/dist/test-support/preload-local-store.d.ts +2 -0
  32. package/dist/test-support/preload-local-store.d.ts.map +1 -0
  33. package/dist/test-support/store-isolation.d.ts +83 -0
  34. package/dist/test-support/store-isolation.d.ts.map +1 -0
  35. package/dist/types/index.d.ts +8 -4
  36. package/dist/types/index.d.ts.map +1 -1
  37. package/package.json +1 -1
@@ -568,7 +568,7 @@ import { tmpdir } from "os";
568
568
  import { join as join3 } from "path";
569
569
  import { writeFileSync as writeFileSync3, unlinkSync as unlinkSync2 } from "fs";
570
570
  import { randomUUID } from "crypto";
571
- function firstEnv(...keys) {
571
+ function firstEnv(keys) {
572
572
  for (const k of keys) {
573
573
  const v = process.env[k]?.trim();
574
574
  if (v)
@@ -576,8 +576,38 @@ function firstEnv(...keys) {
576
576
  }
577
577
  return;
578
578
  }
579
+ function firstEnvKey(keys) {
580
+ for (const k of keys) {
581
+ if (process.env[k]?.trim())
582
+ return k;
583
+ }
584
+ return null;
585
+ }
579
586
  function hasDatabaseUrl() {
580
- return Boolean(firstEnv("HASNA_MEMENTOS_DATABASE_URL", "MEMENTOS_DATABASE_URL"));
587
+ return Boolean(firstEnv(DATABASE_URL_ENV_KEYS));
588
+ }
589
+ function isLoopbackHost(rawHost) {
590
+ const host = rawHost.replace(/^\[/, "").replace(/\]$/, "").toLowerCase();
591
+ return host === "localhost" || host === "::1" || /^127\./.test(host);
592
+ }
593
+ function assertRequestAllowedUnderTest(baseUrl) {
594
+ if (process.env["NODE_ENV"] !== "test")
595
+ return;
596
+ if (process.env[ALLOW_REMOTE_API_IN_TESTS_ENV]?.trim())
597
+ return;
598
+ let host;
599
+ try {
600
+ host = new URL(baseUrl).hostname;
601
+ } catch {
602
+ host = "";
603
+ }
604
+ if (host && isLoopbackHost(host))
605
+ return;
606
+ throw new Error("api-mode: REFUSING to make a cloud request from a test process \u2014 this would write to or read " + "from the SHARED PRODUCTION memory store, where test fixtures are indistinguishable from real " + `memories.
607
+ ` + ` host : ${host || "(unparseable base URL)"}
608
+ ` + ` how this happens: a selector set at module scope (after the bun test preload ran), or \`bun test\` ` + `invoked from a directory with no bunfig.toml so the preload never loaded.
609
+ ` + " fix : build the child/process env via src/test-support/store-isolation.ts, or point the " + `suite at a loopback stub.
610
+ ` + ` override : set ${ALLOW_REMOTE_API_IN_TESTS_ENV}=1 only for a test that must reach a remote endpoint.`);
581
611
  }
582
612
  function normalizeBase(raw) {
583
613
  let base = raw.trim().replace(/\/+$/, "");
@@ -585,9 +615,24 @@ function normalizeBase(raw) {
585
615
  return base;
586
616
  return `${base}/v1`;
587
617
  }
618
+ function assertUnambiguousStoreEnv() {
619
+ if (firstEnvKey(DB_PATH_ENV_KEYS))
620
+ return;
621
+ if (hasDatabaseUrl())
622
+ return;
623
+ const urlKey = firstEnvKey(API_URL_ENV_KEYS);
624
+ const keyKey = firstEnvKey(API_KEY_ENV_KEYS);
625
+ if (urlKey && !keyKey) {
626
+ throw new MementosStoreConfigError(`${urlKey} points at the cloud memory store but ${API_KEY_ENV_KEYS[0]} is not set. ` + `Refusing to serve the on-box SQLite store in its place, because it holds a different ` + `dataset. Set ${API_KEY_ENV_KEYS[0]} to reach the cloud store. If you meant to use the ` + `on-box SQLite store, unset ${urlKey} or set ${DB_PATH_ENV_KEYS[0]} explicitly.`);
627
+ }
628
+ if (keyKey && !urlKey) {
629
+ throw new MementosStoreConfigError(`${keyKey} is set but ${API_URL_ENV_KEYS[0]} is not, so the cloud memory store cannot be ` + `reached. Refusing to serve the on-box SQLite store in its place, because it holds a ` + `different dataset. Set ${API_URL_ENV_KEYS[0]} to reach the cloud store. If you meant to ` + `use the on-box SQLite store, unset ${keyKey} or set ${DB_PATH_ENV_KEYS[0]} explicitly.`);
630
+ }
631
+ }
588
632
  function getApiConfig() {
589
- const rawBase = firstEnv("HASNA_MEMENTOS_API_URL", "MEMENTOS_API_URL");
590
- const apiKey = firstEnv("HASNA_MEMENTOS_API_KEY", "MEMENTOS_API_KEY");
633
+ assertUnambiguousStoreEnv();
634
+ const rawBase = firstEnv(API_URL_ENV_KEYS);
635
+ const apiKey = firstEnv(API_KEY_ENV_KEYS);
591
636
  if (!rawBase || !apiKey)
592
637
  return null;
593
638
  return { baseUrl: normalizeBase(rawBase), apiKey };
@@ -601,6 +646,7 @@ function apiRequestRaw(method, path, body) {
601
646
  const cfg = getApiConfig();
602
647
  if (!cfg)
603
648
  throw new Error("api-mode: not configured (HASNA_MEMENTOS_API_URL / HASNA_MEMENTOS_API_KEY)");
649
+ assertRequestAllowedUnderTest(cfg.baseUrl);
604
650
  const url = `${cfg.baseUrl}${path.startsWith("/") ? path : `/${path}`}`;
605
651
  const hasBody = body !== undefined && body !== null;
606
652
  const timeout = process.env["HASNA_MEMENTOS_API_TIMEOUT"] || DEFAULT_TIMEOUT_S;
@@ -667,13 +713,13 @@ x-api-key: ${cfg.apiKey}
667
713
  }
668
714
  return { status, body: respBody };
669
715
  }
670
- function apiJson(method, path, body) {
716
+ function apiJson(method, path, body, options) {
671
717
  const raw = apiRequestRaw(method, path, body);
672
718
  if (raw.status >= 200 && raw.status < 300) {
673
719
  const data = raw.body.trim() ? JSON.parse(raw.body) : undefined;
674
720
  return { status: raw.status, data };
675
721
  }
676
- if (raw.status === 404) {
722
+ if (raw.status === 404 && options?.allow404) {
677
723
  return { status: 404, data: undefined };
678
724
  }
679
725
  let msg = `mementos cloud ${method} ${path} \u2192 ${raw.status}`;
@@ -705,8 +751,19 @@ function toQuery(params) {
705
751
  const s = sp.toString();
706
752
  return s ? `?${s}` : "";
707
753
  }
708
- var ApiRequestError, DEFAULT_TIMEOUT_S = "45";
754
+ var API_URL_ENV_KEYS, API_KEY_ENV_KEYS, DATABASE_URL_ENV_KEYS, ALLOW_REMOTE_API_IN_TESTS_ENV = "MEMENTOS_ALLOW_REMOTE_API_IN_TESTS", DB_PATH_ENV_KEYS, MementosStoreConfigError, ApiRequestError, DEFAULT_TIMEOUT_S = "45";
709
755
  var init_api_mode = __esm(() => {
756
+ API_URL_ENV_KEYS = ["HASNA_MEMENTOS_API_URL", "MEMENTOS_API_URL"];
757
+ API_KEY_ENV_KEYS = ["HASNA_MEMENTOS_API_KEY", "MEMENTOS_API_KEY"];
758
+ DATABASE_URL_ENV_KEYS = ["HASNA_MEMENTOS_DATABASE_URL", "MEMENTOS_DATABASE_URL"];
759
+ DB_PATH_ENV_KEYS = ["HASNA_MEMENTOS_DB_PATH", "MEMENTOS_DB_PATH"];
760
+ MementosStoreConfigError = class MementosStoreConfigError extends Error {
761
+ code = "MEMENTOS_STORE_CONFIG";
762
+ constructor(message) {
763
+ super(message);
764
+ this.name = "MementosStoreConfigError";
765
+ }
766
+ };
710
767
  ApiRequestError = class ApiRequestError extends Error {
711
768
  status;
712
769
  body;
@@ -1926,8 +1983,19 @@ var init_hooks = __esm(() => {
1926
1983
  });
1927
1984
 
1928
1985
  // src/types/index.ts
1929
- var AgentConflictError, EntityNotFoundError, MemoryNotFoundError, DuplicateMemoryError, VersionConflictError, MemoryConflictError;
1986
+ var MEMORY_SCOPES, MEMORY_CATEGORIES, MEMORY_SOURCES, MEMORY_STATUSES, AgentConflictError, EntityNotFoundError, MemoryNotFoundError, DuplicateMemoryError, VersionConflictError, MemoryConflictError;
1930
1987
  var init_types = __esm(() => {
1988
+ MEMORY_SCOPES = ["global", "shared", "private", "working"];
1989
+ MEMORY_CATEGORIES = [
1990
+ "preference",
1991
+ "fact",
1992
+ "knowledge",
1993
+ "history",
1994
+ "procedural",
1995
+ "resource"
1996
+ ];
1997
+ MEMORY_SOURCES = ["user", "agent", "system", "auto", "imported"];
1998
+ MEMORY_STATUSES = ["active", "archived", "expired"];
1931
1999
  AgentConflictError = class AgentConflictError extends Error {
1932
2000
  conflict = true;
1933
2001
  existing_id;
@@ -2090,6 +2158,41 @@ var init_redact = __esm(() => {
2090
2158
  ];
2091
2159
  });
2092
2160
 
2161
+ // src/lib/enum-validation.ts
2162
+ function formatEnumViolation(v) {
2163
+ return `Invalid ${v.field}: "${v.value}". Allowed values: ${v.allowed.join(", ")}.`;
2164
+ }
2165
+ function validateEnumField(field, value) {
2166
+ const allowed = ENUM_FIELDS[field];
2167
+ if (!allowed)
2168
+ return null;
2169
+ if (value === undefined || value === null || value === "")
2170
+ return null;
2171
+ if (typeof value === "string" && allowed.includes(value))
2172
+ return null;
2173
+ return { field, value: String(value), allowed };
2174
+ }
2175
+ function validateMemoryEnums(input) {
2176
+ for (const field of Object.keys(ENUM_FIELDS)) {
2177
+ if (!(field in input))
2178
+ continue;
2179
+ const violation = validateEnumField(field, input[field]);
2180
+ if (violation)
2181
+ return violation;
2182
+ }
2183
+ return null;
2184
+ }
2185
+ var ENUM_FIELDS;
2186
+ var init_enum_validation = __esm(() => {
2187
+ init_types();
2188
+ ENUM_FIELDS = {
2189
+ category: MEMORY_CATEGORIES,
2190
+ scope: MEMORY_SCOPES,
2191
+ source: MEMORY_SOURCES,
2192
+ status: MEMORY_STATUSES
2193
+ };
2194
+ });
2195
+
2093
2196
  // src/lib/poisoning.ts
2094
2197
  function computeTrustScore(value, key, existingMemories, claimedImportance) {
2095
2198
  let score = 1;
@@ -2320,7 +2423,10 @@ function parseMemoryRow(row) {
2320
2423
  }
2321
2424
  function createMemory(input, dedupeMode = "merge", db) {
2322
2425
  if (!db && isApiMode()) {
2323
- const { data } = apiJson("POST", "/memories", { ...input, dedupe: dedupeMode });
2426
+ const { status, data } = apiJson("POST", "/memories", { ...input, dedupe: dedupeMode });
2427
+ if (!data || !data.id) {
2428
+ throw new ApiRequestError(`mementos cloud POST /memories \u2192 ${status} but no memory was returned; the write did not persist (key: ${input.key})`, status, "");
2429
+ }
2324
2430
  return data;
2325
2431
  }
2326
2432
  const d = db || getDatabase();
@@ -2459,16 +2565,25 @@ function bulkUpsertMemories(memories, db) {
2459
2565
  const d = db || getDatabase();
2460
2566
  let inserted = 0;
2461
2567
  let skipped = 0;
2568
+ let rejected = 0;
2462
2569
  const errors = [];
2463
- const insert = d.prepare(`INSERT OR IGNORE INTO memories (id, key, value, category, scope, summary, tags, importance, source, status, pinned, agent_id, project_id, session_id, machine_id, namespace, created_by_agent, when_to_use, sequence_group, sequence_order, metadata, access_count, version, expires_at, valid_from, valid_until, ingested_at, created_at, updated_at)
2464
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`);
2570
+ const insert = d.prepare(`INSERT INTO memories (id, key, value, category, scope, summary, tags, importance, source, status, pinned, agent_id, project_id, session_id, machine_id, namespace, created_by_agent, when_to_use, sequence_group, sequence_order, metadata, access_count, version, expires_at, valid_from, valid_until, ingested_at, created_at, updated_at)
2571
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2572
+ ON CONFLICT DO NOTHING`);
2465
2573
  const insertTag = d.prepare("INSERT OR IGNORE INTO memory_tags (memory_id, tag) VALUES (?, ?)");
2466
2574
  for (const mem of memories) {
2467
2575
  const key = mem["key"];
2468
2576
  const id = mem["id"] || uuid();
2469
2577
  try {
2470
2578
  if (!key) {
2471
- errors.push(`skipped row without key (id=${id})`);
2579
+ rejected++;
2580
+ errors.push(`rejected row without key (id=${id})`);
2581
+ continue;
2582
+ }
2583
+ const violation = validateMemoryEnums(mem);
2584
+ if (violation) {
2585
+ rejected++;
2586
+ errors.push(`Rejected "${key}": ${formatEnumViolation(violation)}`);
2472
2587
  continue;
2473
2588
  }
2474
2589
  const timestamp = now();
@@ -2517,10 +2632,11 @@ function bulkUpsertMemories(memories, db) {
2517
2632
  skipped++;
2518
2633
  }
2519
2634
  } catch (e) {
2635
+ rejected++;
2520
2636
  errors.push(`Failed "${String(key)}": ${e instanceof Error ? e.message : String(e)}`);
2521
2637
  }
2522
2638
  }
2523
- return { inserted, skipped, errors, total: memories.length };
2639
+ return { inserted, skipped, rejected, errors, total: memories.length };
2524
2640
  }
2525
2641
  function ensureMemoryReferences(d, input) {
2526
2642
  const t = now();
@@ -2548,7 +2664,7 @@ function listMemoriesByKey(key, db) {
2548
2664
  }
2549
2665
  function getMemory(id, db) {
2550
2666
  if (!db && isApiMode()) {
2551
- const { status, data } = apiJson("GET", `/memories/${encodeURIComponent(id)}`);
2667
+ const { status, data } = apiJson("GET", `/memories/${encodeURIComponent(id)}`, undefined, { allow404: true });
2552
2668
  return status === 404 ? null : data ?? null;
2553
2669
  }
2554
2670
  const d = db || getDatabase();
@@ -2881,7 +2997,7 @@ function getMemoryEmbeddings(ids, db) {
2881
2997
  }
2882
2998
  function updateMemory(id, input, db) {
2883
2999
  if (!db && isApiMode()) {
2884
- const { status, data } = apiJson("PATCH", `/memories/${encodeURIComponent(id)}`, input);
3000
+ const { status, data } = apiJson("PATCH", `/memories/${encodeURIComponent(id)}`, input, { allow404: true });
2885
3001
  if (status === 404)
2886
3002
  throw new MemoryNotFoundError(id);
2887
3003
  return data;
@@ -2989,7 +3105,7 @@ function updateMemory(id, input, db) {
2989
3105
  }
2990
3106
  function deleteMemory(id, db) {
2991
3107
  if (!db && isApiMode()) {
2992
- const { status } = apiJson("DELETE", `/memories/${encodeURIComponent(id)}`);
3108
+ const { status } = apiJson("DELETE", `/memories/${encodeURIComponent(id)}`, undefined, { allow404: true });
2993
3109
  return status !== 404;
2994
3110
  }
2995
3111
  const d = db || getDatabase();
@@ -3141,6 +3257,7 @@ var init_memories = __esm(() => {
3141
3257
  init_types();
3142
3258
  init_database();
3143
3259
  init_redact();
3260
+ init_enum_validation();
3144
3261
  init_hooks();
3145
3262
  init_poisoning();
3146
3263
  init_entity_memories();
@@ -3209,7 +3326,7 @@ function createEntity(input, db) {
3209
3326
  }
3210
3327
  function getEntity(id, db) {
3211
3328
  if (!db && isApiMode()) {
3212
- const { status, data } = apiJson("GET", `/entities/${encodeURIComponent(id)}`);
3329
+ const { status, data } = apiJson("GET", `/entities/${encodeURIComponent(id)}`, undefined, { allow404: true });
3213
3330
  if (status === 404 || !data)
3214
3331
  throw new EntityNotFoundError(id);
3215
3332
  return data;
@@ -3292,7 +3409,7 @@ function listEntities(filter = {}, db) {
3292
3409
  }
3293
3410
  function updateEntity(id, input, db) {
3294
3411
  if (!db && isApiMode()) {
3295
- const { status, data } = apiJson("PATCH", `/entities/${encodeURIComponent(id)}`, input);
3412
+ const { status, data } = apiJson("PATCH", `/entities/${encodeURIComponent(id)}`, input, { allow404: true });
3296
3413
  if (status === 404 || !data)
3297
3414
  throw new EntityNotFoundError(id);
3298
3415
  return data;
@@ -3325,7 +3442,7 @@ function updateEntity(id, input, db) {
3325
3442
  }
3326
3443
  function deleteEntity(id, db) {
3327
3444
  if (!db && isApiMode()) {
3328
- const { status } = apiJson("DELETE", `/entities/${encodeURIComponent(id)}`);
3445
+ const { status } = apiJson("DELETE", `/entities/${encodeURIComponent(id)}`, undefined, { allow404: true });
3329
3446
  if (status === 404)
3330
3447
  throw new EntityNotFoundError(id);
3331
3448
  return;
@@ -4253,7 +4370,7 @@ function createRelation(input, db) {
4253
4370
  }
4254
4371
  function getRelation(id, db) {
4255
4372
  if (!db && isApiMode()) {
4256
- const { status, data } = apiJson("GET", `/relations/${encodeURIComponent(id)}`);
4373
+ const { status, data } = apiJson("GET", `/relations/${encodeURIComponent(id)}`, undefined, { allow404: true });
4257
4374
  if (status === 404 || !data)
4258
4375
  throw new Error(`Relation not found: ${id}`);
4259
4376
  return data;
@@ -4298,7 +4415,7 @@ function listRelations(filter, db) {
4298
4415
  }
4299
4416
  function deleteRelation(id, db) {
4300
4417
  if (!db && isApiMode()) {
4301
- const { status } = apiJson("DELETE", `/relations/${encodeURIComponent(id)}`);
4418
+ const { status } = apiJson("DELETE", `/relations/${encodeURIComponent(id)}`, undefined, { allow404: true });
4302
4419
  if (status === 404)
4303
4420
  throw new Error(`Relation not found: ${id}`);
4304
4421
  return;
@@ -52822,7 +52939,7 @@ function createWebhookHook(input, db) {
52822
52939
  }
52823
52940
  function getWebhookHook(id, db) {
52824
52941
  if (!db && isApiMode()) {
52825
- const { status, data } = apiJson("GET", `/webhooks/${encodeURIComponent(id)}`);
52942
+ const { status, data } = apiJson("GET", `/webhooks/${encodeURIComponent(id)}`, undefined, { allow404: true });
52826
52943
  if (status === 404 || !data)
52827
52944
  return null;
52828
52945
  return data;
@@ -52858,7 +52975,7 @@ function updateWebhookHook(id, updates, db) {
52858
52975
  enabled: updates.enabled,
52859
52976
  priority: updates.priority,
52860
52977
  description: updates.description
52861
- });
52978
+ }, { allow404: true });
52862
52979
  if (status === 404 || !data)
52863
52980
  return null;
52864
52981
  return data;
@@ -52889,7 +53006,7 @@ function updateWebhookHook(id, updates, db) {
52889
53006
  }
52890
53007
  function deleteWebhookHook(id, db) {
52891
53008
  if (!db && isApiMode()) {
52892
- const { status } = apiJson("DELETE", `/webhooks/${encodeURIComponent(id)}`);
53009
+ const { status } = apiJson("DELETE", `/webhooks/${encodeURIComponent(id)}`, undefined, { allow404: true });
52893
53010
  return status === 204 || status === 200;
52894
53011
  }
52895
53012
  const d = db || getDatabase();
@@ -53161,7 +53278,7 @@ function createSessionJob(input, db) {
53161
53278
  }
53162
53279
  function getSessionJob(id, db) {
53163
53280
  if (!db && isApiMode()) {
53164
- const { status, data } = apiJson("GET", `/sessions/jobs/${encodeURIComponent(id)}`);
53281
+ const { status, data } = apiJson("GET", `/sessions/jobs/${encodeURIComponent(id)}`, undefined, { allow404: true });
53165
53282
  if (status === 404 || !data)
53166
53283
  return null;
53167
53284
  return data;
@@ -54296,6 +54413,16 @@ function errorResponse(message, status, details) {
54296
54413
  body["details"] = details;
54297
54414
  return json(body, status);
54298
54415
  }
54416
+ function describeConstraintViolation(e) {
54417
+ if (!e || typeof e !== "object")
54418
+ return null;
54419
+ const code = String(e.code ?? "");
54420
+ const message = String(e.message ?? "");
54421
+ const isConstraint = code.startsWith("SQLITE_CONSTRAINT") || /^23\d{3}$/.test(code) || /constraint failed/i.test(message);
54422
+ if (!isConstraint)
54423
+ return null;
54424
+ return `Request rejected by a database constraint: ${message || code}. Check that enum fields (category, scope, source, status) and referenced ids are valid.`;
54425
+ }
54299
54426
  var MAX_BODY_BYTES = 1 * 1024 * 1024;
54300
54427
  async function readJson(req) {
54301
54428
  try {
@@ -54496,6 +54623,7 @@ var FORMAT_UNITS = [
54496
54623
 
54497
54624
  // src/server/routes/memories-crud.ts
54498
54625
  init_router();
54626
+ init_enum_validation();
54499
54627
  init_types();
54500
54628
  addRoute("GET", "/api/memories", (_req, url) => {
54501
54629
  const q = getSearchParams(url);
@@ -54544,6 +54672,14 @@ addRoute("POST", "/api/memories", async (req) => {
54544
54672
  if (!body["key"] || !body["value"]) {
54545
54673
  return errorResponse("Missing required fields: key, value", 400);
54546
54674
  }
54675
+ const violation = validateMemoryEnums(body);
54676
+ if (violation) {
54677
+ return errorResponse(formatEnumViolation(violation), 400, {
54678
+ field: violation.field,
54679
+ value: violation.value,
54680
+ allowed: violation.allowed
54681
+ });
54682
+ }
54547
54683
  try {
54548
54684
  if (body["ttl_ms"] !== undefined && typeof body["ttl_ms"] === "string") {
54549
54685
  body["ttl_ms"] = parseDuration(body["ttl_ms"]);
@@ -54573,6 +54709,14 @@ addRoute("PATCH", "/api/memories/:id", async (req, _url, params) => {
54573
54709
  if (!body) {
54574
54710
  return errorResponse("Invalid JSON body", 400);
54575
54711
  }
54712
+ const patchViolation = validateMemoryEnums(body);
54713
+ if (patchViolation) {
54714
+ return errorResponse(formatEnumViolation(patchViolation), 400, {
54715
+ field: patchViolation.field,
54716
+ value: patchViolation.value,
54717
+ allowed: patchViolation.allowed
54718
+ });
54719
+ }
54576
54720
  const updateBody = { ...body };
54577
54721
  if (updateBody["version"] === undefined) {
54578
54722
  const existing = getMemory(params["id"]);
@@ -55602,6 +55746,12 @@ addRoute("POST", "/api/memories/bulk-upsert", async (req) => {
55602
55746
  }
55603
55747
  const memoriesArr = body["memories"];
55604
55748
  const result = bulkUpsertMemories(memoriesArr);
55749
+ if (result.rejected > 0) {
55750
+ return json({
55751
+ ...result,
55752
+ error: `${result.rejected} of ${result.total} memories were rejected and did not persist. See errors.`
55753
+ }, 400);
55754
+ }
55605
55755
  return json(result, 201);
55606
55756
  });
55607
55757
 
@@ -55985,7 +56135,7 @@ function registerAgent(name, sessionId, description, role, projectId, db) {
55985
56135
  }
55986
56136
  function getAgent(idOrName, db) {
55987
56137
  if (!db && isApiMode()) {
55988
- const { status, data } = apiJson("GET", `/agents/${encodeURIComponent(idOrName)}`);
56138
+ const { status, data } = apiJson("GET", `/agents/${encodeURIComponent(idOrName)}`, undefined, { allow404: true });
55989
56139
  if (status === 404 || !data)
55990
56140
  return null;
55991
56141
  return data;
@@ -56024,7 +56174,7 @@ function listAgentsByProject(projectId, db) {
56024
56174
  }
56025
56175
  function updateAgent(id, updates, db) {
56026
56176
  if (!db && isApiMode()) {
56027
- const { status, data } = apiJson("PATCH", `/agents/${encodeURIComponent(id)}`, updates);
56177
+ const { status, data } = apiJson("PATCH", `/agents/${encodeURIComponent(id)}`, updates, { allow404: true });
56028
56178
  if (status === 404 || !data)
56029
56179
  return null;
56030
56180
  return data;
@@ -56132,7 +56282,7 @@ function acquireLock(agentId, resourceType, resourceId, lockType = "exclusive",
56132
56282
  }
56133
56283
  function releaseLock(lockId, agentId, db) {
56134
56284
  if (!db && isApiMode()) {
56135
- const { status } = apiJson("DELETE", `/locks/${encodeURIComponent(lockId)}`, { agent_id: agentId });
56285
+ const { status } = apiJson("DELETE", `/locks/${encodeURIComponent(lockId)}`, { agent_id: agentId }, { allow404: true });
56136
56286
  return status !== 404;
56137
56287
  }
56138
56288
  const d = db || getDatabase();
@@ -56315,7 +56465,7 @@ function registerProject(name, path, description, memoryPrefix, db) {
56315
56465
  }
56316
56466
  function getProject(idOrPath, db) {
56317
56467
  if (!db && isApiMode()) {
56318
- const { status, data } = apiJson("GET", `/projects/${encodeURIComponent(idOrPath)}`);
56468
+ const { status, data } = apiJson("GET", `/projects/${encodeURIComponent(idOrPath)}`, undefined, { allow404: true });
56319
56469
  if (status === 404 || !data)
56320
56470
  return null;
56321
56471
  return data;
@@ -59043,7 +59193,7 @@ function createSubscription(input, db) {
59043
59193
  }
59044
59194
  function deleteSubscription(id, db) {
59045
59195
  if (!db && isApiMode()) {
59046
- const { status } = apiJson("DELETE", `/subscriptions/${encodeURIComponent(id)}`);
59196
+ const { status } = apiJson("DELETE", `/subscriptions/${encodeURIComponent(id)}`, undefined, { allow404: true });
59047
59197
  return status !== 404;
59048
59198
  }
59049
59199
  const d = db || getDatabase();
@@ -59337,6 +59487,11 @@ function startServer(port) {
59337
59487
  try {
59338
59488
  return await matched.handler(req, url2, matched.params);
59339
59489
  } catch (e) {
59490
+ const constraint = describeConstraintViolation(e);
59491
+ if (constraint) {
59492
+ console.warn(`[mementos-serve] ${req.method} ${pathname}: rejected \u2014 ${constraint}`);
59493
+ return errorResponse(constraint, 400);
59494
+ }
59340
59495
  console.error(`[mementos-serve] ${req.method} ${pathname}:`, e);
59341
59496
  return errorResponse("Internal server error", 500);
59342
59497
  }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=preload-local-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preload-local-store.d.ts","sourceRoot":"","sources":["../../src/test-support/preload-local-store.ts"],"names":[],"mappings":""}
@@ -0,0 +1,83 @@
1
+ import type { StoreBackendReport } from "../db/store-backend.js";
2
+ /**
3
+ * Every env var that can move the store off local SQLite, plus the store
4
+ * credential. Derived from the resolver's own exported key lists rather than
5
+ * retyped, so adding a selector in src/db/api-mode.ts or src/storage.ts
6
+ * automatically widens what the harnesses neutralize.
7
+ *
8
+ * `MEMENTOS_DATABASE_PASSWORD` is not a selector but is the store credential;
9
+ * removing it can only make the child more local, never less.
10
+ */
11
+ export declare const STORE_SELECTOR_ENV_KEYS: readonly string[];
12
+ /** The two env vars that point the CLI at a specific SQLite file. */
13
+ export declare const DB_PATH_ENV_KEYS: readonly ["MEMENTOS_DB_PATH", "HASNA_MEMENTOS_DB_PATH"];
14
+ export interface IsolatedStoreEnvOptions {
15
+ /**
16
+ * Extra vars to set in the child, applied last. Harnesses use this to blank
17
+ * LLM provider keys so no test can make a billed call. Kept opt-in because
18
+ * blanking them changes what commands like `doctor` report.
19
+ */
20
+ extra?: Record<string, string>;
21
+ }
22
+ /**
23
+ * Build a child-process env that is pinned to a local SQLite file at `dbPath`.
24
+ *
25
+ * Selectors are DELETED rather than set to `""` — the resolver treats empty as
26
+ * unset either way, but deleting leaves no ambiguity for a human reading the
27
+ * child's environment during a postmortem.
28
+ *
29
+ * Building the env is necessary but NOT sufficient: pair it with
30
+ * {@link assertLocalStoreBackend} before the suite performs any write.
31
+ */
32
+ export declare function isolatedStoreEnv(dbPath: string, options?: IsolatedStoreEnvOptions): Record<string, string>;
33
+ export interface StubApiEnvOptions {
34
+ /** Pin the (non-authoritative) local SQLite path too, for belt and braces. */
35
+ dbPath?: string;
36
+ /** Stub bearer token. Never a real credential — the stub does not check it. */
37
+ apiKey?: string;
38
+ }
39
+ /**
40
+ * Build a child env for a suite that *deliberately* runs in API mode against a
41
+ * local stub server.
42
+ *
43
+ * Such a suite still must not inherit the operator's production API URL or key:
44
+ * it overrides the URL, but if that override were ever empty or renamed, the
45
+ * ambient value would take over and the suite would drive the real store. So
46
+ * start from a fully de-selected env and add back only the stub's own values.
47
+ *
48
+ * @param baseUrl the stub's origin, e.g. `http://127.0.0.1:<port>/<mode>`
49
+ */
50
+ export declare function stubApiEnv(baseUrl: string, options?: StubApiEnvOptions): Record<string, string>;
51
+ /** LLM provider keys most harnesses blank so no test can make a billed call. */
52
+ export declare const LLM_PROVIDER_ENV_KEYS: readonly ["ANTHROPIC_API_KEY", "OPENAI_API_KEY", "CEREBRAS_API_KEY", "XAI_API_KEY"];
53
+ /** `{ ANTHROPIC_API_KEY: "", ... }` — pass as `extra` to blank LLM providers. */
54
+ export declare function blankLlmProviderEnv(): Record<string, string>;
55
+ /**
56
+ * Ask the child process which store it resolved, and THROW if it is not local.
57
+ *
58
+ * This is the guard that turns an unknown future selector into a red suite
59
+ * rather than a silent production write. It asks the CLI itself
60
+ * (`storage mode --json`) rather than recomputing the answer here, so the
61
+ * verdict comes from the same resolution code the writes will use — and it runs
62
+ * as a real child process with the real env, so an env var that fails to cross
63
+ * the process boundary is caught rather than assumed away.
64
+ *
65
+ * `storage mode` opens no database and makes no network request, so this is
66
+ * safe to call even when the ambient env points at production.
67
+ *
68
+ * @param cliPath path to src/cli/index.tsx
69
+ * @param env the env produced by {@link isolatedStoreEnv}
70
+ * @param expectedDbPath when given, also assert the child resolved this path
71
+ */
72
+ export declare function assertLocalStoreBackend(cliPath: string, env: Record<string, string>, expectedDbPath?: string): Promise<StoreBackendReport>;
73
+ /**
74
+ * Assert the scratch SQLite file now exists on disk.
75
+ *
76
+ * This is the second half of the proof and it is not redundant with
77
+ * {@link assertLocalStoreBackend}: the mode report says where the child INTENDS
78
+ * to write, whereas this says a write actually landed there. The reported
79
+ * incident's signature was precisely a correct-looking path with no file ever
80
+ * created, so call this AFTER the suite's first write.
81
+ */
82
+ export declare function assertScratchDbCreated(dbPath: string, context?: string): void;
83
+ //# sourceMappingURL=store-isolation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-isolation.d.ts","sourceRoot":"","sources":["../../src/test-support/store-isolation.ts"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAGjE;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAWpD,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,gBAAgB,yDAA0D,CAAC;AAExF,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,uBAA4B,GACpC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAKxB;AASD,MAAM,WAAW,iBAAiB;IAChC,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQnG;AAED,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,qFAKxB,CAAC;AAEX,iFAAiF;AACjF,wBAAgB,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE5D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3B,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,kBAAkB,CAAC,CAsD7B;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,SAA0B,GAAG,IAAI,CAQ9F"}
@@ -1,7 +1,11 @@
1
- export type MemoryScope = "global" | "shared" | "private" | "working";
2
- export type MemoryCategory = "preference" | "fact" | "knowledge" | "history" | "procedural" | "resource";
3
- export type MemorySource = "user" | "agent" | "system" | "auto" | "imported";
4
- export type MemoryStatus = "active" | "archived" | "expired";
1
+ export declare const MEMORY_SCOPES: readonly ["global", "shared", "private", "working"];
2
+ export type MemoryScope = (typeof MEMORY_SCOPES)[number];
3
+ export declare const MEMORY_CATEGORIES: readonly ["preference", "fact", "knowledge", "history", "procedural", "resource"];
4
+ export type MemoryCategory = (typeof MEMORY_CATEGORIES)[number];
5
+ export declare const MEMORY_SOURCES: readonly ["user", "agent", "system", "auto", "imported"];
6
+ export type MemorySource = (typeof MEMORY_SOURCES)[number];
7
+ export declare const MEMORY_STATUSES: readonly ["active", "archived", "expired"];
8
+ export type MemoryStatus = (typeof MEMORY_STATUSES)[number];
5
9
  export interface Memory {
6
10
  id: string;
7
11
  key: string;
@@ -1 +1 @@
1
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D,SAAS,EAAE,MAAM,CAAC;CACnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/mementos",
3
- "version": "0.14.68",
3
+ "version": "0.14.69",
4
4
  "description": "Universal memory system for AI agents - CLI + MCP server + library API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",