legionio 1.5.14 → 1.5.15

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: 213403cc9241316f3d19263526f688166a256ecb38dd2fb45b4f782c9067e9e0
4
- data.tar.gz: e93b0000542370d69c6b46323e217d3cace04429cf061dd2ba748040a560175a
3
+ metadata.gz: d66368a89ce7ef86f5c62277fe403c840caf722f8e6b840000251775ce74e4a4
4
+ data.tar.gz: 8a44567875935c668bf2884e7fac6e0831f0dad9f1860f5e2bde28eedb0b7df5
5
5
  SHA512:
6
- metadata.gz: c272f3d6e719737682c354a8313d5f3b93797ac44da5fea75f7e0473ffd27a6075eb2ba67665f2e6dfa55e37f3c2c986ae66ae3dcc4cdfbaa78c0fb2517a7fe5
7
- data.tar.gz: fb92bae4cf4fddf1a9a47b88eb611d13bb4dfe7162315a560a9c9b75fd5250f41cf30a80cef166e88488794ef16a7c0d462e6018de4e460409e89d35ad33f41a
6
+ metadata.gz: 7e45f6aa1d7838ed5c5ddac267310ea8163f27f1e4c8efd190720da148add55ff9f50e958c8096691d6ce3a613064322f11eba64d8fc0eae79bea26fc1ee1a9c
7
+ data.tar.gz: ce24287b1dd968ef9e33e053c358b7e182b92685c6696b0074fef7ab3d0447449452f9959a3086148a73b606fefc643444546ad34e596b8c8ea5039b4bf65c17
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Legion Changelog
2
2
 
3
+ ## [1.5.15] - 2026-03-25
4
+
5
+ ### Removed
6
+ - CLI chat Apollo writeback prototype (replaced by pipeline step 19 in legion-llm)
7
+
3
8
  ## [1.5.14] - 2026-03-25
4
9
 
5
10
  ### Fixed
@@ -43,7 +43,7 @@ module Legion
43
43
  private
44
44
 
45
45
  def apollo_query(query:, domain:, limit:)
46
- body = { query: query, limit: limit }
46
+ body = { query: query, limit: limit, status: %w[confirmed candidate] }
47
47
  body[:domain] = domain if domain
48
48
 
49
49
  uri = URI("http://#{DEFAULT_HOST}:#{apollo_port}/api/apollo/query")
@@ -102,10 +102,16 @@ module Legion
102
102
 
103
103
  chat_log.info "headless prompt model=#{session.model_id} length=#{text.length}"
104
104
 
105
+ turn_tool_calls = []
106
+ tool_callbacks = {
107
+ on_tool_call: ->(tc) { turn_tool_calls << { name: tc.name, args: tc.arguments, result: nil } },
108
+ on_tool_result: ->(tr) { turn_tool_calls.last[:result] = tr.to_s.lines.first(3).join.rstrip if turn_tool_calls.last }
109
+ }
110
+
105
111
  response = if options[:output_format] == 'json'
106
- session.send_message(text)
112
+ session.send_message(text, **tool_callbacks)
107
113
  else
108
- session.send_message(text) { |chunk| print chunk.content if chunk.content }
114
+ session.send_message(text, **tool_callbacks) { |chunk| print chunk.content if chunk.content }
109
115
  end
110
116
 
111
117
  chat_log.info "headless complete tokens_in=#{session.stats[:input_tokens]} tokens_out=#{session.stats[:output_tokens]}"
@@ -298,11 +304,13 @@ module Legion
298
304
  buffer = String.new
299
305
  tool_index = 0
300
306
  tool_total = 0
307
+ turn_tool_calls = []
301
308
  @session.send_message(
302
309
  stripped,
303
310
  on_tool_call: lambda { |tc|
304
311
  tool_index += 1
305
312
  chat_log.debug "tool_call name=#{tc.name} args=#{tc.arguments.keys.join(',')}"
313
+ turn_tool_calls << { name: tc.name, args: tc.arguments, result: nil }
306
314
  @session.emit(:tool_start, {
307
315
  name: tc.name, args: tc.arguments,
308
316
  index: tool_index, total: tool_total
@@ -312,6 +320,7 @@ module Legion
312
320
  on_tool_result: lambda { |tr|
313
321
  result_preview = tr.to_s.lines.first(3).join.rstrip
314
322
  chat_log.debug "tool_result preview=#{result_preview[0..200]}"
323
+ turn_tool_calls.last[:result] = result_preview if turn_tool_calls.last
315
324
  @session.emit(:tool_complete, {
316
325
  name: 'tool', result_preview: result_preview,
317
326
  index: tool_index, total: tool_total
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Legion
4
- VERSION = '1.5.14'
4
+ VERSION = '1.5.15'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legionio
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.14
4
+ version: 1.5.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity