Files
ruflo/v3/@claude-flow/cli/package.json
T
Reuven d5dbfa4b92 fix(hooks): #2017 — defensive pre-bash + new CI gate against silent-swallow shape
The pre-bash PreToolUse hook in .claude/helpers/hook-handler.cjs is a
security gate that refuses dangerous commands. In 3.6.30 it read the
wrong stdin field (`toolInput` object instead of `toolInput.command`
string), `.toLowerCase()` threw TypeError, the global safety-timer
try/catch swallowed it, and the handler printed misleading
"[OK] Command validated" while exiting 0 — letting `rm -rf /` through.

The bind-the-string fix already landed in alpha.39 via #1944. This
commit adds:

1. Belt-and-suspenders defensive coding — wrap with String(... || '')
   so any future regression that re-binds command to null/undefined/an
   object can no longer throw and silently exit 0.

2. New dedicated CI job `pre-bash-hook-smoke` (#2017) that drives real
   Claude-Code-shaped PreToolUse JSON into BOTH handler copies and
   fails on any of:
     - dangerous command + exit 0 (the security bypass)
     - "[OK] Command validated" on a dangerous input (misleading log)
     - "[WARN] Hook X encountered an error" anywhere (silent-swallow)
   Wired into witness-verify's needs:, so the gate now blocks publish.

3. Path filters extended: '**/.claude/helpers/hook-handler.cjs' triggers
   the smoke whenever either handler copy changes.

Cases covered: dangerous rm -rf /, fork-bomb, format c:, null command
field (defensive), empty payload, snake_case tool_input.command shape
(the exact #2017 reproduction), innocuous ls -la.

Ships as 3.7.0-alpha.40 to all three packages.
2026-05-15 22:29:21 -04:00

131 lines
3.7 KiB
JSON

{
"name": "@claude-flow/cli",
"version": "3.7.0-alpha.40",
"type": "module",
"description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"sideEffects": false,
"bin": {
"cli": "./bin/cli.js",
"claude-flow": "./bin/cli.js",
"claude-flow-mcp": "./bin/mcp-server.js"
},
"homepage": "https://github.com/ruvnet/claude-flow#readme",
"bugs": {
"url": "https://github.com/ruvnet/claude-flow/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/ruvnet/claude-flow.git",
"directory": "v3/@claude-flow/cli"
},
"keywords": [
"claude",
"claude-code",
"anthropic",
"ai-agents",
"multi-agent",
"swarm",
"mcp",
"model-context-protocol",
"llm",
"cli",
"orchestration",
"automation",
"developer-tools",
"coding-assistant",
"vector-database",
"embeddings",
"self-learning",
"enterprise"
],
"author": {
"name": "RuvNet",
"email": "ruv@ruv.io",
"url": "https://ruv.io"
},
"license": "MIT",
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/src/index.js"
},
"./dist/*": "./dist/*",
"./ruvector": {
"types": "./dist/src/ruvector/index.d.ts",
"import": "./dist/src/ruvector/index.js"
},
"./ruvector/*": {
"types": "./dist/src/ruvector/*.d.ts",
"import": "./dist/src/ruvector/*.js"
},
"./mcp-tools": {
"types": "./dist/src/mcp-tools/index.d.ts",
"import": "./dist/src/mcp-tools/index.js"
},
"./memory": {
"types": "./dist/src/memory/memory-initializer.d.ts",
"import": "./dist/src/memory/memory-initializer.js"
},
"./intelligence": {
"types": "./dist/src/memory/intelligence.d.ts",
"import": "./dist/src/memory/intelligence.js"
}
},
"files": [
"dist",
"bin",
"scripts",
".claude",
"README.md"
],
"scripts": {
"build": "tsc",
"test": "vitest run",
"test:plugin-store": "npx tsx src/plugins/tests/standalone-test.ts",
"test:pattern-store": "npx tsx src/transfer/store/tests/standalone-test.ts",
"postinstall": "node ./scripts/postinstall.cjs",
"prepublishOnly": "cp ../../../README.md ./README.md",
"release": "npm version prerelease --preid=alpha && npm run publish:all",
"publish:all": "./scripts/publish.sh"
},
"devDependencies": {
"typescript": "^5.3.0",
"vitest": "^4.0.16"
},
"dependencies": {
"@claude-flow/cli-core": "^3.7.0-alpha.5",
"@claude-flow/mcp": "^3.0.0-alpha.8",
"@claude-flow/neural": "^3.0.0-alpha.8",
"@claude-flow/shared": "^3.0.0-alpha.7",
"@noble/ed25519": "^2.1.0",
"@ruvector/rabitq-wasm": "^0.1.0",
"semver": "^7.6.0",
"yaml": "^2.8.0"
},
"optionalDependencies": {
"@claude-flow/aidefence": "^3.0.2",
"@claude-flow/codex": "^3.0.0-alpha.8",
"@claude-flow/embeddings": "^3.0.0-alpha.17",
"@claude-flow/guidance": "^3.0.0-alpha.1",
"@claude-flow/memory": "^3.0.0-alpha.14",
"@claude-flow/plugin-gastown-bridge": "^0.1.3",
"@claude-flow/security": "^3.0.0-alpha.1",
"@ruvector/attention": "^0.1.32",
"@ruvector/attention-darwin-arm64": "0.1.32",
"@ruvector/diskann": "^0.1.0",
"@ruvector/learning-wasm": "^0.1.29",
"@ruvector/router": "^0.1.30",
"@ruvector/ruvllm-wasm": "^2.0.2",
"@ruvector/rvagent-wasm": "^0.1.0",
"@ruvector/sona": "^0.1.6",
"agentdb": "^3.0.0-alpha.13",
"agentic-flow": "^3.0.0-alpha.1"
},
"publishConfig": {
"access": "public",
"tag": "latest"
}
}