@viberaven/mcp 1.4.3 → 1.5.0

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/README.md CHANGED
@@ -8,9 +8,9 @@ Thin MCP wrapper for VibeRaven.
8
8
 
9
9
  This package exposes VibeRaven CLI actions as MCP tools for Codex, Claude Code, Cursor, and other agent runtimes. It does not contain VibeRaven backend logic and does not bypass VibeRaven login or scan quotas.
10
10
 
11
- The MCP server wraps the stable CLI package: `npx -y viberaven`.
12
-
13
- For agent-mode artifacts, use `npx -y viberaven --agent-mode`.
11
+ The MCP server wraps the stable CLI package: `npx -y viberaven`.
12
+
13
+ For agent-mode artifacts, use `npx -y viberaven --agent-mode`.
14
14
 
15
15
  ## Run
16
16
 
@@ -26,13 +26,57 @@ __export(cli_runner_exports, {
26
26
  buildHealArgs: () => buildHealArgs,
27
27
  buildNpxCommand: () => buildNpxCommand,
28
28
  buildToolArgs: () => buildToolArgs,
29
+ cliChildEnv: () => cliChildEnv,
30
+ cliNpxArgs: () => cliNpxArgs,
31
+ cliPackageSpec: () => cliPackageSpec,
32
+ mcpVersion: () => mcpVersion,
29
33
  resolveCwd: () => resolveCwd,
30
34
  runVibeRaven: () => runVibeRaven,
31
35
  safeStringArg: () => safeStringArg
32
36
  });
33
37
  module.exports = __toCommonJS(cli_runner_exports);
34
38
  var import_node_child_process = require("node:child_process");
39
+ var import_node_fs = require("node:fs");
40
+ var import_node_path = require("node:path");
35
41
  var CLI_PACKAGE = "@viberaven/cli";
42
+ var MCP_PACKAGE = "@viberaven/mcp";
43
+ var PLAIN_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
44
+ var cachedVersion;
45
+ function mcpVersion() {
46
+ if (cachedVersion) return cachedVersion;
47
+ let found;
48
+ for (let dir = __dirname, depth = 0; depth < 4 && !found; depth += 1, dir = (0, import_node_path.dirname)(dir)) {
49
+ try {
50
+ const manifest = JSON.parse((0, import_node_fs.readFileSync)((0, import_node_path.join)(dir, "package.json"), "utf8"));
51
+ if (manifest.name === MCP_PACKAGE && typeof manifest.version === "string") found = manifest.version;
52
+ } catch {
53
+ }
54
+ }
55
+ found ??= true ? "1.5.0" : void 0;
56
+ if (!found || !PLAIN_VERSION.test(found)) {
57
+ throw new Error(`Could not read a valid ${MCP_PACKAGE} version (got ${JSON.stringify(found)}), so the matching ${CLI_PACKAGE} cannot be pinned.`);
58
+ }
59
+ cachedVersion = found;
60
+ return found;
61
+ }
62
+ function cliPackageSpec() {
63
+ return `${CLI_PACKAGE}@${mcpVersion()}`;
64
+ }
65
+ var CLI_BIN = "viberaven";
66
+ function cliNpxArgs(args) {
67
+ return ["-y", `--package=${cliPackageSpec()}`, "--", CLI_BIN, ...args];
68
+ }
69
+ var KEPT_NPM_CONFIG = /^(?:registry|.+:registry|proxy|https?_proxy|no_?proxy|cafile|ca|cert|key|strict_ssl|cache|offline|prefer_offline|prefer_online|fetch_.+|maxsockets|always_auth|_auth|_authtoken|.+:_auth|.+:_authtoken)$/;
70
+ function cliChildEnv(env = process.env) {
71
+ const out = {};
72
+ for (const [key, value] of Object.entries(env)) {
73
+ const lower = key.toLowerCase();
74
+ if (lower.startsWith("npm_package_") || lower.startsWith("npm_lifecycle_")) continue;
75
+ if (lower.startsWith("npm_config_") && !KEPT_NPM_CONFIG.test(lower.slice("npm_config_".length))) continue;
76
+ out[key] = value;
77
+ }
78
+ return out;
79
+ }
36
80
  var spawnFn = import_node_child_process.spawn;
37
81
  function __setSpawnForTest(fn) {
38
82
  spawnFn = fn;
@@ -113,11 +157,17 @@ function buildToolArgs(name, args) {
113
157
  }
114
158
  }
