robot_lab-durable 0.2.8 → 0.6.1

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: d2c1d852359702920ad505918ec8a6a9f7ec1cd9ad01b9cd6b776596b6b2dabc
4
+ data.tar.gz: 04885e5c766c87e16f3835112bb2fe64098db0e25073a1d77216b5a15cb1fe78
5
5
  SHA512:
6
- metadata.gz: 3f11999113cd07c0a20e271c622d69e0b42646f586d1601323a37ab92d660fe9eac79193349081e811a895af86509ce5487a4b4f2024f61da839a7e9b42fe441
7
- data.tar.gz: cbfce254df151e49336c1f012237f5e19e97e27255b9523cb63471985965b5a939df3cdf42673d39cfff3048953db258299907409f7d53ede1fb4f9556654842
6
+ metadata.gz: 61498a250dbaf306e1786e42b6da08e357b89ace0cf0f5d08f476f5328e9bb0a014a7f63742167054fcd2a580c95cd74083d76f347538a68927d588cda4862ef
7
+ data.tar.gz: 8a73fb538ee787711af7fd0fda0c4380581709e6b43e8f69a10dbabc4ec0286ae182eaf393a0494f71da30a6ed3da63b4755844d0d9642b417036e8fbc5542e4
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)
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 4.0.9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.6.1] - 2026-11-19
4
+
5
+ ### Changed
6
+
7
+ - **Minimum Ruby raised to 4.0.9.** `required_ruby_version` is now `>= 4.0.9` (was `>= 3.2.0`), and a `.ruby-version` file pins development to 4.0.9.
8
+ - **Requires `robot_lab ~> 0.6`** (was `~> 0.3.0`). Verified against robot_lab 0.6.1 and ruby_llm 2.2.3; no code changes were needed.
9
+
3
10
  ## [0.2.8] - 2026-09-09
4
11
 
5
12
  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: reek added to the development bundle, and gem lifecycle tasks moved to asgard.
@@ -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.6.1'
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,101 +1,104 @@
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.6.1
5
5
  platform: ruby
6
6
  authors:
7
- - Dewayne VanHoozer
7
+ - Dewayne VanHoozer
8
8
  bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
- - !ruby/object:Gem::Dependency
13
- name: robot_lab
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - "~>"
17
- - !ruby/object:Gem::Version
18
- version: 0.2.0
19
- type: :runtime
20
- prerelease: false
21
- version_requirements: !ruby/object:Gem::Requirement
22
- requirements:
23
- - - "~>"
24
- - !ruby/object:Gem::Version
25
- version: 0.2.0
26
- - !ruby/object:Gem::Dependency
27
- name: htm
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: '0'
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: '0'
40
- description: Provides RobotLab::Durable — an adapter between robot_lab and the HTM
41
- gem (Hierarchical Temporal Memory). Replaces the former YAML store with PostgreSQL-backed
42
- long-term memory featuring vector embeddings, hybrid semantic search, hierarchical
43
- tagging, and multi-robot federation. Includes RecallKnowledge and RecordKnowledge
44
- tools that integrate directly into Robot when robot_lab is present.
12
+ - !ruby/object:Gem::Dependency
13
+ name: robot_lab
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ -
17
+ - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: "0.6"
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ -
25
+ - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: "0.6"
28
+ - !ruby/object:Gem::Dependency
29
+ name: htm
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ -
33
+ - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: "0"
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ -
41
+ - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ description: "Provides RobotLab::Durable — an adapter between robot_lab and the HTM gem (Hierarchical Temporal Memory). Replaces the former YAML store with PostgreSQL-backed long-term memory featuring vector embeddings, hybrid semantic search, hierarchical tagging, and multi-robot federation. Includes RecallKnowledge and RecordKnowledge tools that integrate directly into Robot when robot_lab is present."
45
45
  email:
46
- - dvanhoozer@gmail.com
46
+ - dvanhoozer@gmail.com
47
47
  executables: []
48
48
  extensions: []
