mcp-memory-bucket 0.10.0 → 0.10.1
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/dist/src/server.js +18 -1
- package/package.json +1 -1
package/dist/src/server.js
CHANGED
|
@@ -20,7 +20,8 @@ import { registerUiTool } from './web/ui-tool.js';
|
|
|
20
20
|
import { registerMemoryChannelTools } from './channels/tools.js';
|
|
21
21
|
import { startChannelSweep } from './channels/store.js';
|
|
22
22
|
import { startRemotePolling } from './remote/remote-sync.js';
|
|
23
|
-
import { IdentityTracker } from './remote/identity.js';
|
|
23
|
+
import { IdentityTracker, decodeUsername } from './remote/identity.js';
|
|
24
|
+
import { getCredential } from './remote/credentials.js';
|
|
24
25
|
// server.ts is rebuilt from `buildMcpServer()` on every /mcp request (see below),
|
|
25
26
|
// so tool schemas (which conditionally include `folder` based on folder count) always
|
|
26
27
|
// reflect the current folders — no restart needed after an add/remove-folder call.
|
|
@@ -38,6 +39,22 @@ const PORT = process.env.PORT ? Number(process.env.PORT) : 8767;
|
|
|
38
39
|
const config = loadConfig();
|
|
39
40
|
const db = openCache(config.cacheDbPath);
|
|
40
41
|
const identity = new IdentityTracker(config.folderfooMode);
|
|
42
|
+
// Restore the logged-in identity from a previously saved credential so a
|
|
43
|
+
// restarted process doesn't hide every remote folder (see isFolderVisible)
|
|
44
|
+
// until the user re-logs-in via the web UI - the JWT itself, not the config
|
|
45
|
+
// file's stored username, is the source of truth here since it's what
|
|
46
|
+
// login.ts's own handler decodes to call identity.setUsername() normally.
|
|
47
|
+
if (config.folderfooHost) {
|
|
48
|
+
const credential = getCredential(config.baseDir, config.folderfooHost);
|
|
49
|
+
if (credential) {
|
|
50
|
+
try {
|
|
51
|
+
identity.setUsername(decodeUsername(credential.jwt));
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
// malformed/stale token - leave identity logged out, same as no credential at all
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
41
58
|
// Built ONCE and shared by reference with SkillRepository below — registerRemoteFolder/addFolder
|
|
42
59
|
// push into this same array in place, so skillSpec.sources (used by initialScan/watchSources/
|
|
43
60
|
// startRemotePolling/pollOne's upsertFile) sees a folder added live, without a restart. Evaluating
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-memory-bucket",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MCP server exposing skill_* (reusable coding patterns) and memory_* (point-in-time working context) tools over a markdown+frontmatter source, cached into SQLite at runtime.",
|
|
6
6
|
"repository": {
|