@frontmcp/plugin-remember 1.8.3 → 1.8.5

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
@@ -32,6 +32,7 @@ import {
32
32
  // plugins/plugin-remember/src/providers/remember-accessor.provider.ts
33
33
  import {
34
34
  getRunningTool,
35
+ isAnonymousSubject,
35
36
  Provider,
36
37
  ProviderScope,
37
38
  STATELESS_SESSION_ID
@@ -563,10 +564,10 @@ var RememberAccessor = class {
563
564
  * The session id the server verified for this request, or undefined when there is none.
564
565
  *
565
566
  * Read from the verified auth info (`authInfo.sessionId` from the transport, `extra.sessionId`
566
- * from session verification), the same rule CONTEXT providers are cached by. Never
567
- * `FrontMcpContext.sessionId` alone: under MCP 2026-07-28 that is whatever `mcp-session-id` the
568
- * caller sent, including another caller's. The stateless transport's shared `__stateless__` id
569
- * identifies no one.
567
+ * from session verification, which records only a session the request presented), the same rule
568
+ * CONTEXT providers are cached by. Never `FrontMcpContext.sessionId` alone: under MCP 2026-07-28
569
+ * that is whatever `mcp-session-id` the caller sent, including another caller's. The stateless
570
+ * transport's shared `__stateless__` id identifies no one.
570
571
  */
571
572
  get verifiedSessionId() {
572
573
  const authInfo = this.ctx.authInfo;
@@ -583,7 +584,8 @@ var RememberAccessor = class {
583
584
  * the shared `__stateless__` id (GHSA-225p-f8jh-f3rh). A request without a verified session
584
585
  * (stateless transport, MCP 2026-07-28, or a session id the server did not verify) falls back to
585
586
  * the authenticated principal, the only per-client identity it has; with neither, it has no
586
- * business reading or writing per-client memory at all.
587
+ * business reading or writing per-client memory at all. An anonymous subject (`anon:…`) is no
588
+ * principal: without a session, the server makes a new one up for each request.
587
589
  */
588
590
  resolveSessionIdentity() {
589
591
  const sessionId = this.verifiedSessionId;
@@ -591,7 +593,7 @@ var RememberAccessor = class {
591
593
  return sessionId;
592
594
  }
593
595
  const userId = this.userId;
594
- if (userId) {
596
+ if (userId && !isAnonymousSubject(userId)) {
595
597
  return `stateless-user:${userId}`;
596
598
  }
597
599
  throw new RememberIdentityError(
package/esm/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontmcp/plugin-remember",
3
- "version": "1.8.3",
3
+ "version": "1.8.5",
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.8.3",
53
- "@frontmcp/utils": "1.8.3",
52
+ "@frontmcp/sdk": "1.8.5",
53
+ "@frontmcp/utils": "1.8.5",
54
54
  "ioredis": "^5.8.0"
55
55
  },
56
56
  "peerDependencies": {
57
- "@frontmcp/lazy-zod": "1.8.3",
57
+ "@frontmcp/lazy-zod": "1.8.5",
58
58
  "@vercel/kv": "^2.0.0 || ^3.0.0"
59
59
  },
60
60
  "peerDependenciesMeta": {
package/index.js CHANGED
@@ -585,10 +585,10 @@ var RememberAccessor = class {
585
585
  * The session id the server verified for this request, or undefined when there is none.
586
586
  *
587
587
  * Read from the verified auth info (`authInfo.sessionId` from the transport, `extra.sessionId`
588
- * from session verification), the same rule CONTEXT providers are cached by. Never
589
- * `FrontMcpContext.sessionId` alone: under MCP 2026-07-28 that is whatever `mcp-session-id` the
590
- * caller sent, including another caller's. The stateless transport's shared `__stateless__` id
591
- * identifies no one.
588
+ * from session verification, which records only a session the request presented), the same rule
589
+ * CONTEXT providers are cached by. Never `FrontMcpContext.sessionId` alone: under MCP 2026-07-28
590
+ * that is whatever `mcp-session-id` the caller sent, including another caller's. The stateless
591
+ * transport's shared `__stateless__` id identifies no one.
592
592
  */
593
593
  get verifiedSessionId() {
594
594
  const authInfo = this.ctx.authInfo;
@@ -605,7 +605,8 @@ var RememberAccessor = class {
605
605
  * the shared `__stateless__` id (GHSA-225p-f8jh-f3rh). A request without a verified session
606
606
  * (stateless transport, MCP 2026-07-28, or a session id the server did not verify) falls back to
607
607
  * the authenticated principal, the only per-client identity it has; with neither, it has no
608
- * business reading or writing per-client memory at all.
608
+ * business reading or writing per-client memory at all. An anonymous subject (`anon:…`) is no
609
+ * principal: without a session, the server makes a new one up for each request.
609
610
  */
610
611
  resolveSessionIdentity() {
611
612
  const sessionId = this.verifiedSessionId;
@@ -613,7 +614,7 @@ var RememberAccessor = class {
613
614
  return sessionId;
614
615
  }
615
616
  const userId = this.userId;
616
- if (userId) {
617
+ if (userId && !(0, import_sdk.isAnonymousSubject)(userId)) {
617
618
  return `stateless-user:${userId}`;
618
619
  }
619
620
  throw new RememberIdentityError(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontmcp/plugin-remember",
3
- "version": "1.8.3",
3
+ "version": "1.8.5",
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.8.3",
53
- "@frontmcp/utils": "1.8.3",
52
+ "@frontmcp/sdk": "1.8.5",
53
+ "@frontmcp/utils": "1.8.5",
54
54
  "ioredis": "^5.8.0"
55
55
  },
56
56
  "peerDependencies": {
57
- "@frontmcp/lazy-zod": "1.8.3",
57
+ "@frontmcp/lazy-zod": "1.8.5",
58
58
  "@vercel/kv": "^2.0.0 || ^3.0.0"
59
59
  },
60
60
  "peerDependenciesMeta": {
@@ -110,10 +110,10 @@ export declare class RememberAccessor {
110
110
  * The session id the server verified for this request, or undefined when there is none.
111
111
  *
112
112
  * Read from the verified auth info (`authInfo.sessionId` from the transport, `extra.sessionId`
113
- * from session verification), the same rule CONTEXT providers are cached by. Never
114
- * `FrontMcpContext.sessionId` alone: under MCP 2026-07-28 that is whatever `mcp-session-id` the
115
- * caller sent, including another caller's. The stateless transport's shared `__stateless__` id
116
- * identifies no one.
113
+ * from session verification, which records only a session the request presented), the same rule
114
+ * CONTEXT providers are cached by. Never `FrontMcpContext.sessionId` alone: under MCP 2026-07-28
115
+ * that is whatever `mcp-session-id` the caller sent, including another caller's. The stateless
116
+ * transport's shared `__stateless__` id identifies no one.
117
117
  */
118
118
  private get verifiedSessionId();
119
119
  /**
@@ -125,7 +125,8 @@ export declare class RememberAccessor {
125
125
  * the shared `__stateless__` id (GHSA-225p-f8jh-f3rh). A request without a verified session
126
126
  * (stateless transport, MCP 2026-07-28, or a session id the server did not verify) falls back to
127
127
  * the authenticated principal, the only per-client identity it has; with neither, it has no
128
- * business reading or writing per-client memory at all.
128
+ * business reading or writing per-client memory at all. An anonymous subject (`anon:…`) is no
129
+ * principal: without a session, the server makes a new one up for each request.
129
130
  */
130
131
  private resolveSessionIdentity;
131
132
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"remember-accessor.provider.d.ts","sourceRoot":"","sources":["../../src/providers/remember-accessor.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAKvB,OAAO,KAAK,EACV,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAsBzE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAKa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAyB;IAC/C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAkB;IACtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwB;IAC/C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAU;gBAG1C,KAAK,EAAE,sBAAsB,EAC7B,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M,GAAG,SAAS,CAS/B;IAMD;;OAEG;IACH,OAAO,CAAC,eAAe;IAIvB;;;;;;;;OAQG;IACH,OAAO,KAAK,iBAAiB,GAQ5B;IAED;;;;;;;;;;OAUG;IACH,OAAO,CAAC,sBAAsB;IAmB9B;;;;;OAKG;IACH,OAAO,KAAK,QAAQ,GAEnB;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,gBAAgB;IA0BxB;;OAEG;IACH,OAAO,CAAC,YAAY;IAYpB;;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,KAAK,EACV,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAsBzE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAKa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAyB;IAC/C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAkB;IACtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwB;IAC/C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAU;gBAG1C,KAAK,EAAE,sB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