hiiro 0.1.390 → 0.1.391

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: e9c16c581ea6c758abd518a2f706d980cd7e7d4f2c0efad6fb8f99de4ba8fcdb
4
- data.tar.gz: 85fbe331a3e3ddf3fd36adfb3864d5f4d131a17714be759a65eaf79940f423ce
3
+ metadata.gz: 9c562c5f430e154b0d7c2d177077dd4350323160eea9f0578c58e8e4c9fa0967
4
+ data.tar.gz: e3bd6d848935c9e31d4b32a3ad4701b063952d064d5d59ab17ea2a4dba749c6f
5
5
  SHA512:
6
- metadata.gz: ab5e23b6ebe2c5e0fbfb17000ce471c965efc3988777e346d15bbaeb54d1bc3ca1479f0ed21c98a52a0f959d1066f6c0c936a665e71ba29d3132c6f64c70062d
7
- data.tar.gz: eb6a4353ae61c553c5f1cf524e18548161ff201a465cdf682ea04e897028b6b7df56ce356fd57259ddc7fd3951370b8ad65691453bbf6995c25a68869af2159b
6
+ metadata.gz: 9b58f7c8c8aab4f69c4f5019a849693697c7f85fbd7487c756573cbedd5f7c330891b5751910fdc39917e50dc1cd3d96e0cdce917ad968bd52ed1107d97f73ea
7
+ data.tar.gz: 672103c549e704a81680a3998be922d310445a5fe6109be7120e9eef54dedf21b8c158c9e12beebc582a068fbd0841b5e92ebcc6f6d793f2e689b63b4e4c45c3
data/CHANGELOG.md CHANGED
@@ -18,6 +18,9 @@
18
18
 
19
19
  ## Unreleased
20
20
 
21
+ ### Fixed
22
+ - Fix `PsProcess::Snapshot.capture` constant lookup, which raised `NameError` in `h ps byport`, `h ps indir`, and parent/child process lookups.
23
+
21
24
  ### Added
22
25
  - `h herdr` and `hh` pane controls for Vim-style focus, two-pane reflow, resize, swap, and zoom
23
26
  - `prefix+shift+h/j/k/l` reflows a two-pane tab toward an edge; `prefix+alt+h/j/k/l` resizes the current pane
data/README.md CHANGED
@@ -59,6 +59,13 @@ h ping
59
59
  # => pong
