ruby_llm-agents 1.0.0 → 1.2.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.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/ruby_llm/agents/paginatable.rb +9 -3
  3. data/app/controllers/concerns/ruby_llm/agents/sortable.rb +58 -0
  4. data/app/controllers/ruby_llm/agents/agents_controller.rb +59 -16
  5. data/app/controllers/ruby_llm/agents/dashboard_controller.rb +144 -20
  6. data/app/controllers/ruby_llm/agents/executions_controller.rb +13 -16
  7. data/app/controllers/ruby_llm/agents/workflows_controller.rb +279 -90
  8. data/app/helpers/ruby_llm/agents/application_helper.rb +100 -0
  9. data/app/mailers/ruby_llm/agents/alert_mailer.rb +84 -0
  10. data/app/mailers/ruby_llm/agents/application_mailer.rb +28 -0
  11. data/app/models/ruby_llm/agents/execution/analytics.rb +170 -20
  12. data/app/models/ruby_llm/agents/execution/scopes.rb +0 -31
  13. data/app/models/ruby_llm/agents/execution/workflow.rb +0 -129
  14. data/app/models/ruby_llm/agents/execution.rb +50 -14
  15. data/app/models/ruby_llm/agents/tenant/budgetable.rb +277 -0
  16. data/app/models/ruby_llm/agents/tenant/configurable.rb +135 -0
  17. data/app/models/ruby_llm/agents/tenant/trackable.rb +310 -0
  18. data/app/models/ruby_llm/agents/tenant.rb +146 -0
  19. data/app/models/ruby_llm/agents/tenant_budget.rb +12 -253
  20. data/app/services/ruby_llm/agents/agent_registry.rb +18 -12
  21. data/app/views/layouts/ruby_llm/agents/application.html.erb +72 -76
  22. data/app/views/ruby_llm/agents/agents/_agent.html.erb +0 -12
  23. data/app/views/ruby_llm/agents/agents/_sortable_header.html.erb +56 -0
  24. data/app/views/ruby_llm/agents/agents/_workflow.html.erb +5 -15
  25. data/app/views/ruby_llm/agents/agents/index.html.erb +271 -100
  26. data/app/views/ruby_llm/agents/agents/show.html.erb +1 -0
  27. data/app/views/ruby_llm/agents/alert_mailer/alert_notification.html.erb +107 -0
  28. data/app/views/ruby_llm/agents/alert_mailer/alert_notification.text.erb +18 -0
  29. data/app/views/ruby_llm/agents/api_configurations/show.html.erb +4 -1
  30. data/app/views/ruby_llm/agents/dashboard/_agent_comparison.html.erb +66 -359
  31. data/app/views/ruby_llm/agents/dashboard/_model_comparison.html.erb +56 -0
  32. data/app/views/ruby_llm/agents/dashboard/_model_cost_breakdown.html.erb +115 -0
  33. data/app/views/ruby_llm/agents/dashboard/_now_strip.html.erb +35 -60
  34. data/app/views/ruby_llm/agents/dashboard/_top_errors.html.erb +17 -6
  35. data/app/views/ruby_llm/agents/dashboard/index.html.erb +373 -72
  36. data/app/views/ruby_llm/agents/executions/_execution.html.erb +0 -1
  37. data/app/views/ruby_llm/agents/executions/_filters.html.erb +51 -39
  38. data/app/views/ruby_llm/agents/executions/_list.html.erb +53 -195
  39. data/app/views/ruby_llm/agents/executions/_workflow_summary.html.erb +5 -20
  40. data/app/views/ruby_llm/agents/executions/index.html.erb +7 -83
  41. data/app/views/ruby_llm/agents/executions/show.html.erb +10 -20
  42. data/app/views/ruby_llm/agents/shared/_agent_type_badge.html.erb +2 -1
  43. data/app/views/ruby_llm/agents/shared/_doc_link.html.erb +12 -0
  44. data/app/views/ruby_llm/agents/shared/_executions_table.html.erb +3 -15
  45. data/app/views/ruby_llm/agents/shared/_filter_dropdown.html.erb +1 -1
  46. data/app/views/ruby_llm/agents/shared/_select_dropdown.html.erb +1 -1
  47. data/app/views/ruby_llm/agents/shared/_sortable_header.html.erb +53 -0
  48. data/app/views/ruby_llm/agents/shared/_status_badge.html.erb +7 -0
  49. data/app/views/ruby_llm/agents/shared/_status_dot.html.erb +1 -1
  50. data/app/views/ruby_llm/agents/shared/_workflow_type_badge.html.erb +9 -35
  51. data/app/views/ruby_llm/agents/system_config/show.html.erb +4 -1
  52. data/app/views/ruby_llm/agents/tenants/index.html.erb +4 -1
  53. data/app/views/ruby_llm/agents/workflows/_step_performance.html.erb +7 -15
  54. data/app/views/ruby_llm/agents/workflows/_structure_dsl.html.erb +539 -0
  55. data/app/views/ruby_llm/agents/workflows/_workflow_diagram.html.erb +920 -0
  56. data/app/views/ruby_llm/agents/workflows/index.html.erb +179 -0
  57. data/app/views/ruby_llm/agents/workflows/show.html.erb +164 -139
  58. data/config/routes.rb +1 -1
  59. data/lib/generators/ruby_llm_agents/agent_generator.rb +6 -36
  60. data/lib/generators/ruby_llm_agents/background_remover_generator.rb +7 -37
  61. data/lib/generators/ruby_llm_agents/embedder_generator.rb +5 -38
  62. data/lib/generators/ruby_llm_agents/image_analyzer_generator.rb +7 -37
  63. data/lib/generators/ruby_llm_agents/image_editor_generator.rb +7 -37
  64. data/lib/generators/ruby_llm_agents/image_generator_generator.rb +8 -41
  65. data/lib/generators/ruby_llm_agents/image_pipeline_generator.rb +18 -46
  66. data/lib/generators/ruby_llm_agents/image_transformer_generator.rb +7 -37
  67. data/lib/generators/ruby_llm_agents/image_upscaler_generator.rb +7 -37
  68. data/lib/generators/ruby_llm_agents/image_variator_generator.rb +7 -37
  69. data/lib/generators/ruby_llm_agents/install_generator.rb +33 -56
  70. data/lib/generators/ruby_llm_agents/migrate_structure_generator.rb +480 -0
  71. data/lib/generators/ruby_llm_agents/multi_tenancy_generator.rb +42 -22
  72. data/lib/generators/ruby_llm_agents/restructure_generator.rb +2 -2
  73. data/lib/generators/ruby_llm_agents/speaker_generator.rb +8 -39
  74. data/lib/generators/ruby_llm_agents/templates/add_tenant_to_executions_migration.rb.tt +13 -2
  75. data/lib/generators/ruby_llm_agents/templates/agent.rb.tt +5 -8
  76. data/lib/generators/ruby_llm_agents/templates/application_agent.rb.tt +40 -42
  77. data/lib/generators/ruby_llm_agents/templates/application_background_remover.rb.tt +20 -22
  78. data/lib/generators/ruby_llm_agents/templates/application_embedder.rb.tt +24 -26
  79. data/lib/generators/ruby_llm_agents/templates/application_image_analyzer.rb.tt +20 -22
  80. data/lib/generators/ruby_llm_agents/templates/application_image_editor.rb.tt +19 -17
  81. data/lib/generators/ruby_llm_agents/templates/application_image_generator.rb.tt +31 -33
  82. data/lib/generators/ruby_llm_agents/templates/application_image_pipeline.rb.tt +125 -127
  83. data/lib/generators/ruby_llm_agents/templates/application_image_transformer.rb.tt +20 -18
  84. data/lib/generators/ruby_llm_agents/templates/application_image_upscaler.rb.tt +19 -17
  85. data/lib/generators/ruby_llm_agents/templates/application_image_variator.rb.tt +19 -17
  86. data/lib/generators/ruby_llm_agents/templates/application_speaker.rb.tt +38 -40
  87. data/lib/generators/ruby_llm_agents/templates/application_transcriber.rb.tt +42 -44
  88. data/lib/generators/ruby_llm_agents/templates/application_workflow.rb.tt +48 -0
  89. data/lib/generators/ruby_llm_agents/templates/background_remover.rb.tt +19 -21
  90. data/lib/generators/ruby_llm_agents/templates/create_tenant_budgets_migration.rb.tt +11 -0
  91. data/lib/generators/ruby_llm_agents/templates/create_tenants_migration.rb.tt +72 -0
  92. data/lib/generators/ruby_llm_agents/templates/embedder.rb.tt +19 -21
  93. data/lib/generators/ruby_llm_agents/templates/image_analyzer.rb.tt +20 -22
  94. data/lib/generators/ruby_llm_agents/templates/image_editor.rb.tt +15 -17
  95. data/lib/generators/ruby_llm_agents/templates/image_generator.rb.tt +25 -27
  96. data/lib/generators/ruby_llm_agents/templates/image_pipeline.rb.tt +19 -21
  97. data/lib/generators/ruby_llm_agents/templates/image_transformer.rb.tt +20 -22
  98. data/lib/generators/ruby_llm_agents/templates/image_upscaler.rb.tt +17 -19
  99. data/lib/generators/ruby_llm_agents/templates/image_variator.rb.tt +15 -17
  100. data/lib/generators/ruby_llm_agents/templates/rename_tenant_budgets_to_tenants_migration.rb.tt +34 -0
  101. data/lib/generators/ruby_llm_agents/templates/skills/AGENTS.md.tt +87 -24
  102. data/lib/generators/ruby_llm_agents/templates/skills/BACKGROUND_REMOVERS.md.tt +21 -27
  103. data/lib/generators/ruby_llm_agents/templates/skills/EMBEDDERS.md.tt +46 -54
  104. data/lib/generators/ruby_llm_agents/templates/skills/IMAGE_ANALYZERS.md.tt +31 -39
  105. data/lib/generators/ruby_llm_agents/templates/skills/IMAGE_EDITORS.md.tt +22 -28
  106. data/lib/generators/ruby_llm_agents/templates/skills/IMAGE_GENERATORS.md.tt +53 -63
  107. data/lib/generators/ruby_llm_agents/templates/skills/IMAGE_PIPELINES.md.tt +46 -56
  108. data/lib/generators/ruby_llm_agents/templates/skills/IMAGE_TRANSFORMERS.md.tt +23 -31
  109. data/lib/generators/ruby_llm_agents/templates/skills/IMAGE_UPSCALERS.md.tt +22 -30
  110. data/lib/generators/ruby_llm_agents/templates/skills/IMAGE_VARIATORS.md.tt +23 -31
  111. data/lib/generators/ruby_llm_agents/templates/skills/SPEAKERS.md.tt +38 -46
  112. data/lib/generators/ruby_llm_agents/templates/skills/TOOLS.md.tt +7 -7
  113. data/lib/generators/ruby_llm_agents/templates/skills/TRANSCRIBERS.md.tt +59 -71
  114. data/lib/generators/ruby_llm_agents/templates/skills/WORKFLOWS.md.tt +274 -23
  115. data/lib/generators/ruby_llm_agents/templates/speaker.rb.tt +29 -31
  116. data/lib/generators/ruby_llm_agents/templates/transcriber.rb.tt +28 -30
  117. data/lib/generators/ruby_llm_agents/transcriber_generator.rb +10 -43
  118. data/lib/generators/ruby_llm_agents/upgrade_generator.rb +26 -0
  119. data/lib/ruby_llm/agents/core/configuration.rb +55 -43
  120. data/lib/ruby_llm/agents/core/llm_tenant.rb +60 -60
  121. data/lib/ruby_llm/agents/core/version.rb +1 -1
  122. data/lib/ruby_llm/agents/infrastructure/alert_manager.rb +26 -0
  123. data/lib/ruby_llm/agents/infrastructure/budget/config_resolver.rb +4 -2
  124. data/lib/ruby_llm/agents/pipeline.rb +69 -0
  125. data/lib/ruby_llm/agents/workflow/approval.rb +205 -0
  126. data/lib/ruby_llm/agents/workflow/approval_store.rb +179 -0
  127. data/lib/ruby_llm/agents/workflow/dsl/executor.rb +467 -0
  128. data/lib/ruby_llm/agents/workflow/dsl/input_schema.rb +244 -0
  129. data/lib/ruby_llm/agents/workflow/dsl/iteration_executor.rb +289 -0
  130. data/lib/ruby_llm/agents/workflow/dsl/parallel_group.rb +107 -0
  131. data/lib/ruby_llm/agents/workflow/dsl/route_builder.rb +150 -0
  132. data/lib/ruby_llm/agents/workflow/dsl/schedule_helpers.rb +187 -0
  133. data/lib/ruby_llm/agents/workflow/dsl/step_config.rb +352 -0
  134. data/lib/ruby_llm/agents/workflow/dsl/step_executor.rb +415 -0
  135. data/lib/ruby_llm/agents/workflow/dsl/wait_config.rb +257 -0
  136. data/lib/ruby_llm/agents/workflow/dsl/wait_executor.rb +317 -0
  137. data/lib/ruby_llm/agents/workflow/dsl.rb +576 -0
  138. data/lib/ruby_llm/agents/workflow/instrumentation.rb +2 -7
  139. data/lib/ruby_llm/agents/workflow/notifiers/base.rb +117 -0
  140. data/lib/ruby_llm/agents/workflow/notifiers/email.rb +117 -0
  141. data/lib/ruby_llm/agents/workflow/notifiers/slack.rb +180 -0
  142. data/lib/ruby_llm/agents/workflow/notifiers/webhook.rb +121 -0
  143. data/lib/ruby_llm/agents/workflow/notifiers.rb +70 -0
  144. data/lib/ruby_llm/agents/workflow/orchestrator.rb +190 -23
  145. data/lib/ruby_llm/agents/workflow/result.rb +202 -0
  146. data/lib/ruby_llm/agents/workflow/throttle_manager.rb +206 -0
  147. data/lib/ruby_llm/agents/workflow/wait_result.rb +213 -0
  148. metadata +43 -6
  149. data/app/views/ruby_llm/agents/dashboard/_execution_item.html.erb +0 -66
  150. data/lib/ruby_llm/agents/workflow/parallel.rb +0 -299
  151. data/lib/ruby_llm/agents/workflow/pipeline.rb +0 -306
  152. data/lib/ruby_llm/agents/workflow/router.rb +0 -429
