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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64b0bfad5bc7ce9abd2d750ff52695ba997a750556a403e3ab4fc449dfb28946
4
- data.tar.gz: 526beebc0ca0697df5ce2f871468fff246440615634ae516439b4c0740f8ce90
3
+ metadata.gz: 728c4818301b1d1ede4ddebb32de6517c84d8f34bc6a4c5541129ae115ec172f
4
+ data.tar.gz: d786b94dcf8112d5686ff298a7f474d9441c1b80cb8956c6fe5e85e270a4ee49
5
5
  SHA512:
6
- metadata.gz: 0600537a7242638e683a884a0b22b4d5f7fd58bb02d0c7a04240c8720d197a1f4f5e2d5f44c1a7f0335506f7822b51b6c245fd1c5f25627c8a580319d63b1250
7
- data.tar.gz: e368630d036c6c3ac6efe00d102ddbf89d438332916ed1adb5aa54fe6cb5f9b34f9adf637c6e36c5baab07015c6f0fb848f675476d4233accd005a98b9630642
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- roast-ai (0.2.2)
4
+ roast-ai (0.2.3)
5
5
  activesupport (>= 7.0)
6
6
  cli-ui
7
7
  diff-lcs (~> 1.5)
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("../.ruby-lsp/Gemfile", __dir__)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Roast
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.3"
5
5
  end
@@ -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, {}, context_path)
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, {}, context_path)
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roast-ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify