claude-flow-novice 2.14.34 → 2.14.36

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.
Files changed (42) hide show
  1. package/.claude/commands/CFN_LOOP_TASK_MODE.md +1 -1
  2. package/.claude/commands/switch-api.md +1 -1
  3. package/.claude/skills/cfn-agent-discovery/agents-registry.json +1 -1
  4. package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +2 -1
  5. package/.claude/skills/cfn-loop-validation/config.json +2 -2
  6. package/.claude/skills/cfn-redis-coordination/invoke-waiting-mode.sh +221 -0
  7. package/claude-assets/agents/README-AGENT_LIFECYCLE.md +37 -10
  8. package/claude-assets/agents/README-VALIDATION.md +0 -8
  9. package/claude-assets/agents/cfn-dev-team/README.md +0 -8
  10. package/claude-assets/agents/cfn-dev-team/coordinators/README.md +1 -9
  11. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +565 -565
  12. package/claude-assets/agents/cfn-dev-team/developers/README.md +1 -9
  13. package/claude-assets/agents/cfn-dev-team/documentation/README-VALIDATION.md +0 -8
  14. package/claude-assets/agents/cfn-dev-team/documentation/agent-type-guidelines.md +0 -10
  15. package/claude-assets/agents/cfn-dev-team/reviewers/README.md +1 -9
  16. package/claude-assets/agents/cfn-dev-team/reviewers/quality/quality-metrics.md +0 -10
  17. package/claude-assets/agents/cfn-dev-team/test-agent.md +0 -10
  18. package/claude-assets/agents/cfn-dev-team/testers/README.md +1 -9
  19. package/claude-assets/agents/csuite/cto-agent.md +0 -10
  20. package/claude-assets/agents/custom/cfn-system-expert.md +1 -128
  21. package/claude-assets/agents/docker-coordinators/cfn-docker-v3-coordinator.md +1 -5
  22. package/claude-assets/agents/docker-team/csuite/c-suite-template.md +1 -5
  23. package/claude-assets/agents/docker-team/infrastructure/team-coordinator-template.md +1 -5
  24. package/claude-assets/agents/marketing_hybrid/cost_tracker.md +0 -10
  25. package/claude-assets/agents/marketing_hybrid/docker_deployer.md +0 -10
  26. package/claude-assets/agents/marketing_hybrid/zai_worker_spawner.md +0 -10
  27. package/claude-assets/commands/CFN_LOOP_TASK_MODE.md +1 -1
  28. package/claude-assets/commands/switch-api.md +1 -1
  29. package/claude-assets/skills/cfn-agent-discovery/agents-registry.json +1 -1
  30. package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +2 -1
  31. package/claude-assets/skills/cfn-loop-validation/config.json +2 -2
  32. package/claude-assets/skills/cfn-process-instrumentation/instrument-process.sh +324 -322
  33. package/claude-assets/skills/cfn-redis-coordination/invoke-waiting-mode.sh +221 -0
  34. package/claude-assets/skills/cfn-task-config-init/initialize-config.sh +2 -2
  35. package/claude-assets/skills/cfn-task-mode-sanitize/task-mode-env-sanitizer.sh +213 -182
  36. package/claude-assets/skills/cfn-validation-runner-instrumentation/wrapped-executor.sh +233 -271
  37. package/dist/cli/agent-definition-parser.js.map +1 -1
  38. package/dist/cli/config-manager.js +109 -91
  39. package/package.json +1 -1
  40. package/scripts/docker-build-mcp.sh +155 -0
  41. package/scripts/docker-test-mcp.sh +260 -0
  42. package/scripts/mcp-health-check.sh +123 -0
