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 +4 -4
- data/.envrc +2 -2
- data/.ruby-version +1 -0
- data/CHANGELOG.md +7 -0
- data/examples/day_trader_lib/predictor.rb +13 -9
- data/lib/robot_lab/durable/version.rb +1 -1
- data/lib/robot_lab/recall_knowledge.rb +1 -1
- data/lib/robot_lab/record_knowledge.rb +4 -4
- metadata +78 -75
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d2c1d852359702920ad505918ec8a6a9f7ec1cd9ad01b9cd6b776596b6b2dabc
|
|
4
|
+
data.tar.gz: 04885e5c766c87e16f3835112bb2fe64098db0e25073a1d77216b5a15cb1fe78
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 61498a250dbaf306e1786e42b6da08e357b89ace0cf0f5d08f476f5328e9bb0a014a7f63742167054fcd2a580c95cd74083d76f347538a68927d588cda4862ef
|
|
7
|
+
data.tar.gz: 8a73fb538ee787711af7fd0fda0c4380581709e6b43e8f69a10dbabc4ec0286ae182eaf393a0494f71da30a6ed3da63b4755844d0d9642b417036e8fbc5542e4
|
data/.envrc
CHANGED
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
|
|
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
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
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: "
|
|
230
|
-
provider: :
|
|
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
|
|
@@ -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
|
-
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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.
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- !ruby/object:Gem::
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
- docs/
|
|
63
|
-
- docs/
|
|
64
|
-
- docs/superpowers/
|
|
65
|
-
-
|
|
66
|
-
- examples/
|
|
67
|
-
- examples/day_trader_lib/
|
|
68
|
-
-
|
|
69
|
-
- lib/robot_lab/durable
|
|
70
|
-
- lib/robot_lab/durable/
|
|
71
|
-
- lib/robot_lab/durable/
|
|
72
|
-
- lib/robot_lab/durable/
|
|
73
|
-
- lib/robot_lab/
|
|
74
|
-
- lib/robot_lab/
|
|
75
|
-
-
|
|
76
|
-
|
|
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:
|
|
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
|
-
|
|
91
|
-
|
|
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
|
-
|
|
96
|
-
|
|
96
|
+
-
|
|
97
|
+
- ">="
|
|
98
|
+
- !ruby/object:Gem::Version
|
|
99
|
+
version: "0"
|
|
97
100
|
requirements: []
|
|
98
|
-
rubygems_version: 4.0
|
|
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: []
|