@skedulo/memory-hub-mcp 0.2.27 → 0.2.28
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/assets/session-start.sh
CHANGED
|
@@ -67,7 +67,7 @@ if [ -z "$TOKEN" ]; then
|
|
|
67
67
|
else
|
|
68
68
|
nohup "$CLAUDE_PLUGIN_ROOT/memory-hub-hook/mcp-server.sh" login </dev/null >"$STATE_DIR/login.log" 2>&1 &
|
|
69
69
|
fi
|
|
70
|
-
emit_context "This is the first session with Memory Hub, so a browser tab is opening on the Skedulo sign-in (the first time it can take a minute). Tell the user to sign in there; memory starts working from their next message. If no tab opened, call memory_login. Once they're signed in, offer once to stop Memory Hub's approval prompts with /memory-hub:setup."
|
|
70
|
+
emit_context "This is the first session with Memory Hub, so a browser tab is opening on the Skedulo sign-in (the first time it can take a minute). Tell the user to sign in there; memory starts working from their next message. If no tab opened, call memory_login. Once they're signed in, offer once to stop Memory Hub's approval prompts and turn on auto-update with /memory-hub:setup."
|
|
71
71
|
else
|
|
72
72
|
emit_context "Memory Hub isn't signed in, so memory is off. Offer once to sign the user in; if they agree, call memory_login, which opens a Skedulo sign-in in their browser."
|
|
73
73
|
fi
|
|
@@ -98,6 +98,26 @@ every Memory Hub tool, including deleting and sharing memories. Do nothing witho
|
|
|
98
98
|
first time Claude asks before a Memory Hub tool, or to change it later in the Claude app's
|
|
99
99
|
settings for the Memory Hub extension.
|
|
100
100
|
|
|
101
|
+
## 4b. Turn on auto-update (plugin installs only)
|
|
102
|
+
|
|
103
|
+
Skip this if you already offered it in this session, or when `${CLAUDE_PLUGIN_ROOT}` is empty.
|
|
104
|
+
|
|
105
|
+
Claude Code does not update plugins from this marketplace unless auto-update is on, so new hooks and
|
|
106
|
+
skills would never arrive. Ask the person once whether the Memory Hub plugin should update itself.
|
|
107
|
+
Do nothing without a yes. On yes, with the same safe merge as step 4:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
bash -c 'settings="$HOME/.claude/settings.json"
|
|
111
|
+
[ -f "$settings" ] || echo "{}" > "$settings"
|
|
112
|
+
jq -e ".extraKnownMarketplaces[\"memory-hub\"].autoUpdate == true" "$settings" >/dev/null 2>&1 && { echo "already on"; exit 0; }
|
|
113
|
+
cp "$settings" "$settings.bak-$(date +%Y%m%d%H%M%S)" \
|
|
114
|
+
&& jq ".extraKnownMarketplaces[\"memory-hub\"] = ((.extraKnownMarketplaces[\"memory-hub\"] // {source: {source: \"github\", repo: \"Skedulo/se-ai-memory-hub\", ref: \"main\"}}) + {autoUpdate: true})" "$settings" > "$settings.new" \
|
|
115
|
+
&& mv "$settings.new" "$settings"'
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Say it applies from their next session. If `jq` is missing, tell them to turn it on in `/plugin` →
|
|
119
|
+
Marketplaces → memory-hub instead.
|
|
120
|
+
|
|
101
121
|
## 5. Auto-capture (Claude Code only)
|
|
102
122
|
|
|
103
123
|
Auto-capture saves what a session learned when it ends, by running `claude` in the background.
|
package/dist/login-tool.js
CHANGED
|
@@ -7,6 +7,7 @@ const setup_1 = require("./setup");
|
|
|
7
7
|
const SIGNED_IN = 'Signed in. Memory Hub works now, no restart needed.';
|
|
8
8
|
const EXTENSION_ALLOW_NOTE = " If Claude asks before each Memory Hub tool, the user can choose Always allow, or change it later in the Claude app's settings for the Memory Hub extension.";
|
|
9
9
|
const allowOffer = (rule) => ` Then offer once to stop Memory Hub's approval prompts (this covers all its tools, including deleting and sharing memories): if the user agrees, add "${rule}" to permissions.allow in ~/.claude/settings.json (merge it, keep a backup), and say it applies from their next session.`;
|
|
10
|
+
const AUTO_UPDATE_OFFER = ` Also offer once to turn on auto-update, so the Memory Hub plugin gets new versions by itself: if the user agrees, set extraKnownMarketplaces["${setup_1.MARKETPLACE_NAME}"].autoUpdate to true in ~/.claude/settings.json, adding the entry with source {"source": "github", "repo": "${setup_1.MARKETPLACE_REPO}", "ref": "${setup_1.MARKETPLACE_REF}"} if it is missing (merge it, keep a backup).`;
|
|
10
11
|
const FIRST_CALL_WAIT_MS = 5000;
|
|
11
12
|
const POLL_MS = 25;
|
|
12
13
|
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
|
|
@@ -55,7 +56,9 @@ function createLoginTool(deps) {
|
|
|
55
56
|
const signedIn = () => {
|
|
56
57
|
if (deps.extension)
|
|
57
58
|
return `${SIGNED_IN}${EXTENSION_ALLOW_NOTE}`;
|
|
58
|
-
|
|
59
|
+
if (deps.viaPlugin)
|
|
60
|
+
return `${SIGNED_IN}${allowOffer(setup_1.PLUGIN_ALLOW_RULE)}${AUTO_UPDATE_OFFER}`;
|
|
61
|
+
return `${SIGNED_IN}${allowOffer(setup_1.DIRECT_ALLOW_RULE)}`;
|
|
59
62
|
};
|
|
60
63
|
const call = async () => {
|
|
61
64
|
if (pending)
|
package/package.json
CHANGED