claude-evolve 1.6.23 → 1.6.24
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/lib/config.py +12 -8
- package/lib/config.sh +16 -11
- package/package.json +1 -1
package/lib/config.py
CHANGED
|
@@ -11,7 +11,6 @@ class Config:
|
|
|
11
11
|
|
|
12
12
|
# Default values matching config.sh
|
|
13
13
|
DEFAULTS = {
|
|
14
|
-
'evolution_dir': 'evolution',
|
|
15
14
|
'algorithm_file': 'algorithm.py',
|
|
16
15
|
'evaluator_file': 'evaluator.py',
|
|
17
16
|
'brief_file': 'BRIEF.md',
|
|
@@ -44,18 +43,23 @@ class Config:
|
|
|
44
43
|
|
|
45
44
|
def load(self, config_path=None, working_dir=None):
|
|
46
45
|
"""Load configuration from YAML file."""
|
|
47
|
-
# Determine
|
|
46
|
+
# Determine self.working_dir (EVOLUTION_DIR equivalent) based on specified logic
|
|
47
|
+
if working_dir:
|
|
48
|
+
self.working_dir = Path(working_dir)
|
|
49
|
+
elif (Path('evolution') / 'evolution.csv').exists():
|
|
50
|
+
self.working_dir = Path('evolution')
|
|
51
|
+
elif Path('./evolution.csv').exists():
|
|
52
|
+
self.working_dir = Path('.')
|
|
53
|
+
else:
|
|
54
|
+
self.working_dir = Path('evolution') # Default
|
|
55
|
+
|
|
56
|
+
# Determine local config file path relative to self.working_dir
|
|
48
57
|
local_config_path = None
|
|
49
58
|
if config_path:
|
|
50
59
|
# Explicit config path provided, treat as local
|
|
51
60
|
local_config_path = Path(config_path)
|
|
52
|
-
elif working_dir:
|
|
53
|
-
# Look for config.yaml in working directory
|
|
54
|
-
self.working_dir = Path(working_dir)
|
|
55
|
-
local_config_path = self.working_dir / 'config.yaml'
|
|
56
61
|
else:
|
|
57
|
-
|
|
58
|
-
local_config_path = Path('evolution/config.yaml')
|
|
62
|
+
local_config_path = self.working_dir / 'config.yaml'
|
|
59
63
|
|
|
60
64
|
# Store the resolved config_path for path resolution later
|
|
61
65
|
self.config_path = local_config_path
|
package/lib/config.sh
CHANGED
|
@@ -172,8 +172,19 @@ _load_yaml_config() {
|
|
|
172
172
|
|
|
173
173
|
# Load configuration from config file
|
|
174
174
|
load_config() {
|
|
175
|
+
# Determine EVOLUTION_DIR based on specified logic
|
|
176
|
+
local user_working_dir="$1"
|
|
177
|
+
if [[ -n "$user_working_dir" ]]; then
|
|
178
|
+
EVOLUTION_DIR="$user_working_dir"
|
|
179
|
+
elif [[ -f "evolution/evolution.csv" ]]; then
|
|
180
|
+
EVOLUTION_DIR="evolution"
|
|
181
|
+
elif [[ -f "./evolution.csv" ]]; then
|
|
182
|
+
EVOLUTION_DIR="."
|
|
183
|
+
else
|
|
184
|
+
EVOLUTION_DIR="$DEFAULT_EVOLUTION_DIR"
|
|
185
|
+
fi
|
|
186
|
+
|
|
175
187
|
# Set defaults first
|
|
176
|
-
EVOLUTION_DIR="$DEFAULT_EVOLUTION_DIR"
|
|
177
188
|
ALGORITHM_FILE="$DEFAULT_ALGORITHM_FILE"
|
|
178
189
|
EVALUATOR_FILE="$DEFAULT_EVALUATOR_FILE"
|
|
179
190
|
BRIEF_FILE="$DEFAULT_BRIEF_FILE"
|
|
@@ -214,11 +225,8 @@ load_config() {
|
|
|
214
225
|
LLM_RUN="$DEFAULT_LLM_RUN"
|
|
215
226
|
LLM_IDEATE="$DEFAULT_LLM_IDEATE"
|
|
216
227
|
|
|
217
|
-
#
|
|
218
|
-
local local_config_file="
|
|
219
|
-
if [[ -n "$1" ]]; then
|
|
220
|
-
local_config_file="$1"
|
|
221
|
-
fi
|
|
228
|
+
# Determine local config file path relative to EVOLUTION_DIR
|
|
229
|
+
local local_config_file="$EVOLUTION_DIR/config.yaml"
|
|
222
230
|
|
|
223
231
|
# Load local config
|
|
224
232
|
_load_yaml_config "$local_config_file"
|
|
@@ -227,11 +235,8 @@ load_config() {
|
|
|
227
235
|
local global_config_file="$HOME/.config/claude-evolve/config.yaml"
|
|
228
236
|
_load_yaml_config "$global_config_file"
|
|
229
237
|
|
|
230
|
-
#
|
|
231
|
-
#
|
|
232
|
-
|
|
233
|
-
# Create full paths - ALL paths are relative to evolution_dir
|
|
234
|
-
# Make evolution_dir absolute if it's relative
|
|
238
|
+
# Create full paths - ALL paths are relative to EVOLUTION_DIR
|
|
239
|
+
# Make EVOLUTION_DIR absolute if it's relative
|
|
235
240
|
if [[ "$EVOLUTION_DIR" = /* ]]; then
|
|
236
241
|
FULL_EVOLUTION_DIR="$EVOLUTION_DIR"
|
|
237
242
|
else
|