roast-ai 0.2.2 → 0.2.3
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/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/bin/roast +1 -1
- data/lib/roast/version.rb +1 -1
- data/lib/roast/workflow/base_iteration_step.rb +5 -4
- data/lib/roast/workflow/base_step.rb +1 -0
- data/lib/roast/workflow/iteration_executor.rb +4 -1
- data/lib/roast/workflow/workflow_executor.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 728c4818301b1d1ede4ddebb32de6517c84d8f34bc6a4c5541129ae115ec172f
|
4
|
+
data.tar.gz: d786b94dcf8112d5686ff298a7f474d9441c1b80cb8956c6fe5e85e270a4ee49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b93152561bcafd30a22f6c5059040b29a9c26f9a1f73a369cee4d7329594331d793f0e545c47641fc3024876bebf0814eaa51e7c7f28db27a675ff4735e209ee
|
7
|
+
data.tar.gz: 3899e1afeed2608ba61bea219e5b7ce852c7408253b7e8d3865f6aeefd58a4d769df3af29ec69c46036a8f5912f1556d63c9dc26ab480fa00801011883b036b5
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [0.2.3] - 2025-05-29
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
- Model inheritance for nested steps in iteration steps (#105)
|
12
|
+
- Nested steps within `repeat` and `each` blocks now properly inherit model configuration
|
13
|
+
- Configuration hierarchy works correctly: step-specific → workflow-level → default model
|
14
|
+
- Previously, nested steps always used the default model regardless of configuration
|
15
|
+
|
8
16
|
## [0.2.2] - 2025-05-29
|
9
17
|
|
10
18
|
### Added
|
data/Gemfile.lock
CHANGED
data/bin/roast
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
12
12
|
|
13
13
|
bundle_binstub = File.expand_path("bundle", __dir__)
|
14
14
|
|
data/lib/roast/version.rb
CHANGED
@@ -12,11 +12,12 @@ module Roast
|
|
12
12
|
|
13
13
|
DEFAULT_MAX_ITERATIONS = 100
|
14
14
|
|
15
|
-
attr_reader :steps
|
15
|
+
attr_reader :steps, :config_hash
|
16
16
|
|
17
|
-
def initialize(workflow, steps:, **kwargs)
|
17
|
+
def initialize(workflow, steps:, config_hash: {}, **kwargs)
|
18
18
|
super(workflow, **kwargs)
|
19
19
|
@steps = steps
|
20
|
+
@config_hash = config_hash
|
20
21
|
# Don't initialize cmd_tool here - we'll do it lazily when needed
|
21
22
|
end
|
22
23
|
|
@@ -65,7 +66,7 @@ module Roast
|
|
65
66
|
|
66
67
|
# Execute nested steps
|
67
68
|
def execute_nested_steps(steps, context, executor = nil)
|
68
|
-
executor ||= WorkflowExecutor.new(context,
|
69
|
+
executor ||= WorkflowExecutor.new(context, config_hash, context_path)
|
69
70
|
results = []
|
70
71
|
|
71
72
|
steps.each do |step|
|
@@ -139,7 +140,7 @@ module Roast
|
|
139
140
|
# Execute a step by name and return its result
|
140
141
|
def execute_step_by_name(step_name, context)
|
141
142
|
# Reuse existing step execution logic
|
142
|
-
executor = WorkflowExecutor.new(context,
|
143
|
+
executor = WorkflowExecutor.new(context, config_hash, context_path)
|
143
144
|
executor.execute_step(step_name)
|
144
145
|
end
|
145
146
|
|
@@ -16,6 +16,7 @@ module Roast
|
|
16
16
|
def_delegator :workflow, :chat_completion
|
17
17
|
def_delegator :workflow, :transcript
|
18
18
|
|
19
|
+
# TODO: is this really the model we want to default to, and is this the right place to set it?
|
19
20
|
def initialize(workflow, model: "anthropic:claude-opus-4", name: nil, context_path: nil, auto_loop: true)
|
20
21
|
@workflow = workflow
|
21
22
|
@model = model
|
@@ -4,10 +4,11 @@ module Roast
|
|
4
4
|
module Workflow
|
5
5
|
# Handles execution of iteration steps (repeat and each)
|
6
6
|
class IterationExecutor
|
7
|
-
def initialize(workflow, context_path, state_manager)
|
7
|
+
def initialize(workflow, context_path, state_manager, config_hash = {})
|
8
8
|
@workflow = workflow
|
9
9
|
@context_path = context_path
|
10
10
|
@state_manager = state_manager
|
11
|
+
@config_hash = config_hash
|
11
12
|
end
|
12
13
|
|
13
14
|
def execute_repeat(repeat_config)
|
@@ -31,6 +32,7 @@ module Roast
|
|
31
32
|
max_iterations: max_iterations,
|
32
33
|
name: "repeat_#{@workflow.output.size}",
|
33
34
|
context_path: @context_path,
|
35
|
+
config_hash: @config_hash,
|
34
36
|
)
|
35
37
|
|
36
38
|
# Apply configuration if provided
|
@@ -70,6 +72,7 @@ module Roast
|
|
70
72
|
steps: steps,
|
71
73
|
name: "each_#{variable_name}",
|
72
74
|
context_path: @context_path,
|
75
|
+
config_hash: @config_hash,
|
73
76
|
)
|
74
77
|
|
75
78
|
# Apply configuration if provided
|
@@ -85,7 +85,7 @@ module Roast
|
|
85
85
|
@command_executor = command_executor || CommandExecutor.new(logger: @error_handler)
|
86
86
|
@interpolator = interpolator || Interpolator.new(workflow, logger: @error_handler)
|
87
87
|
@state_manager = state_manager || StateManager.new(workflow, logger: @error_handler)
|
88
|
-
@iteration_executor = iteration_executor || IterationExecutor.new(workflow, context_path, @state_manager)
|
88
|
+
@iteration_executor = iteration_executor || IterationExecutor.new(workflow, context_path, @state_manager, config_hash)
|
89
89
|
@conditional_executor = conditional_executor || ConditionalExecutor.new(workflow, context_path, @state_manager, self)
|
90
90
|
@step_orchestrator = step_orchestrator || StepOrchestrator.new(workflow, @step_loader, @state_manager, @error_handler, self)
|
91
91
|
|