robot_lab-cyborg 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: 19b6539c5fe90feaed90c3e1d06f0124f6f6c29d053d67f4bb04e217d04420d1
4
- data.tar.gz: b6d43f26ccd0d8b8a210f17c5236caaf60b136c1a192d24c8338f5c769e74761
3
+ metadata.gz: dfbcf7adcfb8b32603238e8a5eb110c99398669178dda48509e8311effac3f57
4
+ data.tar.gz: f61c2ed79996d438c3e19169a39f93fb182d6c375ee817687c0d8279fc057c32
5
5
  SHA512:
6
- metadata.gz: 3be112aedc248e8c29b68926013e69cc3841512a3ecd43bc22a132a4cdd8d84a8a1a593f702c052c6ff26978a97d64b5626406e11b46677422768cfb708dabe2
7
- data.tar.gz: 941f2990dcaa5ca1df929448b937fb545f543cbd0879cfe8b019c3fac2154490dd14e2deaa540db907eea4f8d77623aae1b2dda2931c317915165282396c70f0
6
+ metadata.gz: '0825678ce77712d0ed11e87b892fdb820a4a71d3d4b32829135de88d017facde8a0387d600d30e21576c2696c0cae4708bf7a58ec3430c5b926b295147edcdf4'
7
+ data.tar.gz: d4448896b249569e150f7af9fc33c57820b34ac36a77db363547e6c97bf18d0904d3e4d4d79e72dda7e08fb2bbc176bff30e67aff7fc381171a0641280fc6739
data/.envrc CHANGED
@@ -4,4 +4,4 @@ source_up
4
4
 
5
5
  export RR=$(pwd)
6
6
 
7
- export BUNDLE_GEMFILE=Gemfile
7
+ # BUNDLE_GEMFILE is inherited from the project root .envrc (asgard dev|prod)
data/README.md CHANGED
@@ -112,8 +112,8 @@ A human step currently holds a thread while it waits. `ask_async` returns the pe
112
112
  Runnable demos in [`examples/`](examples) — one feature area each:
113
113
 
114
114
  - `01_human_in_the_network.rb` — a human as a pipeline step, peers messaging over a bus, shared memory (network → human). Key-free.
115
- - `02_terminal_mentions.rb` — a **live** human addresses peers by `@mention` via the library `Conversation` (fan-out, and no-mention broadcast); replies return on their own through the duplex. Includes a real **LLM robot** (`@assistant`, Ollama) cooperating via `serve`, plus key-free canned peers.
116
- - `03_robot_interviews_cyborg.rb` — the Interviewer the *other* way round: an **LLM robot** (Ollama) interviews the human via `delegate`, starting with a **typed** intake (`ask_confirm`/`ask_int`, which re-ask on bad input), then builds a categorized profile.
115
+ - `02_terminal_mentions.rb` — a **live** human addresses peers by `@mention` via the library `Conversation` (fan-out, and no-mention broadcast); replies return on their own through the duplex. Includes a real **LLM robot** (`@assistant`, LM Studio via the :lms provider) cooperating via `serve`, plus key-free canned peers.
116
+ - `03_robot_interviews_cyborg.rb` — the Interviewer the *other* way round: an **LLM robot** (LM Studio via the :lms provider) interviews the human via `delegate`, starting with a **typed** intake (`ask_confirm`/`ask_int`, which re-ask on bad input), then builds a categorized profile.
117
117
  - `04_presence_and_availability.rb` — routing to a peer who's actually there: `online`/`away`/`offline`, an offline human declining immediately, and a bounded-timeout escalation. Key-free.
118
118
  - `05_listening_and_duplex.rb` — always-on `listen`: the human speaks to the network **unprompted** and replies come back on the channel — both directions handled by the library. Key-free.
119
119
 
@@ -122,9 +122,9 @@ ruby examples/01_human_in_the_network.rb
122
122
  ruby examples/04_presence_and_availability.rb
123
123
  ruby examples/05_listening_and_duplex.rb
