@staix/agent-hub 0.27.0 → 0.29.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.
Files changed (106) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +11 -3
  3. package/docs/agent-notes/adapters.md +4 -2
  4. package/docs/agent-notes/bus.md +4 -4
  5. package/docs/agent-notes/daemon.md +9 -3
  6. package/docs/agent-notes/local-worker.md +3 -1
  7. package/docs/agent-notes/tasks.md +7 -0
  8. package/docs/agent-notes/tests.md +7 -5
  9. package/docs/design/adapters.md +76 -0
  10. package/docs/design/agent-hub-architecture.md +67 -0
  11. package/docs/design/agent-hub.md +52 -0
  12. package/docs/design/bus.md +48 -0
  13. package/docs/design/task-board.md +86 -0
  14. package/docs/dogfood.md +21 -3
  15. package/docs/operations.md +370 -12
  16. package/docs/profiles.md +1 -0
  17. package/docs/quickstart.md +19 -3
  18. package/docs/sdlc.md +2 -2
  19. package/docs/security.md +24 -4
  20. package/docs/smoke.md +2 -0
  21. package/docs/specs/2026-09-19-agent-hub-design.md +2 -0
  22. package/docs/verification/2026-10-31-codex-0166-reviewer-isolation.md +2 -0
  23. package/docs/verification/2026-11-02-0.28.0.md +54 -0
  24. package/docs/verification/2026-11-02-autonomy-t4.md +39 -0
  25. package/docs/verification/2026-11-02-codex-0166-reviewer-tool-call.md +53 -0
  26. package/docs/verification/2026-11-02-control-write-after.json +139 -0
  27. package/docs/verification/2026-11-02-control-write-baseline.json +127 -0
  28. package/docs/verification/2026-11-02-control-write-guarded.json +127 -0
  29. package/docs/verification/2026-11-02-control-write-outcomes.md +65 -0
  30. package/docs/verification/2026-11-02-orca-1.4.245-cli-contract.md +51 -0
  31. package/docs/verification/2026-11-03-0.29.0.md +59 -0
  32. package/docs/verification/2026-11-03-control-write-stall-windows.json +241 -0
  33. package/docs/verification/2026-11-03-control-write-stall-windows.md +20 -0
  34. package/docs/verification/2026-11-03-live-board-latency.json +556 -0
  35. package/docs/verification/2026-11-03-live-board-latency.md +64 -0
  36. package/docs/verified.json +14 -14
  37. package/package.json +2 -2
  38. package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
  39. package/plugins/agent-hub/server.js +857 -125
  40. package/src/adapters/claude-channel.ts +12 -2
  41. package/src/adapters/compat.ts +1 -1
  42. package/src/adapters/definitions/native-cli-claude-setup.ts +31 -9
  43. package/src/adapters/definitions/native-cli-entry-jcode.ts +33 -0
  44. package/src/adapters/definitions/native-cli-entry-qwen.ts +2 -2
  45. package/src/adapters/jcode.ts +37 -4
  46. package/src/adapters/qwen-dual.ts +3 -2
  47. package/src/cli/agents.ts +4 -2
  48. package/src/cli/bench.ts +4 -2
  49. package/src/cli/board-read.ts +25 -0
  50. package/src/cli/claude-homes.ts +2 -2
  51. package/src/cli/console-state.ts +8 -3
  52. package/src/cli/help.ts +6 -5
  53. package/src/cli/identity.ts +9 -1
  54. package/src/cli/init-prompt.ts +179 -0
  55. package/src/cli/init-settings.ts +229 -0
  56. package/src/cli/init.ts +102 -9
  57. package/src/cli/launch.ts +3 -1
  58. package/src/cli/main.ts +106 -35
  59. package/src/cli/output.ts +19 -0
  60. package/src/cli/recovery-package.ts +9 -0
  61. package/src/cli/setup-homes.ts +18 -3
  62. package/src/cli/specs.ts +150 -0
  63. package/src/cli/terminal-recovery.ts +35 -11
  64. package/src/hub/board.ts +59 -5
  65. package/src/hub/bus.ts +54 -7
  66. package/src/hub/child-process.ts +6 -4
  67. package/src/hub/config-apply.ts +4 -1
  68. package/src/hub/config-edit.ts +1 -1
  69. package/src/hub/config-tier.ts +1 -0
  70. package/src/hub/control-client.ts +43 -4
  71. package/src/hub/control-write-trace.ts +409 -0
  72. package/src/hub/cost-governance.ts +22 -6
  73. package/src/hub/crash.ts +20 -0
  74. package/src/hub/daemon.ts +470 -98
  75. package/src/hub/delivery-hints.ts +6 -3
  76. package/src/hub/delivery-journal.ts +14 -3
  77. package/src/hub/hub-tools.ts +10 -6
  78. package/src/hub/peers.ts +1 -1
  79. package/src/hub/review-brief.ts +18 -0
  80. package/src/hub/routing.ts +14 -3
  81. package/src/hub/runtime-capture-prune.ts +4 -1
  82. package/src/hub/sdlc-release-authorization.ts +13 -4
  83. package/src/hub/sdlc-release.ts +23 -10
  84. package/src/hub/sdlc.ts +15 -2
  85. package/src/hub/settings.ts +2 -0
  86. package/src/hub/specs-config.ts +43 -0
  87. package/src/hub/specs-task.ts +108 -0
  88. package/src/hub/specs.ts +1008 -0
  89. package/src/hub/task-list-page.ts +75 -0
  90. package/src/hub/task-sweep.ts +10 -1
  91. package/src/hub/task-worktree.ts +331 -0
  92. package/src/hub/tasks.ts +606 -53
  93. package/src/hub/terminal-open.ts +10 -5
  94. package/src/hub/tool-request.ts +131 -0
  95. package/src/local/deny.ts +49 -0
  96. package/src/local/tools.ts +4 -2
  97. package/src/memory/brief.ts +5 -0
  98. package/src/memory/client.ts +5 -2
  99. package/src/ui/office-model.ts +17 -1
  100. package/src/ui/office-space.ts +1 -1
  101. package/templates/config.json +1 -0
  102. package/templates/profiles/dev.json +1 -0
  103. package/templates/profiles/general.json +1 -0
  104. package/templates/profiles/research.json +1 -0
  105. package/templates/profiles/writing.json +1 -0
  106. package/templates/specs.block.md +5 -0
