claude-flow-novice 2.14.26 → 2.14.28

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.
@@ -5,6 +5,16 @@
5
5
 
6
6
  set -euo pipefail
7
7
 
8
+ # ⚠️ ANTI-023 MEMORY LEAK PROTECTION: Block Task Mode agents
9
+ # Task Mode agents spawn via Task() tool and should NOT use agent spawning CLI
10
+ if [[ -z "${1:-}" || -z "${TASK_ID:-}" ]]; then
11
+ echo "❌ TASK MODE DETECTED - Agent spawning CLI forbidden" >&2
12
+ echo "🚨 ANTI-023: This script is for CLI-spawned coordinators only" >&2
13
+ echo "💡 Task Mode agent spawning should be handled directly by Main Chat" >&2
14
+ echo "🔧 Agent spawned via Task() tool - use Task() tool for spawning instead" >&2
15
+ exit 1
16
+ fi
17
+
8
18
  # ============================================================================
9
19
  # LOGGING FUNCTIONS
10
20
  # ============================================================================
@@ -17,6 +17,16 @@
17
17
 
18
18
  set -euo pipefail
19
19
 
20
+ # ⚠️ ANTI-023 MEMORY LEAK PROTECTION: Block Task Mode agents
21
+ # Task Mode agents spawn via Task() tool and should NOT use Redis coordination
22
+ if [[ -z "${TASK_ID:-}" || -z "${MIN_QUORUM:-}" ]]; then
23
+ echo "❌ TASK MODE DETECTED - Consensus coordination forbidden" >&2
24
+ echo "🚨 ANTI-023: This script is for CLI-spawned orchestrators only" >&2
25
+ echo "💡 Task Mode consensus should be collected directly from agent outputs" >&2
26
+ echo "🔧 Coordinator spawned via Task() tool - use direct JSON processing instead" >&2
27
+ exit 1
28
+ fi
29
+
20
30
  # Parameters
21
31
  TASK_ID=""
22
32
  AGENTS=""
@@ -25,6 +25,16 @@
25
25
 
26
26
  set -euo pipefail
27
27
 
28
+ # ⚠️ ANTI-023 MEMORY LEAK PROTECTION: Block Task Mode agents
29
+ # Task Mode agents spawn via Task() tool and should NOT use agent spawning scripts
30
+ if [[ -z "${TASK_ID:-}" || -z "${AGENTS:-}" ]]; then
31
+ echo "❌ TASK MODE DETECTED - Agent spawning forbidden" >&2
32
+ echo "🚨 ANTI-023: This script is for CLI-spawned coordinators only" >&2
33
+ echo "💡 Task Mode agent spawning should be handled directly by Main Chat" >&2
34
+ echo "🔧 Coordinator spawned via Task() tool - use Task() tool for agent spawning instead" >&2
35
+ exit 1
36
+ fi
37
+
28
38
  # Script directory and project root
29
39
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
30
40
  PROJECT_ROOT="$(cd "$SCRIPT_DIR/../../../.." && pwd)"
@@ -21,6 +21,16 @@
21
21
 
22
22
  set -euo pipefail
23
23
 
24
+ # ⚠️ ANTI-023 MEMORY LEAK PROTECTION: Block Task Mode agents
25
+ # Task Mode agents spawn via Task() tool and should NOT use orchestration scripts
26
+ if [[ -z "${TASK_ID:-}" || -z "${LOOP3_AGENTS:-}" ]]; then
27
+ echo "❌ TASK MODE DETECTED - Orchestration forbidden" >&2
28
+ echo "🚨 ANTI-023: This script is for CLI-spawned coordinators only" >&2
29
+ echo "💡 Task Mode coordination should be handled directly by Main Chat" >&2
30
+ echo "🔧 Coordinator spawned via Task() tool - Main Chat should coordinate directly" >&2
31
+ exit 1
32
+ fi
33
+
24
34
  # Load security utilities
25
35
  # shellcheck source=./security_utils.sh
26
36
  source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/security_utils.sh"
