ace-support-nav 0.28.7 → 0.28.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: ecc4d7ddedfa6c6bb842df8618779d87b1099c1cdb3898749a8d18c77fd47095
4
- data.tar.gz: 64cf17332d9eb5a76ccd945d4aef71c57d3b6a428b34dabe924ad532fb3205cc
3
+ metadata.gz: 360819ca45c3cd71302707c5bc82a4a6dc6cf867d02ca96796ba04c24ddc4f45
4
+ data.tar.gz: 35feb7c2fb3c43a357fe25f9aab9ec3577d853ed4ea8224cfc4fbd09a3c69a6f
5
5
  SHA512:
6
- metadata.gz: 1227aa081c832c78abaf75b1ccd0113495f8f103d2530f108e0e5024d331ae79cac87cfbd61a74dfee1ddfaedcd4e40b13cb1991525688acd5b529fd2588834e
7
- data.tar.gz: 9ca8ba354761276bfc7b449ed702a5e2f175a4af82127922129671fa1d393897733af48f2a51f1141ee453ebe597a9316c222d7494453af72df4da58c8fadbcb
6
+ metadata.gz: 3657cb2a716864179ba9f342d4cc005aa5fc6838a08a831b710a8cc8280fb405d7bc51f413c8485825d87b4462d3e05385cd70c9a82d1e390d9206fe1b9f1133
7
+ data.tar.gz: 1d7e62975dcc3d28e0f4a5e765909a892d9b391a5fed1858425389faf82a393cebe698940e6fa8d48bb8f1b0b915eb62e4b14d99ac5f23aed2de323c3be5c380
data/CHANGELOG.md CHANGED
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.28.8] - 2026-10-20
11
+
12
+ ### Fixed
13
+ - Honor `ACE_TOOLCHAIN=installed` for published-gem execution and context propagation without source-runtime fallback; retain default auto development behavior.
14
+
10
15
  ## [0.28.7] - 2026-09-27
11
16
 
12
17
  ### Technical
data/exe/ace-nav CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require "bundler/setup"
4
+ require "bundler/setup" unless ENV["ACE_TOOLCHAIN"] == "installed"
5
5
  require "ace/support/nav"
6
6
  require "ace/support/cli"
7
7
 
@@ -33,8 +33,19 @@ module Ace
33
33
 
34
34
  # Get relative path from config, or use default
35
35
  relative = @config&.dig("relative_path") || "handbook/workflow-instructions"
36
+ return File.join(gem_dir, relative) unless Ace::Support::Cli::Toolchain.installed?
36
37
 
37
- File.join(gem_dir, relative)
38
+ candidate = File.expand_path(relative, gem_dir)
39
+ if Ace::Support::Cli::Toolchain.installed?
40
+ unless Ace::Support::Cli::Toolchain.installed_spec?(spec) &&
41
+ candidate.start_with?("#{File.expand_path(gem_dir)}/")
42
+ raise Ace::Support::Cli::Toolchain::Error, "generic document source is outside installed gem #{@name}"
43
+ end
44
+ if File.exist?(candidate) && !File.realpath(candidate).start_with?("#{File.realpath(gem_dir)}/")
45
+ raise Ace::Support::Cli::Toolchain::Error, "generic document source escapes installed gem #{@name}"
46
+ end
47
+ end
48
+ candidate
38
49
  rescue Gem::LoadError => e
39
50
  # Gem not found, return a placeholder path
40
51
  warn "Gem '#{@name}' not found: #{e.message}" if ENV["VERBOSE"]
@@ -89,6 +89,8 @@ module Ace
89
89
  @protocols[key] = protocol_data if key
90
90
  end
91
91
 
92
+ return @protocols if Ace::Support::Cli::Toolchain.installed?
93
+
92
94
  # 1. Load from user ~/.ace/nav/protocols/
93
95
  load_directory_protocols(File.expand_path("~/.ace/nav/protocols")).each do |protocol_data|
94
96
  key = protocol_data["protocol"]
@@ -352,6 +352,8 @@ module Ace
352
352
  # Remove @ prefix if present
353
353
  name = alias_name.start_with?("@") ? alias_name[1..] : alias_name
354
354
 
355
+ return nil if Ace::Support::Cli::Toolchain.installed? && %w[project local user global].include?(name)
356
+
355
357
  # Handle special aliases
356
358
  case name
357
359
  when "project", "local"
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "yaml"
4
+ require "ace/support/cli/toolchain"
4
5
  require "date"
