robot_lab-durable 0.2.8 → 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: 92b14b9efcf6ae282b64b2c42faf520d318e2ac9ff615abbdd3e5b2112e8b764
4
- data.tar.gz: d19e06fa62ebc1ff906f96c56aea6917e7d747a293786f0fe62db67a0137abb6
3
+ metadata.gz: d5d6b04770207ea0c384fbf75927ec8245e95d159970a218998439b9d2b76756
4
+ data.tar.gz: 7d023954515d71306244b102bd7848f9e435d9418772c6319864c74420173d72
5
5
  SHA512:
6
- metadata.gz: 3f11999113cd07c0a20e271c622d69e0b42646f586d1601323a37ab92d660fe9eac79193349081e811a895af86509ce5487a4b4f2024f61da839a7e9b42fe441
7
- data.tar.gz: cbfce254df151e49336c1f012237f5e19e97e27255b9523cb63471985965b5a939df3cdf42673d39cfff3048953db258299907409f7d53ede1fb4f9556654842
6
+ metadata.gz: 1bbed76fad21404c41898485c037582a5bca595501e3253a7e38da32d349417d7deadefa0c19398fd9e3763db8eaa2a9b87920227d8762fb43001f2197932f5f
7
+ data.tar.gz: 3d8309c657c10695635c8087e1f793e585c20f3b1f7f4c0204c4a25701b21a57311c6def387b1c77867e4d049f6ce420977d39af02d0ca42e28dccf3cf8df55c
data/.envrc CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  source_up
4
4
 
5
- export RR=`pwd`
6
- export BUNDLE_GEMFILE=Gemfile
5
+ export RR=$(pwd)
6
+ # BUNDLE_GEMFILE is inherited from the project root .envrc (asgard dev|prod)
@@ -26,11 +26,15 @@ $LOAD_PATH.unshift File.expand_path('../../lib', __dir__)
26
26
 
27
27
  require "robot_lab"
28
28
  require "robot_lab/durable"
29
+ require "ruby_llm/providers/lms"
29
30
  require "redis"
30
31
  require "json"
31
32
 
32
33
  DEBUG_MODE = ARGV.delete("--debug")
33
- RubyLLM.configure { |c| c.log_level = DEBUG_MODE ? Logger::DEBUG : Logger::WARN }
34
+ RubyLLM.configure do |c|
35
+ c.log_level = DEBUG_MODE ? Logger::DEBUG : Logger::WARN
36
+ c.lms_api_base = ENV.fetch("LMS_API_BASE", "http://localhost:1234/v1")
37
+ end
34
38
 
35
39
  CHANNEL = "stock:xyzzy"
36
40
  WINDOW_SIZE = 12 # ticks per prediction window
@@ -128,12 +132,12 @@ class AdjustParameters < RobotLab::Tool
128
132
  description "Adjust one predictor parameter to improve future prediction accuracy. " \
129
133
  "Make at most one or two targeted changes per window."
130
134
 
131
- param :parameter, type: "string",
132
- desc: "Parameter to adjust: sma_window, sma_std_multiplier, ema_alpha, ema_vol_multiplier, sma_weight"
133
- param :value, type: "number",
134
- desc: "New value (sma_window: 3-30 int; std/vol multipliers: 0.5-4.0; ema_alpha: 0.05-0.5; sma_weight: 0.0-1.0)"
135
- param :reasoning, type: "string",
136
- desc: "Why this change should reduce prediction error"
135
+ parameter :parameter, type: "string",
136
+ description: "Parameter to adjust: sma_window, sma_std_multiplier, ema_alpha, ema_vol_multiplier, sma_weight"
137
+ parameter :value, type: "number",
138
+ description: "New value (sma_window: 3-30 int; std/vol multipliers: 0.5-4.0; ema_alpha: 0.05-0.5; sma_weight: 0.0-1.0)"
139
+ parameter :reasoning, type: "string",
140
+ description: "Why this change should reduce prediction error"
137
141
 
138
142
  LIMITS = {
139
143
  "sma_window" => { min: 3, max: 30, integer: true },
@@ -226,8 +230,8 @@ redis = Redis.new
226
230
  prices = []
227
231
  robot = RobotLab.build(
228
232
  name: "predictor_tuner",
229
- model: "gpt-4.1-mini",
230
- provider: :openai,
233
+ model: ENV.fetch("LMS_MODEL", "qwen/qwen3.8-27b"),
234
+ provider: :lms,
231
235
  system_prompt: <<~PROMPT,
232
236
  You are a quantitative analyst tuning an ensemble stock price range
233
237
  predictor for ticker XYZZY. Each prediction covers the high and low
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RobotLab
4
4
  module Durable
5
- VERSION = '0.2.8'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
  end
@@ -7,7 +7,7 @@ module RobotLab
7
7
  'to check if you have seen a similar situation before. ' \
8
8
  'When in doubt and no relevant knowledge is found, skip the action.'
9
9
 
10
- param :query, type: 'string', desc: 'Natural language description of the decision you are about to make'
10
+ parameter :query, type: 'string', description: 'Natural language description of the decision you are about to make'
11
11
 
12
12
  def execute(query:)
13
13
  adapter = RobotLab::Durable::Hook.current_adapter
@@ -7,10 +7,10 @@ module RobotLab
7
7
  'a user preference, a reliable pattern, or a factual insight. ' \
8
8
  'Recorded knowledge persists across future sessions.'
9
9
 
10
- param :content, type: 'string', desc: 'The knowledge to record, in plain language (one clear statement)'
11
- param :reasoning, type: 'string',
12
- desc: 'Why this is worth remembering — the observation or discussion that led to it'
13
- param :category, type: 'string', desc: 'One of: fact, preference, pattern, correction'
10
+ parameter :content, type: 'string', description: 'The knowledge to record, in plain language (one clear statement)'
11
+ parameter :reasoning, type: 'string',
12
+ description: 'Why this is worth remembering — the observation or discussion that led to it'
13
+ parameter :category, type: 'string', description: 'One of: fact, preference, pattern, correction'
14
14
 
15
15
  def execute(content:, reasoning:, category:)
16
16
  adapter = RobotLab::Durable::Hook.current_adapter
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: robot_lab-durable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dewayne VanHoozer
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 0.2.0
18
+ version: 0.3.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 0.2.0
25
+ version: 0.3.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: htm
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  requirements: []
98
- rubygems_version: 4.0.20
98
+ rubygems_version: 4.0.21
99
99
  specification_version: 4
100
100
  summary: HTM-backed long-term memory for RobotLab agents
101
101
  test_files: []