aidp 0.12.1 → 0.13.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/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 +1 -7
- data/lib/aidp/cli/mcp_dashboard.rb +3 -3
- data/lib/aidp/cli/terminal_io.rb +26 -0
- data/lib/aidp/cli.rb +4 -4
- 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_validator.rb +9 -9
- data/lib/aidp/harness/configuration.rb +28 -28
- 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 +2 -1
- data/lib/aidp/harness/ui/job_monitor.rb +7 -7
- data/lib/aidp/harness/user_interface.rb +43 -43
- 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/version.rb +1 -1
- data/lib/aidp/workflows/guided_agent.rb +344 -23
- metadata +2 -1
@@ -18,53 +18,53 @@ module Aidp
|
|
18
18
|
end
|
19
19
|
|
20
20
|
# Get complete provider configuration
|
21
|
-
def
|
21
|
+
def config(options = {})
|
22
22
|
return @provider_config if @provider_config && !options[:force_reload] && cache_valid?
|
23
23
|
|
24
|
-
@provider_config = @config_manager.
|
25
|
-
@harness_config = @config_manager.
|
24
|
+
@provider_config = @config_manager.provider_config(@provider_name, options)
|
25
|
+
@harness_config = @config_manager.harness_config(options)
|
26
26
|
@cache_timestamp = Time.now
|
27
27
|
|
28
28
|
@provider_config || {}
|
29
29
|
end
|
30
30
|
|
31
31
|
# Get provider type (usage_based, subscription)
|
32
|
-
def
|
33
|
-
config =
|
32
|
+
def type(options = {})
|
33
|
+
config = config(options)
|
34
34
|
config[:type] || config["type"] || "subscription"
|
35
35
|
end
|
36
36
|
|
37
37
|
# Provider type checking methods are now provided by ProviderTypeChecker module
|
38
38
|
|
39
39
|
# Get provider priority
|
40
|
-
def
|
41
|
-
config =
|
40
|
+
def priority(options = {})
|
41
|
+
config = config(options)
|
42
42
|
config[:priority] || config["priority"] || 1
|
43
43
|
end
|
44
44
|
|
45
45
|
# Get provider models
|
46
|
-
def
|
47
|
-
config =
|
46
|
+
def models(options = {})
|
47
|
+
config = config(options)
|
48
48
|
models = config[:models] || config["models"] || []
|
49
49
|
models.map(&:to_s)
|
50
50
|
end
|
51
51
|
|
52
52
|
# Get default model
|
53
|
-
def
|
54
|
-
|
55
|
-
|
53
|
+
def default_model(options = {})
|
54
|
+
model_list = models(options)
|
55
|
+
model_list.first
|
56
56
|
end
|
57
57
|
|
58
58
|
# Get model weights
|
59
|
-
def
|
60
|
-
config =
|
59
|
+
def model_weights(options = {})
|
60
|
+
config = config(options)
|
61
61
|
weights = config[:model_weights] || config["model_weights"] || {}
|
62
62
|
weights.transform_values { |weight| [weight.to_i, 1].max }
|
63
63
|
end
|
64
64
|
|
65
65
|
# Get model configuration
|
66
|
-
def
|
67
|
-
config =
|
66
|
+
def model_config(model_name, options = {})
|
67
|
+
config = config(options)
|
68
68
|
models_config = config[:models_config] || config["models_config"] || {}
|
69
69
|
model_config = models_config[model_name.to_sym] || models_config[model_name.to_s] || {}
|
70
70
|
|
@@ -78,8 +78,8 @@ module Aidp
|
|
78
78
|
end
|
79
79
|
|
80
80
|
# Get provider features
|
81
|
-
def
|
82
|
-
config =
|
81
|
+
def features(options = {})
|
82
|
+
config = config(options)
|
83
83
|
features = config[:features] || config["features"] || {}
|
84
84
|
|
85
85
|
{
|
@@ -95,13 +95,13 @@ module Aidp
|
|
95
95
|
|
96
96
|
# Check if provider supports feature
|
97
97
|
def supports_feature?(feature, options = {})
|
98
|
-
features =
|
98
|
+
features = features(options)
|
99
99
|
features[feature.to_sym] == true
|
100
100
|
end
|
101
101
|
|
102
102
|
# Get provider capabilities
|
103
|
-
def
|
104
|
-
features =
|
103
|
+
def capabilities(options = {})
|
104
|
+
features = features(options)
|
105
105
|
capabilities = []
|
106
106
|
|
107
107
|
capabilities << "file_upload" if features[:file_upload]
|
@@ -116,41 +116,41 @@ module Aidp
|
|
116
116
|
end
|
117
117
|
|
118
118
|
# Get provider max tokens
|
119
|
-
def
|
120
|
-
config =
|
119
|
+
def max_tokens(options = {})
|
120
|
+
config = config(options)
|
121
121
|
config[:max_tokens] || config["max_tokens"]
|
122
122
|
end
|
123
123
|
|
124
124
|
# Get provider timeout
|
125
|
-
def
|
126
|
-
config =
|
125
|
+
def timeout(options = {})
|
126
|
+
config = config(options)
|
127
127
|
config[:timeout] || config["timeout"] || 300
|
128
128
|
end
|
129
129
|
|
130
130
|
# Get provider default flags
|
131
|
-
def
|
132
|
-
config =
|
131
|
+
def default_flags(options = {})
|
132
|
+
config = config(options)
|
133
133
|
flags = config[:default_flags] || config["default_flags"] || []
|
134
134
|
flags.map(&:to_s)
|
135
135
|
end
|
136
136
|
|
137
137
|
# Get model-specific flags
|
138
|
-
def
|
139
|
-
model_config =
|
138
|
+
def model_flags(model_name, options = {})
|
139
|
+
model_config = model_config(model_name, options)
|
140
140
|
model_config[:flags] || []
|
141
141
|
end
|
142
142
|
|
143
143
|
# Get combined flags (default + model-specific)
|
144
|
-
def
|
145
|
-
|
146
|
-
|
144
|
+
def combined_flags(model_name = nil, options = {})
|
145
|
+
base_default_flags = default_flags(options)
|
146
|
+
model_flags_list = model_name ? model_flags(model_name, options) : []
|
147
147
|
|
148
|
-
(
|
148
|
+
(base_default_flags + model_flags_list).uniq
|
149
149
|
end
|
150
150
|
|
151
151
|
# Get authentication configuration
|
152
|
-
def
|
153
|
-
config =
|
152
|
+
def auth_config(options = {})
|
153
|
+
config = config(options)
|
154
154
|
auth = config[:auth] || config["auth"] || {}
|
155
155
|
|
156
156
|
{
|
@@ -165,8 +165,8 @@ module Aidp
|
|
165
165
|
end
|
166
166
|
|
167
167
|
# Get API key from environment or config
|
168
|
-
def
|
169
|
-
auth_config =
|
168
|
+
def api_key(options = {})
|
169
|
+
auth_config = auth_config(options)
|
170
170
|
|
171
171
|
# Try environment variable first
|
172
172
|
if auth_config[:api_key_env]
|
@@ -179,8 +179,8 @@ module Aidp
|
|
179
179
|
end
|
180
180
|
|
181
181
|
# Get endpoints configuration
|
182
|
-
def
|
183
|
-
config =
|
182
|
+
def endpoints(options = {})
|
183
|
+
config = config(options)
|
184
184
|
endpoints = config[:endpoints] || config["endpoints"] || {}
|
185
185
|
|
186
186
|
{
|
@@ -193,14 +193,14 @@ module Aidp
|
|
193
193
|
end
|
194
194
|
|
195
195
|
# Get default endpoint
|
196
|
-
def
|
197
|
-
|
198
|
-
|
196
|
+
def default_endpoint(options = {})
|
197
|
+
endpoints_list = endpoints(options)
|
198
|
+
endpoints_list[:default]
|
199
199
|
end
|
200
200
|
|
201
201
|
# Get monitoring configuration
|
202
|
-
def
|
203
|
-
config =
|
202
|
+
def monitoring_config(options = {})
|
203
|
+
config = config(options)
|
204
204
|
monitoring = config[:monitoring] || config["monitoring"] || {}
|
205
205
|
|
206
206
|
{
|
@@ -214,8 +214,8 @@ module Aidp
|
|
214
214
|
end
|
215
215
|
|
216
216
|
# Get rate limiting configuration
|
217
|
-
def
|
218
|
-
config =
|
217
|
+
def rate_limit_config(options = {})
|
218
|
+
config = config(options)
|
219
219
|
rate_limit = config[:rate_limit] || config["rate_limit"] || {}
|
220
220
|
|
221
221
|
{
|
@@ -230,8 +230,8 @@ module Aidp
|
|
230
230
|
end
|
231
231
|
|
232
232
|
# Get retry configuration
|
233
|
-
def
|
234
|
-
config =
|
233
|
+
def retry_config(options = {})
|
234
|
+
config = config(options)
|
235
235
|
retry_config = config[:retry] || config["retry"] || {}
|
236
236
|
|
237
237
|
{
|
@@ -246,8 +246,8 @@ module Aidp
|
|
246
246
|
end
|
247
247
|
|
248
248
|
# Get circuit breaker configuration
|
249
|
-
def
|
250
|
-
config =
|
249
|
+
def circuit_breaker_config(options = {})
|
250
|
+
config = config(options)
|
251
251
|
cb_config = config[:circuit_breaker] || config["circuit_breaker"] || {}
|
252
252
|
|
253
253
|
{
|
@@ -260,8 +260,8 @@ module Aidp
|
|
260
260
|
end
|
261
261
|
|
262
262
|
# Get cost configuration
|
263
|
-
def
|
264
|
-
config =
|
263
|
+
def cost_config(options = {})
|
264
|
+
config = config(options)
|
265
265
|
cost = config[:cost] || config["cost"] || {}
|
266
266
|
|
267
267
|
{
|
@@ -273,23 +273,23 @@ module Aidp
|
|
273
273
|
end
|
274
274
|
|
275
275
|
# Get provider-specific harness configuration
|
276
|
-
def
|
277
|
-
config =
|
276
|
+
def harness_config(options = {})
|
277
|
+
config = config(options)
|
278
278
|
harness_config = config[:harness] || config["harness"] || {}
|
279
279
|
|
280
280
|
{
|
281
281
|
enabled: harness_config[:enabled] != false,
|
282
282
|
auto_switch_on_error: harness_config[:auto_switch_on_error] != false,
|
283
283
|
auto_switch_on_rate_limit: harness_config[:auto_switch_on_rate_limit] != false,
|
284
|
-
priority: harness_config[:priority] ||
|
284
|
+
priority: harness_config[:priority] || priority(options),
|
285
285
|
weight: harness_config[:weight] || 1,
|
286
286
|
max_concurrent_requests: harness_config[:max_concurrent_requests] || 5
|
287
287
|
}
|
288
288
|
end
|
289
289
|
|
290
290
|
# Get provider health check configuration
|
291
|
-
def
|
292
|
-
config =
|
291
|
+
def health_check_config(options = {})
|
292
|
+
config = config(options)
|
293
293
|
health_check = config[:health_check] || config["health_check"] || {}
|
294
294
|
|
295
295
|
{
|
@@ -304,8 +304,8 @@ module Aidp
|
|
304
304
|
end
|
305
305
|
|
306
306
|
# Get provider-specific environment variables
|
307
|
-
def
|
308
|
-
config =
|
307
|
+
def env_vars(options = {})
|
308
|
+
config = config(options)
|
309
309
|
env_vars = config[:env_vars] || config["env_vars"] || {}
|
310
310
|
|
311
311
|
# Convert to string keys for environment variable access
|
@@ -313,21 +313,21 @@ module Aidp
|
|
313
313
|
end
|
314
314
|
|
315
315
|
# Get provider-specific command line arguments
|
316
|
-
def
|
317
|
-
config =
|
316
|
+
def cmd_args(options = {})
|
317
|
+
config = config(options)
|
318
318
|
cmd_args = config[:cmd_args] || config["cmd_args"] || []
|
319
319
|
cmd_args.map(&:to_s)
|
320
320
|
end
|
321
321
|
|
322
322
|
# Get provider-specific working directory
|
323
|
-
def
|
324
|
-
config =
|
323
|
+
def working_directory(options = {})
|
324
|
+
config = config(options)
|
325
325
|
config[:working_directory] || config["working_directory"] || Dir.pwd
|
326
326
|
end
|
327
327
|
|
328
328
|
# Get provider-specific log configuration
|
329
|
-
def
|
330
|
-
config =
|
329
|
+
def log_config(options = {})
|
330
|
+
config = config(options)
|
331
331
|
log_config = config[:log] || config["log"] || {}
|
332
332
|
|
333
333
|
{
|
@@ -341,8 +341,8 @@ module Aidp
|
|
341
341
|
end
|
342
342
|
|
343
343
|
# Get provider-specific cache configuration
|
344
|
-
def
|
345
|
-
config =
|
344
|
+
def cache_config(options = {})
|
345
|
+
config = config(options)
|
346
346
|
cache_config = config[:cache] || config["cache"] || {}
|
347
347
|
|
348
348
|
{
|
@@ -354,8 +354,8 @@ module Aidp
|
|
354
354
|
end
|
355
355
|
|
356
356
|
# Get provider-specific security configuration
|
357
|
-
def
|
358
|
-
config =
|
357
|
+
def security_config(options = {})
|
358
|
+
config = config(options)
|
359
359
|
security = config[:security] || config["security"] || {}
|
360
360
|
|
361
361
|
{
|
@@ -369,18 +369,18 @@ module Aidp
|
|
369
369
|
|
370
370
|
# Check if provider is configured
|
371
371
|
def configured?(options = {})
|
372
|
-
config =
|
372
|
+
config = config(options)
|
373
373
|
!config.empty?
|
374
374
|
end
|
375
375
|
|
376
376
|
# Check if provider is enabled
|
377
377
|
def enabled?(options = {})
|
378
|
-
harness_config =
|
378
|
+
harness_config = harness_config(options)
|
379
379
|
harness_config[:enabled] != false
|
380
380
|
end
|
381
381
|
|
382
382
|
# Get provider status
|
383
|
-
def
|
383
|
+
def status(options = {})
|
384
384
|
return :not_configured unless configured?(options)
|
385
385
|
return :disabled unless enabled?(options)
|
386
386
|
|
@@ -388,17 +388,17 @@ module Aidp
|
|
388
388
|
end
|
389
389
|
|
390
390
|
# Get provider summary
|
391
|
-
def
|
392
|
-
config =
|
391
|
+
def summary(options = {})
|
392
|
+
config = config(options)
|
393
393
|
return {} if config.empty?
|
394
394
|
|
395
395
|
{
|
396
396
|
name: @provider_name,
|
397
|
-
type:
|
398
|
-
priority:
|
399
|
-
models:
|
400
|
-
features:
|
401
|
-
status:
|
397
|
+
type: type(options),
|
398
|
+
priority: priority(options),
|
399
|
+
models: models(options),
|
400
|
+
features: capabilities(options),
|
401
|
+
status: status(options),
|
402
402
|
configured: configured?(options),
|
403
403
|
enabled: enabled?(options)
|
404
404
|
}
|
@@ -42,7 +42,7 @@ module Aidp
|
|
42
42
|
end
|
43
43
|
|
44
44
|
# Get provider configuration
|
45
|
-
provider_config =
|
45
|
+
provider_config = provider_config(provider_name)
|
46
46
|
|
47
47
|
# Check if provider is configured and enabled
|
48
48
|
unless provider_config.configured?(options)
|
@@ -54,7 +54,7 @@ module Aidp
|
|
54
54
|
end
|
55
55
|
|
56
56
|
# Get provider class
|
57
|
-
provider_class =
|
57
|
+
provider_class = provider_class(provider_name)
|
58
58
|
raise "Unknown provider: #{provider_name}" unless provider_class
|
59
59
|
|
60
60
|
# Create provider instance
|
@@ -78,13 +78,13 @@ module Aidp
|
|
78
78
|
|
79
79
|
# Create all configured providers
|
80
80
|
def create_all_providers(options = {})
|
81
|
-
configured_providers = @config_manager.
|
81
|
+
configured_providers = @config_manager.provider_names(options)
|
82
82
|
create_providers(configured_providers, options)
|
83
83
|
end
|
84
84
|
|
85
85
|
# Create providers by priority
|
86
86
|
def create_providers_by_priority(options = {})
|
87
|
-
all_providers = @config_manager.
|
87
|
+
all_providers = @config_manager.all_providers(options)
|
88
88
|
|
89
89
|
# Sort by priority (lower number = higher priority)
|
90
90
|
sorted_providers = all_providers.sort_by do |name, config|
|
@@ -99,7 +99,7 @@ module Aidp
|
|
99
99
|
|
100
100
|
# Create providers by weight (for load balancing)
|
101
101
|
def create_providers_by_weight(options = {})
|
102
|
-
all_providers = @config_manager.
|
102
|
+
all_providers = @config_manager.all_providers(options)
|
103
103
|
weighted_providers = []
|
104
104
|
|
105
105
|
all_providers.each do |name, config|
|
@@ -113,12 +113,12 @@ module Aidp
|
|
113
113
|
end
|
114
114
|
|
115
115
|
# Get provider configuration
|
116
|
-
def
|
116
|
+
def provider_config(provider_name)
|
117
117
|
@provider_configs[provider_name.to_s] ||= ProviderConfig.new(provider_name, @config_manager)
|
118
118
|
end
|
119
119
|
|
120
120
|
# Get provider class
|
121
|
-
def
|
121
|
+
def provider_class(provider_name)
|
122
122
|
PROVIDER_CLASSES[provider_name.to_s]
|
123
123
|
end
|
124
124
|
|
@@ -128,59 +128,59 @@ module Aidp
|
|
128
128
|
end
|
129
129
|
|
130
130
|
# Get supported provider names
|
131
|
-
def
|
131
|
+
def supported_providers
|
132
132
|
PROVIDER_CLASSES.keys
|
133
133
|
end
|
134
134
|
|
135
135
|
# Get configured provider names
|
136
|
-
def
|
137
|
-
@config_manager.
|
136
|
+
def configured_providers(options = {})
|
137
|
+
@config_manager.provider_names(options)
|
138
138
|
end
|
139
139
|
|
140
140
|
# Get enabled provider names
|
141
|
-
def
|
142
|
-
configured_providers =
|
141
|
+
def enabled_providers(options = {})
|
142
|
+
configured_providers = configured_providers(options)
|
143
143
|
configured_providers.select do |provider_name|
|
144
|
-
provider_config =
|
144
|
+
provider_config = provider_config(provider_name)
|
145
145
|
provider_config.enabled?(options)
|
146
146
|
end
|
147
147
|
end
|
148
148
|
|
149
149
|
# Get provider capabilities
|
150
|
-
def
|
151
|
-
provider_config =
|
152
|
-
provider_config.
|
150
|
+
def provider_capabilities(provider_name, options = {})
|
151
|
+
provider_config = provider_config(provider_name)
|
152
|
+
provider_config.capabilities(options)
|
153
153
|
end
|
154
154
|
|
155
155
|
# Check if provider supports feature
|
156
156
|
def provider_supports_feature?(provider_name, feature, options = {})
|
157
|
-
provider_config =
|
157
|
+
provider_config = provider_config(provider_name)
|
158
158
|
provider_config.supports_feature?(feature, options)
|
159
159
|
end
|
160
160
|
|
161
161
|
# Get provider models
|
162
|
-
def
|
163
|
-
provider_config =
|
164
|
-
provider_config.
|
162
|
+
def provider_models(provider_name, options = {})
|
163
|
+
provider_config = provider_config(provider_name)
|
164
|
+
provider_config.models(options)
|
165
165
|
end
|
166
166
|
|
167
167
|
# Get provider summary
|
168
|
-
def
|
169
|
-
provider_config =
|
170
|
-
provider_config.
|
168
|
+
def provider_summary(provider_name, options = {})
|
169
|
+
provider_config = provider_config(provider_name)
|
170
|
+
provider_config.summary(options)
|
171
171
|
end
|
172
172
|
|
173
173
|
# Get all provider summaries
|
174
|
-
def
|
175
|
-
configured_providers =
|
174
|
+
def all_provider_summaries(options = {})
|
175
|
+
configured_providers = configured_providers(options)
|
176
176
|
configured_providers.map do |provider_name|
|
177
|
-
|
177
|
+
provider_summary(provider_name, options)
|
178
178
|
end
|
179
179
|
end
|
180
180
|
|
181
181
|
# Validate provider configuration
|
182
182
|
def validate_provider_config(provider_name, options = {})
|
183
|
-
provider_config =
|
183
|
+
provider_config = provider_config(provider_name)
|
184
184
|
errors = []
|
185
185
|
|
186
186
|
# Check if provider is configured
|
@@ -196,14 +196,14 @@ module Aidp
|
|
196
196
|
|
197
197
|
# Check required configuration
|
198
198
|
if provider_config.usage_based_provider?(options)
|
199
|
-
api_key = provider_config.
|
199
|
+
api_key = provider_config.api_key(options)
|
200
200
|
unless api_key && !api_key.empty?
|
201
201
|
errors << "API key not configured for provider '#{provider_name}'"
|
202
202
|
end
|
203
203
|
end
|
204
204
|
|
205
205
|
# Check models configuration
|
206
|
-
models = provider_config.
|
206
|
+
models = provider_config.models(options)
|
207
207
|
if models.empty?
|
208
208
|
errors << "No models configured for provider '#{provider_name}'"
|
209
209
|
end
|
@@ -213,7 +213,7 @@ module Aidp
|
|
213
213
|
|
214
214
|
# Validate all provider configurations
|
215
215
|
def validate_all_provider_configs(options = {})
|
216
|
-
configured_providers =
|
216
|
+
configured_providers = configured_providers(options)
|
217
217
|
all_errors = {}
|
218
218
|
|
219
219
|
configured_providers.each do |provider_name|
|
@@ -241,7 +241,7 @@ module Aidp
|
|
241
241
|
def configure_provider(provider_instance, provider_config, options)
|
242
242
|
# Set basic configuration
|
243
243
|
if provider_instance.respond_to?(:configure)
|
244
|
-
provider_instance.configure(provider_config.
|
244
|
+
provider_instance.configure(provider_config.config(options))
|
245
245
|
end
|
246
246
|
|
247
247
|
# Set harness context if available
|
@@ -251,55 +251,55 @@ module Aidp
|
|
251
251
|
end
|
252
252
|
|
253
253
|
# Set monitoring configuration
|
254
|
-
monitoring_config = provider_config.
|
254
|
+
monitoring_config = provider_config.monitoring_config(options)
|
255
255
|
if provider_instance.respond_to?(:set_monitoring_config)
|
256
256
|
provider_instance.set_monitoring_config(monitoring_config)
|
257
257
|
end
|
258
258
|
|
259
259
|
# Set rate limiting configuration
|
260
|
-
rate_limit_config = provider_config.
|
260
|
+
rate_limit_config = provider_config.rate_limit_config(options)
|
261
261
|
if provider_instance.respond_to?(:set_rate_limit_config)
|
262
262
|
provider_instance.set_rate_limit_config(rate_limit_config)
|
263
263
|
end
|
264
264
|
|
265
265
|
# Set retry configuration
|
266
|
-
retry_config = provider_config.
|
266
|
+
retry_config = provider_config.retry_config(options)
|
267
267
|
if provider_instance.respond_to?(:set_retry_config)
|
268
268
|
provider_instance.set_retry_config(retry_config)
|
269
269
|
end
|
270
270
|
|
271
271
|
# Set circuit breaker configuration
|
272
|
-
circuit_breaker_config = provider_config.
|
272
|
+
circuit_breaker_config = provider_config.circuit_breaker_config(options)
|
273
273
|
if provider_instance.respond_to?(:set_circuit_breaker_config)
|
274
274
|
provider_instance.set_circuit_breaker_config(circuit_breaker_config)
|
275
275
|
end
|
276
276
|
|
277
277
|
# Set cost configuration
|
278
|
-
cost_config = provider_config.
|
278
|
+
cost_config = provider_config.cost_config(options)
|
279
279
|
if provider_instance.respond_to?(:set_cost_config)
|
280
280
|
provider_instance.set_cost_config(cost_config)
|
281
281
|
end
|
282
282
|
|
283
283
|
# Set health check configuration
|
284
|
-
health_check_config = provider_config.
|
284
|
+
health_check_config = provider_config.health_check_config(options)
|
285
285
|
if provider_instance.respond_to?(:set_health_check_config)
|
286
286
|
provider_instance.set_health_check_config(health_check_config)
|
287
287
|
end
|
288
288
|
|
289
289
|
# Set log configuration
|
290
|
-
log_config = provider_config.
|
290
|
+
log_config = provider_config.log_config(options)
|
291
291
|
if provider_instance.respond_to?(:set_log_config)
|
292
292
|
provider_instance.set_log_config(log_config)
|
293
293
|
end
|
294
294
|
|
295
295
|
# Set cache configuration
|
296
|
-
cache_config = provider_config.
|
296
|
+
cache_config = provider_config.cache_config(options)
|
297
297
|
if provider_instance.respond_to?(:set_cache_config)
|
298
298
|
provider_instance.set_cache_config(cache_config)
|
299
299
|
end
|
300
300
|
|
301
301
|
# Set security configuration
|
302
|
-
security_config = provider_config.
|
302
|
+
security_config = provider_config.security_config(options)
|
303
303
|
if provider_instance.respond_to?(:set_security_config)
|
304
304
|
provider_instance.set_security_config(security_config)
|
305
305
|
end
|