ace-support-nav 0.25.2 → 0.28.2

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: e3c025e29285a77e6944e76b3cafe314ab00a7042d61b55e84214ee0a0012d47
4
- data.tar.gz: 0424d2d2622c8c2669a075e04ffa6292c91ea4129c7fdd11a974d03f901e59ff
3
+ metadata.gz: 85ee08c81f2ee6031ebb6494c4e6362cb9c5cd99fcc2f40fd8edc8ab284519ee
4
+ data.tar.gz: c9c477c8ec3cb1a516cdfd3917599b52e11cfcb95b780ee6f6aee1101ff3352d
5
5
  SHA512:
6
- metadata.gz: 6a877791f3f020b42a403b2a252a8aa81ce44908bb3c4379b586fdf111f0a5040e7289447d9077cc29178b1471677c49d855007dee2c4ea006ebdf90b6eb00f5
7
- data.tar.gz: 447dea722a4e280c83d18394e1a029dd8f189a8bf9449e43a8d8f47289ba28b825aa26070e9f9155334face35e9f9cfafaff530569b9ef1a01e281896ff29394
6
+ metadata.gz: 6cec2ea42760eb34c86ac9f10d56410449714478a874169e8e60ce0fae0e5efeb5f981c571fb380bea9a397bd28eeb0f2c53aece221892b5992c0d549733c648
7
+ data.tar.gz: 21645a38eab8b20f7629c64574fd75a37e208e5add437104e9f05c58da3501ea0d32d61e9ad2f0597eff0db68e076ebb0e42d0fb3ee6fe678f7a0a3b10ab3179
@@ -0,0 +1,13 @@
1
+ ---
2
+ # Project-local cookbook source configuration
3
+ # Enables cookbook discovery from repository-level handbook overlays.
4
+
5
+ name: project-local-cookbooks
6
+ type: directory
7
+ path: .ace-handbook/cookbooks
8
+ description: Cookbooks from project-local .ace-handbook overlay
9
+ priority: 20
10
+
11
+ config:
12
+ pattern: "*.cookbook.md"
13
+ enabled: true
@@ -0,0 +1,58 @@
1
+ # Protocol definition for cookbooks
2
+ protocol: cookbook
3
+ name: "Cookbooks"
4
+ description: "Operational runbooks and implementation recipes"
5
+ enabled: true
6
+
7
+ # File extensions to match
8
+ extensions:
9
+ - .cookbook.md
10
+
11
+ # Extension inference for DWIM behavior
12
+ inferred_extensions:
13
+ - .cookbook
14
+ - .cookbook.md
15
+
16
+ # Categories for organizing cookbooks
17
+ categories:
18
+ - setup
19
+ - migration
20
+ - integration
21
+ - debugging
22
+ - automation
23
+ - pattern
24
+
25
+ # Template for creating new cookbooks
26
+ create_template: |
27
+ # {Category} Cookbook: {Cookbook Name}
28
+
29
+ ## Purpose
30
+
31
+ Brief description of what this cookbook accomplishes.
32
+
33
+ ## Source Provenance
34
+
35
+ - Source workflows/guides/docs:
36
+ - Validation evidence:
37
+
38
+ ## Steps
39
+
40
+ ### Step 1: {Step Title}
41
+
42
+ ```bash
43
+ # command
44
+ ```
45
+
46
+ ## Propagation Notes
47
+
48
+ - Documentation updates to apply:
49
+ - Agent guidance updates to apply:
50
+
51
+ # Protocol capabilities
52
+ capabilities:
53
+ searchable: true
54
+ supports_glob: true
55
+ supports_create: true
56
+ supports_content: true
57
+ supports_list: true
58
+ supports_tree: true
data/CHANGELOG.md CHANGED
@@ -7,6 +7,69 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.28.2] - 2026-04-20
11
+
12
+ ### Technical
13
+ - Stabilized `TS-NAV-001` discovery-listing verification by requiring canonical `list.*` captures for the public `ace-nav list` workflow.
14
+
15
+ ## [0.28.1] - 2026-04-16
16
+
17
+ ### Technical
18
+ - Updated `TS-NAV-001` sandbox setup to source `mise.toml` from `${ACE_E2E_SOURCE_ROOT:-$PROJECT_ROOT_PATH}` so resource-navigation smoke runs stay compatible with read-only source-root mounts.
19
+
20
+ ## [0.28.0] - 2026-04-15
21
+
22
+ ### Changed
23
+ - Reworked `TS-NAV-001` E2E coverage to public-surface goal contracts by rewriting discovery/resolve/listing goals around actionable user outcomes instead of extension-priority internals.
24
+ - Added `TC-006 create-from-template public path` coverage to verify end-to-end creation behavior through `ace-nav create` with real filesystem outputs.
25
+ - Updated package Quick Start guidance to include one complete user journey (`resolve -> list -> sources -> create`) and explicit user-facing success signals.
26
+
27
+ ## [0.27.3] - 2026-04-13
28
+
29
+ ### Fixed
30
+ - Deduplicated `cookbook://` listing output by canonicalized resource path while preserving source priority when overlaps occur.
31
+ - Canonicalized dedupe keys with `File.realpath` (with fallback to `File.expand_path`) so symlinked and real source roots collapse to one cookbook entry.
32
+ - Added regression coverage for mixed source types and real-path vs symlink-path overlaps to lock dedupe behavior.
33
+
34
+ ## [0.27.1] - 2026-04-13
35
+
36
+ ### Changed
37
+ - Completed the batch i05 migration follow-through for this package and aligned it with the restarted `fast` / `feat` / `e2e` verification model.
38
+
39
+ ### Technical
40
+ - Included in the coordinated assignment-driven patch release for batch i05 package updates.
41
+
42
+
43
+ ### Changed
44
+ - Migrated package tests to the restarted `fast` / `feat` / `e2e` model, moved deterministic coverage into `test/fast` and `test/feat`, refreshed `TS-NAV-001` decision metadata/setup for sandbox reliability, and updated README testing guidance to the new lane contract.
45
+
46
+ ## [0.26.3] - 2026-04-01
47
+
48
+ ### Fixed
49
+ - Switched protocol source config loading from `YAML.load_file` to `YAML.safe_load_file` with explicit safe-load options.
50
+
51
+ ### Changed
52
+ - Documented the intent of the project-local `cookbook://` protocol override to prevent accidental cleanup of required monorepo behavior.
53
+
54
+ ## [0.26.2] - 2026-04-01
55
+
56
+ ### Fixed
57
+ - Restricted `cookbook://` inferred extension matching to cookbook-specific forms (`.cookbook`, `.cookbook.md`) so plain `.md` files are not inferred as cookbook assets.
58
+
59
+ ## [0.26.1] - 2026-04-01
60
+
61
+ ### Fixed
62
+ - Deduplicated `cookbook://` listings across overlapping source registrations and resource scans.
63
+ - Added explicit project-local cookbook source support at `.ace-handbook/cookbooks` and mapped cookbook create targets to the `cookbooks/` directory.
64
+
65
+ ### Changed
66
+ - Aligned cookbook protocol create-template placeholders with lint-safe brace format and tightened canonical extension matching.
67
+
68
+ ## [0.26.0] - 2026-04-01
69
+
70
+ ### Added
71
+ - Added `cookbook://` protocol defaults, extension inference, categories, and create template for cookbook resource discovery.
72
+
10
73
  ## [0.25.2] - 2026-03-29
