hiiro 0.1.297 → 0.1.298

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: cc5828576d7206148468d0aec7800d66db66f348ef211d1e606f81fbcfbb8f9c
4
- data.tar.gz: 6c54efd58f817d842e704e976b606547d93176deaa98c9be3d34e6fc6515a40d
3
+ metadata.gz: 8490d494506182e944c05ff1df6aec4c1230f1c44983605edd2c2cb28ab7aa2a
4
+ data.tar.gz: 8f0dc4909c84d07e46434f62059a377cb68b83301dce77cc176d21041a49f60f
5
5
  SHA512:
6
- metadata.gz: e39208b689534777a8cc7c80e80fe37bfb14134d13872d59defdaf4ed5745da5f8e835f89c410189f16b6944438932bc547c2ad2f39bff96ecf8e9a3b3e80fb4
7
- data.tar.gz: 11aa3cbfb0d2a4a05687ad3a2765f83dba129780ef44847602ebd6b7edcbeb07d5b16b3797d595383a12be55b4350994a6acbe2c975d0777ccfd73db35476c35
6
+ metadata.gz: 38a71da929c8f8d4e8d7a640a2ec43847ffb3d32b558b21ecd0bc8f908d761aad70479e30b68c6fc5f7e675f66cda3d71ea7dedcfd33f94dbbc32d960a1a7208
7
+ data.tar.gz: c27d87516084d5ebff7b580e24e849ce470c4477dd62010ac75e7310c60c812eb3b5397f695ba80c6d4e6b189f816be222037882d4e351edae859708fd226baa
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
1
  ```markdown
2
+ ## v0.1.298 (2026-03-27)
3
+
4
+ ### Changed
5
+ - `Hiiro::Config`: now uses `Pathname` to walk up the directory tree instead of string manipulation for better robustness
6
+ - `h cl agents/commands/skills`: now walks from current working directory up to home directory to locate agent/command/skill files
7
+
2
8
  ## v0.1.297 (2026-03-27)
3
9
 
4
10
  ### Added
data/bin/h-claude CHANGED
@@ -3,6 +3,7 @@
3
3
  require 'hiiro'
4
4
  require 'shellwords'
5
5
  require 'tempfile'
6
+ require 'pathname'
6
7
 
7
8
  opts = Hiiro::Options.setup {
8
9
  flag(:danger, short: :d, default: false)
@@ -30,6 +31,17 @@ def fire_command(opts)
30
31
  ['claude', '-p', permission_flag(opts), *escaped_args].join(' ')
31
32
  end
32
33
 
34
+ # Walk from Dir.pwd up through parent directories, stopping before Dir.home.
35
+ # Returns an array of existing .claude directories, closest-first.
36
+ def claude_ancestor_dirs
37
+ Pathname(Dir.pwd)
38
+ .ascend
39
+ .take_while { |p| p != Pathname(Dir.home) }
40
+ .map { |p| p / '.claude' }
41
+ .select(&:directory?)
42
+ .map(&:to_s)
43
+ end
44
+
33
45
  Hiiro.run(*ARGV, plugins: [Pins]) {
34
46
  add_subcmd(:split) { |*args|
35
47
  opts = opts.parse(args)
@@ -94,22 +106,33 @@ add_subcmd(:env) { |*args|
94
106
  }
95
107
 
96
108
  add_subcmd(:agents) {
97
- dir = File.expand_path('~/.claude/agents')
98
- files = Dir.glob("#{dir}/*.md").sort
99
- files.each { |f| puts File.basename(f, '.md') }
109
+ names = []
110
+ claude_ancestor_dirs.each do |claude_dir|
111
+ dir = File.join(claude_dir, 'agents')
112
+ next unless Dir.exist?(dir)
113
+ Dir.glob("#{dir}/*.md").sort.each { |f| names << File.basename(f, '.md') }
114
+ end
115
+ names.uniq.each { |n| puts n }
100
116
  }
101
117
 
102
118
  add_subcmd(:commands) {
103
- dir = File.expand_path('~/.claude/commands')
104
- files = Dir.glob("#{dir}/*.md").sort
105
- files.each { |f| puts File.basename(f, '.md') }
119
+ names = []
120
+ claude_ancestor_dirs.each do |claude_dir|
121
+ dir = File.join(claude_dir, 'commands')
122
+ next unless Dir.exist?(dir)
123
+ Dir.glob("#{dir}/*.md").sort.each { |f| names << File.basename(f, '.md') }
124
+ end
125
+ names.uniq.each { |n| puts n }
106
126
  }
107
127
 
108
128
  add_subcmd(:skills) {
109
- dir = File.expand_path('~/.claude/skills')
110
- plugin_dir = File.expand_path('~/.claude/plugins/local/skills')
111
- dirs = Dir.glob("{#{dir},#{plugin_dir}}/*/").sort
112
- dirs.each { |d| puts File.basename(d) }
129
+ names = []
130
+ claude_ancestor_dirs.each do |claude_dir|
131
+ dir = File.join(claude_dir, 'skills')
132
+ next unless Dir.exist?(dir)
133
+ Dir.glob("#{dir}/*/").sort.each { |d| names << File.basename(d) }
134
+ end
135
+ names.uniq.each { |n| puts n }
113
136
  }
114
137
 
115
138
  add_subcmd(:new) { |*args|
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.297"
2
+ VERSION = "0.1.298"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiiro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.297
4
+ version: 0.1.298
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota