@staix/agent-hub 0.48.3 → 0.49.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 +20 -0
- package/README.md +1 -1
- package/docs/agent-notes/daemon.md +2 -2
- package/docs/agent-notes/tasks.md +1 -1
- package/docs/design/adapters.md +4 -7
- package/docs/design/agent-hub-architecture.md +1 -1
- package/docs/design/agent-hub.md +1 -1
- package/docs/design/bus.md +2 -2
- package/docs/design/cli-output-inventory.md +39 -38
- package/docs/design/cli-output.md +7 -3
- package/docs/design/guidance-experiments.md +3 -1
- package/docs/design/guidance-probes.md +33 -31
- package/docs/design/model-routes.md +11 -14
- package/docs/design/roadmap.md +10 -9
- package/docs/design/supervision.md +6 -6
- package/docs/design/task-board.md +2 -2
- package/docs/dogfood.md +1 -1
- package/docs/operations.md +12 -7
- package/docs/quickstart.md +19 -1
- package/docs/roadmap.json +519 -1
- package/docs/roadmap.md +94 -0
- package/docs/security.md +3 -1
- package/docs/verification/2026-11-26-compat-pi-1.6.1.md +28 -0
- package/docs/verification/2026-11-27-0.48.4.md +37 -0
- package/docs/verification/2026-11-28-0.49.0.md +53 -0
- package/docs/verified.json +19 -19
- package/package.json +1 -1
- package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-hub/kimi-hook.js +29 -4
- package/plugins/agent-hub/server.js +34 -5
- package/src/adapters/channel-peer.ts +5 -2
- package/src/adapters/claude-channel.ts +1 -0
- package/src/adapters/compat.ts +4 -4
- package/src/adapters/definitions/native-cli-entry-claude.ts +22 -1
- package/src/cli/agents-output.ts +13 -0
- package/src/cli/agents.ts +16 -7
- package/src/cli/answer-output.ts +67 -0
- package/src/cli/broker.ts +9 -2
- package/src/cli/launch.ts +1 -1
- package/src/cli/main.ts +96 -127
- package/src/cli/recovery-package.ts +78 -26
- package/src/cli/reset-output.ts +50 -0
- package/src/cli/sdlc-output.ts +57 -0
- package/src/cli/settings-output.ts +80 -0
- package/src/hub/check-runner.ts +7 -3
- package/src/hub/claude-launch-proof.ts +12 -2
- package/src/hub/claude-state.ts +3 -0
- package/src/hub/control-client.ts +2 -0
- package/src/hub/daemon.ts +102 -40
- package/src/hub/memory-profile.ts +12 -1
- package/src/hub/roadmap-export.ts +12 -9
- package/src/hub/roadmap-issue-states.ts +35 -0
- package/src/hub/runtime-capture-prune.ts +21 -6
- package/src/hub/runtime-package-assets.ts +6 -0
- package/src/hub/supervision-proposals.ts +3 -3
- package/src/hub/supervision-rules.ts +2 -2
- package/src/hub/task-sweep.ts +1 -1
- package/src/hub/tasks.ts +37 -20
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# 0.49.0 release verification
|
|
2
|
+
|
|
3
|
+
This record covers release preparation and source review. It claims no installation, no running-hub upgrade to 0.49.0 and no live TUI launch.
|
|
4
|
+
|
|
5
|
+
## Candidate
|
|
6
|
+
|
|
7
|
+
Version 0.49.0, prepared from main 4b342946 (17 commits since v0.48.4, 0 of them `feat`; bump rule: patch). The person instructed 0.49.0 by name, and `release-prepare --version 0.49.0` accepts a version above the rule, so this is a minor release with the release N-1 retarget below. 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.48.4: #1767, #1765, #1730, #1766, #1764, #1763, #1761, #1762, #1760, #1759, #1758, #1757, #1756, #1755, #1750, #1752.
|
|
12
|
+
|
|
13
|
+
- Hub-reviewed and squash-merged at the approved head, with exact-head full CI green on both OSes after `gh pr ready` (each draft run's deferred macOS failure was superseded by a passing full run at the same head):
|
|
14
|
+
- #1750 (hub task 1157), #1755 (hub task 1162), #1756 (hub task 1166), #1758 (hub task 1170), #1759 (hub task 1172), #1760 (hub task 1171), #1761 (hub task 1174), #1762 (hub task 1173), #1763 (hub task 1177), #1764 (hub task 1176), #1765 (hub task 1178), #1766 (hub task 1179) and #1767 (hub task 1180): codex implemented, claude reviewed.
|
|
15
|
+
- #1757 (hub task 1169): claude implemented, codex reviewed.
|
|
16
|
+
- Merged without a hub task: #1752 (the risk tier table chore for the dogfood, Refs #1645) and #1730 (the compat publisher's Pi 1.6.1 receipt; the conductor added the test, trust note and bundle updates in f97adbd29, and the PR was reopened so CI ran). Both merged at an exact head with full CI green on both OSes.
|
|
17
|
+
- #1765's first full run had one Ubuntu failure in `test/conductor-recovery-process.test.ts`, which passed on a rerun of the failed job; the same head had been green in its draft run.
|
|
18
|
+
- No merge was bound to an approval at an earlier head: each task's recorded commit equals its PR's merged head. No connector review was posted on these PRs, and each had zero unresolved threads at merge.
|
|
19
|
+
|
|
20
|
+
## Native acceptance receipts
|
|
21
|
+
|
|
22
|
+
Receipts added under `docs/verification/` since v0.48.4: `docs/verification/2026-11-26-compat-pi-1.6.1.md`.
|
|
23
|
+
|
|
24
|
+
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.49.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.
|
|
25
|
+
|
|
26
|
+
## Document review
|
|
27
|
+
|
|
28
|
+
`node scripts/check-docs.mjs` reported 19 documents stale. Each was read against the commits under its covered paths and restamped at b39967f09; corrections were committed first in the release commits.
|
|
29
|
+
|
|
30
|
+
- Corrected:
|
|
31
|
+
- docs/operations.md: the Pi verified list (1.6.0 and 1.6.1 were missing), the background orphan sweep and spec probe at startup (#1445), live roadmap issue states for `roadmap check` and `export` (#1754), and the 0.49.x release N-1 statement.
|
|
32
|
+
- docs/security.md: Guidance probes now says how a Claude conductor's native session is attested (#1751).
|
|
33
|
+
- docs/agent-notes/daemon.md: prune and recovery share one reviewed asset table, `MEMORY_RUNTIME_LAYOUTS` (#1737).
|
|
34
|
+
- docs/agent-notes/tasks.md: live roadmap issue states come only from `roadmapIssueStates` (#1754).
|
|
35
|
+
- docs/dogfood.md: the shared-Report row lists the #1724 batch 2 to 6 commands.
|
|
36
|
+
- docs/quickstart.md: the Upgrading to 0.49.0 note.
|
|
37
|
+
- Read, no change needed: README.md, src/cli/help.ts (no command, subcommand or flag was added; `settings backups --json` was already listed), docs/sdlc.md, docs/events.md, docs/memory.md, docs/adding-an-ai-tool.md, docs/addons/claude-mem.md, and the README, adapters, budget, bus, security-review and tests agent notes. The Report refactors kept their output text, and no stale document quoted the old lines.
|
|
38
|
+
|
|
39
|
+
## Checks
|
|
40
|
+
|
|
41
|
+
- `node scripts/check-docs.mjs --require-fresh`: docs: OK (0 stale documents).
|
|
42
|
+
- `bun x tsc --noEmit`: exit 0.
|
|
43
|
+
- `bun scripts/build.mjs --check`: exit 0. `bun scripts/cli-output-inventory.ts --check`: exit 0.
|
|
44
|
+
- `node scripts/check-package.mjs` with the workflow's npm 11.20.0: package: OK (1053 files, @staix/agent-hub@0.49.0).
|
|
45
|
+
- `bun test test/published-protocol-compat.test.ts` against the retargeted release N-1 fixture (0.48.4, agent-mem 0.39.0) and the protocol-16 fixture: 5 pass, 0 fail.
|
|
46
|
+
- The release PR's exact-head CI run is recorded on the PR.
|
|
47
|
+
|
|
48
|
+
## Known gaps, not blocking
|
|
49
|
+
|
|
50
|
+
- The full suite was not run locally (heavy tests run on CI or dgx02 only, and `dot remote verify` deferred with exit 75 for SSH reachability during this cycle); the release PR's exact-head CI is the full gate.
|
|
51
|
+
- The startup gain from #1445 is measured only on the slow-runner fixture (`task_checks` 2 ms); the running hub's own `startup timings ms:` line waits for an upgrade and restart, so #1445 stays open.
|
|
52
|
+
- The agent-mem release that carries the mcp-stdio and agent-hosts pins (#1737) is cut in agent-mem's own repository after this release ships. Until a hub runs 0.49.0, an older hub's recovery still refuses those pins.
|
|
53
|
+
- Carried from earlier releases: `hub_readback_report` is not on the review-capture exclusion list (src/hub/memory-policy.ts).
|
package/docs/verified.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"documents": {
|
|
4
4
|
"README.md": {
|
|
5
|
-
"verifiedAgainst": "
|
|
5
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
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": "
|
|
14
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
15
15
|
"paths": [
|
|
16
16
|
"src/",
|
|
17
17
|
"templates/"
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"docs/operations.md": {
|
|
21
|
-
"verifiedAgainst": "
|
|
21
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
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": "
|
|
38
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
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": "
|
|
46
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
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": "
|
|
65
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
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": "
|
|
157
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
158
158
|
"paths": [
|
|
159
159
|
"src/hub/dogfood.ts",
|
|
160
160
|
"src/hub/dogfood-read.ts",
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
]
|
|
177
177
|
},
|
|
178
178
|
"docs/events.md": {
|
|
179
|
-
"verifiedAgainst": "
|
|
179
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
180
180
|
"paths": [
|
|
181
181
|
"src/hub/events.ts",
|
|
182
182
|
"src/hub/attribution.ts",
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
]
|
|
190
190
|
},
|
|
191
191
|
"docs/memory.md": {
|
|
192
|
-
"verifiedAgainst": "
|
|
192
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
193
193
|
"paths": [
|
|
194
194
|
"package.json",
|
|
195
195
|
"src/memory/",
|
|
@@ -244,7 +244,7 @@
|
|
|
244
244
|
]
|
|
245
245
|
},
|
|
246
246
|
"docs/sdlc.md": {
|
|
247
|
-
"verifiedAgainst": "
|
|
247
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
248
248
|
"paths": [
|
|
249
249
|
"src/hub/sdlc.ts",
|
|
250
250
|
"src/hub/sdlc-merge.ts",
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
]
|
|
286
286
|
},
|
|
287
287
|
"docs/agent-notes/adapters.md": {
|
|
288
|
-
"verifiedAgainst": "
|
|
288
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
289
289
|
"paths": [
|
|
290
290
|
"src/adapters/",
|
|
291
291
|
"src/pi/",
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
]
|
|
337
337
|
},
|
|
338
338
|
"docs/agent-notes/budget.md": {
|
|
339
|
-
"verifiedAgainst": "
|
|
339
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
340
340
|
"paths": [
|
|
341
341
|
"src/hub/budget.ts",
|
|
342
342
|
"src/cli/statusline-tee.ts",
|
|
@@ -360,7 +360,7 @@
|
|
|
360
360
|
]
|
|
361
361
|
},
|
|
362
362
|
"docs/agent-notes/bus.md": {
|
|
363
|
-
"verifiedAgainst": "
|
|
363
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
364
364
|
"paths": [
|
|
365
365
|
"src/hub/bus.ts",
|
|
366
366
|
"src/hub/envelope.ts",
|
|
@@ -375,7 +375,7 @@
|
|
|
375
375
|
]
|
|
376
376
|
},
|
|
377
377
|
"docs/agent-notes/daemon.md": {
|
|
378
|
-
"verifiedAgainst": "
|
|
378
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
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": "
|
|
491
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
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": "
|
|
542
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
543
543
|
"paths": [
|
|
544
544
|
"test/",
|
|
545
545
|
"scripts/check.sh",
|
|
@@ -568,7 +568,7 @@
|
|
|
568
568
|
]
|
|
569
569
|
},
|
|
570
570
|
"docs/agent-notes/README.md": {
|
|
571
|
-
"verifiedAgainst": "
|
|
571
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
572
572
|
"paths": [
|
|
573
573
|
"src/cli/console-state.ts",
|
|
574
574
|
"src/cli/attention.ts",
|
|
@@ -577,7 +577,7 @@
|
|
|
577
577
|
]
|
|
578
578
|
},
|
|
579
579
|
"src/cli/help.ts": {
|
|
580
|
-
"verifiedAgainst": "
|
|
580
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
581
581
|
"paths": [
|
|
582
582
|
"src/cli/main.ts",
|
|
583
583
|
"src/cli/launch.ts",
|
|
@@ -596,7 +596,7 @@
|
|
|
596
596
|
]
|
|
597
597
|
},
|
|
598
598
|
"docs/agent-notes/security-review.md": {
|
|
599
|
-
"verifiedAgainst": "
|
|
599
|
+
"verifiedAgainst": "cb0eb6785b401d04942ec87f4d7d995250157570",
|
|
600
600
|
"paths": [
|
|
601
601
|
"src/hub/envelope.ts",
|
|
602
602
|
"src/hub/conductor.ts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-hub",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.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",
|
|
@@ -89,6 +89,7 @@ var init_native_channel_state = __esm(() => {
|
|
|
89
89
|
});
|
|
90
90
|
|
|
91
91
|
// src/hub/claude-state.ts
|
|
92
|
+
var isClaudeSessionUuid = (value) => typeof value === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value);
|
|
92
93
|
var init_claude_state = __esm(() => {
|
|
93
94
|
init_native_channel_state();
|
|
94
95
|
});
|
|
@@ -365,13 +366,13 @@ var init_compat = __esm(() => {
|
|
|
365
366
|
COMPAT = {
|
|
366
367
|
pi: {
|
|
367
368
|
label: "Pi",
|
|
368
|
-
verified: ["1.4.0", "1.5.0", "1.5.2", "1.6.0"],
|
|
369
|
+
verified: ["1.4.0", "1.5.0", "1.5.2", "1.6.0", "1.6.1"],
|
|
369
370
|
gate: "contract",
|
|
370
371
|
probe: ["pi", "--version"],
|
|
371
372
|
config: "pi.cmd",
|
|
372
373
|
parse: (out) => plain(out.trim()),
|
|
373
|
-
trustNote: "The model-free extension load, RPC session identity and managed tool receipt path were checked on 1.4.0, 1.5.0, 1.5.2 and 1.6.
|
|
374
|
-
receipt: "docs/verification/2026-11-
|
|
374
|
+
trustNote: "The model-free extension load, RPC session identity and managed tool receipt path were checked on 1.4.0, 1.5.0, 1.5.2, 1.6.0 and 1.6.1. Permissions remain host-owned; account-backed inference and another version's extension contract are unverified.",
|
|
375
|
+
receipt: "docs/verification/2026-11-26-compat-pi-1.6.1.md"
|
|
375
376
|
},
|
|
376
377
|
"claude-implementer": {
|
|
377
378
|
label: "Claude headless implementer",
|
|
@@ -14817,7 +14818,7 @@ var package_default;
|
|
|
14817
14818
|
var init_package = __esm(() => {
|
|
14818
14819
|
package_default = {
|
|
14819
14820
|
name: "@staix/agent-hub",
|
|
14820
|
-
version: "0.
|
|
14821
|
+
version: "0.49.0",
|
|
14821
14822
|
description: "Native multi-agent hub: Claude Code, Codex, Kimi Code, Pi and local inference as peers in one project",
|
|
14822
14823
|
license: "MIT",
|
|
14823
14824
|
type: "module",
|
|
@@ -21942,6 +21943,27 @@ function builtinCliEntries(definitions) {
|
|
|
21942
21943
|
import { readFileSync as readFileSync11 } from "fs";
|
|
21943
21944
|
import { join as join24 } from "path";
|
|
21944
21945
|
import { randomUUID as randomUUID10 } from "crypto";
|
|
21946
|
+
function managedSession(nativeArgs) {
|
|
21947
|
+
const separator = nativeArgs.indexOf("--");
|
|
21948
|
+
const options = separator < 0 ? nativeArgs : nativeArgs.slice(0, separator);
|
|
21949
|
+
const values = (names) => options.flatMap((arg, index) => {
|
|
21950
|
+
if (names.includes(arg))
|
|
21951
|
+
return [options[index + 1]];
|
|
21952
|
+
const name = names.find((value) => arg.startsWith(value + "="));
|
|
21953
|
+
return name ? [arg.slice(name.length + 1)] : [];
|
|
21954
|
+
});
|
|
21955
|
+
const explicit = values(["--session-id"]);
|
|
21956
|
+
const resume = values(["--resume", "-r"]);
|
|
21957
|
+
if (explicit.length)
|
|
21958
|
+
return explicit.length === 1 && isClaudeSessionUuid(explicit[0]) ? explicit[0] : undefined;
|
|
21959
|
+
if (options.some((arg) => ["-c", "--continue", "--from-pr", "--teleport", "--fork-session"].some((flag) => arg === flag || arg.startsWith(flag + "="))))
|
|
21960
|
+
return;
|
|
21961
|
+
if (resume.length)
|
|
21962
|
+
return resume.length === 1 && isClaudeSessionUuid(resume[0]) ? resume[0] : undefined;
|
|
21963
|
+
const id = randomUUID10();
|
|
21964
|
+
nativeArgs.unshift("--session-id", id);
|
|
21965
|
+
return id;
|
|
21966
|
+
}
|
|
21945
21967
|
async function runClaudeEntry(ctx) {
|
|
21946
21968
|
const { args, cwd, stateDir, cliDir, unattendedEnv, projectConfig, fail } = ctx;
|
|
21947
21969
|
const peer = ctx.instance ?? "claude";
|
|
@@ -22007,6 +22029,9 @@ async function runClaudeEntry(ctx) {
|
|
|
22007
22029
|
let launchRecord;
|
|
22008
22030
|
if (control?.instanceId) {
|
|
22009
22031
|
launchRecord = { ...ctx.instance ? { peer, executionCwd } : {}, instanceId: control.instanceId, launchId: process.env.AGENTHUB_LAUNCH_ID, permissionHook: launch.permissionHook === true, hookPurpose: launch.hookPurpose, settingsFile: launch.settingsFile, launcherPid: process.pid, launcherSignature: processSignature(process.pid), unattended: launch.unattended === true };
|
|
22032
|
+
const nativeSessionId = managedSession(launch.args);
|
|
22033
|
+
if (nativeSessionId)
|
|
22034
|
+
launchRecord.nativeSessionId = nativeSessionId;
|
|
22010
22035
|
recordClaudeLaunch(stateDir, launchRecord);
|
|
22011
22036
|
cleanupStaleClaudeSettings(stateDir, previousLaunch);
|
|
22012
22037
|
}
|
|
@@ -725,13 +725,13 @@ var init_compat = __esm(() => {
|
|
|
725
725
|
COMPAT = {
|
|
726
726
|
pi: {
|
|
727
727
|
label: "Pi",
|
|
728
|
-
verified: ["1.4.0", "1.5.0", "1.5.2", "1.6.0"],
|
|
728
|
+
verified: ["1.4.0", "1.5.0", "1.5.2", "1.6.0", "1.6.1"],
|
|
729
729
|
gate: "contract",
|
|
730
730
|
probe: ["pi", "--version"],
|
|
731
731
|
config: "pi.cmd",
|
|
732
732
|
parse: (out) => plain(out.trim()),
|
|
733
|
-
trustNote: "The model-free extension load, RPC session identity and managed tool receipt path were checked on 1.4.0, 1.5.0, 1.5.2 and 1.6.
|
|
734
|
-
receipt: "docs/verification/2026-11-
|
|
733
|
+
trustNote: "The model-free extension load, RPC session identity and managed tool receipt path were checked on 1.4.0, 1.5.0, 1.5.2, 1.6.0 and 1.6.1. Permissions remain host-owned; account-backed inference and another version's extension contract are unverified.",
|
|
734
|
+
receipt: "docs/verification/2026-11-26-compat-pi-1.6.1.md"
|
|
735
735
|
},
|
|
736
736
|
"claude-implementer": {
|
|
737
737
|
label: "Claude headless implementer",
|
|
@@ -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.
|
|
14802
|
+
version: "0.49.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",
|
|
@@ -20843,6 +20843,7 @@ var init_native_channel_state = __esm(() => {
|
|
|
20843
20843
|
});
|
|
20844
20844
|
|
|
20845
20845
|
// src/hub/claude-state.ts
|
|
20846
|
+
var isClaudeSessionUuid = (value) => typeof value === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value);
|
|
20846
20847
|
var init_claude_state = __esm(() => {
|
|
20847
20848
|
init_native_channel_state();
|
|
20848
20849
|
});
|
|
@@ -21941,6 +21942,27 @@ function builtinCliEntries(definitions) {
|
|
|
21941
21942
|
import { readFileSync as readFileSync11 } from "fs";
|
|
21942
21943
|
import { join as join24 } from "path";
|
|
21943
21944
|
import { randomUUID as randomUUID10 } from "crypto";
|
|
21945
|
+
function managedSession(nativeArgs) {
|
|
21946
|
+
const separator = nativeArgs.indexOf("--");
|
|
21947
|
+
const options = separator < 0 ? nativeArgs : nativeArgs.slice(0, separator);
|
|
21948
|
+
const values = (names) => options.flatMap((arg, index) => {
|
|
21949
|
+
if (names.includes(arg))
|
|
21950
|
+
return [options[index + 1]];
|
|
21951
|
+
const name = names.find((value) => arg.startsWith(value + "="));
|
|
21952
|
+
return name ? [arg.slice(name.length + 1)] : [];
|
|
21953
|
+
});
|
|
21954
|
+
const explicit = values(["--session-id"]);
|
|
21955
|
+
const resume = values(["--resume", "-r"]);
|
|
21956
|
+
if (explicit.length)
|
|
21957
|
+
return explicit.length === 1 && isClaudeSessionUuid(explicit[0]) ? explicit[0] : undefined;
|
|
21958
|
+
if (options.some((arg) => ["-c", "--continue", "--from-pr", "--teleport", "--fork-session"].some((flag) => arg === flag || arg.startsWith(flag + "="))))
|
|
21959
|
+
return;
|
|
21960
|
+
if (resume.length)
|
|
21961
|
+
return resume.length === 1 && isClaudeSessionUuid(resume[0]) ? resume[0] : undefined;
|
|
21962
|
+
const id = randomUUID10();
|
|
21963
|
+
nativeArgs.unshift("--session-id", id);
|
|
21964
|
+
return id;
|
|
21965
|
+
}
|
|
21944
21966
|
async function runClaudeEntry(ctx) {
|
|
21945
21967
|
const { args, cwd, stateDir, cliDir, unattendedEnv, projectConfig, fail } = ctx;
|
|
21946
21968
|
const peer = ctx.instance ?? "claude";
|
|
@@ -22006,6 +22028,9 @@ async function runClaudeEntry(ctx) {
|
|
|
22006
22028
|
let launchRecord;
|
|
22007
22029
|
if (control?.instanceId) {
|
|
22008
22030
|
launchRecord = { ...ctx.instance ? { peer, executionCwd } : {}, instanceId: control.instanceId, launchId: process.env.AGENTHUB_LAUNCH_ID, permissionHook: launch.permissionHook === true, hookPurpose: launch.hookPurpose, settingsFile: launch.settingsFile, launcherPid: process.pid, launcherSignature: processSignature(process.pid), unattended: launch.unattended === true };
|
|
22031
|
+
const nativeSessionId = managedSession(launch.args);
|
|
22032
|
+
if (nativeSessionId)
|
|
22033
|
+
launchRecord.nativeSessionId = nativeSessionId;
|
|
22009
22034
|
recordClaudeLaunch(stateDir, launchRecord);
|
|
22010
22035
|
cleanupStaleClaudeSettings(stateDir, previousLaunch);
|
|
22011
22036
|
}
|
|
@@ -32467,6 +32492,9 @@ init_envelope();
|
|
|
32467
32492
|
// src/hub/roadmap-sync.ts
|
|
32468
32493
|
init_roadmap();
|
|
32469
32494
|
|
|
32495
|
+
// src/hub/roadmap-issue-states.ts
|
|
32496
|
+
init_sdlc();
|
|
32497
|
+
|
|
32470
32498
|
// src/hub/roadmap-unplaced.ts
|
|
32471
32499
|
init_envelope();
|
|
32472
32500
|
|
|
@@ -32774,7 +32802,7 @@ init_registry();
|
|
|
32774
32802
|
init_registry();
|
|
32775
32803
|
// src/hub/task-sweep.ts
|
|
32776
32804
|
var TASK_WAIT_MAX_MS = 14 * 24 * 3600000;
|
|
32777
|
-
var WAIT_KEEPING_EVENTS = new Set(["wait recorded", "idle sweep", "answer", "reviewer changed", "memory reference started", "ready held", "plan observed", "planner changed", "claim verdict", "invocation", "shell branch bound"]);
|
|
32805
|
+
var WAIT_KEEPING_EVENTS = new Set(["wait recorded", "idle sweep", "answer", "reviewer changed", "memory reference started", "ready held", "plan observed", "planner changed", "claim verdict", "invocation", "shell branch bound", "check run passed", "check run failed"]);
|
|
32778
32806
|
var GROOMING_CODES = new Set(["tests", "spec", "roster", "pull-only", "not-attached", "excluded", "owner-admission", "offline", "paused", "failing", "pii", "policy", "cancelled", "unavailable", "runner", "approvals", "quota", "dependency", "no-writes"]);
|
|
32779
32807
|
|
|
32780
32808
|
// src/hub/ci-watch.ts
|
|
@@ -41977,6 +42005,7 @@ async function connectLoop() {
|
|
|
41977
42005
|
...toolsMode || sessionJoin ? {} : { channel, channelEvidence },
|
|
41978
42006
|
...!toolsMode && !sessionJoin ? { retainStandby: true, clientPid: process.pid } : {},
|
|
41979
42007
|
...sessionJoin ? { session: sessionJoin.label } : {},
|
|
42008
|
+
...process.env.CLAUDE_CODE_SESSION_ID ? { claudeSessionId: process.env.CLAUDE_CODE_SESSION_ID } : {},
|
|
41980
42009
|
...process.env.AGENTHUB_LAUNCH_ID ? { launchId: process.env.AGENTHUB_LAUNCH_ID } : {},
|
|
41981
42010
|
...executionCwd !== undefined ? { cwd: executionCwd } : {},
|
|
41982
42011
|
...!toolsMode && standingBy ? { standby: true } : {},
|
|
@@ -7,7 +7,7 @@ import type { ClaudeChannelEvidence } from "./claude-channel-evidence.ts";
|
|
|
7
7
|
/** Only the control socket operations the peer owns; authentication remains in the daemon. */
|
|
8
8
|
export interface ChannelSocket {
|
|
9
9
|
readyState: number;
|
|
10
|
-
data: { launchId?: string; protocol?: number; standbyId?: string; retainStandby?: boolean; clientPid?: number; clientVersion?: string; channel?: boolean; channelEvidence?: ClaudeChannelEvidence; cwd?: string; peerGeneration?: string | number; detachedByPerson?: boolean };
|
|
10
|
+
data: { launchId?: string; claudeSessionId?: string; protocol?: number; standbyId?: string; retainStandby?: boolean; clientPid?: number; clientVersion?: string; channel?: boolean; channelEvidence?: ClaudeChannelEvidence; cwd?: string; peerGeneration?: string | number; detachedByPerson?: boolean };
|
|
11
11
|
send(data: string): unknown;
|
|
12
12
|
close(code?: number, reason?: string): void;
|
|
13
13
|
}
|
|
@@ -23,6 +23,7 @@ export class WsPeer extends BasePeer {
|
|
|
23
23
|
private static readonly MAX_STANDBY_SESSIONS = 8;
|
|
24
24
|
readonly acceptedSettlement = "explicit" as const;
|
|
25
25
|
readonly form: StartForm = "tui";
|
|
26
|
+
constructor(id: string, private readonly nativeSessionAtAttach?: (socket: ChannelSocket) => string | undefined) { super(id); }
|
|
26
27
|
private generation = crypto.randomUUID();
|
|
27
28
|
// Checkpoints become stale at hello/claim, before asynchronous recall finishes and attach changes delivery generation.
|
|
28
29
|
private claimGeneration = crypto.randomUUID();
|
|
@@ -86,7 +87,7 @@ export class WsPeer extends BasePeer {
|
|
|
86
87
|
if (!facts || facts.socket !== this.sock || !this.attached) return undefined;
|
|
87
88
|
const native = (this as { nativeSession?: string }).nativeSession;
|
|
88
89
|
return { ...(facts.ownerPid !== undefined ? { ownerPid: facts.ownerPid } : {}), attachedAt: facts.attachedAt,
|
|
89
|
-
...(typeof native === "string" && NATIVE_SESSION_ID.test(native) ? { nativeSessionId: native } : {}) };
|
|
90
|
+
...(!this.nativeSessionAtAttach && typeof native === "string" && NATIVE_SESSION_ID.test(native) ? { nativeSessionId: native } : {}) };
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
/** A session that shows pushes holds the peer or is arriving: a session without them must not take it (issue #205). */
|
|
@@ -166,6 +167,8 @@ export class WsPeer extends BasePeer {
|
|
|
166
167
|
this.delivered.clear();
|
|
167
168
|
this.nativeTurnSession = undefined;
|
|
168
169
|
delete (this as { nativeSession?: string }).nativeSession;
|
|
170
|
+
const nativeSession = this.nativeSessionAtAttach?.(sock);
|
|
171
|
+
if (nativeSession) this.bindNativeSession(nativeSession);
|
|
169
172
|
this.nativeActive = false;
|
|
170
173
|
this.pullOnly = this.claimedPullOnly; // before idle: the idle transition drains
|
|
171
174
|
this.attachMode = this.pullOnly ? "tools-only" : "channel";
|
|
@@ -315,6 +315,7 @@ async function connectLoop(): Promise<void> {
|
|
|
315
315
|
const client = await ControlClient.connect(stateDir, { role: toolsMode || sessionJoin ? "tools" : "peer", peer: peerId, ...(toolsMode || sessionJoin ? {} : { channel, channelEvidence }),
|
|
316
316
|
...(!toolsMode && !sessionJoin ? { retainStandby: true, clientPid: process.pid } : {}),
|
|
317
317
|
...(sessionJoin ? { session: sessionJoin.label } : {}),
|
|
318
|
+
...(process.env.CLAUDE_CODE_SESSION_ID ? { claudeSessionId: process.env.CLAUDE_CODE_SESSION_ID } : {}),
|
|
318
319
|
...(process.env.AGENTHUB_LAUNCH_ID ? { launchId: process.env.AGENTHUB_LAUNCH_ID } : {}),
|
|
319
320
|
...(executionCwd !== undefined ? { cwd: executionCwd } : {}),
|
|
320
321
|
...(!toolsMode && standingBy ? { standby: true } : {}),
|
package/src/adapters/compat.ts
CHANGED
|
@@ -29,11 +29,11 @@ export interface CompatPolicy {
|
|
|
29
29
|
|
|
30
30
|
const plain = (text: string) => text.length <= 64 && /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(text) ? text : undefined;
|
|
31
31
|
export const COMPAT = {
|
|
32
|
-
// Receipts: docs/verification/2026-10-26-pi-140-compat.md (1.4.0); docs/verification/2026-11-03-pi-150-compat.md (1.5.0); docs/verification/2026-11-14-pi-152-compat.md (1.5.2); docs/verification/2026-11-25-pi-160-compat.md (1.6.0)
|
|
33
|
-
pi: { label: "Pi", verified: ["1.4.0", "1.5.0", "1.5.2", "1.6.0"], gate: "contract", probe: ["pi", "--version"], config: "pi.cmd",
|
|
32
|
+
// Receipts: docs/verification/2026-10-26-pi-140-compat.md (1.4.0); docs/verification/2026-11-03-pi-150-compat.md (1.5.0); docs/verification/2026-11-14-pi-152-compat.md (1.5.2); docs/verification/2026-11-25-pi-160-compat.md (1.6.0); docs/verification/2026-11-26-compat-pi-1.6.1.md (1.6.1)
|
|
33
|
+
pi: { label: "Pi", verified: ["1.4.0", "1.5.0", "1.5.2", "1.6.0", "1.6.1"], gate: "contract", probe: ["pi", "--version"], config: "pi.cmd",
|
|
34
34
|
parse: out => plain(out.trim()),
|
|
35
|
-
trustNote: "The model-free extension load, RPC session identity and managed tool receipt path were checked on 1.4.0, 1.5.0, 1.5.2 and 1.6.
|
|
36
|
-
receipt: "docs/verification/2026-11-
|
|
35
|
+
trustNote: "The model-free extension load, RPC session identity and managed tool receipt path were checked on 1.4.0, 1.5.0, 1.5.2, 1.6.0 and 1.6.1. Permissions remain host-owned; account-backed inference and another version's extension contract are unverified.",
|
|
36
|
+
receipt: "docs/verification/2026-11-26-compat-pi-1.6.1.md" },
|
|
37
37
|
// Transport receipts: docs/verification/2026-10-23-headless-claude-permissions.md; 2.1.310: docs/verification/2026-10-26-claude-implementer-2.1.310.md; 2.1.314 (transport and wrapper): docs/verification/2026-10-31-claude-implementer-2.1.314.md; 2.1.316: docs/verification/2026-10-31-claude-implementer-2.1.316.md; 2.1.318: docs/verification/2026-11-05-claude-implementer-2.1.318.md; 2.1.319: docs/verification/2026-11-06-claude-implementer-2.1.319.md; 2.1.322: docs/verification/2026-11-10-claude-implementer-2.1.322.md; 2.1.323: docs/verification/2026-11-13-claude-implementer-2.1.323.md; 2.1.328: docs/verification/2026-11-19-claude-implementer-2.1.328.md; 2.1.329: docs/verification/2026-11-20-claude-implementer-2.1.329.md; 2.1.332: docs/verification/2026-11-25-claude-implementer-2.1.332.md; host-wrapper receipt below repeats with them.
|
|
38
38
|
"claude-implementer": { label: "Claude headless implementer", verified: ["2.1.309", "2.1.310", "2.1.314", "2.1.316", "2.1.318", "2.1.319", "2.1.322", "2.1.323", "2.1.328", "2.1.329", "2.1.332"], gate: "contract", probe: ["claude", "--version"],
|
|
39
39
|
parse: out => plain(out.trim().replace(/ \(Claude Code\)$/, "")),
|
|
@@ -4,7 +4,26 @@ import { join } from "node:path";
|
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import type { ClaudeLaunchRecord } from "../../cli/launch.ts";
|
|
6
6
|
import type { NativeCliEntryContext } from "./native-cli-entry-types.ts";
|
|
7
|
-
import { claudeStateFile } from "../../hub/claude-state.ts";
|
|
7
|
+
import { claudeStateFile, isClaudeSessionUuid } from "../../hub/claude-state.ts";
|
|
8
|
+
|
|
9
|
+
/** Preserve native selectors. A picker, continuation or fork without an explicit id stays unattested. */
|
|
10
|
+
function managedSession(nativeArgs: string[]): string | undefined {
|
|
11
|
+
const separator = nativeArgs.indexOf("--");
|
|
12
|
+
const options = separator < 0 ? nativeArgs : nativeArgs.slice(0, separator);
|
|
13
|
+
const values = (names: readonly string[]) => options.flatMap((arg, index) => {
|
|
14
|
+
if (names.includes(arg)) return [options[index + 1]];
|
|
15
|
+
const name = names.find(value => arg.startsWith(value + "="));
|
|
16
|
+
return name ? [arg.slice(name.length + 1)] : [];
|
|
17
|
+
});
|
|
18
|
+
const explicit = values(["--session-id"]);
|
|
19
|
+
const resume = values(["--resume", "-r"]);
|
|
20
|
+
if (explicit.length) return explicit.length === 1 && isClaudeSessionUuid(explicit[0]) ? explicit[0] : undefined;
|
|
21
|
+
if (options.some(arg => ["-c", "--continue", "--from-pr", "--teleport", "--fork-session"].some(flag => arg === flag || arg.startsWith(flag + "=")))) return;
|
|
22
|
+
if (resume.length) return resume.length === 1 && isClaudeSessionUuid(resume[0]) ? resume[0] : undefined;
|
|
23
|
+
const id = randomUUID();
|
|
24
|
+
nativeArgs.unshift("--session-id", id);
|
|
25
|
+
return id;
|
|
26
|
+
}
|
|
8
27
|
|
|
9
28
|
export async function runClaudeEntry(ctx: NativeCliEntryContext): Promise<void> {
|
|
10
29
|
const { args, cwd, stateDir, cliDir, unattendedEnv, projectConfig, fail } = ctx;
|
|
@@ -64,6 +83,8 @@ export async function runClaudeEntry(ctx: NativeCliEntryContext): Promise<void>
|
|
|
64
83
|
if (control?.instanceId) {
|
|
65
84
|
// Publish only the final launch's installed hook and effective permission flags.
|
|
66
85
|
launchRecord = { ...(ctx.instance ? { peer, executionCwd } : {}), instanceId: control.instanceId, launchId: process.env.AGENTHUB_LAUNCH_ID!, permissionHook: launch.permissionHook === true, hookPurpose: launch.hookPurpose, settingsFile: launch.settingsFile, launcherPid: process.pid, launcherSignature: processSignature(process.pid), unattended: launch.unattended === true };
|
|
86
|
+
const nativeSessionId = managedSession(launch.args);
|
|
87
|
+
if (nativeSessionId) launchRecord.nativeSessionId = nativeSessionId;
|
|
67
88
|
recordClaudeLaunch(stateDir, launchRecord);
|
|
68
89
|
cleanupStaleClaudeSettings(stateDir, previousLaunch);
|
|
69
90
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AgentVersionRow } from "./agents.ts";
|
|
2
|
+
import { Report, type Span } from "./console-state.ts";
|
|
3
|
+
import { grid, s } from "./sdlc-output.ts";
|
|
4
|
+
|
|
5
|
+
export function renderAgents(rows: readonly AgentVersionRow[], columns?: number, ascii = false): Span[][] {
|
|
6
|
+
if (!rows.length) return [[{ text: "no native agents" }]];
|
|
7
|
+
const items = rows.map(({ id, verdict, policy }) => [
|
|
8
|
+
s(id, "info"), s(verdict.version ?? "-"), s(verdict.state, verdict.ok ? "success" : "attention"),
|
|
9
|
+
s(policy), s(verdict.ok ? verdict.note ?? "" : verdict.reason),
|
|
10
|
+
]);
|
|
11
|
+
return new Report(columns, ascii).titled("ahub", "Agents")
|
|
12
|
+
.section("Versions", String(rows.length)).append(grid(["AGENT", "VERSION", "STATE", "POLICY", "DETAIL"], items, columns)).lines();
|
|
13
|
+
}
|
package/src/cli/agents.ts
CHANGED
|
@@ -2,6 +2,9 @@ import { spawnSync } from "node:child_process";
|
|
|
2
2
|
import { assessVersion, COMPAT, describe, isCompatId, readTrust, trustFile, writeTrust, type CompatId, type CompatVerdict } from "../adapters/compat.ts";
|
|
3
3
|
import { childEnv } from "../hub/child-process.ts";
|
|
4
4
|
import { withoutOrcaEnv } from "../hub/orca-env.ts";
|
|
5
|
+
import { Report, asciiMarkers, resolveColor, streamEnv } from "./console-state.ts";
|
|
6
|
+
import { outputWidth } from "./output.ts";
|
|
7
|
+
import { renderAgents } from "./agents-output.ts";
|
|
5
8
|
|
|
6
9
|
/** #691: what `ahub agents` and `ahub doctor` show for each gated native CLI. */
|
|
7
10
|
export interface AgentVersionRow { id: CompatId; executable?: string; verdict: CompatVerdict; policy: string }
|
|
@@ -82,23 +85,29 @@ export async function agentVersionsAsync(commands: Partial<Record<CompatId, read
|
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
export function runAgents(args: string[], commands: Partial<Record<CompatId, readonly string[]>>, fail: (message: string) => never): void {
|
|
88
|
+
const isTTY = !!process.stdout.isTTY;
|
|
89
|
+
const columns = outputWidth({ isTTY, columns: process.stdout.columns, COLUMNS: process.env.COLUMNS });
|
|
90
|
+
const ascii = asciiMarkers(process.env);
|
|
91
|
+
const color = resolveColor(undefined, streamEnv(isTTY), "ahub") === true;
|
|
92
|
+
const print = (report: Report) => console.log(report.render(color).join("\n"));
|
|
85
93
|
const [sub, id, version, ...rest] = args.filter(arg => arg !== "--json");
|
|
86
94
|
if (sub === "trust") {
|
|
87
95
|
const revoke = rest.includes("--revoke");
|
|
88
96
|
if (!isCompatId(id) || !version || rest.some(arg => arg !== "--revoke")) fail(`usage: ahub agents trust <${Object.keys(COMPAT).join("|")}> <version> [--revoke]`);
|
|
89
97
|
// The issue requires saying what trust covers before it is recorded.
|
|
90
|
-
if (!revoke)
|
|
98
|
+
if (!revoke) print(new Report(columns, ascii).titled("ahub", "Agent trust")
|
|
99
|
+
.section("Scope").note(`${COMPAT[id].label} ${version}: ${COMPAT[id].trustNote}`, "value"));
|
|
91
100
|
let rows;
|
|
92
101
|
try { rows = writeTrust(id, version, revoke); } catch (error) { fail((error as Error).message); }
|
|
93
|
-
|
|
94
|
-
|
|
102
|
+
const receipt = new Report(columns, ascii).titled("ahub", "Agent trust")
|
|
103
|
+
.section("Result").bullet("ok", revoke ? `revoked: ${id} ${version}` : `trusted on this machine: ${COMPAT[id].label} ${version}`)
|
|
104
|
+
.note(`${rows.length} trusted on this machine`).kv([["trust file", trustFile()]]);
|
|
105
|
+
receipt.next(`ahub agents trust ${id} ${version}${revoke ? "" : " --revoke"}`);
|
|
106
|
+
print(receipt);
|
|
95
107
|
return;
|
|
96
108
|
}
|
|
97
109
|
if (sub !== undefined) fail("usage: ahub agents [--json] | ahub agents trust <id> <version> [--revoke]");
|
|
98
110
|
const rows = agentVersions(commands);
|
|
99
111
|
if (args.includes("--json")) return console.log(JSON.stringify(rows.map(row => ({ id: row.id, executable: row.executable ?? null, ...row.verdict, policy: row.policy })), null, 2));
|
|
100
|
-
|
|
101
|
-
const v = row.verdict;
|
|
102
|
-
console.log(`${row.id.padEnd(13)} ${(v.version ?? "-").padEnd(10)} ${v.state.padEnd(9)} ${row.policy}${v.ok ? (v.note ? `\n${" ".repeat(14)}${v.note}` : "") : `\n${" ".repeat(14)}${v.reason}`}`);
|
|
103
|
-
}
|
|
112
|
+
print(new Report(columns, ascii).append(renderAgents(rows, columns, ascii)));
|
|
104
113
|
}
|