hiiro 0.1.328 → 0.1.329

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: 5679acf6319a905ff51f797d7eaf1468a54d1ddf2f888b6c54d290c1a00320ac
4
- data.tar.gz: 4da3a5fc611b5904d22ba3d1233185ed133d985583422d85a5846827a333c346
3
+ metadata.gz: ce33faf6b6ae9336261306ee5acfc67c08d7d5c4fce1afece0f47c73e70b0ad2
4
+ data.tar.gz: e0c80827fdf14dca1668cb9db7ade84d8ae2eaac6f03b9aab1dddc968769c906
5
5
  SHA512:
6
- metadata.gz: ec87bdeeb6697c9e82d938219dccccb035575e1903ab2760d8e72fd8467b4779186ca9747cf1eeeee2e172facb796240a451f0c8a7ada6d6dfc51d3a30e72b23
7
- data.tar.gz: 5afcff09237311bcf77570dcfde910a57504edddd93fbbd493b70fcb9e647227e986e554e0e5fc3527ee3dceeb5e270e1d7cdfea2f3aa77679fc02600cba848d
6
+ metadata.gz: 6e07ce5b25a90d86fe5e30e05c220f4ea7b4d6e798ff52ec4019ccf00b60ac67729e86bcbdbf6ce5d3eb65d314837b0a2582137bdf2f98d9c17eca2bf3103c5f
7
+ data.tar.gz: b3110bcd79265fba7dd978ff976366f83998f7c276b0e9f95dccbdc3d06def05f56377d765bf0897abef22051ec60da9beb391b35ddc9a5f1621c0421af8a8f4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.329] - 2026-04-03
4
+
5
+ ### Changed
6
+ - Add debug output and temporary JSON logging to publish script for troubleshooting Claude API responses
7
+
3
8
  ## [0.1.328] - 2026-04-02
4
9
 
5
10
  ### Changed
@@ -319,4 +324,4 @@
319
324
  ## [0.1.295]
320
325
 
321
326
  ### Changed
322
- - Filter logic changes for PR management
327
+ - Filter logic changes for PR management
data/bin/h-app CHANGED
@@ -1,20 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'yaml'
4
3
  require 'pathname'
5
4
  require 'hiiro'
6
5
 
7
6
  APPS_FILE = File.join(Dir.home, '.config', 'hiiro', 'apps.yml')
8
7
 
9
- def load_apps
10
- return {} unless File.exist?(APPS_FILE)
11
- YAML.safe_load_file(APPS_FILE) || {}
12
- end
13
-
14
- def save_apps(apps)
15
- File.write(APPS_FILE, apps.to_yaml)
16
- end
17
-
18
8
  def task_root
19
9
  # Fall back to current task's tree path if not in a git repo
20
10
  env = Environment.current rescue nil
@@ -148,16 +138,14 @@ Hiiro.run(*ARGV) {
148
138
  next
149
139
  end
150
140
 
151
- apps = load_apps
152
-
153
- if apps.key?(app_name)
154
- puts "App '#{app_name}' already exists with path: #{apps[app_name]}"
141
+ existing = Hiiro::AppRecord.find_by_name(app_name)
142
+ if existing
143
+ puts "App '#{app_name}' already exists with path: #{existing.path}"
155
144
  puts "Remove it first with: h app rm #{app_name}"
156
145
  next
157
146
  end
158
147
 
159
- apps[app_name] = relative_path
160
- save_apps(apps)
148
+ Hiiro::AppRecord.create(name: app_name, path: relative_path)
161
149
  puts "Added app '#{app_name}' => #{relative_path}"
162
150
  }
163
151
 