60
60
  ```
61
61
 
62
+ ### Find processes by port
63
+
64
+ `h ps byport 4399` prints each matching process PID and working directory,
65
+ separated by a tab. Pass multiple ports with `h ps byport 4399 3000`.
66
+ If no processes match, it prints `No processes found on port(s): 4399`.
67
+ This command requires `ps` and `lsof`.
68
+
62
69
  ### Save clipboard content
63
70
 
64
71
  `h save` saves whatever is on the macOS clipboard to `~/saved/` and prints the
data/bin/h-tuios ADDED
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'hiiro'
5
+
6
+ if $PROGRAM_NAME == __FILE__
7
+ begin
8
+ Hiiro.run(*ARGV, external_commands: false) do
9
+ add_flag :dry_run, desc: 'Preview changes without writing files or installing hooks'
10
+ add_flag :remove, desc: 'Remove the managed project instruction block'
11
+ add_default { puts Hiiro::Tuios::USAGE }
12
+ add_cmd(:gfy) { puts tuios.class }
13
+ add_cmd(:help) { puts Hiiro::Tuios::USAGE; help }
14
+ add_cmd(:setup, args: ['HARNESS...'], opts: [:dry_run]) do
15
+ tuios.apply(tuios.plan(opts.args, skills: true, rules: true), dry_run: opts.dry_run)
16
+ tuios.install_integrations(opts.args, dry_run: opts.dry_run)
17
+ end
18
+ add_cmd(:'skills-install', :'skills-refresh', args: ['HARNESS...'], opts: [:dry_run]) do
19
+ tuios.apply(tuios.plan(opts.args, skills: true), dry_run: opts.dry_run)
20
+ end
21
+ add_cmd(:'bootstrap-project', args: ['DIRECTORY'], opts: [:dry_run, :remove]) do
22
+ raise Hiiro::Error, 'Use bootstrap-project DIRECTORY [--remove]' unless opts.args.length == 1 && File.directory?(File.expand_path(opts.args.first))
23
+ path = File.join(File.expand_path(opts.args.first), 'AGENTS.md')
24
+ _, text = tuios.rule_text(path, remove: opts.remove)
25
+ changes = opts.remove && !File.exist?(path) ? [] : [tuios.file_plan(path, text, backup: true)].compact
26
+ tuios.apply(changes, dry_run: opts.dry_run)
27
+ end
28
+ add_cmd(:'bootstrap-install', args: ['HARNESS...'], opts: [:dry_run]) do
29
+ tuios.apply(tuios.plan(opts.args, rules: true), dry_run: opts.dry_run)
30
+ end
31
+ add_cmd(:'bootstrap-remove', args: ['HARNESS...'], opts: [:dry_run]) do
32
+ tuios.apply(tuios.plan(opts.args, rules: true, remove: true), dry_run: opts.dry_run)
33
+ end
34
+ add_cmd(:uninstall, args: ['HARNESS...'], opts: [:dry_run]) do
35
+ tuios.apply(tuios.plan(opts.args, skills: true, rules: true, remove: true), dry_run: opts.dry_run)
36
+ end
37
+ add_cmd(:'integrations-install', args: ['ID...'], opts: [:dry_run]) { tuios.install_integrations(opts.args, dry_run: opts.dry_run) }
38
+ add_cmd(:'integrations-status') { tuios.native('integration', 'status', '--command', tuios.hook_command) }
39
+ add_cmd(:targets) do
40
+ tuios.targets(Hiiro::Tuios::TARGETS.keys).each { |t| puts "#{t[:name]}\n skill: #{t[:skill]}\n startup: #{t[:instruction] || '(manual; no verified global file)'}" }
41
+ end
42
+ add_cmd(:start) do
43
+ raise Hiiro::Error, 'Use start without arguments' unless opts.args.empty?
44
+ tuios.server(:start)
45
+ end
46
+ add_cmd(:stop) do
47
+ raise Hiiro::Error, 'Use stop without arguments' unless opts.args.empty?
48
+ tuios.server(:stop)
49
+ end
50
+ add_cmd(:status) do
51
+ raise Hiiro::Error, 'Use status without arguments; use setup-status [HARNESS...] for setup checks' unless opts.args.empty?
52
+ exit(tuios.server(:status) ? 0 : 1)
53
+ end
54
+ add_cmd(:'setup-status', args: ['HARNESS...']) { tuios.show_status(opts.args) }
55
+ add_cmd(:doctor, args: ['agents|shell?']) do
56
+ raise Hiiro::Error, 'Use doctor agents or doctor shell' unless opts.args.empty? || (opts.args.length == 1 && %w[agents shell].include?(opts.args.first))
57
+ tuios.native('doctor', opts.args.first || 'agents')
58
+ end
59
+ add_cmd(:config) { tuios.native('config', 'path') }
60
+ add_cmd(:hooks) { tuios.native('list-hooks', '--json') }
61
+ add_cmd(:skill, args: ['TOPIC?']) do
62
+ raise Hiiro::Error, 'Use skill [TOPIC]' if opts.args.length > 1
63
+ tuios.native('--skill', *opts.args)
64
+ end
65
+ add_cmd(:instructions) { puts Hiiro::Tuios::INSTRUCTIONS }
66
+ add_cmd(:env) { puts JSON.pretty_generate(tuios.pane) }
67
+ add_cmd(:bootstrap) do
68
+ next unless ENV['TUIOS_ENV'] == '1'
69
+ tuios.require_pane!
70
+ puts JSON.pretty_generate(tuios.pane)
71
+ puts Hiiro::Tuios::INSTRUCTIONS
72
+ tuios.native('--skill')
73
+ tuios.native('--skill', 'mail')
74
+ end
75
+ add_cmd(:mail) do
76
+ tuios.require_pane!
77
+ tuios.native('read-agent-messages', '-s', ENV.fetch('TUIOS_SESSION'), '-w', ENV.fetch('TUIOS_PANE_ID'), '--unread')
78
+ end
79
+ end
80
+ rescue Hiiro::Error, SystemCallError, JSON::ParserError => e
81
+ warn e.message
82
+ exit 1
83
+ end
84
+ end
@@ -42,7 +42,7 @@ class Hiiro::PsProcess
42
42
  # One `ps awwux` capture; every question below reads the same table.
43
43
  class Snapshot
44
44
  def self.capture
45
- new(PsProcess.all, captured_at: Time.now)
45
+ new(Hiiro::PsProcess.all, captured_at: Time.now)
46
46
  end
47
47
 
48
48
  attr_reader :processes, :captured_at
data/lib/hiiro/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  class Hiiro
2
- VERSION = "0.1.390"
2
+ VERSION = "0.1.391"
3
3
  SUPPORTED_RUBY_VERSION = ">= 3.2.0"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiiro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.390
4
+ version: 0.1.391
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-10-07 00:00:00.000000000 Z
11
+ date: 2026-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -213,6 +213,7 @@ files:
213
213
  - bin/h-time
214
214
  - bin/h-title
215
215
  - bin/h-todo
216
+ - bin/h-tuios
216
217
  - bin/h-uri
217
218
  - bin/h-video
218
219
  - bin/h-vim