49
49
  extra_rdoc_files: []
50
50
  files:
51
- - ".envrc"
52
- - ".github/workflows/deploy-github-pages.yml"
53
- - ".loki"
54
- - ".quality/reek_baseline.txt"
55
- - ".rubocop.yml"
56
- - CHANGELOG.md
57
- - CLAUDE.md
58
- - LICENSE.txt
59
- - README.md
60
- - Rakefile
61
- - docs/document_store_backend_design.md
62
- - docs/index.md
63
- - docs/superpowers/plans/2026-05-06-durable-learning.md
64
- - docs/superpowers/specs/2026-05-06-durable-learning-design.md
65
- - examples/01_day_trader.rb
66
- - examples/day_trader_lib/generator.rb
67
- - examples/day_trader_lib/predictor.rb
68
- - lib/robot_lab/durable.rb
69
- - lib/robot_lab/durable/adapter.rb
70
- - lib/robot_lab/durable/entry.rb
71
- - lib/robot_lab/durable/hook.rb
72
- - lib/robot_lab/durable/version.rb
73
- - lib/robot_lab/recall_knowledge.rb
74
- - lib/robot_lab/record_knowledge.rb
75
- - mkdocs.yml
76
- homepage: https://github.com/MadBomber/robot_lab-durable
51
+ - .envrc
52
+ - .github/workflows/deploy-github-pages.yml
53
+ - .loki
54
+ - .quality/reek_baseline.txt
55
+ - .rubocop.yml
56
+ - .ruby-version
57
+ - CHANGELOG.md
58
+ - CLAUDE.md
59
+ - LICENSE.txt
60
+ - README.md
61
+ - Rakefile
62
+ - docs/document_store_backend_design.md
63
+ - docs/index.md
64
+ - docs/superpowers/plans/2026-05-06-durable-learning.md
65
+ - docs/superpowers/specs/2026-05-06-durable-learning-design.md
66
+ - examples/01_day_trader.rb
67
+ - examples/day_trader_lib/generator.rb
68
+ - examples/day_trader_lib/predictor.rb
69
+ - lib/robot_lab/durable.rb
70
+ - lib/robot_lab/durable/adapter.rb
71
+ - lib/robot_lab/durable/entry.rb
72
+ - lib/robot_lab/durable/hook.rb
73
+ - lib/robot_lab/durable/version.rb
74
+ - lib/robot_lab/recall_knowledge.rb
75
+ - lib/robot_lab/record_knowledge.rb
76
+ - mkdocs.yml
77
+ homepage: "https://github.com/MadBomber/robot_lab-durable"
77
78
  licenses:
78
- - MIT
79
+ - MIT
79
80
  metadata:
80
- homepage_uri: https://github.com/MadBomber/robot_lab-durable
81
- source_code_uri: https://github.com/MadBomber/robot_lab-durable
82
- changelog_uri: https://github.com/MadBomber/robot_lab-durable/blob/main/CHANGELOG.md
83
- rubygems_mfa_required: 'true'
81
+ homepage_uri: "https://github.com/MadBomber/robot_lab-durable"
82
+ source_code_uri: "https://github.com/MadBomber/robot_lab-durable"
83
+ changelog_uri: "https://github.com/MadBomber/robot_lab-durable/blob/main/CHANGELOG.md"
84
+ rubygems_mfa_required: "true"
84
85
  rdoc_options: []
85
86
  require_paths:
86
- - lib
87
+ - lib
87
88
  required_ruby_version: !ruby/object:Gem::Requirement
88
89
  requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- version: 3.2.0
90
+ -
91
+ - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: 4.0.9
92
94
  required_rubygems_version: !ruby/object:Gem::Requirement
93
95
  requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
96
+ -
97
+ - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: "0"
97
100
  requirements: []
98
- rubygems_version: 4.0.20
101
+ rubygems_version: 4.1.0
99
102
  specification_version: 4
100
103
  summary: HTM-backed long-term memory for RobotLab agents
101
104
  test_files: []