robot_lab-to 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 +4 -4
- data/.envrc +6 -0
- data/Archspec.rb +34 -0
- data/CHANGELOG.md +4 -0
- data/CLAUDE.md +3 -2
- data/README.md +9 -7
- data/Rakefile +6 -108
- data/docs/concepts/stop-conditions.md +3 -3
- data/docs/configuration/cli.md +4 -5
- data/docs/configuration/index.md +2 -3
- data/docs/configuration/settings.md +7 -7
- data/docs/getting-started/installation.md +5 -5
- data/docs/index.md +3 -3
- data/docs/local-models/index.md +14 -17
- data/docs/local-models/lm-studio.md +92 -0
- data/docs/reference/architecture.md +4 -4
- data/examples/.envrc +8 -0
- data/examples/01_basic_usage/README.md +14 -15
- data/examples/01_basic_usage/basic_usage.rb +20 -57
- data/examples/02_advanced_usage/README.md +10 -7
- data/examples/02_advanced_usage/advanced_usage.rb +23 -31
- data/examples/03_scored/scored_run.rb +19 -51
- data/examples/04_prose/README.md +15 -14
- data/examples/04_prose/prose_run.rb +22 -38
- data/examples/common.rb +111 -0
- data/lib/robot_lab/to/cli.rb +61 -34
- data/lib/robot_lab/to/commit_manager.rb +4 -0
- data/lib/robot_lab/to/config.rb +12 -0
- data/lib/robot_lab/to/decision_manager.rb +12 -1
- data/lib/robot_lab/to/exit_summary.rb +17 -16
- data/lib/robot_lab/to/guards/checkpoint.rb +6 -3
- data/lib/robot_lab/to/guards/quality_monitor.rb +4 -2
- data/lib/robot_lab/to/guards/run_store.rb +4 -2
- data/lib/robot_lab/to/notes_manager.rb +3 -0
- data/lib/robot_lab/to/orchestrator.rb +85 -34
- data/lib/robot_lab/to/prompt_builder.rb +2 -0
- data/lib/robot_lab/to/run.rb +8 -8
- data/lib/robot_lab/to/stop_conditions.rb +10 -6
- data/lib/robot_lab/to/tools/bash.rb +7 -2
- data/lib/robot_lab/to/tools/edit.rb +9 -4
- data/lib/robot_lab/to/tools/read.rb +3 -3
- data/lib/robot_lab/to/tools/request_decision.rb +14 -10
- data/lib/robot_lab/to/tools/submit_result.rb +12 -11
- data/lib/robot_lab/to/tools/write.rb +2 -2
- data/lib/robot_lab/to/version.rb +1 -1
- data/lib/robot_lab/to.rb +22 -0
- data/mkdocs.yml +1 -1
- metadata +10 -7
- data/docs/local-models/ollama.md +0 -122
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: robot_lab-to
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dewayne VanHoozer
|
|
@@ -13,16 +13,16 @@ dependencies:
|
|
|
13
13
|
name: robot_lab
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
|
15
15
|
requirements:
|
|
16
|
-
- - "
|
|
16
|
+
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version:
|
|
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:
|
|
25
|
+
version: 0.3.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: myway_config
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -57,6 +57,7 @@ files:
|
|
|
57
57
|
- ".loki"
|
|
58
58
|
- ".quality/reek_baseline.txt"
|
|
59
59
|
- ".rubocop.yml"
|
|
60
|
+
- Archspec.rb
|
|
60
61
|
- CHANGELOG.md
|
|
61
62
|
- CLAUDE.md
|
|
62
63
|
- COMMITS.md
|
|
@@ -82,9 +83,10 @@ files:
|
|
|
82
83
|
- docs/index.md
|
|
83
84
|
- docs/local-models/guardrails.md
|
|
84
85
|
- docs/local-models/index.md
|
|
85
|
-
- docs/local-models/
|
|
86
|
+
- docs/local-models/lm-studio.md
|
|
86
87
|
- docs/local-models/tools.md
|
|
87
88
|
- docs/reference/architecture.md
|
|
89
|
+
- examples/.envrc
|
|
88
90
|
- examples/01_basic_usage/.gitignore
|
|
89
91
|
- examples/01_basic_usage/README.md
|
|
90
92
|
- examples/01_basic_usage/basic_usage.rb
|
|
@@ -104,6 +106,7 @@ files:
|
|
|
104
106
|
- examples/04_prose/prompts_dir/section_criteria.md
|
|
105
107
|
- examples/04_prose/prompts_dir/sections_objective.md
|
|
106
108
|
- examples/04_prose/prose_run.rb
|
|
109
|
+
- examples/common.rb
|
|
107
110
|
- lib/robot_lab/to.rb
|
|
108
111
|
- lib/robot_lab/to/atomic_file.rb
|
|
109
112
|
- lib/robot_lab/to/backoff.rb
|
|
@@ -169,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
169
172
|
- !ruby/object:Gem::Version
|
|
170
173
|
version: '0'
|
|
171
174
|
requirements: []
|
|
172
|
-
rubygems_version: 4.0.
|
|
175
|
+
rubygems_version: 4.0.21
|
|
173
176
|
specification_version: 4
|
|
174
177
|
summary: Autonomous overnight agent loop for RobotLab — run robots while you sleep.
|
|
175
178
|
test_files: []
|
data/docs/local-models/ollama.md
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
# Ollama Setup
|
|
2
|
-
|
|
3
|
-
This page covers running `robot_lab-to` against a local
|
|
4
|
-
[Ollama](https://ollama.com) server end-to-end.
|
|
5
|
-
|
|
6
|
-
## 1. Install and start Ollama
|
|
7
|
-
|
|
8
|
-
```bash
|
|
9
|
-
# macOS / Linux
|
|
10
|
-
curl -fsSL https://ollama.com/install.sh | sh
|
|
11
|
-
|
|
12
|
-
# Ollama runs a server on http://localhost:11434
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## 2. Pull a tool-capable model
|
|
16
|
-
|
|
17
|
-
The model **must** support tool calling. `gpt-oss:20b` is the recommended choice
|
|
18
|
-
(see [model selection](index.md#choosing-a-model)):
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
ollama pull gpt-oss:20b
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
You can confirm a model advertises tool support:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
curl -s http://localhost:11434/api/tags | jq '.models[] | {name, caps: .capabilities}'
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## 3. Point RubyLLM at Ollama
|
|
31
|
-
|
|
32
|
-
`robot_lab-to` reaches the model through RobotLab / RubyLLM. The robust path is
|
|
33
|
-
the **`:openai` provider** aimed at Ollama's OpenAI-compatible `/v1` endpoint.
|
|
34
|
-
Configure RubyLLM once, before launching the run:
|
|
35
|
-
|
|
36
|
-
```ruby
|
|
37
|
-
require "ruby_llm"
|
|
38
|
-
require "robot_lab"
|
|
39
|
-
require "robot_lab/to"
|
|
40
|
-
|
|
41
|
-
RubyLLM.configure do |c|
|
|
42
|
-
c.openai_api_base = "http://localhost:11434/v1"
|
|
43
|
-
c.openai_api_key = "ollama" # ignored by Ollama, but RubyLLM requires a value
|
|
44
|
-
c.request_timeout = 600
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
RobotLab::To.run(
|
|
48
|
-
"Add a greet(name) method in greeter.rb",
|
|
49
|
-
provider: :openai,
|
|
50
|
-
model: "gpt-oss:20b",
|
|
51
|
-
local_guards: true,
|
|
52
|
-
stream: false,
|
|
53
|
-
max_iterations: 5
|
|
54
|
-
)
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
!!! note "Why a wrapper script"
|
|
58
|
-
The Ollama base-URL configuration lives in RubyLLM's global config, so it's
|
|
59
|
-
set in a small Ruby launcher (as above) rather than via a `robot-to` CLI flag.
|
|
60
|
-
The CLI flags `--provider openai --model gpt-oss:20b --local-guards --no-stream`
|
|
61
|
-
cover the rest; only the base URL needs the wrapper. You can also set it in
|
|
62
|
-
your application's RubyLLM initializer.
|
|
63
|
-
|
|
64
|
-
## 4. Run
|
|
65
|
-
|
|
66
|
-
From the launcher above, or — once the base URL is configured in your environment
|
|
67
|
-
— from the CLI:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
robot-to "Add a greet(name) method in greeter.rb" \
|
|
71
|
-
--provider openai \
|
|
72
|
-
--model gpt-oss:20b \
|
|
73
|
-
--local-guards \
|
|
74
|
-
--no-stream \
|
|
75
|
-
--max-iterations 5
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## Streaming and tool calls
|
|
79
|
-
|
|
80
|
-
**Local Ollama models must run non-streaming** (`--no-stream` / `stream: false`).
|
|
81
|
-
|
|
82
|
-
Ollama's OpenAI-compatible endpoint suppresses tool calls when the response is
|
|
83
|
-
streamed — the model "thinks" but never emits a tool call, so the robot can't do
|
|
84
|
-
any work. With streaming disabled, tool calls come through normally.
|
|
85
|
-
|
|
86
|
-
The trade-off: streaming is what enables per-chunk token accounting and
|
|
87
|
-
mid-iteration token-budget enforcement. With `--no-stream`, tokens are accounted
|
|
88
|
-
from each iteration's *result* instead, and `--max-tokens` is enforced at
|
|
89
|
-
iteration boundaries rather than mid-stream. For overnight local runs this is
|
|
90
|
-
almost always fine.
|
|
91
|
-
|
|
92
|
-
## Why not the native `:ollama` provider?
|
|
93
|
-
|
|
94
|
-
RubyLLM ships a native `:ollama` provider, but in testing it did **not** reliably
|
|
95
|
-
get tool-capable models (e.g. qwen3) to emit tool calls — the same model tool-calls
|
|
96
|
-
correctly through the `:openai` provider against Ollama's `/v1` endpoint. Until
|
|
97
|
-
that changes, prefer `provider: :openai` + `openai_api_base` for `robot_lab-to`.
|
|
98
|
-
|
|
99
|
-
## Registering models (if needed)
|
|
100
|
-
|
|
101
|
-
RubyLLM validates models against its registry. `robot_lab-to` sets
|
|
102
|
-
`assume_model_exists` when a provider is given, which is enough for a bare chat —
|
|
103
|
-
but attaching tools triggers a capability lookup that can raise
|
|
104
|
-
`ModelNotFoundError` for an unregistered model. If you hit that, refresh the
|
|
105
|
-
registry so your local models are known:
|
|
106
|
-
|
|
107
|
-
```ruby
|
|
108
|
-
RubyLLM.models.refresh! # discovers locally-served Ollama models
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
## Troubleshooting
|
|
112
|
-
|
|
113
|
-
| Symptom | Cause | Fix |
|
|
114
|
-
|---------|-------|-----|
|
|
115
|
-
| Model thinks but never calls a tool | Streaming is on | Add `--no-stream`. |
|
|
116
|
-
| `RobotLab::ModelNotFoundError` when tools attach | Model not in RubyLLM registry | `RubyLLM.models.refresh!`. |
|
|
117
|
-
| Every iteration "did not submit" | Model too small to follow the final-report step | Use a larger model (e.g. `gpt-oss:20b`). |
|
|
118
|
-
| No tool calls at all, model only explains | Model lacks tool support | Pick a model whose `capabilities` include `tools`. |
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
Next: [Built-in Tools](tools.md).
|