hiiro 0.1.385 → 0.1.386
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 +4 -4
- data/bin/h-docs +38 -0
- data/bin/h-project +6 -8
- data/lib/hiiro/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e49b21100ebb8d4ee20820554cb0504edb5e9e6fd8be0c848faf8da83c4558b2
|
|
4
|
+
data.tar.gz: 10aeff7db98eace52ce321992a267c2105a860baed9ff05c4cd0c1c5a7637823
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 16c6f653f49b6ce613f4d8dd6b90ac4986bf0d9db26c65ff544d9b2c794b6826f78324f5d61f949bf7a1f46fdd741bcc5e8b66cd21ac7ce9c5f00b9be1522f0f
|
|
7
|
+
data.tar.gz: 8e868d65a2d88f71f16a93c79bebaafd00792d2a5567bfe33eab2f13e5c5e3e0b77a5ea25d01cf0c44512531fb8cb4023960690b4d60485f2bf8fc10e3acca82
|
data/bin/h-docs
CHANGED
|
@@ -8,6 +8,8 @@ require 'uri'
|
|
|
8
8
|
SERVER = ENV.fetch('HDOCS_SERVER', 'http://127.0.0.1:4387').sub(%r{/$}, '')
|
|
9
9
|
DOCS_DIR = File.join(Dir.home, 'claude', 'docs')
|
|
10
10
|
PROJECT_ROOT = ENV.fetch('PORTFOLIO_HOME', File.join(Dir.home, 'proj', 'portfolio'))
|
|
11
|
+
DESKTOP_DIR = File.join(PROJECT_ROOT, 'apps/desktop')
|
|
12
|
+
APP_PATH = File.join(DESKTOP_DIR, 'bin/desktop.app')
|
|
11
13
|
SERVICE_LABEL = "com.#{ENV.fetch('USER')}.portfolio"
|
|
12
14
|
SERVICE_DOMAIN = "gui/#{Process.uid}"
|
|
13
15
|
SERVICE_TARGET = "#{SERVICE_DOMAIN}/#{SERVICE_LABEL}"
|
|
@@ -45,6 +47,10 @@ class PortfolioApi
|
|
|
45
47
|
get('/health')
|
|
46
48
|
end
|
|
47
49
|
|
|
50
|
+
def ports
|
|
51
|
+
get('/api/ports')
|
|
52
|
+
end
|
|
53
|
+
|
|
48
54
|
def delete(id, files: false)
|
|
49
55
|
target = uri("/api/items/#{id}")
|
|
50
56
|
target.query = URI.encode_www_form(delete_files: 1) if files
|
|
@@ -188,6 +194,15 @@ Hiiro.run(*ARGV, plugins: [Pins]) {
|
|
|
188
194
|
matching_items(opts, limit: count).each { |item| puts item_label(item) }
|
|
189
195
|
}
|
|
190
196
|
|
|
197
|
+
add_subcmd(:make) { |*args|
|
|
198
|
+
Dir.chdir DESKTOP_DIR
|
|
199
|
+
system 'wails3', 'package'
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
add_subcmd(:run) { |*args|
|
|
203
|
+
system 'open', APP_PATH
|
|
204
|
+
}
|
|
205
|
+
|
|
191
206
|
add_subcmd(:open) { |*args|
|
|
192
207
|
opts = open_opts.parse(args)
|
|
193
208
|
if opts.args.empty? && !opts.html && !opts.md && !opts.all
|
|
@@ -245,4 +260,27 @@ Hiiro.run(*ARGV, plugins: [Pins]) {
|
|
|
245
260
|
add_subcmd(:path) { |*_args|
|
|
246
261
|
puts DOCS_DIR
|
|
247
262
|
}
|
|
263
|
+
|
|
264
|
+
add_subcmd(:ports) { |*args|
|
|
265
|
+
json = args.include?('--json')
|
|
266
|
+
snapshot = API.ports
|
|
267
|
+
if json
|
|
268
|
+
next puts JSON.pretty_generate(snapshot)
|
|
269
|
+
end
|
|
270
|
+
ports = snapshot.fetch('ports', [])
|
|
271
|
+
if ports.empty?
|
|
272
|
+
next puts('No TCP listeners found.')
|
|
273
|
+
end
|
|
274
|
+
puts format('%-7s %-15s %-18s %-10s %s', 'PORT', 'BIND', 'PROCESS', 'UPTIME', 'DIRECTORY / HERDR / AI')
|
|
275
|
+
ports.each do |port|
|
|
276
|
+
herdr = port['herdr']
|
|
277
|
+
ai = port['ai']
|
|
278
|
+
herdr_label = herdr ? "#{herdr['workspace_label'] || herdr['workspace_id']} #{herdr['pane_id']}#{herdr['match'] == 'cwd' ? ' ~' : ''}" : '-'
|
|
279
|
+
ai_label = ai&.fetch('session', nil) ? "#{ai['kind']} #{ai['session'][0, 8]}…" : (ai&.fetch('kind', nil) || '-')
|
|
280
|
+
uptime = port['elapsed'] && !port['elapsed'].empty? ? port['elapsed'] : '-'
|
|
281
|
+
puts format('%-7s %-15s %-18s %-10s %s', port['port'], port['host'], "#{port['command']}##{port['pid']}", uptime, port['cwd'].to_s)
|
|
282
|
+
puts " herdr: #{herdr_label} ai: #{ai_label}"
|
|
283
|
+
end
|
|
284
|
+
warn "herdr unavailable: #{snapshot.fetch('warnings', []).join('; ')}" if snapshot['herdr_available'] == false
|
|
285
|
+
}
|
|
248
286
|
}
|
data/bin/h-project
CHANGED
|
@@ -15,15 +15,13 @@ Hiiro.run(*ARGV) do
|
|
|
15
15
|
add_subcmd(:open) { |project_name|
|
|
16
16
|
re = /#{project_name}/i
|
|
17
17
|
|
|
18
|
-
conf_matches = projects.from_config.select { |k, v| k.match?(re) }
|
|
19
|
-
dir_matches = projects.dirs.select { |proj, path| proj.match?(re) }
|
|
18
|
+
# conf_matches = projects.from_config.select { |k, v| k.match?(re) }
|
|
19
|
+
# dir_matches = projects.dirs.select { |proj, path| proj.match?(re) }
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
matches = matches.select { |name, path| name == project_name }
|
|
24
|
-
end
|
|
21
|
+
dir_matches = Hiiro::Matcher.by_prefix(projects.dirs, project_name){|k,v| k }
|
|
22
|
+
matches = dir_matches.matches
|
|
25
23
|
|
|
26
|
-
case matches.count
|
|
24
|
+
case dir_matches.matches.count
|
|
27
25
|
when 0
|
|
28
26
|
name = 'proj'
|
|
29
27
|
path = File.join(Dir.home, 'proj')
|
|
@@ -38,7 +36,7 @@ Hiiro.run(*ARGV) do
|
|
|
38
36
|
|
|
39
37
|
open_project_workspace(name, path)
|
|
40
38
|
when 1
|
|
41
|
-
name, path = matches.first
|
|
39
|
+
name, path = matches.first.item
|
|
42
40
|
|
|
43
41
|
puts "changing dir: #{path}"
|
|
44
42
|
Dir.chdir(path)
|
data/lib/hiiro/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.1.386
|
|
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-09-
|
|
11
|
+
date: 2026-09-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pry
|