@wyrdsekai/researchzosho-mcp 0.7.0 → 0.7.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.
Files changed (2) hide show
  1. package/bin/index.js +9 -2
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -67,18 +67,25 @@ function cacheRoot() { return path.join(HOME, `.${TOOL}`, 'launcher'); }
67
67
  /**
68
68
  * The version an installed program is, read off the jar beside its start script — or, through the installer's
69
69
  * wrapper (`exec "<root>/bin/<tool>" "$@"`), the root it names; null when it cannot be told without starting it.
70
+ * An install that keeps its versions side by side (0.7.2 and later) runs the one `current` names, `current.txt`
71
+ * on Windows, under versions/.
70
72
  */
71
73
  function installedVersion(script) {
72
74
  let root = path.resolve(path.dirname(script), '..');
73
- if (!fs.existsSync(path.join(root, 'lib'))) {
75
+ if (!fs.existsSync(path.join(root, 'lib')) && !fs.existsSync(path.join(root, 'versions'))) {
74
76
  try {
75
77
  const m = /exec "([^"]+)\/bin\/[^"/]+"/.exec(fs.readFileSync(script, 'utf8'));
76
78
  if (m) root = m[1];
77
79
  } catch (e) { return null; }
78
80
  }
81
+ let lib = path.join(root, 'lib');
82
+ try {
83
+ if (fs.existsSync(path.join(root, 'current.txt'))) lib = path.join(root, 'versions', fs.readFileSync(path.join(root, 'current.txt'), 'utf8').trim(), 'lib');
84
+ else if (fs.existsSync(path.join(root, 'current'))) lib = path.join(root, 'current', 'lib');
85
+ } catch (e) { /* the first layout: lib/ beside bin/ */ }
79
86
  try {
80
87
  const re = new RegExp(`^(?:${TOOL}|librarian|core)-(\\d+\\.\\d+\\.\\d+)\\.jar$`);
81
- for (const f of fs.readdirSync(path.join(root, 'lib'))) { const m = re.exec(f); if (m) return m[1]; }
88
+ for (const f of fs.readdirSync(lib)) { const m = re.exec(f); if (m) return m[1]; }
82
89
  } catch (e) { /* not a layout we know */ }
83
90
  return null;
84
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wyrdsekai/researchzosho-mcp",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Deep research MCP server with citations and memory. Starts ResearchZosho for Claude Code, Codex, Gemini CLI or any MCP client that can run npx, and fetches the release if it is not installed.",
5
5
  "mcpName": "io.github.Wyrdsekai/researchzosho",
6
6
  "bin": {