roast-ai 0.4.9 → 0.5.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 (194) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/commands/docs/write-comments.md +36 -0
  3. data/.github/CODEOWNERS +1 -1
  4. data/.github/workflows/ci.yaml +10 -6
  5. data/.gitignore +0 -1
  6. data/.rubocop.yml +7 -1
  7. data/CLAUDE.md +2 -2
  8. data/CONTRIBUTING.md +2 -0
  9. data/Gemfile +18 -18
  10. data/Gemfile.lock +46 -57
  11. data/README.md +118 -1432
  12. data/README_LEGACY.md +1464 -0
  13. data/Rakefile +39 -4
  14. data/dev.yml +29 -0
  15. data/dsl/agent_sessions.rb +20 -0
  16. data/dsl/async_cogs.rb +49 -0
  17. data/dsl/async_cogs_complex.rb +67 -0
  18. data/dsl/call.rb +44 -0
  19. data/dsl/collect_from.rb +72 -0
  20. data/dsl/demo/Gemfile +4 -0
  21. data/dsl/demo/Gemfile.lock +120 -0
  22. data/dsl/demo/cogs/local.rb +15 -0
  23. data/dsl/demo/simple_external_cog.rb +17 -0
  24. data/dsl/json_output.rb +28 -0
  25. data/dsl/map.rb +55 -0
  26. data/dsl/map_reduce.rb +37 -0
  27. data/dsl/map_with_index.rb +49 -0
  28. data/dsl/next_break.rb +40 -0
  29. data/dsl/next_break_parallel.rb +44 -0
  30. data/dsl/outputs.rb +39 -0
  31. data/dsl/outputs_bang.rb +36 -0
  32. data/dsl/parallel_map.rb +37 -0
  33. data/dsl/plugin-gem-example/.gitignore +8 -0
  34. data/dsl/plugin-gem-example/Gemfile +13 -0
  35. data/dsl/plugin-gem-example/Gemfile.lock +178 -0
  36. data/dsl/plugin-gem-example/lib/other.rb +17 -0
  37. data/dsl/plugin-gem-example/lib/plugin_gem_example.rb +5 -0
  38. data/dsl/plugin-gem-example/lib/simple.rb +15 -0
  39. data/dsl/plugin-gem-example/lib/version.rb +10 -0
  40. data/dsl/plugin-gem-example/plugin-gem-example.gemspec +28 -0
  41. data/dsl/prompts/simple_prompt.md.erb +3 -0
  42. data/dsl/prototype.rb +10 -4
  43. data/dsl/repeat_loop_results.rb +53 -0
  44. data/dsl/ruby_cog.rb +72 -0
  45. data/dsl/simple_agent.rb +18 -0
  46. data/dsl/simple_chat.rb +26 -0
  47. data/dsl/simple_repeat.rb +29 -0
  48. data/dsl/skip.rb +36 -0
  49. data/dsl/step_communication.rb +10 -5
  50. data/dsl/targets_and_params.rb +57 -0
  51. data/dsl/temperature.rb +17 -0
  52. data/dsl/temporary_directory.rb +22 -0
  53. data/dsl/tutorial/01_your_first_workflow/README.md +179 -0
  54. data/dsl/tutorial/01_your_first_workflow/configured_chat.rb +33 -0
  55. data/dsl/tutorial/01_your_first_workflow/hello.rb +23 -0
  56. data/dsl/tutorial/02_chaining_cogs/README.md +310 -0
  57. data/dsl/tutorial/02_chaining_cogs/code_review.rb +104 -0
  58. data/dsl/tutorial/02_chaining_cogs/session_resumption.rb +92 -0
  59. data/dsl/tutorial/02_chaining_cogs/simple_chain.rb +84 -0
  60. data/dsl/tutorial/03_targets_and_params/README.md +230 -0
  61. data/dsl/tutorial/03_targets_and_params/multiple_targets.rb +65 -0
  62. data/dsl/tutorial/03_targets_and_params/single_target.rb +65 -0
  63. data/dsl/tutorial/04_configuration_options/README.md +209 -0
  64. data/dsl/tutorial/04_configuration_options/control_display_and_temperature.rb +104 -0
  65. data/dsl/tutorial/04_configuration_options/simple_config.rb +68 -0
  66. data/dsl/tutorial/05_control_flow/README.md +156 -0
  67. data/dsl/tutorial/05_control_flow/conditional_execution.rb +62 -0
  68. data/dsl/tutorial/05_control_flow/handling_failures.rb +77 -0
  69. data/dsl/tutorial/06_reusable_scopes/README.md +172 -0
  70. data/dsl/tutorial/06_reusable_scopes/accessing_scope_outputs.rb +126 -0
  71. data/dsl/tutorial/06_reusable_scopes/basic_scope.rb +63 -0
  72. data/dsl/tutorial/06_reusable_scopes/parameterized_scope.rb +78 -0
  73. data/dsl/tutorial/07_processing_collections/README.md +152 -0
  74. data/dsl/tutorial/07_processing_collections/basic_map.rb +70 -0
  75. data/dsl/tutorial/07_processing_collections/parallel_map.rb +74 -0
  76. data/dsl/tutorial/08_iterative_workflows/README.md +231 -0
  77. data/dsl/tutorial/08_iterative_workflows/basic_repeat.rb +57 -0
  78. data/dsl/tutorial/08_iterative_workflows/conditional_break.rb +57 -0
  79. data/dsl/tutorial/09_async_cogs/README.md +197 -0
  80. data/dsl/tutorial/09_async_cogs/basic_async.rb +38 -0
  81. data/dsl/tutorial/README.md +222 -0
  82. data/dsl/working_directory.rb +16 -0
  83. data/exe/roast +1 -1
  84. data/internal/documentation/architectural-notes.md +115 -0
  85. data/internal/documentation/doc-comments-external.md +686 -0
  86. data/internal/documentation/doc-comments-internal.md +342 -0
  87. data/internal/documentation/doc-comments.md +211 -0
  88. data/lib/roast/dsl/cog/config.rb +280 -4
  89. data/lib/roast/dsl/cog/input.rb +73 -0
  90. data/lib/roast/dsl/cog/output.rb +313 -0
  91. data/lib/roast/dsl/cog/registry.rb +71 -0
  92. data/lib/roast/dsl/cog/stack.rb +3 -2
  93. data/lib/roast/dsl/cog/store.rb +11 -8
  94. data/lib/roast/dsl/cog.rb +108 -31
  95. data/lib/roast/dsl/cog_input_context.rb +44 -0
  96. data/lib/roast/dsl/cog_input_manager.rb +156 -0
  97. data/lib/roast/dsl/cogs/agent/config.rb +465 -0
  98. data/lib/roast/dsl/cogs/agent/input.rb +81 -0
  99. data/lib/roast/dsl/cogs/agent/output.rb +59 -0
  100. data/lib/roast/dsl/cogs/agent/provider.rb +51 -0
  101. data/lib/roast/dsl/cogs/agent/providers/claude/claude_invocation.rb +185 -0
  102. data/lib/roast/dsl/cogs/agent/providers/claude/message.rb +73 -0
  103. data/lib/roast/dsl/cogs/agent/providers/claude/messages/assistant_message.rb +36 -0
  104. data/lib/roast/dsl/cogs/agent/providers/claude/messages/result_message.rb +61 -0
  105. data/lib/roast/dsl/cogs/agent/providers/claude/messages/system_message.rb +47 -0
  106. data/lib/roast/dsl/cogs/agent/providers/claude/messages/text_message.rb +36 -0
  107. data/lib/roast/dsl/cogs/agent/providers/claude/messages/tool_result_message.rb +47 -0
  108. data/lib/roast/dsl/cogs/agent/providers/claude/messages/tool_use_message.rb +46 -0
  109. data/lib/roast/dsl/cogs/agent/providers/claude/messages/unknown_message.rb +27 -0
  110. data/lib/roast/dsl/cogs/agent/providers/claude/messages/user_message.rb +37 -0
  111. data/lib/roast/dsl/cogs/agent/providers/claude/tool_result.rb +51 -0
  112. data/lib/roast/dsl/cogs/agent/providers/claude/tool_use.rb +48 -0
  113. data/lib/roast/dsl/cogs/agent/providers/claude.rb +31 -0
  114. data/lib/roast/dsl/cogs/agent/stats.rb +92 -0
  115. data/lib/roast/dsl/cogs/agent/usage.rb +62 -0
  116. data/lib/roast/dsl/cogs/agent.rb +75 -0
  117. data/lib/roast/dsl/cogs/chat/config.rb +453 -0
  118. data/lib/roast/dsl/cogs/chat/input.rb +92 -0
  119. data/lib/roast/dsl/cogs/chat/output.rb +64 -0
  120. data/lib/roast/dsl/cogs/chat/session.rb +68 -0
  121. data/lib/roast/dsl/cogs/chat.rb +81 -0
  122. data/lib/roast/dsl/cogs/cmd.rb +291 -27
  123. data/lib/roast/dsl/cogs/ruby.rb +171 -0
  124. data/lib/roast/dsl/command_runner.rb +191 -0
  125. data/lib/roast/dsl/config_context.rb +2 -47
  126. data/lib/roast/dsl/config_manager.rb +143 -0
  127. data/lib/roast/dsl/control_flow.rb +41 -0
  128. data/lib/roast/dsl/execution_context.rb +9 -0
  129. data/lib/roast/dsl/execution_manager.rb +267 -0
  130. data/lib/roast/dsl/nil_assertions.rb +23 -0
  131. data/lib/roast/dsl/system_cog/params.rb +32 -0
  132. data/lib/roast/dsl/system_cog.rb +36 -0
  133. data/lib/roast/dsl/system_cogs/call.rb +162 -0
  134. data/lib/roast/dsl/system_cogs/map.rb +448 -0
  135. data/lib/roast/dsl/system_cogs/repeat.rb +242 -0
  136. data/lib/roast/dsl/workflow.rb +123 -0
  137. data/lib/roast/dsl/workflow_context.rb +20 -0
  138. data/lib/roast/dsl/workflow_params.rb +24 -0
  139. data/lib/roast/sorbet_runtime_stub.rb +154 -0
  140. data/lib/roast/tools/apply_diff.rb +1 -3
  141. data/lib/roast/tools/cmd.rb +4 -3
  142. data/lib/roast/tools/read_file.rb +1 -1
  143. data/lib/roast/tools/update_files.rb +1 -1
  144. data/lib/roast/tools/write_file.rb +1 -1
  145. data/lib/roast/version.rb +1 -1
  146. data/lib/roast/workflow/base_workflow.rb +4 -0
  147. data/lib/roast/workflow/step_loader.rb +14 -2
  148. data/lib/roast-ai.rb +4 -0
  149. data/lib/roast.rb +60 -22
  150. data/{roast.gemspec → roast-ai.gemspec} +10 -13
  151. data/sorbet/config +1 -0
  152. data/sorbet/rbi/gems/async@2.34.0.rbi +1577 -0
  153. data/sorbet/rbi/gems/cli-kit@5.2.0.rbi +2063 -0
  154. data/sorbet/rbi/gems/{cli-ui@2.3.0.rbi → cli-ui@2.7.0-6bdefd1d06305e5d6ae312ac76f9c88f88658dda.rbi} +1418 -1013
  155. data/sorbet/rbi/gems/console@1.34.2.rbi +1193 -0
  156. data/sorbet/rbi/gems/fiber-annotation@0.2.0.rbi +50 -0
  157. data/sorbet/rbi/gems/fiber-local@1.1.0.rbi +35 -0
  158. data/sorbet/rbi/gems/fiber-storage@1.0.1.rbi +41 -0
  159. data/sorbet/rbi/gems/io-event@1.14.0.rbi +724 -0
  160. data/sorbet/rbi/gems/marcel@1.1.0.rbi +239 -0
  161. data/sorbet/rbi/gems/metrics@0.15.0.rbi +9 -0
  162. data/sorbet/rbi/gems/ruby_llm@1.8.2.rbi +5703 -0
  163. data/sorbet/rbi/gems/traces@0.18.2.rbi +9 -0
  164. data/sorbet/rbi/shims/lib/roast/dsl/cog_input_context.rbi +1197 -0
  165. data/sorbet/rbi/shims/lib/roast/dsl/config_context.rbi +314 -2
  166. data/sorbet/rbi/shims/lib/roast/dsl/execution_context.rbi +498 -0
  167. data/sorbet/tapioca/config.yml +6 -0
  168. data/sorbet/tapioca/require.rb +2 -0
  169. metadata +198 -34
  170. data/dsl/less_simple.rb +0 -112
  171. data/dsl/simple.rb +0 -8
  172. data/lib/roast/dsl/cog_execution_context.rb +0 -29
  173. data/lib/roast/dsl/cogs/graph.rb +0 -53
  174. data/lib/roast/dsl/cogs.rb +0 -65
  175. data/lib/roast/dsl/executor.rb +0 -82
  176. data/lib/roast/dsl/workflow_execution_context.rb +0 -47
  177. data/sorbet/rbi/gems/cgi@0.5.0.rbi +0 -2961
  178. data/sorbet/rbi/gems/claude_swarm@0.1.19.rbi +0 -568
  179. data/sorbet/rbi/gems/cli-kit@5.0.1.rbi +0 -1991
  180. data/sorbet/rbi/gems/dry-configurable@1.3.0.rbi +0 -672
  181. data/sorbet/rbi/gems/dry-core@1.1.0.rbi +0 -1894
  182. data/sorbet/rbi/gems/dry-inflector@1.2.0.rbi +0 -659
  183. data/sorbet/rbi/gems/dry-initializer@3.2.0.rbi +0 -781
  184. data/sorbet/rbi/gems/dry-logic@1.6.0.rbi +0 -1127
  185. data/sorbet/rbi/gems/dry-schema@1.14.1.rbi +0 -3727
  186. data/sorbet/rbi/gems/dry-types@1.8.3.rbi +0 -3969
  187. data/sorbet/rbi/gems/fast-mcp-annotations@1.5.3.rbi +0 -1588
  188. data/sorbet/rbi/gems/mime-types-data@3.2025.0617.rbi +0 -136
  189. data/sorbet/rbi/gems/mime-types@3.7.0.rbi +0 -1342
  190. data/sorbet/rbi/gems/rack@2.2.18.rbi +0 -5659
  191. data/sorbet/rbi/gems/rbs-inline@0.12.0.rbi +0 -2170
  192. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
  193. data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18492
  194. data/sorbet/rbi/shims/lib/roast/dsl/workflow_execution_context.rbi +0 -11
