botiasloop 0.0.7 → 0.0.9

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: 19ce350bd375ddbae065af8ff880cfe1f4f01c1d53b0b865caec2d577119c7bc
4
- data.tar.gz: 41021e8b39ce89d96b04000d2c9d6e23f78672915561d5c17ee81846faf87ed3
3
+ metadata.gz: dbb8e390c2b92efbef4ef3dc885ee7be2725dbb0e19736b2a594b228426dff42
4
+ data.tar.gz: 0ae9c7ee8516368ca84a3834219abca4e249bb96b255906f51ab8f92d250af7c
5
5
  SHA512:
6
- metadata.gz: d017fa894d1c47e03ef694b3f25a4144e84b5dc0a8b645add7e871062bf7cb754a65febf450ab5964c273196bebbbda7481a1da5f738fd125058b909ddb0b213
7
- data.tar.gz: c848deadc5eb12e6aa07ffb539bd11a6cb3c2559a88a24285cb7768694c5818f7c9e6b21bffea5dbd6bffe862cfd3a800f130ef0543d6afa65fe77140be41d4f
6
+ metadata.gz: 4cff18b6b793a684001b9d912de2df8a8fbb323ced49232bd871b6fef9498828b744229314a62a4c023b5494c203e8d7ed70c67b702197bc83e6846106ec81e0
7
+ data.tar.gz: 23c31635ff9ef00d1652a79b0cb3ad83bf08f5aa7ebf83d34ac5a99c6890502674562c912199ba83f0347fa019cfa29ada1ad0cd305b833b601abdb321487efe
data/README.md CHANGED
@@ -295,7 +295,7 @@ max_iterations: 20
295
295
  channels:
296
296
  telegram:
297
297
  bot_token: "your-telegram-bot-token"
298
- allowed_users: [] # Empty = allow all, or list specific user IDs
298
+ allowed_users: ["your_telegram_username"] # Required: must contain at least one username
299
299
 
300
300
  # Optional: Logging
301
301
  logger:
@@ -50,8 +50,11 @@ module Botiasloop
50
50
  @verbose_callback.call(reasoning_content)
51
51
  end
52
52
 
53
- # Add the assistant's message with tool_calls first
54
- messages << response
53
+ # Add the assistant's message as a RubyLLM::Message object
54
+ messages << RubyLLM::Message.new(
55
+ role: :assistant,
56
+ content: response.content || ""
57
+ )
55
58
 
56
59
  response.tool_calls.each_value do |tool_call|
57
60
  observation = execute_tool(tool_call)
@@ -235,6 +235,17 @@ module Botiasloop
235
235
  File.join(systemd_user_dir, SERVICE_NAME)
236
236
  end
237
237
 
238
+ # Get the botiasloop binary path for ExecStart
239
+ #
240
+ # @return [String] Path to botiasloop binary
241
+ def binary_path
242
+ ENV["PATH"].split(":").each do |dir|
243
+ path = File.join(dir, "botiasloop")
244
+ return path if File.executable?(path)
245
+ end
246
+ raise SystemdError, "botiasloop not found in PATH"
247
+ end
248
+
238
249
  # Generate the service file content
239
250
  #
240
251
  # @return [String] systemd service unit content
@@ -247,35 +258,17 @@ module Botiasloop
247
258
 
248
259
  [Service]
249
260
  Type=simple
250
- ExecStart=#{executable_path} gateway
261
+ ExecStart=#{binary_path} gateway
251
262
  Restart=on-failure
252
263
  RestartSec=5
253
264
  StandardOutput=journal
254
265
  StandardError=journal
255
- Environment="PATH=#{ruby_bin_path}:/usr/local/bin:/usr/bin:/bin"
256
266
 
257
267
  [Install]
258
268
  WantedBy=default.target
259
269
  SERVICE
260
270
  end
261
271
 
262
- # Get the path to the botiasloop executable
263
- #
264
- # @return [String] Path to botiasloop binary
265
- def executable_path
266
- Gem.bin_path("botiasloop", "botiasloop")
267
- rescue Gem::Exception
268
- # Fallback to searching in PATH
269
- `which botiasloop 2>/dev/null`.strip
270
- end
271
-
272
- # Get the Ruby bin directory for PATH
273
- #
274
- # @return [String] Path to Ruby bin directory
275
- def ruby_bin_path
276
- File.dirname(RbConfig.ruby)
277
- end
278
-
279
272
  # Execute a systemctl command
280
273
  #
281
274
  # @param args [Array<String>] Arguments to pass to systemctl
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Botiasloop
4
- VERSION = "0.0.7"
4
+ VERSION = "0.0.9"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: botiasloop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Feistmantl