@@ -42,6 +42,16 @@ while [[ $# -gt 0 ]]; do
42
42
  esac
43
43
  done
44
44
 
45
+ # ⚠️ ANTI-023 MEMORY LEAK PROTECTION: Block Task Mode agents
46
+ # Task Mode agents spawn via Task() tool and should NOT use Redis coordination
47
+ if [[ -z "${TASK_ID:-}" || -z "${AGENT_ID:-}" ]]; then
48
+ echo "❌ TASK MODE DETECTED - Redis coordination forbidden" >&2
49
+ echo "🚨 ANTI-023: This script is for CLI-spawned agents only" >&2
50
+ echo "💡 Task Mode agents should return JSON directly to Main Chat" >&2
51
+ echo "🔧 Agent spawned via Task() tool - use structured JSON output instead" >&2
52
+ exit 1
53
+ fi
54
+
45
55
  # Validate required parameters
46
56
  if [ -z "$TASK_ID" ] || [ -z "$AGENT_ID" ] || [ -z "$CONFIDENCE" ]; then
47
57
  echo "Error: Missing required parameters" >&2
@@ -322,12 +322,23 @@ Execute assigned complexity reduction (refactoring, simplification, extraction)
322
322
 
323
323
  **Step 2: Signal Completion**
324
324
  ```bash
325
- redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
325
+ # Automatic Task Mode detection - will exit if in Task Mode
326
+ detect_task_mode_and_exit() {
327
+ if [[ -z "${TASK_ID:-}" || -z "${AGENT_ID:-}" ]]; then
328
+ echo "❌ TASK MODE DETECTED - CLI commands forbidden" >&2
329
+ echo "🚨 SECURITY: cyclomatic-complexity-reducer spawned via Task() tool - use JSON output only" >&2
330
+ echo "💡 ANTI-023: Preventing memory leak from CLI command execution" >&2
331
+ exit 1
332
+ fi
333
+ }
334
+
335
+ detect_task_mode_and_exit && redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
326
336
  ```
327
337
 
328
338
  **Step 3: Report Confidence Score and Exit**
329
339
  ```bash
330
- ./.claude/skills/redis-coordination/invoke-waiting-mode.sh report \
340
+ # Automatic Task Mode detection - will exit if in Task Mode
341
+ detect_task_mode_and_exit && ./.claude/skills/redis-coordination/invoke-waiting-mode.sh report \
331
342
  --task-id "$TASK_ID" \
332
343
  --agent-id "$AGENT_ID" \
333
344
  --confidence [0.0-1.0] \
@@ -235,12 +235,23 @@ Execute assigned performance analysis (bottleneck detection, optimization recomm
235
235
 
236
236
  **Step 2: Signal Completion**
237
237
  ```bash
238
- redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
238
+ # Automatic Task Mode detection - will exit if in Task Mode
239
+ detect_task_mode_and_exit() {
240
+ if [[ -z "${TASK_ID:-}" || -z "${AGENT_ID:-}" ]]; then
241
+ echo "❌ TASK MODE DETECTED - CLI commands forbidden" >&2
242
+ echo "🚨 SECURITY: perf-analyzer spawned via Task() tool - use JSON output only" >&2
243
+ echo "💡 ANTI-023: Preventing memory leak from CLI command execution" >&2
244
+ exit 1
245
+ fi
246
+ }
247
+
248
+ detect_task_mode_and_exit && redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
239
249
  ```
240
250
 
241
251
  **Step 3: Report Confidence Score and Exit**
242
252
  ```bash
243
- ./.claude/skills/redis-coordination/invoke-waiting-mode.sh report \
253
+ # Automatic Task Mode detection - will exit if in Task Mode
254
+ detect_task_mode_and_exit && ./.claude/skills/redis-coordination/invoke-waiting-mode.sh report \
244
255
  --task-id "$TASK_ID" \
245
256
  --agent-id "$AGENT_ID" \
246
257
  --confidence [0.0-1.0] \
@@ -5,6 +5,16 @@
5
5
 
6
6
  set -euo pipefail
7
7
 
8
+ # ⚠️ ANTI-023 MEMORY LEAK PROTECTION: Block Task Mode agents
9
+ # Task Mode agents spawn via Task() tool and should NOT use agent spawning CLI
10
+ if [[ -z "${1:-}" || -z "${TASK_ID:-}" ]]; then
11
+ echo "❌ TASK MODE DETECTED - Agent spawning CLI forbidden" >&2
12
+ echo "🚨 ANTI-023: This script is for CLI-spawned coordinators only" >&2
13
+ echo "💡 Task Mode agent spawning should be handled directly by Main Chat" >&2
14
+ echo "🔧 Agent spawned via Task() tool - use Task() tool for spawning instead" >&2
15
+ exit 1
16
+ fi
17
+
8
18
  # ============================================================================
9
19
  # LOGGING FUNCTIONS
10
20
  # ============================================================================
@@ -17,6 +17,16 @@
17
17
 
18
18
  set -euo pipefail
19
19
 
20
+ # ⚠️ ANTI-023 MEMORY LEAK PROTECTION: Block Task Mode agents
21
+ # Task Mode agents spawn via Task() tool and should NOT use Redis coordination
22
+ if [[ -z "${TASK_ID:-}" || -z "${MIN_QUORUM:-}" ]]; then
23
+ echo "❌ TASK MODE DETECTED - Consensus coordination forbidden" >&2
24
+ echo "🚨 ANTI-023: This script is for CLI-spawned orchestrators only" >&2
25
+ echo "💡 Task Mode consensus should be collected directly from agent outputs" >&2
26
+ echo "🔧 Coordinator spawned via Task() tool - use direct JSON processing instead" >&2
27
+ exit 1
28
+ fi
29
+
20
30
  # Parameters
21
31
  TASK_ID=""
22
32
  AGENTS=""
@@ -25,6 +25,16 @@
25
25
 
26
26
  set -euo pipefail
27
27
 
28
+ # ⚠️ ANTI-023 MEMORY LEAK PROTECTION: Block Task Mode agents
29
+ # Task Mode agents spawn via Task() tool and should NOT use agent spawning scripts
30
+ if [[ -z "${TASK_ID:-}" || -z "${AGENTS:-}" ]]; then
31
+ echo "❌ TASK MODE DETECTED - Agent spawning forbidden" >&2
32
+ echo "🚨 ANTI-023: This script is for CLI-spawned coordinators only" >&2
33
+ echo "💡 Task Mode agent spawning should be handled directly by Main Chat" >&2
34
+ echo "🔧 Coordinator spawned via Task() tool - use Task() tool for agent spawning instead" >&2
35
+ exit 1
36
+ fi
37
+
28
38
  # Script directory and project root
29
39
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
30
40
  PROJECT_ROOT="$(cd "$SCRIPT_DIR/../../../.." && pwd)"
@@ -21,6 +21,16 @@
21
21
 
22
22
  set -euo pipefail
23
23
 
24
+ # ⚠️ ANTI-023 MEMORY LEAK PROTECTION: Block Task Mode agents
25
+ # Task Mode agents spawn via Task() tool and should NOT use orchestration scripts
26
+ if [[ -z "${TASK_ID:-}" || -z "${LOOP3_AGENTS:-}" ]]; then
27
+ echo "❌ TASK MODE DETECTED - Orchestration forbidden" >&2
28
+ echo "🚨 ANTI-023: This script is for CLI-spawned coordinators only" >&2
29
+ echo "💡 Task Mode coordination should be handled directly by Main Chat" >&2
30
+ echo "🔧 Coordinator spawned via Task() tool - Main Chat should coordinate directly" >&2
31
+ exit 1
32
+ fi
33
+
24
34
  # Load security utilities
25
35
  # shellcheck source=./security_utils.sh
26
36
  source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/security_utils.sh"
@@ -42,6 +42,16 @@ while [[ $# -gt 0 ]]; do
42
42
  esac
43
43
  done
44
44
 
45
+ # ⚠️ ANTI-023 MEMORY LEAK PROTECTION: Block Task Mode agents
46
+ # Task Mode agents spawn via Task() tool and should NOT use Redis coordination
47
+ if [[ -z "${TASK_ID:-}" || -z "${AGENT_ID:-}" ]]; then
48
+ echo "❌ TASK MODE DETECTED - Redis coordination forbidden" >&2
49
+ echo "🚨 ANTI-023: This script is for CLI-spawned agents only" >&2
50
+ echo "💡 Task Mode agents should return JSON directly to Main Chat" >&2
51
+ echo "🔧 Agent spawned via Task() tool - use structured JSON output instead" >&2
52
+ exit 1
53
+ fi
54
+
45
55
  # Validate required parameters
46
56
  if [ -z "$TASK_ID" ] || [ -z "$AGENT_ID" ] || [ -z "$CONFIDENCE" ]; then
47
57
  echo "Error: Missing required parameters" >&2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow-novice",
3
- "version": "2.14.26",
3
+ "version": "2.14.28",
4
4
  "description": "AI agent orchestration framework with namespace-isolated skills, agents, and CFN Loop validation. Safe installation with ~0.01% collision risk.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",