legion-tty 0.2.7 → 0.2.8

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: 1c760495a859fdc2a4bf7fd578a07a1d5fda5502959a032d97b123bd2567f6fe
4
- data.tar.gz: e0338b1750ee30726575319555ce2e57011d2c503843433ef4a5282fba0b3101
3
+ metadata.gz: 28d0ef8c394d53de80c032168382ab2c52267e9f5fe8e6be7800e97feac469cf
4
+ data.tar.gz: abd5dc788af64bbf970692824f6765bf83571942e0ef7e9c23d869ef7e782b58
5
5
  SHA512:
6
- metadata.gz: 651364d8929e747cbaa2aa06b76a0e9da6f81ff581778f4061bbc8a0ae0befd7de2590ceb2e0cc139cdc30cb5341f9f66420c37be7d5a368661f9f2b2077fa50
7
- data.tar.gz: 457b264da15403f4b0c7605fe8db84171c4fade505cc0cda2399f23314a944f3826c0ad6ac79be7c4b18d0257e68ebf8254e1daa7426434b3a9ff79453b4a0fc
6
+ metadata.gz: 0d299ad8a12d05d879ae4a9697d83bc9f719fb8e30692ced39a32b4dd8cecd4de73ec5483b8df908540e6760eb3b222f2b232dfac6f6342bcf992c460317d81f
7
+ data.tar.gz: b72ea62ec8e094ae476b422fc5743a6752a790eab8487694b9c42dd45655bd2c770c1529dfde272ca477a9d0097cd0ef02d0865276a0806e975893bae83193f7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.8] - 2026-03-18
4
+
5
+ ### Added
6
+ - Extension detection in onboarding: background scan via lex-detect during digital rain
7
+ - "hooking into X..." typed output for each discovered service
8
+ - Offers to install missing extensions when uninstalled gems are detected
9
+ - Graceful skip when lex-detect gem is not installed
10
+ - 7 new specs for extension detection and gem availability (381 total)
11
+
3
12
  ## [0.2.7] - 2026-03-18
4
13
 
5
14
  ### Added
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Rich terminal UI for the LegionIO async cognition engine.
4
4
 
5
+ **Version**: 0.2.8
6
+
5
7
  Think Claude Code meets Codex CLI, but for LegionIO: onboarding wizard with identity detection, streaming AI chat shell, operational dashboard, and session persistence - all rendered with the [tty-ruby](https://ttytoolkit.org/) gem ecosystem.
6
8
 
7
9
  ## Features
@@ -22,12 +22,7 @@ module Legion
22
22
  @wizard = wizard || Components::WizardPrompt.new
23
23
  @output = output
24
24
  @skip_rain = skip_rain
25
- @scan_queue = Queue.new
26
- @github_queue = Queue.new
27
- @github_quick_queue = Queue.new
28
- @kerberos_queue = Queue.new
29
- @llm_queue = Queue.new
30
- @bootstrap_queue = Queue.new
25
+ initialize_queues
31
26
  @kerberos_identity = nil
32
27
  @github_quick = nil
33
28
  @vault_results = nil
@@ -48,6 +43,7 @@ module Legion
48
43
  scan_data, github_data = collect_background_results
49
44
  run_cache_awakening(scan_data)
50
45
  run_gaia_awakening
46
+ run_extension_detection
51
47
  run_reveal(name: config[:name], scan_data: scan_data, github_data: github_data)
52
48
  @log.log('onboarding', 'activate complete')
53
49
  build_onboarding_result(config, scan_data, github_data)
@@ -146,6 +142,20 @@ module Legion
146
142
  @llm_probe.run_async(@llm_queue)
147
143
  @bootstrap_probe = Background::BootstrapConfig.new(logger: @log)
148
144
  @bootstrap_probe.run_async(@bootstrap_queue)
145
+ start_detect_probe
146
+ end
147
+
148
+ def start_detect_probe
149
+ return unless detect_gem_available?
150
+
151
+ @log.log('detect', 'launching environment scan')
152
+ Thread.new do
153
+ results = Legion::Extensions::Detect.scan
154
+ @detect_queue.push({ type: :detect_complete, data: results })
155
+ rescue StandardError => e
156
+ @log.log('detect', "ERROR: #{e.message}")
157
+ @detect_queue.push({ type: :detect_error, error: e.message })
158
+ end
149
159
  end
150
160
 
151
161
  def run_cache_awakening(scan_data)
@@ -268,6 +278,63 @@ module Legion
268
278
 
269
279
  private
270
280
 
281
+ def initialize_queues
282
+ @scan_queue = Queue.new
283
+ @github_queue = Queue.new
284
+ @github_quick_queue = Queue.new
285
+ @kerberos_queue = Queue.new
286
+ @llm_queue = Queue.new
287
+ @bootstrap_queue = Queue.new
288
+ @detect_queue = Queue.new
289
+ end
290
+
291
+ def run_extension_detection
292
+ return unless detect_gem_available?
293
+
294
+ result = drain_with_timeout(@detect_queue, timeout: 3)
295
+ results = result&.dig(:data) || []
296
+ return if results.empty?
297
+
298
+ @log.log('detect', "detected #{results.size} services")
299
+ display_detected_extensions(results)
300
+ offer_missing_extensions(results)
301
+ @output.puts
302
+ end
303
+
304
+ def display_detected_extensions(results)
305
+ results.each do |detection|
306
+ sleep 0.4
307
+ typed_output(" hooking into #{detection[:name]}...")
308
+ @output.puts
309
+ end
310
+ end
311
+
312
+ # rubocop:disable Metrics/AbcSize
313
+ def offer_missing_extensions(results)
314
+ missing = results.select { |r| r[:installed].values.any?(false) }
315
+ if missing.any?
316
+ missing_gems = missing.flat_map { |r| r[:extensions].reject { |e| r[:installed][e] } }.uniq
317
+ @output.puts
318
+ typed_output("#{missing_gems.size} new connection#{'s' if missing_gems.size != 1} available.")
319
+ @output.puts
320
+ if @wizard.confirm('Install them now?')
321
+ Legion::Extensions::Detect.install_missing!
322
+ typed_output('Extensions installed. Neural pathways expanded.')
323
+ end
324
+ else
325
+ typed_output('All connections established.')
326
+ end
327
+ end
328
+ # rubocop:enable Metrics/AbcSize
329
+
330
+ def detect_gem_available?
331
+ require 'legion/extensions/detect'
332
+ true
333
+ rescue LoadError
334
+ @log.log('detect', 'lex-detect gem not available, skipping')
335
+ false
336
+ end
337
+
271
338
  def collect_bootstrap_result
272
339
  result = drain_with_timeout(@bootstrap_queue, timeout: 5)
273
340
  @bootstrap_data = result&.dig(:data)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module TTY
5
- VERSION = '0.2.7'
5
+ VERSION = '0.2.8'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-tty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity