robot_lab-ractor 0.2.7 → 0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 724b9a5e40e0c804a098c77c82a840bbefc1f2aee3eff8e30d55028b4b855cca
4
- data.tar.gz: 72cd114832da0420413d8ab88615f76e70abff8518f47edca4e132845d5e9233
3
+ metadata.gz: 4754c04890445a0232b92465476a3bc02b5270f909e98437f1e8d3204ec16c86
4
+ data.tar.gz: 02d0ff814962d5c0c24b194f1ff140ad3cbaabcefeee2aa93c5e9b1f07723326
5
5
  SHA512:
6
- metadata.gz: efc32b8b45b287b41229151b12e8e9f211b72098428444205fd1d92364fce9f951411d08650ea230e0830d616d09c35b061c4d1ccfedc710a9d4a1e02cb52fc9
7
- data.tar.gz: 51d69e8ad51cc08f7785a53f2cc201007575c0075d892207539eab9d9774ab90fc6b27f0cd6c77ef2653cbf118bcf087286b2339ccfad4f249d8d82bb982cff6
6
+ metadata.gz: 16270e905bbe3e8ee05dcc2451d0c235dfb979ba080244ff0daef9901dda698c8eec8f4c5aa84bfb66f2af8901172d08d09789e4b20a1afc40ef92a891a34e30
7
+ data.tar.gz: ce628aaac0d74a69a3e82ea88afad52a91437af80b4e887b8f0c95366eed7f26c404f25b1d6d1fc316e3a5d0f7b4544921f8cf40621a21b4fa981a85093472d5
data/.envrc CHANGED
@@ -1,3 +1,6 @@
1
+ # robot_lab_project/robot_lab-ractor/.envrc
2
+
1
3
  source_up
2
- export RR=`pwd`
3
- export BUNDLE_GEMFILE=Gemfile
4
+
5
+ export RR=$(pwd)
6
+ # BUNDLE_GEMFILE is inherited from the project root .envrc (asgard dev|prod)
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.8] - 2026-09-09
4
+
5
+ Released in lockstep with `robot_lab` core v0.2.8: this gem now resolves the released core gem from RubyGems instead of the local sibling checkout (local-path development remains available via `BUNDLE_GEMFILE=Gemfile.local`). Also in this release: 5 reek false positives annotated inline, reek added to the development bundle, and gem lifecycle tasks moved to asgard.
6
+
3
7
  ### Added
4
8
  - `.loki` Asgard task file: `test`, `rubocop`, `rubocop_fix`, `flog`, `flay`, `quality`, `build`, `install`, `release`, and `console` tasks via the Asgard task runner
5
9
  - `flay_check` Rake task: structural code duplication gate (mass threshold 50); integrated into the `quality` Rake task
data/Rakefile CHANGED
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bundler/gem_tasks'
4
3
  require 'rake/testtask'
5
4
 
6
5
  Rake::TestTask.new(:test) do |t|
@@ -45,7 +45,7 @@ end
45
45
  class WordStatsTool < TextTool
46
46
  description "Count words, sentences, and average word length"
47
47
 
48
- param :text, type: :string, desc: "Text to analyze"
48
+ parameter :text, type: :string, description: "Text to analyze"
49
49
 
50
50
  def execute(text:)
51
51
  words = text.scan(/\b\w+\b/)
@@ -60,7 +60,7 @@ end
60
60
  class ReadabilityTool < TextTool
61
61
  description "Estimate words-per-sentence and long-word density"
62
62
 
63
- param :text, type: :string, desc: "Text to analyze"
63
+ parameter :text, type: :string, description: "Text to analyze"
64
64
 
65
65
  def execute(text:)
66
66
  words = text.scan(/\b\w+\b/)
@@ -85,7 +85,7 @@ class HeavyDigestTool < TextTool
85
85
 
86
86
  ROUNDS = 500_000
87
87
 
88
- param :text, type: :string, desc: "Seed text"
88
+ parameter :text, type: :string, description: "Seed text"
89
89
 
90
90
  def execute(text:)
91
91
  digest = text
@@ -101,7 +101,7 @@ class RequestCounterTool < RobotLab::Tool
101
101
 
102
102
  @@hits = 0 # mutable class variable — Ractor workers cannot access this
103
103
 
104
- param :text, type: :string, desc: "Text to count"
104
+ parameter :text, type: :string, description: "Text to count"
105
105
 
106
106
  def execute(text:)
107
107
  @@hits += 1
@@ -138,27 +138,28 @@ section("Part 2: Network.new(parallel_mode: :ractor)")
138
138
  # routes through RactorNetworkScheduler instead of SimpleFlow::Pipeline.
139
139
  # The default mode is :async (unchanged SimpleFlow behavior).
140
140
 
141
- model = "claude-haiku-4-5-20251001"
141
+ model = "qwen/qwen3.8-27b"
142
+ provider = "lms"
142
143
 
143
144
  network = RobotLab::Network.new(name: "research_pipeline", parallel_mode: :ractor) do
144
145
  task :headline_finder, RobotLab.build(name: "headline_finder",
145
146
  system_prompt: "Find the 3 most relevant news headlines. Be concise.",
146
- model: model),
147
+ model: model, provider: provider),
147
148
  depends_on: :none
148
149
 
