fix: v2.7.12 - Move agentdb to optionalDependencies to avoid better-sqlite3 build failures

- Moved agentdb and better-sqlite3 to optionalDependencies
- Package will work in environments without build tools (Codespaces, Docker, etc.)
- AgentDB features gracefully disabled when unavailable
- Fixes npx installation errors in remote environments
This commit is contained in:
rUv committed 2025-10-25 03:47:41 +00:00
1 parent 0a2e214442
commit e3d38538b8
6 files changed
+125 -11

No files matched your search

+84
View File
@@ -22,5 +22,89 @@
"cpuLoad": 0.08375,
"platform": "linux",
"uptime": 15758.23
},
{
"timestamp": 1761363865005,
"memoryTotal": 67427540992,
"memoryUsed": 5122899968,
"memoryFree": 62304641024,
"memoryUsagePercent": 7.597637245302792,
"memoryEfficiency": 92.40236275469721,
"cpuCount": 16,
"cpuLoad": 0.11,
"platform": "linux",
"uptime": 15788.26
},
{
"timestamp": 1761363895015,
"memoryTotal": 67427540992,
"memoryUsed": 4892737536,
"memoryFree": 62534803456,
"memoryUsagePercent": 7.256289439029821,
"memoryEfficiency": 92.74371056097019,
"cpuCount": 16,
"cpuLoad": 0.185,
"platform": "linux",
"uptime": 15818.27
},
{
"timestamp": 1761363925046,
"memoryTotal": 67427540992,
"memoryUsed": 4673609728,
"memoryFree": 62753931264,
"memoryUsagePercent": 6.931306791322117,
"memoryEfficiency": 93.06869320867789,
"cpuCount": 16,
"cpuLoad": 0.115625,
"platform": "linux",
"uptime": 15848.3
},
{
"timestamp": 1761363955076,
"memoryTotal": 67427540992,
"memoryUsed": 4796198912,
"memoryFree": 62631342080,
"memoryUsagePercent": 7.113115562925613,
"memoryEfficiency": 92.88688443707439,
"cpuCount": 16,
"cpuLoad": 0.07,
"platform": "linux",
"uptime": 15878.33
},
{
"timestamp": 1761363985106,
"memoryTotal": 67427540992,
"memoryUsed": 5161082880,
"memoryFree": 62266458112,
"memoryUsagePercent": 7.654265310687129,
"memoryEfficiency": 92.34573468931288,
"cpuCount": 16,
"cpuLoad": 0.125,
"platform": "linux",
"uptime": 15908.36
},
{
"timestamp": 1761364015111,
"memoryTotal": 67427540992,
"memoryUsed": 5034360832,
"memoryFree": 62393180160,
"memoryUsagePercent": 7.466327197958036,
"memoryEfficiency": 92.53367280204196,
"cpuCount": 16,
"cpuLoad": 0.1775,
"platform": "linux",
"uptime": 15938.36
},
{
"timestamp": 1761364045111,
"memoryTotal": 67427540992,
"memoryUsed": 5043056640,
"memoryFree": 62384484352,
"memoryUsagePercent": 7.479223720465111,
"memoryEfficiency": 92.52077627953489,
"cpuCount": 16,
"cpuLoad": 0.13375,
"platform": "linux",
"uptime": 15968.36
}
]
+1 -4
View File
@@ -1,5 +1,2 @@
# Ignore optional dependency failures
optional=true
# Don't fail installation if optional dependencies fail to build
ignore-scripts=false
# Note: better-sqlite3 is in optionalDependencies and will be gracefully skipped if build fails
+1 -1
View File
@@ -1,7 +1,7 @@
#!/bin/sh
# Claude-Flow Smart Dispatcher - Detects and uses the best available runtime
VERSION="2.7.10"
VERSION="2.7.11"
# Determine the correct path based on how the script is invoked
if [ -L "$0" ]; then
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "claude-flow",
"version": "2.7.11",
"version": "2.7.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "claude-flow",
"version": "2.7.11",
"version": "2.7.12",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "claude-flow",
"version": "2.7.11",
"version": "2.7.12",
"description": "Enterprise-grade AI agent orchestration with WASM-powered ReasoningBank memory and AgentDB vector database (always uses latest agentic-flow)",
"mcpName": "io.github.ruvnet/claude-flow",
"main": "cli.mjs",
@@ -120,8 +120,6 @@
"@anthropic-ai/claude-code": "^2.0.1",
"@anthropic-ai/sdk": "^0.65.0",
"@modelcontextprotocol/sdk": "^1.0.4",
"@types/better-sqlite3": "^7.6.13",
"agentdb": "^1.3.9",
"agentic-flow": "*",
"blessed": "^0.1.81",
"chalk": "^4.1.2",
@@ -143,9 +141,11 @@
"yaml": "^2.8.0"
},
"optionalDependencies": {
"agentdb": "^1.3.9",
"better-sqlite3": "^12.2.0",
"diskusage": "^1.1.3",
"node-pty": "^1.0.0"
"node-pty": "^1.0.0",
"@types/better-sqlite3": "^7.6.13"
},
"devDependencies": {
"@babel/core": "^7.28.0",
+33
View File
@@ -0,0 +1,33 @@
#!/bin/bash
# Docker test for npx installation without build tools
set -e
echo "🐳 Testing npx claude-flow@alpha in minimal Docker environment (no build tools)..."
echo ""
# Create a minimal Dockerfile without build tools
cat > /tmp/Dockerfile.npx-test <<'EOF'
FROM node:20-alpine
# Deliberately DON'T install build tools to simulate Codespaces/remote environments
# RUN apk add --no-cache python3 make g++
# Just install basic npm
RUN npm install -g npm@latest
WORKDIR /test
# Test npx installation
CMD ["sh", "-c", "npx claude-flow@2.7.11 --version 2>&1"]
EOF
echo "Building Docker image..."
docker build -t claude-flow-npx-test -f /tmp/Dockerfile.npx-test /tmp
echo ""
echo "Running npx test..."
docker run --rm claude-flow-npx-test
echo ""
echo "✅ Docker test completed!"