@skedulo/memory-hub-mcp 0.2.42 → 0.2.43

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.
@@ -22,7 +22,7 @@ function migratePlugin(deps) {
22
22
  let left;
23
23
  try {
24
24
  if ((0, plugin_move_util_1.readStrict)(settingsPath)?.enabledPlugins?.[setup_1.LEGACY_PLUGIN_ID] === true) {
25
- const disabled = run(['plugin', 'disable', setup_1.LEGACY_PLUGIN_ID]);
25
+ const disabled = run(['plugin', 'disable', setup_1.LEGACY_PLUGIN_ID, '--scope', 'user']);
26
26
  if (disabled.status !== 0)
27
27
  left = `disable failed (${(0, setup_1.lastLine)(disabled.output)})`;
28
28
  }
package/dist/setup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.desktopRestartOffer = exports.insideClaudeDesktop = exports.chooseSetup = exports.registerPromptHook = exports.registerSessionStartHook = exports.removeMcpServer = exports.removeCopiedAssets = exports.setCapture = exports.captureOn = exports.CAPTURE_FLAG = exports.unregisterHooks = exports.claudeRunner = exports.installPlugin = exports.enableMarketplaceAutoUpdate = exports.removeUserEnv = exports.allowMemoryHubTools = exports.writeUserEnv = exports.writeDesktopConfig = exports.writeMcpServer = exports.functionUrl = exports.writeJson = exports.readJsonStrict = exports.readJson = exports.desktopConfigPath = exports.mcpLaunch = exports.lastLine = exports.isSkeduloSource = exports.isHubSource = exports.pluginInstalled = exports.installedPluginId = exports.installedPluginIds = exports.claudeConfigDir = exports.marketplaceSource = exports.marketplaceFromRoot = exports.skeduloMoveEnabled = exports.LEGACY_PLUGIN_ID = exports.SKEDULO_MARKETPLACE_MOVE = exports.SKEDULO_PLUGIN_ID = exports.SKEDULO_MARKETPLACE_REPO = exports.SKEDULO_MARKETPLACE_NAME = exports.PLUGIN_ID = exports.DIRECT_ALLOW_RULE = exports.PLUGIN_ALLOW_RULE = exports.MARKETPLACE_REF = exports.MARKETPLACE_GIT_URL = exports.MARKETPLACE_REPO = exports.LEGACY_MARKETPLACE_NAME = exports.MARKETPLACE_NAME = exports.launchPath = exports.PACKAGE_SPEC = void 0;
4
- exports.runSetup = exports.runCapture = exports.captureMessage = exports.processAncestors = exports.doneLine = void 0;
4
+ exports.runSetup = exports.moveMessage = exports.runCapture = exports.captureMessage = exports.processAncestors = exports.doneLine = void 0;
5
5
  const child_process_1 = require("child_process");
6
6
  const fs_1 = require("fs");
7
7
  const os_1 = require("os");
@@ -36,9 +36,12 @@ exports.PLUGIN_ID = `memory-hub@${exports.MARKETPLACE_NAME}`;
36
36
  exports.SKEDULO_MARKETPLACE_NAME = 'skedulo-plugin-marketplace';
37
37
  exports.SKEDULO_MARKETPLACE_REPO = 'Skedulo/skedulo-plugin-marketplace';
38
38
  exports.SKEDULO_PLUGIN_ID = `memory-hub@${exports.SKEDULO_MARKETPLACE_NAME}`;
39
- exports.SKEDULO_MARKETPLACE_MOVE = false;
39
+ exports.SKEDULO_MARKETPLACE_MOVE = true;
40
40
  exports.LEGACY_PLUGIN_ID = `memory-hub@${exports.LEGACY_MARKETPLACE_NAME}`;
41
+ // MEMORY_HUB_SKEDULO_MOVE=0 keeps one machine on the old marketplace while the gate is on.
41
42
  function skeduloMoveEnabled(env = process.env) {
43
+ if (env.MEMORY_HUB_SKEDULO_MOVE === '0')
44
+ return false;
42
45
  return exports.SKEDULO_MARKETPLACE_MOVE || env.MEMORY_HUB_SKEDULO_MOVE === '1';
43
46
  }
44
47
  exports.skeduloMoveEnabled = skeduloMoveEnabled;
@@ -352,6 +355,8 @@ function claudeRunner() {
352
355
  const result = (0, child_process_1.spawnSync)(command, args, {
353
356
  encoding: 'utf8',
354
357
  timeout: 180000,
358
+ // From $HOME, claude also reads ~/.claude/settings.json as project settings, so a plain disable lands in the wrong scope.
359
+ cwd: (0, os_1.tmpdir)(),
355
360
  env: {
356
361
  ...process.env,
357
362
  GIT_TERMINAL_PROMPT: '0',
@@ -697,15 +702,20 @@ function moveOldPlugin() {
697
702
  console.log(` a move of ${from} to ${target} is already running; re-run setup in a minute if it is still listed.`);
698
703
  return;
699
704
  }
700
- if (result.status === 'moved' && result.reason.startsWith('retired'))
701
- console.log(` removed the old ${from} install; ${target} stays.`);
702
- else if (result.status === 'moved')
703
- console.log(` moved ${from} to its new ID ${target}; it loads at the next session.`);
704
- else if (result.status === 'failed')
705
- console.log(` couldn't move ${from} to ${target}: ${result.reason}.`);
706
- else if (!QUIET_SKIPS.includes(result.reason))
707
- console.log(` kept ${from} (${result.reason}).`);
705
+ const line = moveMessage(result, from, target);
706
+ if (line)
707
+ console.log(line);
708
708
  }
709
+ function moveMessage(result, from, target) {
710
+ if (result.status === 'moved' && result.reason.startsWith('retired'))
711
+ return ` removed the old ${from} install; ${target} stays.`;
712
+ if (result.status === 'moved')
713
+ return ` moved ${from} to its new ID ${target}; it loads at the next session.`;
714
+ if (result.status === 'failed')
715
+ return ` couldn't move ${from} to ${target}: ${result.reason}.`;
716
+ return QUIET_SKIPS.includes(result.reason) ? undefined : ` kept ${from} (${result.reason}).`;
717
+ }
718
+ exports.moveMessage = moveMessage;
709
719
  async function runSetup(argv = []) {
710
720
  console.log('==> Setting up the memory hub');
711
721
  const isTTY = Boolean(process.stdin.isTTY);
@@ -126,6 +126,13 @@ function moveToSkedulo(deps) {
126
126
  return `install failed (claude did not list ${setup_1.SKEDULO_PLUGIN_ID})`;
127
127
  return undefined;
128
128
  };
129
+ // Left older than the old ID, the new install fails verify and both stay installed, so their hooks run twice.
130
+ const updateOlderNewInstall = () => {
131
+ if (semverAtLeast(userVersion(installed, setup_1.SKEDULO_PLUGIN_ID) ?? '', userVersion(installed, old) ?? '') !== false)
132
+ return undefined;
133
+ const updated = run(['plugin', 'update', setup_1.SKEDULO_PLUGIN_ID, '--scope', 'user']);
134
+ return updated.status === 0 ? undefined : `update failed (${(0, setup_1.lastLine)(updated.output)})`;
135
+ };
129
136
  const verify = () => {
130
137
  const listed = run(['plugin', 'list', '--json']);
131
138
  if (listed.status !== 0 || !loadsCleanly(listed.output, setup_1.SKEDULO_PLUGIN_ID)) {
@@ -198,7 +205,7 @@ function moveToSkedulo(deps) {
198
205
  };
199
206
  let failure;
200
207
  try {
201
- failure = (newInstalled ? undefined : addAndInstall()) ?? verify();
208
+ failure = (newInstalled ? updateOlderNewInstall() : addAndInstall()) ?? verify();
202
209
  if (failure === 'inactive')
203
210
  return finish('skipped', 'new install not active');
204
211
  if (failure === undefined && newInstalled)
@@ -219,7 +226,7 @@ function moveToSkedulo(deps) {
219
226
  let disableFailure;
220
227
  try {
221
228
  if (oldWasEnabled) {
222
- const disabled = run(['plugin', 'disable', old]);
229
+ const disabled = run(['plugin', 'disable', old, '--scope', 'user']);
223
230
  if (disabled.status !== 0)
224
231
  disableFailure = (0, setup_1.lastLine)(disabled.output);
225
232
  }
@@ -242,7 +249,7 @@ function moveToSkedulo(deps) {
242
249
  notes.push(`old marketplace not removed: ${removeFailure}`);
243
250
  turnOff(settingsPath, old, notes);
244
251
  }
245
- const reason = `${old} to ${setup_1.SKEDULO_PLUGIN_ID}, loads at the next session`;
252
+ const reason = newInstalled ? `retired ${old}; ${setup_1.SKEDULO_PLUGIN_ID} stays` : `${old} to ${setup_1.SKEDULO_PLUGIN_ID}, loads at the next session`;
246
253
  // A remove that keeps failing would otherwise re-announce the move and re-force auto-update every day.
247
254
  if (!oldWasEnabled && removeFailure !== undefined)
248
255
  return finish('moved', (0, plugin_move_util_1.withNotes)(reason, notes));
@@ -303,7 +310,7 @@ function retireLegacy(deps, installed, onMain, notes) {
303
310
  let left;
304
311
  try {
305
312
  if ((0, plugin_move_util_1.readStrict)(settingsPath)?.enabledPlugins?.[setup_1.LEGACY_PLUGIN_ID] === true) {
306
- const disabled = deps.run(['plugin', 'disable', setup_1.LEGACY_PLUGIN_ID]);
313
+ const disabled = deps.run(['plugin', 'disable', setup_1.LEGACY_PLUGIN_ID, '--scope', 'user']);
307
314
  if (disabled.status !== 0)
308
315
  left = `disable failed (${(0, setup_1.lastLine)(disabled.output)})`;
309
316
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skedulo/memory-hub-mcp",
3
- "version": "0.2.42",
3
+ "version": "0.2.43",
4
4
  "description": "MCP server for the Memory Hub: recall and save developer memory from Claude Code and Claude Desktop.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {