@staix/agent-hub 0.49.1 → 0.50.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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ Issue and pull request numbers in the entries for 0.7.7 and earlier refer to the
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.50.0
8
+
9
+ - Release N-1 for 0.50.x is published 0.49.1, which declares agent-mem `>=0.42.0 <1.0.0`; its fixture lock pins the 0.42.0 that the 0.49.1 release resolved (with cli-output 0.1.4 and mcp-stdio 0.4.0), with control protocol 17 (descriptor floor 16). Wire and protocol, file and format floors, CLI and MCP tools stay compatible both ways; no capability or format ceiling is raised. The N-1 fixture and matrix pin that package; the separate protocol-16 fixture stays at 0.25.0.
10
+ - The lockfile resolves `@staix/agent-mem` 0.43.0, which pins `@staix/mcp-stdio` 0.5.0. Upgrade, restart and conductor recovery accept it, the declared range stays `>=0.42.0 <1.0.0`, and `HOST_API_VERSION` stays 1.
11
+ - Dashboard launchers can request one-line JSON readiness or a manager stop receipt from `ahub ui` (Refs #1736).
12
+
7
13
  ## 0.49.1
8
14
 
9
15
  - Pin `@staix/cli-output` 0.1.4 exactly and raise the declared `@staix/agent-mem` range to `>=0.42.0 <1.0.0` (Refs #1768). agent-mem 0.42.0 pins cli-output 0.1.4, and recovery requires the hub and agent-mem to resolve the same cli-output package, so a fresh install of 0.49.0 or older resolves agent-mem 0.42.0 beside a hub on 0.1.3 and its upgrade, restart and recovery checks refuse it; this release moves both together. The hub's code-point wrapping and table layout now come from the package, with output unchanged. A hub that loads agent-mem 0.41.0 or older refuses memory at load. `HOST_API_VERSION` stays 1, and no store or sync format floor is raised.
package/README.md CHANGED
@@ -5,7 +5,7 @@ Code, Codex, Kimi Code, Pi and a hub-owned local worker (plus Qwen Code, Jcode a
5
5
  Antigravity if you want them) share a message bus, a task board and a memory, each
6
6
  connected through its own native interface.
7
7
 
8
- Status: 0.49.1, control protocol 17 (accepts 16). Bun + TypeScript, one loopback daemon per
8
+ Status: 0.50.0, control protocol 17 (accepts 16). Bun + TypeScript, one loopback daemon per
9
9
  project. Site: [agent-hub.staix.net](https://agent-hub.staix.net).
10
10
 
11
11
  Inspect bounded task and attempt metadata with `ahub lineage show`; admit external
@@ -11,7 +11,7 @@ tags: [agent-hub, dogfood]
11
11
  paths:
12
12
  - README.md
13
13
  - package.json
14
- verified-against: 8592cad91d0d18272112ee57559d8e94d9fff1d5
14
+ verified-against: 2db80cdd539b9c7032f2ea53e905d7a5f709a7b4
15
15
  ---
16
16
 
17
17
  # Agent Hub Product Goal
@@ -93,7 +93,7 @@ Overview width: 79 cells. Dispatch entries: 90. Help command words: 92.
93
93
  | task | main.ts | 80 | Tasks and review / put tasks on the board and move them along (42) | Yes | --class --owner --path --after --urgent --needs-network --needs-worktree --backlog --detail --list --sync --project --issue --task --duplicate-ok --key --json --color --full --role --revision --model --model-said --manifest --disposition --reason --superseded-by --created | Repeated forms |
94
94
  | title | main.ts | 77 | Messages and approvals / rename a Pi or local-worker session (35) | Yes | - | Repeated forms |
95
95
  | turns | main.ts | 74 | History and reports / recent turns and the files each changed (39) | Yes | --limit --json --color | Repeated forms |
96
- | ui | main.ts | 78 | Dashboard / open the local dashboard (24) | Yes | --no-open --settings --all --stop | Repeated forms |
96
+ | ui | main.ts | 78 | Dashboard / open the local dashboard (24) | Yes | --no-open --json --settings --all --stop | Repeated forms |
97
97
  | undo | main.ts | 79 | History and reports / put back the files a turn changed (33) | Yes | --yes --context | Repeated forms |
98
98
  | up | main.ts | 79 | Daemon and runtime / start the daemon and this project's default agents (50) | Yes | --unattended --no-console --no-agents | Repeated forms |
99
99
  | upgrade | main.ts | 79 | Daemon and runtime / review and upgrade this project (31) | Yes | --project --all-stopped --to --dry-run --yes --json --verbose --color | Repeated forms |
@@ -118,7 +118,7 @@ A delegated call needs its own renderer or a fixture before the human-view width
118
118
  | --version | console.log (1) |
119
119
  | version | console.log (1) |
120
120
  | projects | fail (4), console.log (2) |
121
- | ui | fail (6), console.log (4) |
121
+ | ui | fail (7), console.log (6) |
122
122
  | manager | Delegated / no direct output call |
123
123
  | setup | fail (7), console.log (9) |
124
124
  | init | fail (5), console.log (11), console.error (1) |
@@ -207,20 +207,20 @@ Interpolated and daemon-supplied strings require runtime fixtures. They are coun
207
207
 
208
208
  | Command | Text source | Stream | Literal width |
209
209
  | --- | --- | --- | ---: |
210
- | recovery | src/cli/main.ts:1048 | stdout | 29 |
211
- | recovery | src/cli/main.ts:1081 | stdout | 60 |
212
- | projects | src/cli/main.ts:1175 | stdout | 45 |
213
- | ui | src/cli/main.ts:1191 | stdout | 57 |
214
- | ui | src/cli/main.ts:1211 | stdout | 76 |
215
- | models | src/cli/main.ts:1599 | stdout | 11 |
216
- | say | src/cli/main.ts:1623 | stdout | 46 |
217
- | roadmap | src/cli/main.ts:1827 | stdout | 46 |
218
- | deliverables | src/cli/main.ts:2064 | stdout | 70 |
219
- | roster | src/cli/main.ts:2615 | stdout | 19 |
220
- | roster | src/cli/main.ts:2622 | stdout | 19 |
221
- | autonomy | src/cli/main.ts:2673 | stdout | 75 |
222
- | bench | src/cli/main.ts:2980 | stdout | 107 |
223
- | usage | src/cli/main.ts:3164 | stderr | 121 |
210
+ | recovery | src/cli/main.ts:1049 | stdout | 29 |
211
+ | recovery | src/cli/main.ts:1082 | stdout | 60 |
212
+ | projects | src/cli/main.ts:1176 | stdout | 45 |
213
+ | ui | src/cli/main.ts:1200 | stdout | 57 |
214
+ | ui | src/cli/main.ts:1223 | stdout | 76 |
215
+ | models | src/cli/main.ts:1611 | stdout | 11 |
216
+ | say | src/cli/main.ts:1635 | stdout | 46 |
217
+ | roadmap | src/cli/main.ts:1839 | stdout | 46 |
218
+ | deliverables | src/cli/main.ts:2076 | stdout | 70 |
219
+ | roster | src/cli/main.ts:2627 | stdout | 19 |
220
+ | roster | src/cli/main.ts:2634 | stdout | 19 |
221
+ | autonomy | src/cli/main.ts:2685 | stdout | 75 |
222
+ | bench | src/cli/main.ts:2992 | stdout | 107 |
223
+ | usage | src/cli/main.ts:3176 | stderr | 121 |
224
224
 
225
225
  ## Renderer candidates
226
226
 
@@ -12,7 +12,7 @@ paths:
12
12
  - src/cli/console-state.ts
13
13
  - src/cli/output.ts
14
14
  - test/cli-output-conformance.test.ts
15
- verified-against: 8592cad91d0d18272112ee57559d8e94d9fff1d5
15
+ verified-against: 2db80cdd539b9c7032f2ea53e905d7a5f709a7b4
16
16
  ---
17
17
 
18
18
  # CLI output standard v1
@@ -53,7 +53,7 @@ paths:
53
53
  - test/console-roadmap.test.ts
54
54
  - test/check-roadmap.test.ts
55
55
  - scripts/check-roadmap.mjs
56
- verified-against: 8592cad91d0d18272112ee57559d8e94d9fff1d5
56
+ verified-against: 2db80cdd539b9c7032f2ea53e905d7a5f709a7b4
57
57
  ---
58
58
 
59
59
  # Roadmap milestones
package/docs/dogfood.md CHANGED
@@ -299,6 +299,7 @@ agent-hub is developed with agent-hub. This page lists every feature, whether it
299
299
  | Projected exhaustion and override reasons in Usage budgets (#1513) | on after the release; `ahub budget`, the console Usage detail and the dashboard Usage budgets row run here, and no provider window has yet been read with a real burn to forecast | every window shows `left` and one forecast sentence; `test/budget-projection.test.ts` holds a steady burn, the lookback and window bases, a reset inside the lookback, too few points, no burn, reset-first and an unusable reading; `test/budget-surfaces.test.ts` proves the table, the console cell and the page print the same sentence, the page's own copy matches the hub's for all six shapes, and an older hub adds neither field; `test/execution-budget.test.ts` proves a `--reason` is kept with `person` and its time while a configure without one keeps the previous reason. The metric that shows it works is the share of windows whose REACHES names a time instead of `no forecast: too few points yet`: a share near zero means the hourly burn series is not reaching the projection |
300
300
  | Settings reload | on | reloads applied, pending restarts |
301
301
  | Config editing from the console and dashboard (#689) | on after release; `ahub settings edit` and console key `c` run here, the dashboard Structure group needs `ahub ui --settings`; executable keys stay console only | `config_edit` events (edits applied by tier and source), refusals shown with the loader reason, restarts left pending |
302
+ | Dashboard readiness JSON (#1736) | available after release; the ordinary dashboard launch is unchanged on this repository | `test/manager-integration.test.ts` checks one JSON line for hub, settings and manager URLs and manager stop. It also checks stderr separation and refusal before browser launch. |
302
303
  | Upgrade and recovery (#1426) | on, per release; new launch-refusal diagnostics and target-version preflight have synthetic coverage only until release, no live restoration receipt yet | upgrade receipts in `docs/verification/`; red AC2 exhausts virtual 600000ms on old code, refusal/resume fixtures retain Pi and Codex conversations and typed causes; no real native/account call |
303
304
  | Office planning view (#264 phase 5) | source/fixture implementation; available after release when the person selects Flat or Isometric (Off by default); the live two-agent, both-theme AC9 browser look remains unverified | `test/office-model.test.ts` pins Backlog count/order/cap, reserved/pin/waits and release/planner metadata; `test/office-view.test.ts` pins dock and overflow navigation, keyboard access, stable wall-to-To do card nodes, geometry, reduced motion and light/dark token contrast; served-page raw/gzip deltas are measured against the PR merge base |
304
305
  | acon console plugin (#935) | off here until a person runs `ahub setup` after the release and `acon ui` on this machine; the plugin registers per agenthub home, not per repository | `acon plugins` shows `ahub verified`; the console's agent-hub panel shows this repository's live board, and an approval answered from the console inbox appears in hub.log as `answered option allow_once by dashboard`. Space (#1012): adopted with the plugin, no separate switch; acon's Space view (Flat, Room, 3D) shows this repository's peers as actors (state and marks matching the dashboard's office), the board columns as queue/work/review/done zones with the same counts, and overlap links plus message arcs (broadcasts to every other desk) as links; clicking an actor or card opens this project's agents or board panel; incremental Space (#1380) keeps a daemon cursor and OfficeScene per project, coalesces concurrent reads and caches the running listing for 10 s, refreshing it in the background on a later poll. A viewer holding the combined cursor receives `changed:false` when the public scene, per-project cursors and membership are unchanged, including wall-clock message-link expiry. `test/acon-space-1380.test.ts` pins unchanged replies, changed-project reads, listing refresh, restart/refusal and privacy; current daemons still return full office bodies even with a cursor, so wire/body savings and the live console warm p95 remain unverified. A project is a Space group since #1375: the scene declares one group per project, every actor, zone and card carries its group, actor names carry no project prefix, and an actor adds the project's configured roles (at most 4 names of 32 characters) and `since` (the open turn's start, only while the actor is working, because no other state has a change time here); the trim follows acon 0.2.0 (actors 96, groups 200, cards 200, links 128) and the manifest declares `inboxMaxAgeMs` 1000 and `spaceMaxAgeMs` 2000, one poll interval. `test/acon-plugin.test.ts` checks the mapped scene with acon's own `spaceSceneProblems` and pins each cap against acon's own number. The first cold inbox call (#1375 AC6) measured 1.0 to 1.1 s here with 21 registered projects, split into 74 ms of plugin load, 628 to 740 ms for the first project listing and 250 to 319 ms for the project `agents` snapshots; a poll inside the 1 s fresh window costs 0 ms and one with the cache bypassed 258 ms. So the cold cost is the listing, which the inbox does not reuse (Space does), plus one snapshot per project, and the ~2 s observed is the per-project snapshot budget (`inboxProjectBudgetMs`) a slow project is waited out on, a project that misses it adding no rows to that first poll; #1375 left the inbox path unchanged. The live acon `perf-snapshots` measurement (AC7) stays a person-run leg and is unverified |
@@ -2149,7 +2149,7 @@ ahub memory forget 1a2b3c4d # also promote, demote, supersede, rebu
2149
2149
 
2150
2150
  A scheduled memory review is off by default. `memory.review` in `.agenthub/config.local.json` (it needs both `max_tokens_run` and `max_tokens_week`) files one `review`-class card per period over the notes whose code anchors no longer resolve, and `ahub memory review on|off|status` is the person's switch. While a turn works that card, the hub refuses tool calls outside the review's scope and stops the review at either token cap ([scheduled review](memory.md#scheduled-review-and-its-switch-1329-part-1)).
2151
2151
 
2152
- The declared `@staix/agent-mem` range (`>=0.42.0 <1.0.0` in `package.json`, resolved to 0.42.0 by `bun.lock`) resolves `AMEM_HOME`, then `$AGENTHUB_HOME/memory`, then `~/.agenthub/memory`. A plain release inside that range opens memory without a hub release when its host API range intersects the supported `[1, 1]`; an out-of-range, unattested, prerelease or host-API-incompatible package refuses to open it. A new minor can raise the store format floor: an older hub or amem cannot read a store a newer one wrote, so roll back the hub together with the store. An absent `M/profile.json` selects shared v1; an explicit generation selects `M/generations/G` with the package's readonly legacy bridge. All daemon memory consumers and the hub memory/goal CLI use that selected profile. Invalid metadata or a missing selected generation makes native memory unavailable while the bus and board continue; there is no fallback to legacy writes. Inspect the daemon's memory binding/availability before interpreting missing memory as an empty store.
2152
+ The declared `@staix/agent-mem` range (`>=0.42.0 <1.0.0` in `package.json`, resolved to 0.43.0 by `bun.lock`) resolves `AMEM_HOME`, then `$AGENTHUB_HOME/memory`, then `~/.agenthub/memory`. A plain release inside that range opens memory without a hub release when its host API range intersects the supported `[1, 1]`; an out-of-range, unattested, prerelease or host-API-incompatible package refuses to open it. A new minor can raise the store format floor: an older hub or amem cannot read a store a newer one wrote, so roll back the hub together with the store. An absent `M/profile.json` selects shared v1; an explicit generation selects `M/generations/G` with the package's readonly legacy bridge. All daemon memory consumers and the hub memory/goal CLI use that selected profile. Invalid metadata or a missing selected generation makes native memory unavailable while the bus and board continue; there is no fallback to legacy writes. Inspect the daemon's memory binding/availability before interpreting missing memory as an empty store.
2153
2153
 
2154
2154
  The daemon checks its selector at hub operation entry and before candidate/counter writes. It does not hot-switch handles or provide an atomic fence against selection changes during an in-flight core call. Quiesce consumers and close their handles before migration or selection changes; reopen through the supported session-preserving lifecycle afterward. Candidate/counter storage remains `M/candidates.db`, independent of `G`; since agent-mem 0.7.0 `amem review` also lists and accepts candidates on a selected generation. Every running hub using this home needs an authenticated receipt: a matching ready binding, or a generation-capable unbound receipt (`disabled` when native memory is off, `unavailable` when opening failed) proving it holds no memory handle. An unbound daemon and zero running hubs are quiesced for memory; a stale bound handle, unreadable registry or unknown runtime is not ready. Existing JSON memory/goal results remain unchanged; the additive binding receipt belongs to daemon status, profile-check and the decay object. This source integration does not authorize installing a new runtime, migrating real memory, restarting sessions or claiming real-machine sync/capture receipts. Migration/deactivation and their limits belong to [agent-mem](https://github.com/STAIxBWLB/agent-mem); see [the hub profile contract](memory.md#selected-memory-profile).
2155
2155
 
@@ -4280,7 +4280,10 @@ capabilities still require their own labels. A disjoint window refuses with 4426
4280
4280
  The compatibility-floor `protocol` field remains readable by old clients.
4281
4281
 
4282
4282
  Release N-1 is counted in minor versions, separately from this protocol window
4283
- (#1164, family contract entelecheia/ai-workspace#70). For 0.49.x, N-1 is 0.48.4,
4283
+ (#1164, family contract entelecheia/ai-workspace#70). For 0.50.x, N-1 is 0.49.1,
4284
+ the latest published patch of 0.49.x (declared `@staix/agent-mem` `>=0.42.0 <1.0.0`,
4285
+ 0.42.0 in its fixture lock, control protocol 17 with descriptor floor 16). Every
4286
+ patch on 0.50.x keeps that release baseline. For 0.49.x, N-1 is 0.48.4,
4284
4287
  the latest published patch of 0.48.x (declared `@staix/agent-mem` `>=0.39.0 <1.0.0`,
4285
4288
  0.39.0 in its fixture lock, control protocol 17 with descriptor floor 16). Every
4286
4289
  patch on 0.49.x keeps that release baseline. For 0.47.x, N-1 is 0.46.1,
@@ -18,7 +18,7 @@ Or use the matching GitHub release:
18
18
 
19
19
  <!-- facts:install-tag -->
20
20
  ```bash
21
- bun add -g github:STAIxBWLB/agent-hub#v0.49.1
21
+ bun add -g github:STAIxBWLB/agent-hub#v0.50.0
22
22
  ahub setup
23
23
  ```
24
24
  <!-- /facts:install-tag -->
@@ -54,6 +54,12 @@ A project whose hub is stopped is upgraded without starting it: `ahub upgrade
54
54
  --all-stopped --to <version>` does that for every stopped project at once
55
55
  (`--dry-run` lists each one first).
56
56
 
57
+ ## Upgrading to 0.50.0
58
+
59
+ Nothing changes until you use something new. A launcher can now read the dashboard link as data: `ahub ui --no-open --json` (with `--settings` or `--all` too) prints one JSON line with `url`, `origin`, `mode` and `settings`, and `ahub ui --all --stop --json` prints a stop receipt. Plain output is unchanged. The memory library resolves agent-mem 0.43.0, which pins mcp-stdio 0.5.0. The declared range stays `>=0.42.0 <1.0.0`, and store and sync formats do not change. Release N-1 for 0.50.x is 0.49.1.
60
+
61
+ `ahub upgrade` does not update the global CLI or the shared Claude plugin: run `bun add -g @staix/agent-hub@0.50.0` and then `ahub setup` yourself, and `ahub doctor` warns while either is older than a running daemon.
62
+
57
63
  ## Upgrading to 0.49.1
58
64
 
59
65
  Fixes `ahub upgrade`, restart and conductor recovery on a fresh install. agent-mem 0.42.0 pins `@staix/cli-output` 0.1.4, and a new install of 0.49.0 or older resolves it beside a hub on 0.1.3, so recovery refuses it with `memory runtime dependency identity/version mismatch`. 0.49.1 pins cli-output 0.1.4 and needs agent-mem 0.42.0 or later; a hub that loads 0.41.0 or older refuses memory at load. Console and CLI output stay the same. agent-mem 0.42.0 keeps its Korean search index in a separate cache, so an older amem sharing the memory home keeps its own. If you use placement sync, renew the writer inventory after the upgrade as agent-mem's 0.41.0 and 0.42.0 notes describe (`amem migrate --sync-placement --writers` lists the roots and the checkpoint command).
@@ -598,7 +604,8 @@ lifecycle only in such a session), and guarded values from an edited file need
598
604
  terminal" and "Start modes".
599
605
 
600
606
  `ahub ui --no-open` prints a one-time link instead of launching a browser. Open it
601
- within 60 seconds. A session expires after one hour; run `ahub ui` again. Restarting
607
+ within 60 seconds. Add `--json` for one readiness line (`url`, `origin`, `mode`,
608
+ `settings`) that a launcher can read; `ahub ui --all --stop --json` prints a stop receipt. A session expires after one hour; run `ahub ui` again. Restarting
602
609
  the daemon invalidates all links and sessions. The UI listener is started only on
603
610
  request, binds loopback and stops with the daemon. Remote access is not supported.
604
611
 
@@ -0,0 +1,54 @@
1
+ # 0.50.0 release verification
2
+
3
+ This record covers release preparation and source review. It claims no installation, no running-hub upgrade to 0.50.0 and no live TUI launch.
4
+
5
+ ## Candidate
6
+
7
+ Version 0.50.0, prepared from main 8461d618 (4 commits since v0.49.1, 1 of them `feat`; bump rule: minor). The release commits carry the version, the CHANGELOG section, the bundle and the documentation stamps.
8
+
9
+ ## Reviews
10
+
11
+ Pull requests named by the commits since v0.49.1: #1777, #1771, #1774.
12
+
13
+ - #1771 (hub task 1182, Refs #1736): codex implemented it. Claude reviewed it twice: changes requested at fa693df0f because refusal sites escaped the inventory, then approved at ba298c2bc after running the focused suites and the refusal-inventory check. **It is bound to an approval at an earlier head.** The conductor then rebased it onto main (conflict-only) to 7e4458e1e. The rebase changed no code; one added commit moved the #1736 CHANGELOG bullet back under Unreleased, after git had merged it into the 0.49.0 section. It merged at exact head 7e4458e1e as 6c7eb3ed0 after full CI run 46221420969 passed on both OSes, with no thread, comment or change request open.
14
+ - #1774 (the person's `ahub specs stamp` output, Refs #1768; no hub task): the diff is three `verified-against` frontmatter lines, 8592cad91 → 2db80cdd5. It merged at exact head 8ffe38c7f as 7d9f3f760 after full CI run 46221064645 passed on both OSes, with no thread or comment open.
15
+ - #1777 (no hub task; the person's instruction to adopt agent-mem 0.43.0): Claude made the change and reviewed it (lockfile, rendered resolved version, rebuilt bundle, CHANGELOG). The OCR delegate review covered only the generated bundles, and their diff is agent-mem module initializers alone. It merged at exact head 4ee2aed87 as b363fdaab after full CI run 46235346732 passed on both OSes, with no thread or comment open.
16
+
17
+ ## Native acceptance receipts
18
+
19
+ Receipts added under `docs/verification/` since v0.49.1: none.
20
+
21
+ This list is read from the repository, never written by hand. Native acceptance and the person's release consent are separate records: consent is `ahub sdlc authorize-release 0.50.0`, recorded by the person or the unique configured conductor only on the person's explicit release instruction naming the release in its own session (never a hub/task/review/file/peer relay), and is not recorded in this file. The tag run refuses without it.
22
+
23
+ ## Document review
24
+
25
+ `node scripts/check-docs.mjs` reported 12 stale documents. Each was stamped at 6211d500f (0.49.1) or cb0eb6785, and what made each stale:
26
+ - `package.json` (the version bump in this release): README.md, docs/adding-an-ai-tool.md, docs/addons/claude-mem.md, docs/memory.md, docs/operations.md, docs/quickstart.md. The declared agent-mem range is unchanged by #1777.
27
+ - `src/cli/main.ts` and `src/cli/help.ts` (#1771, `ahub ui --json`): README.md, docs/agent-notes/daemon.md, docs/agent-notes/tasks.md, docs/dogfood.md, docs/operations.md, docs/quickstart.md, docs/security.md, src/cli/help.ts.
28
+ - `test/manager-integration.test.ts`, the N-1 fixture and `test/published-protocol-compat.test.ts`: docs/agent-notes/tests.md.
29
+
30
+ I read each document for statements the changes make wrong:
31
+ - The `ahub ui` mentions in README.md, docs/operations.md and docs/quickstart.md (`--no-open`, `--all --stop`) are still true.
32
+ - docs/quickstart.md now also documents `--json` readiness and the stop receipt, and gained the "Upgrading to 0.50.0" note.
33
+ - #1771 already updated the help rows and the dogfood row. The help rows match the `ui` usage line in `src/cli/main.ts` (`[--settings] [--no-open [--json]] | --all [--no-open [--json]] | --all --stop [--json]`).
34
+ - The agent notes' CLI output and refusal rules hold for the new code.
35
+ - docs/agent-notes/tests.md's rule that fixtures read the installed release covers the N-1 retarget.
36
+ - docs/security.md's settings-session statements are unchanged.
37
+ - docs/memory.md and docs/operations.md state the declared range `>=0.42.0 <1.0.0`. docs/operations.md names 0.43.0 as the lockfile resolution (#1777) and has the new N-1 paragraph.
38
+
39
+ All 12 were restamped at 6013ade1b (the release commit) with `restamp --reviewed`.
40
+
41
+ ## Checks
42
+
43
+ - `node scripts/check-docs.mjs --require-fresh`: `docs: OK (0 stale documents)`.
44
+ - `bun x tsc --noEmit`: exit 0.
45
+ - `bun scripts/build.mjs --check`: exit 0.
46
+ - `node scripts/check-package.mjs` with npm 11.20.0 (the CI pin): `package: OK (1055 files, @staix/agent-hub@0.50.0)`.
47
+ - `test/published-protocol-compat.test.ts`, with the retargeted N-1 fixture installed from its frozen lock (0.49.1, agent-mem 0.42.0): 5 pass, 0 fail.
48
+ - The release PR's exact-head CI run is recorded on the release PR.
49
+
50
+ ## Known gaps, not blocking
51
+
52
+ - The full suite did not run locally: the remote verification host was unreachable over SSH, so exact-head CI on both OSes is the gate, for each merged PR and for this release PR.
53
+ - No running hub was upgraded to 0.50.0. Recovery with agent-mem 0.43.0 (mcp-stdio 0.5.0 as a pinned sibling) was checked only by the recovery-package suites against the installed lock, not by a live `ahub upgrade`. The person's upgrade is the live leg.
54
+ - `ahub ui --json` is covered by test/manager-integration.test.ts and was not exercised from a real launcher.
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "documents": {
4
4
  "README.md": {
5
- "verifiedAgainst": "6211d500fbdd92e600eee2d35c824ebe41a6cf81",
5
+ "verifiedAgainst": "6013ade1ba7ee949ad205757d192c920476a1aa7",
6
6
  "paths": [
7
7
  "package.json",
8
8
  "src/",
@@ -11,14 +11,14 @@
11
11
  ]
12
12
  },
13
13
  "docs/security.md": {
14
- "verifiedAgainst": "6211d500fbdd92e600eee2d35c824ebe41a6cf81",
14
+ "verifiedAgainst": "6013ade1ba7ee949ad205757d192c920476a1aa7",
15
15
  "paths": [
16
16
  "src/",
17
17
  "templates/"
18
18
  ]
19
19
  },
20
20
  "docs/operations.md": {
21
- "verifiedAgainst": "6211d500fbdd92e600eee2d35c824ebe41a6cf81",
21
+ "verifiedAgainst": "6013ade1ba7ee949ad205757d192c920476a1aa7",
22
22
  "paths": [
23
23
  "package.json",
24
24
  "src/",
@@ -35,7 +35,7 @@
35
35
  ]
36
36
  },
37
37
  "docs/quickstart.md": {
38
- "verifiedAgainst": "6211d500fbdd92e600eee2d35c824ebe41a6cf81",
38
+ "verifiedAgainst": "6013ade1ba7ee949ad205757d192c920476a1aa7",
39
39
  "paths": [
40
40
  "package.json",
41
41
  "src/",
@@ -43,7 +43,7 @@
43
43
  ]
44
44
  },
45
45
  "docs/adding-an-ai-tool.md": {
46
- "verifiedAgainst": "6211d500fbdd92e600eee2d35c824ebe41a6cf81",
46
+ "verifiedAgainst": "6013ade1ba7ee949ad205757d192c920476a1aa7",
47
47
  "paths": [
48
48
  "src/adapters/registry-types.ts",
49
49
  "src/adapters/registry.ts",
@@ -62,7 +62,7 @@
62
62
  ]
63
63
  },
64
64
  "docs/addons/claude-mem.md": {
65
- "verifiedAgainst": "6211d500fbdd92e600eee2d35c824ebe41a6cf81",
65
+ "verifiedAgainst": "6013ade1ba7ee949ad205757d192c920476a1aa7",
66
66
  "paths": [
67
67
  "src/hub/tooling.ts",
68
68
  "src/adapters/definitions/native-policy-aux.ts",
@@ -154,7 +154,7 @@
154
154
  ]
155
155
  },
156
156
  "docs/dogfood.md": {
157
- "verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
157
+ "verifiedAgainst": "6013ade1ba7ee949ad205757d192c920476a1aa7",
158
158
  "paths": [
159
159
  "src/hub/dogfood.ts",
160
160
  "src/hub/dogfood-read.ts",
@@ -189,7 +189,7 @@
189
189
  ]
190
190
  },
191
191
  "docs/memory.md": {
192
- "verifiedAgainst": "6211d500fbdd92e600eee2d35c824ebe41a6cf81",
192
+ "verifiedAgainst": "6013ade1ba7ee949ad205757d192c920476a1aa7",
193
193
  "paths": [
194
194
  "package.json",
195
195
  "src/memory/",
@@ -375,7 +375,7 @@
375
375
  ]
376
376
  },
377
377
  "docs/agent-notes/daemon.md": {
378
- "verifiedAgainst": "6211d500fbdd92e600eee2d35c824ebe41a6cf81",
378
+ "verifiedAgainst": "6013ade1ba7ee949ad205757d192c920476a1aa7",
379
379
  "paths": [
380
380
  "src/hub/daemon.ts",
381
381
  "src/hub/control-client.ts",
@@ -488,7 +488,7 @@
488
488
  ]
489
489
  },
490
490
  "docs/agent-notes/tasks.md": {
491
- "verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
491
+ "verifiedAgainst": "6013ade1ba7ee949ad205757d192c920476a1aa7",
492
492
  "paths": [
493
493
  "src/hub/tasks.ts",
494
494
  "src/hub/board.ts",
@@ -539,7 +539,7 @@
539
539
  ]
540
540
  },
541
541
  "docs/agent-notes/tests.md": {
542
- "verifiedAgainst": "6211d500fbdd92e600eee2d35c824ebe41a6cf81",
542
+ "verifiedAgainst": "6013ade1ba7ee949ad205757d192c920476a1aa7",
543
543
  "paths": [
544
544
  "test/",
545
545
  "scripts/check.sh",
@@ -577,7 +577,7 @@
577
577
  ]
578
578
  },
579
579
  "src/cli/help.ts": {
580
- "verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
580
+ "verifiedAgainst": "6013ade1ba7ee949ad205757d192c920476a1aa7",
581
581
  "paths": [
582
582
  "src/cli/main.ts",
583
583
  "src/cli/launch.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staix/agent-hub",
3
- "version": "0.49.1",
3
+ "version": "0.50.0",
4
4
  "description": "Native multi-agent hub: Claude Code, Codex, Kimi Code, Pi and local inference as peers in one project",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-hub",
3
- "version": "0.49.1",
3
+ "version": "0.50.0",
4
4
  "description": "Channel between Claude Code and the agent-hub daemon: peer messages from Codex, Kimi and the local worker arrive as channel events; hub_send replies.",
5
5
  "author": {
6
6
  "name": "Young Joon Lee",
@@ -14818,7 +14818,7 @@ var package_default;
14818
14818
  var init_package = __esm(() => {
14819
14819
  package_default = {
14820
14820
  name: "@staix/agent-hub",
14821
- version: "0.49.1",
14821
+ version: "0.50.0",
14822
14822
  description: "Native multi-agent hub: Claude Code, Codex, Kimi Code, Pi and local inference as peers in one project",
14823
14823
  license: "MIT",
14824
14824
  type: "module",
@@ -15021,6 +15021,9 @@ var init_review_comments = __esm(() => {
15021
15021
  init_review_anchor();
15022
15022
  });
15023
15023
 
15024
+ // node_modules/@staix/agent-mem/src/memory/purge-intent.ts
15025
+ var init_purge_intent = () => {};
15026
+
15024
15027
  // node_modules/@staix/agent-mem/src/memory/recap-scratch.ts
15025
15028
  var RECAP_SCRATCH;
15026
15029
  var init_recap_scratch = __esm(() => {
@@ -15206,6 +15209,7 @@ var init_public_prune_input_chain = __esm(() => {
15206
15209
  // node_modules/@staix/agent-mem/src/memory/sync-placement-active.ts
15207
15210
  var pruneAdvanceMemo, shardProofs, snapshotBindings;
15208
15211
  var init_sync_placement_active = __esm(() => {
15212
+ init_purge_intent();
15209
15213
  init_profile_marker_cache();
15210
15214
  init_generation();
15211
15215
  init_platform();
@@ -15224,6 +15228,7 @@ var init_sync_placement_active = __esm(() => {
15224
15228
  // node_modules/@staix/agent-mem/src/memory/mutation.ts
15225
15229
  var mutations;
15226
15230
  var init_mutation = __esm(() => {
15231
+ init_purge_intent();
15227
15232
  init_platform();
15228
15233
  mutations = new WeakMap;
15229
15234
  });
@@ -15232,6 +15237,7 @@ var init_mutation = __esm(() => {
15232
15237
  import { closeSync as closeSync9, constants as constants8, fstatSync as fstatSync8, lstatSync as lstatSync20, openSync as openSync9, readFileSync as readFileSync8, readSync as readSync6 } from "fs";
15233
15238
  var MAX_BYTES4, SEMVER, READER_VERSION, floorMemo;
15234
15239
  var init_formats = __esm(() => {
15240
+ init_purge_intent();
15235
15241
  MAX_BYTES4 = 64 * 1024;
15236
15242
  SEMVER = /^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/;
15237
15243
  READER_VERSION = (() => {
@@ -15485,6 +15491,7 @@ function readMarkerUncached(file) {
15485
15491
  }
15486
15492
  var doctorContext, PLACEMENT_STAGE1_REFUSAL = "sync placement v3 requires matching durable activation metadata; keep the current compatible profile active until person-authorized activation is complete", PLACEMENT_MARKER_REFUSAL = "sync placement metadata is invalid or unsupported; person inspection and a compatible reader are required before continuing", SyncPlacementRuntimeError, MarkerChanged, readMarker;
15487
15493
  var init_sync_placement_guard = __esm(() => {
15494
+ init_purge_intent();
15488
15495
  init_profile_marker_cache();
15489
15496
  init_sync_placement_active();
15490
15497
  init_sync_placement_realm_effective();
@@ -15824,6 +15831,7 @@ var init_capture_input = __esm(() => {
15824
15831
  // node_modules/@staix/agent-mem/src/memory/capture.ts
15825
15832
  var SPOOL_MAX_BYTES;
15826
15833
  var init_capture = __esm(() => {
15834
+ init_purge_intent();
15827
15835
  init_brief_cache();
15828
15836
  init_formats();
15829
15837
  init_screen();
@@ -15922,6 +15930,7 @@ var init_migrate = __esm(() => {
15922
15930
  // node_modules/@staix/agent-mem/src/memory/reader-lease.ts
15923
15931
  var open;
15924
15932
  var init_reader_lease = __esm(() => {
15933
+ init_purge_intent();
15925
15934
  init_generation();
15926
15935
  init_mutation();
15927
15936
  init_platform();
@@ -15942,10 +15951,10 @@ var init_metrics = __esm(() => {
15942
15951
  SEARCH_BYTES = 30 * 1024;
15943
15952
  PHASE_BYTES = 6 * 1024;
15944
15953
  });
15945
-
15946
15954
  // node_modules/@staix/agent-mem/src/memory/store.ts
15947
15955
  var DEFAULT_TTL_MS, UNSETTLED_MS, DEFAULT_LEASE_MS, MIGRATION_BOOTSTRAP, curatedDepth, curatedPending, curatedRecovery;
15948
15956
  var init_store = __esm(() => {
15957
+ init_purge_intent();
15949
15958
  init_recap_scratch();
15950
15959
  init_brief_curated();
15951
15960
  init_curated_cache_state();
@@ -16175,6 +16184,7 @@ var init_topic = __esm(() => {
16175
16184
  // node_modules/@staix/agent-mem/src/memory/candidates.ts
16176
16185
  var CANDIDATE_RETENTION, COUNTER_RETENTION;
16177
16186
  var init_candidates = __esm(() => {
16187
+ init_purge_intent();
16178
16188
  init_formats();
16179
16189
  init_candidate_pending();
16180
16190
  init_note_add();
@@ -16250,6 +16260,7 @@ var init_sync_binding = () => {};
16250
16260
  // node_modules/@staix/agent-mem/src/memory/sync.ts
16251
16261
  var liveGroups;
16252
16262
  var init_sync = __esm(() => {
16263
+ init_purge_intent();
16253
16264
  init_sync_placement_guard();
16254
16265
  init_formats();
16255
16266
  init_generation();
@@ -16697,6 +16708,7 @@ var init_brief_curated_native = __esm(() => {
16697
16708
 
16698
16709
  // node_modules/@staix/agent-mem/src/memory/home-binding-fence.ts
16699
16710
  var init_home_binding_fence = __esm(() => {
16711
+ init_purge_intent();
16700
16712
  init_public_prune_view();
16701
16713
  });
16702
16714
 
@@ -17381,6 +17393,18 @@ var init_sync_placement_writer_context = __esm(() => {
17381
17393
  init_sync_placement_refusal_category();
17382
17394
  });
17383
17395
 
17396
+ // node_modules/@staix/agent-mem/src/memory/read-curated-entries.ts
17397
+ var FRESHNESS_HASH_BYTES;
17398
+ var init_read_curated_entries = __esm(() => {
17399
+ init_formats();
17400
+ init_lifecycle();
17401
+ init_purge_intent();
17402
+ init_generation();
17403
+ init_shard();
17404
+ init_store();
17405
+ FRESHNESS_HASH_BYTES = 16 * 1024 * 1024;
17406
+ });
17407
+
17384
17408
  // node_modules/@staix/agent-mem/src/index.ts
17385
17409
  var init_src2 = __esm(() => {
17386
17410
  init_platform();
@@ -17406,6 +17430,7 @@ var init_src2 = __esm(() => {
17406
17430
  init_capture_input();
17407
17431
  init_record_instruction();
17408
17432
  init_skills_install();
17433
+ init_read_curated_entries();
17409
17434
  init_store();
17410
17435
  init_capture();
17411
17436
  init_shard();
@@ -14799,7 +14799,7 @@ var package_default;
14799
14799
  var init_package = __esm(() => {
14800
14800
  package_default = {
14801
14801
  name: "@staix/agent-hub",
14802
- version: "0.49.1",
14802
+ version: "0.50.0",
14803
14803
  description: "Native multi-agent hub: Claude Code, Codex, Kimi Code, Pi and local inference as peers in one project",
14804
14804
  license: "MIT",
14805
14805
  type: "module",
@@ -15002,6 +15002,9 @@ var init_review_comments = __esm(() => {
15002
15002
  init_review_anchor();
15003
15003
  });
15004
15004
 
15005
+ // node_modules/@staix/agent-mem/src/memory/purge-intent.ts
15006
+ var init_purge_intent = () => {};
15007
+
15005
15008
  // node_modules/@staix/agent-mem/src/memory/recap-scratch.ts
15006
15009
  var RECAP_SCRATCH;
15007
15010
  var init_recap_scratch = __esm(() => {
@@ -15187,6 +15190,7 @@ var init_public_prune_input_chain = __esm(() => {
15187
15190
  // node_modules/@staix/agent-mem/src/memory/sync-placement-active.ts
15188
15191
  var pruneAdvanceMemo, shardProofs, snapshotBindings;
15189
15192
  var init_sync_placement_active = __esm(() => {
15193
+ init_purge_intent();
15190
15194
  init_profile_marker_cache();
15191
15195
  init_generation();
15192
15196
  init_platform();
@@ -15205,6 +15209,7 @@ var init_sync_placement_active = __esm(() => {
15205
15209
  // node_modules/@staix/agent-mem/src/memory/mutation.ts
15206
15210
  var mutations;
15207
15211
  var init_mutation = __esm(() => {
15212
+ init_purge_intent();
15208
15213
  init_platform();
15209
15214
  mutations = new WeakMap;
15210
15215
  });
@@ -15213,6 +15218,7 @@ var init_mutation = __esm(() => {
15213
15218
  import { closeSync as closeSync9, constants as constants8, fstatSync as fstatSync8, lstatSync as lstatSync20, openSync as openSync9, readFileSync as readFileSync8, readSync as readSync6 } from "fs";
15214
15219
  var MAX_BYTES4, SEMVER, READER_VERSION, floorMemo;
15215
15220
  var init_formats = __esm(() => {
15221
+ init_purge_intent();
15216
15222
  MAX_BYTES4 = 64 * 1024;
15217
15223
  SEMVER = /^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/;
15218
15224
  READER_VERSION = (() => {
@@ -15466,6 +15472,7 @@ function readMarkerUncached(file) {
15466
15472
  }
15467
15473
  var doctorContext, PLACEMENT_STAGE1_REFUSAL = "sync placement v3 requires matching durable activation metadata; keep the current compatible profile active until person-authorized activation is complete", PLACEMENT_MARKER_REFUSAL = "sync placement metadata is invalid or unsupported; person inspection and a compatible reader are required before continuing", SyncPlacementRuntimeError, MarkerChanged, readMarker;
15468
15474
  var init_sync_placement_guard = __esm(() => {
15475
+ init_purge_intent();
15469
15476
  init_profile_marker_cache();
15470
15477
  init_sync_placement_active();
15471
15478
  init_sync_placement_realm_effective();
@@ -15805,6 +15812,7 @@ var init_capture_input = __esm(() => {
15805
15812
  // node_modules/@staix/agent-mem/src/memory/capture.ts
15806
15813
  var SPOOL_MAX_BYTES;
15807
15814
  var init_capture = __esm(() => {
15815
+ init_purge_intent();
15808
15816
  init_brief_cache();
15809
15817
  init_formats();
15810
15818
  init_screen();
@@ -15903,6 +15911,7 @@ var init_migrate = __esm(() => {
15903
15911
  // node_modules/@staix/agent-mem/src/memory/reader-lease.ts
15904
15912
  var open;
15905
15913
  var init_reader_lease = __esm(() => {
15914
+ init_purge_intent();
15906
15915
  init_generation();
15907
15916
  init_mutation();
15908
15917
  init_platform();
@@ -15923,10 +15932,10 @@ var init_metrics = __esm(() => {
15923
15932
  SEARCH_BYTES = 30 * 1024;
15924
15933
  PHASE_BYTES = 6 * 1024;
15925
15934
  });
15926
-
15927
15935
  // node_modules/@staix/agent-mem/src/memory/store.ts
15928
15936
  var DEFAULT_TTL_MS, UNSETTLED_MS, DEFAULT_LEASE_MS, MIGRATION_BOOTSTRAP, curatedDepth, curatedPending, curatedRecovery;
15929
15937
  var init_store = __esm(() => {
15938
+ init_purge_intent();
15930
15939
  init_recap_scratch();
15931
15940
  init_brief_curated();
15932
15941
  init_curated_cache_state();
@@ -16156,6 +16165,7 @@ var init_topic = __esm(() => {
16156
16165
  // node_modules/@staix/agent-mem/src/memory/candidates.ts
16157
16166
  var CANDIDATE_RETENTION, COUNTER_RETENTION;
16158
16167
  var init_candidates = __esm(() => {
16168
+ init_purge_intent();
16159
16169
  init_formats();
16160
16170
  init_candidate_pending();
16161
16171
  init_note_add();
@@ -16231,6 +16241,7 @@ var init_sync_binding = () => {};
16231
16241
  // node_modules/@staix/agent-mem/src/memory/sync.ts
16232
16242
  var liveGroups;
16233
16243
  var init_sync = __esm(() => {
16244
+ init_purge_intent();
16234
16245
  init_sync_placement_guard();
16235
16246
  init_formats();
16236
16247
  init_generation();
@@ -16678,6 +16689,7 @@ var init_brief_curated_native = __esm(() => {
16678
16689
 
16679
16690
  // node_modules/@staix/agent-mem/src/memory/home-binding-fence.ts
16680
16691
  var init_home_binding_fence = __esm(() => {
16692
+ init_purge_intent();
16681
16693
  init_public_prune_view();
16682
16694
  });
16683
16695
 
@@ -17362,6 +17374,18 @@ var init_sync_placement_writer_context = __esm(() => {
17362
17374
  init_sync_placement_refusal_category();
17363
17375
  });
17364
17376
 
17377
+ // node_modules/@staix/agent-mem/src/memory/read-curated-entries.ts
17378
+ var FRESHNESS_HASH_BYTES;
17379
+ var init_read_curated_entries = __esm(() => {
17380
+ init_formats();
17381
+ init_lifecycle();
17382
+ init_purge_intent();
17383
+ init_generation();
17384
+ init_shard();
17385
+ init_store();
17386
+ FRESHNESS_HASH_BYTES = 16 * 1024 * 1024;
17387
+ });
17388
+
17365
17389
  // node_modules/@staix/agent-mem/src/index.ts
17366
17390
  var init_src2 = __esm(() => {
17367
17391
  init_platform();
@@ -17387,6 +17411,7 @@ var init_src2 = __esm(() => {
17387
17411
  init_capture_input();
17388
17412
  init_record_instruction();
17389
17413
  init_skills_install();
17414
+ init_read_curated_entries();
17390
17415
  init_store();
17391
17416
  init_capture();
17392
17417
  init_shard();
package/src/cli/help.ts CHANGED
@@ -220,10 +220,10 @@ const SECTIONS: [string, [usage: string, description: string][]][] = [
220
220
  ["ahub facts --hook", "turn-free facts as a Claude Code PreToolUse, PostToolUse and Stop hook (issue #108); never blocks"],
221
221
  ]],
222
222
  ["Dashboard", [
223
- ["ahub ui [--no-open]", "open the local dashboard with configured attention character (or print its one-time link)"],
224
- ["ahub ui --settings [--no-open]", "human only: open it with a settings session, which for 15 minutes may change permission modes, routing, start settings and structural config"],
225
- ["ahub ui --all [--no-open]", "open the unified project dashboard"],
226
- ["ahub ui --all --stop", "stop only the dashboard manager"],
223
+ ["ahub ui [--no-open [--json]]", "open the local dashboard with configured attention character (or print its one-time link; --no-open --json prints readiness)"],
224
+ ["ahub ui --settings [--no-open [--json]]", "human only: open it with a settings session, which for 15 minutes may change permission modes, routing, start settings and structural config"],
225
+ ["ahub ui --all [--no-open [--json]]", "open the unified project dashboard; --no-open --json prints readiness"],
226
+ ["ahub ui --all --stop [--json]", "stop only the dashboard manager; --json prints a stop receipt"],
227
227
  ["ahub manager", "internal: the dashboard manager process that ahub ui --all starts"],
228
228
  ]],
229
229
  ];
package/src/cli/main.ts CHANGED
@@ -273,7 +273,7 @@ const projectConfig = () => {
273
273
  return config;
274
274
  };
275
275
  const stateDir = selected.stateDir;
276
- var operationalAuditReady=false, operationalRefusalRecorded=false;
276
+ var operationalAuditReady=false, operationalRefusalRecorded=false, jsonBlockers=false;
277
277
  const caller = declaredInstances ? detectCliIdentity(process.env, declaredInstances) : unboundCaller;
278
278
  const commandLabel = cmd === "guidance" && args[0] === "probe" && ["register", "start", "show", "receipts", "cancel"].includes(args[1] ?? "")
279
279
  ? `guidance probe ${args[1]}` : cliCommandLabel(cmd, args, projectCatalog);
@@ -600,7 +600,8 @@ function warn(message: string, next?: string): void { warnLine(message, next); }
600
600
  */
601
601
  function fail(message: string, refusalAudited=false, authorityRefused?:boolean, next?: string): never {
602
602
  if(operationalAuditReady && authorityRefused!==false){if(refusalAudited)operationalRefusalRecorded=true;if(!operationalRefusalRecorded)audit("refused");}
603
- console.error(errorLines(message, next, !!process.stderr.isTTY, asciiMarkers(process.env, process.argv.includes("--ascii"))).join("\n"));
603
+ if (jsonBlockers) console.error(errorLines(`blocker: ${terminalText(message)}`, undefined, false, false).join("\n"));
604
+ else console.error(errorLines(message, next, !!process.stderr.isTTY, asciiMarkers(process.env, process.argv.includes("--ascii"))).join("\n"));
604
605
  process.exit(failureExitCode(message));
605
606
  }
606
607
  function operationalIncomplete(result: {complete?:boolean;incompleteReason?:unknown;truncated?:boolean}, history: "log"|"event"): void {
@@ -1181,17 +1182,25 @@ const commands: Record<string, (receiptOutput?: SdlcReceiptOutput) => Promise<vo
1181
1182
  },
1182
1183
 
1183
1184
  ui: async () => {
1184
- if (args.some((arg) => !["--no-open", "--all", "--stop", "--settings"].includes(arg))) fail("usage: ahub ui [--settings] [--no-open] | --all [--no-open] | --all --stop");
1185
+ const display = { json: args.includes("--json") };
1186
+ jsonBlockers = display.json;
1187
+ const all = args.includes("--all");
1188
+ const stop = args.includes("--stop"), noOpen = args.includes("--no-open");
1189
+ const invalid = args.some(arg => !["--no-open", "--all", "--stop", "--settings", "--json"].includes(arg));
1190
+ if (display.json && (invalid || (stop ? !all || noOpen : !noOpen)))
1191
+ fail("usage: ahub ui [--settings] [--no-open [--json]] | --all [--no-open [--json]] | --all --stop [--json]");
1192
+ if (invalid) fail("usage: ahub ui [--settings] [--no-open] | --all [--no-open] | --all --stop");
1185
1193
  // #269: a settings session belongs to one project's hub; the unified dashboard stays an ordinary session.
1186
1194
  const settings = args.includes("--settings");
1187
- if (settings && args.includes("--all")) fail("ahub ui --settings opens one project's dashboard; run it without --all");
1188
- if (args.includes("--stop")) {
1189
- if (!args.includes("--all") || args.includes("--no-open")) fail("usage: ahub ui --all --stop");
1195
+ if (settings && all) fail("ahub ui --settings opens one project's dashboard; run it without --all");
1196
+ if (stop) {
1197
+ if (!all || noOpen) fail("usage: ahub ui --all --stop");
1190
1198
  await stopManager();
1199
+ if (display.json) return console.log(JSON.stringify({ ok: true, stopped: true }));
1191
1200
  return console.log("dashboard manager stopped; project hubs were kept running");
1192
1201
  }
1193
1202
  let url: string;
1194
- if (args.includes("--all")) url = await openManager({ liveTest: !!delegatedPeer });
1203
+ if (all) url = await openManager({ liveTest: !!delegatedPeer });
1195
1204
  else {
1196
1205
  const hub = await connect();
1197
1206
  try {
@@ -1204,6 +1213,9 @@ const commands: Record<string, (receiptOutput?: SdlcReceiptOutput) => Promise<vo
1204
1213
  } finally { hub.close(); }
1205
1214
  }
1206
1215
  if (settings) warn("Settings session: for 15 minutes this dashboard session may change permission modes, routing and start settings");
1216
+ if (display.json) return console.log(JSON.stringify({
1217
+ ok: true, url, origin: new URL(url).origin, mode: all ? "manager" : "hub", settings,
1218
+ }));
1207
1219
  if (args.includes("--no-open")) return console.log(url);
1208
1220
  const opener = process.platform === "darwin" ? "open" : "xdg-open";
1209
1221
  const opened = spawnSync(opener, [url], { stdio: "ignore", timeout: 10_000 });