@wyrdsekai/researchzosho-mcp 0.1.6 → 0.1.8
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/bin/index.js +9 -7
- package/package.json +2 -2
package/bin/index.js
CHANGED
|
@@ -29,6 +29,8 @@ const ENV = 'RESEARCHZOSHO';
|
|
|
29
29
|
const REPO = 'Wyrdsekai/researchzosho';
|
|
30
30
|
const SITE = 'https://researchzosho.org';
|
|
31
31
|
const VERSION = require('../package.json').version;
|
|
32
|
+
/** The release this launcher starts: the package version without an npm-only suffix (0.1.6-1 is the launcher, 0.1.6 the release). */
|
|
33
|
+
const RELEASE = VERSION.replace(/-.*$/, '');
|
|
32
34
|
const WIN = process.platform === 'win32';
|
|
33
35
|
const HOME = os.homedir();
|
|
34
36
|
|
|
@@ -56,7 +58,7 @@ function installed() {
|
|
|
56
58
|
} else {
|
|
57
59
|
found.push(path.join(HOME, '.local', 'bin', TOOL), path.join('/usr/local/bin', TOOL), path.join('/usr/bin', TOOL), startScript(path.join('/opt', TOOL)));
|
|
58
60
|
}
|
|
59
|
-
found.push(startScript(path.join(cacheRoot(), `${TOOL}-${
|
|
61
|
+
found.push(startScript(path.join(cacheRoot(), `${TOOL}-${RELEASE}`, TOOL)));
|
|
60
62
|
return found.find(runnable) || null;
|
|
61
63
|
}
|
|
62
64
|
|
|
@@ -117,16 +119,16 @@ function platformBuild() {
|
|
|
117
119
|
async function download() {
|
|
118
120
|
const major = javaMajor();
|
|
119
121
|
const noJava = major ? `java ${major} found; ${TITLE} needs Java 21 or newer.` : `java not found; ${TITLE} needs Java 21 or newer on PATH (https://adoptium.net).`;
|
|
120
|
-
const base = process.env[`${ENV}_DOWNLOAD_BASE`] || `https://github.com/${REPO}/releases/download/v${
|
|
121
|
-
let tar = `${TOOL}-${
|
|
122
|
+
const base = process.env[`${ENV}_DOWNLOAD_BASE`] || `https://github.com/${REPO}/releases/download/v${RELEASE}`;
|
|
123
|
+
let tar = `${TOOL}-${RELEASE}.tar.gz`;
|
|
122
124
|
if (major < 21) {
|
|
123
125
|
const build = platformBuild();
|
|
124
126
|
if (!build) { say(noJava); say(`Install ${TITLE} itself and this launcher will start it: ${SITE}`); process.exit(1); }
|
|
125
|
-
tar = `${TOOL}-${
|
|
127
|
+
tar = `${TOOL}-${RELEASE}-${build}.tar.gz`;
|
|
126
128
|
say(`${noJava} Fetching the ${build} build that carries its own runtime.`);
|
|
127
129
|
}
|
|
128
130
|
const root = cacheRoot();
|
|
129
|
-
const dest = path.join(root, `${TOOL}-${
|
|
131
|
+
const dest = path.join(root, `${TOOL}-${RELEASE}`);
|
|
130
132
|
const part = path.join(root, `.part-${process.pid}`);
|
|
131
133
|
fs.mkdirSync(part, { recursive: true });
|
|
132
134
|
try {
|
|
@@ -174,7 +176,7 @@ function run(script, args) {
|
|
|
174
176
|
(async () => {
|
|
175
177
|
const args = process.argv.slice(2);
|
|
176
178
|
if (args[0] === '--help' || args[0] === '-h') {
|
|
177
|
-
process.stderr.write(`usage: npx @wyrdsekai/${TOOL}-mcp\nStarts \`${TOOL} mcp\` (the MCP server over stdio), installing ${TITLE} ${
|
|
179
|
+
process.stderr.write(`usage: npx @wyrdsekai/${TOOL}-mcp\nStarts \`${TOOL} mcp\` (the MCP server over stdio), installing ${TITLE} ${RELEASE} first when it is not on this machine.\n`);
|
|
178
180
|
process.exit(0);
|
|
179
181
|
}
|
|
180
182
|
if (args[0] === '--version') { process.stderr.write(`${TOOL}-mcp ${VERSION}\n`); process.exit(0); }
|
|
@@ -183,7 +185,7 @@ function run(script, args) {
|
|
|
183
185
|
const v = installedVersion(script);
|
|
184
186
|
say(`starting ${script} mcp${v ? ` (${TITLE} ${v})` : ''}`);
|
|
185
187
|
// the registry lists this launcher as VERSION; an older install on the machine is what actually answers
|
|
186
|
-
if (v && v !==
|
|
188
|
+
if (v && v !== RELEASE) say(`note: the installed ${TITLE} is ${v}, this launcher starts ${RELEASE}; \`${TOOL} update now\` brings the install up to date`);
|
|
187
189
|
} else script = await download();
|
|
188
190
|
run(script, ['mcp', ...args]);
|
|
189
191
|
})().catch((e) => { say(e.message); process.exit(1); });
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wyrdsekai/researchzosho-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Starts ResearchZosho, the research librarian for the rest of us, as an MCP server over stdio: npx @wyrdsekai/researchzosho-mcp",
|
|
5
|
-
"mcpName": "io.github.
|
|
5
|
+
"mcpName": "io.github.Wyrdsekai/researchzosho",
|
|
6
6
|
"bin": {
|
|
7
7
|
"researchzosho-mcp": "bin/index.js"
|
|
8
8
|
},
|