149
150
  task :background_brief, RobotLab.build(name: "background_brief",
150
151
  system_prompt: "Provide a 2-sentence background on the topic.",
151
- model: model),
152
+ model: model, provider: provider),
152
153
  depends_on: :none
153
154
 
154
155
  task :fact_checker, RobotLab.build(name: "fact_checker",
155
156
  system_prompt: "List 3 verifiable facts about the topic.",
156
- model: model),
157
+ model: model, provider: provider),
157
158
  depends_on: :none
158
159
 
159
160
  task :report_writer, RobotLab.build(name: "report_writer",
160
161
  system_prompt: "Synthesize the provided context into a 3-sentence report.",
161
- model: model),
162
+ model: model, provider: provider),
162
163
  depends_on: ["headline_finder", "background_brief", "fact_checker"]
163
164
  end
164
165
 
data/examples/common.rb CHANGED
@@ -7,6 +7,7 @@ $LOAD_PATH.unshift File.expand_path("../lib", __dir__)
7
7
 
8
8
  require "robot_lab"
9
9
  require "robot_lab/ractor"
10
+ require "ruby_llm/providers/lms"
10
11
 
11
12
  # Unbuffered stdout so Ractor-generated output interleaves correctly with
12
13
  # main-thread headers when viewed in a terminal or redirected to a pipe.
@@ -15,13 +16,12 @@ $stdout.sync = true
15
16
  # Fallback for when direnv has not activated examples/.envrc
16
17
  ENV["ROBOT_LAB_TEMPLATE_PATH"] ||= File.join(__dir__, "prompts")
17
18
 
19
+ # Local models via LM Studio (ruby_llm-providers-lms). qwen3.8 for the
20
+ # tool-heavy demos; no API keys needed.
18
21
  RubyLLM.configure do |c|
19
- c.logger = Logger.new(File::NULL)
20
- c.default_model = "claude-haiku-4-5-20251001"
21
- c.anthropic_api_key = ENV["ANTHROPIC_API_KEY"]
22
- c.openai_api_key = ENV["OPENAI_API_KEY"]
23
- c.openai_organization_id = ENV["OPENAI_ORGANIZATION_ID"]
24
- c.openai_project_id = ENV["OPENAI_PROJECT_ID"]
22
+ c.logger = Logger.new(File::NULL)
23
+ c.default_model = "qwen/qwen3.8-27b"
24
+ c.lms_api_base = ENV.fetch("LMS_API_BASE", "http://localhost:1234/v1")
25
25
  end
26
26
 
27
27
  RobotLab.configure do |c|
@@ -4,6 +4,6 @@ module RobotLab
4
4
  # RactorPool (not Ractor) avoids shadowing Ruby's built-in Ractor class
5
5
  # for all code within the RobotLab namespace.
6
6
  module RactorPool
7
- VERSION = '0.2.7'
7
+ VERSION = '0.3.0'
8
8
  end
9
9
  end
@@ -16,6 +16,7 @@ module RobotLab
16
16
  # @param obj [Object] the value to freeze
17
17
  # @return [Object] a frozen, Ractor-shareable copy
18
18
  # @raise [RactorBoundaryError] if the value cannot be made shareable
19
+ # :reek:TooManyStatements -- recursive case dispatch per container type plus dup/error fallback; splitting obscures the recursion.
19
20
  def self.freeze_deep(obj)
20
21
  return obj if Ractor.shareable?(obj)
21
22
 
@@ -63,6 +63,7 @@ module RobotLab
63
63
  end
64
64
 
65
65
  # Gracefully shut down worker Ractors.
66
+ # :reek:UncommunicativeVariableName -- single-char block param (w = worker) is accepted project convention.
66
67
  def shutdown
67
68
  return if @closed
68
69
 
@@ -136,6 +137,7 @@ module RobotLab
136
137
  end
137
138
  end
138
139
 
140
+ # :reek:FeatureEnvy :reek:NestedIterators -- readiness predicate over each entry's depends_on list; the inner all? defines "ready".
139
141
  def partition_ready(remaining, completed)
140
142
  remaining.partition do |entry|
141
143
  deps = entry[:depends_on]
@@ -61,6 +61,7 @@ module RobotLab
61
61
 
62
62
  # Gracefully shut down the pool via poison-pill pattern.
63
63
  # @return [void]
64
+ # :reek:UncommunicativeVariableName -- single-char block param (w = worker) is accepted project convention.
64
65
  def shutdown
65
66
  return if @closed
66
67
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: robot_lab-ractor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dewayne VanHoozer
@@ -43,14 +43,14 @@ dependencies:
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 0.2.0
46
+ version: 0.3.0
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 0.2.0
53
+ version: 0.3.0
54
54
  description: Provides RobotLab::RactorWorkerPool — a pool of Ruby Ractor workers for
55
55
  executing CPU-bound, Ractor-safe tools in parallel. Includes RactorBoundary (deep-freeze
56
56
  utility for crossing Ractor boundaries), RactorJob/RactorJobError/RobotSpec (frozen
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  requirements: []
114
- rubygems_version: 4.0.19
114
+ rubygems_version: 4.0.21
115
115
  specification_version: 4
116
116
  summary: Ractor-based parallel tool execution for RobotLab agents
117
117
  test_files: []