@@ -0,0 +1,213 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyLLM
4
+ module Agents
5
+ class Workflow
6
+ # Result object for wait step execution
7
+ #
8
+ # Encapsulates the outcome of a wait operation including success/failure status,
9
+ # duration waited, and any metadata like approval details.
10
+ #
11
+ # @example Success result
12
+ # WaitResult.success(:delay, 5.0)
13
+ #
14
+ # @example Timeout result
15
+ # WaitResult.timeout(:until, 60.0, :fail)
16
+ #
17
+ # @example Approval result
18
+ # WaitResult.approved("approval-123", "user@example.com", 3600.0)
19
+ #
20
+ # @api private
21
+ class WaitResult
22
+ STATUSES = %i[success timeout approved rejected skipped].freeze
23
+
24
+ attr_reader :type, :status, :waited_duration, :metadata
25
+
26
+ # @param type [Symbol] Wait type (:delay, :until, :schedule, :approval)
27
+ # @param status [Symbol] Result status (:success, :timeout, :approved, :rejected, :skipped)
28
+ # @param waited_duration [Float, nil] Duration waited in seconds
29
+ # @param metadata [Hash] Additional result metadata
30
+ def initialize(type:, status:, waited_duration: nil, metadata: {})
31
+ @type = type
32
+ @status = status
33
+ @waited_duration = waited_duration
34
+ @metadata = metadata
35
+ end
36
+
37
+ # Creates a success result
38
+ #
39
+ # @param type [Symbol] Wait type
40
+ # @param waited_duration [Float] Duration waited
41
+ # @param metadata [Hash] Additional metadata
42
+ # @return [WaitResult]
43
+ def self.success(type, waited_duration, **metadata)
44
+ new(
45
+ type: type,
46
+ status: :success,
47
+ waited_duration: waited_duration,
48
+ metadata: metadata
49
+ )
50
+ end
51
+
52
+ # Creates a timeout result
53
+ #
54
+ # @param type [Symbol] Wait type
55
+ # @param waited_duration [Float] Duration waited before timeout
56
+ # @param action_taken [Symbol] Action taken on timeout (:fail, :continue, :skip_next)
57
+ # @param metadata [Hash] Additional metadata
58
+ # @return [WaitResult]
59
+ def self.timeout(type, waited_duration, action_taken, **metadata)
60
+ new(
61
+ type: type,
62
+ status: :timeout,
63
+ waited_duration: waited_duration,
64
+ metadata: metadata.merge(action_taken: action_taken)
65
+ )
66
+ end
67
+
68
+ # Creates a skipped result (when condition not met)
69
+ #
70
+ # @param type [Symbol] Wait type
71
+ # @param reason [String, nil] Reason for skipping
72
+ # @return [WaitResult]
73
+ def self.skipped(type, reason: nil)
74
+ new(
75
+ type: type,
76
+ status: :skipped,
77
+ waited_duration: 0,
78
+ metadata: { reason: reason }.compact
79
+ )
80
+ end
81
+
82
+ # Creates an approved result for approval waits
83
+ #
84
+ # @param approval_id [String] Approval identifier
85
+ # @param approved_by [String] User who approved
86
+ # @param waited_duration [Float] Duration waited for approval
87
+ # @param metadata [Hash] Additional metadata
88
+ # @return [WaitResult]
89
+ def self.approved(approval_id, approved_by, waited_duration, **metadata)
90
+ new(
91
+ type: :approval,
92
+ status: :approved,
93
+ waited_duration: waited_duration,
94
+ metadata: metadata.merge(
95
+ approval_id: approval_id,
96
+ approved_by: approved_by
97
+ )
98
+ )
99
+ end
100
+
101
+ # Creates a rejected result for approval waits
102
+ #
103
+ # @param approval_id [String] Approval identifier
104
+ # @param rejected_by [String] User who rejected
105
+ # @param waited_duration [Float] Duration waited before rejection
106
+ # @param reason [String, nil] Rejection reason
107
+ # @param metadata [Hash] Additional metadata
108
+ # @return [WaitResult]
109
+ def self.rejected(approval_id, rejected_by, waited_duration, reason: nil, **metadata)
110
+ new(
111
+ type: :approval,
112
+ status: :rejected,
113
+ waited_duration: waited_duration,
114
+ metadata: metadata.merge(
115
+ approval_id: approval_id,
116
+ rejected_by: rejected_by,
117
+ reason: reason
118
+ ).compact
119
+ )
120
+ end
121
+
122
+ # Returns whether the wait completed successfully
123
+ #
124
+ # @return [Boolean]
125
+ def success?
126
+ status == :success || status == :approved
127
+ end
128
+
129
+ # Returns whether the wait timed out
130
+ #
131
+ # @return [Boolean]
132
+ def timeout?
133
+ status == :timeout
134
+ end
135
+
136
+ # Returns whether the wait was skipped
137
+ #
138
+ # @return [Boolean]
139
+ def skipped?
140
+ status == :skipped
141
+ end
142
+
143
+ # Returns whether an approval was granted
144
+ #
145
+ # @return [Boolean]
146
+ def approved?
147
+ status == :approved
148
+ end
149
+
150
+ # Returns whether an approval was rejected
151
+ #
152
+ # @return [Boolean]
153
+ def rejected?
154
+ status == :rejected
155
+ end
156
+
157
+ # Returns whether the workflow should continue after this wait
158
+ #
159
+ # @return [Boolean]
160
+ def should_continue?
161
+ success? || skipped? || (timeout? && metadata[:action_taken] == :continue)
162
+ end
163
+
164
+ # Returns whether the next step should be skipped
165
+ #
166
+ # @return [Boolean]
167
+ def should_skip_next?
168
+ timeout? && metadata[:action_taken] == :skip_next
169
+ end
170
+
171
+ # Returns the action taken on timeout
172
+ #
173
+ # @return [Symbol, nil]
174
+ def timeout_action
175
+ metadata[:action_taken]
176
+ end
177
+
178
+ # Returns the approval ID for approval waits
179
+ #
180
+ # @return [String, nil]
181
+ def approval_id
182
+ metadata[:approval_id]
183
+ end
184
+
185
+ # Returns who approved/rejected for approval waits
186
+ #
187
+ # @return [String, nil]
188
+ def actor
189
+ metadata[:approved_by] || metadata[:rejected_by]
190
+ end
191
+
192
+ # Returns the rejection reason
193
+ #
194
+ # @return [String, nil]
195
+ def rejection_reason
196
+ metadata[:reason]
197
+ end
198
+
199
+ # Converts to hash for serialization
200
+ #
201
+ # @return [Hash]
202
+ def to_h
203
+ {
204
+ type: type,
205
+ status: status,
206
+ waited_duration: waited_duration,
207
+ metadata: metadata
208
+ }
209
+ end
210
+ end
211
+ end
212
+ end
213
+ end
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: 1.0.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - adham90
@@ -78,6 +78,7 @@ files:
78
78
  - README.md