@@ -0,0 +1,123 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+
4
+ # MCP Health Check Script
5
+ # Verifies MCP server connectivity from agent containers
6
+
7
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8
+ CONFIG_FILE="${CONFIG_FILE:-/app/config/mcp-servers.json}"
9
+ MCP_TOKEN="${MCP_TOKEN:-}"
10
+
11
+ # Exit codes
12
+ EXIT_SUCCESS=0
13
+ EXIT_CONFIG_ERROR=1
14
+ EXIT_CONNECTION_ERROR=2
15
+ EXIT_AUTH_ERROR=3
16
+
17
+ # Check if config file exists
18
+ if [ ! -f "$CONFIG_FILE" ]; then
19
+ echo "ERROR: MCP configuration not found: $CONFIG_FILE"
20
+ exit $EXIT_CONFIG_ERROR
21
+ fi
22
+
23
+ # Parse config and test connectivity
24
+ if command -v jq &> /dev/null; then
25
+ # Extract server endpoints
26
+ SERVERS=$(jq -r '.servers | to_entries | .[] | "\(.key)=\(.value.endpoint)"' "$CONFIG_FILE" 2>/dev/null || echo "")
27
+
28
+ if [ -z "$SERVERS" ]; then
29
+ echo "ERROR: Failed to parse MCP server configuration"
30
+ exit $EXIT_CONFIG_ERROR
31
+ fi
32
+
33
+ TOTAL_SERVERS=0
34
+ HEALTHY_SERVERS=0
35
+ FAILED_SERVERS=()
36
+
37
+ while IFS= read -r server_line; do
38
+ [ -z "$server_line" ] && continue
39
+
40
+ SERVER_NAME="${server_line%%=*}"
41
+ SERVER_ENDPOINT="${server_line#*=}"
42
+ HEALTH_PATH=$(jq -r ".servers.\"$SERVER_NAME\".health_check" "$CONFIG_FILE" 2>/dev/null || echo "/health")
43
+ TIMEOUT=$(jq -r ".servers.\"$SERVER_NAME\".timeout_ms" "$CONFIG_FILE" 2>/dev/null || echo "30000")
44
+ TIMEOUT_SEC=$((TIMEOUT / 1000))
45
+
46
+ ((TOTAL_SERVERS++))
47
+
48
+ echo "Checking $SERVER_NAME ($SERVER_ENDPOINT$HEALTH_PATH)..."
49
+
50
+ # Construct health check URL
51
+ HEALTH_URL="${SERVER_ENDPOINT}${HEALTH_PATH}"
52
+
53
+ # Perform health check with timeout
54
+ if timeout "$TIMEOUT_SEC" curl -f -s \
55
+ ${MCP_TOKEN:+-H "X-MCP-Token: $MCP_TOKEN"} \
56
+ "$HEALTH_URL" > /dev/null 2>&1; then
57
+ echo " ✓ $SERVER_NAME is healthy"
58
+ ((HEALTHY_SERVERS++))
59
+ else
60
+ echo " ✗ $SERVER_NAME is unhealthy or unreachable"
61
+ FAILED_SERVERS+=("$SERVER_NAME")
62
+ fi
63
+ done <<< "$SERVERS"
64
+
65
+ # Summary
66
+ echo ""
67
+ echo "Health Check Summary:"
68
+ echo " Total Servers: $TOTAL_SERVERS"
69
+ echo " Healthy: $HEALTHY_SERVERS"
70
+ echo " Unhealthy: $((TOTAL_SERVERS - HEALTHY_SERVERS))"
71
+
72
+ if [ ${#FAILED_SERVERS[@]} -gt 0 ]; then
73
+ echo ""
74
+ echo "Failed Servers:"
75
+ for server in "${FAILED_SERVERS[@]}"; do
76
+ echo " - $server"
77
+ done
78
+ fi
79
+
80
+ # Exit based on health status
81
+ if [ "$HEALTHY_SERVERS" -eq "$TOTAL_SERVERS" ]; then
82
+ echo ""
83
+ echo "All MCP servers are healthy"
84
+ exit $EXIT_SUCCESS
85
+ elif [ "$HEALTHY_SERVERS" -gt 0 ]; then
86
+ echo ""
87
+ echo "WARNING: Some MCP servers are unhealthy"
88
+ exit $EXIT_CONNECTION_ERROR
89
+ else
90
+ echo ""
91
+ echo "ERROR: All MCP servers are unhealthy"
92
+ exit $EXIT_CONNECTION_ERROR
93
+ fi
94
+ else
95
+ # Fallback if jq is not available - basic curl test
96
+ echo "WARNING: jq not available - performing basic connectivity test"
97
+
98
+ # Test common MCP endpoints
99
+ MCP_ENDPOINTS=(
100
+ "http://mcp-playwright:8081/health"
101
+ "http://mcp-redis-tools:8082/health"
102
+ "http://mcp-n8n:5678/healthz"
103
+ "http://mcp-security-scanner:8084/health"
104
+ )
105
+
106
+ HEALTHY=0
107
+ for endpoint in "${MCP_ENDPOINTS[@]}"; do
108
+ if timeout 10 curl -f -s ${MCP_TOKEN:+-H "X-MCP-Token: $MCP_TOKEN"} "$endpoint" > /dev/null 2>&1; then
109
+ echo "✓ $endpoint"
110
+ ((HEALTHY++))
111
+ else
112
+ echo "✗ $endpoint"
113
+ fi
114
+ done
115
+
116
+ if [ "$HEALTHY" -gt 0 ]; then
117
+ echo "Some MCP servers are reachable ($HEALTHY/${#MCP_ENDPOINTS[@]})"
118
+ exit $EXIT_SUCCESS
119
+ else
120
+ echo "ERROR: No MCP servers are reachable"
121
+ exit $EXIT_CONNECTION_ERROR
122
+ fi
123
+ fi