115
159
  function runVibeRaven(args, cwd) {
160
+ let npxArgs;
161
+ try {
162
+ npxArgs = cliNpxArgs(args);
163
+ } catch (error) {
164
+ return Promise.resolve(`ERROR: ${error instanceof Error ? error.message : String(error)}`);
165
+ }
116
166
  return new Promise((resolve) => {
117
- const built = buildNpxCommand(["-y", CLI_PACKAGE, ...args]);
167
+ const built = buildNpxCommand(npxArgs);
118
168
  const child = spawnFn(built.command, built.args, {
119
169
  cwd: resolveCwd(cwd),
120
- env: process.env,
170
+ env: cliChildEnv(),
121
171
  shell: built.shell,
122
172
  stdio: ["ignore", "pipe", "pipe"]
123
173
  });
@@ -144,6 +194,10 @@ ${combined}` : ""}`);
144
194
  buildHealArgs,
145
195
  buildNpxCommand,
146
196
  buildToolArgs,
197
+ cliChildEnv,
198
+ cliNpxArgs,
199
+ cliPackageSpec,
200
+ mcpVersion,
147
201
  resolveCwd,
148
202
  runVibeRaven,
149
203
  safeStringArg
package/dist/server.js CHANGED
@@ -175,7 +175,47 @@ var npmTools = [
175
175
 
176
176
  // src/lib/cli-runner.ts
177
177
  var import_node_child_process = require("node:child_process");
178
+ var import_node_fs = require("node:fs");
179
+ var import_node_path = require("node:path");
178
180
  var CLI_PACKAGE = "@viberaven/cli";
181
+ var MCP_PACKAGE = "@viberaven/mcp";
182
+ var PLAIN_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
183
+ var cachedVersion;
184
+ function mcpVersion() {
185
+ if (cachedVersion) return cachedVersion;
186
+ let found;
187
+ for (let dir = __dirname, depth = 0; depth < 4 && !found; depth += 1, dir = (0, import_node_path.dirname)(dir)) {
188
+ try {
189
+ const manifest = JSON.parse((0, import_node_fs.readFileSync)((0, import_node_path.join)(dir, "package.json"), "utf8"));
190
+ if (manifest.name === MCP_PACKAGE && typeof manifest.version === "string") found = manifest.version;
191
+ } catch {
192
+ }
193
+ }
194
+ found ??= true ? "1.5.0" : void 0;
195
+ if (!found || !PLAIN_VERSION.test(found)) {
196
+ throw new Error(`Could not read a valid ${MCP_PACKAGE} version (got ${JSON.stringify(found)}), so the matching ${CLI_PACKAGE} cannot be pinned.`);
197
+ }
198
+ cachedVersion = found;
199
+ return found;
200
+ }
201
+ function cliPackageSpec() {
202
+ return `${CLI_PACKAGE}@${mcpVersion()}`;
203
+ }
204
+ var CLI_BIN = "viberaven";
205
+ function cliNpxArgs(args) {
206
+ return ["-y", `--package=${cliPackageSpec()}`, "--", CLI_BIN, ...args];
207
+ }
208
+ var KEPT_NPM_CONFIG = /^(?:registry|.+:registry|proxy|https?_proxy|no_?proxy|cafile|ca|cert|key|strict_ssl|cache|offline|prefer_offline|prefer_online|fetch_.+|maxsockets|always_auth|_auth|_authtoken|.+:_auth|.+:_authtoken)$/;
209
+ function cliChildEnv(env = process.env) {
210
+ const out = {};
211
+ for (const [key, value] of Object.entries(env)) {
212
+ const lower = key.toLowerCase();
213
+ if (lower.startsWith("npm_package_") || lower.startsWith("npm_lifecycle_")) continue;
214
+ if (lower.startsWith("npm_config_") && !KEPT_NPM_CONFIG.test(lower.slice("npm_config_".length))) continue;
215
+ out[key] = value;
216
+ }
217
+ return out;
218
+ }
179
219
  var spawnFn = import_node_child_process.spawn;
180
220
  function safeStringArg(value, label) {
181
221
  if (typeof value !== "string") throw new Error(`Invalid ${label}: expected string`);
@@ -250,11 +290,17 @@ function buildToolArgs(name, args) {
250
290
  }
251
291
  }
252
292
  function runVibeRaven(args, cwd) {
293
+ let npxArgs;
294
+ try {
295
+ npxArgs = cliNpxArgs(args);
296
+ } catch (error) {
297
+ return Promise.resolve(`ERROR: ${error instanceof Error ? error.message : String(error)}`);
298
+ }
253
299
  return new Promise((resolve) => {
254
- const built = buildNpxCommand(["-y", CLI_PACKAGE, ...args]);
300
+ const built = buildNpxCommand(npxArgs);
255
301
  const child = spawnFn(built.command, built.args, {
256
302
  cwd: resolveCwd(cwd),
257
- env: process.env,
303
+ env: cliChildEnv(),
258
304
  shell: built.shell,
259
305
  stdio: ["ignore", "pipe", "pipe"]
260
306
  });
@@ -315,7 +361,7 @@ async function handleRequest(method, params) {
315
361
  }
316
362
 
317
363
  // src/server.ts
318
- var SERVER_INFO = { name: "viberaven-mcp", version: "1.4.3" };
364
+ var SERVER_INFO = { name: "viberaven-mcp", version: "1.5.0" };
319
365
  var server = new import_server.Server(SERVER_INFO, { capabilities: { tools: {} } });
320
366
  server.setRequestHandler(
321
367
  import_types.ListToolsRequestSchema,
@@ -176,7 +176,47 @@ var npmTools = [
176
176
 
177
177
  // src/lib/cli-runner.ts
178
178
  var import_node_child_process = require("node:child_process");
179
+ var import_node_fs = require("node:fs");
180
+ var import_node_path = require("node:path");
179
181
  var CLI_PACKAGE = "@viberaven/cli";
182
+ var MCP_PACKAGE = "@viberaven/mcp";
183
+ var PLAIN_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
184
+ var cachedVersion;
185
+ function mcpVersion() {
186
+ if (cachedVersion) return cachedVersion;
187
+ let found;
188
+ for (let dir = __dirname, depth = 0; depth < 4 && !found; depth += 1, dir = (0, import_node_path.dirname)(dir)) {
189
+ try {
190
+ const manifest = JSON.parse((0, import_node_fs.readFileSync)((0, import_node_path.join)(dir, "package.json"), "utf8"));
191
+ if (manifest.name === MCP_PACKAGE && typeof manifest.version === "string") found = manifest.version;
192
+ } catch {
193
+ }
194
+ }
195
+ found ??= true ? "1.5.0" : void 0;
196
+ if (!found || !PLAIN_VERSION.test(found)) {
197
+ throw new Error(`Could not read a valid ${MCP_PACKAGE} version (got ${JSON.stringify(found)}), so the matching ${CLI_PACKAGE} cannot be pinned.`);
198
+ }
199
+ cachedVersion = found;
200
+ return found;
201
+ }
202
+ function cliPackageSpec() {
203
+ return `${CLI_PACKAGE}@${mcpVersion()}`;
204
+ }
205
+ var CLI_BIN = "viberaven";
206
+ function cliNpxArgs(args) {
207
+ return ["-y", `--package=${cliPackageSpec()}`, "--", CLI_BIN, ...args];
208
+ }
209
+ var KEPT_NPM_CONFIG = /^(?:registry|.+:registry|proxy|https?_proxy|no_?proxy|cafile|ca|cert|key|strict_ssl|cache|offline|prefer_offline|prefer_online|fetch_.+|maxsockets|always_auth|_auth|_authtoken|.+:_auth|.+:_authtoken)$/;
210
+ function cliChildEnv(env = process.env) {
211
+ const out = {};
212
+ for (const [key, value] of Object.entries(env)) {
213
+ const lower = key.toLowerCase();
214
+ if (lower.startsWith("npm_package_") || lower.startsWith("npm_lifecycle_")) continue;
215
+ if (lower.startsWith("npm_config_") && !KEPT_NPM_CONFIG.test(lower.slice("npm_config_".length))) continue;
216
+ out[key] = value;
217
+ }
218
+ return out;
219
+ }
180
220
  var spawnFn = import_node_child_process.spawn;
181
221
  function __setSpawnForTest(fn) {
182
222
  spawnFn = fn;
@@ -257,11 +297,17 @@ function buildToolArgs(name, args) {
257
297
  }
258
298
  }
259
299
  function runVibeRaven(args, cwd) {
300
+ let npxArgs;
301
+ try {
302
+ npxArgs = cliNpxArgs(args);
303
+ } catch (error) {
304
+ return Promise.resolve(`ERROR: ${error instanceof Error ? error.message : String(error)}`);
305
+ }
260
306
  return new Promise((resolve) => {
261
- const built = buildNpxCommand(["-y", CLI_PACKAGE, ...args]);
307
+ const built = buildNpxCommand(npxArgs);
262
308
  const child = spawnFn(built.command, built.args, {
263
309
  cwd: resolveCwd(cwd),
264
- env: process.env,
310
+ env: cliChildEnv(),
265
311
  shell: built.shell,
266
312
  stdio: ["ignore", "pipe", "pipe"]
267
313
  });
package/package.json CHANGED
@@ -1,56 +1,56 @@
1
- {
2
- "name": "@viberaven/mcp",
3
- "version": "1.4.3",
4
- "description": "MCP server for VibeRaven production-readiness: check_readiness, verify, heal, audit, and strict gate tools for Cursor, Claude Code, and Codex.",
5
- "license": "MIT",
6
- "author": "VibeRaven",
7
- "mcpName": "io.github.ohad6k/viberaven",
8
- "homepage": "https://viberaven.dev/mcp.md",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/ohad6k/VibeRaven.git",
12
- "directory": "packages/mcp"
13
- },
14
- "bugs": {
15
- "url": "https://github.com/ohad6k/VibeRaven/issues"
16
- },
17
- "keywords": [
18
- "viberaven",
19
- "mcp",
20
- "claude-code",
21
- "codex",
22
- "cursor",
23
- "launch-readiness",
24
- "production"
25
- ],
26
- "publishConfig": {
27
- "access": "public",
28
- "tag": "latest"
29
- },
30
- "bin": {
31
- "viberaven-mcp": "dist/server.js"
32
- },
33
- "files": [
34
- "dist",
35
- "README.md"
36
- ],
37
- "engines": {
38
- "node": ">=20"
39
- },
40
- "scripts": {
41
- "build": "node scripts/build.mjs",
42
- "typecheck": "tsc -p tsconfig.json --noEmit",
43
- "presmoke": "npm run build",
44
- "smoke": "node scripts/smoke.mjs",
45
- "pretest": "npm run build",
46
- "test": "vitest run"
47
- },
48
- "dependencies": {
49
- "@modelcontextprotocol/sdk": "^1.0.0"
50
- },
51
- "devDependencies": {
52
- "esbuild": "^0.25.0",
53
- "typescript": "^5.8.0",
54
- "vitest": "^3.2.0"
55
- }
56
- }
1
+ {
2
+ "name": "@viberaven/mcp",
3
+ "version": "1.5.0",
4
+ "description": "MCP server for VibeRaven production-readiness: check_readiness, verify, heal, audit, and strict gate tools for Cursor, Claude Code, and Codex.",
5
+ "license": "MIT",
6
+ "author": "VibeRaven",
7
+ "mcpName": "io.github.ohad6k/viberaven",
8
+ "homepage": "https://viberaven.dev/mcp.md",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/ohad6k/VibeRaven.git",
12
+ "directory": "packages/mcp"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/ohad6k/VibeRaven/issues"
16
+ },
17
+ "keywords": [
18
+ "viberaven",
19
+ "mcp",
20
+ "claude-code",
21
+ "codex",
22
+ "cursor",
23
+ "launch-readiness",
24
+ "production"
25
+ ],
26
+ "publishConfig": {
27
+ "access": "public",
28
+ "tag": "latest"
29
+ },
30
+ "bin": {
31
+ "viberaven-mcp": "dist/server.js"
32
+ },
33
+ "files": [
34
+ "dist",
35
+ "README.md"
36
+ ],
37
+ "engines": {
38
+ "node": ">=20"
39
+ },
40
+ "scripts": {
41
+ "build": "node scripts/build.mjs",
42
+ "typecheck": "tsc -p tsconfig.json --noEmit",
43
+ "presmoke": "npm run build",
44
+ "smoke": "node scripts/smoke.mjs",
45
+ "pretest": "npm run build",
46
+ "test": "vitest run"
47
+ },
48
+ "dependencies": {
49
+ "@modelcontextprotocol/sdk": "^1.0.0"
50
+ },
51
+ "devDependencies": {
52
+ "esbuild": "^0.25.0",
53
+ "typescript": "^5.8.0",
54
+ "vitest": "^3.2.0"
55
+ }
56
+ }