79
79
  - app/controllers/concerns/ruby_llm/agents/filterable.rb
80
80
  - app/controllers/concerns/ruby_llm/agents/paginatable.rb
81
+ - app/controllers/concerns/ruby_llm/agents/sortable.rb
81
82
  - app/controllers/ruby_llm/agents/agents_controller.rb
82
83
  - app/controllers/ruby_llm/agents/api_configurations_controller.rb
83
84
  - app/controllers/ruby_llm/agents/dashboard_controller.rb
@@ -86,12 +87,18 @@ files:
86
87
  - app/controllers/ruby_llm/agents/tenants_controller.rb
87
88
  - app/controllers/ruby_llm/agents/workflows_controller.rb
88
89
  - 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
89
92
  - app/models/ruby_llm/agents/api_configuration.rb
90
93
  - app/models/ruby_llm/agents/execution.rb
91
94
  - app/models/ruby_llm/agents/execution/analytics.rb
92
95
  - app/models/ruby_llm/agents/execution/metrics.rb
93
96
  - app/models/ruby_llm/agents/execution/scopes.rb
94
97
  - app/models/ruby_llm/agents/execution/workflow.rb
98
+ - app/models/ruby_llm/agents/tenant.rb
99
+ - app/models/ruby_llm/agents/tenant/budgetable.rb
100
+ - app/models/ruby_llm/agents/tenant/configurable.rb
101
+ - app/models/ruby_llm/agents/tenant/trackable.rb
95
102
  - app/models/ruby_llm/agents/tenant_budget.rb