@@ -167,19 +155,17 @@ Hiiro.run(*ARGV) {
167
155
  next
168
156
  end
169
157
 
170
- apps = load_apps
171
-
172
- unless apps.key?(app_name)
158
+ record = Hiiro::AppRecord.find_by_name(app_name)
159
+ unless record
173
160
  puts "App '#{app_name}' not found"
174
161
  puts
175
162
  puts "Available apps:"
176
- apps.each { |name, path| puts format(" %-20s => %s", name, path) }
163
+ Hiiro::AppRecord.all.each { |a| puts format(" %-20s => %s", a.name, a.path) }
177
164
  next
178
165
  end
179
166
 
180
- removed_path = apps.delete(app_name)
181
- save_apps(apps)
182
- puts "Removed app '#{app_name}' (was: #{removed_path})"
167
+ record.destroy
168
+ puts "Removed app '#{app_name}' (was: #{record.path})"
183
169
  }
184
170
 
185
171
  add_subcmd(:remove) { |app_name=nil|
@@ -188,19 +174,17 @@ Hiiro.run(*ARGV) {
188
174
  next
189
175
  end
190
176
 
191
- apps = load_apps
192
-
193
- unless apps.key?(app_name)
177
+ record = Hiiro::AppRecord.find_by_name(app_name)
178
+ unless record
194
179
  puts "App '#{app_name}' not found"
195
180
  puts
196
181
  puts "Available apps:"
197
- apps.each { |name, path| puts format(" %-20s => %s", name, path) }
182
+ Hiiro::AppRecord.all.each { |a| puts format(" %-20s => %s", a.name, a.path) }
198
183
  next
199
184
  end
200
185
 
201
- removed_path = apps.delete(app_name)
202
- save_apps(apps)
203
- puts "Removed app '#{app_name}' (was: #{removed_path})"
186
+ record.destroy
187
+ puts "Removed app '#{app_name}' (was: #{record.path})"
204
188
  }
205
189
 
206
190
  add_subcmd(:fd) { |app_name=nil, *args|
data/docs/h-app.md CHANGED
@@ -1,85 +0,0 @@
1
- # h-app
2
-
3
- Manage named application subdirectories within a git repo, with shortcuts to cd, search, and run tools scoped to each app.
4
-
5
- ## Usage
6
-
7
- ```
8
- h app <subcommand> [args]
9
- ```
10
-
11
- ## Subcommands
12
-
13
- ### `config`
14
-
15
- Open `~/.config/hiiro/apps.yml` in your editor.
16
-
17
- ### `cd` [alias: none]
18
-
19
- Send a `cd` command to the current tmux pane to switch into an app directory (or the repo root if no name given).
20
-
21
- **Args:** `[app_name]`
22
-
23
- ### `ls`
24
-
25
- List all configured apps and their relative paths from the repo root.
26
-
27
- ### `path`
28
-
29
- Print the relative path from the current directory to the app (or repo root).
30
-
31
- **Args:** `[app_name]`
32
-
33
- ### `abspath`
34
-
35
- Print the absolute filesystem path of the app directory (or repo root).
36
-
37
- **Args:** `[app_name]`
38
-
39
- ### `add`
40
-
41
- Register a new app name with a path relative to the repo root.
42
-
43
- **Args:** `<app_name>` `<relative_path>`
44
-
45
- ### `rm` [alias: `remove`]
46
-
47
- Remove a registered app by name.
48
-
49
- **Args:** `<app_name>`
50
-
51
- ### `fd`
52
-
53
- Run `fd` inside the named app's directory, passing all extra arguments to `fd`.
54
-
55
- **Args:** `<app_name>` `[fd_args...]`
56
-
57
- ### `rg`
58
-
59
- Run `rg` (ripgrep) inside the named app's directory.
60
-
61
- **Args:** `<app_name>` `[rg_args...]`
62
-
63
- ### `vim`
64
-
65
- Open vim inside the named app's directory.
66
-
67
- **Args:** `<app_name>` `[vim_args...]`
68
-
69
- ### `sh`
70
-
71
- Open a shell (or run a command) inside the named app's directory.
72
-
73
- **Args:** `<app_name>` `[cmd...]`
74
-
75
- ### `service`
76
-
77
- Delegate to `Hiiro::ServiceManager` subcommands scoped to the current app context. See `h service` for subcommand details.
78
-
79
- ### `run`
80
-
81
- Delegate to `Hiiro::RunnerTool` subcommands. See `h run` for subcommand details.
82
-
83
- ### `file`
84
-
85
- Delegate to `Hiiro::AppFiles` subcommands. See `h file` for subcommand details.
data/docs/h-bg.md CHANGED
@@ -1,33 +0,0 @@
1
- # h-bg
2
-
3
- Run commands in background tmux windows with history tracking.
4
-
5
- ## Usage
6
-
7
- ```
8
- h bg <subcommand> [args]
9
- ```
10
-
11
- ## Subcommands
12
-
13
- ### `popup`
14
-
15
- Open your `$EDITOR` with recent command history as comments, then run whatever you type in a background tmux window. History is stored in `~/.config/hiiro/bg-history.txt` (max 50 entries).
16
-
17
- ### `run`
18
-
19
- Run a command immediately in a new background tmux window.
20
-
21
- **Args:** `<cmd...>`
22
-
23
- ### `attach` [alias: `a`]
24
-
25
- Switch the current tmux client to the background session.
26
-
27
- ### `history` [alias: `hist`]
28
-
29
- Print the recent background command history (up to 50 entries), newest last.
30
-
31
- ### `setup`
32
-
33
- Print the tmux.conf line needed to bind `prefix + b` to open the popup. Does not modify any config files automatically.
data/docs/h-bin.md CHANGED
@@ -1,23 +0,0 @@
1
- # h-bin
2
-
3
- List and edit hiiro bin scripts (`h-*` executables found in PATH).
4
-
5
- ## Usage
6
-
7
- ```
8
- h bin <subcommand> [filters...]
9
- ```
10
-
11
- ## Subcommands
12
-
13
- ### `list`
14
-
15
- Print the paths of all `h-*` executables found in PATH. Optionally filter by name patterns; each pattern is matched as `h-<pattern>` or `<pattern>`.
16
-
17
- **Args:** `[subcmd_name...]`
18
-
19
- ### `edit`
20
-
21
- Open matching `h-*` executables in your editor. Patterns work the same as `list`.
22
-
23
- **Args:** `[subcmd_name...]`
data/docs/h-branch.md CHANGED
@@ -1,253 +0,0 @@
1
- # h-branch
2
-
3
- Manage, tag, search, and inspect git branches with task and PR associations stored in SQLite.
4
-
5
- ## Usage
6
-
7
- ```
8
- h branch <subcommand> [options] [args]
9
- ```
10
-
11
- ## Subcommands
12
-
13
- ### `save`
14
-
15
- Save the current (or named) branch to the branch store with current task, worktree, and tmux context.
16
-
17
- **Args:** `[branch_name]`
18
-
19
- **Options:**
20
- | Flag | Short | Description | Default |
21
- |---|---|---|---|
22
- | `--tag` | `-t` | Tag to apply (repeatable) | — |
23
-
24
- ### `saved`
25
-
26
- List saved branches, with optional filter string.
27
-
28
- **Args:** `[filter]`
29
-
30
- ### `current`
31
-
32
- Print the current git branch name.
33
-
34
- ### `info`
35
-
36
- Show detailed info about the current branch: SHA, task, worktree, tmux context, ahead/behind vs main, associated PR, and note.
37
-
38
- ### `ls`
39
-
40
- List branches (saved by default, or all local with `-a`).
41
-
42
- **Options:**
43
- | Flag | Short | Description | Default |
44
- |---|---|---|---|
45
- | `--tag` | `-t` | Filter by tag (OR when multiple, repeatable) | — |
46
- | `--all` | `-a` | Show all local branches instead of just saved | false |
47
-
48
- ### `search`
49
-
50
- Search saved (or all) branches by name or tag substring.
51
-
52
- **Args:** `<term> [term2...]`
53
-
54
- **Options:**
55
- | Flag | Short | Description | Default |
56
- |---|---|---|---|
57
- | `--all` | `-a` | Search all local branches | false |
58
-
59
- ### `tag`
60
-
61
- Add tags to a branch. With `-e`, opens a YAML editor for bulk tagging.
62
-
63
- **Args:** `[branch] <tag> [tag2...]`
64
-
65
- **Options:**
66
- | Flag | Short | Description | Default |
67
- |---|---|---|---|
68
- | `--edit` | `-e` | Open YAML editor for bulk tagging | false |
69
-
70
- ### `untag`
71
-
72
- Remove one or more tags from a branch, or clear all tags if none specified.
73
-
74
- **Args:** `[branch] [tag...]`
75
-
76
- ### `tags`
77
-
78
- Show all tagged branches grouped by tag.
79
-
80
- ### `select`
81
-
82
- Fuzzy-select a branch name from saved (or all) branches and print it.
83
-
84
- **Options:**
85
- | Flag | Short | Description | Default |
86
- |---|---|---|---|
87
- | `--all` | `-a` | Select from all local branches | false |
88
-
89
- ### `copy`
90
-
91
- Fuzzy-select a branch and copy its name to clipboard.
92
-
93
- **Options:**
94
- | Flag | Short | Description | Default |
95
- |---|---|---|---|
96
- | `--all` | `-a` | Select from all local branches | false |
97
-
98
- ### `co` [alias: `checkout`]
99
-
100
- Checkout a branch, fuzzy-selecting if no name given.
101
-
102
- **Args:** `[branch]`
103
-
104
- **Options:**
105
- | Flag | Short | Description | Default |
106
- |---|---|---|---|
107
- | `--all` | `-a` | Select from all local branches | false |
108
-
109
- ### `rm` [alias: `remove`]
110
-
111
- Delete a branch (`git branch -d`), fuzzy-selecting if no name given.
112
-
113
- **Args:** `[branch]`
114
-
115
- **Options:**
116
- | Flag | Short | Description | Default |
117
- |---|---|---|---|
118
- | `--all` | `-a` | Select from all local branches | false |
119
-
120
- ### `rename`
121
-
122
- Rename a branch locally and on the remote, then update the saved record.
123
-
124
- **Args:** `<new_name> [old_name]`
125
-
126
- ### `status`
127
-
128
- Show ahead/behind counts and associated PR state for each branch.
129
-
130
- **Options:**
131
- | Flag | Short | Description | Default |
132
- |---|---|---|---|
133
- | `--all` | `-a` | Show all local branches | false |
134
-
135
- ### `merged`
136
-
137
- List branches that have been merged into main/master.
138
-
139
- **Options:**
140
- | Flag | Short | Description | Default |
141
- |---|---|---|---|
142
- | `--all` | `-a` | Show all merged branches, not just saved | false |
143
-
144
- ### `clean`
145
-
146
- Interactively delete merged branches. With `-f`, delete all without prompting.
147
-
148
- **Options:**
149
- | Flag | Short | Description | Default |
150
- |---|---|---|---|
151
- | `--all` | `-a` | Include all merged branches | false |
152
- | `--force` | `-f` | Delete all without confirmation | false |
153
-
154
- ### `recent`
155
-
156
- Show the N most recently visited branches from reflog.
157
-
158
- **Args:** `[n]` (default: 10)
159
-
160
- ### `note`
161
-
162
- Get or set a freeform note on a branch.
163
-
164
- **Args:** `[text...]`
165
-
166
- **Options:**
167
- | Flag | Short | Description | Default |
168
- |---|---|---|---|
169
- | `--clear` | — | Clear the note | false |
170
-
171
- ### `for-task`
172
-
173
- List saved branches associated with a given task name (or current task).
174
-
175
- **Args:** `[task_name]`
176
-
177
- ### `for-pr` [alias: `pr`]
178
-
179
- Print the head branch name for a tracked PR (fuzzy-select if no arg).
180
-
181
- **Args:** `[pr_number_or_url]`
182
-
183
- ### `duplicate`
184
-
185
- Create a new branch as a copy of the current (or specified) branch.
186
-
187
- **Args:** `<new_name> [source_branch]`
188
-
189
- ### `push`
190
-
191
- Push a branch to a remote with optional force and upstream tracking.
192
-
193
- **Options:**
194
- | Flag | Short | Description | Default |
195
- |---|---|---|---|
196
- | `--remote` | `-r` | Remote name | `origin` |
197
- | `--from` | `-f` | Local branch or commit | current branch |
198
- | `--to` | `-t` | Remote branch name | same as from |
199
- | `--force` | `-F` | Force push | false |
200
- | `--set-upstream` | `-u` | Set upstream tracking | false |
201
-
202
- ### `diff`
203
-
204
- Show commit log between two refs (defaults to `main..HEAD`).
205
-
206
- **Args:** `[from] [to]`
207
-
208
- ### `changed`
209
-
210
- List files changed between the current branch and its upstream fork point.
211
-
212
- **Args:** `[upstream]`
213
-
214
- ### `ahead`
215
-
216
- Show how many commits the branch is ahead of a base.
217
-
218
- **Args:** `[base] [branch]`
219
-
220
- ### `behind`
221
-
222
- Show how many commits the branch is behind a base.
223
-
224
- **Args:** `[base] [branch]`
225
-
226
- ### `log`
227
-
228
- Show the commit log for changes since the upstream fork point.
229
-
230
- **Args:** `[upstream]`
231
-
232
- ### `q` [alias: `query`]
233
-
234
- Query the branches SQLite table directly. Pass a table name, `key=value` filters, or raw SQL.
235
-
236
- **Args:** `[table|sql|key=value...]`
237
-
238
- **Options:**
239
- | Flag | Short | Description | Default |
240
- |---|---|---|---|
241
- | `--all` | `-a` | Show all rows (no 50-row limit) | false |
242
-
243
- ### `forkpoint`
244
-
245
- Print the merge-base SHA between the current branch and an upstream.
246
-
247
- **Args:** `[upstream] [branch]`
248
-
249
- ### `ancestor`
250
-
251
- Check whether one ref is an ancestor of another.
252
-
253
- **Args:** `[ancestor] [descendant]`
data/docs/h-buffer.md CHANGED
@@ -1,73 +0,0 @@
1
- # h-buffer
2
-
3
- Manage tmux paste buffers — list, show, copy to clipboard, save, load, paste, and delete.
4
-
5
- ## Usage
6
-
7
- ```
8
- h buffer <subcommand> [args]
9
- ```
10
-
11
- ## Subcommands
12
-
13
- ### `ls`
14
-
15
- List all tmux buffers. Extra args are passed directly to `tmux list-buffers`.
16
-
17
- **Args:** `[tmux_args...]`
18
-
19
- ### `show`
20
-
21
- Print the contents of a buffer (fuzzy-select if no name given).
22
-
23
- **Args:** `[buffer_name] [tmux_args...]`
24
-
25
- ### `copy`
26
-
27
- Copy a buffer's contents to the macOS clipboard via `pbcopy` (fuzzy-select if no name).
28
-
29
- **Args:** `[buffer_name]`
30
-
31
- ### `save`
32
-
33
- Save a buffer's contents to a file (fuzzy-select buffer if name not given).
34
-
35
- **Args:** `<path> [buffer_name] [tmux_args...]`
36
-
37
- ### `load`
38
-
39
- Load a file into the tmux buffer stack.
40
-
41
- **Args:** `<path> [tmux_args...]`
42
-
43
- ### `set`
44
-
45
- Set buffer contents; all args passed directly to `tmux set-buffer`.
46
-
47
- **Args:** `[tmux_args...]`
48
-
49
- ### `paste`
50
-
51
- Paste a buffer into the current pane.
52
-
53
- **Args:** `[buffer_name] [tmux_args...]`
54
-
55
- ### `delete`
56
-
57
- Delete a buffer (fuzzy-select if no name given).
58
-
59
- **Args:** `[buffer_name]`
60
-
61
- ### `choose`
62
-
63
- Open the tmux buffer chooser UI.
64
-
65
- **Args:** `[tmux_args...]`
66
-
67
- ### `clear`
68
-
69
- Delete all tmux buffers.
70
-
71
- ### `select`
72
-
73
- Fuzzy-select a buffer name and print it.
data/docs/h-claude.md CHANGED
@@ -1,100 +0,0 @@
1
- # h-claude
2
-
3
- Launch Claude Code sessions in tmux splits/windows, search `.claude` directories, and run inline prompts.
4
-
5
- ## Usage
6
-
7
- ```
8
- h claude <subcommand> [options] [args]
9
- ```
10
-
11
- ## Global Options
12
-
13
- These flags apply to `split`, `vsplit`, `hsplit`, and `window` subcommands:
14
-
15
- | Flag | Short | Description | Default |
16
- |---|---|---|---|
17
- | `--danger` | `-d` | Pass `--dangerously-skip-permissions` | false |
18
- | `--horizontal` | `-h` | Split horizontally instead of vertically | false |
19
- | `--percent` | `-p` | Interpret size as a percentage | false |
20
- | `--bottom` | `-b` | Place new pane at the bottom | false |
21
- | `--left` | `-l` | Place new pane on the left | false |
22
- | `--ignore` | `-i` | Use fire-and-forget mode (`claude -p`, window closes when done) | false |
23
- | `--size` | `-s` | Pane size | `40` |
24
-
25
- ## Subcommands
26
-
27
- ### `split`
28
-
29
- Split the current tmux pane and start a Claude session in the new pane.
30
-
31
- **Args:** `[args passed to claude...]`
32
-
33
- ### `vsplit`
34
-
35
- Create a vertical split and start Claude.
36
-
37
- **Args:** `[args passed to claude...]`
38
-
39
- ### `hsplit`
40
-
41
- Create a horizontal split and start Claude.
42
-
43
- **Args:** `[args passed to claude...]`
44
-
45
- ### `window`
46
-
47
- Open a new tmux window and start Claude.
48
-
49
- **Args:** `[args passed to claude...]`
50
-
51
- ### `inline`
52
-
53
- Send a prompt directly to `claude -p` and print the response. Reads from stdin, positional args, or opens your editor if neither is provided.
54
-
55
- **Args:** `[prompt...]`
56
-
57
- ### `new`
58
-
59
- Open your editor to write a prompt, then exec `claude` with it as the initial message.
60
-
61
- ### `loop`
62
-
63
- Interactive prompt loop: open editor, send to `claude -p`, display response, repeat. Leave the editor empty to exit.
64
-
65
- ### `all`
66
-
67
- List all agents, commands, and skills found in `.claude` directories walking up from `$PWD`.
68
-
69
- **Options (tool flags):**
70
- | Flag | Short | Description | Default |
71
- |---|---|---|---|
72
- | `--full` | `-f` | Full-text search (grep) rather than name match | false |
73
- | `--verbose` | `-v` | Show `.claude` dir paths on stderr | false |
74
- | `--veryverbose` | `-V` | Show all stderr debug output | false |
75
-
76
- **Args:** `[filter...]`
77
-
78
- ### `agents`
79
-
80
- List agents from `.claude/agents/` directories.
81
-
82
- **Args:** `[filter...]`
83
-
84
- ### `commands`
85
-
86
- List commands from `.claude/commands/` directories.
87
-
88
- **Args:** `[filter...]`
89
-
90
- ### `skills`
91
-
92
- List skills from `.claude/skills/` directories.
93
-
94
- **Args:** `[filter...]`
95
-
96
- ### `vim`
97
-
98
- Open matching agents, commands, or skill SKILL.md files in vim.
99
-
100
- **Args:** `[filter...]`
data/docs/h-commit.md CHANGED
@@ -1,17 +0,0 @@
1
- # h-commit
2
-
3
- Fuzzy-select a git commit SHA from the recent log.
4
-
5
- ## Usage
6
-
7
- ```
8
- h commit <subcommand> [git-log-args]
9
- ```
10
-
11
- ## Subcommands
12
-
13
- ### `select` [alias: `sk`]
14
-
15
- Show the last 50 commits via `git log --oneline --decorate`, open them in `sk` for fuzzy selection, and print the selected SHA. Any extra args are forwarded to `git log`.
16
-
17
- **Args:** `[git_log_args...]`