claude-flow-novice 2.10.7 → 2.10.9
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/.claude/commands/cfn/CFN_LOOP_TASK_MODE.md +94 -0
- package/.claude/commands/cfn/cfn-loop.md +4 -3
- package/.claude/hooks/cfn-invoke-pre-edit.sh +88 -0
- package/.claude/skills/cfn-agent-spawning/spawn-worker.sh +176 -0
- package/claude-assets/agents/csuite/cto-agent.md +371 -0
- package/claude-assets/agents/marketing_hybrid/cost_tracker.md +13 -0
- package/claude-assets/agents/marketing_hybrid/docker_deployer.md +13 -0
- package/claude-assets/agents/marketing_hybrid/zai_worker_spawner.md +13 -0
- package/claude-assets/commands/cfn/CFN_LOOP_TASK_MODE.md +94 -0
- package/claude-assets/commands/cfn/cfn-loop.md +4 -3
- package/claude-assets/hooks/cfn-invoke-pre-edit.sh +88 -0
- package/claude-assets/hooks/post-edit.config.json +19 -8
- package/claude-assets/skills/cfn-agent-spawning/spawn-worker.sh +176 -0
- package/claude-assets/skills/pre-edit-backup/backup.sh +130 -0
- package/claude-assets/skills/pre-edit-backup/cleanup.sh +155 -0
- package/claude-assets/skills/pre-edit-backup/restore.sh +128 -0
- package/claude-assets/skills/pre-edit-backup/revert-file.sh +168 -0
- package/dist/agents/agent-loader.js +146 -165
- package/dist/agents/agent-loader.js.map +1 -1
- package/dist/cli/config-manager.js +91 -109
- package/dist/cli/config-manager.js.map +1 -1
- package/package.json +1 -1
- package/scripts/marketing_hybrid_deployment.sh +45 -0
- package/scripts/redis-prometheus-exporter.sh +33 -0
- package/scripts/track-zai-costs.sh +19 -0
- package/claude-assets/skills/team-provider-routing/spawn-worker.sh +0 -91
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
set -eu
|
|
3
|
-
|
|
4
|
-
# Load team providers configuration
|
|
5
|
-
PROVIDERS_CONFIG="/mnt/c/Users/masha/Documents/claude-flow-novice/planning/team-providers.json"
|
|
6
|
-
|
|
7
|
-
# Function to validate provider configuration
|
|
8
|
-
validate_provider_config() {
|
|
9
|
-
local team="$1"
|
|
10
|
-
local role="$2" # coordinator or workers
|
|
11
|
-
|
|
12
|
-
# Use jq to validate JSON structure and extract provider details
|
|
13
|
-
if ! jq -e ".teams.${team}.${role}" "$PROVIDERS_CONFIG" &>/dev/null; then
|
|
14
|
-
echo "Error: Invalid or missing provider configuration for team=${team}, role=${role}"
|
|
15
|
-
exit 1
|
|
16
|
-
fi
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
# Function to select appropriate model based on complexity
|
|
20
|
-
select_model() {
|
|
21
|
-
local team="$1"
|
|
22
|
-
local complexity="$2" # simple or complex
|
|
23
|
-
|
|
24
|
-
# Retrieve model based on complexity and team configuration
|
|
25
|
-
local model=$(jq -r ".teams.${team}.workers.models.${complexity}" "$PROVIDERS_CONFIG")
|
|
26
|
-
echo "$model"
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
# Main worker spawning logic
|
|
30
|
-
spawn_worker() {
|
|
31
|
-
local team="$1"
|
|
32
|
-
local complexity="${2:-simple}"
|
|
33
|
-
local provider_mode="${3:-auto}"
|
|
34
|
-
|
|
35
|
-
# Validate input parameters
|
|
36
|
-
validate_provider_config "$team" "workers"
|
|
37
|
-
|
|
38
|
-
# Retrieve provider details
|
|
39
|
-
local provider=$(jq -r ".teams.${team}.workers.provider" "$PROVIDERS_CONFIG")
|
|
40
|
-
local api_key_env=$(jq -r ".teams.${team}.workers.apiKeyEnv" "$PROVIDERS_CONFIG")
|
|
41
|
-
|
|
42
|
-
# Select model dynamically
|
|
43
|
-
local model=$(select_model "$team" "$complexity")
|
|
44
|
-
|
|
45
|
-
# Provider routing logic
|
|
46
|
-
case "$provider_mode" in
|
|
47
|
-
auto)
|
|
48
|
-
# Use provider routing rules
|
|
49
|
-
case "$provider" in
|
|
50
|
-
zai)
|
|
51
|
-
echo "Spawning Z.ai worker for team ${team} (Model: ${model})"
|
|
52
|
-
# Add Z.ai specific worker spawning logic here
|
|
53
|
-
;;
|
|
54
|
-
anthropic)
|
|
55
|
-
echo "Spawning Anthropic worker for team ${team} (Model: ${model})"
|
|
56
|
-
# Add Anthropic specific worker spawning logic here
|
|
57
|
-
;;
|
|
58
|
-
*)
|
|
59
|
-
echo "Unsupported provider: ${provider}"
|
|
60
|
-
exit 1
|
|
61
|
-
;;
|
|
62
|
-
esac
|
|
63
|
-
;;
|
|
64
|
-
zai)
|
|
65
|
-
echo "Force spawning Z.ai worker for team ${team} (Model: ${model})"
|
|
66
|
-
# Add Z.ai specific worker spawning logic here
|
|
67
|
-
;;
|
|
68
|
-
anthropic)
|
|
69
|
-
echo "Force spawning Anthropic worker for team ${team} (Model: ${model})"
|
|
70
|
-
# Add Anthropic specific worker spawning logic here
|
|
71
|
-
;;
|
|
72
|
-
*)
|
|
73
|
-
echo "Invalid provider mode: ${provider_mode}"
|
|
74
|
-
exit 1
|
|
75
|
-
;;
|
|
76
|
-
esac
|
|
77
|
-
|
|
78
|
-
# Export API key for use in spawning
|
|
79
|
-
export "${api_key_env}"
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
# Allow script to be used as a function or executed directly
|
|
83
|
-
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
|
84
|
-
# Script is being run directly
|
|
85
|
-
if [[ $# -lt 1 ]]; then
|
|
86
|
-
echo "Usage: $0 <team> [complexity] [provider_mode]"
|
|
87
|
-
exit 1
|
|
88
|
-
fi
|
|
89
|
-
|
|
90
|
-
spawn_worker "$@"
|
|
91
|
-
fi
|