96
103
  - app/services/ruby_llm/agents/agent_registry.rb
97
104
  - app/views/layouts/ruby_llm/agents/application.html.erb
@@ -103,10 +110,13 @@ files:
103
110
  - app/views/ruby_llm/agents/agents/_config_speaker.html.erb
104
111
  - app/views/ruby_llm/agents/agents/_config_transcriber.html.erb
105
112
  - app/views/ruby_llm/agents/agents/_empty_state.html.erb
113
+ - app/views/ruby_llm/agents/agents/_sortable_header.html.erb
106
114
  - app/views/ruby_llm/agents/agents/_version_comparison.html.erb
107
115
  - app/views/ruby_llm/agents/agents/_workflow.html.erb
108
116
  - app/views/ruby_llm/agents/agents/index.html.erb
109
117
  - 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
110
120
  - app/views/ruby_llm/agents/api_configurations/_api_key_field.html.erb
111
121
  - app/views/ruby_llm/agents/api_configurations/_form.html.erb
112
122
  - app/views/ruby_llm/agents/api_configurations/edit.html.erb
@@ -118,7 +128,8 @@ files:
118
128
  - app/views/ruby_llm/agents/dashboard/_alerts_feed.html.erb
119
129
  - app/views/ruby_llm/agents/dashboard/_breaker_strip.html.erb