5
6
  require "pathname"
6
7
  require "rubygems"
@@ -36,10 +37,10 @@ module Ace
36
37
  sources = []
37
38
 
38
39
  # Discover from user directory
39
- sources.concat(discover_user_sources(protocol))
40
+ sources.concat(discover_user_sources(protocol)) unless Ace::Support::Cli::Toolchain.installed?
40
41
 
41
42
  # Discover from project hierarchy
42
- sources.concat(discover_project_sources(protocol))
43
+ sources.concat(discover_project_sources(protocol)) unless Ace::Support::Cli::Toolchain.installed?
43
44
 
44
45
  # Discover packaged defaults from installed ace-* gems
45
46
  sources.concat(discover_gem_default_sources(protocol))
@@ -112,12 +113,13 @@ module Ace
112
113
 
113
114
  Gem::Specification.each do |spec|
114
115
  next unless spec.name.start_with?("ace-")
116
+ next if Ace::Support::Cli::Toolchain.installed? && !Ace::Support::Cli::Toolchain.installed_spec?(spec)
115
117
 
116
118
  sources_dir = File.join(spec.gem_dir, sources_dir_suffix)
117
119
  next unless Dir.exist?(sources_dir)
118
120
 
119
121
  Dir.glob(File.join(sources_dir, "*.yml")).each do |source_file|
120
- source = load_source_file(source_file, "gem-default")
122
+ source = load_source_file(source_file, "gem-default", gem_root: spec.gem_dir)
121
123
  sources << source if source
122
124
  end
123
125
  end
@@ -125,12 +127,19 @@ module Ace
125
127
  sources
126
128
  end
127
129
 
128
- def load_source_file(file_path, origin)
130
+ def load_source_file(file_path, origin, gem_root: nil)
129
131
  data = YAML.safe_load_file(file_path, permitted_classes: [Date], aliases: true)
130
132
  return nil unless data.is_a?(Hash)
131
133
 
132
134
  # Expand environment variables in path (only for non-gem types)
133
135
  path = (data["type"] == "gem") ? nil : expand_path(data["path"]) if data["path"]
136
+ if Ace::Support::Cli::Toolchain.installed? && data["type"] != "gem"
137
+ return nil unless gem_root && data["path"]
138
+
139
+ path = File.expand_path(data["path"], gem_root)
140
+ return nil unless File.directory?(path) &&
141
+ File.realpath(path).start_with?("#{File.realpath(gem_root)}/")
142
+ end
134
143
 
135
144
  # Log warning if path is provided for gem type
136
145
  if data["type"] == "gem" && data["path"]
@@ -100,8 +100,16 @@ module Ace
100
100
  # @param command_parts [Array<String>] Command parts for safe execution
101
101
  # @return [Integer] Exit code (0 for success, 1 for failure)
102
102
  def execute_command(command_parts)
103
+ if Ace::Support::Cli::Toolchain.installed?
104
+ command_parts = command_parts.dup
105
+ command_parts[0] = Ace::Support::Cli::Toolchain.executable(command_parts.fetch(0))
106
+ end
103
107
  # Use system with array argument for safety (no shell interpolation)
104
- success = system(*command_parts)
108
+ success = if Ace::Support::Cli::Toolchain.installed?
109
+ system(Ace::Support::Cli::Toolchain.child_environment, *command_parts)
110
+ else
111
+ system(*command_parts)
112
+ end
105
113
 
106
114
  # Return exit code
107
115
  if success.nil?
@@ -3,7 +3,7 @@
3
3
  module Ace
4
4
  module Support
5
5
  module Nav
6
- VERSION = "0.28.7"
6
+ VERSION = "0.28.8"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ace-support-nav
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.7
4
+ version: 0.28.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Czyz
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2026-09-27 00:00:00.000000000 Z
10
+ date: 2026-10-20 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: ace-support-cli
@@ -16,6 +16,9 @@ dependencies:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
18
  version: '0.6'
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: 0.6.10
19
22
  type: :runtime
20
23
  prerelease: false
21
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -23,6 +26,9 @@ dependencies:
23
26
  - - "~>"
24
27
  - !ruby/object:Gem::Version
25
28
  version: '0.6'
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 0.6.10
26
32
  - !ruby/object:Gem::Dependency
27
33
  name: ace-support-core
28
34
  requirement: !ruby/object:Gem::Requirement