legion-llm 0.8.18 → 0.8.19

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: 1106f652c69b801af983117b4fc97f6bf547dc4d63f1b1df12eb6f1adb6d51d2
4
- data.tar.gz: '00593f91f0467fd63e5a8867017033da483bf0abc4fcfa26641fe97fd66c3674'
3
+ metadata.gz: e7ec5141c77d40965d835a36858aa44893158036c4a8052768edb19a181868d9
4
+ data.tar.gz: da2934e668432b45ef002979ce4b683b988fcf4ea72aa0d420ddc781c0c6781b
5
5
  SHA512:
6
- metadata.gz: 30c59046ad40659fa02f3bde8db8807b3a9c3b718365dc1be5d92ca01c9cb84e593c4bcab5027f12a591ee12c3f21671ae3695573f5e85b3c5e9d8b7b1ebf74b
7
- data.tar.gz: 91368ea195a58f8321cca378febcca27a96685a6a1fe78ac432be88731ee03a4ca050b1782f8d1f24da6045b5f136ea070ee14fd4dbb2eb28e23c8db63f28174
6
+ metadata.gz: a6b6300de67bd0a3895b443c29f59b38f2e11fa80e84b4d327becddefcc1dcb4e62470d9ff304a240ee241b35450961fff793a24d8a3ce752d1befa1d9e8f7d7
7
+ data.tar.gz: 9a40fc3b19c9667b729b3959efccb270b799084b2eee6023e6c87b9103c92ea2f345a65a0abbd8a43805fece5754bc204e73571d47b62fad2100ac12cee647c2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Legion LLM Changelog
2
2
 
3
+ ## [0.8.19] - 2026-04-22
4
+
5
+ ### Fixed
6
+ - `Skills::Base#emit_event` passed a positional Hash to `Legion::Events.emit(**payload)`, causing `ArgumentError` on every skill activation. Now uses keyword splat correctly.
7
+ - `file_edit` client tool crashed with `TypeError: no implicit conversion of nil into String` when the LLM passed nil `old_text`/`new_text`. Now returns an error message to the LLM instead of crashing.
8
+ - `tool_trigger_defaults[:tool_limit]` reduced from 50 to 10 to prevent trigger word matching from injecting dozens of unrelated extension tools on normal user messages.
9
+
3
10
  ## [0.8.18] - 2026-04-22
4
11
 
5
12
  ### Fixed
@@ -37,7 +37,7 @@ module Legion
37
37
  end
38
38
  end
39
39
 
40
- def dispatch_client_tool(ref, **kwargs) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity
40
+ def dispatch_client_tool(ref, **kwargs) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
41
41
  case ref
42
42
  when 'sh'
43
43
  cmd = kwargs[:command] || kwargs[:cmd] || kwargs.values.first.to_s
@@ -55,8 +55,10 @@ module Legion
55
55
  path = kwargs[:path] || kwargs[:file_path]
56
56
  old_text = kwargs[:old_text] || kwargs[:search]
57
57
  new_text = kwargs[:new_text] || kwargs[:replace]
58
+ return 'file_edit error: old_text is required' if old_text.nil? || old_text.empty?
59
+
58
60
  content = ::File.read(path, encoding: 'utf-8')
59
- content.sub!(old_text, new_text)
61
+ content.sub!(old_text, new_text || '')
60
62
  ::File.write(path, content)
61
63
  "Edited #{path}"
62
64
  when 'list_directory'
@@ -285,7 +285,7 @@ module Legion
285
285
  def self.tool_trigger_defaults
286
286
  {
287
287
  scan_depth: 10,
288
- tool_limit: 50
288
+ tool_limit: 10
289
289
  }
290
290
  end
291
291
 
@@ -246,7 +246,7 @@ module Legion
246
246
  def emit_event(conv_id, event, **payload)
247
247
  return unless conv_id
248
248
 
249
- Legion::Events.emit(event, { conversation_id: conv_id }.merge(payload))
249
+ Legion::Events.emit(event, conversation_id: conv_id, **payload)
250
250
  end
251
251
 
252
252
  protected
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module LLM
5
- VERSION = '0.8.18'
5
+ VERSION = '0.8.19'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-llm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.18
4
+ version: 0.8.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity