legionio 1.7.26 → 1.7.29

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: 010545b8c47b9d866f1f5da8597e82f2e94bcd7c2a065f8aa97a9383f34325df
4
- data.tar.gz: 7e75584a9fdf08247ec2e8834584a25499f1150814d6888701adea1689a85c37
3
+ metadata.gz: 5af5e876210c79ae9fcc876fad3b8086a605f3a841c450793b4759711c5b0101
4
+ data.tar.gz: 43d1c51c4a52121654e1a1e426f5bbe9e6e1771a5a95a095eb12e87474632eec
5
5
  SHA512:
6
- metadata.gz: 582fd272567d6bcca36b3d9fa8eff39b123f8c664f557a3a26d832bde3756e9c5d32d94693533d31d6231ff9d3f77201d067c3b8e26c9fd416888245993c0dc7
7
- data.tar.gz: fc1f7f556c6f7cb5c4a24b8733fc23032a3cc54561ccb0d40fba8189190a424e58c84412824d5e195c870b05015ecc93f398fd74948f8fce837f842a63641e41
6
+ metadata.gz: af956fad95ae9de341f700fa1e03997bed9b889983dc69b96322ba72cb7871f584224b4d00112e17b2e580a9f37e1afff3fa96e9b5bb5e83a38cf487fad26b77
7
+ data.tar.gz: 6545603e7df04444096ae7763fcfde3ee4b970603554388ab04be50a088bd36ac1f77c0fc5ce02f04eeaf5396bb5620d38fc6416f5125b900225a3f79ecc773a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Legion Changelog
2
2
 
3
+ ## [1.7.29] - 2026-04-07
4
+
5
+ ### Changed
6
+ - Skip secret resolution for all CLI commands that only need local settings: `config`, `mode`, `lex`, `doctor`, `auth`, `marketplace`, `debug`, `failover status` — eliminates noisy Vault/lease warnings on local-only operations
7
+
8
+ ## [1.7.28] - 2026-04-07
9
+
10
+ ### Fixed
11
+ - `legionio setup` pack marker and packs.json writes now rescue `Errno::EPERM`/`EACCES`, fixing Homebrew post-install crash when sandbox blocks writes to `~/.legionio/`
12
+
13
+ ## [1.7.27] - 2026-04-07
14
+
15
+ ### Changed
16
+ - `Connection.ensure_settings` accepts `resolve_secrets:` keyword (default `true`) to skip Vault/lease resolution for CLI commands that don't need infrastructure credentials
17
+ - `legionio update` now skips secret resolution, eliminating noisy "Vault not connected" and "LeaseManager not available" warnings
18
+
3
19
  ## [1.7.26] - 2026-04-07
4
20
 
5
21
  ### Added
@@ -20,7 +20,7 @@ module Legion
20
20
  method_option :scopes, type: :string, desc: 'OAuth scopes to request'
21
21
  def teams
22
22
  out = formatter
23
- Connection.ensure_settings
23
+ Connection.ensure_settings(resolve_secrets: false)
24
24
 
25
25
  port = begin
26
26
  Legion::Settings.dig(:api, :port) || 4567
@@ -18,7 +18,7 @@ module Legion
18
18
  def show
19
19
  out = formatter
20
20
  Connection.config_dir = options[:config_dir] if options[:config_dir]
21
- Connection.ensure_settings
21
+ Connection.ensure_settings(resolve_secrets: false)
22
22
 
23
23
  settings = if Legion::Settings.respond_to?(:to_hash)
24
24
  Legion::Settings.to_hash
@@ -110,7 +110,7 @@ module Legion
110
110
 
111
111
  # Check settings load
112
112
  begin
113
- Connection.ensure_settings
113
+ Connection.ensure_settings(resolve_secrets: false)
114
114
  out.success('Settings loaded successfully') unless options[:json]
115
115
  rescue StandardError => e
116
116
  issues << "Settings failed to load: #{e.message}"
@@ -23,7 +23,7 @@ module Legion
23
23
  @logging_ready = true
24
24
  end
25
25
 
26
- def ensure_settings
26
+ def ensure_settings(resolve_secrets: true)
27
27
  return if @settings_ready
28
28
 
29
29
  ensure_logging
@@ -31,7 +31,7 @@ module Legion
31
31
 
32
32
  dir = resolve_config_dir
33
33
  Legion::Settings.load(config_dir: dir)
34
- Legion::Settings.resolve_secrets! if Legion::Settings.respond_to?(:resolve_secrets!)
34
+ Legion::Settings.resolve_secrets! if resolve_secrets && Legion::Settings.respond_to?(:resolve_secrets!)
35
35
  @settings_ready = true
36
36
  end
37
37
 
@@ -98,7 +98,7 @@ module Legion
98
98
  def load_settings
99
99
  Connection.config_dir = options[:config_dir] if options[:config_dir]
100
100
  Connection.log_level = 'error'
101
- Connection.ensure_settings
101
+ Connection.ensure_settings(resolve_secrets: false)
102
102
  rescue StandardError
103
103
  nil
104
104
  end
@@ -70,7 +70,7 @@ module Legion
70
70
  def diagnose
71
71
  out = formatter
72
72
  begin
73
- Connection.ensure_settings
73
+ Connection.ensure_settings(resolve_secrets: false)
74
74
  rescue StandardError => e
75
75
  Legion::Logging.debug("Doctor#diagnose settings load failed: #{e.message}") if defined?(Legion::Logging)
76
76
  end
@@ -72,7 +72,7 @@ module Legion
72
72
  private
73
73
 
74
74
  def ensure_settings
75
- Connection.ensure_settings
75
+ Connection.ensure_settings(resolve_secrets: false)
76
76
  end
77
77
 
78
78
  def run_dry_run(out, target)
@@ -160,7 +160,7 @@ module Legion
160
160
  desc 'enable NAME', 'Enable an extension in settings'
161
161
  def enable(name)
162
162
  out = formatter
163
- Connection.ensure_settings
163
+ Connection.ensure_settings(resolve_secrets: false)
164
164
 
165
165
  extensions = Legion::Settings[:extensions] || {}
166
166
  if extensions.key?(name.to_sym)
@@ -176,7 +176,7 @@ module Legion
176
176
  desc 'disable NAME', 'Disable an extension in settings'
177
177
  def disable(name)
178
178
  out = formatter
179
- Connection.ensure_settings
179
+ Connection.ensure_settings(resolve_secrets: false)
180
180
 
181
181
  extensions = Legion::Settings[:extensions] || {}
182
182
  if extensions.key?(name.to_sym)
@@ -349,7 +349,7 @@ module Legion
349
349
 
350
350
  # Load settings to check enabled/disabled state
351
351
  begin
352
- Connection.ensure_settings
352
+ Connection.ensure_settings(resolve_secrets: false)
353
353
  ext_settings = Legion::Settings[:extensions] || {}
354
354
  rescue StandardError => e
355
355
  Legion::Logging.warn("LexCommand#discover_all settings load failed: #{e.message}") if defined?(Legion::Logging)
@@ -248,7 +248,7 @@ module Legion
248
248
  end
249
249
 
250
250
  begin
251
- Connection.ensure_settings
251
+ Connection.ensure_settings(resolve_secrets: false)
252
252
  Legion::Extensions::GemSource.setup!
253
253
  rescue StandardError => e
254
254
  Legion::Logging.debug("marketplace install: settings not available: #{e.message}") if defined?(Legion::Logging)
@@ -31,7 +31,7 @@ module Legion
31
31
  desc 'show', 'Show current process role and extension profile'
32
32
  def show
33
33
  out = formatter
34
- Connection.ensure_settings
34
+ Connection.ensure_settings(resolve_secrets: false)
35
35
 
36
36
  process_role = Legion::ProcessRole.current
37
37
  profile = Legion::Settings.dig(:role, :profile)&.to_s || '(none — all extensions load)'
@@ -55,7 +55,7 @@ module Legion
55
55
  desc 'list', 'List available extension profiles and process roles'
56
56
  def list
57
57
  out = formatter
58
- Connection.ensure_settings
58
+ Connection.ensure_settings(resolve_secrets: false)
59
59
 
60
60
  if options[:json]
61
61
  out.json({ profiles: PROFILE_DESCRIPTIONS, process_roles: Legion::ProcessRole::ROLES.keys })
@@ -95,7 +95,7 @@ module Legion
95
95
  option :reload, type: :boolean, default: false, desc: 'Trigger daemon reload after writing config'
96
96
  def set(profile = nil)
97
97
  out = formatter
98
- Connection.ensure_settings
98
+ Connection.ensure_settings(resolve_secrets: false)
99
99
 
100
100
  validate_inputs!(out, profile)
101
101
 
@@ -304,6 +304,8 @@ module Legion
304
304
  marker = File.join(marker_dir, pack_name.to_s)
305
305
  File.write(marker, '') unless File.exist?(marker)
306
306
  update_packs_setting(pack_name)
307
+ rescue Errno::EPERM, Errno::EACCES => e
308
+ Legion::Logging.warn("Could not write pack marker: #{e.message}") if defined?(Legion::Logging)
307
309
  end
308
310
 
309
311
  def update_packs_setting(pack_name)
@@ -318,6 +320,8 @@ module Legion
318
320
  data['packs'] = packs.sort
319
321
  FileUtils.mkdir_p(File.dirname(settings_file))
320
322
  File.write(settings_file, ::JSON.pretty_generate(data))
323
+ rescue Errno::EPERM, Errno::EACCES => e
324
+ Legion::Logging.warn("Could not update packs setting: #{e.message}") if defined?(Legion::Logging)
321
325
  rescue ::JSON::ParserError
322
326
  data = { 'packs' => [pack_name.to_s] }
323
327
  File.write(settings_file, ::JSON.pretty_generate(data))
@@ -31,7 +31,7 @@ module Legion
31
31
  raise SystemExit, 1
32
32
  end
33
33
 
34
- Connection.ensure_settings
34
+ Connection.ensure_settings(resolve_secrets: false)
35
35
  Legion::Extensions::GemSource.setup!
36
36
 
37
37
  target_gems = discover_legion_gems
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Legion
4
- VERSION = '1.7.26'
4
+ VERSION = '1.7.29'
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.7.26
4
+ version: 1.7.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity