roast-ai 1.1.0 → 1.3.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 +1 -1
- data/.rubocop.yml +10 -1
- data/Gemfile.lock +125 -20
- data/README.md +70 -5
- data/examples/custom_logging.rb +4 -2
- data/examples/demo/Gemfile.lock +17 -15
- data/examples/plugin-gem-example/Gemfile.lock +16 -16
- data/examples/simple_agent.rb +1 -1
- data/examples/simple_chat.rb +1 -1
- data/examples/targets_and_params.rb +12 -0
- data/internal/documentation/{doc-comments-external.md → comments/doc-comments-external.md} +5 -3
- data/internal/documentation/{doc-comments.md → comments/doc-comments.md} +2 -1
- data/internal/rubocop/cop/roast/no_test_class_nesting.rb +126 -0
- data/internal/rubocop/rubocop-roast.yml +6 -0
- data/internal/workflows/maintenance/branch_docs_impact.rb +97 -0
- data/internal/workflows/maintenance/deprecated_models_docs_updater.rb +78 -0
- data/lib/roast/cog/config.rb +1 -1
- data/lib/roast/cog_input_manager.rb +30 -51
- data/lib/roast/cogs/agent/config.rb +61 -5
- data/lib/roast/cogs/agent/providers/claude/claude_invocation.rb +7 -3
- data/lib/roast/cogs/agent/providers/claude/messages/result_message.rb +1 -1
- data/lib/roast/cogs/agent/providers/claude/tool_result.rb +344 -4
- data/lib/roast/cogs/agent/providers/claude/tool_use.rb +356 -1
- data/lib/roast/cogs/agent/providers/pi/messages/tool_call_message.rb +218 -18
- data/lib/roast/cogs/agent/providers/pi/messages/tool_result_message.rb +208 -13
- data/lib/roast/cogs/agent/providers/pi/pi_invocation.rb +4 -2
- data/lib/roast/cogs/agent.rb +3 -2
- data/lib/roast/cogs/chat/config.rb +81 -4
- data/lib/roast/cogs/chat.rb +90 -10
- data/lib/roast/config_manager.rb +29 -2
- data/lib/roast/event.rb +1 -0
- data/lib/roast/event_monitor.rb +35 -3
- data/lib/roast/log.rb +21 -0
- data/lib/roast/log_formatter.rb +9 -7
- data/lib/roast/version.rb +1 -1
- data/lib/roast/workflow.rb +10 -7
- data/lib/roast/workflow_param_accessors.rb +53 -0
- data/roast-ai.gemspec +1 -1
- data/sorbet/rbi/shims/lib/roast/cog/config.rbi +251 -0
- data/sorbet/rbi/shims/lib/roast/config_context.rbi +5 -1
- data/tutorial/01_your_first_workflow/README.md +10 -5
- data/tutorial/01_your_first_workflow/configured_chat.rb +1 -1
- data/tutorial/02_chaining_cogs/README.md +25 -4
- data/tutorial/02_chaining_cogs/code_review.rb +2 -2
- data/tutorial/02_chaining_cogs/session_resumption.rb +2 -1
- data/tutorial/03_targets_and_params/README.md +11 -2
- data/tutorial/04_configuration_options/README.md +21 -2
- data/tutorial/08_iterative_workflows/README.md +1 -1
- data/tutorial/README.md +2 -2
- metadata +14 -8
- /data/internal/documentation/{architectural-notes.md → comments/architectural-notes.md} +0 -0
- /data/internal/documentation/{doc-comments-internal.md → comments/doc-comments-internal.md} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6e2c7eb637034ea1c7a97776161d901ddcce583600bb465fd1f403a4866203c4
|
|
4
|
+
data.tar.gz: 194f9efd30453dbf123f16abab80bce99cf713dee8077858c10fa3e80c53d7cb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92f4fc82409d7b59fed96a2ba31ac9c9c4dc9b9744a8645b934223c2fad8f09f5e960dcb8629963af619310516931391b90e0692162dbe42028553e311cb9eb9
|
|
7
|
+
data.tar.gz: 5d12e5e669c9acc5ac3372f621c2627735c0edaf96bf2c674c56ebbee458b69d3c1fc3dea30073045541e06b01c6ece526bcd597de184e5ea6b84fca8a67f2cb
|
|
@@ -8,7 +8,7 @@ Accepts either:
|
|
|
8
8
|
|
|
9
9
|
## Task
|
|
10
10
|
|
|
11
|
-
Following the guidelines in `internal/documentation/`:
|
|
11
|
+
Following the guidelines in `internal/documentation/comments/`:
|
|
12
12
|
|
|
13
13
|
1. **Determine documentation type:**
|
|
14
14
|
- For Config, Input, Output classes → Use `doc-comments-external.md` (user-facing, thorough)
|
data/.rubocop.yml
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
inherit_from:
|
|
1
|
+
inherit_from:
|
|
2
|
+
- .rubocop_todo.yml
|
|
3
|
+
- internal/rubocop/rubocop-roast.yml
|
|
4
|
+
|
|
5
|
+
require:
|
|
6
|
+
- ./internal/rubocop/cop/roast/no_test_class_nesting
|
|
2
7
|
|
|
3
8
|
plugins:
|
|
4
9
|
- rubocop-sorbet
|
|
@@ -32,6 +37,10 @@ Sorbet/FalseSigil:
|
|
|
32
37
|
- "examples/**/*"
|
|
33
38
|
- "lib/roast/sorbet_runtime_stub.rb"
|
|
34
39
|
|
|
40
|
+
Style/ClassAndModuleChildren:
|
|
41
|
+
Exclude:
|
|
42
|
+
- 'test/**/*.rb'
|
|
43
|
+
|
|
35
44
|
Style/MethodCallWithArgsParentheses:
|
|
36
45
|
Enabled: true
|
|
37
46
|
Exclude:
|
data/Gemfile.lock
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
roast-ai (1.
|
|
4
|
+
roast-ai (1.3.0)
|
|
5
5
|
activesupport (~> 8.0)
|
|
6
6
|
async (>= 2.34)
|
|
7
7
|
rainbow (>= 3.0.0)
|
|
8
|
-
ruby_llm (>= 1.
|
|
8
|
+
ruby_llm (>= 1.13)
|
|
9
9
|
type_toolkit (>= 0.0.5)
|
|
10
10
|
zeitwerk (>= 2.6)
|
|
11
11
|
|
|
12
12
|
GEM
|
|
13
13
|
remote: https://rubygems.org/
|
|
14
14
|
specs:
|
|
15
|
-
activesupport (8.0.
|
|
15
|
+
activesupport (8.0.4.1)
|
|
16
16
|
base64
|
|
17
17
|
benchmark (>= 0.3)
|
|
18
18
|
bigdecimal
|
|
@@ -21,12 +21,12 @@ GEM
|
|
|
21
21
|
drb
|
|
22
22
|
i18n (>= 1.6, < 2)
|
|
23
23
|
logger (>= 1.4.2)
|
|
24
|
-
minitest (>= 5.1)
|
|
24
|
+
minitest (>= 5.1, < 6)
|
|
25
25
|
securerandom (>= 0.3)
|
|
26
26
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
27
27
|
uri (>= 0.13.1)
|
|
28
|
-
addressable (2.
|
|
29
|
-
public_suffix (>= 2.0.2, <
|
|
28
|
+
addressable (2.9.0)
|
|
29
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
30
30
|
ast (2.4.3)
|
|
31
31
|
async (2.34.0)
|
|
32
32
|
console (~> 1.29)
|
|
@@ -35,11 +35,11 @@ GEM
|
|
|
35
35
|
metrics (~> 0.12)
|
|
36
36
|
traces (~> 0.18)
|
|
37
37
|
base64 (0.3.0)
|
|
38
|
-
benchmark (0.
|
|
39
|
-
bigdecimal (
|
|
38
|
+
benchmark (0.5.0)
|
|
39
|
+
bigdecimal (4.1.2)
|
|
40
40
|
coderay (1.1.3)
|
|
41
|
-
concurrent-ruby (1.3.
|
|
42
|
-
connection_pool (
|
|
41
|
+
concurrent-ruby (1.3.7)
|
|
42
|
+
connection_pool (3.0.2)
|
|
43
43
|
console (1.34.2)
|
|
44
44
|
fiber-annotation
|
|
45
45
|
fiber-local (~> 1.1)
|
|
@@ -51,13 +51,13 @@ GEM
|
|
|
51
51
|
drb (2.2.3)
|
|
52
52
|
erubi (1.13.1)
|
|
53
53
|
event_stream_parser (1.0.0)
|
|
54
|
-
faraday (2.14.
|
|
54
|
+
faraday (2.14.3)
|
|
55
55
|
faraday-net_http (>= 2.0, < 3.5)
|
|
56
56
|
json
|
|
57
57
|
logger
|
|
58
58
|
faraday-multipart (1.1.1)
|
|
59
59
|
multipart-post (~> 2.0)
|
|
60
|
-
faraday-net_http (3.4.
|
|
60
|
+
faraday-net_http (3.4.4)
|
|
61
61
|
net-http (~> 0.5)
|
|
62
62
|
faraday-retry (2.3.2)
|
|
63
63
|
faraday (~> 2.0)
|
|
@@ -84,10 +84,10 @@ GEM
|
|
|
84
84
|
guard-compat (~> 1.2)
|
|
85
85
|
minitest (>= 3.0)
|
|
86
86
|
hashdiff (1.2.0)
|
|
87
|
-
i18n (1.
|
|
87
|
+
i18n (1.15.2)
|
|
88
88
|
concurrent-ruby (~> 1.0)
|
|
89
89
|
io-event (1.14.0)
|
|
90
|
-
json (2.
|
|
90
|
+
json (2.20.0)
|
|
91
91
|
language_server-protocol (3.17.0.5)
|
|
92
92
|
lint_roller (1.1.0)
|
|
93
93
|
listen (3.9.0)
|
|
@@ -120,7 +120,7 @@ GEM
|
|
|
120
120
|
pry (0.15.2)
|
|
121
121
|
coderay (~> 1.1)
|
|
122
122
|
method_source (~> 1.0)
|
|
123
|
-
public_suffix (
|
|
123
|
+
public_suffix (7.0.5)
|
|
124
124
|
racc (1.8.1)
|
|
125
125
|
rainbow (3.1.1)
|
|
126
126
|
rake (13.3.0)
|
|
@@ -158,15 +158,17 @@ GEM
|
|
|
158
158
|
rubocop (>= 1.75.2)
|
|
159
159
|
ruby-progressbar (1.13.0)
|
|
160
160
|
ruby2_keywords (0.0.5)
|
|
161
|
-
ruby_llm (1.
|
|
161
|
+
ruby_llm (1.15.0)
|
|
162
162
|
base64
|
|
163
163
|
event_stream_parser (~> 1)
|
|
164
164
|
faraday (>= 1.10.0)
|
|
165
165
|
faraday-multipart (>= 1)
|
|
166
166
|
faraday-net_http (>= 1)
|
|
167
167
|
faraday-retry (>= 1)
|
|
168
|
-
marcel (~> 1
|
|
168
|
+
marcel (~> 1)
|
|
169
|
+
ruby_llm-schema (~> 0)
|
|
169
170
|
zeitwerk (~> 2)
|
|
171
|
+
ruby_llm-schema (0.3.0)
|
|
170
172
|
securerandom (0.4.1)
|
|
171
173
|
shellany (0.0.1)
|
|
172
174
|
simplecov (0.22.0)
|
|
@@ -191,8 +193,8 @@ GEM
|
|
|
191
193
|
rexml (>= 3.2.6)
|
|
192
194
|
sorbet-static-and-runtime (>= 0.5.10187)
|
|
193
195
|
thor (>= 0.19.2)
|
|
194
|
-
sqlite3 (2.9.
|
|
195
|
-
sqlite3 (2.9.
|
|
196
|
+
sqlite3 (2.9.5-arm64-darwin)
|
|
197
|
+
sqlite3 (2.9.5-x86_64-linux-gnu)
|
|
196
198
|
tapioca (0.17.10)
|
|
197
199
|
benchmark
|
|
198
200
|
bundler (>= 2.2.25)
|
|
@@ -222,7 +224,7 @@ GEM
|
|
|
222
224
|
addressable (>= 2.8.0)
|
|
223
225
|
crack (>= 0.3.2)
|
|
224
226
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
225
|
-
yard (0.9.
|
|
227
|
+
yard (0.9.44)
|
|
226
228
|
yard-sorbet (0.9.0)
|
|
227
229
|
sorbet-runtime
|
|
228
230
|
yard
|
|
@@ -249,5 +251,108 @@ DEPENDENCIES
|
|
|
249
251
|
vcr
|
|
250
252
|
webmock
|
|
251
253
|
|
|
254
|
+
CHECKSUMS
|
|
255
|
+
activesupport (8.0.4.1) sha256=822187e99ebca3e90bf03e6ccef5b57447592657f6b1676ccaaa25794ebfc7e6
|
|
256
|
+
addressable (2.9.0) sha256=7fdf6ac3660f7f4e867a0838be3f6cf722ace541dd97767fa42bc6cfa980c7af
|
|
257
|
+
ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
|
|
258
|
+
async (2.34.0) sha256=65ab207d4575c05bb6c5bac430f9f8d372d8288686e68e89f44eba094c77e1c1
|
|
259
|
+
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
|
|
260
|
+
benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c
|
|
261
|
+
bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
|
|
262
|
+
coderay (1.1.3) sha256=dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b
|
|
263
|
+
concurrent-ruby (1.3.7) sha256=4412caec3a5ea2e5fdc52076724c071a81f2c0593d83b2ac8cbb8ca63b3151b0
|
|
264
|
+
connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
|
|
265
|
+
console (1.34.2) sha256=1c036abf606ccec83f9dc28f0c31710fe5936ffe7ba5d235ae2865590a482d58
|
|
266
|
+
crack (1.0.0) sha256=c83aefdb428cdc7b66c7f287e488c796f055c0839e6e545fec2c7047743c4a49
|
|
267
|
+
docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
|
|
268
|
+
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
|
269
|
+
erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9
|
|
270
|
+
event_stream_parser (1.0.0) sha256=a2683bab70126286f8184dc88f7968ffc4028f813161fb073ec90d171f7de3c8
|
|
271
|
+
faraday (2.14.3) sha256=1882247e6766615c8220b4392bf1d27f6ebb63d8e28267587cef1fb0bf37f278
|
|
272
|
+
faraday-multipart (1.1.1) sha256=77a18ff40149030fd1aef55bb4fc7a67ce46419a8a3fcd010e28c2526e8d8903
|
|
273
|
+
faraday-net_http (3.4.4) sha256=0e78af151747ed1b00f33e25973b4bc220d7f16c00c39676817c8b12331eb588
|
|
274
|
+
faraday-retry (2.3.2) sha256=2402d2029032ebd238a2046221e67f6ef0da78c5a8ce8cd4f8b9c62e4d6451d1
|
|
275
|
+
ffi (1.17.2-arm64-darwin) sha256=54dd9789be1d30157782b8de42d8f887a3c3c345293b57ffb6b45b4d1165f813
|
|
276
|
+
ffi (1.17.2-x86_64-linux-gnu) sha256=05d2026fc9dbb7cfd21a5934559f16293815b7ce0314846fee2ac8efbdb823ea
|
|
277
|
+
fiber-annotation (0.2.0) sha256=7abfadf1d119f508867d4103bf231c0354d019cc39a5738945dec2edadaf6c03
|
|
278
|
+
fiber-local (1.1.0) sha256=c885f94f210fb9b05737de65d511136ea602e00c5105953748aa0f8793489f06
|
|
279
|
+
fiber-storage (1.0.1) sha256=f48e5b6d8b0be96dac486332b55cee82240057065dc761c1ea692b2e719240e1
|
|
280
|
+
formatador (1.1.0) sha256=54e23e2af4d60bb9327c7fac62b29968e4cf28cee0111f726d0bdeadc85e06d0
|
|
281
|
+
guard (2.19.1) sha256=b8bc52694be3d8b26730280de7dcec7fe92ea1cff3414246fe96af3f23580f3d
|
|
282
|
+
guard-compat (1.2.1) sha256=3ad21ab0070107f92edfd82610b5cdc2fb8e368851e72362ada9703443d646fe
|
|
283
|
+
guard-minitest (2.4.6) sha256=d89e83d029447c13b191599085d24b6e2fe61e402d275e46491cd3e82f561572
|
|
284
|
+
hashdiff (1.2.0) sha256=c984f13e115bfc9953332e8e83bd9d769cfde9944e2d54e07eb9df7b76e140b5
|
|
285
|
+
i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5
|
|
286
|
+
io-event (1.14.0) sha256=e52abe4fa1f48e8b4311aa252c4b1f466716a038d01ff7ae83c72385bb209436
|
|
287
|
+
json (2.20.0) sha256=9362bc6e55a952b056abf9167cf053358181c904cb70cd6eee0808ea830fc32b
|
|
288
|
+
language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
|
|
289
|
+
lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
|
|
290
|
+
listen (3.9.0) sha256=db9e4424e0e5834480385197c139cb6b0ae0ef28cc13310cfd1ca78377d59c67
|
|
291
|
+
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
|
|
292
|
+
lumberjack (1.2.10) sha256=bbfe951629341095028ecbf1ad496b58bec3f8bcad6fe35a203a377839c42b6c
|
|
293
|
+
marcel (1.1.0) sha256=fdcfcfa33cc52e93c4308d40e4090a5d4ea279e160a7f6af988260fa970e0bee
|
|
294
|
+
method_source (1.1.0) sha256=181301c9c45b731b4769bc81e8860e72f9161ad7d66dd99103c9ab84f560f5c5
|
|
295
|
+
metrics (0.15.0) sha256=61ded5bac95118e995b1bc9ed4a5f19bc9814928a312a85b200abbdac9039072
|
|
296
|
+
minitest (5.25.5) sha256=391b6c6cb43a4802bfb7c93af1ebe2ac66a210293f4a3fb7db36f2fc7dc2c756
|
|
297
|
+
minitest-rg (5.3.0) sha256=12a1b0ecdd71bc484cff1c65a4a51bdee3a64109bfc8133b67146edbd2ac8f6f
|
|
298
|
+
mocha (2.7.1) sha256=8f7d538d5d3ebc75fc788b3d92fbab913a93a78462d2a3ce99d1bdde7af7f851
|
|
299
|
+
multipart-post (2.4.1) sha256=9872d03a8e552020ca096adadbf5e3cb1cd1cdd6acd3c161136b8a5737cdb4a8
|
|
300
|
+
nenv (0.3.0) sha256=d9de6d8fb7072228463bf61843159419c969edb34b3cef51832b516ae7972765
|
|
301
|
+
net-http (0.9.1) sha256=25ba0b67c63e89df626ed8fac771d0ad24ad151a858af2cc8e6a716ca4336996
|
|
302
|
+
netrc (0.11.0) sha256=de1ce33da8c99ab1d97871726cba75151113f117146becbe45aa85cb3dabee3f
|
|
303
|
+
notiffany (0.1.3) sha256=d37669605b7f8dcb04e004e6373e2a780b98c776f8eb503ac9578557d7808738
|
|
304
|
+
ostruct (0.6.2) sha256=6d7302a299e400a2c248d6ce0dad18fc3a5714e8096facc25ffd0c54ee57cfc0
|
|
305
|
+
parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
|
|
306
|
+
parser (3.3.8.0) sha256=2476364142b307fa5a1b1ece44f260728be23858a9c71078e956131a75453c45
|
|
307
|
+
prism (1.4.0) sha256=dc0e3e00e93160213dc2a65519d9002a4a1e7b962db57d444cf1a71565bb703e
|
|
308
|
+
pry (0.15.2) sha256=12d54b8640d3fa29c9211dd4ffb08f3fd8bf7a4fd9b5a73ce5b59c8709385b6b
|
|
309
|
+
public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623
|
|
310
|
+
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
|
|
311
|
+
rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
|
|
312
|
+
rake (13.3.0) sha256=96f5092d786ff412c62fde76f793cc0541bd84d2eb579caa529aa8a059934493
|
|
313
|
+
rb-fsevent (0.11.2) sha256=43900b972e7301d6570f64b850a5aa67833ee7d87b458ee92805d56b7318aefe
|
|
314
|
+
rb-inotify (0.11.1) sha256=a0a700441239b0ff18eb65e3866236cd78613d6b9f78fea1f9ac47a85e47be6e
|
|
315
|
+
rbi (0.3.9) sha256=d6a187bd0b376e999d3d82a5e5798a61178be98b894b7b35741c14162c9ea015
|
|
316
|
+
rbs (4.0.0.dev.5) sha256=273938e5a9c7f06b041be583588f2aa1976149bda2ce213e33e129c51534e174
|
|
317
|
+
regexp_parser (2.10.0) sha256=cb6f0ddde88772cd64bff1dbbf68df66d376043fe2e66a9ef77fcb1b0c548c61
|
|
318
|
+
require-hooks (0.2.3) sha256=224be5b4be0fd2a47cb73286c500da366704a54ec195b6627366380c950efac8
|
|
319
|
+
rexml (3.4.2) sha256=1384268554a37af5da5279431ca3f2f37d46f09ffdd6c95e17cc84c83ea7c417
|
|
320
|
+
roast-ai (1.3.0)
|
|
321
|
+
rubocop (1.77.0) sha256=1f360b4575ef7a124be27b0dfffa227a2b2d9420d22d4fd8bf179d702bcc88c0
|
|
322
|
+
rubocop-ast (1.45.1) sha256=94042e49adc17f187ba037b33f941ba7398fede77cdf4bffafba95190a473a3e
|
|
323
|
+
rubocop-shopify (2.17.1) sha256=03850eb1a9c4d1f9f0ac1d8d5aa51bb47a149e532cfb5e8d02ac6a90c8800a5f
|
|
324
|
+
rubocop-sorbet (0.10.5) sha256=221672c096616d908a06aadd5111bfaab6d3c990d2a1caf2714cdec6514f4795
|
|
325
|
+
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
|
|
326
|
+
ruby2_keywords (0.0.5) sha256=ffd13740c573b7301cf7a2e61fc857b2a8e3d3aff32545d6f8300d8bae10e3ef
|
|
327
|
+
ruby_llm (1.15.0) sha256=ca207465bca1cca007010a79fce500d4012b1fbe188b025040cd37b884fb98af
|
|
328
|
+
ruby_llm-schema (0.3.0) sha256=a591edc5ca1b7f0304f0e2261de61ba4b3bea17be09f5cf7558153adfda3dec6
|
|
329
|
+
securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
|
|
330
|
+
shellany (0.0.1) sha256=0e127a9132698766d7e752e82cdac8250b6adbd09e6c0a7fbbb6f61964fedee7
|
|
331
|
+
simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
|
|
332
|
+
simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246
|
|
333
|
+
simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428
|
|
334
|
+
sorbet (0.6.12984) sha256=f7b03699d62eeec2d0ea685e7c27334e81de11842a119d5fc01031112d7c3656
|
|
335
|
+
sorbet-runtime (0.6.12984) sha256=3fff20a5b147a2e191210563d61886ac121fc1cd8b5e0faf6bc18873139e0fe4
|
|
336
|
+
sorbet-static (0.6.12984-universal-darwin) sha256=0ac0a696cbcf422f4fe590064db9a2248fae50ed96094504be72a2709a63ae23
|
|
337
|
+
sorbet-static (0.6.12984-x86_64-linux) sha256=39c03af15badb204d640fbc6398bee171f4026377f31cba08cdb381091159c57
|
|
338
|
+
sorbet-static-and-runtime (0.6.12984) sha256=281b39ef61aee83551333df581a8d53737bc39df19e09e9cbe01ca8f8b93826f
|
|
339
|
+
spoom (1.7.11) sha256=4e27384af6d3fde5aadc0287c51e6f76c0802259cbb3b6a67603bf718352f4cf
|
|
340
|
+
sqlite3 (2.9.5-arm64-darwin) sha256=d0cf444a70fc9395d513cfbcc1e6719e224aa645314e3824cb0474c721425aa2
|
|
341
|
+
sqlite3 (2.9.5-x86_64-linux-gnu) sha256=233dbcb6714148dd23bc5aeb33e8efd6eac974969564ddd5794c23d5f52b231e
|
|
342
|
+
tapioca (0.17.10) sha256=880a682ca8314f798dd09e9f104134fbf1a713c13be51f7dd4741dd434e6471b
|
|
343
|
+
thor (1.4.0) sha256=8763e822ccb0f1d7bee88cde131b19a65606657b847cc7b7b4b82e772bcd8a3d
|
|
344
|
+
traces (0.18.2) sha256=80f1649cb4daace1d7174b81f3b3b7427af0b93047759ba349960cb8f315e214
|
|
345
|
+
tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
|
|
346
|
+
type_toolkit (0.0.5) sha256=5bb0b6b656728da43db0e1a1a48e99a41e70851ce660ac5759dd077473bd1875
|
|
347
|
+
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
|
|
348
|
+
unicode-display_width (3.1.4) sha256=8caf2af1c0f2f07ec89ef9e18c7d88c2790e217c482bfc78aaa65eadd5415ac1
|
|
349
|
+
unicode-emoji (4.0.4) sha256=2c2c4ef7f353e5809497126285a50b23056cc6e61b64433764a35eff6c36532a
|
|
350
|
+
uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
|
|
351
|
+
vcr (6.3.1) sha256=37b56e157e720446a3f4d2d39919cabef8cb7b6c45936acffd2ef8229fec03ed
|
|
352
|
+
webmock (3.25.1) sha256=ab9d5d9353bcbe6322c83e1c60a7103988efc7b67cd72ffb9012629c3d396323
|
|
353
|
+
yard (0.9.44) sha256=eb087e9b631ccd887b049f303d489963945452d5e2a7eb49a5a74a7cf6887f28
|
|
354
|
+
yard-sorbet (0.9.0) sha256=03d1aa461b9e9c82b886919a13aa3e09fcf4d1852239d2967ed97e92723ffe21
|
|
355
|
+
zeitwerk (2.7.3) sha256=b2e86b4a9b57d26ba68a15230dcc7fe6f040f06831ce64417b0621ad96ba3e85
|
|
356
|
+
|
|
252
357
|
BUNDLED WITH
|
|
253
358
|
2.6.8
|
data/README.md
CHANGED
|
@@ -9,7 +9,7 @@ A Ruby-based domain-specific language for creating structured AI workflows. Buil
|
|
|
9
9
|
Roast lets you orchestrate AI workflows by combining "cogs" - building blocks that interact with LLMs, run code, execute commands, and process data. Write workflows that:
|
|
10
10
|
|
|
11
11
|
- **Chain AI steps together** - Output from one cog flows seamlessly to the next
|
|
12
|
-
- **Run coding agents locally** - Full filesystem access with Claude Code or other providers
|
|
12
|
+
- **Run coding agents locally** - Full filesystem access with Pi, Claude Code, or other providers
|
|
13
13
|
- **Process collections** - Map operations over arrays with serial or parallel execution
|
|
14
14
|
- **Control flow intelligently** - Conditional execution, iteration, and error handling
|
|
15
15
|
- **Reuse workflow components** - Create modular, parameterized scopes
|
|
@@ -47,8 +47,8 @@ bin/roast execute analyze_codebase.rb
|
|
|
47
47
|
|
|
48
48
|
## Core Cogs
|
|
49
49
|
|
|
50
|
-
- **`chat`** - Send prompts to cloud-based LLMs (OpenAI, Anthropic,
|
|
51
|
-
- **`agent`** - Run local coding agents with filesystem access (Claude Code CLI, etc.)
|
|
50
|
+
- **`chat`** - Send prompts to cloud-based LLMs (OpenAI, Anthropic, Perplexity, Gemini & Amazon Bedrock)
|
|
51
|
+
- **`agent`** - Run local coding agents with filesystem access (Pi CLI, Claude Code CLI, etc.)
|
|
52
52
|
- **`ruby`** - Execute custom Ruby code within workflows
|
|
53
53
|
- **`cmd`** - Run shell commands and capture output
|
|
54
54
|
- **`map`** - Process collections in serial or parallel
|
|
@@ -69,8 +69,72 @@ gem 'roast-ai'
|
|
|
69
69
|
## Requirements
|
|
70
70
|
|
|
71
71
|
- Ruby 3.0+
|
|
72
|
-
- API keys for your AI provider
|
|
73
|
-
-
|
|
72
|
+
- API keys or local credentials for your AI provider
|
|
73
|
+
- Pi CLI installed (for the default agent provider)
|
|
74
|
+
|
|
75
|
+
## Provider Configuration
|
|
76
|
+
|
|
77
|
+
Roast provider settings are configured in workflow `config` blocks. To change the default **chat** provider without editing each workflow, set the `ROAST_DEFAULT_CHAT_PROVIDER` environment variable (e.g. `export ROAST_DEFAULT_CHAT_PROVIDER=anthropic`). To change the default **agent** provider, set `ROAST_DEFAULT_AGENT_PROVIDER`. A `provider` set in a workflow's `config` always takes precedence over these variables, and an invalid value raises an error.
|
|
78
|
+
|
|
79
|
+
### Chat cog
|
|
80
|
+
|
|
81
|
+
The `chat` cog supports **OpenAI**, **Anthropic**, **Perplexity**, **Gemini**, and **Amazon Bedrock**. It defaults to `:openai` (override globally with `ROAST_DEFAULT_CHAT_PROVIDER`). Each provider reads its API key from a provider-specific environment variable:
|
|
82
|
+
|
|
83
|
+
| Provider | API key env var | Base URL env var |
|
|
84
|
+
|---|---|---|
|
|
85
|
+
| `:openai` | `OPENAI_API_KEY` | `OPENAI_API_BASE` |
|
|
86
|
+
| `:anthropic` | `ANTHROPIC_API_KEY` | `ANTHROPIC_API_BASE` |
|
|
87
|
+
| `:perplexity` | `PERPLEXITY_API_KEY` | — |
|
|
88
|
+
| `:gemini` | `GEMINI_API_KEY` | `GEMINI_API_BASE` |
|
|
89
|
+
| `:bedrock` | `AWS_ACCESS_KEY_ID` | — |
|
|
90
|
+
|
|
91
|
+
The `:bedrock` provider also reads `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN` (for temporary credentials) and `AWS_REGION` from the environment. It does not read AWS profiles. It reads every credential from the environment, so do not use `api_key` with `:bedrock`: it replaces only the access key ID and can pair it with a mismatched `AWS_SECRET_ACCESS_KEY`. The default model is a `us.` inference profile, so accounts outside the US must set `model` in the `chat` config block. To use AWS SSO, export temporary credentials first:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
eval "$(aws configure export-credentials --profile my-profile --format env)"
|
|
95
|
+
export AWS_REGION=us-west-2
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
You can configure the provider directly in a workflow:
|
|
99
|
+
|
|
100
|
+
```ruby
|
|
101
|
+
config do
|
|
102
|
+
chat do
|
|
103
|
+
provider :anthropic
|
|
104
|
+
model "claude-haiku-4-5"
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Agent cog
|
|
110
|
+
|
|
111
|
+
The `agent` cog runs local agent CLIs. It defaults to `:pi` (override globally with `ROAST_DEFAULT_AGENT_PROVIDER`) and currently supports:
|
|
112
|
+
|
|
113
|
+
- `:claude` - Claude Code CLI
|
|
114
|
+
- `:pi` - Pi CLI
|
|
115
|
+
|
|
116
|
+
Select a provider in the workflow config:
|
|
117
|
+
|
|
118
|
+
```ruby
|
|
119
|
+
config do
|
|
120
|
+
agent do
|
|
121
|
+
provider :pi
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Agent providers must be installed and authenticated according to their own CLI requirements.
|
|
127
|
+
|
|
128
|
+
## Configuration
|
|
129
|
+
|
|
130
|
+
Roast currently supports five LLM providers for the `chat` cog: **OpenAI**, **Anthropic**, **Perplexity**, **Gemini** and **Amazon Bedrock**.
|
|
131
|
+
|
|
132
|
+
- Set `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `PERPLEXITY_API_KEY` and/or `GEMINI_API_KEY` in your environment. For Bedrock, set `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `AWS_REGION` instead.
|
|
133
|
+
- Optionally set `OPENAI_API_BASE`, `ANTHROPIC_API_BASE` and/or `GEMINI_API_BASE` to override the default endpoint. Perplexity does not support base URL override.
|
|
134
|
+
|
|
135
|
+
The default model is set per-provider and can only be overridden inside a `config` block. See the [tutorial](https://github.com/Shopify/roast/blob/main/tutorial/01_your_first_workflow/README.md#adding-configuration) for examples.
|
|
136
|
+
|
|
137
|
+
The `agent` cog is powered by the Pi CLI by default, which handles its own authentication.
|
|
74
138
|
|
|
75
139
|
## Getting Started
|
|
76
140
|
|
|
@@ -106,6 +170,7 @@ class and method comments on the relevant classes.
|
|
|
106
170
|
* [Additional Example Workflows]([https://github.com/Shopify/roast/tree/main/examples](https://github.com/Shopify/roast/tree/main/examples)) (these comprise the Roast end-to-end test suite)
|
|
107
171
|
* __Configuation__
|
|
108
172
|
* [General configuration block: `config-context.rbi`](https://github.com/Shopify/roast/blob/main/sorbet/rbi/shims/lib/roast/config_context.rbi)
|
|
173
|
+
* [Workflow params in cog config blocks: `cog/config.rbi`](https://github.com/Shopify/roast/blob/main/sorbet/rbi/shims/lib/roast/cog/config.rbi)
|
|
109
174
|
* [Global cog configuration: `cog/config.rb`](https://github.com/Shopify/roast/blob/main/lib/roast/cog/config.rb)
|
|
110
175
|
* [Agent cog configuration: `agent/config.rb`](https://github.com/Shopify/roast/blob/main/lib/roast/cogs/agent/config.rb)
|
|
111
176
|
* [Chat cog configuration: `chat/config.rb`](https://github.com/Shopify/roast/blob/main/lib/roast/cogs/chat/config.rb)
|
data/examples/custom_logging.rb
CHANGED
|
@@ -12,9 +12,11 @@
|
|
|
12
12
|
# Log to standard output, always at the DEBUG level
|
|
13
13
|
Roast::Log.logger = Logger.new($stdout).tap { |logger| logger.level = ::Logger::DEBUG }
|
|
14
14
|
|
|
15
|
-
# Format log lines in a particular way
|
|
15
|
+
# Format log lines in a particular way. `msg` may be a String or a
|
|
16
|
+
# Roast::Log::Message (stdout/stderr output is wrapped to carry its type),
|
|
17
|
+
# so normalise with #to_s before formatting.
|
|
16
18
|
Roast::Log.logger.formatter = proc do |severity, time, progname, msg|
|
|
17
|
-
"#{severity[0..0]}, #{msg.strip} (at #{time})\n"
|
|
19
|
+
"#{severity[0..0]}, #{msg.to_s.strip} (at #{time})\n"
|
|
18
20
|
end
|
|
19
21
|
|
|
20
22
|
|
data/examples/demo/Gemfile.lock
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ../..
|
|
3
3
|
specs:
|
|
4
|
-
roast-ai (1.
|
|
4
|
+
roast-ai (1.3.0)
|
|
5
5
|
activesupport (~> 8.0)
|
|
6
6
|
async (>= 2.34)
|
|
7
7
|
rainbow (>= 3.0.0)
|
|
8
|
-
ruby_llm (>= 1.
|
|
8
|
+
ruby_llm (>= 1.13)
|
|
9
9
|
type_toolkit (>= 0.0.5)
|
|
10
10
|
zeitwerk (>= 2.6)
|
|
11
11
|
|
|
@@ -18,7 +18,7 @@ PATH
|
|
|
18
18
|
GEM
|
|
19
19
|
remote: https://rubygems.org/
|
|
20
20
|
specs:
|
|
21
|
-
activesupport (8.0.
|
|
21
|
+
activesupport (8.0.4.1)
|
|
22
22
|
base64
|
|
23
23
|
benchmark (>= 0.3)
|
|
24
24
|
bigdecimal
|
|
@@ -27,7 +27,7 @@ GEM
|
|
|
27
27
|
drb
|
|
28
28
|
i18n (>= 1.6, < 2)
|
|
29
29
|
logger (>= 1.4.2)
|
|
30
|
-
minitest (>= 5.1)
|
|
30
|
+
minitest (>= 5.1, < 6)
|
|
31
31
|
securerandom (>= 0.3)
|
|
32
32
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
33
33
|
uri (>= 0.13.1)
|
|
@@ -39,23 +39,23 @@ GEM
|
|
|
39
39
|
metrics (~> 0.12)
|
|
40
40
|
traces (~> 0.18)
|
|
41
41
|
base64 (0.3.0)
|
|
42
|
-
benchmark (0.
|
|
43
|
-
bigdecimal (
|
|
44
|
-
concurrent-ruby (1.3.
|
|
45
|
-
connection_pool (
|
|
42
|
+
benchmark (0.5.0)
|
|
43
|
+
bigdecimal (4.1.2)
|
|
44
|
+
concurrent-ruby (1.3.7)
|
|
45
|
+
connection_pool (3.0.2)
|
|
46
46
|
console (1.34.2)
|
|
47
47
|
fiber-annotation
|
|
48
48
|
fiber-local (~> 1.1)
|
|
49
49
|
json
|
|
50
50
|
drb (2.2.3)
|
|
51
51
|
event_stream_parser (1.0.0)
|
|
52
|
-
faraday (2.14.
|
|
52
|
+
faraday (2.14.3)
|
|
53
53
|
faraday-net_http (>= 2.0, < 3.5)
|
|
54
54
|
json
|
|
55
55
|
logger
|
|
56
56
|
faraday-multipart (1.1.1)
|
|
57
57
|
multipart-post (~> 2.0)
|
|
58
|
-
faraday-net_http (3.4.
|
|
58
|
+
faraday-net_http (3.4.4)
|
|
59
59
|
net-http (~> 0.5)
|
|
60
60
|
faraday-retry (2.3.2)
|
|
61
61
|
faraday (~> 2.0)
|
|
@@ -63,16 +63,16 @@ GEM
|
|
|
63
63
|
fiber-local (1.1.0)
|
|
64
64
|
fiber-storage
|
|
65
65
|
fiber-storage (1.0.1)
|
|
66
|
-
i18n (1.14.
|
|
66
|
+
i18n (1.14.8)
|
|
67
67
|
concurrent-ruby (~> 1.0)
|
|
68
68
|
io-event (1.14.0)
|
|
69
|
-
json (2.
|
|
69
|
+
json (2.21.2)
|
|
70
70
|
language_server-protocol (3.17.0.5)
|
|
71
71
|
lint_roller (1.1.0)
|
|
72
72
|
logger (1.7.0)
|
|
73
73
|
marcel (1.1.0)
|
|
74
74
|
metrics (0.15.0)
|
|
75
|
-
minitest (5.
|
|
75
|
+
minitest (5.27.0)
|
|
76
76
|
multipart-post (2.4.1)
|
|
77
77
|
net-http (0.9.1)
|
|
78
78
|
uri (>= 0.11.1)
|
|
@@ -99,15 +99,17 @@ GEM
|
|
|
99
99
|
parser (>= 3.3.7.2)
|
|
100
100
|
prism (~> 1.7)
|
|
101
101
|
ruby-progressbar (1.13.0)
|
|
102
|
-
ruby_llm (1.
|
|
102
|
+
ruby_llm (1.15.0)
|
|
103
103
|
base64
|
|
104
104
|
event_stream_parser (~> 1)
|
|
105
105
|
faraday (>= 1.10.0)
|
|
106
106
|
faraday-multipart (>= 1)
|
|
107
107
|
faraday-net_http (>= 1)
|
|
108
108
|
faraday-retry (>= 1)
|
|
109
|
-
marcel (~> 1
|
|
109
|
+
marcel (~> 1)
|
|
110
|
+
ruby_llm-schema (~> 0)
|
|
110
111
|
zeitwerk (~> 2)
|
|
112
|
+
ruby_llm-schema (0.4.0)
|
|
111
113
|
securerandom (0.4.1)
|
|
112
114
|
traces (0.18.2)
|
|
113
115
|
type_toolkit (0.0.5)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ../..
|
|
3
3
|
specs:
|
|
4
|
-
roast-ai (1.
|
|
4
|
+
roast-ai (1.3.0)
|
|
5
5
|
activesupport (~> 8.0)
|
|
6
6
|
async (>= 2.34)
|
|
7
7
|
rainbow (>= 3.0.0)
|
|
8
|
-
ruby_llm (>= 1.
|
|
8
|
+
ruby_llm (>= 1.13)
|
|
9
9
|
type_toolkit (>= 0.0.5)
|
|
10
10
|
zeitwerk (>= 2.6)
|
|
11
11
|
|
|
@@ -18,7 +18,7 @@ PATH
|
|
|
18
18
|
GEM
|
|
19
19
|
remote: https://rubygems.org/
|
|
20
20
|
specs:
|
|
21
|
-
activesupport (8.0.
|
|
21
|
+
activesupport (8.0.4.1)
|
|
22
22
|
base64
|
|
23
23
|
benchmark (>= 0.3)
|
|
24
24
|
bigdecimal
|
|
@@ -27,7 +27,7 @@ GEM
|
|
|
27
27
|
drb
|
|
28
28
|
i18n (>= 1.6, < 2)
|
|
29
29
|
logger (>= 1.4.2)
|
|
30
|
-
minitest (>= 5.1)
|
|
30
|
+
minitest (>= 5.1, < 6)
|
|
31
31
|
securerandom (>= 0.3)
|
|
32
32
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
33
33
|
uri (>= 0.13.1)
|
|
@@ -39,25 +39,25 @@ GEM
|
|
|
39
39
|
metrics (~> 0.12)
|
|
40
40
|
traces (~> 0.18)
|
|
41
41
|
base64 (0.3.0)
|
|
42
|
-
benchmark (0.
|
|
43
|
-
bigdecimal (
|
|
44
|
-
concurrent-ruby (1.3.
|
|
45
|
-
connection_pool (
|
|
42
|
+
benchmark (0.5.0)
|
|
43
|
+
bigdecimal (4.1.2)
|
|
44
|
+
concurrent-ruby (1.3.7)
|
|
45
|
+
connection_pool (3.0.2)
|
|
46
46
|
console (1.34.3)
|
|
47
47
|
fiber-annotation
|
|
48
48
|
fiber-local (~> 1.1)
|
|
49
49
|
json
|
|
50
50
|
date (3.4.1)
|
|
51
51
|
drb (2.2.3)
|
|
52
|
-
erb (
|
|
52
|
+
erb (6.0.1.1)
|
|
53
53
|
event_stream_parser (1.0.0)
|
|
54
|
-
faraday (2.14.
|
|
54
|
+
faraday (2.14.3)
|
|
55
55
|
faraday-net_http (>= 2.0, < 3.5)
|
|
56
56
|
json
|
|
57
57
|
logger
|
|
58
58
|
faraday-multipart (1.1.1)
|
|
59
59
|
multipart-post (~> 2.0)
|
|
60
|
-
faraday-net_http (3.4.
|
|
60
|
+
faraday-net_http (3.4.4)
|
|
61
61
|
net-http (~> 0.5)
|
|
62
62
|
faraday-retry (2.3.2)
|
|
63
63
|
faraday (~> 2.0)
|
|
@@ -65,7 +65,7 @@ GEM
|
|
|
65
65
|
fiber-local (1.1.0)
|
|
66
66
|
fiber-storage
|
|
67
67
|
fiber-storage (1.0.1)
|
|
68
|
-
i18n (1.14.
|
|
68
|
+
i18n (1.14.8)
|
|
69
69
|
concurrent-ruby (~> 1.0)
|
|
70
70
|
io-console (0.8.1)
|
|
71
71
|
io-event (1.14.2)
|
|
@@ -73,7 +73,7 @@ GEM
|
|
|
73
73
|
pp (>= 0.6.0)
|
|
74
74
|
rdoc (>= 4.0.0)
|
|
75
75
|
reline (>= 0.4.2)
|
|
76
|
-
json (2.
|
|
76
|
+
json (2.21.2)
|
|
77
77
|
language_server-protocol (3.17.0.5)
|
|
78
78
|
lint_roller (1.1.0)
|
|
79
79
|
logger (1.7.0)
|
|
@@ -119,15 +119,15 @@ GEM
|
|
|
119
119
|
parser (>= 3.3.7.2)
|
|
120
120
|
prism (~> 1.4)
|
|
121
121
|
ruby-progressbar (1.13.0)
|
|
122
|
-
ruby_llm (1.
|
|
122
|
+
ruby_llm (1.15.0)
|
|
123
123
|
base64
|
|
124
124
|
event_stream_parser (~> 1)
|
|
125
125
|
faraday (>= 1.10.0)
|
|
126
126
|
faraday-multipart (>= 1)
|
|
127
127
|
faraday-net_http (>= 1)
|
|
128
128
|
faraday-retry (>= 1)
|
|
129
|
-
marcel (~> 1
|
|
130
|
-
ruby_llm-schema (~> 0
|
|
129
|
+
marcel (~> 1)
|
|
130
|
+
ruby_llm-schema (~> 0)
|
|
131
131
|
zeitwerk (~> 2)
|
|
132
132
|
ruby_llm-schema (0.2.5)
|
|
133
133
|
securerandom (0.4.1)
|
data/examples/simple_agent.rb
CHANGED
data/examples/simple_chat.rb
CHANGED
|
@@ -21,6 +21,6 @@ execute do
|
|
|
21
21
|
# Ask a question with a template prompt. You can pass variables to it as you would an ERB template
|
|
22
22
|
chat { template("examples/prompts/simple_prompt.md.erb", { lake_answer: chat!(:lake).response }) }
|
|
23
23
|
|
|
24
|
-
# Shorthand template syntax - searches prompts/
|
|
24
|
+
# Shorthand template syntax - searches prompts/ and templates/ directories automatically
|
|
25
25
|
chat { template("simple_prompt", { lake_answer: chat!(:lake).response }) }
|
|
26
26
|
end
|
|
@@ -4,6 +4,18 @@
|
|
|
4
4
|
#: self as Roast::Workflow
|
|
5
5
|
|
|
6
6
|
config do
|
|
7
|
+
# Workflow params are available inside cog config blocks and the `global` block, so you can
|
|
8
|
+
# configure cogs based on how the workflow was invoked.
|
|
9
|
+
chat do
|
|
10
|
+
# e.g., pick a cheaper model when the workflow is invoked with the `fast` flag:
|
|
11
|
+
# roast execute examples/targets_and_params.rb -- fast
|
|
12
|
+
model(arg?(:fast) ? "gpt-5.4-nano" : "gpt-5")
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# `global` config applies to every cog; the same param accessors work here too.
|
|
16
|
+
global do
|
|
17
|
+
abort_on_failure! if arg?(:strict)
|
|
18
|
+
end
|
|
7
19
|
end
|
|
8
20
|
|
|
9
21
|
execute do
|
|
@@ -165,7 +165,8 @@ shortened names can be confusing. Use the complete module path.
|
|
|
165
165
|
```ruby
|
|
166
166
|
# Configure the cog to use the default provider when invoking an agent
|
|
167
167
|
#
|
|
168
|
-
# The default provider
|
|
168
|
+
# The default provider is the one named by the `ROAST_DEFAULT_AGENT_PROVIDER` environment variable,
|
|
169
|
+
# or Pi (`:pi`) when that variable is unset.
|
|
169
170
|
#: () -> void
|
|
170
171
|
def use_default_provider!
|
|
171
172
|
@values[:provider] = nil
|
|
@@ -386,7 +387,8 @@ end
|
|
|
386
387
|
# Configure the cog to use a specified provider when invoking an agent
|
|
387
388
|
#
|
|
388
389
|
# The provider is the source of the agent tool itself.
|
|
389
|
-
# If no provider is specified,
|
|
390
|
+
# If no provider is specified, Roast uses the provider named by the `ROAST_DEFAULT_AGENT_PROVIDER`
|
|
391
|
+
# environment variable, or Pi (`:pi`) when that variable is unset.
|
|
390
392
|
#
|
|
391
393
|
# A provider must be properly installed on your system in order for Roast to be able to use it.
|
|
392
394
|
#
|
|
@@ -519,7 +521,7 @@ Methods in `config_context.rbi` expose cog configuration interfaces and are the
|
|
|
519
521
|
#
|
|
520
522
|
# #### Configure the LLM provider
|
|
521
523
|
# - `provider(symbol)` - Set the agent provider (e.g., `:claude`)
|
|
522
|
-
# - `use_default_provider!` - Use the default provider (`:
|
|
524
|
+
# - `use_default_provider!` - Use the default provider (`:pi`, or `$ROAST_DEFAULT_AGENT_PROVIDER` when set)
|
|
523
525
|
#
|
|
524
526
|
# #### Configure the base command used to run the coding agent
|
|
525
527
|
# - `command(string_or_array)` - Set the base command for invoking the agent
|