guardvibe 3.0.29 → 3.0.31

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/build/cli/hook.js CHANGED
@@ -11,7 +11,7 @@ const HOOK_SCRIPT = `#!/bin/sh
11
11
  echo "🔒 GuardVibe: scanning staged files..."
12
12
 
13
13
  # Run guardvibe scan on staged files
14
- RESULT=$(npx -y guardvibe scan --staged 2>&1)
14
+ RESULT=$(npx -y guardvibe@latest scan --staged 2>&1)
15
15
  EXIT_CODE=$?
16
16
 
17
17
  if [ $EXIT_CODE -ne 0 ]; then
package/build/cli/init.js CHANGED
@@ -2,12 +2,17 @@
2
2
  * CLI: guardvibe init <platform>
3
3
  * Sets up MCP server configuration for AI coding hosts.
4
4
  */
5
+ import { createRequire } from "module";
5
6
  import { readFileSync, writeFileSync, mkdirSync, existsSync } from "fs";
6
7
  import { join, dirname } from "path";
7
8
  import { homedir } from "os";
9
+ const require = createRequire(import.meta.url);
10
+ const pkg = require("../../package.json");
11
+ // Pin to the version that ran `init` for fast, deterministic startup.
12
+ // Users upgrade by re-running init. Avoids slow npx-cache misses on each session start.
8
13
  const GUARDVIBE_MCP_CONFIG = {
9
14
  command: "npx",
10
- args: ["-y", "guardvibe"],
15
+ args: ["-y", `guardvibe@${pkg.version}`],
11
16
  };
12
17
  const platforms = {
13
18
  claude: {
@@ -98,7 +103,7 @@ function setupClaudeGuide() {
98
103
  matcher: "Edit|Write",
99
104
  hooks: [{
100
105
  type: "command",
101
- command: "jq -r '.tool_input.file_path' | xargs npx -y guardvibe check --format buddy 2>/dev/null || true"
106
+ command: "jq -r '.tool_input.file_path' | xargs npx -y guardvibe@latest check --format buddy 2>/dev/null || true"
102
107
  }]
103
108
  }
104
109
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guardvibe",
3
- "version": "3.0.29",
3
+ "version": "3.0.31",
4
4
  "mcpName": "io.github.goklab/guardvibe",
5
5
  "description": "Security MCP for vibe coding. 365 rules, 36 tools, CLI + doctor. Host security, auth coverage mapping, LLM-powered deep scan (IDOR/business logic), taint analysis. Plus Next.js, Supabase, Clerk, Stripe, Prisma, tRPC, Hono, GraphQL, Convex, Turso, Uploadthing, AI SDK, and the full AI-generated stack.",
6
6
  "type": "module",