11
74
 
12
75
  ### Technical
data/README.md CHANGED
@@ -37,10 +37,26 @@
37
37
  ## Quick Start
38
38
 
39
39
  ```bash
40
- ace-nav resolve wfi://setup # Locate a workflow instruction
41
- ace-nav resolve guide://configuration # Find a guide by protocol URI
42
- ace-nav list 'wfi://*test*' # Wildcard search across sources
43
- ace-nav --sources # List all registered handbook sources
40
+ ace-nav resolve guide://markdown-style # Resolve a guide path
41
+ ace-nav list 'wfi://*test*' # Browse candidate workflows
42
+ ace-nav sources # List all registered sources
43
+ ace-nav create wfi://setup ./tmp/setup-copy.wf.md # Create from URI into a file
44
+ ```
45
+
46
+ Expected user-facing success criteria for this journey:
47
+ - `resolve` returns a usable path for the requested resource.
48
+ - `list` and `sources` return actionable entries for follow-up commands.
49
+ - `create` writes the requested file at the provided target path.
50
+
51
+ ## Testing
52
+
53
+ Use the restarted lane model for this package:
54
+
55
+ ```bash
56
+ ace-test ace-support-nav # fast deterministic lane (default)
57
+ ace-test ace-support-nav feat # deterministic feature lane
58
+ ace-test ace-support-nav all # fast + feat
59
+ ace-test-e2e ace-support-nav # retained workflow-value scenarios only
44
60
  ```
45
61
 
46
62
  ---
@@ -41,7 +41,7 @@ module Ace
41
41
  resources.concat(find_resources_in_source_internal(source, protocol_config, pattern))
42
42
  end
43
43
 
44
- resources
44
+ deduplicate_resources(resources)
45
45
  end
46
46
 
47
47
  # Find resources in a specific source (internal implementation)
@@ -276,6 +276,18 @@ module Ace
276
276
  resources
277
277
  end
278
278
 
279
+ def deduplicate_resources(resources)
280
+ seen = Set.new
281
+
282
+ resources.each_with_object([]) do |resource, unique_resources|
283
+ key = dedupe_resource_key(resource)
284
+ next if seen.include?(key)
285
+
286
+ seen.add(key)
287
+ unique_resources << resource
288
+ end
289
+ end
290
+
279
291
  # Check if extension inference is enabled in settings (cached)
280
292
  def extension_inference_enabled?
281
293
  return @extension_inference_enabled unless @extension_inference_enabled.nil?
