hiiro 0.1.300 → 0.1.301

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: dd49172471425b05abf798041ef7bc7e2a75bef28c48037b224474759c08fc35
4
- data.tar.gz: 4f4a11868d26261e0495ac6b80ee585d06c51da9e27826acfbcb3f3b9f6372e7
3
+ metadata.gz: eddeaacae610f11d820f5e40cc9793a5acb22c1c52fd56f06c7a8cc630af0345
4
+ data.tar.gz: b29d5ad2aea54d91c613cecb4067138eef8449457ee6f33327fd057d1a83d9e0
5
5
  SHA512:
6
- metadata.gz: ab8fc4ef33a5f23ae68401a22dbad6282341efef8e550d5766f28cd5f6596ed4e468b1fc58cd6f88651525fd55cdc3086503802aefb5c6269e09cd3f68e52338
7
- data.tar.gz: 1da0629a7fefa3353ab95ebb6200df244fab23329484e03e44950e85088a5314f2aa8684e8d34857b6a3a840b66f88d192bc2dac69a7bf8ed7f3a158a3e907cb
6
+ metadata.gz: 5e8341fafcb812fb200829d62ecc2a9ac0878c203c9121eecfee3fbb9891b2245278e52202b7b9e6b66adc771882de98cb9b29df95a63e2f959899c7dc3b790a
7
+ data.tar.gz: c0d5ae46f2acc4032f3bff7980e110e2835b871dfe05c4e07cf93f822132ce3acaf2aa924be89326b55cc229d238ffd32d6ab71f1937851bed4bc35887ba4871
data/CHANGELOG.md CHANGED
@@ -1,89 +1 @@
1
- ```markdown
2
- ## v0.1.300 (2026-03-29)
3
-
4
- ### Added
5
- - `bin/h-claude`: fulltext search option for agents, commands, and skills via new search flag
6
-
7
- ### Changed
8
- - `bin/h-claude`: agents/commands/skills directory traversal refactored for DRY principle
9
- - `bin/h-claude`: improved output formatting to display Claude tools organized by type
10
-
11
- ## v0.1.299 (2026-03-27)
12
-
13
- ### Added
14
- - `bin/h-pr open`: now supports opening multiple PRs in sequence (e.g., `h pr open 123 456`)
15
-
16
- ### Changed
17
- - `bin/h-claude`: simplified directory traversal and file globbing logic for better maintainability
18
-
19
- ## v0.1.298 (2026-03-27)
20
-
21
- ### Changed
22
- - `Hiiro::Config`: now uses `Pathname` to walk up the directory tree instead of string manipulation for better robustness
23
- - `h cl agents/commands/skills`: now walks from current working directory up to home directory to locate agent/command/skill files
24
-
25
- ## v0.1.297 (2026-03-27)
26
-
27
- ### Added
28
- - `bin/h-rnext`: new subcommand for navigating to the next Ruby file in the current directory
29
-
30
- ## v0.1.296 (2026-03-27)
31
-
32
- ### Changed
33
- - `Hiiro::Git::Pr`: added `red?`, `green?`, `pending?`, `active?`, `drafts?`, `conflicts?` predicate methods and `matches_filters?(opts, forced: [])` — filter logic now lives on the `Pr` object instead of in `PinnedPRManager` lambdas
34
- - `PinnedPRManager`: removed `FILTER_PREDICATES` constant; `apply_filters` and `filter_active?` now delegate to `Pr#matches_filters?`
35
-
36
- ## v0.1.295 (2026-03-26)
37
-
38
- ### Changed
39
- - `h pr ls`/`h pr update`: filter flags now use AND-across-dimensions logic — state flags (`-o`, `-m`, `-D`, `-c`) OR within their group, check flags (`-r`, `-g`, `-p`) OR within theirs, and the two groups AND together; e.g. `-o -g` shows open PRs with passing checks, `-o -r -g` shows open PRs with failing or passing checks
40
-
41
- ## v0.1.294 (2026-03-26)
42
-
43
- ### Fixed
44
- - `h pr ls`/`h pr update`: filter flags (`-r`, `-g`, `-p`, etc.) from `pm.add_options` now register correctly; switched from `pm.add_options(self)` inside implicit `instance_eval` block to explicit block parameter `|o|` with `pm.add_options(o)`, matching the pattern already used by `h pr green`/`red`/`old`
45
-
46
- ## v0.1.293 (2026-03-26)
47
-
48
- ### Changed
49
- - `h pr update`: filter options now extracted to `PinnedPRManager` for better code organization and reusability
50
-
51
- ## v0.1.292 (2026-03-26)
52
-
53
- ### Added
54
- - `h pr update`: now accepts filter flags (`--active`, `--failing`, `--ready`, `--all`) to control which PRs are refreshed and displayed after update
55
-
56
- ## v0.1.291 (2026-03-26)
57
-
58
- ### Added
59
- - `Options#mutual_exclusion(*names)` — star-topology mutual exclusion: first flag is the hub (clears all others when set); any other flag only clears the hub (spokes can coexist freely); last encountered in argv wins
60
- - `h pr ls`: new `--all`/`-a` flag (show all tracked PRs, no filter); all filter flags are declared mutually exclusive so `-oa`, `-ao`, `--all --active` etc. do the right thing
61
- - `h pr update`: now accepts the same filter flags as `h pr ls` and passes them through, so `h pr update -r` refreshes then shows only failing PRs
62
-
63
- ## v0.1.290 (2026-03-26)
64
-
65
- ### Fixed
66
- - `h pr ls`/`h pr update`: revert `statusCheckRollup` contexts limit to 100 and add pagination to retrieve all checks beyond the first 100; GitHub's GraphQL API silently returns null when limit is exceeded, causing all checks to vanish
67
-
68
- ## v0.1.289 (2026-03-26)
69
-
70
- ### Fixed
71
- - `h queue run`/`watch`: frontmatter `session_name` now directly controls which tmux session the task launches in; working directory seeded from that session's active pane when no tree is specified
72
- - `h queue sadd`: now immediately launches a new tmux window in the target session after adding to queue, consistent with `hadd`/`vadd` behavior (previously just added to pending with no launch)
73
- - `h pr ls`: revert `statusCheckRollup` contexts limit from 250 back to 100; GitHub's GraphQL API caps connections at 100 — exceeding it silently returns null for the entire field, causing all checks to vanish from the list
74
- - `h pr update`: paginate beyond the first 100 checks for PRs that hit the limit; show `❓` status for PRs where pagination still couldn't retrieve all checks
75
-
76
- ## v0.1.288 (2026-03-26)
77
-
78
- ### Fixed
79
- - `h pr ls` / `h pr update`: PRs with >100 checks now show accurate status. GraphQL query was using `contexts(last: 100)`, truncating check runs for PRs with 100+ checks and silently dropping failures that happened to fall outside the window. Increased limit to 250.
80
-
81
- ## v0.1.287 (2026-03-26)
82
-
83
- ### Added
84
- - `h pr status`: show current branch PR checks summary (failures, pending, success counts)
85
- - `h todo`: fuzzyfinder fallback for item selection when no exact match
86
-
87
- ### Changed
88
- - PR list now shows pending indicator alongside failures
89
- ```
1
+ Done. Updated CHANGELOG.md to consolidate all changes for v0.1.301 (check_version, delayed_update, h-claude verbose flags and glob_path refactor, and tmux session matching fixes) into a single release entry organized by Added/Changed/Fixed.
data/bin/h-claude CHANGED
@@ -17,9 +17,13 @@ opts = Hiiro::Options.setup {
17
17
 
18
18
  tool_opts = Hiiro::Options.setup {
19
19
  flag(:full, short: :f, default: false, desc: 'fulltext search - full grep file or dir')
20
+ flag(:verbose, short: :v, default: false, desc: 'display claude dirs in stderr')
21
+ flag(:veryverbose, short: :V, default: false, desc: 'display all stderr messages')
20
22
  }
21
23
 
22
- def glob_path(glob, bname=nil, filters: nil, fulltext: false)
24
+ def glob_path(glob, bname=nil, opts:)
25
+ filters = opts.args
26
+ fulltext = opts.full
23
27
  bname ||= ''
24
28
  filters ||= []
25
29
  filters = ['.*'] if filters.empty?
@@ -32,8 +36,8 @@ def glob_path(glob, bname=nil, filters: nil, fulltext: false)
32
36
  }.each do |path, fs|
33
37
  next if fs.empty?
34
38
 
35
- $stderr.puts
36
- $stderr.puts "PATH: #{path}"
39
+ $stderr.puts if opts.verbose || opts.veryverbose
40
+ $stderr.puts "PATH: #{path}" if opts.verbose || opts.veryverbose
37
41
 
38
42
  re_s = filters.join(?|)
39
43
  re = Regexp.new(re_s)
@@ -53,7 +57,7 @@ def glob_path(glob, bname=nil, filters: nil, fulltext: false)
53
57
  if matches
54
58
  puts base_f
55
59
  else
56
- $stderr.puts "SKIPPING #{base_f}"
60
+ $stderr.puts "SKIPPING #{base_f}" if opts.veryverbose
57
61
  end
58
62
  end
59
63
  end
@@ -147,19 +151,26 @@ add_subcmd(:env) { |*args|
147
151
  IO.popen(['claude', '-p'], 'w') { |io| io.write(prompt) }
148
152
  }
149
153
 
154
+ add_subcmd(:all) { |*args|
155
+ opts = tool_opts.parse(args)
156
+ glob_path('agents/*.md', '.md', opts: opts)
157
+ glob_path('commands/*.md', '.md', opts: opts)
158
+ glob_path('skills/*/', opts: opts)
159
+ }
160
+
150
161
  add_subcmd(:agents) { |*args|
151
162
  opts = tool_opts.parse(args)
152
- glob_path('agents/*.md', '.md', filters: opts.args, fulltext: opts.full)
163
+ glob_path('agents/*.md', '.md', opts: opts)
153
164
  }
154
165
 
155
166
  add_subcmd(:commands) { |*args|
156
167
  opts = tool_opts.parse(args)
157
- glob_path('commands/*.md', '.md', filters: opts.args, fulltext: opts.full)
168
+ glob_path('commands/*.md', '.md', opts: opts)
158
169
  }
159
170
 
160
171
  add_subcmd(:skills) { |*args|
161
172
  opts = tool_opts.parse(args)
162
- glob_path('skills/*/', filters: opts.args, fulltext: opts.full)
173
+ glob_path('skills/*/', opts: opts)
163
174
  }
164
175
 
165
176
  add_subcmd(:new) { |*args|
data/exe/h CHANGED
@@ -165,6 +165,59 @@ Hiiro.run(*ARGV, cwd: Dir.pwd, tasks: true) do
165
165
  Hiiro::AppFiles.build_hiiro(this, af, environment: environment).run
166
166
  end
167
167
 
168
+ add_subcmd(:check_version) do |*args|
169
+ opts = Hiiro::Options.setup {
170
+ flag(:all, short: :a, desc: 'Check all rbenv versions')
171
+ }.parse!(args)
172
+
173
+ expected = opts.args.first
174
+ versions = opts.all ? Hiiro::Rbenv.versions : [Hiiro::Rbenv.current_version]
175
+
176
+ mismatched = 0
177
+ versions.each do |ver|
178
+ output = Hiiro::Rbenv.capture('gem', 'list', 'hiiro', '--exact', version: ver)
179
+ actual = output.match(/hiiro \(([^)]+)\)/)&.captures&.first
180
+ ok = expected.nil? || actual == expected
181
+ mismatched += 1 unless ok
182
+ status = ok ? "\e[32m✓\e[0m" : "\e[31m✗\e[0m"
183
+ puts " #{status} ruby #{ver}: hiiro #{actual || '(not installed)'}"
184
+ end
185
+
186
+ exit(mismatched == 0 ? 0 : 1)
187
+ end
188
+
189
+ add_subcmd(:delayed_update) do |*args|
190
+ expected = args.first
191
+ unless expected
192
+ puts "Usage: h delayed_update <expected_version>"
193
+ next
194
+ end
195
+
196
+ script = <<~RUBY
197
+ #!/usr/bin/env ruby
198
+ expected = #{expected.inspect}
199
+ sleep 5
200
+ system('h', 'update', '-a')
201
+ versions = `rbenv versions --bare`.lines(chomp: true)
202
+ mismatched = versions.reject do |ver|
203
+ output = `RBENV_VERSION=\#{ver} rbenv exec gem list hiiro --exact 2>/dev/null`
204
+ output.match?(/hiiro \\(#{Regexp.escape(expected)}\\)/)
205
+ end
206
+ if mismatched.empty?
207
+ system('say', 'hiiro updated')
208
+ elsif mismatched.size == versions.size
209
+ system('say', 'no versions updated')
210
+ else
211
+ system('say', "\#{mismatched.size} version\#{mismatched.size == 1 ? '' : 's'} not updated")
212
+ end
213
+ RUBY
214
+
215
+ path = "/tmp/h-delayed-update-#{$$}.rb"
216
+ File.write(path, script)
217
+ FileUtils.chmod(0755, path)
218
+ system('h', 'bg', 'run', path)
219
+ end
220
+
168
221
  add_subcmd(:rnext) do |*args|
169
222
  system('git', 'rnext', *args)
170
223
  end
data/lib/hiiro/tasks.rb CHANGED
@@ -139,7 +139,7 @@ class Hiiro
139
139
 
140
140
  Dir.chdir(base_dir)
141
141
  # Create the session detached first so colors are applied before the user attaches
142
- unless system('tmux', 'has-session', '-t', session_name, err: File::NULL)
142
+ unless system('tmux', 'has-session', '-t', "=#{session_name}", err: File::NULL)
143
143
  system('tmux', 'new-session', '-d', '-s', session_name, '-c', Dir.pwd)
144
144
  end
145
145
  Hiiro::TaskColors.apply(session_name, color_index)
@@ -158,7 +158,7 @@ class Hiiro
158
158
  tree_path = tree ? tree.path : File.join(Hiiro::WORK_DIR, task.tree_name)
159
159
 
160
160
  session_name = task.session_name
161
- session_exists = system('tmux', 'has-session', '-t', session_name, err: File::NULL)
161
+ session_exists = system('tmux', 'has-session', '-t', "=#{session_name}", err: File::NULL)
162
162
 
163
163
  if session_exists
164
164
  session = environment.find_session(session_name)
@@ -178,7 +178,7 @@ class Hiiro
178
178
  if Dir.exist?(base_dir)
179
179
  Dir.chdir(base_dir)
180
180
  # Create detached first so colors are applied before the user attaches
181
- unless system('tmux', 'has-session', '-t', session_name, err: File::NULL)
181
+ unless system('tmux', 'has-session', '-t', "=#{session_name}", err: File::NULL)
182
182
  system('tmux', 'new-session', '-d', '-s', session_name, '-c', Dir.pwd)
183
183
  end
184
184
  Hiiro::TaskColors.apply(session_name, task.color_index) if task.color_index
@@ -1480,7 +1480,7 @@ class Hiiro
1480
1480
 
1481
1481
  def find_session(abbreviated)
1482
1482
  return nil if abbreviated.nil?
1483
- session_matcher.find(abbreviated).first&.item
1483
+ session_matcher.find(abbreviated).resolved&.item
1484
1484
  end
1485
1485
 
1486
1486
  def find_app(abbreviated)
@@ -74,14 +74,14 @@ class Hiiro
74
74
 
75
75
  def select
76
76
  if ENV['TMUX']
77
- system('tmux', 'switch-client', '-t', name)
77
+ system('tmux', 'switch-client', '-t', "=#{name}")
78
78
  else
79
- system('tmux', 'attach-session', '-t', name)
79
+ system('tmux', 'attach-session', '-t', "=#{name}")
80
80
  end
81
81
  end
82
82
 
83
83
  def attach
84
- system('tmux', 'attach-session', '-t', name)
84
+ system('tmux', 'attach-session', '-t', "=#{name}")
85
85
  end
86
86
 
87
87
  def detach
data/lib/hiiro/tmux.rb CHANGED
@@ -108,7 +108,11 @@ class Hiiro
108
108
  def find_session(name)
109
109
  normalized = name.to_s.tr('.', '_')
110
110
  sessions.find { |s| s.name == normalized } ||
111
- Matcher.by_prefix(sessions.map(&:name), normalized)&.resolved&.then { |m| sessions.find { |s| s.name == m.item } }
111
+ Matcher.by_prefix(sessions.map(&:name), normalized)&.resolved&.then do |m|
112
+ # Don't cross path boundaries: 'oncall' must not match 'oncall/posoi'
113
+ next nil if m.item.length > normalized.length && m.item[normalized.length] == '/'
114
+ sessions.find { |s| s.name == m.item }
115
+ end
112
116
  end
113
117
 
114
118
  def session_exists?(name)
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.300"
2
+ VERSION = "0.1.301"
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.300
4
+ version: 0.1.301
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota