@frontmcp/plugin-remember 1.9.1-rc.1 → 1.9.1-rc.3

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/esm/index.mjs CHANGED
@@ -285,7 +285,7 @@ async function deserializeAndDecrypt(str, keySource) {
285
285
  }
286
286
 
287
287
  // plugins/plugin-remember/src/remember.errors.ts
288
- import { PublicMcpError } from "@frontmcp/sdk";
288
+ import { InternalMcpError, PublicMcpError } from "@frontmcp/sdk";
289
289
  var RememberIdentityError = class extends PublicMcpError {
290
290
  name = "RememberIdentityError";
291
291
  constructor(message) {
@@ -302,6 +302,12 @@ var RememberScopeNotAllowedError = class extends PublicMcpError {
302
302
  );
303
303
  }
304
304
  };
305
+ var RememberConfigurationError = class extends InternalMcpError {
306
+ name = "RememberConfigurationError";
307
+ constructor(message) {
308
+ super(message, "REMEMBER_CONFIGURATION");
309
+ }
310
+ };
305
311
 
306
312
  // plugins/plugin-remember/src/remember.legacy-purge.ts
307
313
  var LEGACY_SCOPES = ["session", "tool", "user"];
@@ -320,7 +326,7 @@ function parseFirstSeenAt(raw) {
320
326
  return void 0;
321
327
  }
322
328
  }
323
- async function readLayoutFirstSeenAt(store, keyPrefix, logger) {
329
+ async function readLayoutFirstSeenAt(store, keyPrefix, logger, markerTtlSeconds) {
324
330
  const key = `${keyPrefix}${LAYOUT_MARKER_KEY}`;
325
331
  const standDown = (reason, extra = {}) => {
326
332
  logger?.debug?.(`remember: ${reason}, legacy purge stood down`, { key, ...extra });
@@ -334,10 +340,10 @@ async function readLayoutFirstSeenAt(store, keyPrefix, logger) {
334
340
  const marker = { version: LAYOUT_VERSION, firstSeenAt: Date.now() };
335
341
  const serialized = JSON.stringify(marker);
336
342
  if (!store.setIfAbsent) {
337
- await store.setValue(key, serialized);
343
+ await store.setValue(key, serialized, markerTtlSeconds);
338
344
  return marker.firstSeenAt;
339
345
  }
340
- if (await store.setIfAbsent(key, serialized)) {
346
+ if (await store.setIfAbsent(key, serialized, markerTtlSeconds)) {
341
347
  return marker.firstSeenAt;
342
348
  }
343
349
  const winner = await store.getValue(key);
@@ -381,6 +387,7 @@ function scheduleLegacyRememberPurge(store, keyPrefix, options = {}) {
381
387
  if (scheduled.has(store)) return;
382
388
  scheduled.add(store);
383
389
  const delayMs = options.delayMs ?? DEFAULT_LEGACY_PURGE_DELAY_MS;
390
+ const markerTtlSeconds = options.defaultTTL ? Math.max(options.defaultTTL, Math.ceil(2 * delayMs / 1e3)) : void 0;
384
391
  const arm = (waitMs) => {
385
392
  const timer = setTimeout(
386
393
  () => {
@@ -391,7 +398,7 @@ function scheduleLegacyRememberPurge(store, keyPrefix, options = {}) {
391
398
  timer.unref?.();
392
399
  };
393
400
  const attempt = async () => {
394
- const firstSeenAt = await readLayoutFirstSeenAt(store, keyPrefix, options.logger);
401
+ const firstSeenAt = await readLayoutFirstSeenAt(store, keyPrefix, options.logger, markerTtlSeconds);
395
402
  if (firstSeenAt === void 0) return;
396
403
  const remainingMs = firstSeenAt + delayMs - Date.now();
397
404
  if (remainingMs > 0) {
@@ -411,6 +418,9 @@ function encodeKeyPart(value) {
411
418
  function remainingSeconds(expiresAt, now) {
412
419
  return Math.max(1, Math.ceil((expiresAt - now) / 1e3));
413
420
  }
421
+ function expiryAfter(ttlSeconds, now) {
422
+ return ttlSeconds ? now + ttlSeconds * 1e3 : void 0;
423
+ }
414
424
  var RememberAccessor = class {
415
425
  store;
416
426
  ctx;
@@ -424,7 +434,11 @@ var RememberAccessor = class {
424
434
  this.keyPrefix = config.keyPrefix ?? "remember:";
425
435
  this.encryptionEnabled = config.encryption?.enabled !== false;
426
436
  if (!config.skipLegacyPurge) {
427
- scheduleLegacyRememberPurge(store, this.keyPrefix, { delayMs: config.legacyPurgeDelayMs, logger });
437
+ scheduleLegacyRememberPurge(store, this.keyPrefix, {
438
+ delayMs: config.legacyPurgeDelayMs,
439
+ defaultTTL: config.defaultTTL,
440
+ logger
441
+ });
428
442
  }
429
443
  }
430
444
  // ─────────────────────────────────────────────────────────────────────────────
@@ -433,23 +447,29 @@ var RememberAccessor = class {
433
447
  /**
434
448
  * Store a value in memory.
435
449
  *
450
+ * Without a `ttl`, the plugin's `defaultTTL` applies, and the entry records the deadline either one sets.
451
+ *
436
452
  * @param key - The key to store under
437
453
  * @param value - The value to store (any JSON-serializable data)
438
454
  * @param options - Storage options (scope, ttl, brand, metadata)
455
+ * @returns The stored entry, with its `expiresAt` deadline
439
456
  */
440
457
  async set(key, value, options = {}) {
441
458
  const scope = options.scope ?? "session";
442
459
  const storageKey = this.buildStorageKey(key, scope);
460
+ const now = Date.now();
461
+ const ttlSeconds = options.ttl ?? this.config.defaultTTL;
443
462
  const entry = {
444
463
  value,
445
464
  brand: options.brand,
446
- createdAt: Date.now(),
447
- updatedAt: Date.now(),
448
- expiresAt: options.ttl ? Date.now() + options.ttl * 1e3 : void 0,
465
+ createdAt: now,
466
+ updatedAt: now,
467
+ expiresAt: expiryAfter(ttlSeconds, now),
449
468
  metadata: options.metadata
450
469
  };
451
470
  const serialized = this.encryptionEnabled ? await encryptAndSerialize(entry, this.getKeySource(scope)) : JSON.stringify(entry);
452
- await this.store.setValue(storageKey, serialized, options.ttl);
471
+ await this.store.setValue(storageKey, serialized, ttlSeconds);
472
+ return entry;
453
473
  }
454
474
  /**
455
475
  * Retrieve a value from memory.
@@ -514,6 +534,7 @@ var RememberAccessor = class {
514
534
  *
515
535
  * With a `ttl` the entry expires that many seconds from now; without one it keeps its current
516
536
  * expiry, in the store as well, so the store does not keep it past that (rounded up to a second).
537
+ * An entry with no recorded expiry gets the plugin's `defaultTTL` from now, as the store would give it.
517
538
  *
518
539
  * @param key - The key to update
519
540
  * @param value - The new value
@@ -524,7 +545,7 @@ var RememberAccessor = class {
524
545
  const existing = await this.getEntry(key, { scope });
525
546
  if (!existing) return false;
526
547
  const now = Date.now();
527
- const expiresAt = options.ttl ? now + options.ttl * 1e3 : existing.expiresAt;
548
+ const expiresAt = expiryAfter(options.ttl, now) ?? existing.expiresAt ?? expiryAfter(this.config.defaultTTL, now);
528
549
  const entry = {
529
550
  ...existing,
530
551
  value,
@@ -533,7 +554,9 @@ var RememberAccessor = class {
533
554
  };
534
555
  const storageKey = this.buildStorageKey(key, scope);
535
556
  const serialized = this.encryptionEnabled ? await encryptAndSerialize(entry, this.getKeySource(scope)) : JSON.stringify(entry);
536
- const storageTtl = options.ttl ?? (expiresAt !== void 0 ? remainingSeconds(expiresAt, now) : void 0);
557
+ const writtenAt = Date.now();
558
+ if (expiresAt !== void 0 && expiresAt <= writtenAt) return false;
559
+ const storageTtl = expiresAt !== void 0 ? remainingSeconds(expiresAt, writtenAt) : void 0;
537
560
  await this.store.setValue(storageKey, serialized, storageTtl);
538
561
  return true;
539
562
  }
@@ -691,12 +714,14 @@ function createRememberAccessor(store, ctx, config, logger) {
691
714
  import { Provider as Provider2, ProviderScope as ProviderScope2 } from "@frontmcp/sdk";
692
715
  var MAX_TIMEOUT_MS = 2 ** 31 - 1;
693
716
  var RememberMemoryProvider = class {
694
- memory = /* @__PURE__ */ new Map();
695
- sweeper;
696
- constructor(sweepIntervalSeconds = 60) {
717
+ constructor(sweepIntervalSeconds = 60, defaultTTL) {
718
+ this.defaultTTL = defaultTTL;
697
719
  this.sweeper = setInterval(() => this.sweep(), sweepIntervalSeconds * 1e3);
698
720
  this.sweeper.unref?.();
699
721
  }
722
+ defaultTTL;
723
+ memory = /* @__PURE__ */ new Map();
724
+ sweeper;
700
725
  /**
701
726
  * Store a value with optional TTL.
702
727
  * Always JSON-serializes the value for consistent storage/retrieval.
@@ -706,8 +731,9 @@ var RememberMemoryProvider = class {
706
731
  const existing = this.memory.get(key);
707
732
  if (existing?.timeout) clearTimeout(existing.timeout);
708
733
  const entry = { value: strValue };
709
- if (ttlSeconds && ttlSeconds > 0) {
710
- const ttlMs = ttlSeconds * 1e3;
734
+ const ttl = ttlSeconds ?? this.defaultTTL;
735
+ if (ttl && ttl > 0) {
736
+ const ttlMs = ttl * 1e3;
711
737
  entry.expiresAt = Date.now() + ttlMs;
712
738
  if (ttlMs <= MAX_TIMEOUT_MS) {
713
739
  entry.timeout = setTimeout(() => {
@@ -866,10 +892,13 @@ var RememberRedisProvider = class {
866
892
  * Include any separator (e.g., "myapp:" or "user:123:") as part of the prefix.
867
893
  */
868
894
  keyPrefix;
895
+ /** TTL in seconds for values stored without one. */
896
+ defaultTTL;
869
897
  /** True if this provider created the client (and should close it), false if externally provided */
870
898
  ownsClient;
871
899
  constructor(options) {
872
900
  this.keyPrefix = options.keyPrefix ?? "";
901
+ this.defaultTTL = options.defaultTTL;
873
902
  if (options.type === "redis-client") {
874
903
  this.client = options.client;
875
904
  this.ownsClient = false;
@@ -915,8 +944,9 @@ var RememberRedisProvider = class {
915
944
  }
916
945
  const fullKey = this.keyPrefix + key;
917
946
  const strValue = JSON.stringify(value);
918
- if (ttlSeconds !== void 0 && ttlSeconds > 0) {
919
- await this.client.set(fullKey, strValue, "EX", ttlSeconds);
947
+ const ttl = ttlSeconds ?? this.defaultTTL;
948
+ if (ttl !== void 0 && ttl > 0) {
949
+ await this.client.set(fullKey, strValue, "EX", ttl);
920
950
  } else {
921
951
  await this.client.set(fullKey, strValue);
922
952
  }
@@ -930,7 +960,8 @@ var RememberRedisProvider = class {
930
960
  async setIfAbsent(key, value, ttlSeconds) {
931
961
  const fullKey = this.keyPrefix + key;
932
962
  const strValue = JSON.stringify(value);
933
- const result = ttlSeconds !== void 0 && ttlSeconds > 0 ? await this.client.set(fullKey, strValue, "EX", ttlSeconds, "NX") : await this.client.set(fullKey, strValue, "NX");
963
+ const ttl = ttlSeconds ?? this.defaultTTL;
964
+ const result = ttl !== void 0 && ttl > 0 ? await this.client.set(fullKey, strValue, "EX", ttl, "NX") : await this.client.set(fullKey, strValue, "NX");
934
965
  return result === "OK";
935
966
  }
936
967
  /**
@@ -1336,7 +1367,7 @@ var rememberThisInputSchema = {
1336
1367
  key: z5.string().min(1).describe('What to call this memory (e.g., "user_preference", "last_action")'),
1337
1368
  value: z5.unknown().describe("The value to remember (any JSON-serializable data)"),
1338
1369
  scope: z5.enum(["session", "user", "tool", "global"]).optional().describe(REMEMBER_SCOPE_DESCRIPTION),
1339
- ttl: z5.number().positive().optional().describe("Forget after this many seconds"),
1370
+ ttl: z5.number().int().positive().optional().describe("Forget after this many whole seconds"),
1340
1371
  brand: z5.enum(["preference", "cache", "state", "conversation", "custom"]).optional().describe("Type hint for the stored value")
1341
1372
  };
1342
1373
  var rememberThisOutputSchema = z5.object({
@@ -1366,17 +1397,16 @@ var RememberThisTool = class extends ToolContext4 {
1366
1397
  if (!allowedScopes.includes(scope)) {
1367
1398
  throw this.fail(new RememberScopeNotAllowedError(scope, allowedScopes));
1368
1399
  }
1369
- await remember.set(input.key, input.value, {
1400
+ const entry = await remember.set(input.key, input.value, {
1370
1401
  scope,
1371
1402
  ttl: input.ttl,
1372
1403
  brand: input.brand
1373
1404
  });
1374
- const expiresAt = input.ttl ? Date.now() + input.ttl * 1e3 : void 0;
1375
1405
  return {
1376
1406
  success: true,
1377
1407
  key: input.key,
1378
1408
  scope,
1379
- expiresAt
1409
+ expiresAt: entry.expiresAt
1380
1410
  };
1381
1411
  }
1382
1412
  };
@@ -1412,13 +1442,24 @@ function createRememberTools(prefix = "") {
1412
1442
  }
1413
1443
 
1414
1444
  // plugins/plugin-remember/src/remember.plugin.ts
1445
+ function withCheckedDefaultTTL(options) {
1446
+ const { defaultTTL } = options;
1447
+ if (defaultTTL === void 0) return options;
1448
+ if (defaultTTL === 0) return { ...options, defaultTTL: void 0 };
1449
+ if (!Number.isInteger(defaultTTL) || defaultTTL < 0) {
1450
+ throw new RememberConfigurationError(
1451
+ `RememberPlugin defaultTTL must be a whole number of seconds (0 for no default expiry), got ${defaultTTL}`
1452
+ );
1453
+ }
1454
+ return options;
1455
+ }
1415
1456
  var RememberPlugin = class extends DynamicPlugin {
1416
1457
  options;
1417
1458
  constructor(options = {}) {
1418
1459
  super();
1419
1460
  this.options = {
1420
1461
  ...RememberPlugin.defaultOptions,
1421
- ...options
1462
+ ...withCheckedDefaultTTL(options)
1422
1463
  };
1423
1464
  }
1424
1465
  };
@@ -1439,7 +1480,7 @@ __publicField(RememberPlugin, "dynamicProviders", (options) => {
1439
1480
  const providers = [];
1440
1481
  const config = {
1441
1482
  ...RememberPlugin.defaultOptions,
1442
- ...options
1483
+ ...withCheckedDefaultTTL(options)
1443
1484
  };
1444
1485
  switch (config.type) {
1445
1486
  case "global-store":
@@ -1518,7 +1559,7 @@ __publicField(RememberPlugin, "dynamicProviders", (options) => {
1518
1559
  provide: RememberStoreToken,
1519
1560
  // Built per server: `init()` runs once, so a value here would be shared by every server using it.
1520
1561
  inject: () => [],
1521
- useFactory: () => new RememberMemoryProvider()
1562
+ useFactory: () => new RememberMemoryProvider(void 0, config.defaultTTL)
1522
1563
  });
1523
1564
  break;
1524
1565
  }
@@ -1594,6 +1635,7 @@ export {
1594
1635
  RememberAccessor,
1595
1636
  RememberAccessorToken,
1596
1637
  RememberConfigToken,
1638
+ RememberConfigurationError,
1597
1639
  RememberIdentityError,
1598
1640
  RememberMemoryProvider,
1599
1641
  RememberPlugin,
package/esm/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontmcp/plugin-remember",
3
- "version": "1.9.1-rc.1",
3
+ "version": "1.9.1-rc.3",
4
4
  "description": "Remember plugin for FrontMCP - encrypted session memory with approval system for secure tool authorization",
5
5
  "author": "AgentFront <info@agentfront.dev>",
6
6
  "license": "Apache-2.0",
@@ -49,12 +49,12 @@
49
49
  }
50
50
  },
51
51
  "dependencies": {
52
- "@frontmcp/sdk": "1.9.1-rc.1",
53
- "@frontmcp/utils": "1.9.1-rc.1",
52
+ "@frontmcp/sdk": "1.9.1-rc.3",
53
+ "@frontmcp/utils": "1.9.1-rc.3",
54
54
  "ioredis": "^5.8.0"
55
55
  },
56
56
  "peerDependencies": {
57
- "@frontmcp/lazy-zod": "1.9.1-rc.1",
57
+ "@frontmcp/lazy-zod": "1.9.1-rc.3",
58
58
  "@vercel/kv": "^2.0.0 || ^3.0.0"
59
59
  },
60
60
  "peerDependenciesMeta": {
package/index.d.ts CHANGED
@@ -45,7 +45,7 @@ export type { RememberScope, RememberEntry, RememberPluginOptions, RememberPlugi
45
45
  export { brand } from './remember.types';
46
46
  export type { RememberStoreInterface } from './providers/remember-store.interface';
47
47
  export { RememberAccessor } from './providers/remember-accessor.provider';
48
- export { RememberIdentityError, RememberScopeNotAllowedError } from './remember.errors';
48
+ export { RememberConfigurationError, RememberIdentityError, RememberScopeNotAllowedError } from './remember.errors';
49
49
  export { default as RememberMemoryProvider } from './providers/remember-memory.provider';
50
50
  export { default as RememberRedisProvider } from './providers/remember-redis.provider';
51
51
  export { default as RememberVercelKvProvider } from './providers/remember-vercel-kv.provider';
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAGH,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGvE,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAGpG,YAAY,EACV,aAAa,EACb,aAAa,EACb,qBAAqB,EACrB,0BAA0B,EAC1B,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAGzC,YAAY,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC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,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AAG9F,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAKrF,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC"}
package/index.js CHANGED
@@ -46,6 +46,7 @@ __export(index_exports, {
46
46
  RememberAccessor: () => RememberAccessor,
47
47
  RememberAccessorToken: () => RememberAccessorToken,
48
48
  RememberConfigToken: () => RememberConfigToken,
49
+ RememberConfigurationError: () => RememberConfigurationError,
49
50
  RememberIdentityError: () => RememberIdentityError,
50
51
  RememberMemoryProvider: () => RememberMemoryProvider,
51
52
  RememberPlugin: () => RememberPlugin,
@@ -321,6 +322,12 @@ var RememberScopeNotAllowedError = class extends import_sdk.PublicMcpError {
321
322
  );
322
323
  }
323
324
  };
325
+ var RememberConfigurationError = class extends import_sdk.InternalMcpError {
326
+ name = "RememberConfigurationError";
327
+ constructor(message) {
328
+ super(message, "REMEMBER_CONFIGURATION");
329
+ }
330
+ };
324
331
 
325
332
  // plugins/plugin-remember/src/remember.legacy-purge.ts
326
333
  var LEGACY_SCOPES = ["session", "tool", "user"];
@@ -339,7 +346,7 @@ function parseFirstSeenAt(raw) {
339
346
  return void 0;
340
347
  }
341
348
  }
342
- async function readLayoutFirstSeenAt(store, keyPrefix, logger) {
349
+ async function readLayoutFirstSeenAt(store, keyPrefix, logger, markerTtlSeconds) {
343
350
  const key = `${keyPrefix}${LAYOUT_MARKER_KEY}`;
344
351
  const standDown = (reason, extra = {}) => {
345
352
  logger?.debug?.(`remember: ${reason}, legacy purge stood down`, { key, ...extra });
@@ -353,10 +360,10 @@ async function readLayoutFirstSeenAt(store, keyPrefix, logger) {
353
360
  const marker = { version: LAYOUT_VERSION, firstSeenAt: Date.now() };
354
361
  const serialized = JSON.stringify(marker);
355
362
  if (!store.setIfAbsent) {
356
- await store.setValue(key, serialized);
363
+ await store.setValue(key, serialized, markerTtlSeconds);
357
364
  return marker.firstSeenAt;
358
365
  }
359
- if (await store.setIfAbsent(key, serialized)) {
366
+ if (await store.setIfAbsent(key, serialized, markerTtlSeconds)) {
360
367
  return marker.firstSeenAt;
361
368
  }
362
369
  const winner = await store.getValue(key);
@@ -400,6 +407,7 @@ function scheduleLegacyRememberPurge(store, keyPrefix, options = {}) {
400
407
  if (scheduled.has(store)) return;
401
408
  scheduled.add(store);
402
409
  const delayMs = options.delayMs ?? DEFAULT_LEGACY_PURGE_DELAY_MS;
410
+ const markerTtlSeconds = options.defaultTTL ? Math.max(options.defaultTTL, Math.ceil(2 * delayMs / 1e3)) : void 0;
403
411
  const arm = (waitMs) => {
404
412
  const timer = setTimeout(
405
413
  () => {
@@ -410,7 +418,7 @@ function scheduleLegacyRememberPurge(store, keyPrefix, options = {}) {
410
418
  timer.unref?.();
411
419
  };
412
420
  const attempt = async () => {
413
- const firstSeenAt = await readLayoutFirstSeenAt(store, keyPrefix, options.logger);
421
+ const firstSeenAt = await readLayoutFirstSeenAt(store, keyPrefix, options.logger, markerTtlSeconds);
414
422
  if (firstSeenAt === void 0) return;
415
423
  const remainingMs = firstSeenAt + delayMs - Date.now();
416
424
  if (remainingMs > 0) {
@@ -430,6 +438,9 @@ function encodeKeyPart(value) {
430
438
  function remainingSeconds(expiresAt, now) {
431
439
  return Math.max(1, Math.ceil((expiresAt - now) / 1e3));
432
440
  }
441
+ function expiryAfter(ttlSeconds, now) {
442
+ return ttlSeconds ? now + ttlSeconds * 1e3 : void 0;
443
+ }
433
444
  var RememberAccessor = class {
434
445
  store;
435
446
  ctx;
@@ -443,7 +454,11 @@ var RememberAccessor = class {
443
454
  this.keyPrefix = config.keyPrefix ?? "remember:";
444
455
  this.encryptionEnabled = config.encryption?.enabled !== false;
445
456
  if (!config.skipLegacyPurge) {
446
- scheduleLegacyRememberPurge(store, this.keyPrefix, { delayMs: config.legacyPurgeDelayMs, logger });
457
+ scheduleLegacyRememberPurge(store, this.keyPrefix, {
458
+ delayMs: config.legacyPurgeDelayMs,
459
+ defaultTTL: config.defaultTTL,
460
+ logger
461
+ });
447
462
  }
448
463
  }
449
464
  // ─────────────────────────────────────────────────────────────────────────────
@@ -452,23 +467,29 @@ var RememberAccessor = class {
452
467
  /**
453
468
  * Store a value in memory.
454
469
  *
470
+ * Without a `ttl`, the plugin's `defaultTTL` applies, and the entry records the deadline either one sets.
471
+ *
455
472
  * @param key - The key to store under
456
473
  * @param value - The value to store (any JSON-serializable data)
457
474
  * @param options - Storage options (scope, ttl, brand, metadata)
475
+ * @returns The stored entry, with its `expiresAt` deadline
458
476
  */
459
477
  async set(key, value, options = {}) {
460
478
  const scope = options.scope ?? "session";
461
479
  const storageKey = this.buildStorageKey(key, scope);
480
+ const now = Date.now();
481
+ const ttlSeconds = options.ttl ?? this.config.defaultTTL;
462
482
  const entry = {
463
483
  value,
464
484
  brand: options.brand,
465
- createdAt: Date.now(),
466
- updatedAt: Date.now(),
467
- expiresAt: options.ttl ? Date.now() + options.ttl * 1e3 : void 0,
485
+ createdAt: now,
486
+ updatedAt: now,
487
+ expiresAt: expiryAfter(ttlSeconds, now),
468
488
  metadata: options.metadata
469
489
  };
470
490
  const serialized = this.encryptionEnabled ? await encryptAndSerialize(entry, this.getKeySource(scope)) : JSON.stringify(entry);
471
- await this.store.setValue(storageKey, serialized, options.ttl);
491
+ await this.store.setValue(storageKey, serialized, ttlSeconds);
492
+ return entry;
472
493
  }
473
494
  /**
474
495
  * Retrieve a value from memory.
@@ -533,6 +554,7 @@ var RememberAccessor = class {
533
554
  *
534
555
  * With a `ttl` the entry expires that many seconds from now; without one it keeps its current
535
556
  * expiry, in the store as well, so the store does not keep it past that (rounded up to a second).
557
+ * An entry with no recorded expiry gets the plugin's `defaultTTL` from now, as the store would give it.
536
558
  *
537
559
  * @param key - The key to update
538
560
  * @param value - The new value
@@ -543,7 +565,7 @@ var RememberAccessor = class {
543
565
  const existing = await this.getEntry(key, { scope });
544
566
  if (!existing) return false;
545
567
  const now = Date.now();
546
- const expiresAt = options.ttl ? now + options.ttl * 1e3 : existing.expiresAt;
568
+ const expiresAt = expiryAfter(options.ttl, now) ?? existing.expiresAt ?? expiryAfter(this.config.defaultTTL, now);
547
569
  const entry = {
548
570
  ...existing,
549
571
  value,
@@ -552,7 +574,9 @@ var RememberAccessor = class {
552
574
  };
553
575
  const storageKey = this.buildStorageKey(key, scope);
554
576
  const serialized = this.encryptionEnabled ? await encryptAndSerialize(entry, this.getKeySource(scope)) : JSON.stringify(entry);
555
- const storageTtl = options.ttl ?? (expiresAt !== void 0 ? remainingSeconds(expiresAt, now) : void 0);
577
+ const writtenAt = Date.now();
578
+ if (expiresAt !== void 0 && expiresAt <= writtenAt) return false;
579
+ const storageTtl = expiresAt !== void 0 ? remainingSeconds(expiresAt, writtenAt) : void 0;
556
580
  await this.store.setValue(storageKey, serialized, storageTtl);
557
581
  return true;
558
582
  }
@@ -710,12 +734,14 @@ function createRememberAccessor(store, ctx, config, logger) {
710
734
  var import_sdk3 = require("@frontmcp/sdk");
711
735
  var MAX_TIMEOUT_MS = 2 ** 31 - 1;
712
736
  var RememberMemoryProvider = class {
713
- memory = /* @__PURE__ */ new Map();
714
- sweeper;
715
- constructor(sweepIntervalSeconds = 60) {
737
+ constructor(sweepIntervalSeconds = 60, defaultTTL) {
738
+ this.defaultTTL = defaultTTL;
716
739
  this.sweeper = setInterval(() => this.sweep(), sweepIntervalSeconds * 1e3);
717
740
  this.sweeper.unref?.();
718
741
  }
742
+ defaultTTL;
743
+ memory = /* @__PURE__ */ new Map();
744
+ sweeper;
719
745
  /**
720
746
  * Store a value with optional TTL.
721
747
  * Always JSON-serializes the value for consistent storage/retrieval.
@@ -725,8 +751,9 @@ var RememberMemoryProvider = class {
725
751
  const existing = this.memory.get(key);
726
752
  if (existing?.timeout) clearTimeout(existing.timeout);
727
753
  const entry = { value: strValue };
728
- if (ttlSeconds && ttlSeconds > 0) {
729
- const ttlMs = ttlSeconds * 1e3;
754
+ const ttl = ttlSeconds ?? this.defaultTTL;
755
+ if (ttl && ttl > 0) {
756
+ const ttlMs = ttl * 1e3;
730
757
  entry.expiresAt = Date.now() + ttlMs;
731
758
  if (ttlMs <= MAX_TIMEOUT_MS) {
732
759
  entry.timeout = setTimeout(() => {
@@ -885,10 +912,13 @@ var RememberRedisProvider = class {
885
912
  * Include any separator (e.g., "myapp:" or "user:123:") as part of the prefix.
886
913
  */
887
914
  keyPrefix;
915
+ /** TTL in seconds for values stored without one. */
916
+ defaultTTL;
888
917
  /** True if this provider created the client (and should close it), false if externally provided */
889
918
  ownsClient;
890
919
  constructor(options) {
891
920
  this.keyPrefix = options.keyPrefix ?? "";
921
+ this.defaultTTL = options.defaultTTL;
892
922
  if (options.type === "redis-client") {
893
923
  this.client = options.client;
894
924
  this.ownsClient = false;
@@ -934,8 +964,9 @@ var RememberRedisProvider = class {
934
964
  }
935
965
  const fullKey = this.keyPrefix + key;
936
966
  const strValue = JSON.stringify(value);
937
- if (ttlSeconds !== void 0 && ttlSeconds > 0) {
938
- await this.client.set(fullKey, strValue, "EX", ttlSeconds);
967
+ const ttl = ttlSeconds ?? this.defaultTTL;
968
+ if (ttl !== void 0 && ttl > 0) {
969
+ await this.client.set(fullKey, strValue, "EX", ttl);
939
970
  } else {
940
971
  await this.client.set(fullKey, strValue);
941
972
  }
@@ -949,7 +980,8 @@ var RememberRedisProvider = class {
949
980
  async setIfAbsent(key, value, ttlSeconds) {
950
981
  const fullKey = this.keyPrefix + key;
951
982
  const strValue = JSON.stringify(value);
952
- const result = ttlSeconds !== void 0 && ttlSeconds > 0 ? await this.client.set(fullKey, strValue, "EX", ttlSeconds, "NX") : await this.client.set(fullKey, strValue, "NX");
983
+ const ttl = ttlSeconds ?? this.defaultTTL;
984
+ const result = ttl !== void 0 && ttl > 0 ? await this.client.set(fullKey, strValue, "EX", ttl, "NX") : await this.client.set(fullKey, strValue, "NX");
953
985
  return result === "OK";
954
986
  }
955
987
  /**
@@ -1355,7 +1387,7 @@ var rememberThisInputSchema = {
1355
1387
  key: import_lazy_zod5.z.string().min(1).describe('What to call this memory (e.g., "user_preference", "last_action")'),
1356
1388
  value: import_lazy_zod5.z.unknown().describe("The value to remember (any JSON-serializable data)"),
1357
1389
  scope: import_lazy_zod5.z.enum(["session", "user", "tool", "global"]).optional().describe(REMEMBER_SCOPE_DESCRIPTION),
1358
- ttl: import_lazy_zod5.z.number().positive().optional().describe("Forget after this many seconds"),
1390
+ ttl: import_lazy_zod5.z.number().int().positive().optional().describe("Forget after this many whole seconds"),
1359
1391
  brand: import_lazy_zod5.z.enum(["preference", "cache", "state", "conversation", "custom"]).optional().describe("Type hint for the stored value")
1360
1392
  };
1361
1393
  var rememberThisOutputSchema = import_lazy_zod5.z.object({
@@ -1385,17 +1417,16 @@ var RememberThisTool = class extends import_sdk9.ToolContext {
1385
1417
  if (!allowedScopes.includes(scope)) {
1386
1418
  throw this.fail(new RememberScopeNotAllowedError(scope, allowedScopes));
1387
1419
  }
1388
- await remember.set(input.key, input.value, {
1420
+ const entry = await remember.set(input.key, input.value, {
1389
1421
  scope,
1390
1422
  ttl: input.ttl,
1391
1423
  brand: input.brand
1392
1424
  });
1393
- const expiresAt = input.ttl ? Date.now() + input.ttl * 1e3 : void 0;
1394
1425
  return {
1395
1426
  success: true,
1396
1427
  key: input.key,
1397
1428
  scope,
1398
- expiresAt
1429
+ expiresAt: entry.expiresAt
1399
1430
  };
1400
1431
  }
1401
1432
  };
@@ -1431,13 +1462,24 @@ function createRememberTools(prefix = "") {
1431
1462
  }
1432
1463
 
1433
1464
  // plugins/plugin-remember/src/remember.plugin.ts
1465
+ function withCheckedDefaultTTL(options) {
1466
+ const { defaultTTL } = options;
1467
+ if (defaultTTL === void 0) return options;
1468
+ if (defaultTTL === 0) return { ...options, defaultTTL: void 0 };
1469
+ if (!Number.isInteger(defaultTTL) || defaultTTL < 0) {
1470
+ throw new RememberConfigurationError(
1471
+ `RememberPlugin defaultTTL must be a whole number of seconds (0 for no default expiry), got ${defaultTTL}`
1472
+ );
1473
+ }
1474
+ return options;
1475
+ }
1434
1476
  var RememberPlugin = class extends import_sdk11.DynamicPlugin {
1435
1477
  options;
1436
1478
  constructor(options = {}) {
1437
1479
  super();
1438
1480
  this.options = {
1439
1481
  ...RememberPlugin.defaultOptions,
1440
- ...options
1482
+ ...withCheckedDefaultTTL(options)
1441
1483
  };
1442
1484
  }
1443
1485
  };
@@ -1458,7 +1500,7 @@ __publicField(RememberPlugin, "dynamicProviders", (options) => {
1458
1500
  const providers = [];
1459
1501
  const config = {
1460
1502
  ...RememberPlugin.defaultOptions,
1461
- ...options
1503
+ ...withCheckedDefaultTTL(options)
1462
1504
  };
1463
1505
  switch (config.type) {
1464
1506
  case "global-store":
@@ -1537,7 +1579,7 @@ __publicField(RememberPlugin, "dynamicProviders", (options) => {
1537
1579
  provide: RememberStoreToken,
1538
1580
  // Built per server: `init()` runs once, so a value here would be shared by every server using it.
1539
1581
  inject: () => [],
1540
- useFactory: () => new RememberMemoryProvider()
1582
+ useFactory: () => new RememberMemoryProvider(void 0, config.defaultTTL)
1541
1583
  });
1542
1584
  break;
1543
1585
  }
@@ -1614,6 +1656,7 @@ function tryGetRemember(ctx) {
1614
1656
  RememberAccessor,
1615
1657
  RememberAccessorToken,
1616
1658
  RememberConfigToken,
1659
+ RememberConfigurationError,
1617
1660
  RememberIdentityError,
1618
1661
  RememberMemoryProvider,
1619
1662
  RememberPlugin,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontmcp/plugin-remember",
3
- "version": "1.9.1-rc.1",
3
+ "version": "1.9.1-rc.3",
4
4
  "description": "Remember plugin for FrontMCP - encrypted session memory with approval system for secure tool authorization",
5
5
  "author": "AgentFront <info@agentfront.dev>",
6
6
  "license": "Apache-2.0",
@@ -49,12 +49,12 @@
49
49
  }
50
50
  },
51
51
  "dependencies": {
52
- "@frontmcp/sdk": "1.9.1-rc.1",
53
- "@frontmcp/utils": "1.9.1-rc.1",
52
+ "@frontmcp/sdk": "1.9.1-rc.3",
53
+ "@frontmcp/utils": "1.9.1-rc.3",
54
54
  "ioredis": "^5.8.0"
55
55
  },
56
56
  "peerDependencies": {
57
- "@frontmcp/lazy-zod": "1.9.1-rc.1",
57
+ "@frontmcp/lazy-zod": "1.9.1-rc.3",
58
58
  "@vercel/kv": "^2.0.0 || ^3.0.0"
59
59
  },
60
60
  "peerDependenciesMeta": {
@@ -35,11 +35,14 @@ export declare class RememberAccessor {
35
35
  /**
36
36
  * Store a value in memory.
37
37
  *
38
+ * Without a `ttl`, the plugin's `defaultTTL` applies, and the entry records the deadline either one sets.
39
+ *
38
40
  * @param key - The key to store under
39
41
  * @param value - The value to store (any JSON-serializable data)
40
42
  * @param options - Storage options (scope, ttl, brand, metadata)
43
+ * @returns The stored entry, with its `expiresAt` deadline
41
44
  */
42
- set<T>(key: string, value: T, options?: RememberSetOptions): Promise<void>;
45
+ set<T>(key: string, value: T, options?: RememberSetOptions): Promise<RememberEntry<T>>;
43
46
  /**
44
47
  * Retrieve a value from memory.
45
48
  *
@@ -85,6 +88,7 @@ export declare class RememberAccessor {
85
88
  *
86
89
  * With a `ttl` the entry expires that many seconds from now; without one it keeps its current
87
90
  * expiry, in the store as well, so the store does not keep it past that (rounded up to a second).
91
+ * An entry with no recorded expiry gets the plugin's `defaultTTL` from now, as the store would give it.
88
92
  *
89
93
  * @param key - The key to update
90
94
  * @param value - The new value
@@ -1 +1 @@
1
- {"version":3,"file":"remember-accessor.provider.d.ts","sourceRoot":"","sources":["../../src/providers/remember-accessor.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAKvB,OAAO,KAAK,EACV,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EA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AAG,EAAE,MAAM,EAAE,OAAO,GAAE,oBAAyB,GAAG,OAAO,CAAC,OAAO,CAAC;IAK9E;;;;;OAKG;IACG,IAAI,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAWhE;;;;;;;;;OASG;IACG,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,aAAa,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IA8B/G;;;;;OAKG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,MAAM,GAAG,SAAS,CAS/B;IAMD;;OAEG;IACH,OAAO,CAAC,eAAe;IAIvB;;;;;;;;OAQG;IACH,OAAO,KAAK,iBAAiB,GAQ5B;IAED;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,sBAAsB;IAmB9B;;;;;OAKG;IACH,OAAO,KAAK,QAAQ,GAEnB;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,gBAAgB;IA4BxB;;OAEG;IACH,OAAO,CAAC,YAAY;IAYpB,iGAAiG;YACnF,SAAS;IAkBvB;;OAEG;IACH,OAAO,CAAC,UAAU;CAOnB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,sBAAsB,EAC7B,GAAG,EAAE,eAAe,EACpB,MAAM,EAAE,qBAAqB,EAC7B,MAAM,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,GAC9C,gBAAgB,CAElB"}
1
+ {"version":3,"file":"remember-accessor.provider.d.ts","sourceRoot":"","sources":["../../src/providers/remember-accessor.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAKvB,OAAO,KAA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G,OAAO,CAAC,IAAI,CAAC;IAM7E;;;;;;OAMG;IACG,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,oBAAyB,GAAG,OAAO,CAAC,OAAO,CAAC;IAK9E;;;;;OAKG;IACG,IAAI,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAWhE;;;;;;;;;;OAUG;IACG,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,aAAa,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAiC/G;;;;;OAKG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,MAAM,GAAG,SAAS,CAS/B;IAMD;;OAEG;IACH,OAAO,CAAC,eAAe;IAIvB;;;;;;;;OAQG;IACH,OAAO,KAAK,iBAAiB,GAQ5B;IAED;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,sBAAsB;IAmB9B;;;;;OAKG;IACH,OAAO,KAAK,QAAQ,GAEnB;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,gBAAgB;IA4BxB;;OAEG;IACH,OAAO,CAAC,YAAY;IAYpB,iGAAiG;YACnF,SAAS;IAkBvB;;OAEG;IACH,OAAO,CAAC,UAAU;CAOnB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,sBAAsB,EAC7B,GAAG,EAAE,eAAe,EACpB,MAAM,EAAE,qBAAqB,EAC7B,MAAM,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,GAC9C,gBAAgB,CAElB"}
@@ -4,9 +4,10 @@ import type { RememberStoreInterface } from './remember-store.interface';
4
4
  * Provides fast, local storage with automatic TTL expiration.
5
5
  */
6
6
  export default class RememberMemoryProvider implements RememberStoreInterface {
7
+ private readonly defaultTTL?;
7
8
  private readonly memory;
8
9
  private sweeper?;
9
- constructor(sweepIntervalSeconds?: number);
10
+ constructor(sweepIntervalSeconds?: number, defaultTTL?: number | undefined);
10
11
  /**
11
12
  * Store a value with optional TTL.
12
13
  * Always JSON-serializes the value for consistent storage/retrieval.
@@ -1 +1 @@
1
- {"version":3,"file":"remember-memory.provider.d.ts","sourceRoot":"","sources":["../../src/providers/remember-memory.provider.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAgBzE;;;GAGG;AAMH,MAAM,CAAC,OAAO,OAAO,sBAAuB,YAAW,sBAAsB;IAC3E,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA4B;IACnD,OAAO,CAAC,OAAO,CAAC,CAAiB;gBAErB,oBAAoB,SAAK;IAMrC;;;OAGG;IACG,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA8B/E;;;;;OAKG;IACG,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQrF;;;OAGG;IACG,QAAQ,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAkBlF;;OAEG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMxC;;OAEG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAU3C;;;OAGG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAiC/C;;OAEG;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O,CAAC,OAAO,CAAC;IAU3C;;;OAGG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAiC/C;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAY5B,OAAO,CAAC,SAAS;IAIjB;;OAEG;IACH,OAAO,CAAC,KAAK;IAYb,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAO;IACjD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAM;IAE3C;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;CAkBvB"}
@@ -15,6 +15,8 @@ export default class RememberRedisProvider implements RememberStoreInterface {
15
15
  * Include any separator (e.g., "myapp:" or "user:123:") as part of the prefix.
16
16
  */
17
17
  private readonly keyPrefix;
18
+ /** TTL in seconds for values stored without one. */
19
+ private readonly defaultTTL?;
18
20
  /** True if this provider created the client (and should close it), false if externally provided */
19
21
  private readonly ownsClient;
20
22
  constructor(options: RedisRememberOptions);
@@ -1 +1 @@
1
- {"version":3,"file":"remember-redis.provider.d.ts","sourceRoot":"","sources":["../../src/providers/remember-redis.provider.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gCAAgC,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACtG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,0BAA0B,GAAG,gCAAgC,CAAC;AAEjG;;;GAGG;AAMH,MAAM,CAAC,OAAO,OAAO,qBAAsB,YAAW,sBAAsB;IAC1E,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IACrC;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,mGAAmG;IACnG,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAU;gBAEzB,OAAO,EAAE,oBAAoB;IA6BzC;;;;;;;OAO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QAAQ,CAAC,UAAU,CAAC,CAAS;IACrC,mGAAmG;IACnG,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAU;gBAEzB,OAAO,EAAE,oBAAoB;IA8BzC;;;;;;;OAOG;IACG,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA8B/E;;;;;OAKG;IACG,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAarF;;;;;;;;;;OAUG;IACG,QAAQ,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAclF;;OAEG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxC;;OAEG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK3C;;;OAGG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAkB/C;;;;OAIG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAK7B"}
@@ -1,4 +1,4 @@
1
- import { type RootStorage, type NamespacedStorage, type StorageConfig } from '@frontmcp/utils';
1
+ import { type NamespacedStorage, type RootStorage, type StorageConfig } from '@frontmcp/utils';
2
2
  import type { RememberStoreInterface } from './remember-store.interface';
3
3
  /**
4
4
  * Configuration options for RememberStorageProvider.
@@ -1 +1 @@
1
- {"version":3,"file":"remember-storage.provider.d.ts","sourceRoot":"","sources":["../../src/providers/remember-storage.provider.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,aA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M,EAAE,CAAC;IAK/C;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAQ7B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,GAAE,IAAI,CAAC,8BAA8B,EAAE,SAAS,GAAG,iBAAiB,CAAM,GAChF,uBAAuB,CAMzB"}
1
+ {"version":3,"file":"remember-storage.provider.d.ts","sourceRoot":"","sources":["../../src/providers/remember-storage.provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,iBAAiB,EAAE,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE9G,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAMzE;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;OAGG;IACH,eAAe,CAAC,EAAE,WAAW,GAAG,iBAAiB,CAAC;IAElD;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qBAKa,uBAAwB,YAAW,sBAAsB;IACpE,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAGtB;IACF,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,YAAY,CAAS;gBAEjB,OAAO,GAAE,8BAAmC;IASxD;;;OAGG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAkBjC;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAMzB;;;;;OAKG;IACG,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgC/E;;;;;OAKG;IACG,QAAQ,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAelF;;;OAGG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxC;;;;OAIG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK3C;;;;OAIG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAK/C;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAQ7B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,GAAE,IAAI,CAAC,8BAA8B,EAAE,SAAS,GAAG,iBAAiB,CAAM,GAChF,uBAAuB,CAKzB"}
@@ -1,4 +1,4 @@
1
- import { PublicMcpError } from '@frontmcp/sdk';
1
+ import { InternalMcpError, PublicMcpError } from '@frontmcp/sdk';
2
2
  /**
3
3
  * Raised when Remember has no per-client identity to namespace storage with
4
4
  * (GHSA-225p-f8jh-f3rh).
@@ -20,4 +20,9 @@ export declare class RememberScopeNotAllowedError extends PublicMcpError {
20
20
  readonly name = "RememberScopeNotAllowedError";
21
21
  constructor(scope: string, allowedScopes: readonly string[]);
22
22
  }
23
+ /** Raised at startup for a plugin option that cannot work, such as a fractional or negative `defaultTTL`. */
24
+ export declare class RememberConfigurationError extends InternalMcpError {
25
+ readonly name = "RememberConfigurationError";
26
+ constructor(message: string);
27
+ }
23
28
  //# sourceMappingURL=remember.errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"remember.errors.d.ts","sourceRoot":"","sources":["../src/remember.errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;;GAOG;AACH,qBAAa,qBAAsB,SAAQ,cAAc;IACvD,SAAkB,IAAI,2BAA2B;gBAErC,OAAO,EAAE,MAAM;CAG5B;AAED;;;;GAIG;AACH,qBAAa,4BAA6B,SAAQ,cAAc;IAC9D,SAAkB,IAAI,kCAAkC;gBAE5C,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,MAAM,EAAE;CAO5D"}
1
+ {"version":3,"file":"remember.errors.d.ts","sourceRoot":"","sources":["../src/remember.errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEjE;;;;;;;GAOG;AACH,qBAAa,qBAAsB,SAAQ,cAAc;IACvD,SAAkB,IAAI,2BAA2B;gBAErC,OAAO,EAAE,MAAM;CAG5B;AAED;;;;GAIG;AACH,qBAAa,4BAA6B,SAAQ,cAAc;IAC9D,SAAkB,IAAI,kCAAkC;gBAE5C,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,MAAM,EAAE;CAO5D;AAED,6GAA6G;AAC7G,qBAAa,0BAA2B,SAAQ,gBAAgB;IAC9D,SAAkB,IAAI,gCAAgC;gBAE1C,OAAO,EAAE,MAAM;CAG5B"}
@@ -16,7 +16,7 @@ import type { RememberStoreInterface } from './providers/remember-store.interfac
16
16
  * `undefined` means the clock could not be established, and the caller must not delete anything
17
17
  * on it.
18
18
  */
19
- export declare function readLayoutFirstSeenAt(store: RememberStoreInterface, keyPrefix: string, logger?: Pick<FrontMcpLogger, 'warn' | 'debug'>): Promise<number | undefined>;
19
+ export declare function readLayoutFirstSeenAt(store: RememberStoreInterface, keyPrefix: string, logger?: Pick<FrontMcpLogger, 'warn' | 'debug'>, markerTtlSeconds?: number): Promise<number | undefined>;
20
20
  /**
21
21
  * Delete entries that the key-derivation and namespace-encoding changes orphaned.
22
22
  *
@@ -38,6 +38,7 @@ export declare function purgeLegacyRememberEntries(store: RememberStoreInterface
38
38
  */
39
39
  export declare function scheduleLegacyRememberPurge(store: RememberStoreInterface, keyPrefix: string, options?: {
40
40
  delayMs?: number;
41
+ defaultTTL?: number;
41
42
  logger?: Pick<FrontMcpLogger, 'warn' | 'debug'>;
42
43
  }): void;
43
44
  /** Test seam: forget which stores have a sweep armed. */
@@ -1 +1 @@
1
- {"version":3,"file":"remember.legacy-purge.d.ts","sourceRoot":"","sources":["../src/remember.legacy-purge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAiEnF;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,sBAAsB,EAC7B,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,GAC9C,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAiC7B;AAED;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,sBAAsB,EAC7B,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,GAC9C,OAAO,CAAC,MAAM,CAAC,CAqCjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,sBAAsB,EAC7B,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,CAAA;CAAO,GAClF,IAAI,CAsCN;AAED,yDAAyD;AACzD,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI,CAEjF"}
1
+ {"version":3,"file":"remember.legacy-purge.d.ts","sourceRoot":"","sources":["../src/remember.legacy-purge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,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M,CAAC,OAAO,OAAO,cAAe,SAAQ,aAAa,CAAC,qBAAqB,EAAE,0BAA0B,CAAC;IAC1G,MAAM,CAAC,cAAc,EAAE,qBAAqB,CAI1C;IAEF,OAAO,EAAE,qBAAqB,CAAC;gBAEnB,OAAO,GAAE,0BAA+B;IAQpD;;;OAGG;IACH,OAAgB,YAAY,GAAI,SAAS,0BAA0B,KAAG,SAAS,QAAQ,EAAE,CACf;IAE1E;;OAEG;IACH,OAAgB,gBAAgB,GAAI,SAAS,0BAA0B,KAAG,YAAY,EAAE,CA2HtF;CACH"}
1
+ {"version":3,"file":"remember.plugin.d.ts","sourceRoot":"","sources":["../src/remember.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EASb,KAAK,YAAY,EACjB,KAAK,QAAQ,EACd,MAAM,eAAe,CAAC;AAQvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAgB1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAwBH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,aAAa,CAAC,qBAAqB,EAAE,0BAA0B,CAAC;IAC1G,MAAM,CAAC,cAAc,EAAE,qBAAqB,CAI1C;IAEF,OAAO,EAAE,qBAAqB,CAAC;gBAEnB,OAAO,GAAE,0BAA+B;IAQpD;;;OAGG;IACH,OAAgB,YAAY,GAAI,SAAS,0BAA0B,KAAG,SAAS,QAAQ,EAAE,CACf;IAE1E;;OAEG;IACH,OAAgB,gBAAgB,GAAI,SAAS,0BAA0B,KAAG,YAAY,EAAE,CA2HtF;CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"remember-this.tool.d.ts","sourceRoot":"","sources":["../../src/tools/remember-this.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAQ,WAAW,EAAE,MAAM,eAAe,CAAC;AAKlD,OAAO,EAAqB,KAAK,iBA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