@@ -0,0 +1,241 @@
1
+ {
2
+ "schema": "agent-hub.stall-window-correlation/v1",
3
+ "clock": "recorded UTC wall time, not a monotonic lag measurement",
4
+ "windows": [
5
+ {
6
+ "window": "proposes",
7
+ "start": "2026-11-02T20:55:10Z",
8
+ "end": "2026-11-02T20:57:00Z",
9
+ "event_counts": {
10
+ "quota": 5,
11
+ "attach": 4,
12
+ "agent_cli": 1,
13
+ "task": 6,
14
+ "envelope": 3,
15
+ "state": 1,
16
+ "turn_start": 1,
17
+ "conduct": 1
18
+ },
19
+ "largest_event_gap": {
20
+ "seconds": 60.237,
21
+ "from": "2026-11-02T20:55:33.923Z",
22
+ "to": "2026-11-02T20:56:34.160Z",
23
+ "from_line": 572984,
24
+ "to_line": 572985,
25
+ "from_kind": "envelope",
26
+ "to_kind": "envelope"
27
+ },
28
+ "periodic_quota_count": 5,
29
+ "largest_periodic_quota_gap_seconds": 65.133,
30
+ "task_events": [
31
+ {
32
+ "at": "2026-11-02T20:55:33.866Z",
33
+ "task": 667,
34
+ "event": "proposed",
35
+ "source_line": 572981
36
+ },
37
+ {
38
+ "at": "2026-11-02T20:55:33.895Z",
39
+ "task": 667,
40
+ "event": "lifecycle linked",
41
+ "source_line": 572982
42
+ },
43
+ {
44
+ "at": "2026-11-02T20:55:33.916Z",
45
+ "task": 667,
46
+ "event": "assigned",
47
+ "source_line": 572983
48
+ },
49
+ {
50
+ "at": "2026-11-02T20:56:34.414Z",
51
+ "task": 668,
52
+ "event": "proposed",
53
+ "source_line": 572990
54
+ },
55
+ {
56
+ "at": "2026-11-02T20:56:34.445Z",
57
+ "task": 668,
58
+ "event": "lifecycle linked",
59
+ "source_line": 572991
60
+ },
61
+ {
62
+ "at": "2026-11-02T20:56:34.466Z",
63
+ "task": 668,
64
+ "event": "assigned",
65
+ "source_line": 572992
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "window": "late_propose",
71
+ "start": "2026-11-02T21:00:45Z",
72
+ "end": "2026-11-02T21:02:30Z",
73
+ "event_counts": {
74
+ "quota": 42,
75
+ "tokens": 2,
76
+ "usage": 2,
77
+ "progress": 1
78
+ },
79
+ "largest_event_gap": {
80
+ "seconds": 5.004,
81
+ "from": "2026-11-02T21:02:01.805Z",
82
+ "to": "2026-11-02T21:02:06.809Z",
83
+ "from_line": 573128,
84
+ "to_line": 573129,
85
+ "from_kind": "quota",
86
+ "to_kind": "quota"
87
+ },
88
+ "periodic_quota_count": 21,
89
+ "largest_periodic_quota_gap_seconds": 5.014,
90
+ "task_events": []
91
+ },
92
+ {
93
+ "window": "review_667",
94
+ "start": "2026-11-02T21:31:30Z",
95
+ "end": "2026-11-02T21:33:00Z",
96
+ "event_counts": {
97
+ "quota": 30,
98
+ "tokens": 6,
99
+ "usage": 8,
100
+ "progress": 3,
101
+ "task": 6,
102
+ "envelope": 12,
103
+ "attach": 12,
104
+ "state": 5,
105
+ "turn_start": 3,
106
+ "turn_end": 2,
107
+ "agent_cli": 1,
108
+ "cohort": 1,
109
+ "split": 1,
110
+ "overlap": 1
111
+ },
112
+ "largest_event_gap": {
113
+ "seconds": 4.818,
114
+ "from": "2026-11-02T21:31:42.684Z",
115
+ "to": "2026-11-02T21:31:47.502Z",
116
+ "from_line": 573825,
117
+ "to_line": 573826,
118
+ "from_kind": "quota",
119
+ "to_kind": "progress"
120
+ },
121
+ "periodic_quota_count": 14,
122
+ "largest_periodic_quota_gap_seconds": 5.225,
123
+ "task_events": [
124
+ {
125
+ "at": "2026-11-02T21:31:47.586Z",
126
+ "task": 668,
127
+ "event": "accepted",
128
+ "source_line": 573827
129
+ },
130
+ {
131
+ "at": "2026-11-02T21:32:03.597Z",
132
+ "task": 667,
133
+ "event": "done",
134
+ "source_line": 573849
135
+ },
136
+ {
137
+ "at": "2026-11-02T21:32:03.721Z",
138
+ "task": 667,
139
+ "event": "memory reference started",
140
+ "source_line": 573851
141
+ },
142
+ {
143
+ "at": "2026-11-02T21:32:42.925Z",
144
+ "task": 667,
145
+ "event": "approved",
146
+ "source_line": 573897
147
+ },
148
+ {
149
+ "at": "2026-11-02T21:32:43.509Z",
150
+ "task": 670,
151
+ "event": "ready",
152
+ "source_line": 573904
153
+ },
154
+ {
155
+ "at": "2026-11-02T21:32:43.542Z",
156
+ "task": 670,
157
+ "event": "assigned",
158
+ "source_line": 573905
159
+ }
160
+ ]
161
+ },
162
+ {
163
+ "window": "review_668",
164
+ "start": "2026-11-02T21:49:30Z",
165
+ "end": "2026-11-02T21:51:00Z",
166
+ "event_counts": {
167
+ "quota": 22,
168
+ "progress": 6,
169
+ "tokens": 9,
170
+ "usage": 9,
171
+ "task": 5,
172
+ "envelope": 11,
173
+ "attach": 4,
174
+ "state": 5,
175
+ "turn_start": 3,
176
+ "turn_end": 2,
177
+ "stale": 1,
178
+ "cohort": 1,
179
+ "split": 1,
180
+ "overlap": 1
181
+ },
182
+ "largest_event_gap": {
183
+ "seconds": 5.015,
184
+ "from": "2026-11-02T21:50:01.150Z",
185
+ "to": "2026-11-02T21:50:06.165Z",
186
+ "from_line": 574463,
187
+ "to_line": 574464,
188
+ "from_kind": "quota",
189
+ "to_kind": "quota"
190
+ },
191
+ "periodic_quota_count": 13,
192
+ "largest_periodic_quota_gap_seconds": 5.336,
193
+ "task_events": [
194
+ {
195
+ "at": "2026-11-02T21:50:12.802Z",
196
+ "task": 668,
197
+ "event": "done",
198
+ "source_line": 574466
199
+ },
200
+ {
201
+ "at": "2026-11-02T21:50:12.936Z",
202
+ "task": 668,
203
+ "event": "memory reference started",
204
+ "source_line": 574468
205
+ },
206
+ {
207
+ "at": "2026-11-02T21:50:33.167Z",
208
+ "task": 668,
209
+ "event": "approved",
210
+ "source_line": 574500
211
+ },
212
+ {
213
+ "at": "2026-11-02T21:50:33.760Z",
214
+ "task": 669,
215
+ "event": "ready",
216
+ "source_line": 574507
217
+ },
218
+ {
219
+ "at": "2026-11-02T21:50:33.782Z",
220
+ "task": 669,
221
+ "event": "assigned",
222
+ "source_line": 574508
223
+ }
224
+ ]
225
+ }
226
+ ],
227
+ "nearby_proposal_context": {
228
+ "gap_seconds": 68.894,
229
+ "from": "2026-11-02T20:56:34.474Z",
230
+ "to": "2026-11-02T20:57:43.368Z",
231
+ "from_line": 572993,
232
+ "to_line": 572994,
233
+ "end_kind": "memory_brief",
234
+ "task": 668,
235
+ "native_items": 4,
236
+ "fail_items": 4,
237
+ "legacy_items": 0,
238
+ "following_offer_at": "2026-11-02T20:57:43.369Z",
239
+ "interpretation": "A nearby gap ending at a brief record, not a measured memory-call duration or proven cause."
240
+ }
241
+ }
@@ -0,0 +1,20 @@
1
+ # Timed control-write stall windows, 2026-11-03
2
+
3
+ Task #671, issue #1126, Refs #1078. Read-only correlation of the running hub's hub.log and events.jsonl, all timestamps UTC on 2026-11-02. No request was sent to the daemon and its database/configuration were not opened or changed. Only metadata, counts and timestamps are retained here and in the [aggregate JSON](2026-11-03-control-write-stall-windows.json).
4
+
5
+ The records are wall-clock observations, not an event-loop-delay measurement. A long gap is consistent with an unavailable loop, process suspension or blocked logging; it does not identify a blocking function. Conversely, periodic callbacks continuing to record rules out a single uninterrupted block spanning that entire interval, without ruling out short blocks or asynchronous waits.
6
+
7
+ | Reported stall | Recorded activity | Interpretation and limit |
8
+ | --- | --- | --- |
9
+ | Proposes around 20:56:04-20:56:34 | Task 667 proposed at 20:55:33.866, linked at .895, assigned at .916. Its assigned-status envelope was recorded at .923. The next event, its Jcode task-offer envelope, is at 20:56:34.160, a 60.237 s gap (events lines 572984-572985). Jcode busy at .282 and turn_start at .339; conductor proposal audit at .368; task 668 proposed at .414, linked at .445 and assigned at .466. | The gap begins before the supplied 30-second window and lies between assignment and offer publication. No event of any kind was recorded inside it. The periodic Claude quota stream also has a 65.133 s gap. This is evidence to investigate that delivery/publication boundary, not proof of a specific snapshot, Git, memory or native-adapter cause. |
10
+ | Propose around 21:01-21:02 | No propose is recorded in 21:00:45-21:02:30. The nearest earlier one is task 670 at 21:00:17.480, linked .524 and blocked .555; conductor audit .572. Claude native turn end/turn restart occur at 21:00:24, then another end at 21:00:30. At 21:01:33.464, hub.log reports memory sync refused by the configured privacy policy for 20 long-term entries. | The supplied proposal cannot be matched in this window from these records. Quota callbacks continue about every 5 s, with maximum Claude interval 5.014 s and maximum all-event gap 5.004 s in the selected range. The memory-sync refusal is concurrent evidence only; no duration or request correlation establishes it as the cause. |
11
+ | Review of task 667 around 21:32 | Review-stage SDLC advice at 21:31:59.453; Claude busy/turn_start at 21:32:02.845/.900. Task done at 03.597, memory-reference bookkeeping at 03.721. Jcode turn ends at 10.639, restarts at 10.734 and ends at 14.939. Approval-stage SDLC advice at 42.894; approved event at 42.925, followed by notices and release/assignment of task 670. A memory-sync privacy refusal was recorded earlier at 21:31:33.465. | Quota and other events continue during the wait: maximum selected all-event gap 4.818 s; maximum Claude quota interval 5.225 s. A continuous 30-second blocked loop is not shown. External metadata/readiness waits remain plausible, but no per-call start/end span identifies them. The memory-reference event is board bookkeeping, not a measured capture duration. |
12
+ | Review of task 668 around 21:50 | Done at 21:50:12.802, memory-reference bookkeeping at .936, review envelope at 13.424, Claude busy/turn_start at 13.669/.734. Codex turn ends at 16.972, restarts at 17.603 and ends at 26.495. At 17.602, hub.log reports snapshot burst budget exhausted and boundary evidence unknown. Approval-stage SDLC advice at 33.149; approved at 33.167, followed by release/assignment of task 669. | Maximum selected all-event gap 5.015 s; maximum Claude quota interval 5.336 s. The snapshot refusal is observable, but the log has no duration and cannot account for a 30-second wait by itself. Periodic activity continues. |
13
+
14
+ Wider proposal context adds a second gap: task 668's assigned-status envelope at 20:56:34.474 is followed by no event until a memory_brief record at 20:57:43.368 (68.894 s, lines 572993-572994). That record reports four native items, all fail notes, without their identities or content. Its offer follows at .369 and the conductor audit at .563. This is a candidate memory-brief boundary, not a measured 68.894-second memory call. The existing plan-fail lookup is evaluated before Briefs.forTask, so the new instrumentation wraps that lookup as well as the brief itself; its existing reads and limits are unchanged.
15
+
16
+ No check start/end, digest/inference duration, or Git start/end record in these selected windows identifies a slow operation. That is missing instrumentation, not proof those operations did not run. The first proposal and the two reviews exhibit different recorded behavior and should not be assigned one cause merely because callers saw the same timeout.
17
+
18
+ Source inspection found no event-loop lag probe or correlated control receive/reply spans in the 0.27.0 path. The change for #1126 adds a bounded monotonic probe, metadata-only request and phase spans, and a slow-request hub.log line. It must retain recently completed intervals: a synchronous blocking span can finish before the delayed timer callback runs. Still-open asynchronous spans are reported as overlapping waits, not as proven CPU causes. Unknown/untracked occupancy remains unknown. Raw request, task prose, paths, actor/session/rid identifiers and external output stay out of telemetry.
19
+
20
+ The new instrumentation has not been activated on the live daemon by this task. Its purpose is to name the observed boundary on the next naturally occurring stall; it does not retroactively prove the cause of these four reports or change a timeout to hide one.