120
130
  - app/views/ruby_llm/agents/dashboard/_budgets_bar.html.erb
121
- - app/views/ruby_llm/agents/dashboard/_execution_item.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
122
133
  - app/views/ruby_llm/agents/dashboard/_now_strip.html.erb
123
134
  - app/views/ruby_llm/agents/dashboard/_tenant_budget.html.erb
124
135
  - app/views/ruby_llm/agents/dashboard/_top_errors.html.erb
@@ -132,10 +143,12 @@ files:
132
143
  - app/views/ruby_llm/agents/executions/show.html.erb
133
144
  - app/views/ruby_llm/agents/shared/_agent_type_badge.html.erb
134
145
  - app/views/ruby_llm/agents/shared/_breadcrumbs.html.erb
146
+ - app/views/ruby_llm/agents/shared/_doc_link.html.erb
135
147
  - app/views/ruby_llm/agents/shared/_executions_table.html.erb
136
148
  - app/views/ruby_llm/agents/shared/_filter_dropdown.html.erb
137
149
  - app/views/ruby_llm/agents/shared/_nav_link.html.erb
138
150
  - app/views/ruby_llm/agents/shared/_select_dropdown.html.erb
151
+ - app/views/ruby_llm/agents/shared/_sortable_header.html.erb
139
152
  - app/views/ruby_llm/agents/shared/_stat_card.html.erb