@@ -4,8 +4,320 @@
4
4
  module Roast
5
5
  module DSL
6
6
  class ConfigContext
7
- #: (?Symbol?) {() [self: Roast::DSL::Cogs::Cmd::Config] -> void} -> void
8
- def cmd(name = nil, &block); end
7
+
8
+ # Configure all cogs globally with shared settings
9
+ #
10
+ # Apply configuration that affects all cog instances in the workflow. Configuration
11
+ # specified in `global` applies to every cog, but can be overridden by cog-specific
12
+ # configuration.
13
+ #
14
+ # ### Usage
15
+ # ```ruby
16
+ # config do
17
+ # global do
18
+ # # Configuration here applies to all cogs
19
+ # end
20
+ # end
21
+ # ```
22
+ #
23
+ # ### Available Options (Common to All Cogs)
24
+ #
25
+ # Apply configuration within the block passed to `global`:
26
+ #
27
+ # #### Configure asynchronous execution
28
+ # - `async!` - Run the cog asynchronously in the background
29
+ # - `no_async!` (alias `sync!`) - Run the cog synchronously (default)
30
+ #
31
+ # #### Configure failure behavior
32
+ # - `abort_on_failure!` - Abort the entire workflow immediately if this cog fails (default)
33
+ # - `no_abort_on_failure!` (alias `continue_on_failure!`) - Continue the workflow even if this cog fails
34
+ #
35
+ # #### Configure the working directory
36
+ # - `working_directory(path)` - Set the working directory for external commands invoked by the cog
37
+ # - `use_current_working_directory!` - Use the current working directory
38
+ #
39
+ #: () {() [self: Roast::DSL::Cog::Config] -> void} -> void
40
+ def global(&block); end
41
+
42
+ # Configure the `call` cog
43
+ #
44
+ # The `call` cog invokes a named execution scope with a provided value.
45
+ #
46
+ # ### Usage
47
+ # - `call { &blk }` - Apply configuration to all instances of the `call` cog
48
+ # - `call(:name) { &blk }` - Apply configuration to the `call` cog instance named `:name`
49
+ # - `call(/regexp/) { &blk }` - Apply configuration to any `call` cog whose name matches `/regexp/`
50
+ #
51
+ # ### Available Options
52
+ #
53
+ # Apply configuration within the block passed to `call`:
54
+ #
55
+ # #### Configure asynchronous execution
56
+ # - `async!` - Run the cog asynchronously in the background
57
+ # - `no_async!` (alias `sync!`) - Run the cog synchronously (default)
58
+ #
59
+ # #### Configure failure behavior
60
+ # - `abort_on_failure!` - Abort the entire workflow immediately if this cog fails (default)
61
+ # - `no_abort_on_failure!` (alias `continue_on_failure!`) - Continue the workflow even if this cog fails
62
+ #
63
+ #: (?(Symbol | Regexp)?) {() [self: Roast::DSL::SystemCogs::Call::Config] -> void} -> void
64
+ def call(name = nil, &block); end
65
+
66
+ # Configure the `map` cog
67
+ #
68
+ # The `map` cog executes a scope for each item in a collection, with support for
69
+ # parallel execution.
70
+ #
71
+ # ### Usage
72
+ # - `map { &blk }` - Apply configuration to all instances of the `map` cog
73
+ # - `map(:name) { &blk }` - Apply configuration to the `map` cog instance named `:name`
74
+ # - `map(/regexp/) { &blk }` - Apply configuration to any `map` cog whose name matches `/regexp/`
75
+ #
76
+ # ### Available Options
77
+ #
78
+ # Apply configuration within the block passed to `map`:
79
+ #
80
+ # #### Configure parallel execution
81
+ # - `parallel(n)` - Execute up to `n` iterations concurrently (pass `0` for unlimited)
82
+ # - `parallel!` - Execute all iterations concurrently with no limit
83
+ # - `no_parallel!` - Execute iterations serially, one at a time (default)
84
+ #
85
+ # #### Configure asynchronous execution
86
+ # - `async!` - Run the cog asynchronously in the background
87
+ # - `no_async!` (alias `sync!`) - Run the cog synchronously (default)
88
+ #
89
+ # NOTE: parallel processing of the elements passed to the `map` cog is distinct from asynchronous execution of
90
+ # the `map` cog itself. Use the `parallel!` setting to process multiple items concurrently from the iterable
91
+ # provided to `map`, and `no_parallel!` to process each item one-at-a-time. Use `async`, on the other hand,
92
+ # to allow the next cog in the workflow after `map` to begin running while the map is still processing items.
93
+ # Otherwise, the nect cog will not start until `map` has completed processing all items.
94
+ # You can use async and no_parallel, or no_async and parallel, or both, or neither, depending on your needs.
95
+ #
96
+ # #### Configure failure behavior
97
+ # - `abort_on_failure!` - Abort the entire workflow immediately if this cog fails (default)
98
+ # - `no_abort_on_failure!` (alias `continue_on_failure!`) - Continue the workflow even if this cog fails
99
+ #
100
+ #: (?(Symbol | Regexp)?) {() [self: Roast::DSL::SystemCogs::Map::Config] -> void} -> void
101
+ def map(name = nil, &block); end
102
+
103
+ # Configure the `repeat` cog
104
+ #
105
+ # The `repeat` cog executes a scope multiple times in a loop, with each iteration's
106
+ # output becoming the next iteration's input.
107
+ #
108
+ # ### Usage
109
+ # - `repeat { &blk }` - Apply configuration to all instances of the `repeat` cog
110
+ # - `repeat(:name) { &blk }` - Apply configuration to the `repeat` cog instance named `:name`
111
+ # - `repeat(/regexp/) { &blk }` - Apply configuration to any `repeat` cog whose name matches `/regexp/`
112
+ #
113
+ # ### Available Options
114
+ #
115
+ # Apply configuration within the block passed to `repeat`:
116
+ #
117
+ # #### Configure asynchronous execution
118
+ # - `async!` - Run the cog asynchronously in the background
119
+ # - `no_async!` (alias `sync!`) - Run the cog synchronously (default)
120
+ #
121
+ # #### Configure failure behavior
122
+ # - `abort_on_failure!` - Abort the entire workflow immediately if this cog fails (default)
123
+ # - `no_abort_on_failure!` (alias `continue_on_failure!`) - Continue the workflow even if this cog fails
124
+ #
125
+ #: (?(Symbol | Regexp)?) {() [self: Roast::DSL::SystemCogs::Repeat::Config] -> void} -> void
126
+ def repeat(name = nil, &block); end
127
+
128
+ # Configure the `agent` cog
129
+ #
130
+ # The `agent` cog runs a coding agent on the local machine with access to local files,
131
+ # tools, and MCP servers. It is designed for coding tasks and any work requiring local
132
+ # filesystem access. The `agent` cog supports automatic session resumption across invocations.
133
+ #
134
+ # ### Usage
135
+ # - `agent { &blk }` - Apply configuration to all instances of the `agent` cog
136
+ # - `agent(:name) { &blk }` - Apply configuration to the `agent` cog instance named `:name`
137
+ # - `agent(/regexp/) { &blk }` - Apply configuration to any `agent` cog whose name matches `/regexp/`
138
+ #
139
+ # ### Available Options
140
+ #
141
+ # Apply configuration within the block passed to `agent`:
142
+ #
143
+ # #### Configure the agent provider
144
+ # - `provider(symbol)` - Set the agent provider (e.g., `:claude`)
145
+ # - `use_default_provider!` - Use the default provider (`:claude`)
146
+ #
147
+ # #### Configure the base command used to run the coding agent
148
+ # - `command(string_or_array)` - Set the base command for invoking the agent
149
+ # - `use_default_command!` - Use the provider's default command
150
+ #
151
+ # #### Configure the LLM model the agent should use
152
+ # - `model(string)` - Set the model to use
153
+ # - `use_default_model!` - Use the provider's default model
154
+ #
155
+ # #### Configure the initial system prompt
156
+ # - `initial_prompt(string)` - Set an initial prompt component to append to the agent's system prompt
157
+ # - `no_initial_prompt!` - Don't append an initial prompt component
158
+ #
159
+ # #### Configure the working directory
160
+ # - `working_directory(path)` - Set the working directory for agent execution
161
+ # - `use_current_working_directory!` - Use the current working directory
162
+ #
163
+ # #### Configure permissions
164
+ # - `apply_permissions!` - Apply project and user-level permissions when running the agent
165
+ # - `skip_permissions!` (alias `no_apply_permissions!`) - Skip permissions (default)
166
+ #
167
+ # #### Configure display output
168
+ # - `show_prompt!` - Display the user prompt
169
+ # - `no_show_prompt!` - Don't display the user prompt (default)
170
+ # - `show_progress!` - Display agent's in-progress messages (default)
171
+ # - `no_show_progress!` - Don't display agent's in-progress messages
172
+ # - `show_response!` - Display the agent's final response (default)
173
+ # - `no_show_response!` - Don't display the agent's final response
174
+ # - `show_stats!` - Display agent operation statistics (default)
175
+ # - `no_show_stats!` - Don't display agent operation statistics
176
+ # - `display!` - Display all output (enables all show_ options)
177
+ # - `no_display!` (alias `quiet!`) - Hide all output (disables all show_ options)
178
+ #
179
+ # #### Configure debugging
180
+ # - `dump_raw_agent_messages_to(filename)` - Dump raw agent messages to a file for debugging
181
+ #
182
+ # #### Configure asynchronous execution
183
+ # - `async!` - Run the cog asynchronously in the background
184
+ # - `no_async!` (alias `sync!`) - Run the cog synchronously (default)
185
+ #
186
+ # #### Configure failure behavior
187
+ # - `abort_on_failure!` - Abort the entire workflow immediately if this cog fails (default)
188
+ # - `no_abort_on_failure!` (alias `continue_on_failure!`) - Continue the workflow even if this cog fails
189
+ #
190
+ # #### Configure the working directory
191
+ # - `working_directory(path)` - Set the working directory in which the agent will be invoked
192
+ # - `use_current_working_directory!` - Invoke the agent in the current working directory
193
+ #
194
+ #: (?(Symbol | Regexp)?) {() [self: Roast::DSL::Cogs::Agent::Config] -> void} -> void
195
+ def agent(name = nil, &block); end
196
+
197
+ # Configure the `chat` cog
198
+ #
199
+ # The chat cog provides pure LLM interaction without local system access. While it
200
+ # cannot access local files or run local tools, it can still perform complex reasoning and
201
+ # access any cloud-based tools and MCP servers according to the capabilities of the model and
202
+ # the capabilities that may be provided to it by the LLM provider.
203
+ #
204
+ # ### Usage
205
+ # - `chat { &blk }` - Apply configuration to all instances of the `chat` cog
206
+ # - `chat(:name) { &blk }` - Apply configuration to the `chat` cog instance named `:name`
207
+ # - `chat(/regexp/) { &blk }` - Apply configuration to any `chat` cog whose name matches `/regexp/`
208
+ #
209
+ # ### Available Options
210
+ #
211
+ # Apply configuration within the block passed to `chat`:
212
+ #
213
+ # #### Configure the LLM provider
214
+ # - `provider(symbol)` - Set the LLM provider (e.g., `:openai`)
215
+ # - `use_default_provider!` - Use the default provider (`:openai`)
216
+ #
217
+ # #### Configure the LLM model
218
+ # - `model(string)` - Set the model to use
219
+ # - `use_default_model!` - Use the provider's default model
220
+ #
221
+ # #### Configure API authentication
222
+ # - `api_key(string)` - Set the API key for authentication
223
+ # - `use_api_key_from_environment!` - Use API key from environment variable
224
+ # - `base_url(string)` - Set the base URL for the API
225
+ # - `use_default_base_url!` - Use the provider's default base URL
226
+ #
227
+ # #### Configure LLM parameters
228
+ # - `temperature(float)` - Set the temperature (0.0-1.0) for response randomness
229
+ # - `use_default_temperature!` - Use the provider's default temperature
230
+ # - `verify_model_exists!` - Verify the model exists before invoking
231
+ # - `no_verify_model_exists!` (alias `assume_model_exists!`) - Skip model verification (default)
232
+ #
233
+ # #### Configure display output
234
+ # - `show_prompt!` - Display the user prompt
235
+ # - `no_show_prompt!` - Don't display the user prompt (default)
236
+ # - `show_response!` - Display the LLM's response (default)
237
+ # - `no_show_response!` - Don't display the LLM's response
238
+ # - `show_stats!` - Display LLM operation statistics (default)
239
+ # - `no_show_stats!` - Don't display LLM operation statistics
240
+ # - `display!` - Display all output (enables all show_ options)
241
+ # - `no_display!` (alias `quiet!`) - Hide all output (disables all show_ options)
242
+ #
243
+ # #### Configure asynchronous execution
244
+ # - `async!` - Run the cog asynchronously in the background
245
+ # - `no_async!` (alias `sync!`) - Run the cog synchronously (default)
246
+ #
247
+ # #### Configure failure behavior
248
+ # - `abort_on_failure!` - Abort the entire workflow immediately if this cog fails (default)
249
+ # - `no_abort_on_failure!` (alias `continue_on_failure!`) - Continue the workflow even if this cog fails
250
+ #
251
+ #: (?(Symbol | Regexp)?) {() [self: Roast::DSL::Cogs::Chat::Config] -> void} -> void
252
+ def chat(name = nil, &block); end
253
+
254
+ # Configure the `cmd` cog
255
+ #
256
+ # The `cmd` cog executes shell commands and captures their output.
257
+ #
258
+ # ### Usage
259
+ # - `cmd { &blk }` - Apply configuration to all instances of the `cmd` cog
260
+ # - `cmd(:name) { &blk }` - Apply configuration to the `cmd` cog instance named `:name`
261
+ # - `cmd(/regexp/) { &blk }` - Apply configuration to any `cmd` cog whose name matches `/regexp/`
262
+ #
263
+ # ### Available Options
264
+ #
265
+ # Apply configuration within the block passed to `cmd`:
266
+ #
267
+ # #### Configure command failure behavior
268
+ # - `fail_on_error!` - Consider the cog failed if the command returns a non-zero exit status (default)
269
+ # - `no_fail_on_error!` - Don't fail the cog on non-zero exit status (exit status still available in output)
270
+ #
271
+ # #### Configure display output
272
+ # - `show_stdout!` - Write STDOUT to the console
273
+ # - `no_show_stdout!` - Don't write STDOUT to the console (default)
274
+ # - `show_stderr!` - Write STDERR to the console
275
+ # - `no_show_stderr!` - Don't write STDERR to the console (default)
276
+ # - `display!` (alias `print_all!`) - Write both STDOUT and STDERR to the console
277
+ # - `no_display!` (alias `print_none!`, `quiet!`) - Write __no output__ to the console
278
+ #
279
+ # #### Configure the working directory
280
+ # - `working_directory(path)` - Set the working directory for command execution
281
+ # - `use_current_working_directory!` - Use the current working directory
282
+ #
283
+ # #### Configure asynchronous execution
284
+ # - `async!` - Run the cog asynchronously in the background
285
+ # - `no_async!` (alias `sync!`) - Run the cog synchronously (default)
286
+ #
287
+ # #### Configure failure behavior
288
+ # - `abort_on_failure!` - Abort the entire workflow immediately if this cog fails (default)
289
+ # - `no_abort_on_failure!` (alias `continue_on_failure!`) - Continue the workflow even if this cog fails
290
+ #
291
+ # #### Configure the working directory
292
+ # - `working_directory(path)` - Set the working directory in which the command is invoked
293
+ # - `use_current_working_directory!` - Invoke the command in the current working directory
294
+ #
295
+ #: (?(Symbol | Regexp)?) {() [self: Roast::DSL::Cogs::Cmd::Config] -> void} -> void
296
+ def cmd(name_or_pattern = nil, &block); end
297
+
298
+ # Configure the `ruby` cog
299
+ #
300
+ # The `ruby` cog evaluates Ruby code within the workflow context.
301
+ #
302
+ # ### Usage
303
+ # - `ruby { &blk }` - Apply configuration to all instances of the `ruby` cog
304
+ # - `ruby(:name) { &blk }` - Apply configuration to the `ruby` cog instance named `:name`
305
+ # - `ruby(/regexp/) { &blk }` - Apply configuration to any `ruby` cog whose name matches `/regexp/`
306
+ #
307
+ # ### Available Options
308
+ #
309
+ # Apply configuration within the block passed to `ruby`:
310
+ #
311
+ # #### Configure asynchronous execution
312
+ # - `async!` - Run the cog asynchronously in the background
313
+ # - `no_async!` (alias `sync!`) - Run the cog synchronously (default)
314
+ #
315
+ # #### Configure failure behavior
316
+ # - `abort_on_failure!` - Abort the entire workflow immediately if this cog fails (default)
317
+ # - `no_abort_on_failure!` (alias `continue_on_failure!`) - Continue the workflow even if this cog fails
318
+ #
319
+ #: (?(Symbol | Regexp)?) {() [self: Roast::DSL::Cogs::Ruby::Config] -> void} -> void
320
+ def ruby(name_or_pattern = nil, &block); end
9
321
  end
10
322
  end
11
323
  end