aidp 0.12.1 → 0.14.0
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.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/lib/aidp/analyze/json_file_storage.rb +21 -21
- data/lib/aidp/cli/enhanced_input.rb +114 -0
- data/lib/aidp/cli/first_run_wizard.rb +28 -309
- data/lib/aidp/cli/issue_importer.rb +359 -0
- data/lib/aidp/cli/mcp_dashboard.rb +3 -3
- data/lib/aidp/cli/terminal_io.rb +26 -0
- data/lib/aidp/cli.rb +155 -7
- data/lib/aidp/daemon/process_manager.rb +146 -0
- data/lib/aidp/daemon/runner.rb +232 -0
- data/lib/aidp/execute/async_work_loop_runner.rb +216 -0
- data/lib/aidp/execute/future_work_backlog.rb +411 -0
- data/lib/aidp/execute/guard_policy.rb +246 -0
- data/lib/aidp/execute/instruction_queue.rb +131 -0
- data/lib/aidp/execute/interactive_repl.rb +335 -0
- data/lib/aidp/execute/repl_macros.rb +651 -0
- data/lib/aidp/execute/steps.rb +8 -0
- data/lib/aidp/execute/work_loop_runner.rb +322 -36
- data/lib/aidp/execute/work_loop_state.rb +162 -0
- data/lib/aidp/harness/condition_detector.rb +6 -6
- data/lib/aidp/harness/config_loader.rb +23 -23
- data/lib/aidp/harness/config_manager.rb +61 -61
- data/lib/aidp/harness/config_schema.rb +88 -0
- data/lib/aidp/harness/config_validator.rb +9 -9
- data/lib/aidp/harness/configuration.rb +76 -29
- data/lib/aidp/harness/error_handler.rb +13 -13
- data/lib/aidp/harness/provider_config.rb +79 -79
- data/lib/aidp/harness/provider_factory.rb +40 -40
- data/lib/aidp/harness/provider_info.rb +37 -20
- data/lib/aidp/harness/provider_manager.rb +58 -53
- data/lib/aidp/harness/provider_type_checker.rb +6 -6
- data/lib/aidp/harness/runner.rb +7 -7
- data/lib/aidp/harness/status_display.rb +33 -46
- data/lib/aidp/harness/ui/enhanced_workflow_selector.rb +4 -1
- data/lib/aidp/harness/ui/job_monitor.rb +7 -7
- data/lib/aidp/harness/user_interface.rb +43 -43
- data/lib/aidp/init/doc_generator.rb +256 -0
- data/lib/aidp/init/project_analyzer.rb +343 -0
- data/lib/aidp/init/runner.rb +83 -0
- data/lib/aidp/init.rb +5 -0
- data/lib/aidp/logger.rb +279 -0
- data/lib/aidp/providers/anthropic.rb +100 -26
- data/lib/aidp/providers/base.rb +13 -0
- data/lib/aidp/providers/codex.rb +28 -27
- data/lib/aidp/providers/cursor.rb +141 -34
- data/lib/aidp/providers/github_copilot.rb +26 -26
- data/lib/aidp/providers/macos_ui.rb +2 -18
- data/lib/aidp/providers/opencode.rb +26 -26
- data/lib/aidp/setup/wizard.rb +777 -0
- data/lib/aidp/tooling_detector.rb +115 -0
- data/lib/aidp/version.rb +1 -1
- data/lib/aidp/watch/build_processor.rb +282 -0
- data/lib/aidp/watch/plan_generator.rb +166 -0
- data/lib/aidp/watch/plan_processor.rb +83 -0
- data/lib/aidp/watch/repository_client.rb +243 -0
- data/lib/aidp/watch/runner.rb +93 -0
- data/lib/aidp/watch/state_store.rb +105 -0
- data/lib/aidp/watch.rb +9 -0
- data/lib/aidp/workflows/guided_agent.rb +344 -23
- data/lib/aidp.rb +14 -0
- data/templates/implementation/simple_task.md +36 -0
- metadata +27 -1
|
@@ -23,7 +23,7 @@ module Aidp
|
|
|
23
23
|
validation_result = @validator.load_and_validate
|
|
24
24
|
|
|
25
25
|
if validation_result[:valid]
|
|
26
|
-
@config_cache = @validator.
|
|
26
|
+
@config_cache = @validator.validated_config
|
|
27
27
|
@last_loaded = Time.now
|
|
28
28
|
|
|
29
29
|
# Log warnings if any
|
|
@@ -40,7 +40,7 @@ module Aidp
|
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
# Get harness configuration with defaults
|
|
43
|
-
def
|
|
43
|
+
def harness_config(force_reload = false)
|
|
44
44
|
config = load_config(force_reload)
|
|
45
45
|
return nil unless config
|
|
46
46
|
|
|
@@ -48,7 +48,7 @@ module Aidp
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
# Get provider configuration with defaults
|
|
51
|
-
def
|
|
51
|
+
def provider_config(provider_name, force_reload = false)
|
|
52
52
|
config = load_config(force_reload)
|
|
53
53
|
return nil unless config
|
|
54
54
|
|
|
@@ -57,7 +57,7 @@ module Aidp
|
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
# Get all provider configurations
|
|
60
|
-
def
|
|
60
|
+
def all_provider_configs(force_reload = false)
|
|
61
61
|
config = load_config(force_reload)
|
|
62
62
|
return {} unless config
|
|
63
63
|
|
|
@@ -65,7 +65,7 @@ module Aidp
|
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
# Get configured provider names
|
|
68
|
-
def
|
|
68
|
+
def configured_providers(force_reload = false)
|
|
69
69
|
config = load_config(force_reload)
|
|
70
70
|
return [] unless config
|
|
71
71
|
|
|
@@ -94,7 +94,7 @@ module Aidp
|
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
# Get configuration summary
|
|
97
|
-
def
|
|
97
|
+
def config_summary
|
|
98
98
|
@validator.get_summary
|
|
99
99
|
end
|
|
100
100
|
|
|
@@ -109,7 +109,7 @@ module Aidp
|
|
|
109
109
|
end
|
|
110
110
|
|
|
111
111
|
# Get configuration with specific overrides
|
|
112
|
-
def
|
|
112
|
+
def config_with_overrides(overrides = {})
|
|
113
113
|
base_config = load_config
|
|
114
114
|
return nil unless base_config
|
|
115
115
|
|
|
@@ -117,17 +117,17 @@ module Aidp
|
|
|
117
117
|
end
|
|
118
118
|
|
|
119
119
|
# Get harness configuration with overrides
|
|
120
|
-
def
|
|
121
|
-
|
|
122
|
-
return nil unless
|
|
120
|
+
def harness_config_with_overrides(overrides = {})
|
|
121
|
+
base_harness_config = harness_config
|
|
122
|
+
return nil unless base_harness_config
|
|
123
123
|
|
|
124
124
|
harness_overrides = overrides[:harness] || overrides["harness"] || {}
|
|
125
|
-
deep_merge(
|
|
125
|
+
deep_merge(base_harness_config, harness_overrides)
|
|
126
126
|
end
|
|
127
127
|
|
|
128
128
|
# Get provider configuration with overrides
|
|
129
|
-
def
|
|
130
|
-
provider_config =
|
|
129
|
+
def provider_config_with_overrides(provider_name, overrides = {})
|
|
130
|
+
provider_config = provider_config(provider_name)
|
|
131
131
|
return nil unless provider_config
|
|
132
132
|
|
|
133
133
|
provider_overrides = overrides[:providers]&.dig(provider_name.to_sym) ||
|
|
@@ -158,34 +158,34 @@ module Aidp
|
|
|
158
158
|
end
|
|
159
159
|
|
|
160
160
|
# Get validation errors
|
|
161
|
-
def
|
|
161
|
+
def validation_errors
|
|
162
162
|
validation_result = @validator.validate_existing
|
|
163
163
|
validation_result[:errors] || []
|
|
164
164
|
end
|
|
165
165
|
|
|
166
166
|
# Get validation warnings
|
|
167
|
-
def
|
|
167
|
+
def validation_warnings
|
|
168
168
|
validation_result = @validator.validate_existing
|
|
169
169
|
validation_result[:warnings] || []
|
|
170
170
|
end
|
|
171
171
|
|
|
172
172
|
# Get configuration for specific harness mode
|
|
173
|
-
def
|
|
173
|
+
def mode_config(mode, force_reload = false)
|
|
174
174
|
config = load_config(force_reload)
|
|
175
175
|
return nil unless config
|
|
176
176
|
|
|
177
177
|
case mode.to_s
|
|
178
178
|
when "analyze"
|
|
179
|
-
|
|
179
|
+
analyze_mode_config(config)
|
|
180
180
|
when "execute"
|
|
181
|
-
|
|
181
|
+
execute_mode_config(config)
|
|
182
182
|
else
|
|
183
183
|
config
|
|
184
184
|
end
|
|
185
185
|
end
|
|
186
186
|
|
|
187
187
|
# Get environment-specific configuration
|
|
188
|
-
def
|
|
188
|
+
def environment_config(environment = nil, force_reload = false)
|
|
189
189
|
environment ||= ENV["AIDP_ENV"] || "development"
|
|
190
190
|
config = load_config(force_reload)
|
|
191
191
|
return nil unless config
|
|
@@ -214,7 +214,7 @@ module Aidp
|
|
|
214
214
|
end
|
|
215
215
|
|
|
216
216
|
# Get configuration with feature flags
|
|
217
|
-
def
|
|
217
|
+
def config_with_features(features = {}, force_reload = false)
|
|
218
218
|
config = load_config(force_reload)
|
|
219
219
|
return nil unless config
|
|
220
220
|
|
|
@@ -250,7 +250,7 @@ module Aidp
|
|
|
250
250
|
end
|
|
251
251
|
|
|
252
252
|
# Get configuration with time-based overrides
|
|
253
|
-
def
|
|
253
|
+
def time_based_config(force_reload = false)
|
|
254
254
|
config = load_config(force_reload)
|
|
255
255
|
return nil unless config
|
|
256
256
|
|
|
@@ -340,12 +340,12 @@ module Aidp
|
|
|
340
340
|
result
|
|
341
341
|
end
|
|
342
342
|
|
|
343
|
-
def
|
|
343
|
+
def analyze_mode_config(config)
|
|
344
344
|
analyze_overrides = config[:analyze_mode] || config["analyze_mode"] || {}
|
|
345
345
|
merge_overrides(config, analyze_overrides)
|
|
346
346
|
end
|
|
347
347
|
|
|
348
|
-
def
|
|
348
|
+
def execute_mode_config(config)
|
|
349
349
|
execute_overrides = config[:execute_mode] || config["execute_mode"] || {}
|
|
350
350
|
merge_overrides(config, execute_overrides)
|
|
351
351
|
end
|
|
@@ -18,7 +18,7 @@ module Aidp
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
# Get complete configuration
|
|
21
|
-
def
|
|
21
|
+
def config(options = {})
|
|
22
22
|
cache_key = "config_#{options.hash}"
|
|
23
23
|
|
|
24
24
|
if cache_valid?(cache_key)
|
|
@@ -31,16 +31,16 @@ module Aidp
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
# Get harness configuration
|
|
34
|
-
def
|
|
35
|
-
config =
|
|
34
|
+
def harness_config(options = {})
|
|
35
|
+
config = config(options)
|
|
36
36
|
return nil unless config
|
|
37
37
|
|
|
38
38
|
config[:harness] || {}
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
# Get provider configuration
|
|
42
|
-
def
|
|
43
|
-
config =
|
|
42
|
+
def provider_config(provider_name, options = {})
|
|
43
|
+
config = config(options)
|
|
44
44
|
return nil unless config
|
|
45
45
|
|
|
46
46
|
providers = config[:providers] || {}
|
|
@@ -48,38 +48,38 @@ module Aidp
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
# Get all provider configurations
|
|
51
|
-
def
|
|
52
|
-
config =
|
|
51
|
+
def all_providers(options = {})
|
|
52
|
+
config = config(options)
|
|
53
53
|
return {} unless config
|
|
54
54
|
|
|
55
55
|
config[:providers] || {}
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
# Get configured provider names
|
|
59
|
-
def
|
|
60
|
-
providers =
|
|
59
|
+
def provider_names(options = {})
|
|
60
|
+
providers = all_providers(options)
|
|
61
61
|
providers.keys.map(&:to_s)
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
# Get default provider
|
|
65
|
-
def
|
|
66
|
-
harness_config =
|
|
65
|
+
def default_provider(options = {})
|
|
66
|
+
harness_config = harness_config(options)
|
|
67
67
|
harness_config[:default_provider] || harness_config["default_provider"]
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
# Get fallback providers
|
|
71
|
-
def
|
|
72
|
-
harness_config =
|
|
71
|
+
def fallback_providers(options = {})
|
|
72
|
+
harness_config = harness_config(options)
|
|
73
73
|
fallback_providers = harness_config[:fallback_providers] || harness_config["fallback_providers"] || []
|
|
74
74
|
|
|
75
75
|
# Ensure fallback providers are configured
|
|
76
|
-
configured_providers =
|
|
76
|
+
configured_providers = provider_names(options)
|
|
77
77
|
fallback_providers.select { |provider| configured_providers.include?(provider) }
|
|
78
78
|
end
|
|
79
79
|
|
|
80
80
|
# Get provider weights
|
|
81
|
-
def
|
|
82
|
-
harness_config =
|
|
81
|
+
def provider_weights(options = {})
|
|
82
|
+
harness_config = harness_config(options)
|
|
83
83
|
weights = harness_config[:provider_weights] || harness_config["provider_weights"] || {}
|
|
84
84
|
|
|
85
85
|
# Normalize weights to ensure they're positive integers
|
|
@@ -87,8 +87,8 @@ module Aidp
|
|
|
87
87
|
end
|
|
88
88
|
|
|
89
89
|
# Get retry configuration
|
|
90
|
-
def
|
|
91
|
-
harness_config =
|
|
90
|
+
def retry_config(options = {})
|
|
91
|
+
harness_config = harness_config(options)
|
|
92
92
|
retry_config = harness_config[:retry] || harness_config["retry"] || {}
|
|
93
93
|
|
|
94
94
|
{
|
|
@@ -102,8 +102,8 @@ module Aidp
|
|
|
102
102
|
end
|
|
103
103
|
|
|
104
104
|
# Get circuit breaker configuration
|
|
105
|
-
def
|
|
106
|
-
harness_config =
|
|
105
|
+
def circuit_breaker_config(options = {})
|
|
106
|
+
harness_config = harness_config(options)
|
|
107
107
|
cb_config = harness_config[:circuit_breaker] || harness_config["circuit_breaker"] || {}
|
|
108
108
|
|
|
109
109
|
{
|
|
@@ -115,8 +115,8 @@ module Aidp
|
|
|
115
115
|
end
|
|
116
116
|
|
|
117
117
|
# Get rate limit configuration
|
|
118
|
-
def
|
|
119
|
-
harness_config =
|
|
118
|
+
def rate_limit_config(options = {})
|
|
119
|
+
harness_config = harness_config(options)
|
|
120
120
|
rate_limit_config = harness_config[:rate_limit] || harness_config["rate_limit"] || {}
|
|
121
121
|
|
|
122
122
|
{
|
|
@@ -128,8 +128,8 @@ module Aidp
|
|
|
128
128
|
end
|
|
129
129
|
|
|
130
130
|
# Get load balancing configuration
|
|
131
|
-
def
|
|
132
|
-
harness_config =
|
|
131
|
+
def load_balancing_config(options = {})
|
|
132
|
+
harness_config = harness_config(options)
|
|
133
133
|
lb_config = harness_config[:load_balancing] || harness_config["load_balancing"] || {}
|
|
134
134
|
|
|
135
135
|
{
|
|
@@ -141,8 +141,8 @@ module Aidp
|
|
|
141
141
|
end
|
|
142
142
|
|
|
143
143
|
# Get model switching configuration
|
|
144
|
-
def
|
|
145
|
-
harness_config =
|
|
144
|
+
def model_switching_config(options = {})
|
|
145
|
+
harness_config = harness_config(options)
|
|
146
146
|
ms_config = harness_config[:model_switching] || harness_config["model_switching"] || {}
|
|
147
147
|
|
|
148
148
|
{
|
|
@@ -154,8 +154,8 @@ module Aidp
|
|
|
154
154
|
end
|
|
155
155
|
|
|
156
156
|
# Get health check configuration
|
|
157
|
-
def
|
|
158
|
-
harness_config =
|
|
157
|
+
def health_check_config(options = {})
|
|
158
|
+
harness_config = harness_config(options)
|
|
159
159
|
hc_config = harness_config[:health_check] || harness_config["health_check"] || {}
|
|
160
160
|
|
|
161
161
|
{
|
|
@@ -168,8 +168,8 @@ module Aidp
|
|
|
168
168
|
end
|
|
169
169
|
|
|
170
170
|
# Get metrics configuration
|
|
171
|
-
def
|
|
172
|
-
harness_config =
|
|
171
|
+
def metrics_config(options = {})
|
|
172
|
+
harness_config = harness_config(options)
|
|
173
173
|
metrics_config = harness_config[:metrics] || harness_config["metrics"] || {}
|
|
174
174
|
|
|
175
175
|
{
|
|
@@ -181,8 +181,8 @@ module Aidp
|
|
|
181
181
|
end
|
|
182
182
|
|
|
183
183
|
# Get session configuration
|
|
184
|
-
def
|
|
185
|
-
harness_config =
|
|
184
|
+
def session_config(options = {})
|
|
185
|
+
harness_config = harness_config(options)
|
|
186
186
|
session_config = harness_config[:session] || harness_config["session"] || {}
|
|
187
187
|
|
|
188
188
|
{
|
|
@@ -194,8 +194,8 @@ module Aidp
|
|
|
194
194
|
end
|
|
195
195
|
|
|
196
196
|
# Get provider models
|
|
197
|
-
def
|
|
198
|
-
provider_config =
|
|
197
|
+
def provider_models(provider_name, options = {})
|
|
198
|
+
provider_config = provider_config(provider_name, options)
|
|
199
199
|
return [] unless provider_config
|
|
200
200
|
|
|
201
201
|
models = provider_config[:models] || provider_config["models"] || []
|
|
@@ -203,8 +203,8 @@ module Aidp
|
|
|
203
203
|
end
|
|
204
204
|
|
|
205
205
|
# Get provider model weights
|
|
206
|
-
def
|
|
207
|
-
provider_config =
|
|
206
|
+
def provider_model_weights(provider_name, options = {})
|
|
207
|
+
provider_config = provider_config(provider_name, options)
|
|
208
208
|
return {} unless provider_config
|
|
209
209
|
|
|
210
210
|
weights = provider_config[:model_weights] || provider_config["model_weights"] || {}
|
|
@@ -212,8 +212,8 @@ module Aidp
|
|
|
212
212
|
end
|
|
213
213
|
|
|
214
214
|
# Get provider model configuration
|
|
215
|
-
def
|
|
216
|
-
provider_config =
|
|
215
|
+
def provider_model_config(provider_name, model_name, options = {})
|
|
216
|
+
provider_config = provider_config(provider_name, options)
|
|
217
217
|
return {} unless provider_config
|
|
218
218
|
|
|
219
219
|
models_config = provider_config[:models_config] || provider_config["models_config"] || {}
|
|
@@ -227,8 +227,8 @@ module Aidp
|
|
|
227
227
|
end
|
|
228
228
|
|
|
229
229
|
# Get provider features
|
|
230
|
-
def
|
|
231
|
-
provider_config =
|
|
230
|
+
def provider_features(provider_name, options = {})
|
|
231
|
+
provider_config = provider_config(provider_name, options)
|
|
232
232
|
return {} unless provider_config
|
|
233
233
|
|
|
234
234
|
features = provider_config[:features] || provider_config["features"] || {}
|
|
@@ -242,8 +242,8 @@ module Aidp
|
|
|
242
242
|
end
|
|
243
243
|
|
|
244
244
|
# Get provider monitoring configuration
|
|
245
|
-
def
|
|
246
|
-
provider_config =
|
|
245
|
+
def provider_monitoring_config(provider_name, options = {})
|
|
246
|
+
provider_config = provider_config(provider_name, options)
|
|
247
247
|
return {} unless provider_config
|
|
248
248
|
|
|
249
249
|
monitoring = provider_config[:monitoring] || provider_config["monitoring"] || {}
|
|
@@ -256,21 +256,21 @@ module Aidp
|
|
|
256
256
|
|
|
257
257
|
# Check if provider supports feature
|
|
258
258
|
def provider_supports_feature?(provider_name, feature, options = {})
|
|
259
|
-
features =
|
|
259
|
+
features = provider_features(provider_name, options)
|
|
260
260
|
features[feature.to_sym] == true
|
|
261
261
|
end
|
|
262
262
|
|
|
263
263
|
# Get provider priority
|
|
264
|
-
def
|
|
265
|
-
provider_config =
|
|
264
|
+
def provider_priority(provider_name, options = {})
|
|
265
|
+
provider_config = provider_config(provider_name, options)
|
|
266
266
|
return 1 unless provider_config
|
|
267
267
|
|
|
268
268
|
provider_config[:priority] || provider_config["priority"] || 1
|
|
269
269
|
end
|
|
270
270
|
|
|
271
271
|
# Get provider type
|
|
272
|
-
def
|
|
273
|
-
provider_config =
|
|
272
|
+
def provider_type(provider_name, options = {})
|
|
273
|
+
provider_config = provider_config(provider_name, options)
|
|
274
274
|
return nil unless provider_config
|
|
275
275
|
|
|
276
276
|
provider_config[:type] || provider_config["type"]
|
|
@@ -279,16 +279,16 @@ module Aidp
|
|
|
279
279
|
# Provider type checking methods are now provided by ProviderTypeChecker module
|
|
280
280
|
|
|
281
281
|
# Get provider max tokens
|
|
282
|
-
def
|
|
283
|
-
provider_config =
|
|
282
|
+
def provider_max_tokens(provider_name, options = {})
|
|
283
|
+
provider_config = provider_config(provider_name, options)
|
|
284
284
|
return nil unless provider_config
|
|
285
285
|
|
|
286
286
|
provider_config[:max_tokens] || provider_config["max_tokens"]
|
|
287
287
|
end
|
|
288
288
|
|
|
289
289
|
# Get provider default flags
|
|
290
|
-
def
|
|
291
|
-
provider_config =
|
|
290
|
+
def provider_default_flags(provider_name, options = {})
|
|
291
|
+
provider_config = provider_config(provider_name, options)
|
|
292
292
|
return [] unless provider_config
|
|
293
293
|
|
|
294
294
|
flags = provider_config[:default_flags] || provider_config["default_flags"] || []
|
|
@@ -296,8 +296,8 @@ module Aidp
|
|
|
296
296
|
end
|
|
297
297
|
|
|
298
298
|
# Get provider auth configuration
|
|
299
|
-
def
|
|
300
|
-
provider_config =
|
|
299
|
+
def provider_auth_config(provider_name, options = {})
|
|
300
|
+
provider_config = provider_config(provider_name, options)
|
|
301
301
|
return {} unless provider_config
|
|
302
302
|
|
|
303
303
|
auth = provider_config[:auth] || provider_config["auth"] || {}
|
|
@@ -309,8 +309,8 @@ module Aidp
|
|
|
309
309
|
end
|
|
310
310
|
|
|
311
311
|
# Get provider endpoints
|
|
312
|
-
def
|
|
313
|
-
provider_config =
|
|
312
|
+
def provider_endpoints(provider_name, options = {})
|
|
313
|
+
provider_config = provider_config(provider_name, options)
|
|
314
314
|
return {} unless provider_config
|
|
315
315
|
|
|
316
316
|
endpoints = provider_config[:endpoints] || provider_config["endpoints"] || {}
|
|
@@ -326,13 +326,13 @@ module Aidp
|
|
|
326
326
|
end
|
|
327
327
|
|
|
328
328
|
# Get validation errors
|
|
329
|
-
def
|
|
330
|
-
@loader.
|
|
329
|
+
def validation_errors
|
|
330
|
+
@loader.validation_errors
|
|
331
331
|
end
|
|
332
332
|
|
|
333
333
|
# Get validation warnings
|
|
334
|
-
def
|
|
335
|
-
@loader.
|
|
334
|
+
def validation_warnings
|
|
335
|
+
@loader.validation_warnings
|
|
336
336
|
end
|
|
337
337
|
|
|
338
338
|
# Reload configuration
|
|
@@ -343,8 +343,8 @@ module Aidp
|
|
|
343
343
|
end
|
|
344
344
|
|
|
345
345
|
# Get configuration summary
|
|
346
|
-
def
|
|
347
|
-
@loader.
|
|
346
|
+
def config_summary
|
|
347
|
+
@loader.config_summary
|
|
348
348
|
end
|
|
349
349
|
|
|
350
350
|
private
|
|
@@ -404,6 +404,55 @@ module Aidp
|
|
|
404
404
|
items: {
|
|
405
405
|
type: :string
|
|
406
406
|
}
|
|
407
|
+
},
|
|
408
|
+
guards: {
|
|
409
|
+
type: :hash,
|
|
410
|
+
required: false,
|
|
411
|
+
default: {
|
|
412
|
+
enabled: false
|
|
413
|
+
},
|
|
414
|
+
properties: {
|
|
415
|
+
enabled: {
|
|
416
|
+
type: :boolean,
|
|
417
|
+
required: false,
|
|
418
|
+
default: false
|
|
419
|
+
},
|
|
420
|
+
include_files: {
|
|
421
|
+
type: :array,
|
|
422
|
+
required: false,
|
|
423
|
+
default: [],
|
|
424
|
+
items: {
|
|
425
|
+
type: :string
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
exclude_files: {
|
|
429
|
+
type: :array,
|
|
430
|
+
required: false,
|
|
431
|
+
default: [],
|
|
432
|
+
items: {
|
|
433
|
+
type: :string
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
confirm_files: {
|
|
437
|
+
type: :array,
|
|
438
|
+
required: false,
|
|
439
|
+
default: [],
|
|
440
|
+
items: {
|
|
441
|
+
type: :string
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
max_lines_per_commit: {
|
|
445
|
+
type: :integer,
|
|
446
|
+
required: false,
|
|
447
|
+
min: 1,
|
|
448
|
+
max: 10000
|
|
449
|
+
},
|
|
450
|
+
bypass: {
|
|
451
|
+
type: :boolean,
|
|
452
|
+
required: false,
|
|
453
|
+
default: false
|
|
454
|
+
}
|
|
455
|
+
}
|
|
407
456
|
}
|
|
408
457
|
}
|
|
409
458
|
}
|
|
@@ -576,6 +625,45 @@ module Aidp
|
|
|
576
625
|
}
|
|
577
626
|
}
|
|
578
627
|
}
|
|
628
|
+
},
|
|
629
|
+
logging: {
|
|
630
|
+
type: :hash,
|
|
631
|
+
required: false,
|
|
632
|
+
default: {},
|
|
633
|
+
properties: {
|
|
634
|
+
level: {
|
|
635
|
+
type: :string,
|
|
636
|
+
required: false,
|
|
637
|
+
default: "info",
|
|
638
|
+
enum: ["debug", "info", "warn", "error"]
|
|
639
|
+
},
|
|
640
|
+
json: {
|
|
641
|
+
type: :boolean,
|
|
642
|
+
required: false,
|
|
643
|
+
default: false
|
|
644
|
+
},
|
|
645
|
+
max_size_mb: {
|
|
646
|
+
type: :integer,
|
|
647
|
+
required: false,
|
|
648
|
+
default: 10,
|
|
649
|
+
min: 1,
|
|
650
|
+
max: 100
|
|
651
|
+
},
|
|
652
|
+
max_backups: {
|
|
653
|
+
type: :integer,
|
|
654
|
+
required: false,
|
|
655
|
+
default: 5,
|
|
656
|
+
min: 1,
|
|
657
|
+
max: 20
|
|
658
|
+
},
|
|
659
|
+
max_age_days: {
|
|
660
|
+
type: :integer,
|
|
661
|
+
required: false,
|
|
662
|
+
default: 14,
|
|
663
|
+
min: 1,
|
|
664
|
+
max: 365
|
|
665
|
+
}
|
|
666
|
+
}
|
|
579
667
|
}
|
|
580
668
|
}.freeze
|
|
581
669
|
|
|
@@ -41,7 +41,7 @@ module Aidp
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
# Get configuration with defaults applied
|
|
44
|
-
def
|
|
44
|
+
def validated_config
|
|
45
45
|
return nil unless @validation_result&.dig(:valid)
|
|
46
46
|
|
|
47
47
|
ConfigSchema.apply_defaults(@config)
|
|
@@ -110,7 +110,7 @@ module Aidp
|
|
|
110
110
|
end
|
|
111
111
|
|
|
112
112
|
# Get configuration summary
|
|
113
|
-
def
|
|
113
|
+
def summary
|
|
114
114
|
return {error: "No configuration file found"} unless @config_file
|
|
115
115
|
|
|
116
116
|
load_config
|
|
@@ -157,7 +157,7 @@ module Aidp
|
|
|
157
157
|
end
|
|
158
158
|
|
|
159
159
|
# Get provider configuration with defaults
|
|
160
|
-
def
|
|
160
|
+
def provider_config(provider_name)
|
|
161
161
|
return nil unless @config_file
|
|
162
162
|
|
|
163
163
|
load_config
|
|
@@ -195,7 +195,7 @@ module Aidp
|
|
|
195
195
|
end
|
|
196
196
|
|
|
197
197
|
# Get harness configuration with defaults
|
|
198
|
-
def
|
|
198
|
+
def harness_config
|
|
199
199
|
return nil unless @config_file
|
|
200
200
|
|
|
201
201
|
load_config
|
|
@@ -212,17 +212,17 @@ module Aidp
|
|
|
212
212
|
|
|
213
213
|
load_config
|
|
214
214
|
validate_config
|
|
215
|
-
|
|
216
|
-
return nil unless
|
|
215
|
+
config = validated_config
|
|
216
|
+
return nil unless config
|
|
217
217
|
|
|
218
218
|
case format
|
|
219
219
|
when :yaml
|
|
220
|
-
YAML.dump(
|
|
220
|
+
YAML.dump(config)
|
|
221
221
|
when :json
|
|
222
222
|
require "json"
|
|
223
|
-
JSON.pretty_generate(
|
|
223
|
+
JSON.pretty_generate(config)
|
|
224
224
|
when :ruby
|
|
225
|
-
"CONFIG = #{
|
|
225
|
+
"CONFIG = #{config.inspect}"
|
|
226
226
|
else
|
|
227
227
|
raise ArgumentError, "Unsupported format: #{format}"
|
|
228
228
|
end
|