140
153
  - app/views/ruby_llm/agents/shared/_status_badge.html.erb
141
154
  - app/views/ruby_llm/agents/shared/_status_dot.html.erb
@@ -147,9 +160,12 @@ files:
147
160
  - app/views/ruby_llm/agents/tenants/index.html.erb
148
161
  - app/views/ruby_llm/agents/tenants/show.html.erb
149
162
  - app/views/ruby_llm/agents/workflows/_step_performance.html.erb
163
+ - app/views/ruby_llm/agents/workflows/_structure_dsl.html.erb
150
164
  - app/views/ruby_llm/agents/workflows/_structure_parallel.html.erb
151
165
  - app/views/ruby_llm/agents/workflows/_structure_pipeline.html.erb
152
166
  - app/views/ruby_llm/agents/workflows/_structure_router.html.erb
167
+ - app/views/ruby_llm/agents/workflows/_workflow_diagram.html.erb
168
+ - app/views/ruby_llm/agents/workflows/index.html.erb
153
169
  - app/views/ruby_llm/agents/workflows/show.html.erb
154
170
  - config/routes.rb
155
171
  - lib/generators/ruby_llm_agents/agent_generator.rb
@@ -164,6 +180,7 @@ files:
164
180
  - lib/generators/ruby_llm_agents/image_upscaler_generator.rb
165
181
  - lib/generators/ruby_llm_agents/image_variator_generator.rb
166
182
  - lib/generators/ruby_llm_agents/install_generator.rb
183
+ - lib/generators/ruby_llm_agents/migrate_structure_generator.rb
167
184
  - lib/generators/ruby_llm_agents/multi_tenancy_generator.rb
