yaver-cli 1.95.6 → 1.95.7
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/yaver-mcp +14 -0
- package/package.json +5 -2
- package/src/preuninstall.js +23 -0
package/bin/yaver-mcp
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// yaver-mcp — one-shot entry point that launches the Yaver MCP stdio
|
|
3
|
+
// server. Equivalent to running `yaver mcp`, but exposed as its own
|
|
4
|
+
// bin so MCP clients + the MCP Registry can invoke it as
|
|
5
|
+
//
|
|
6
|
+
// npx -y yaver-cli yaver-mcp
|
|
7
|
+
//
|
|
8
|
+
// or by adding `"command": "yaver-mcp"` directly to their mcpServers
|
|
9
|
+
// config (once yaver-cli is installed globally). Forwards any extra
|
|
10
|
+
// arguments transparently.
|
|
11
|
+
|
|
12
|
+
const { runUnified } = require('../src/index');
|
|
13
|
+
|
|
14
|
+
runUnified(['mcp', ...process.argv.slice(2)]);
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yaver-cli",
|
|
3
|
-
"version": "1.95.
|
|
3
|
+
"version": "1.95.7",
|
|
4
|
+
"mcpName": "io.github.kivanccakmak/yaver",
|
|
4
5
|
"description": "Unified npm bootstrap for the Yaver agent and push-to-device React Native tooling",
|
|
5
6
|
"bin": {
|
|
6
7
|
"yaver": "bin/yaver",
|
|
7
|
-
"yaver-push": "bin/yaver-push"
|
|
8
|
+
"yaver-push": "bin/yaver-push",
|
|
9
|
+
"yaver-mcp": "bin/yaver-mcp",
|
|
10
|
+
"yaver-cli": "bin/yaver-mcp"
|
|
8
11
|
},
|
|
9
12
|
"main": "src/index.js",
|
|
10
13
|
"files": [
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// npm preuninstall hook — best-effort call to `yaver mcp unregister` so the
|
|
3
|
+
// CLI cleans up the MCP entries it added to Claude Desktop / Claude Code /
|
|
4
|
+
// Codex / Cursor / VS Code / Windsurf / Zed before the binary is removed.
|
|
5
|
+
//
|
|
6
|
+
// Must NEVER fail the uninstall. If yaver is not on PATH, silently succeed.
|
|
7
|
+
|
|
8
|
+
const { spawnSync } = require("node:child_process");
|
|
9
|
+
|
|
10
|
+
try {
|
|
11
|
+
const res = spawnSync("yaver", ["mcp", "unregister"], {
|
|
12
|
+
stdio: "inherit",
|
|
13
|
+
timeout: 15_000,
|
|
14
|
+
});
|
|
15
|
+
if (res.error && res.error.code === "ENOENT") {
|
|
16
|
+
// yaver not on PATH — nothing to clean up.
|
|
17
|
+
process.exit(0);
|
|
18
|
+
}
|
|
19
|
+
// Ignore exit code; we always succeed so npm uninstall can finish.
|
|
20
|
+
process.exit(0);
|
|
21
|
+
} catch {
|
|
22
|
+
process.exit(0);
|
|
23
|
+
}
|