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