168
185
  - lib/generators/ruby_llm_agents/restructure_generator.rb
169
186
  - lib/generators/ruby_llm_agents/speaker_generator.rb
@@ -191,9 +208,11 @@ files:
191
208
  - lib/generators/ruby_llm_agents/templates/application_image_variator.rb.tt
192
209
  - lib/generators/ruby_llm_agents/templates/application_speaker.rb.tt
193
210
  - lib/generators/ruby_llm_agents/templates/application_transcriber.rb.tt
211
+ - lib/generators/ruby_llm_agents/templates/application_workflow.rb.tt
194
212
  - lib/generators/ruby_llm_agents/templates/background_remover.rb.tt
195
213
  - lib/generators/ruby_llm_agents/templates/create_api_configurations_migration.rb.tt
196
214
  - lib/generators/ruby_llm_agents/templates/create_tenant_budgets_migration.rb.tt
215
+ - lib/generators/ruby_llm_agents/templates/create_tenants_migration.rb.tt
197
216
  - lib/generators/ruby_llm_agents/templates/embedder.rb.tt
198
217
  - lib/generators/ruby_llm_agents/templates/image_analyzer.rb.tt
199
218
  - lib/generators/ruby_llm_agents/templates/image_editor.rb.tt
@@ -204,6 +223,7 @@ files:
204
223
  - lib/generators/ruby_llm_agents/templates/image_variator.rb.tt
205
224
  - lib/generators/ruby_llm_agents/templates/initializer.rb.tt
206
225
  - lib/generators/ruby_llm_agents/templates/migration.rb.tt
226
+ - lib/generators/ruby_llm_agents/templates/rename_tenant_budgets_to_tenants_migration.rb.tt
207
227
  - lib/generators/ruby_llm_agents/templates/skills/AGENTS.md.tt
208
228
  - lib/generators/ruby_llm_agents/templates/skills/BACKGROUND_REMOVERS.md.tt
209
229
  - lib/generators/ruby_llm_agents/templates/skills/EMBEDDERS.md.tt
@@ -313,15 +333,32 @@ files:
313
333
  - lib/ruby_llm/agents/results/transcription_result.rb
314
334
  - lib/ruby_llm/agents/text/embedder.rb
315
335
  - lib/ruby_llm/agents/text/moderator.rb
336
+ - lib/ruby_llm/agents/workflow/approval.rb
337
+ - lib/ruby_llm/agents/workflow/approval_store.rb
316
338
  - lib/ruby_llm/agents/workflow/async.rb
317
339
  - lib/ruby_llm/agents/workflow/async_executor.rb
340
+ - lib/ruby_llm/agents/workflow/dsl.rb
341
+ - lib/ruby_llm/agents/workflow/dsl/executor.rb
342
+ - lib/ruby_llm/agents/workflow/dsl/input_schema.rb
343
+ - lib/ruby_llm/agents/workflow/dsl/iteration_executor.rb
344
+ - lib/ruby_llm/agents/workflow/dsl/parallel_group.rb
345
+ - lib/ruby_llm/agents/workflow/dsl/route_builder.rb
346
+ - lib/ruby_llm/agents/workflow/dsl/schedule_helpers.rb
347
+ - lib/ruby_llm/agents/workflow/dsl/step_config.rb
348
+ - lib/ruby_llm/agents/workflow/dsl/step_executor.rb
349
+ - lib/ruby_llm/agents/workflow/dsl/wait_config.rb
350
+ - lib/ruby_llm/agents/workflow/dsl/wait_executor.rb
318
351
  - lib/ruby_llm/agents/workflow/instrumentation.rb
352
+ - lib/ruby_llm/agents/workflow/notifiers.rb
353
+ - lib/ruby_llm/agents/workflow/notifiers/base.rb
354
+ - lib/ruby_llm/agents/workflow/notifiers/email.rb
355
+ - lib/ruby_llm/agents/workflow/notifiers/slack.rb
356
+ - lib/ruby_llm/agents/workflow/notifiers/webhook.rb
319
357
  - lib/ruby_llm/agents/workflow/orchestrator.rb
320
- - lib/ruby_llm/agents/workflow/parallel.rb
321
- - lib/ruby_llm/agents/workflow/pipeline.rb
322
358
  - lib/ruby_llm/agents/workflow/result.rb
323
- - lib/ruby_llm/agents/workflow/router.rb
324
359
  - lib/ruby_llm/agents/workflow/thread_pool.rb
360
+ - lib/ruby_llm/agents/workflow/throttle_manager.rb
361
+ - lib/ruby_llm/agents/workflow/wait_result.rb
325
362
  homepage: https://github.com/adham90/ruby_llm-agents
