@frontmcp/plugin-remember 1.8.0 → 1.8.2
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
|
@@ -30,7 +30,11 @@ import {
|
|
|
30
30
|
} from "@frontmcp/sdk";
|
|
31
31
|
|
|
32
32
|
// plugins/plugin-remember/src/providers/remember-accessor.provider.ts
|
|
33
|
-
import {
|
|
33
|
+
import {
|
|
34
|
+
Provider,
|
|
35
|
+
ProviderScope,
|
|
36
|
+
STATELESS_SESSION_ID
|
|
37
|
+
} from "@frontmcp/sdk";
|
|
34
38
|
|
|
35
39
|
// plugins/plugin-remember/src/remember.crypto.ts
|
|
36
40
|
import {
|
|
@@ -157,6 +161,10 @@ async function getOrCreatePersistedSecret(options) {
|
|
|
157
161
|
};
|
|
158
162
|
if (isSecretPersistenceEnabled(options)) {
|
|
159
163
|
await saveRememberSecret(secretData, options);
|
|
164
|
+
} else {
|
|
165
|
+
console.warn(
|
|
166
|
+
"[RememberSecretPersistence] No REMEMBER_SECRET (or MCP_MEMORY_SECRET / MCP_SESSION_SECRET) is set in production, so a random in-memory secret is used. Encrypted memory will be unreadable after a restart and by other instances sharing the store. Set REMEMBER_SECRET to the same value on every instance."
|
|
167
|
+
);
|
|
160
168
|
}
|
|
161
169
|
cachedSecret = newSecret;
|
|
162
170
|
return cachedSecret;
|
|
@@ -380,7 +388,6 @@ function scheduleLegacyRememberPurge(store, keyPrefix, options = {}) {
|
|
|
380
388
|
}
|
|
381
389
|
|
|
382
390
|
// plugins/plugin-remember/src/providers/remember-accessor.provider.ts
|
|
383
|
-
var STATELESS_SESSION_ID = "__stateless__";
|
|
384
391
|
var STORAGE_LAYOUT_VERSION = "v2";
|
|
385
392
|
function encodeKeyPart(value) {
|
|
386
393
|
return encodeURIComponent(value);
|
|
@@ -568,7 +575,7 @@ var RememberAccessor = class {
|
|
|
568
575
|
return `stateless-user:${userId}`;
|
|
569
576
|
}
|
|
570
577
|
throw new RememberIdentityError(
|
|
571
|
-
`Remember cannot use session or tool scope for an unauthenticated stateless request: every such request shares the session id "
|
|
578
|
+
`Remember cannot use session or tool scope for an unauthenticated stateless request: every such request shares the session id "${STATELESS_SESSION_ID}", so the data would be shared across all clients. Authenticate the request, use a stateful transport, or choose the 'global' scope if the data really is shared.`
|
|
572
579
|
);
|
|
573
580
|
}
|
|
574
581
|
/**
|
package/esm/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/plugin-remember",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.2",
|
|
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.
|
|
53
|
-
"@frontmcp/utils": "1.8.
|
|
52
|
+
"@frontmcp/sdk": "1.8.2",
|
|
53
|
+
"@frontmcp/utils": "1.8.2",
|
|
54
54
|
"ioredis": "^5.8.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@frontmcp/lazy-zod": "1.8.
|
|
57
|
+
"@frontmcp/lazy-zod": "1.8.2",
|
|
58
58
|
"@vercel/kv": "^2.0.0 || ^3.0.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependenciesMeta": {
|
package/index.js
CHANGED
|
@@ -184,6 +184,10 @@ async function getOrCreatePersistedSecret(options) {
|
|
|
184
184
|
};
|
|
185
185
|
if (isSecretPersistenceEnabled(options)) {
|
|
186
186
|
await saveRememberSecret(secretData, options);
|
|
187
|
+
} else {
|
|
188
|
+
console.warn(
|
|
189
|
+
"[RememberSecretPersistence] No REMEMBER_SECRET (or MCP_MEMORY_SECRET / MCP_SESSION_SECRET) is set in production, so a random in-memory secret is used. Encrypted memory will be unreadable after a restart and by other instances sharing the store. Set REMEMBER_SECRET to the same value on every instance."
|
|
190
|
+
);
|
|
187
191
|
}
|
|
188
192
|
cachedSecret = newSecret;
|
|
189
193
|
return cachedSecret;
|
|
@@ -407,7 +411,6 @@ function scheduleLegacyRememberPurge(store, keyPrefix, options = {}) {
|
|
|
407
411
|
}
|
|
408
412
|
|
|
409
413
|
// plugins/plugin-remember/src/providers/remember-accessor.provider.ts
|
|
410
|
-
var STATELESS_SESSION_ID = "__stateless__";
|
|
411
414
|
var STORAGE_LAYOUT_VERSION = "v2";
|
|
412
415
|
function encodeKeyPart(value) {
|
|
413
416
|
return encodeURIComponent(value);
|
|
@@ -587,7 +590,7 @@ var RememberAccessor = class {
|
|
|
587
590
|
*/
|
|
588
591
|
resolveSessionIdentity() {
|
|
589
592
|
const sessionId = this.ctx.sessionId;
|
|
590
|
-
if (sessionId !== STATELESS_SESSION_ID) {
|
|
593
|
+
if (sessionId !== import_sdk.STATELESS_SESSION_ID) {
|
|
591
594
|
return sessionId;
|
|
592
595
|
}
|
|
593
596
|
const userId = this.userId;
|
|
@@ -595,7 +598,7 @@ var RememberAccessor = class {
|
|
|
595
598
|
return `stateless-user:${userId}`;
|
|
596
599
|
}
|
|
597
600
|
throw new RememberIdentityError(
|
|
598
|
-
`Remember cannot use session or tool scope for an unauthenticated stateless request: every such request shares the session id "
|
|
601
|
+
`Remember cannot use session or tool scope for an unauthenticated stateless request: every such request shares the session id "${import_sdk.STATELESS_SESSION_ID}", so the data would be shared across all clients. Authenticate the request, use a stateful transport, or choose the 'global' scope if the data really is shared.`
|
|
599
602
|
);
|
|
600
603
|
}
|
|
601
604
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/plugin-remember",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.2",
|
|
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.
|
|
53
|
-
"@frontmcp/utils": "1.8.
|
|
52
|
+
"@frontmcp/sdk": "1.8.2",
|
|
53
|
+
"@frontmcp/utils": "1.8.2",
|
|
54
54
|
"ioredis": "^5.8.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@frontmcp/lazy-zod": "1.8.
|
|
57
|
+
"@frontmcp/lazy-zod": "1.8.2",
|
|
58
58
|
"@vercel/kv": "^2.0.0 || ^3.0.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependenciesMeta": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FrontMcpContext, type FrontMcpLogger } from '@frontmcp/sdk';
|
|
1
|
+
import { type FrontMcpContext, type FrontMcpLogger } from '@frontmcp/sdk';
|
|
2
2
|
import type { RememberEntry, RememberForgetOptions, RememberGetOptions, RememberKnowsOptions, RememberListOptions, RememberPluginOptions, RememberScope, RememberSetOptions } from '../remember.types';
|
|
3
3
|
import type { RememberStoreInterface } from './remember-store.interface';
|
|
4
4
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remember-accessor.provider.d.ts","sourceRoot":"","sources":["../../src/providers/remember-accessor.provider.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"remember-accessor.provider.d.ts","sourceRoot":"","sources":["../../src/providers/remember-accessor.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAKvB,OAAO,KAAK,EACV,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,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AAO,GAAE,oBAAyB,GAAG,OAAO,CAAC,OAAO,CAAC;IAM9E;;;;;OAKG;IACG,IAAI,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAWhE;;;;;;OAMG;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;IA0B/G;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,MAAM,GAAG,SAAS,CAS/B;IAMD;;OAEG;IACH,OAAO,CAAC,eAAe;IAIvB;;;;;;;;;OASG;IACH,OAAO,CAAC,sBAAsB;IAoB9B;;;;;;;OAOG;IACH,OAAO,CAAC,gBAAgB;IA6BxB;;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remember.secret-persistence.d.ts","sourceRoot":"","sources":["../src/remember.secret-persistence.ts"],"names":[],"mappings":"AAmBA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,OAAO,EAAE,CAAC,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAuDD;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAUtF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,CAAC,EAAE,wBAAwB,GAAG,MAAM,CAU5E;AAMD;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CA8B/G;AAED;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,kBAAkB,EAC9B,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAAC,OAAO,CAAC,CA+BlB;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAU5F;AAmBD;;;;;;;;;;;GAWG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"remember.secret-persistence.d.ts","sourceRoot":"","sources":["../src/remember.secret-persistence.ts"],"names":[],"mappings":"AAmBA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,OAAO,EAAE,CAAC,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAuDD;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAUtF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,CAAC,EAAE,wBAAwB,GAAG,MAAM,CAU5E;AAMD;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CA8B/G;AAED;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,kBAAkB,EAC9B,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAAC,OAAO,CAAC,CA+BlB;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAU5F;AAmBD;;;;;;;;;;;GAWG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,CA8CpG;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAExC"}
|