124
124
 
125
- # Examples 2 and 3 use a real robot on Ollama (ollama pull qwen3.6; override with
126
- # OLLAMA_MODEL / OLLAMA_API_BASE). In example 2 the canned peers still work
127
- # without it — only @assistant needs Ollama.
125
+ # Examples 2 and 3 use a real robot on LM Studio (lms server start &&
126
+ # lms get openai/gpt-oss-20b; override with LMS_MODEL / LMS_API_BASE). In
127
+ # example 2 the canned peers still work without it — only @assistant needs it.
128
128
  ruby examples/02_terminal_mentions.rb # then type: @analyst and @scribe: status?
129
129
  ruby examples/03_robot_interviews_cyborg.rb # the robot asks you the questions
130
130
  ```
@@ -13,10 +13,10 @@
13
13
  # delivers inbound bus traffic to its channel (the output half of the duplex),
14
14
  # so this demo never has to poll or render replies.
15
15
  #
16
- # @assistant is a real LLM robot (Ollama) that cooperates via #serve — the
17
- # one-call symmetric responder. @analyst and @scribe are key-free canned peers.
18
- # Set OLLAMA_API_BASE/OLLAMA_MODEL, or run without Ollama and just use the canned
19
- # peers (@assistant will simply not answer).
16
+ # @assistant is a real LLM robot (LM Studio via :lms) that cooperates via
17
+ # #serve — the one-call symmetric responder. @analyst and @scribe are key-free
18
+ # canned peers. Set LMS_API_BASE/LMS_MODEL, or run without LM Studio and just
19
+ # use the canned peers (@assistant will simply not answer).
20
20
  #
21
21
  # ruby examples/02_terminal_mentions.rb
22
22
  # # then type: @analyst and @scribe: status?
@@ -31,13 +31,14 @@ core_lib = File.expand_path("../../robot_lab/lib", __dir__)
31
31
  $LOAD_PATH.unshift(core_lib) if File.directory?(core_lib)
32
32
 
33
33
  require "robot_lab"
34
+ require "ruby_llm/providers/lms"
34
35
  require_relative "../lib/robot_lab/cyborg"
35
36
 
36
37
  Cyborg = RobotLab::Cyborg
37
38
  Channel = RobotLab::Cyborg::Channel
38
39
 
39
40
  RubyLLM.configure do |c|
40
- c.ollama_api_base = ENV.fetch("OLLAMA_API_BASE", "http://localhost:11434/v1")
41
+ c.lms_api_base = ENV.fetch("LMS_API_BASE", "http://localhost:1234/v1")
41
42
  c.logger = Logger.new(File::NULL)
42
43
  end
43
44
  RobotLab.configure { |c| c.logger = Logger.new(File::NULL) }
@@ -69,8 +70,8 @@ you = Cyborg.new(name: "you", bus: bus, channel: Channel::Terminal.new(name: "ne
69
70
 
70
71
  # A real LLM robot that serves bus tasks — the symmetric counterpart to how the
71
72
  # Cyborg answers its human. One call, no hand-wired on_message.
72
- RobotLab.build(name: "assistant", bus: bus, provider: "ollama",
73
- model: ENV.fetch("OLLAMA_MODEL", "qwen3.6"),
73
+ RobotLab.build(name: "assistant", bus: bus, provider: "lms",
74
+ model: ENV.fetch("LMS_MODEL", "openai/gpt-oss-20b"),
74
75
  system_prompt: "You are a concise teammate. Answer in 1-2 sentences.").serve
75
76
 
76
77
  # Two key-free canned peers.
@@ -14,8 +14,9 @@
14
14
  # You can answer each question, type "skip" to pass on one, or "done" to end the
15
15
  # interview early. The robot builds the profile from whatever you chose to share.
16
16
  #
17
- # Requires a running Ollama with the model pulled: ollama pull qwen3.6
18
- # Override with OLLAMA_MODEL / OLLAMA_API_BASE if yours differ.
17
+ # Requires a running LM Studio server with the model downloaded:
18
+ # lms server start && lms get openai/gpt-oss-20b
19
+ # Override with LMS_MODEL / LMS_API_BASE if yours differ.
19
20
  #
20
21
  # ruby examples/03_robot_interviews_cyborg.rb
21
22
 
@@ -25,20 +26,21 @@ core_lib = File.expand_path("../../robot_lab/lib", __dir__)
25
26
  $LOAD_PATH.unshift(core_lib) if File.directory?(core_lib)
26
27
 
27
28
  require "robot_lab"
29
+ require "ruby_llm/providers/lms"
28
30
  require_relative "../lib/robot_lab/cyborg"
29
31
 
30
32
  Cyborg = RobotLab::Cyborg
31
33
  Channel = RobotLab::Cyborg::Channel
32
34
 
33
- OLLAMA_API_BASE = ENV.fetch("OLLAMA_API_BASE", "http://localhost:11434/v1")
34
- OLLAMA_MODEL = ENV.fetch("OLLAMA_MODEL", "qwen3.6")
35
+ LMS_API_BASE = ENV.fetch("LMS_API_BASE", "http://localhost:1234/v1")
36
+ LMS_MODEL = ENV.fetch("LMS_MODEL", "openai/gpt-oss-20b")
35
37
  MAX_QUESTIONS = Integer(ENV.fetch("MAX_QUESTIONS", "5"))
36
38
 
37
39
  ENDING_WORDS = %w[done stop quit exit].freeze
38
40
  SKIPPING_WORDS = %w[skip pass].freeze
39
41
 
40
42
  RubyLLM.configure do |c|
41
- c.ollama_api_base = OLLAMA_API_BASE
43
+ c.lms_api_base = LMS_API_BASE
42
44
  c.logger = Logger.new(File::NULL)
43
45
  end
44
46
  RobotLab.configure { |c| c.logger = Logger.new(File::NULL) }
@@ -48,8 +50,8 @@ RobotLab.configure { |c| c.logger = Logger.new(File::NULL) }
48
50
  # single Interviewer ask.
49
51
  robot = RobotLab.build(
50
52
  name: "ProfileBot",
51
- provider: "ollama",
52
- model: OLLAMA_MODEL,
53
+ provider: "lms",
54
+ model: LMS_MODEL,
53
55
  system_prompt: <<~PROMPT
54
56
  You are ProfileBot, a warm, concise interviewer. Your goal is to learn as much
55
57
  as the person is willing to share so you can later classify them across these
@@ -4,6 +4,6 @@ module RobotLab
4
4
  # RobotLab::Cyborg is a class (a human peer worker), so its VERSION and the
5
5
  # nested helper classes hang off the class itself rather than a module.
6
6
  class Cyborg
7
- VERSION = "0.2.8"
7
+ VERSION = "0.3.0"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: robot_lab-cyborg
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,20 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '0.2'
19
- - - ">="
20
- - !ruby/object:Gem::Version
21
- version: 0.2.6
18
+ version: 0.3.0
22
19
  type: :runtime
23
20
  prerelease: false
24
21
  version_requirements: !ruby/object:Gem::Requirement
25
22
  requirements:
26
23
  - - "~>"
27
24
  - !ruby/object:Gem::Version
28
- version: '0.2'
29
- - - ">="
30
- - !ruby/object:Gem::Version
31
- version: 0.2.6
25
+ version: 0.3.0
32
26
  description: 'Adds a human peer worker to RobotLab networks: same bus and memory,
33
27
  receiving and issuing tasks alongside robots.'
34
28
  email:
@@ -85,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
79
  - !ruby/object:Gem::Version
86
80
  version: '0'
87
81
  requirements: []
88
- rubygems_version: 4.0.20
82
+ rubygems_version: 4.0.21
89
83
  specification_version: 4
90
84
  summary: Cyborg extension for the RobotLab multi-robot LLM orchestration framework.
91
85
  test_files: []