326
363
  licenses:
327
364
  - MIT
@@ -343,7 +380,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
343
380
  - !ruby/object:Gem::Version
344
381
  version: '0'
345
382
  requirements: []
346
- rubygems_version: 4.0.3
383
+ rubygems_version: 3.6.9
347
384
  specification_version: 4
348
385
  summary: Agent framework for building LLM-powered agents with RubyLLM
349
386
  test_files: []
@@ -1,66 +0,0 @@
1
- <div id="execution-<%= execution.id %>" class="py-2.5 hover:bg-gray-50 dark:hover:bg-gray-700/50 -mx-2 px-2 rounded-lg transition-colors">
2
- <%= link_to ruby_llm_agents.execution_path(execution), class: "block" do %>
3
- <!-- Row 1: Status dot + Agent + Badges + Timestamp -->
4
- <div class="flex items-center justify-between gap-2">
5
- <div class="flex items-center gap-2 min-w-0">
6
- <%= render "ruby_llm/agents/shared/status_dot", status: execution.status %>
7
- <% if execution.respond_to?(:workflow_type) && execution.workflow_type.present? %>
8
- <%= render "ruby_llm/agents/shared/workflow_type_badge", workflow_type: execution.workflow_type, size: :xs, show_label: false %>
9
- <% end %>
10
- <span class="font-medium text-sm text-gray-900 dark:text-gray-100 truncate">
11
- <%= execution.agent_type.gsub(/Agent$|Workflow$|Pipeline$|Parallel$|Router$/, '') %>
12
- </span>
13
- <span class="hidden sm:inline text-xs text-gray-400 dark:text-gray-500">v<%= execution.agent_version %></span>
14
- <% unless execution.status_running? %>
15
- <div class="hidden sm:flex items-center gap-1">
16
- <% if execution.streaming? %>
17
- <span class="badge badge-cyan text-[10px] px-1.5 py-0.5">Stream</span>
18
- <% end %>
19
- <% if execution.cache_hit? %>
20
- <span class="badge badge-purple text-[10px] px-1.5 py-0.5">Cached</span>
21
- <% end %>
22
- <% if execution.rate_limited? %>
23
- <span class="badge badge-orange text-[10px] px-1.5 py-0.5">Limited</span>
24
- <% end %>
25
- </div>
26
- <% end %>
27
- </div>
28
- <span class="text-xs text-gray-400 dark:text-gray-500 whitespace-nowrap flex-shrink-0">
29
- <%= time_ago_in_words(execution.created_at) %> ago
30
- </span>
31
- </div>
32
-
33
- <!-- Row 2: Model + Metrics -->
34
- <div class="mt-1 text-xs text-gray-500 dark:text-gray-400">
35
- <% if execution.status_running? %>
36
- <span class="text-blue-500 dark:text-blue-400 animate-pulse">Processing...</span>
37
- <% else %>
38
- <!-- Mobile: compact -->
39
- <span class="sm:hidden">
40
- <%= number_to_human_short(execution.total_tokens || 0) %> tokens · $<%= number_with_precision(execution.total_cost || 0, precision: 2) %>
41
- </span>
42
- <!-- Desktop: full -->
43
- <span class="hidden sm:inline">
44
- <span class="font-mono text-gray-400 dark:text-gray-500"><%= execution.model_id %></span>
45
- <span class="mx-1.5 text-gray-300 dark:text-gray-600">·</span>
46
- <%= number_to_human_short(execution.total_tokens || 0) %> tokens
47
- <span class="mx-1.5 text-gray-300 dark:text-gray-600">·</span>
48
- $<%= number_with_precision(execution.total_cost || 0, precision: 4) %>
49
- <span class="mx-1.5 text-gray-300 dark:text-gray-600">·</span>
50
- <%= number_to_human_short(execution.duration_ms || 0) %>ms
51
- <% if execution.respond_to?(:attempts_count) && execution.attempts_count && execution.attempts_count > 1 %>
52
- <span class="mx-1.5 text-gray-300 dark:text-gray-600">·</span>
53
- <span class="text-amber-600 dark:text-amber-400"><%= execution.attempts_count %> retries</span>
54
- <% end %>
55
- </span>
56
- <% end %>
57
- </div>
58
-
59
- <!-- Error display -->
60
- <% if execution.status_error? && execution.error_message.present? %>
61
- <p class="mt-1.5 text-xs text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/30 rounded px-2 py-1">
62
- <%= execution.error_class %>: <%= truncate(execution.error_message, length: 80) %>
63
- </p>
64
- <% end %>
65
- <% end %>
66
- </div>