ruby_llm-agents 1.3.3 → 2.0.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 +101 -334
- data/app/controllers/concerns/ruby_llm/agents/sortable.rb +0 -1
- data/app/controllers/ruby_llm/agents/agents_controller.rb +5 -56
- data/app/controllers/ruby_llm/agents/dashboard_controller.rb +22 -106
- data/app/controllers/ruby_llm/agents/executions_controller.rb +4 -114
- data/app/controllers/ruby_llm/agents/tenants_controller.rb +30 -2
- data/app/helpers/ruby_llm/agents/application_helper.rb +19 -53
- data/app/models/ruby_llm/agents/execution/analytics.rb +13 -54
- data/app/models/ruby_llm/agents/execution/scopes.rb +61 -14
- data/app/models/ruby_llm/agents/execution.rb +46 -10
- data/app/models/ruby_llm/agents/execution_detail.rb +18 -0
- data/app/models/ruby_llm/agents/tenant/budgetable.rb +132 -24
- data/app/models/ruby_llm/agents/tenant/incrementable.rb +117 -0
- data/app/models/ruby_llm/agents/tenant/resettable.rb +128 -0
- data/app/models/ruby_llm/agents/tenant/trackable.rb +46 -12
- data/app/models/ruby_llm/agents/tenant.rb +2 -3
- data/app/models/ruby_llm/agents/tenant_budget.rb +6 -3
- data/app/services/ruby_llm/agents/agent_registry.rb +6 -112
- data/app/views/layouts/ruby_llm/agents/application.html.erb +87 -252
- data/app/views/ruby_llm/agents/agents/_config_agent.html.erb +71 -218
- data/app/views/ruby_llm/agents/agents/_config_embedder.html.erb +20 -63
- data/app/views/ruby_llm/agents/agents/_config_image_generator.html.erb +44 -131
- data/app/views/ruby_llm/agents/agents/_config_moderator.html.erb +16 -57
- data/app/views/ruby_llm/agents/agents/_config_speaker.html.erb +39 -104
- data/app/views/ruby_llm/agents/agents/_config_transcriber.html.erb +29 -82
- data/app/views/ruby_llm/agents/agents/_empty_state.html.erb +4 -14
- data/app/views/ruby_llm/agents/agents/index.html.erb +105 -274
- data/app/views/ruby_llm/agents/agents/show.html.erb +248 -378
- data/app/views/ruby_llm/agents/dashboard/_action_center.html.erb +29 -52
- data/app/views/ruby_llm/agents/dashboard/_tenant_budget.html.erb +73 -99
- data/app/views/ruby_llm/agents/dashboard/index.html.erb +228 -433
- data/app/views/ruby_llm/agents/executions/_execution.html.erb +1 -1
- data/app/views/ruby_llm/agents/executions/_filters.html.erb +4 -25
- data/app/views/ruby_llm/agents/executions/_list.html.erb +111 -152
- data/app/views/ruby_llm/agents/executions/index.html.erb +5 -7
- data/app/views/ruby_llm/agents/executions/show.html.erb +528 -989
- data/app/views/ruby_llm/agents/shared/_agent_type_badge.html.erb +5 -21
- data/app/views/ruby_llm/agents/shared/_executions_table.html.erb +70 -191
- data/app/views/ruby_llm/agents/shared/_filter_dropdown.html.erb +16 -44
- data/app/views/ruby_llm/agents/shared/_select_dropdown.html.erb +12 -41
- data/app/views/ruby_llm/agents/shared/_status_badge.html.erb +11 -65
- data/app/views/ruby_llm/agents/shared/_tenant_filter.html.erb +6 -5
- data/app/views/ruby_llm/agents/system_config/show.html.erb +240 -351
- data/app/views/ruby_llm/agents/tenants/_form.html.erb +67 -77
- data/app/views/ruby_llm/agents/tenants/edit.html.erb +7 -9
- data/app/views/ruby_llm/agents/tenants/index.html.erb +100 -122
- data/app/views/ruby_llm/agents/tenants/show.html.erb +146 -336
- data/config/routes.rb +0 -13
- data/lib/generators/ruby_llm_agents/install_generator.rb +9 -14
- data/lib/generators/ruby_llm_agents/migrate_structure_generator.rb +2 -12
- data/lib/generators/ruby_llm_agents/restructure_generator.rb +0 -2
- data/lib/generators/ruby_llm_agents/templates/add_usage_counters_to_tenants_migration.rb.tt +37 -0
- data/lib/generators/ruby_llm_agents/templates/agent.rb.tt +1 -2
- data/lib/generators/ruby_llm_agents/templates/application_agent.rb.tt +1 -1
- data/lib/generators/ruby_llm_agents/templates/application_image_pipeline.rb.tt +0 -1
- data/lib/generators/ruby_llm_agents/templates/create_execution_details_migration.rb.tt +27 -0
- data/lib/generators/ruby_llm_agents/templates/create_tenants_migration.rb.tt +25 -0
- data/lib/generators/ruby_llm_agents/templates/image_pipeline.rb.tt +0 -1
- data/lib/generators/ruby_llm_agents/templates/initializer.rb.tt +9 -12
- data/lib/generators/ruby_llm_agents/templates/migration.rb.tt +40 -71
- data/lib/generators/ruby_llm_agents/templates/remove_agent_version_migration.rb.tt +13 -0
- data/lib/generators/ruby_llm_agents/templates/remove_workflow_columns_migration.rb.tt +19 -0
- data/lib/generators/ruby_llm_agents/templates/skills/AGENTS.md.tt +2 -4
- data/lib/generators/ruby_llm_agents/templates/skills/IMAGE_PIPELINES.md.tt +0 -1
- data/lib/generators/ruby_llm_agents/templates/split_execution_details_migration.rb.tt +232 -0
- data/lib/generators/ruby_llm_agents/upgrade_generator.rb +58 -262
- data/lib/ruby_llm/agents/audio/speaker.rb +0 -1
- data/lib/ruby_llm/agents/audio/transcriber.rb +0 -1
- data/lib/ruby_llm/agents/base_agent.rb +52 -6
- data/lib/ruby_llm/agents/core/base/callbacks.rb +142 -0
- data/lib/ruby_llm/agents/core/base.rb +23 -55
- data/lib/ruby_llm/agents/core/configuration.rb +58 -117
- data/lib/ruby_llm/agents/core/errors.rb +0 -58
- data/lib/ruby_llm/agents/core/instrumentation.rb +157 -110
- data/lib/ruby_llm/agents/core/llm_tenant.rb +8 -7
- data/lib/ruby_llm/agents/core/version.rb +1 -1
- data/lib/ruby_llm/agents/dsl/base.rb +157 -17
- data/lib/ruby_llm/agents/dsl/caching.rb +33 -2
- data/lib/ruby_llm/agents/dsl/reliability.rb +148 -0
- data/lib/ruby_llm/agents/dsl.rb +1 -2
- data/lib/ruby_llm/agents/image/analyzer/execution.rb +1 -2
- data/lib/ruby_llm/agents/image/background_remover/execution.rb +1 -2
- data/lib/ruby_llm/agents/image/concerns/image_operation_dsl.rb +1 -13
- data/lib/ruby_llm/agents/image/concerns/image_operation_execution.rb +2 -2
- data/lib/ruby_llm/agents/image/editor/dsl.rb +0 -14
- data/lib/ruby_llm/agents/image/editor/execution.rb +1 -10
- data/lib/ruby_llm/agents/image/editor.rb +0 -1
- data/lib/ruby_llm/agents/image/generator.rb +0 -21
- data/lib/ruby_llm/agents/image/pipeline/dsl.rb +0 -13
- data/lib/ruby_llm/agents/image/pipeline/execution.rb +0 -1
- data/lib/ruby_llm/agents/image/transformer/dsl.rb +0 -13
- data/lib/ruby_llm/agents/image/transformer/execution.rb +1 -10
- data/lib/ruby_llm/agents/image/transformer.rb +0 -1
- data/lib/ruby_llm/agents/image/upscaler/execution.rb +1 -2
- data/lib/ruby_llm/agents/image/variator/execution.rb +1 -2
- data/lib/ruby_llm/agents/infrastructure/alert_manager.rb +78 -173
- data/lib/ruby_llm/agents/infrastructure/attempt_tracker.rb +1 -0
- data/lib/ruby_llm/agents/infrastructure/budget/budget_query.rb +66 -2
- data/lib/ruby_llm/agents/infrastructure/budget/spend_recorder.rb +0 -12
- data/lib/ruby_llm/agents/infrastructure/circuit_breaker.rb +10 -13
- data/lib/ruby_llm/agents/infrastructure/reliability.rb +37 -2
- data/lib/ruby_llm/agents/pipeline/context.rb +0 -1
- data/lib/ruby_llm/agents/pipeline/middleware/budget.rb +28 -4
- data/lib/ruby_llm/agents/pipeline/middleware/cache.rb +3 -10
- data/lib/ruby_llm/agents/pipeline/middleware/instrumentation.rb +88 -55
- data/lib/ruby_llm/agents/pipeline/middleware/tenant.rb +5 -41
- data/lib/ruby_llm/agents/rails/engine.rb +6 -6
- data/lib/ruby_llm/agents/results/base.rb +1 -49
- data/lib/ruby_llm/agents/text/embedder.rb +0 -1
- data/lib/ruby_llm/agents.rb +1 -9
- data/lib/tasks/ruby_llm_agents.rake +34 -0
- metadata +12 -81
- data/app/controllers/ruby_llm/agents/api_configurations_controller.rb +0 -214
- data/app/controllers/ruby_llm/agents/workflows_controller.rb +0 -544
- data/app/mailers/ruby_llm/agents/alert_mailer.rb +0 -84
- data/app/mailers/ruby_llm/agents/application_mailer.rb +0 -28
- data/app/models/ruby_llm/agents/api_configuration.rb +0 -386
- data/app/models/ruby_llm/agents/execution/workflow.rb +0 -170
- data/app/models/ruby_llm/agents/tenant/configurable.rb +0 -135
- data/app/views/ruby_llm/agents/agents/_agent.html.erb +0 -98
- data/app/views/ruby_llm/agents/agents/_version_comparison.html.erb +0 -186
- data/app/views/ruby_llm/agents/agents/_workflow.html.erb +0 -126
- data/app/views/ruby_llm/agents/alert_mailer/alert_notification.html.erb +0 -107
- data/app/views/ruby_llm/agents/alert_mailer/alert_notification.text.erb +0 -18
- data/app/views/ruby_llm/agents/api_configurations/_api_key_field.html.erb +0 -34
- data/app/views/ruby_llm/agents/api_configurations/_form.html.erb +0 -288
- data/app/views/ruby_llm/agents/api_configurations/edit.html.erb +0 -95
- data/app/views/ruby_llm/agents/api_configurations/edit_tenant.html.erb +0 -97
- data/app/views/ruby_llm/agents/api_configurations/show.html.erb +0 -214
- data/app/views/ruby_llm/agents/api_configurations/tenant.html.erb +0 -179
- data/app/views/ruby_llm/agents/dashboard/_agent_comparison.html.erb +0 -73
- data/app/views/ruby_llm/agents/dashboard/_alerts_feed.html.erb +0 -62
- data/app/views/ruby_llm/agents/dashboard/_breaker_strip.html.erb +0 -47
- data/app/views/ruby_llm/agents/dashboard/_budgets_bar.html.erb +0 -75
- data/app/views/ruby_llm/agents/dashboard/_model_comparison.html.erb +0 -56
- data/app/views/ruby_llm/agents/dashboard/_model_cost_breakdown.html.erb +0 -115
- data/app/views/ruby_llm/agents/dashboard/_now_strip.html.erb +0 -59
- data/app/views/ruby_llm/agents/dashboard/_top_errors.html.erb +0 -60
- data/app/views/ruby_llm/agents/executions/_workflow_summary.html.erb +0 -86
- data/app/views/ruby_llm/agents/executions/dry_run.html.erb +0 -149
- data/app/views/ruby_llm/agents/shared/_breadcrumbs.html.erb +0 -48
- data/app/views/ruby_llm/agents/shared/_nav_link.html.erb +0 -27
- data/app/views/ruby_llm/agents/shared/_stat_card.html.erb +0 -14
- data/app/views/ruby_llm/agents/shared/_workflow_type_badge.html.erb +0 -35
- data/app/views/ruby_llm/agents/workflows/_empty_state.html.erb +0 -22
- data/app/views/ruby_llm/agents/workflows/_step_performance.html.erb +0 -228
- data/app/views/ruby_llm/agents/workflows/_structure_dsl.html.erb +0 -539
- data/app/views/ruby_llm/agents/workflows/_structure_parallel.html.erb +0 -76
- data/app/views/ruby_llm/agents/workflows/_structure_pipeline.html.erb +0 -74
- data/app/views/ruby_llm/agents/workflows/_structure_router.html.erb +0 -108
- data/app/views/ruby_llm/agents/workflows/_workflow_diagram.html.erb +0 -920
- data/app/views/ruby_llm/agents/workflows/index.html.erb +0 -179
- data/app/views/ruby_llm/agents/workflows/show.html.erb +0 -467
- data/lib/generators/ruby_llm_agents/api_configuration_generator.rb +0 -100
- data/lib/generators/ruby_llm_agents/templates/add_workflow_migration.rb.tt +0 -38
- data/lib/generators/ruby_llm_agents/templates/application_workflow.rb.tt +0 -48
- data/lib/generators/ruby_llm_agents/templates/create_api_configurations_migration.rb.tt +0 -90
- data/lib/generators/ruby_llm_agents/templates/skills/WORKFLOWS.md.tt +0 -551
- data/lib/ruby_llm/agents/core/base/moderation_dsl.rb +0 -181
- data/lib/ruby_llm/agents/core/base/moderation_execution.rb +0 -274
- data/lib/ruby_llm/agents/core/resolved_config.rb +0 -348
- data/lib/ruby_llm/agents/image/generator/content_policy.rb +0 -95
- data/lib/ruby_llm/agents/infrastructure/redactor.rb +0 -130
- data/lib/ruby_llm/agents/results/moderation_result.rb +0 -158
- data/lib/ruby_llm/agents/text/moderator.rb +0 -237
- data/lib/ruby_llm/agents/workflow/approval.rb +0 -205
- data/lib/ruby_llm/agents/workflow/approval_store.rb +0 -179
- data/lib/ruby_llm/agents/workflow/async.rb +0 -220
- data/lib/ruby_llm/agents/workflow/async_executor.rb +0 -156
- data/lib/ruby_llm/agents/workflow/dsl/executor.rb +0 -467
- data/lib/ruby_llm/agents/workflow/dsl/input_schema.rb +0 -244
- data/lib/ruby_llm/agents/workflow/dsl/iteration_executor.rb +0 -289
- data/lib/ruby_llm/agents/workflow/dsl/parallel_group.rb +0 -107
- data/lib/ruby_llm/agents/workflow/dsl/route_builder.rb +0 -150
- data/lib/ruby_llm/agents/workflow/dsl/schedule_helpers.rb +0 -187
- data/lib/ruby_llm/agents/workflow/dsl/step_config.rb +0 -352
- data/lib/ruby_llm/agents/workflow/dsl/step_executor.rb +0 -415
- data/lib/ruby_llm/agents/workflow/dsl/wait_config.rb +0 -257
- data/lib/ruby_llm/agents/workflow/dsl/wait_executor.rb +0 -317
- data/lib/ruby_llm/agents/workflow/dsl.rb +0 -576
- data/lib/ruby_llm/agents/workflow/instrumentation.rb +0 -249
- data/lib/ruby_llm/agents/workflow/notifiers/base.rb +0 -117
- data/lib/ruby_llm/agents/workflow/notifiers/email.rb +0 -117
- data/lib/ruby_llm/agents/workflow/notifiers/slack.rb +0 -180
- data/lib/ruby_llm/agents/workflow/notifiers/webhook.rb +0 -121
- data/lib/ruby_llm/agents/workflow/notifiers.rb +0 -70
- data/lib/ruby_llm/agents/workflow/orchestrator.rb +0 -416
- data/lib/ruby_llm/agents/workflow/result.rb +0 -592
- data/lib/ruby_llm/agents/workflow/thread_pool.rb +0 -185
- data/lib/ruby_llm/agents/workflow/throttle_manager.rb +0 -206
- data/lib/ruby_llm/agents/workflow/wait_result.rb +0 -213
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby_llm-agents
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- adham90
|
|
@@ -80,29 +80,24 @@ files:
|
|
|
80
80
|
- app/controllers/concerns/ruby_llm/agents/paginatable.rb
|
|
81
81
|
- app/controllers/concerns/ruby_llm/agents/sortable.rb
|
|
82
82
|
- app/controllers/ruby_llm/agents/agents_controller.rb
|
|
83
|
-
- app/controllers/ruby_llm/agents/api_configurations_controller.rb
|
|
84
83
|
- app/controllers/ruby_llm/agents/dashboard_controller.rb
|
|
85
84
|
- app/controllers/ruby_llm/agents/executions_controller.rb
|
|
86
85
|
- app/controllers/ruby_llm/agents/system_config_controller.rb
|
|
87
86
|
- app/controllers/ruby_llm/agents/tenants_controller.rb
|
|
88
|
-
- app/controllers/ruby_llm/agents/workflows_controller.rb
|
|
89
87
|
- app/helpers/ruby_llm/agents/application_helper.rb
|
|
90
|
-
- app/mailers/ruby_llm/agents/alert_mailer.rb
|
|
91
|
-
- app/mailers/ruby_llm/agents/application_mailer.rb
|
|
92
|
-
- app/models/ruby_llm/agents/api_configuration.rb
|
|
93
88
|
- app/models/ruby_llm/agents/execution.rb
|
|
94
89
|
- app/models/ruby_llm/agents/execution/analytics.rb
|
|
95
90
|
- app/models/ruby_llm/agents/execution/metrics.rb
|
|
96
91
|
- app/models/ruby_llm/agents/execution/scopes.rb
|
|
97
|
-
- app/models/ruby_llm/agents/
|
|
92
|
+
- app/models/ruby_llm/agents/execution_detail.rb
|
|
98
93
|
- app/models/ruby_llm/agents/tenant.rb
|
|
99
94
|
- app/models/ruby_llm/agents/tenant/budgetable.rb
|
|
100
|
-
- app/models/ruby_llm/agents/tenant/
|
|
95
|
+
- app/models/ruby_llm/agents/tenant/incrementable.rb
|
|
96
|
+
- app/models/ruby_llm/agents/tenant/resettable.rb
|
|
101
97
|
- app/models/ruby_llm/agents/tenant/trackable.rb
|
|
102
98
|
- app/models/ruby_llm/agents/tenant_budget.rb
|
|
103
99
|
- app/services/ruby_llm/agents/agent_registry.rb
|
|
104
100
|
- app/views/layouts/ruby_llm/agents/application.html.erb
|
|
105
|
-
- app/views/ruby_llm/agents/agents/_agent.html.erb
|
|
106
101
|
- app/views/ruby_llm/agents/agents/_config_agent.html.erb
|
|
107
102
|
- app/views/ruby_llm/agents/agents/_config_embedder.html.erb
|
|
108
103
|
- app/views/ruby_llm/agents/agents/_config_image_generator.html.erb
|
|
@@ -111,66 +106,32 @@ files:
|
|
|
111
106
|
- app/views/ruby_llm/agents/agents/_config_transcriber.html.erb
|
|
112
107
|
- app/views/ruby_llm/agents/agents/_empty_state.html.erb
|
|
113
108
|
- app/views/ruby_llm/agents/agents/_sortable_header.html.erb
|
|
114
|
-
- app/views/ruby_llm/agents/agents/_version_comparison.html.erb
|
|
115
|
-
- app/views/ruby_llm/agents/agents/_workflow.html.erb
|
|
116
109
|
- app/views/ruby_llm/agents/agents/index.html.erb
|
|
117
110
|
- app/views/ruby_llm/agents/agents/show.html.erb
|
|
118
|
-
- app/views/ruby_llm/agents/alert_mailer/alert_notification.html.erb
|
|
119
|
-
- app/views/ruby_llm/agents/alert_mailer/alert_notification.text.erb
|
|
120
|
-
- app/views/ruby_llm/agents/api_configurations/_api_key_field.html.erb
|
|
121
|
-
- app/views/ruby_llm/agents/api_configurations/_form.html.erb
|
|
122
|
-
- app/views/ruby_llm/agents/api_configurations/edit.html.erb
|
|
123
|
-
- app/views/ruby_llm/agents/api_configurations/edit_tenant.html.erb
|
|
124
|
-
- app/views/ruby_llm/agents/api_configurations/show.html.erb
|
|
125
|
-
- app/views/ruby_llm/agents/api_configurations/tenant.html.erb
|
|
126
111
|
- app/views/ruby_llm/agents/dashboard/_action_center.html.erb
|
|
127
|
-
- app/views/ruby_llm/agents/dashboard/_agent_comparison.html.erb
|
|
128
|
-
- app/views/ruby_llm/agents/dashboard/_alerts_feed.html.erb
|
|
129
|
-
- app/views/ruby_llm/agents/dashboard/_breaker_strip.html.erb
|
|
130
|
-
- app/views/ruby_llm/agents/dashboard/_budgets_bar.html.erb
|
|
131
|
-
- app/views/ruby_llm/agents/dashboard/_model_comparison.html.erb
|
|
132
|
-
- app/views/ruby_llm/agents/dashboard/_model_cost_breakdown.html.erb
|
|
133
|
-
- app/views/ruby_llm/agents/dashboard/_now_strip.html.erb
|
|
134
112
|
- app/views/ruby_llm/agents/dashboard/_tenant_budget.html.erb
|
|
135
|
-
- app/views/ruby_llm/agents/dashboard/_top_errors.html.erb
|
|
136
113
|
- app/views/ruby_llm/agents/dashboard/index.html.erb
|
|
137
114
|
- app/views/ruby_llm/agents/executions/_execution.html.erb
|
|
138
115
|
- app/views/ruby_llm/agents/executions/_filters.html.erb
|
|
139
116
|
- app/views/ruby_llm/agents/executions/_list.html.erb
|
|
140
|
-
- app/views/ruby_llm/agents/executions/_workflow_summary.html.erb
|
|
141
|
-
- app/views/ruby_llm/agents/executions/dry_run.html.erb
|
|
142
117
|
- app/views/ruby_llm/agents/executions/index.html.erb
|
|
143
118
|
- app/views/ruby_llm/agents/executions/show.html.erb
|
|
144
119
|
- app/views/ruby_llm/agents/shared/_agent_type_badge.html.erb
|
|
145
|
-
- app/views/ruby_llm/agents/shared/_breadcrumbs.html.erb
|
|
146
120
|
- app/views/ruby_llm/agents/shared/_doc_link.html.erb
|
|
147
121
|
- app/views/ruby_llm/agents/shared/_executions_table.html.erb
|
|
148
122
|
- app/views/ruby_llm/agents/shared/_filter_dropdown.html.erb
|
|
149
|
-
- app/views/ruby_llm/agents/shared/_nav_link.html.erb
|
|
150
123
|
- app/views/ruby_llm/agents/shared/_select_dropdown.html.erb
|
|
151
124
|
- app/views/ruby_llm/agents/shared/_sortable_header.html.erb
|
|
152
|
-
- app/views/ruby_llm/agents/shared/_stat_card.html.erb
|
|
153
125
|
- app/views/ruby_llm/agents/shared/_status_badge.html.erb
|
|
154
126
|
- app/views/ruby_llm/agents/shared/_status_dot.html.erb
|
|
155
127
|
- app/views/ruby_llm/agents/shared/_tenant_filter.html.erb
|
|
156
|
-
- app/views/ruby_llm/agents/shared/_workflow_type_badge.html.erb
|
|
157
128
|
- app/views/ruby_llm/agents/system_config/show.html.erb
|
|
158
129
|
- app/views/ruby_llm/agents/tenants/_form.html.erb
|
|
159
130
|
- app/views/ruby_llm/agents/tenants/edit.html.erb
|
|
160
131
|
- app/views/ruby_llm/agents/tenants/index.html.erb
|
|
161
132
|
- app/views/ruby_llm/agents/tenants/show.html.erb
|
|
162
|
-
- app/views/ruby_llm/agents/workflows/_empty_state.html.erb
|
|
163
|
-
- app/views/ruby_llm/agents/workflows/_step_performance.html.erb
|
|
164
|
-
- app/views/ruby_llm/agents/workflows/_structure_dsl.html.erb
|
|
165
|
-
- app/views/ruby_llm/agents/workflows/_structure_parallel.html.erb
|
|
166
|
-
- app/views/ruby_llm/agents/workflows/_structure_pipeline.html.erb
|
|
167
|
-
- app/views/ruby_llm/agents/workflows/_structure_router.html.erb
|
|
168
|
-
- app/views/ruby_llm/agents/workflows/_workflow_diagram.html.erb
|
|
169
|
-
- app/views/ruby_llm/agents/workflows/index.html.erb
|
|
170
|
-
- app/views/ruby_llm/agents/workflows/show.html.erb
|
|
171
133
|
- config/routes.rb
|
|
172
134
|
- lib/generators/ruby_llm_agents/agent_generator.rb
|
|
173
|
-
- lib/generators/ruby_llm_agents/api_configuration_generator.rb
|
|
174
135
|
- lib/generators/ruby_llm_agents/background_remover_generator.rb
|
|
175
136
|
- lib/generators/ruby_llm_agents/embedder_generator.rb
|
|
176
137
|
- lib/generators/ruby_llm_agents/image_analyzer_generator.rb
|
|
@@ -195,7 +156,7 @@ files:
|
|
|
195
156
|
- lib/generators/ruby_llm_agents/templates/add_tenant_to_executions_migration.rb.tt
|
|
196
157
|
- lib/generators/ruby_llm_agents/templates/add_tool_calls_migration.rb.tt
|
|
197
158
|
- lib/generators/ruby_llm_agents/templates/add_tracing_migration.rb.tt
|
|
198
|
-
- lib/generators/ruby_llm_agents/templates/
|
|
159
|
+
- lib/generators/ruby_llm_agents/templates/add_usage_counters_to_tenants_migration.rb.tt
|
|
199
160
|
- lib/generators/ruby_llm_agents/templates/agent.rb.tt
|
|
200
161
|
- lib/generators/ruby_llm_agents/templates/application_agent.rb.tt
|
|
201
162
|
- lib/generators/ruby_llm_agents/templates/application_background_remover.rb.tt
|
|
@@ -209,9 +170,8 @@ files:
|
|
|
209
170
|
- lib/generators/ruby_llm_agents/templates/application_image_variator.rb.tt
|
|
210
171
|
- lib/generators/ruby_llm_agents/templates/application_speaker.rb.tt
|
|
211
172
|
- lib/generators/ruby_llm_agents/templates/application_transcriber.rb.tt
|
|
212
|
-
- lib/generators/ruby_llm_agents/templates/application_workflow.rb.tt
|
|
213
173
|
- lib/generators/ruby_llm_agents/templates/background_remover.rb.tt
|
|
214
|
-
- lib/generators/ruby_llm_agents/templates/
|
|
174
|
+
- lib/generators/ruby_llm_agents/templates/create_execution_details_migration.rb.tt
|
|
215
175
|
- lib/generators/ruby_llm_agents/templates/create_tenant_budgets_migration.rb.tt
|
|
216
176
|
- lib/generators/ruby_llm_agents/templates/create_tenants_migration.rb.tt
|
|
217
177
|
- lib/generators/ruby_llm_agents/templates/embedder.rb.tt
|
|
@@ -224,6 +184,8 @@ files:
|
|
|
224
184
|
- lib/generators/ruby_llm_agents/templates/image_variator.rb.tt
|
|
225
185
|
- lib/generators/ruby_llm_agents/templates/initializer.rb.tt
|
|
226
186
|
- lib/generators/ruby_llm_agents/templates/migration.rb.tt
|
|
187
|
+
- lib/generators/ruby_llm_agents/templates/remove_agent_version_migration.rb.tt
|
|
188
|
+
- lib/generators/ruby_llm_agents/templates/remove_workflow_columns_migration.rb.tt
|
|
227
189
|
- lib/generators/ruby_llm_agents/templates/rename_tenant_budgets_to_tenants_migration.rb.tt
|
|
228
190
|
- lib/generators/ruby_llm_agents/templates/skills/AGENTS.md.tt
|
|
229
191
|
- lib/generators/ruby_llm_agents/templates/skills/BACKGROUND_REMOVERS.md.tt
|
|
@@ -238,8 +200,8 @@ files:
|
|
|
238
200
|
- lib/generators/ruby_llm_agents/templates/skills/SPEAKERS.md.tt
|
|
239
201
|
- lib/generators/ruby_llm_agents/templates/skills/TOOLS.md.tt
|
|
240
202
|
- lib/generators/ruby_llm_agents/templates/skills/TRANSCRIBERS.md.tt
|
|
241
|
-
- lib/generators/ruby_llm_agents/templates/skills/WORKFLOWS.md.tt
|
|
242
203
|
- lib/generators/ruby_llm_agents/templates/speaker.rb.tt
|
|
204
|
+
- lib/generators/ruby_llm_agents/templates/split_execution_details_migration.rb.tt
|
|
243
205
|
- lib/generators/ruby_llm_agents/templates/transcriber.rb.tt
|
|
244
206
|
- lib/generators/ruby_llm_agents/transcriber_generator.rb
|
|
245
207
|
- lib/generators/ruby_llm_agents/upgrade_generator.rb
|
|
@@ -249,15 +211,13 @@ files:
|
|
|
249
211
|
- lib/ruby_llm/agents/audio/transcriber.rb
|
|
250
212
|
- lib/ruby_llm/agents/base_agent.rb
|
|
251
213
|
- lib/ruby_llm/agents/core/base.rb
|
|
252
|
-
- lib/ruby_llm/agents/core/base/
|
|
253
|
-
- lib/ruby_llm/agents/core/base/moderation_execution.rb
|
|
214
|
+
- lib/ruby_llm/agents/core/base/callbacks.rb
|
|
254
215
|
- lib/ruby_llm/agents/core/configuration.rb
|
|
255
216
|
- lib/ruby_llm/agents/core/deprecations.rb
|
|
256
217
|
- lib/ruby_llm/agents/core/errors.rb
|
|
257
218
|
- lib/ruby_llm/agents/core/inflections.rb
|
|
258
219
|
- lib/ruby_llm/agents/core/instrumentation.rb
|
|
259
220
|
- lib/ruby_llm/agents/core/llm_tenant.rb
|
|
260
|
-
- lib/ruby_llm/agents/core/resolved_config.rb
|
|
261
221
|
- lib/ruby_llm/agents/core/version.rb
|
|
262
222
|
- lib/ruby_llm/agents/dsl.rb
|
|
263
223
|
- lib/ruby_llm/agents/dsl/base.rb
|
|
@@ -276,7 +236,6 @@ files:
|
|
|
276
236
|
- lib/ruby_llm/agents/image/editor/execution.rb
|
|
277
237
|
- lib/ruby_llm/agents/image/generator.rb
|
|
278
238
|
- lib/ruby_llm/agents/image/generator/active_storage_support.rb
|
|
279
|
-
- lib/ruby_llm/agents/image/generator/content_policy.rb
|
|
280
239
|
- lib/ruby_llm/agents/image/generator/pricing.rb
|
|
281
240
|
- lib/ruby_llm/agents/image/generator/templates.rb
|
|
282
241
|
- lib/ruby_llm/agents/image/pipeline.rb
|
|
@@ -301,7 +260,6 @@ files:
|
|
|
301
260
|
- lib/ruby_llm/agents/infrastructure/cache_helper.rb
|
|
302
261
|
- lib/ruby_llm/agents/infrastructure/circuit_breaker.rb
|
|
303
262
|
- lib/ruby_llm/agents/infrastructure/execution_logger_job.rb
|
|
304
|
-
- lib/ruby_llm/agents/infrastructure/redactor.rb
|
|
305
263
|
- lib/ruby_llm/agents/infrastructure/reliability.rb
|
|
306
264
|
- lib/ruby_llm/agents/infrastructure/reliability/breaker_manager.rb
|
|
307
265
|
- lib/ruby_llm/agents/infrastructure/reliability/execution_constraints.rb
|
|
@@ -329,37 +287,10 @@ files:
|
|
|
329
287
|
- lib/ruby_llm/agents/results/image_transform_result.rb
|
|
330
288
|
- lib/ruby_llm/agents/results/image_upscale_result.rb
|
|
331
289
|
- lib/ruby_llm/agents/results/image_variation_result.rb
|
|
332
|
-
- lib/ruby_llm/agents/results/moderation_result.rb
|
|
333
290
|
- lib/ruby_llm/agents/results/speech_result.rb
|
|
334
291
|
- lib/ruby_llm/agents/results/transcription_result.rb
|
|
335
292
|
- lib/ruby_llm/agents/text/embedder.rb
|
|
336
|
-
- lib/
|
|
337
|
-
- lib/ruby_llm/agents/workflow/approval.rb
|
|
338
|
-
- lib/ruby_llm/agents/workflow/approval_store.rb
|
|
339
|
-
- lib/ruby_llm/agents/workflow/async.rb
|
|
340
|
-
- lib/ruby_llm/agents/workflow/async_executor.rb
|
|
341
|
-
- lib/ruby_llm/agents/workflow/dsl.rb
|
|
342
|
-
- lib/ruby_llm/agents/workflow/dsl/executor.rb
|
|
343
|
-
- lib/ruby_llm/agents/workflow/dsl/input_schema.rb
|
|
344
|
-
- lib/ruby_llm/agents/workflow/dsl/iteration_executor.rb
|
|
345
|
-
- lib/ruby_llm/agents/workflow/dsl/parallel_group.rb
|
|
346
|
-
- lib/ruby_llm/agents/workflow/dsl/route_builder.rb
|
|
347
|
-
- lib/ruby_llm/agents/workflow/dsl/schedule_helpers.rb
|
|
348
|
-
- lib/ruby_llm/agents/workflow/dsl/step_config.rb
|
|
349
|
-
- lib/ruby_llm/agents/workflow/dsl/step_executor.rb
|
|
350
|
-
- lib/ruby_llm/agents/workflow/dsl/wait_config.rb
|
|
351
|
-
- lib/ruby_llm/agents/workflow/dsl/wait_executor.rb
|
|
352
|
-
- lib/ruby_llm/agents/workflow/instrumentation.rb
|
|
353
|
-
- lib/ruby_llm/agents/workflow/notifiers.rb
|
|
354
|
-
- lib/ruby_llm/agents/workflow/notifiers/base.rb
|
|
355
|
-
- lib/ruby_llm/agents/workflow/notifiers/email.rb
|
|
356
|
-
- lib/ruby_llm/agents/workflow/notifiers/slack.rb
|
|
357
|
-
- lib/ruby_llm/agents/workflow/notifiers/webhook.rb
|
|
358
|
-
- lib/ruby_llm/agents/workflow/orchestrator.rb
|
|
359
|
-
- lib/ruby_llm/agents/workflow/result.rb
|
|
360
|
-
- lib/ruby_llm/agents/workflow/thread_pool.rb
|
|
361
|
-
- lib/ruby_llm/agents/workflow/throttle_manager.rb
|
|
362
|
-
- lib/ruby_llm/agents/workflow/wait_result.rb
|
|
293
|
+
- lib/tasks/ruby_llm_agents.rake
|
|
363
294
|
homepage: https://github.com/adham90/ruby_llm-agents
|
|
364
295
|
licenses:
|
|
365
296
|
- MIT
|
|
@@ -381,7 +312,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
381
312
|
- !ruby/object:Gem::Version
|
|
382
313
|
version: '0'
|
|
383
314
|
requirements: []
|
|
384
|
-
rubygems_version:
|
|
315
|
+
rubygems_version: 4.0.3
|
|
385
316
|
specification_version: 4
|
|
386
317
|
summary: Agent framework for building LLM-powered agents with RubyLLM
|
|
387
318
|
test_files: []
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module RubyLLM
|
|
4
|
-
module Agents
|
|
5
|
-
# Controller for managing API configurations
|
|
6
|
-
#
|
|
7
|
-
# Provides CRUD operations for global and tenant-specific API
|
|
8
|
-
# configurations, including API keys and connection settings.
|
|
9
|
-
#
|
|
10
|
-
# @see ApiConfiguration
|
|
11
|
-
# @api private
|
|
12
|
-
class ApiConfigurationsController < ApplicationController
|
|
13
|
-
before_action :ensure_table_exists
|
|
14
|
-
before_action :set_global_config, only: [:show, :edit, :update]
|
|
15
|
-
before_action :set_tenant_config, only: [:tenant, :edit_tenant, :update_tenant]
|
|
16
|
-
|
|
17
|
-
# Displays the global API configuration
|
|
18
|
-
#
|
|
19
|
-
# @return [void]
|
|
20
|
-
def show
|
|
21
|
-
@resolved = ApiConfiguration.resolve
|
|
22
|
-
@provider_statuses = @resolved.provider_statuses_with_source
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
# Renders the edit form for global configuration
|
|
26
|
-
#
|
|
27
|
-
# @return [void]
|
|
28
|
-
def edit
|
|
29
|
-
@resolved = ApiConfiguration.resolve
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Updates the global API configuration
|
|
33
|
-
#
|
|
34
|
-
# @return [void]
|
|
35
|
-
def update
|
|
36
|
-
if @config.update(api_configuration_params)
|
|
37
|
-
log_configuration_change(@config, "global")
|
|
38
|
-
redirect_to edit_api_configuration_path, notice: "API configuration updated successfully"
|
|
39
|
-
else
|
|
40
|
-
render :edit, status: :unprocessable_entity
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
# Displays tenant-specific API configuration
|
|
45
|
-
#
|
|
46
|
-
# @return [void]
|
|
47
|
-
def tenant
|
|
48
|
-
@resolved = ApiConfiguration.resolve(tenant_id: params[:tenant_id])
|
|
49
|
-
@provider_statuses = @resolved.provider_statuses_with_source
|
|
50
|
-
@tenant_budget = TenantBudget.for_tenant(params[:tenant_id])
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
# Renders the edit form for tenant configuration
|
|
54
|
-
#
|
|
55
|
-
# @return [void]
|
|
56
|
-
def edit_tenant
|
|
57
|
-
@resolved = ApiConfiguration.resolve(tenant_id: @tenant_id)
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
# Updates a tenant-specific API configuration
|
|
61
|
-
#
|
|
62
|
-
# @return [void]
|
|
63
|
-
def update_tenant
|
|
64
|
-
if @config.update(api_configuration_params)
|
|
65
|
-
log_configuration_change(@config, "tenant:#{params[:tenant_id]}")
|
|
66
|
-
redirect_to edit_tenant_api_configuration_path(params[:tenant_id]),
|
|
67
|
-
notice: "Tenant API configuration updated successfully"
|
|
68
|
-
else
|
|
69
|
-
render :edit_tenant, status: :unprocessable_entity
|
|
70
|
-
end
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
# Tests API key validity for a specific provider
|
|
74
|
-
# (Optional - can be used for AJAX validation)
|
|
75
|
-
#
|
|
76
|
-
# @return [void]
|
|
77
|
-
def test_connection
|
|
78
|
-
provider = params[:provider]
|
|
79
|
-
api_key = params[:api_key]
|
|
80
|
-
|
|
81
|
-
result = test_provider_connection(provider, api_key)
|
|
82
|
-
|
|
83
|
-
render json: {
|
|
84
|
-
success: result[:success],
|
|
85
|
-
message: result[:message],
|
|
86
|
-
models: result[:models]
|
|
87
|
-
}
|
|
88
|
-
rescue StandardError => e
|
|
89
|
-
render json: { success: false, message: e.message }
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
private
|
|
93
|
-
|
|
94
|
-
# Ensures the api_configurations table exists
|
|
95
|
-
def ensure_table_exists
|
|
96
|
-
return if ApiConfiguration.table_exists?
|
|
97
|
-
|
|
98
|
-
flash[:alert] = "API configurations table not found. Run the generator: rails generate ruby_llm_agents:api_configuration"
|
|
99
|
-
redirect_to root_path
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
# Sets the global configuration (creates if not exists)
|
|
103
|
-
def set_global_config
|
|
104
|
-
@config = ApiConfiguration.global
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
# Sets the tenant-specific configuration (creates if not exists)
|
|
108
|
-
def set_tenant_config
|
|
109
|
-
@tenant_id = params[:tenant_id]
|
|
110
|
-
raise ActionController::RoutingError, "Tenant ID required" if @tenant_id.blank?
|
|
111
|
-
|
|
112
|
-
@config = ApiConfiguration.for_tenant!(@tenant_id)
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
# Strong parameters for API configuration
|
|
116
|
-
#
|
|
117
|
-
# @return [ActionController::Parameters]
|
|
118
|
-
def api_configuration_params
|
|
119
|
-
params.require(:api_configuration).permit(
|
|
120
|
-
# API Keys
|
|
121
|
-
:openai_api_key,
|
|
122
|
-
:anthropic_api_key,
|
|
123
|
-
:gemini_api_key,
|
|
124
|
-
:deepseek_api_key,
|
|
125
|
-
:mistral_api_key,
|
|
126
|
-
:perplexity_api_key,
|
|
127
|
-
:openrouter_api_key,
|
|
128
|
-
:gpustack_api_key,
|
|
129
|
-
:xai_api_key,
|
|
130
|
-
:ollama_api_key,
|
|
131
|
-
# AWS Bedrock
|
|
132
|
-
:bedrock_api_key,
|
|
133
|
-
:bedrock_secret_key,
|
|
134
|
-
:bedrock_session_token,
|
|
135
|
-
:bedrock_region,
|
|
136
|
-
# Vertex AI
|
|
137
|
-
:vertexai_credentials,
|
|
138
|
-
:vertexai_project_id,
|
|
139
|
-
:vertexai_location,
|
|
140
|
-
# Endpoints
|
|
141
|
-
:openai_api_base,
|
|
142
|
-
:gemini_api_base,
|
|
143
|
-
:ollama_api_base,
|
|
144
|
-
:gpustack_api_base,
|
|
145
|
-
:xai_api_base,
|
|
146
|
-
# OpenAI Options
|
|
147
|
-
:openai_organization_id,
|
|
148
|
-
:openai_project_id,
|
|
149
|
-
# Default Models
|
|
150
|
-
:default_model,
|
|
151
|
-
:default_embedding_model,
|
|
152
|
-
:default_image_model,
|
|
153
|
-
:default_moderation_model,
|
|
154
|
-
# Connection Settings
|
|
155
|
-
:request_timeout,
|
|
156
|
-
:max_retries,
|
|
157
|
-
:retry_interval,
|
|
158
|
-
:retry_backoff_factor,
|
|
159
|
-
:retry_interval_randomness,
|
|
160
|
-
:http_proxy,
|
|
161
|
-
# Inheritance
|
|
162
|
-
:inherit_global_defaults
|
|
163
|
-
).tap do |permitted|
|
|
164
|
-
# Remove blank API keys to prevent overwriting with empty values
|
|
165
|
-
# This allows users to submit forms without touching existing keys
|
|
166
|
-
ApiConfiguration::API_KEY_ATTRIBUTES.each do |key|
|
|
167
|
-
permitted.delete(key) if permitted[key].blank?
|
|
168
|
-
end
|
|
169
|
-
end
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
# Logs configuration changes for audit purposes
|
|
173
|
-
#
|
|
174
|
-
# @param config [ApiConfiguration] The configuration that changed
|
|
175
|
-
# @param scope [String] The scope identifier
|
|
176
|
-
def log_configuration_change(config, scope)
|
|
177
|
-
changed_fields = config.previous_changes.keys.reject { |k| k.end_with?("_at") }
|
|
178
|
-
return if changed_fields.empty?
|
|
179
|
-
|
|
180
|
-
# Mask sensitive fields in the log
|
|
181
|
-
masked_changes = changed_fields.map do |field|
|
|
182
|
-
if field.include?("api_key") || field.include?("secret") || field.include?("credentials")
|
|
183
|
-
"#{field}: [REDACTED]"
|
|
184
|
-
else
|
|
185
|
-
"#{field}: #{config.previous_changes[field].last}"
|
|
186
|
-
end
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
Rails.logger.info(
|
|
190
|
-
"[RubyLLM::Agents] API configuration updated for #{scope}: #{masked_changes.join(', ')}"
|
|
191
|
-
)
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
# Tests connection to a specific provider
|
|
195
|
-
#
|
|
196
|
-
# @param provider [String] Provider key
|
|
197
|
-
# @param api_key [String] API key to test
|
|
198
|
-
# @return [Hash] Test result with success, message, and models
|
|
199
|
-
def test_provider_connection(provider, api_key)
|
|
200
|
-
# This is a placeholder - actual implementation would depend on
|
|
201
|
-
# RubyLLM's ability to list models or make a test request
|
|
202
|
-
case provider
|
|
203
|
-
when "openai"
|
|
204
|
-
# Example: Try to list models
|
|
205
|
-
{ success: true, message: "Connection successful", models: [] }
|
|
206
|
-
when "anthropic"
|
|
207
|
-
{ success: true, message: "Connection successful", models: [] }
|
|
208
|
-
else
|
|
209
|
-
{ success: false, message: "Provider not supported for testing" }
|
|
210
|
-
end
|
|
211
|
-
end
|
|
212
|
-
end
|
|
213
|
-
end
|
|
214
|
-
end
|