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.
- checksums.yaml +4 -4
- data/.claude/commands/docs/write-comments.md +36 -0
- data/.github/CODEOWNERS +1 -1
- data/.github/workflows/ci.yaml +10 -6
- data/.gitignore +0 -1
- data/.rubocop.yml +7 -1
- data/CLAUDE.md +2 -2
- data/CONTRIBUTING.md +2 -0
- data/Gemfile +18 -18
- data/Gemfile.lock +46 -57
- data/README.md +118 -1432
- data/README_LEGACY.md +1464 -0
- data/Rakefile +39 -4
- data/dev.yml +29 -0
- data/dsl/agent_sessions.rb +20 -0
- data/dsl/async_cogs.rb +49 -0
- data/dsl/async_cogs_complex.rb +67 -0
- data/dsl/call.rb +44 -0
- data/dsl/collect_from.rb +72 -0
- data/dsl/demo/Gemfile +4 -0
- data/dsl/demo/Gemfile.lock +120 -0
- data/dsl/demo/cogs/local.rb +15 -0
- data/dsl/demo/simple_external_cog.rb +17 -0
- data/dsl/json_output.rb +28 -0
- data/dsl/map.rb +55 -0
- data/dsl/map_reduce.rb +37 -0
- data/dsl/map_with_index.rb +49 -0
- data/dsl/next_break.rb +40 -0
- data/dsl/next_break_parallel.rb +44 -0
- data/dsl/outputs.rb +39 -0
- data/dsl/outputs_bang.rb +36 -0
- data/dsl/parallel_map.rb +37 -0
- data/dsl/plugin-gem-example/.gitignore +8 -0
- data/dsl/plugin-gem-example/Gemfile +13 -0
- data/dsl/plugin-gem-example/Gemfile.lock +178 -0
- data/dsl/plugin-gem-example/lib/other.rb +17 -0
- data/dsl/plugin-gem-example/lib/plugin_gem_example.rb +5 -0
- data/dsl/plugin-gem-example/lib/simple.rb +15 -0
- data/dsl/plugin-gem-example/lib/version.rb +10 -0
- data/dsl/plugin-gem-example/plugin-gem-example.gemspec +28 -0
- data/dsl/prompts/simple_prompt.md.erb +3 -0
- data/dsl/prototype.rb +10 -4
- data/dsl/repeat_loop_results.rb +53 -0
- data/dsl/ruby_cog.rb +72 -0
- data/dsl/simple_agent.rb +18 -0
- data/dsl/simple_chat.rb +26 -0
- data/dsl/simple_repeat.rb +29 -0
- data/dsl/skip.rb +36 -0
- data/dsl/step_communication.rb +10 -5
- data/dsl/targets_and_params.rb +57 -0
- data/dsl/temperature.rb +17 -0
- data/dsl/temporary_directory.rb +22 -0
- data/dsl/tutorial/01_your_first_workflow/README.md +179 -0
- data/dsl/tutorial/01_your_first_workflow/configured_chat.rb +33 -0
- data/dsl/tutorial/01_your_first_workflow/hello.rb +23 -0
- data/dsl/tutorial/02_chaining_cogs/README.md +310 -0
- data/dsl/tutorial/02_chaining_cogs/code_review.rb +104 -0
- data/dsl/tutorial/02_chaining_cogs/session_resumption.rb +92 -0
- data/dsl/tutorial/02_chaining_cogs/simple_chain.rb +84 -0
- data/dsl/tutorial/03_targets_and_params/README.md +230 -0
- data/dsl/tutorial/03_targets_and_params/multiple_targets.rb +65 -0
- data/dsl/tutorial/03_targets_and_params/single_target.rb +65 -0
- data/dsl/tutorial/04_configuration_options/README.md +209 -0
- data/dsl/tutorial/04_configuration_options/control_display_and_temperature.rb +104 -0
- data/dsl/tutorial/04_configuration_options/simple_config.rb +68 -0
- data/dsl/tutorial/05_control_flow/README.md +156 -0
- data/dsl/tutorial/05_control_flow/conditional_execution.rb +62 -0
- data/dsl/tutorial/05_control_flow/handling_failures.rb +77 -0
- data/dsl/tutorial/06_reusable_scopes/README.md +172 -0
- data/dsl/tutorial/06_reusable_scopes/accessing_scope_outputs.rb +126 -0
- data/dsl/tutorial/06_reusable_scopes/basic_scope.rb +63 -0
- data/dsl/tutorial/06_reusable_scopes/parameterized_scope.rb +78 -0
- data/dsl/tutorial/07_processing_collections/README.md +152 -0
- data/dsl/tutorial/07_processing_collections/basic_map.rb +70 -0
- data/dsl/tutorial/07_processing_collections/parallel_map.rb +74 -0
- data/dsl/tutorial/08_iterative_workflows/README.md +231 -0
- data/dsl/tutorial/08_iterative_workflows/basic_repeat.rb +57 -0
- data/dsl/tutorial/08_iterative_workflows/conditional_break.rb +57 -0
- data/dsl/tutorial/09_async_cogs/README.md +197 -0
- data/dsl/tutorial/09_async_cogs/basic_async.rb +38 -0
- data/dsl/tutorial/README.md +222 -0
- data/dsl/working_directory.rb +16 -0
- data/exe/roast +1 -1
- data/internal/documentation/architectural-notes.md +115 -0
- data/internal/documentation/doc-comments-external.md +686 -0
- data/internal/documentation/doc-comments-internal.md +342 -0
- data/internal/documentation/doc-comments.md +211 -0
- data/lib/roast/dsl/cog/config.rb +280 -4
- data/lib/roast/dsl/cog/input.rb +73 -0
- data/lib/roast/dsl/cog/output.rb +313 -0
- data/lib/roast/dsl/cog/registry.rb +71 -0
- data/lib/roast/dsl/cog/stack.rb +3 -2
- data/lib/roast/dsl/cog/store.rb +11 -8
- data/lib/roast/dsl/cog.rb +108 -31
- data/lib/roast/dsl/cog_input_context.rb +44 -0
- data/lib/roast/dsl/cog_input_manager.rb +156 -0
- data/lib/roast/dsl/cogs/agent/config.rb +465 -0
- data/lib/roast/dsl/cogs/agent/input.rb +81 -0
- data/lib/roast/dsl/cogs/agent/output.rb +59 -0
- data/lib/roast/dsl/cogs/agent/provider.rb +51 -0
- data/lib/roast/dsl/cogs/agent/providers/claude/claude_invocation.rb +185 -0
- data/lib/roast/dsl/cogs/agent/providers/claude/message.rb +73 -0
- data/lib/roast/dsl/cogs/agent/providers/claude/messages/assistant_message.rb +36 -0
- data/lib/roast/dsl/cogs/agent/providers/claude/messages/result_message.rb +61 -0
- data/lib/roast/dsl/cogs/agent/providers/claude/messages/system_message.rb +47 -0
- data/lib/roast/dsl/cogs/agent/providers/claude/messages/text_message.rb +36 -0
- data/lib/roast/dsl/cogs/agent/providers/claude/messages/tool_result_message.rb +47 -0
- data/lib/roast/dsl/cogs/agent/providers/claude/messages/tool_use_message.rb +46 -0
- data/lib/roast/dsl/cogs/agent/providers/claude/messages/unknown_message.rb +27 -0
- data/lib/roast/dsl/cogs/agent/providers/claude/messages/user_message.rb +37 -0
- data/lib/roast/dsl/cogs/agent/providers/claude/tool_result.rb +51 -0
- data/lib/roast/dsl/cogs/agent/providers/claude/tool_use.rb +48 -0
- data/lib/roast/dsl/cogs/agent/providers/claude.rb +31 -0
- data/lib/roast/dsl/cogs/agent/stats.rb +92 -0
- data/lib/roast/dsl/cogs/agent/usage.rb +62 -0
- data/lib/roast/dsl/cogs/agent.rb +75 -0
- data/lib/roast/dsl/cogs/chat/config.rb +453 -0
- data/lib/roast/dsl/cogs/chat/input.rb +92 -0
- data/lib/roast/dsl/cogs/chat/output.rb +64 -0
- data/lib/roast/dsl/cogs/chat/session.rb +68 -0
- data/lib/roast/dsl/cogs/chat.rb +81 -0
- data/lib/roast/dsl/cogs/cmd.rb +291 -27
- data/lib/roast/dsl/cogs/ruby.rb +171 -0
- data/lib/roast/dsl/command_runner.rb +191 -0
- data/lib/roast/dsl/config_context.rb +2 -47
- data/lib/roast/dsl/config_manager.rb +143 -0
- data/lib/roast/dsl/control_flow.rb +41 -0
- data/lib/roast/dsl/execution_context.rb +9 -0
- data/lib/roast/dsl/execution_manager.rb +267 -0
- data/lib/roast/dsl/nil_assertions.rb +23 -0
- data/lib/roast/dsl/system_cog/params.rb +32 -0
- data/lib/roast/dsl/system_cog.rb +36 -0
- data/lib/roast/dsl/system_cogs/call.rb +162 -0
- data/lib/roast/dsl/system_cogs/map.rb +448 -0
- data/lib/roast/dsl/system_cogs/repeat.rb +242 -0
- data/lib/roast/dsl/workflow.rb +123 -0
- data/lib/roast/dsl/workflow_context.rb +20 -0
- data/lib/roast/dsl/workflow_params.rb +24 -0
- data/lib/roast/sorbet_runtime_stub.rb +154 -0
- data/lib/roast/tools/apply_diff.rb +1 -3
- data/lib/roast/tools/cmd.rb +4 -3
- data/lib/roast/tools/read_file.rb +1 -1
- data/lib/roast/tools/update_files.rb +1 -1
- data/lib/roast/tools/write_file.rb +1 -1
- data/lib/roast/version.rb +1 -1
- data/lib/roast/workflow/base_workflow.rb +4 -0
- data/lib/roast/workflow/step_loader.rb +14 -2
- data/lib/roast-ai.rb +4 -0
- data/lib/roast.rb +60 -22
- data/{roast.gemspec → roast-ai.gemspec} +10 -13
- data/sorbet/config +1 -0
- data/sorbet/rbi/gems/async@2.34.0.rbi +1577 -0
- data/sorbet/rbi/gems/cli-kit@5.2.0.rbi +2063 -0
- data/sorbet/rbi/gems/{cli-ui@2.3.0.rbi → cli-ui@2.7.0-6bdefd1d06305e5d6ae312ac76f9c88f88658dda.rbi} +1418 -1013
- data/sorbet/rbi/gems/console@1.34.2.rbi +1193 -0
- data/sorbet/rbi/gems/fiber-annotation@0.2.0.rbi +50 -0
- data/sorbet/rbi/gems/fiber-local@1.1.0.rbi +35 -0
- data/sorbet/rbi/gems/fiber-storage@1.0.1.rbi +41 -0
- data/sorbet/rbi/gems/io-event@1.14.0.rbi +724 -0
- data/sorbet/rbi/gems/marcel@1.1.0.rbi +239 -0
- data/sorbet/rbi/gems/metrics@0.15.0.rbi +9 -0
- data/sorbet/rbi/gems/ruby_llm@1.8.2.rbi +5703 -0
- data/sorbet/rbi/gems/traces@0.18.2.rbi +9 -0
- data/sorbet/rbi/shims/lib/roast/dsl/cog_input_context.rbi +1197 -0
- data/sorbet/rbi/shims/lib/roast/dsl/config_context.rbi +314 -2
- data/sorbet/rbi/shims/lib/roast/dsl/execution_context.rbi +498 -0
- data/sorbet/tapioca/config.yml +6 -0
- data/sorbet/tapioca/require.rb +2 -0
- metadata +198 -34
- data/dsl/less_simple.rb +0 -112
- data/dsl/simple.rb +0 -8
- data/lib/roast/dsl/cog_execution_context.rb +0 -29
- data/lib/roast/dsl/cogs/graph.rb +0 -53
- data/lib/roast/dsl/cogs.rb +0 -65
- data/lib/roast/dsl/executor.rb +0 -82
- data/lib/roast/dsl/workflow_execution_context.rb +0 -47
- data/sorbet/rbi/gems/cgi@0.5.0.rbi +0 -2961
- data/sorbet/rbi/gems/claude_swarm@0.1.19.rbi +0 -568
- data/sorbet/rbi/gems/cli-kit@5.0.1.rbi +0 -1991
- data/sorbet/rbi/gems/dry-configurable@1.3.0.rbi +0 -672
- data/sorbet/rbi/gems/dry-core@1.1.0.rbi +0 -1894
- data/sorbet/rbi/gems/dry-inflector@1.2.0.rbi +0 -659
- data/sorbet/rbi/gems/dry-initializer@3.2.0.rbi +0 -781
- data/sorbet/rbi/gems/dry-logic@1.6.0.rbi +0 -1127
- data/sorbet/rbi/gems/dry-schema@1.14.1.rbi +0 -3727
- data/sorbet/rbi/gems/dry-types@1.8.3.rbi +0 -3969
- data/sorbet/rbi/gems/fast-mcp-annotations@1.5.3.rbi +0 -1588
- data/sorbet/rbi/gems/mime-types-data@3.2025.0617.rbi +0 -136
- data/sorbet/rbi/gems/mime-types@3.7.0.rbi +0 -1342
- data/sorbet/rbi/gems/rack@2.2.18.rbi +0 -5659
- data/sorbet/rbi/gems/rbs-inline@0.12.0.rbi +0 -2170
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
- data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18492
- 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
|
-
|
|
8
|
-
|
|
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
|