@@ -369,6 +381,17 @@ module Ace
369
381
 
370
382
  private
371
383
 
384
+ def dedupe_resource_key(resource)
385
+ protocol = resource[:protocol]
386
+ path = resource[:path].to_s
387
+ canonical_path = begin
388
+ File.realpath(path)
389
+ rescue Errno::ENOENT, Errno::ENOTDIR, Errno::EACCES
390
+ File.expand_path(path)
391
+ end
392
+ [protocol, canonical_path]
393
+ end
394
+
372
395
  def create_resource_info(file_path, search_path, source, protocol)
373
396
  # Ensure search_path ends with a separator for proper substitution
374
397
  normalized_search_path = search_path.end_with?("/") ? search_path : "#{search_path}/"
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "yaml"
4
+ require "date"
4
5
  require "pathname"
6
+ require "rubygems"
5
7
  require "ace/support/fs"
6
8
  require_relative "../models/protocol_source"
7
9
 
@@ -39,8 +41,34 @@ module Ace
39
41
  # Discover from project hierarchy
40
42
  sources.concat(discover_project_sources(protocol))
41
43
 
44
+ # Discover packaged defaults from installed ace-* gems
45
+ sources.concat(discover_gem_default_sources(protocol))
46
+
42
47
  # Sort by priority (lower number = higher priority)
43
- sources.sort_by(&:priority)
48
+ deduplicate_sources(sources.sort_by(&:priority))
49
+ end
50
+
51
+ def deduplicate_sources(sorted_sources)
52
+ seen = {}
53
+
54
+ sorted_sources.each_with_object([]) do |source, unique_sources|
55
+ key = dedupe_key(source)
56
+ next if seen[key]
57
+
58
+ seen[key] = true
59
+ unique_sources << source
60
+ end
61
+ end
62
+
63
+ def dedupe_key(source)
64
+ config = source.config || {}
65
+ [
66
+ source.name,
67
+ source.type,
68
+ source.path,
69
+ config["relative_path"],
70
+ config["pattern"]
71
+ ]
44
72
  end
45
73
 
46
74
  def discover_user_sources(protocol)
@@ -78,8 +106,27 @@ module Ace
78
106
  sources
79
107
  end
80
108
 
109
+ def discover_gem_default_sources(protocol)
110
+ sources = []
111
+ sources_dir_suffix = File.join(".ace-defaults", "nav", "protocols", "#{protocol}-sources")
112
+
113
+ Gem::Specification.each do |spec|
114
+ next unless spec.name.start_with?("ace-")
115
+
116
+ sources_dir = File.join(spec.gem_dir, sources_dir_suffix)
117
+ next unless Dir.exist?(sources_dir)
118
+
119
+ Dir.glob(File.join(sources_dir, "*.yml")).each do |source_file|
120
+ source = load_source_file(source_file, "gem-default")
121
+ sources << source if source
122
+ end
123
+ end
124
+
125
+ sources
126
+ end
127
+
81
128
  def load_source_file(file_path, origin)
82
- data = YAML.load_file(file_path)
129
+ data = YAML.safe_load_file(file_path, permitted_classes: [Date], aliases: true)
83
130
  return nil unless data.is_a?(Hash)
84
131
 
85
132
  # Expand environment variables in path (only for non-gem types)
@@ -122,8 +169,10 @@ module Ace
122
169
  10 # Highest priority
123
170
  when "user"
124
171
  50 # Medium priority
172
+ when "gem-default"
173
+ 100 # Installed gem defaults
125
174
  else
126
- 100 # Lower priority for gems
175
+ 150 # Lowest priority for unknown origins
127
176
  end
128
177
  end
129
178
  end
@@ -159,6 +159,7 @@ module Ace
159
159
  when "wfi" then "workflow-instructions"
160
160
  when "tmpl" then "templates"
161
161
  when "guide" then "guides"
162
+ when "cookbook" then "cookbooks"
162
163
  when "sample" then "samples"
163
164
  else template.protocol
164
165
  end
@@ -3,7 +3,7 @@
3
3
  module Ace
4
4
  module Support
5
5
  module Nav
6
- VERSION = '0.25.2'
6
+ VERSION = '0.28.2'
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.25.2
4
+ version: 0.28.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Czyz
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2026-03-29 00:00:00.000000000 Z
10
+ date: 2026-04-20 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: ace-support-cli
@@ -161,6 +161,8 @@ extensions: []
161
161
  extra_rdoc_files: []
162
162
  files:
163
163
  - ".ace-defaults/nav/config.yml"
164
+ - ".ace-defaults/nav/protocols/cookbook-sources/project-local.yml"
165
+ - ".ace-defaults/nav/protocols/cookbook.yml"
164
166
  - ".ace-defaults/nav/protocols/guide-sources/ace-support-nav.yml"
165
167
  - ".ace-defaults/nav/protocols/guide.yml"
166
168
  - ".ace-defaults/nav/protocols/prompt.yml"