harnex 0.9.0 → 0.10.0
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/CHANGELOG.md +100 -0
- data/README.md +38 -38
- data/TECHNICAL.md +17 -15
- data/docs/codex-appserver.md +16 -13
- data/docs/configuration.md +11 -4
- data/docs/dispatch-telemetry.md +153 -112
- data/docs/events.md +2 -3
- data/guides/01_dispatch.md +29 -32
- data/guides/04_monitoring.md +4 -4
- data/lib/harnex/artifact_report.rb +455 -6
- data/lib/harnex/cli.rb +3 -3
- data/lib/harnex/commands/artifact_report.rb +8 -7
- data/lib/harnex/commands/doctor.rb +1 -1
- data/lib/harnex/commands/run.rb +22 -37
- data/lib/harnex/commands/status.rb +0 -2
- data/lib/harnex/commands/wait.rb +0 -1
- data/lib/harnex/config.rb +6 -2
- data/lib/harnex/core.rb +200 -14
- data/lib/harnex/dispatch_history.rb +3 -3
- data/lib/harnex/retention.rb +13 -4
- data/lib/harnex/runtime/session.rb +317 -160
- data/lib/harnex/terminal_status.rb +7 -20
- data/lib/harnex/version.rb +1 -1
- metadata +2 -2
|
@@ -10,28 +10,18 @@ module Harnex
|
|
|
10
10
|
root = File.expand_path(repo_root.to_s.empty? ? Dir.pwd : repo_root)
|
|
11
11
|
|
|
12
12
|
latest_summary = nil
|
|
13
|
-
latest_summary_path = nil
|
|
14
13
|
latest_history = nil
|
|
15
14
|
|
|
15
|
+
# The canonical dispatch stream is the only source. Rows a prior
|
|
16
|
+
# release mirrored elsewhere are never read back, so a leftover mirror
|
|
17
|
+
# file on disk cannot resolve status from stale data.
|
|
16
18
|
history_paths(root).each do |path|
|
|
17
19
|
summary, history = scan_dispatch_path(path, normalized_id)
|
|
18
|
-
if newer_summary?(summary, latest_summary)
|
|
19
|
-
latest_summary = summary
|
|
20
|
-
latest_summary_path = path
|
|
21
|
-
end
|
|
20
|
+
latest_summary = summary if newer_summary?(summary, latest_summary)
|
|
22
21
|
latest_history = history if newer_history?(history, latest_history)
|
|
23
22
|
end
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
if summary_path && !summary_path.empty? && File.file?(summary_path)
|
|
27
|
-
summary, = scan_dispatch_path(summary_path, normalized_id)
|
|
28
|
-
if newer_summary?(summary, latest_summary)
|
|
29
|
-
latest_summary = summary
|
|
30
|
-
latest_summary_path = summary_path
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
return build_from_summary(latest_summary, latest_summary_path, root) if latest_summary
|
|
24
|
+
return build_from_summary(latest_summary, root) if latest_summary
|
|
35
25
|
return build_from_history(latest_history, root) if latest_history
|
|
36
26
|
|
|
37
27
|
nil
|
|
@@ -52,7 +42,6 @@ module Harnex
|
|
|
52
42
|
"artifact_report_status" => nil,
|
|
53
43
|
"exit" => nil,
|
|
54
44
|
"exit_code" => nil,
|
|
55
|
-
"summary_out" => nil,
|
|
56
45
|
"started_at" => nil,
|
|
57
46
|
"ended_at" => nil,
|
|
58
47
|
"source" => "none"
|
|
@@ -140,7 +129,7 @@ module Harnex
|
|
|
140
129
|
nil
|
|
141
130
|
end
|
|
142
131
|
|
|
143
|
-
def build_from_summary(record,
|
|
132
|
+
def build_from_summary(record, fallback_repo_root)
|
|
144
133
|
meta = record["meta"] || {}
|
|
145
134
|
actual = record["actual"] || {}
|
|
146
135
|
outcome = record["outcome"] || {}
|
|
@@ -162,10 +151,9 @@ module Harnex
|
|
|
162
151
|
"artifact_report_status" => blank_to_nil(outcome["report_status"]),
|
|
163
152
|
"exit" => blank_to_nil(actual["exit"]),
|
|
164
153
|
"exit_code" => actual["exit_code"],
|
|
165
|
-
"summary_out" => summary_path,
|
|
166
154
|
"started_at" => meta["started_at"],
|
|
167
155
|
"ended_at" => meta["ended_at"],
|
|
168
|
-
"source" => "
|
|
156
|
+
"source" => "dispatch_end"
|
|
169
157
|
}
|
|
170
158
|
end
|
|
171
159
|
|
|
@@ -208,7 +196,6 @@ module Harnex
|
|
|
208
196
|
"artifact_report_status" => nil,
|
|
209
197
|
"exit" => history_exit(status),
|
|
210
198
|
"exit_code" => nil,
|
|
211
|
-
"summary_out" => blank_to_nil(record["summary_out_path"]),
|
|
212
199
|
"started_at" => record["started_at"],
|
|
213
200
|
"ended_at" => record["ended_at"],
|
|
214
201
|
"source" => "dispatch_history"
|
data/lib/harnex/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: harnex
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jikku Jose
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-08-
|
|
11
|
+
date: 2026-08-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: A local PTY harness that wraps terminal AI agents (Claude, Codex, Pi)
|
|
14
14
|
and adds a control plane for discovery, messaging, and coordination.
|