@staix/agent-hub 0.34.1 → 0.36.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 +73 -0
- package/README.md +53 -7
- package/docs/adding-an-ai-tool.md +2 -2
- package/docs/addons/claude-mem.md +4 -4
- package/docs/addons/open-code-review.md +1 -1
- package/docs/agent-notes/README.md +66 -0
- package/docs/agent-notes/adapters.md +14 -7
- package/docs/agent-notes/budget.md +1 -1
- package/docs/agent-notes/bus.md +2 -1
- package/docs/agent-notes/daemon.md +9 -7
- package/docs/agent-notes/local-worker.md +1 -1
- package/docs/agent-notes/models.md +5 -2
- package/docs/agent-notes/tasks.md +9 -2
- package/docs/agent-notes/tests.md +6 -0
- package/docs/design/adapters.md +182 -2
- package/docs/design/agent-hub-architecture.md +64 -2
- package/docs/design/agent-hub.md +6 -0
- package/docs/design/bus.md +26 -0
- package/docs/design/execution-reference.md +306 -0
- package/docs/design/guidance-experiments.md +438 -0
- package/docs/design/model-routes.md +628 -0
- package/docs/design/supervision.md +121 -0
- package/docs/design/task-board.md +121 -0
- package/docs/dogfood.md +45 -13
- package/docs/events.md +38 -20
- package/docs/memory.md +21 -7
- package/docs/operations.md +824 -40
- package/docs/profiles.md +2 -2
- package/docs/quickstart.md +117 -4
- package/docs/research.md +73 -13
- package/docs/roles.md +1 -1
- package/docs/sdlc.md +117 -11
- package/docs/security.md +153 -15
- package/docs/smoke.md +14 -0
- package/docs/specs/2026-09-19-agent-hub-design.md +13 -7
- package/docs/verification/2026-10-25-qwen-dual-output-t0.md +22 -0
- package/docs/verification/2026-11-07-compat-python-startup-1248.md +51 -0
- package/docs/verification/2026-11-07-compat-receipt-harness-1248.md +105 -0
- package/docs/verification/2026-11-07-compat-receipt-producers-1248.md +96 -0
- package/docs/verification/2026-11-07-compat-workflow-1248.md +94 -0
- package/docs/verification/2026-11-07-daemon-startup-1232.md +169 -0
- package/docs/verification/2026-11-07-jcode-receipt-reconstruction-1248.md +118 -0
- package/docs/verification/2026-11-07-kimi-delayed-usage.md +34 -0
- package/docs/verification/2026-11-07-kimi-review-watch-1284.md +115 -0
- package/docs/verification/2026-11-08-agy-1.5.3.md +96 -0
- package/docs/verification/2026-11-08-agy-acp-t0.md +56 -0
- package/docs/verification/2026-11-08-hub-visual-1058.md +161 -0
- package/docs/verification/2026-11-08-jcode-0991-model-setter-1317.md +143 -0
- package/docs/verification/2026-11-08-kimi-252-model-setter-1317.md +137 -0
- package/docs/verification/2026-11-08-kimi-tui-completion-1282.md +45 -0
- package/docs/verification/2026-11-08-kimi-wire-yield-1283.md +31 -0
- package/docs/verification/2026-11-08-live-model-override-1317.md +250 -0
- package/docs/verification/2026-11-08-qwen-0269-acp.md +138 -0
- package/docs/verification/2026-11-08-qwen-0269-model-setter-1317.md +91 -0
- package/docs/verification/2026-11-09-0.35.0.md +129 -0
- package/docs/verification/2026-11-09-headless-records-1320.md +157 -0
- package/docs/verification/2026-11-09-qwen-0270-acp.md +181 -0
- package/docs/verification/2026-11-09-qwen-0270-model-setter-1317.md +46 -0
- package/docs/verification/2026-11-10-0.36.0.md +59 -0
- package/docs/verification/2026-11-10-claude-implementer-2.1.322.md +59 -0
- package/docs/verification/2026-11-10-qwen-0270-dual-output.md +367 -0
- package/docs/verification/2026-11-10-qwen-0271-dual-output.md +101 -0
- package/docs/verification/claude-permission-transport-native.py +10 -3
- package/docs/verification/claude-shell-wrapper-native.py +8 -8
- package/docs/verified.json +245 -15
- package/package.json +3 -3
- package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-hub/kimi-hook.js +21230 -0
- package/plugins/agent-hub/kimi-review-policy-worker.js +217 -0
- package/plugins/agent-hub/server.js +4359 -1071
- package/scripts/check-docs.mjs +12 -1
- package/src/adapters/acp-model-policy.ts +56 -0
- package/src/adapters/acp.ts +175 -5
- package/src/adapters/agy/entry.ts +8 -5
- package/src/adapters/agy/hooks.ts +65 -15
- package/src/adapters/channel-peer.ts +33 -1
- package/src/adapters/claude-channel.ts +7 -4
- package/src/adapters/claude-implementer.ts +16 -3
- package/src/adapters/codex-appserver.ts +118 -8
- package/src/adapters/codex-review-isolation.ts +3 -1
- package/src/adapters/compat.ts +18 -13
- package/src/adapters/definitions/builtin-metadata.ts +8 -1
- package/src/adapters/definitions/native-cli-entry-kimi.ts +76 -7
- package/src/adapters/definitions/native-cli-preview-common.ts +2 -2
- package/src/adapters/definitions/native-cli-preview-kimi.ts +9 -2
- package/src/adapters/definitions/reviewer-variants.ts +3 -1
- package/src/adapters/kimi-review-policy-worker.js +2 -0
- package/src/adapters/kimi-review-policy-worker.ts +85 -0
- package/src/adapters/kimi-review-policy.ts +68 -0
- package/src/adapters/kimi-review.ts +41 -41
- package/src/adapters/kimi-tui-facts.ts +153 -0
- package/src/adapters/kimi-wire-usage.ts +33 -8
- package/src/adapters/local-worker.ts +60 -21
- package/src/adapters/model-token.ts +3 -0
- package/src/adapters/pi.ts +27 -5
- package/src/adapters/qwen-dual.ts +324 -44
- package/src/adapters/registry-types.ts +34 -3
- package/src/adapters/registry.ts +1 -0
- package/src/adapters/reviewer-policy-watch.ts +86 -0
- package/src/adapters/reviewer-print.ts +80 -18
- package/src/cli/agents.ts +1 -1
- package/src/cli/facts-hook.ts +4 -2
- package/src/cli/guidance.ts +67 -0
- package/src/cli/help.ts +13 -5
- package/src/cli/identity.ts +13 -3
- package/src/cli/init-prompt.ts +15 -2
- package/src/cli/init-required-checks.ts +122 -0
- package/src/cli/init-settings.ts +10 -4
- package/src/cli/init.ts +39 -3
- package/src/cli/kimi-facts-hook.ts +11 -0
- package/src/cli/kimi-plugin.ts +157 -0
- package/src/cli/lineage.ts +78 -0
- package/src/cli/main.ts +159 -19
- package/src/cli/model.ts +52 -0
- package/src/cli/output.ts +23 -1
- package/src/cli/reset.ts +1 -1
- package/src/cli/setup-research.ts +10 -0
- package/src/cli/status-lines.ts +8 -4
- package/src/hub/autonomy-defaults.ts +20 -9
- package/src/hub/board.ts +346 -4
- package/src/hub/budget.ts +1 -1
- package/src/hub/build-entry.ts +11 -0
- package/src/hub/bus.ts +52 -2
- package/src/hub/ci-watch.ts +4 -4
- package/src/hub/code-facts.ts +10 -3
- package/src/hub/completions.ts +3 -1
- package/src/hub/config-apply.ts +3 -1
- package/src/hub/config-trust.ts +1 -0
- package/src/hub/control-client.ts +1 -1
- package/src/hub/daemon.ts +1387 -121
- package/src/hub/deliverable-files.ts +38 -5
- package/src/hub/delivery-hints.ts +4 -2
- package/src/hub/delivery-journal.ts +50 -2
- package/src/hub/delivery-public.ts +51 -0
- package/src/hub/dogfood-profile.ts +9 -5
- package/src/hub/envelope.ts +1 -1
- package/src/hub/events.ts +28 -18
- package/src/hub/execution-lineage-owner.ts +272 -0
- package/src/hub/execution-lineage.ts +164 -0
- package/src/hub/execution-links.ts +85 -0
- package/src/hub/execution-reference.ts +36 -0
- package/src/hub/guidance-variants.ts +398 -0
- package/src/hub/handoff.ts +1 -0
- package/src/hub/hub-tools.ts +62 -2
- package/src/hub/instances.ts +4 -3
- package/src/hub/kimi-events.ts +46 -0
- package/src/hub/kimi-usage.ts +132 -29
- package/src/hub/lifecycle.ts +31 -15
- package/src/hub/limits.ts +13 -4
- package/src/hub/manager.ts +58 -3
- package/src/hub/memory-policy.ts +4 -3
- package/src/hub/memory-sync-attestation.ts +54 -0
- package/src/hub/memory-sync-state.ts +20 -5
- package/src/hub/model-overrides.ts +115 -0
- package/src/hub/native-hook-launch.ts +12 -3
- package/src/hub/operational-view.ts +2 -2
- package/src/hub/peers.ts +28 -1
- package/src/hub/permission-mode.ts +1 -1
- package/src/hub/person-figures.ts +88 -0
- package/src/hub/planning.ts +1 -1
- package/src/hub/progress.ts +24 -7
- package/src/hub/report.ts +38 -4
- package/src/hub/research-dataset.ts +158 -0
- package/src/hub/research-memory.ts +68 -0
- package/src/hub/research-quality.ts +118 -0
- package/src/hub/research-record.ts +279 -0
- package/src/hub/research.ts +126 -27
- package/src/hub/restart.ts +27 -0
- package/src/hub/roles.ts +26 -0
- package/src/hub/routing.ts +4 -1
- package/src/hub/sdlc-merge.ts +39 -1
- package/src/hub/sdlc-release.ts +1 -1
- package/src/hub/sdlc.ts +62 -11
- package/src/hub/settings.ts +5 -0
- package/src/hub/startup-event-seeds.ts +51 -0
- package/src/hub/startup-readiness.ts +65 -0
- package/src/hub/startup-timing.ts +38 -0
- package/src/hub/supervision-proposals.ts +405 -0
- package/src/hub/supervision-rules.ts +388 -0
- package/src/hub/supervision.ts +2 -0
- package/src/hub/task-approval.ts +2 -2
- package/src/hub/task-repository.ts +5 -0
- package/src/hub/tasks.ts +632 -59
- package/src/hub/ui.ts +9 -5
- package/src/hub/visual-assets.ts +50 -0
- package/src/hub/visual.ts +257 -0
- package/src/memory/brief.ts +169 -14
- package/src/memory/capture.ts +4 -3
- package/src/memory/recall.ts +46 -5
- package/src/memory/record-provenance.ts +82 -0
- package/src/memory/records.ts +116 -0
- package/src/models/relay.ts +9 -2
- package/src/models/route/adec.ts +190 -0
- package/src/models/route/config.ts +64 -3
- package/src/models/route/decision-evidence.ts +83 -0
- package/src/models/route/decision.ts +215 -0
- package/src/models/route/relay-selector.ts +8 -7
- package/src/models/route/runtime.ts +35 -22
- package/src/models/route/stage-diagnostics.ts +22 -0
- package/src/models/route/stage-evidence.ts +55 -0
- package/src/models/route/stage-fallback.ts +58 -0
- package/src/models/route/stage-input.ts +155 -0
- package/src/models/route/stage.ts +5 -147
- package/src/ui/guidance-panel.ts +156 -0
- package/src/ui/guidance-view.ts +43 -0
- package/src/ui/index.html +134 -6
- package/src/ui/lineage-view.ts +34 -0
- package/src/ui/plugin.ts +136 -11
- package/templates/AGENTS.block.md +1 -1
- package/templates/config.json +1 -1
- package/templates/profiles/general.json +1 -1
- package/templates/profiles/research.json +1 -1
- package/templates/profiles/writing.json +1 -1
package/docs/security.md
CHANGED
|
@@ -10,7 +10,7 @@ agent-hub connects agents that can each run commands. This page says what the hu
|
|
|
10
10
|
- **Control-write diagnostics carry metadata only (#1126).** The daemon's write spans and event-loop probe record a closed set of operation kinds, phases, task numbers and durations, never task text, paths, ids of transports, actors or sessions, credentials, error text or external output, and nothing for a PII task or a private turn. A frame from a client that has not authenticated is never inspected for them. Retention is capped (128 requests, 256 spans, 512 recent intervals, five-minute expiry) and a record in `hub.log` is at most 2,048 bytes; client timing on stderr is off unless `AHUB_CONTROL_WRITE_TIMING=1`.
|
|
11
11
|
- **Permission prompts stay on unless an operator selects a permission mode.** `ask` leaves native decisions unchanged. `ask-when-needed` grants scoped Claude file tools or Pi/local writes and edits, and a headless Claude implementer's proven shell commands through the host wrapper (#845, below); Kimi and Codex use their own native policies. `never-ask` requires explicit runtime confirmation, a person's console `y` for a config default at hub start, or retained autonomy consent bound to that peer's exact never-ask value in the untracked `config.local.json` (#999, below). Without one of these the peer runs in `ask`. Kimi's and `local`'s permission requests are relayed to the console and cancelled after `approvals.timeout_s` (default 120 s) of silence; the macOS notification for a waiting request carries the peer and the tool name only. The one exception is the hub's own tools (`hub_send` and the task tools, matched by exact name): Kimi's requests for them are approved once without a prompt and logged by name, the same trust Codex gets through `approval_mode` in the hub's config. They invoke hub-owned operations rather than arbitrary file or shell tools, and every call passes the hub's own checks. A call the always-ask policy classes (below) is never approved this way, whatever its title. Identity comes from the exact permission title, or from the earlier tool-call title bound to the same call id and resolved against the configured MCP servers when the permission title contains argument JSON (Qwen). Payload text and unrelated display titles never establish identity. Configured ACP kinds (#451) never get this exception: a request whose title spells a hub tool exactly still goes to the person approval path, and only a mapped native mode changes what the agent itself asks. For ACP agents, a payload longer than the console shows is marked as cut and never offers a session-wide grant. Pi's write, edit, shell and git write requests are relayed the same way and can be answered `Always allow <tool> until Pi restarts`: later calls of that tool by the same Pi start skip the prompt but stay inside the path guard and sandbox. The grant covers every later call of that tool whatever its payload, is kept in memory only, cannot be given from the dashboard, and each call it allows is logged by tool name. A Pi or `local` request whose call was cancelled or whose turn ended is withdrawn at once: a later answer is refused and grants nothing, an `Always allow` included. One shell command runs without a hub approval: the `!command` a person types in the managed Pi TUI. It stays inside the same sandbox and denylist, and the hub takes it only from the verified owner process of a Pi in TUI mode, while Pi is idle, on a reservation that is used once; a model's own bash call never takes that path (issue #253). `--unattended` turns prompts off, says so loudly, and is never the default; a classed call from a hub-owned ACP peer, the local worker or Pi still waits for a person under it.
|
|
12
12
|
- **A committed config cannot choose launch commands, credential files, data endpoints, permission modes or a wider sandbox.** The machine-local fields (`kimi_cmd`, `permission_modes`, `codex_bin`, `pi.cmd`, `checks`, `mlx.bin`, `mlx.runtimeDir`, `mlx.modelPath`, `omniroute.urls`, `omniroute.access_hosts`, the `omniroute` key files, `memory.worker_url` (still accepted, ignored since 0.16.0), `local.read_allow`, `local.bash_network`, `local.network_allow`, `local.doc_read`, `local.web_fetch`, `terminal.open`, `tasks.auto_pull`, `tasks.queue_backpressure`, `context.max_assignment_used`, `schedules` (the `every`, `cron` and `tz` forms alike), `folder_triggers`, `corpus.paths`, `invocation`, `start.agents`, `instances`, `action_policy`, `rooms`) apply only from a config file git confirms nobody committed (`instances`, `action_policy` and `rooms` are read only from an untracked `.agenthub/config.local.json`; in `config.json` they are ignored even when untracked): `.agenthub/config.json` or `.agenthub/config.local.json`, matched by file identity so no other spelling the file system accepts slips past, and `.agenthub` itself not a committed symlink or submodule. Without a repository, or when git fails, they keep their defaults; an empty value always means the default. "Untracked" is answered by the repository that contains the project: a checkout copied or extracted into an unrelated repository, or into an ignored directory of one, is trusted like your own files. So a cloned repository cannot choose a launch command, a completion check, a gateway to send a key file to, a memory endpoint, a permission mode, the command that opens a terminal, which agents `ahub up` opens terminals for, a folder the hub reads, work proposed on a timer, a host a model may fetch from, which of your agents' skills other peers may call, or a wider sandbox. A command in `checks` runs as you, outside the local worker's sandbox, like a git hook. So do the `setup` and `verify` commands of a benchmark suite (issue #251): `ahub bench run <suite.json>` is a person's command, refused from an agent session, and it resets the work tree for each attempt, so it runs only with `bench.enabled`, at the root of a clean repository that tracks nothing under `.agenthub/`. Nothing in `routing.toml` or in task text is ever run. `routing.toml` and the other shared fields still come from the checkout, and they matter: `routing.toml` picks the models the local worker and the hub's inference use at your gateway and can turn the PII constraint off, and roles and budget shape who does what. Review them in a repository you do not trust. The hub's own git calls outside the sandbox (snapshots, facts, config trust, project discovery, memory recall, the bench runner) all use the single hardened implementation in the exact-pinned first-party `@staix/agent-mem/platform` package, re-exported by `src/hub/git.ts`, which disables the programs a repository's configuration can name — the file-system monitor, hooks, external diff, the pager, and the credential and askpass helpers, with prompts failing closed — so a config that ever does get written cannot run code with the hub's rights. Of those, the monitor, hooks and external diff are reachable by commands the hub issues (the planted-program test exercises all three; a `diff --no-index` reads the repo's config, so that call also passes `--no-ext-diff` and `--no-textconv`); the pager is not (every call pipes stdout). Credential and askpass helpers are disabled for project repositories; memory sync alone may use credentials for its own memory repository, without prompts. The cost: `core.fsmonitor=false` also turns off a person's enabled built-in monitor for the hub's own calls, so the per-turn snapshot's `add -A` scans the whole tree (the snapshot Git calls of one burst share a 250 ms budget, each call at most 10 s; a boundary that runs out is recorded as unknown, never as a stale baseline) (#576). git has no global switch for filter drivers, and of the hub's commands only the snapshot's `add`/`restore` would run one (its driver command lives in the protected `.git/config`).
|
|
13
|
-
- **Telemetry holds no bodies.** `.agenthub/state/events.jsonl` (issue #40) records envelope ids, routing and sizes, task ids and states, overlapping paths and token counts, and the task id (with a PII flag) that each usage and token record is attributed to. It never records a message body, a task title or detail, and marks private (PII) envelopes and tasks as such. Budget pauses, resumes and quota resets carry the peer, window, times and the hub's own reason text, and a person's release authorization its commit, version and docs digest. The usage roll-up (#683) folds the usage, token and limit records into `hub.db` and joins issue, PR and release from the board when read; `ahub usage` and the console's Usage panel answer only the console and a configured planner, and a planner not during a private turn. Kimi's token records (#285) are counted from its own session wire log under its home: only the four token integers, the model label and the row time are copied, and the record id is an opaque hash, never a path, session id or text. The log stays on the machine; `ahub export` only prints it. Two opt-in stores copy numbers from it into your home directory, shared by every project on the machine (directories mode 700, files 600): research records (issue #247, `research.enabled`) in `~/.agenthub/research/` hold per approved task the ids, states, counts, tokens, times and PII flag the events hold, a person's label from a closed list, and a hash in place of the project id; benchmark runs (issue #251) in `~/.agenthub/bench/` hold suite name and hash, arm label, the attached peers' ids, models and permission modes, task ids, outcomes, exit codes, counts, tokens and times, never suite text or a command's output.
|
|
13
|
+
- **Telemetry holds no bodies.** `.agenthub/state/events.jsonl` (issue #40) records envelope ids, routing and sizes, task ids and states, overlapping paths and token counts, and the task id (with a PII flag) that each usage and token record is attributed to. It never records a message body, a task title or detail, and marks private (PII) envelopes and tasks as such. Budget pauses, resumes and quota resets carry the peer, window, times and the hub's own reason text, and a person's release authorization its commit, version and docs digest. The usage roll-up (#683) folds the usage, token and limit records into `hub.db` and joins issue, PR and release from the board when read; `ahub usage` and the console's Usage panel answer only the console and a configured planner, and a planner not during a private turn. Kimi's token records (#285) are counted from its own session wire log under its home: only the four token integers, the model label and the row time are copied, and the record id is an opaque hash, never a path, session id or text. agy's (#1280) are read from its session transcript through the hook-gated readback the same way: the token integers and an opaque hash of session and step. A person's model override (`model_change`, #1317) records the peer, the previous and new model ids and the next-turn boundary; a visual (#1058) its id, kind, byte and image counts and optional task id. The log stays on the machine; `ahub export` only prints it. Two opt-in stores copy numbers from it into your home directory, shared by every project on the machine (directories mode 700, files 600): research records (issue #247, `research.enabled`; a person's explicit `ahub setup --research` or `--no-research` saves the default for new projects in the owner-only `~/.agenthub/defaults.json`, which `ahub init` only reads, and a missing, unreadable or untrusted file means off, #1347) in `~/.agenthub/research/` hold per approved or cancelled task (record v2) the ids, states, counts, tokens, times and PII flag the events hold, counts and closed words only, a person's label from a closed list, and a hash in place of the project id, and `ahub research export --dataset <dir>` writes an allowlisted copy meant to leave the machine (peers reduced to family names, project-chosen role and profile names dropped, owner-only files in a directory inside the home and outside every registered project, compared as real paths); benchmark runs (issue #251) in `~/.agenthub/bench/` hold suite name and hash, arm label, the attached peers' ids, models and permission modes, task ids, outcomes, exit codes, counts, tokens and times, never suite text or a command's output.
|
|
14
14
|
- **Snapshots stay in your repository.** Per-turn snapshots (issue #33) are git objects in the project's own object store, written through a temporary index; nothing is referenced, pushed or copied elsewhere, and `git gc` prunes them. They hold what the work tree held, including untracked files that are not ignored, so keep secrets in ignored files. They carry the repository's own permissions, and nothing caps their disk use but `git gc`. A turn of a peer holding an open PII task is not snapshotted; a PII file left in the project is snapshotted by later turns like any other file. `ahub undo` restores only files whose current content is exactly what the turn left.
|
|
15
15
|
- **The edit hook reads, never decides.** `ahub check-path --hook` (issue #32) reads hub.db and returns context for Claude and a line for you; it sets no permission decision, so your permission rules stay in charge. It names other owners' task ids, titles and states, which then reach Claude's model; PII tasks are left out.
|
|
16
16
|
- **The session record holds identities only.** `.agenthub/state/sessions.json` (issue #37, mode 600) keeps each attached peer's recovery metadata: launch options, session and thread ids, Pi's session file path. No message or task text; loss notices name deliveries by id, sender and public task title. The Pi continuity bookmark that recovery keeps across stop and archive (`.agenthub/state/recovery-continuity.json`, mode 600, at most 16 KiB) holds identities only too: operation and project ids, the project root, and Pi's session id, session file, backend and model name; a bookmark that is not a private regular file, is larger than that or names another project or operation reads as invalid, which is kept distinct from no bookmark.
|
|
@@ -26,7 +26,7 @@ agent-hub connects agents that can each run commands. This page says what the hu
|
|
|
26
26
|
|
|
27
27
|
## Native memory authority and profile selection
|
|
28
28
|
|
|
29
|
-
The portable core is the exact-pinned first-party `@staix/agent-mem` 0.
|
|
29
|
+
The portable core is the exact-pinned first-party `@staix/agent-mem` 0.23.1 package; it does not replace the hub's caller identity, PII policy or task-write authority. Deny, hardened git, real paths and process identity are single-sourced in its Node-safe platform entry. Current project privacy is applied by the hub before promotion and again before model-facing reads. Standalone person reads are unscreened, and the standalone `--policy-free` acknowledgement grants no hub or peer authority.
|
|
30
30
|
|
|
31
31
|
`hub_memory_search`, `hub_memory_show` and `hub_memory_graph` take the project from the daemon, require `memory_read`, refuse private turns and validate UTF-8 input before logs or storage work. Complete records and graph metadata are screened before counts and truncation. Search is at most 20 lines/4 KiB (default 8); show accepts at most 8 ids and returns at most 8 KiB; graph is at most 120 nodes/240 edges/6 KiB (default 60 nodes), with no edge lacking an endpoint. Unknown, ambiguous and withheld ids share one neutral refusal. Arguments and results are excluded from hub-managed capture; this does not govern a vendor's independent transcript or memory hooks.
|
|
32
32
|
|
|
@@ -696,7 +696,10 @@ console-role only, and `ahub peer takeover` is refused to agent shells and
|
|
|
696
696
|
`--live-test`. A standby connection runs no peer operation until it owns the peer,
|
|
697
697
|
and the selected standby is rechecked for membership, launch and isolation,
|
|
698
698
|
lifecycle and claim generation after its preface. Standby ids and reported PIDs are
|
|
699
|
-
display metadata, never native-session or permission evidence.
|
|
699
|
+
display metadata, never native-session or permission evidence. The current owner's
|
|
700
|
+
attachment facts in the console's detailed status (#1310: client pid, attach time
|
|
701
|
+
and, once the host verified it, a short native session id) are display metadata
|
|
702
|
+
too, dropped with the socket and withheld from `status.json`, events, logs and memory. Takeover detaches
|
|
700
703
|
the old hub connection, not its native process; that session's later hub calls are
|
|
701
704
|
refused, and takeover never marks a delivery completed.
|
|
702
705
|
|
|
@@ -704,6 +707,13 @@ Kimi's pull-only TUI owns its tool approvals and session. The person's launcher
|
|
|
704
707
|
merges/removes only the hub MCP entry; the daemon never edits that file and
|
|
705
708
|
refuses headless starts while a stale entry exists. An attached Kimi TUI blocks
|
|
706
709
|
controlled recovery instead of being treated as a hub-owned headless process.
|
|
710
|
+
Its completion facts (#1282) are admitted only on the receipt-verified `kimi-tui`
|
|
711
|
+
compat entry (2.5.2) through the launcher's `native_hook_launch` authority and a
|
|
712
|
+
launch-scoped plugin under the native home; another version launches the plain
|
|
713
|
+
TUI without completion receipts. The launcher replaces another launch's plugin only
|
|
714
|
+
after its recorded owner is proven gone, under one fail-closed lock per native home
|
|
715
|
+
that is never removed automatically. Re-reads carry no prompt, response, error,
|
|
716
|
+
task command or title text, and native-person results are private stubs.
|
|
707
717
|
Scoped Pi and local-worker write/edit grants check both the original project-relative
|
|
708
718
|
path and its resolved target for protected agent configuration names. A protected
|
|
709
719
|
directory symlinked to an ordinary project directory still asks a person; an alias
|
|
@@ -720,7 +730,7 @@ the other names; look-alikes such as `.agent-backup/` or `src/gemini.ts` stay gr
|
|
|
720
730
|
The latter is conservatively protected by name; its default documented location
|
|
721
731
|
is in the home directory, not a project loader. The source inventory and limits
|
|
722
732
|
are in [the configuration inventory](verification/2026-10-11-agent-config-inventory.md).
|
|
723
|
-
Instruction files `AGENTS.md`, `CLAUDE.md` and `
|
|
733
|
+
Instruction files `AGENTS.md`, `CLAUDE.md`, `QWEN.md` and `GEMINI.md` (#1280) remain grantable by default.
|
|
724
734
|
A person can set `scoped_grants.protect_instructions` to true to require approval
|
|
725
735
|
for scoped writes and edits through original or resolved spellings. It applies
|
|
726
736
|
live after a settings write, undo or reload (turning it off from an edited file needs the confirmed terminal reload), never changes reads or never-ask, and cannot
|
|
@@ -729,7 +739,7 @@ withholds the scoped mode on these writes so an older hook grants nothing too.
|
|
|
729
739
|
|
|
730
740
|
Agent CLI versions (#691). One policy gates the Codex and Kimi fresh reviewers, the headless Claude implementer, Jcode, agy, Qwen (ACP and the dual-output TUI) and Pi (#843): a receipt-verified version passes, Jcode and agy also start an untested version inside their compatible line with a note, and any other version is refused unless the person trusts that exact version on this machine with `ahub agents trust <id> <version>`. The record is `agent-compat.json` in the hub home (`~/.agenthub`), written atomically with mode 600 and at most 64 entries; an unreadable, linked, oversized or invalid record trusts nothing. Agent shells and `--live-test` may read `ahub agents` but cannot trust or revoke. Trust lifts only the version pin: the fresh reviewers' runtime proofs still run before every child, and an untested version's native contract stays unverified.
|
|
731
741
|
|
|
732
|
-
Qwen Code's optional production ACP peer requires the qwen-code native identity, a compat-admitted version (receipt-verified 0.25.0, 0.26.0, 0.26.1, 0.26.4, 0.26.5 and 0.26.
|
|
742
|
+
Qwen Code's optional production ACP peer requires the qwen-code native identity, a compat-admitted version (receipt-verified 0.25.0, 0.26.0, 0.26.1, 0.26.4, 0.26.5, 0.26.8 and 0.26.9)
|
|
733
743
|
and advertised mode ids before setting a policy or starting work. Its own tools
|
|
734
744
|
have no hub sandbox; auto-edit approves file edits, yolo every tool. Configured
|
|
735
745
|
never-ask still requires the person's confirmation. qwen_cmd is machine-local and
|
|
@@ -738,7 +748,7 @@ this production table. Startup diagnostics withhold native host/payload details.
|
|
|
738
748
|
|
|
739
749
|
Jcode is optional, source/version-fenced and runs native tools without a hub sandbox or hub permission-mode mapping. .jcode joins the scoped-grant exclusion, including lexical/resolved aliases. Only a person writes its unique project MCP entry; foreign/override/symlink entries refuse. The hub owns a private daemon/socket and ACP group, never the global daemon, and copies no credentials. It accepts a plain jcode release from 0.98.0 up to, not including, 1.0.0 (#529; only 0.98.1, 0.99.0 and 0.99.1 are verified, and another version in that line starts with a note), or an exact version the person trusts (#691), and runs every owned jcode process (probe, serve, ACP and TUI) with `JCODE_NO_TELEMETRY=1`, because jcode's telemetry can report the provider account's email. Native diagnostics withhold payloads/hosts. Hub tools are bound to an owned launch (task 368): the shared project entry names no peer, each owned Jcode process carries its own peer id and launch id, the daemon admits a hub-tools connection for a Jcode peer only with the id of that peer's current owned launch, and a tools-mode server started without a peer id refuses every tool. Extra Jcode instances (#685, at most 8) are declared only through `instances` in an untracked `.agenthub/config.local.json`, start headless, and each needs its own `jcode_home`, which may not be the base home or another instance's, nor nested in or around one, however it is spelled. Unproved conversation loads refuse; no fresh replacement is called a restore. A finished task's advisory about the project root checkout names the branch only after the hub's whole public-text screen (`Tasks.publicMetadataText`: a PII pattern, a secret shape and a project-private path) passes it and it is a plain ref name; otherwise a generic sentence carries no part of it (#572). Native TUI launch exposes its private socket/session tuple only to the authenticated console, bound to the same live owned socket and session after read-only native persistence proof. Tools/status do not receive it. The TUI has no single-writer guard: person input may interleave with ACP. Native policy remains unmanaged and closing the frontend does not stop ACP. An `important` message reaches a busy Jcode as a soft interrupt written to the hub's own private server socket for the owned session (#572); the hub never cancels a turn to deliver, and a steer that was sent but not acknowledged, or whose turn ended first, is held as `needs_review`, never replayed. Jcode has no switch to choose its MCP servers, so the owned serve and ACP processes load every server named in `<JCODE_HOME>/mcp.json` and the project's `.jcode/mcp.json`, `.mcp.json` and `.claude/mcp.json`, besides the hub's own; `ahub doctor` lists their names only. Point `jcode_home` at a separate home, or remove a server from those files, to keep it out.
|
|
740
750
|
|
|
741
|
-
Antigravity (`agy`, #485) is optional, cloud and off roster by default. The launcher accepts the Antigravity CLI 1.4.x line; only 1.4.2, 1.4.7
|
|
751
|
+
Antigravity (`agy`, #485) is optional, cloud and off roster by default. The launcher accepts the Antigravity CLI 1.4.x line and exact 1.5.3; only 1.4.2, 1.4.7, 1.4.12 and 1.5.3 have a native receipt ([1.4.7](verification/2026-10-26-agy-1.4.7.md), [1.4.12](verification/2026-11-03-agy-1.4.12-launcher-nonce.md), [1.5.3](verification/2026-11-08-agy-1.5.3.md)), so another 1.4.x patch launches with a warning that it is unverified, and every other version, other 1.5.x included, is refused before a hub connection or plugin write (#589) unless the person trusts that exact version (#691). It runs native tools under its own unmanaged permissions, without a hub sandbox or hub permission-mode mapping; headless, resume, unattended and native permission flags are refused. Its roles are capped at implementer and verifier, so it never plans, reviews or receives PII work. Only the person's `ahub agy` launcher writes its three plugin files in `.agents/plugins/agent-hub/` (`plugin.json`, `mcp_config.json`, `hooks.json`): linked or foreign entries refuse before any write, cleanup removes only that launch's matching files, and it never writes project-level `.agents/hooks.json` or the person's `~/.gemini` settings. Conductor starts are refused, and a declared agy extra instance is refused at config load (#625). Hook authority (`native_hook_launch`) comes only from that launcher, belongs to the console socket that began it and ends when that socket closes; hook input over 1 MiB is refused, and observations are bound to the daemon, launch, native session and project.
|
|
742
752
|
|
|
743
753
|
Configured ACP adapters (#451 A3) are declared only by the person, in a Git-confirmed untracked `.agenthub/config.local.json`. The whole declaration (command, argv, identity, roles and mode maps) is machine-local authority: a shared or tracked declaration is ignored with a notice, settings never edit it, and changes need a hub restart. The hub runs only the declared argv, never a module or callback. Argv that selects a leader, attach, connect or remote mode is refused, and a Grok declaration needs `--no-leader`. Each start requires the pinned native identity, an exact `session/load` echo on resume, and positive ownership of the spawned process and its original process group; unknown ownership refuses, and stop signals only that verified group. An agent that hands its work to a process outside that group is outside this boundary. Without a mode map native policy is unmanaged, and there is no hub sandbox either way. Configured kinds are cloud peers (never PII), headless only and off roster by default, and the hub makes no quota, context or controlled-recovery claims for them. A read-only instance needs the native read-only mode acknowledged before a prompt and is limited to read and review hub tools, both in the published MCP list and at the host; its native non-read tool requests are rejected, and no setting or runtime change can raise it. These agents' stderr and error text are withheld from logs, and previews redact the executable, argv and session id.
|
|
744
754
|
|
|
@@ -758,6 +768,7 @@ External adapter modules (#451 A4) are the one way to run adapter code that ship
|
|
|
758
768
|
- Hub tools are auto-approved by the exact `mcp__agent-hub__<tool>` name Qwen reports for the call and never by prefix, title or argument text. Everything else asks the console, and an always-ask class call (#636) is never auto-approved. A prompt answered in the Qwen terminal withdraws the hub's pending approval: a late answer finds nothing to grant.
|
|
759
769
|
- Identity: the adapter attaches only a Qwen whose `session_start` states a verified version, protocol 2 and the events the hub reads, and it binds the running owner from the host's process table (the root of the process tree whose argv names this adapter's input file: Qwen 0.26.1 runs as a wrapper, a node launcher and a `cli.js` child that all name it; two separate roots is no owner), never from a message the launcher sends. The hub never signals that process and never types into its terminal; the person's terminal owns it.
|
|
760
770
|
- Environment: `ahub qwen --mode tui` execs Qwen in the person's own environment (Qwen needs their PATH, HOME and provider key, which the daemon never copies) with the hub's peer marker over it. Every other `AGENTHUB_*` variable but `AGENTHUB_HOME`, the other agents' vendor markers, and recovery and unattended authority are dropped, so a Qwen started from another agent's shell never carries that agent's identity, launch id or mode.
|
|
771
|
+
- A hub deny is not a readiness signal (#1371). The denied delivery completes without an answer, and later queued input stays unsubmitted behind a durable fence until a new personal turn completes in the Qwen terminal or a verified fresh native generation starts; the denied turn's own Stop, a readable event file again, a replayed `session_start` or a hub restart does not release it, and the peer reports offline after 30 s. A short or unconfirmed input write holds the delivery `needs_review` and appends nothing more.
|
|
761
772
|
- Not defended: a person who gives Qwen yolo mode, an agent that Qwen runs and that writes the file through a path this lexical check does not recognise, and another process of the same user (the usual same-user boundary of the state directory).
|
|
762
773
|
|
|
763
774
|
## Global attention metadata (#280, phase 3)
|
|
@@ -823,13 +834,29 @@ result. Failure logs retain only the closed cause and known declined count.
|
|
|
823
834
|
`ahub memory declined` is person-only (refused to agent shells and `--live-test`)
|
|
824
835
|
and uses bounded physical-row inspection to show IDs and rule categories, never
|
|
825
836
|
note text or literal patterns; incomplete inspection is not a zero count.
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
837
|
+
Since agent-mem 0.23.0 the daemon passes a fresh `placementAttestation` on every
|
|
838
|
+
sync pass, built by the package's own `createPlacementAttestation` for the memory
|
|
839
|
+
home (`src/hub/memory-sync-attestation.ts`, #1337); the hub supplies no writer
|
|
840
|
+
facts of its own and never fabricates the proof. A refusal is the closed cause
|
|
841
|
+
`writer` with a category, cause class and next step; the package's message, paths
|
|
842
|
+
and versions never enter status or logs. The native amem CLI provides person-only
|
|
843
|
+
activation from 0.22.0; the hub does not invoke it, and whether an activated store
|
|
844
|
+
syncs on a person's machine is not established by the isolated fixtures (#1173). Suggested graph edges are off by default
|
|
831
845
|
and are not evidence until a person confirms them. Operational details and limits: [hub memory](memory.md).
|
|
832
846
|
|
|
847
|
+
Agent-authored Records (#1320). Managed headless Codex, Kimi, Qwen, Jcode, Pi and
|
|
848
|
+
local turns get the agent-mem Record instruction; reviewers and person-owned TUI
|
|
849
|
+
prompts do not. amem's effective `records` policy (`recordsEnabled`) gates
|
|
850
|
+
instruction, capture and Record preference, and an unavailable policy disables
|
|
851
|
+
them. Only a completed final answer of a public, local, task-bound turn is
|
|
852
|
+
captured: private, PII, review-scoped, remote, unbound and incomplete turns are
|
|
853
|
+
excluded, and complete text and anchors clear the secret, PII, private-path and
|
|
854
|
+
deny screens before storage as `Record` capture rows, never curated notes or
|
|
855
|
+
evidence. `amem:` lines are stripped before invocation routing, shared-answer
|
|
856
|
+
publication, digests, the journal and the console event tap; the native console
|
|
857
|
+
can still show the original answer. Diagnostics are counts and byte sizes only,
|
|
858
|
+
and no model or network call is added.
|
|
859
|
+
|
|
833
860
|
## Floating pet retirement (#1012)
|
|
834
861
|
|
|
835
862
|
The standalone JXA host, WKWebView, window bridge and its packaged assets are
|
|
@@ -857,7 +884,7 @@ Current daemons advertise `task_cancel` in hello and status metadata. A current
|
|
|
857
884
|
|
|
858
885
|
Stall causes are persisted and deduplicated by cause and replanning revision. Planner advice joins its next delivery as bounded ids-only context; it does not manufacture an ordinary task turn. Pull-only offer attention clears only after acceptance, decline, supersession or durable positive evidence for that exact offer and recipient. Operator, hub or owner completion of an uncertain delivery is not evidence that the offer was read.
|
|
859
886
|
|
|
860
|
-
`hub_delivery_retry` grants an eligible recipient one retry of its own `needs_review` work, never pause removal. `hub_delivery_resolve` (#1112) lets a local agent mark only its own `needs_review` row `completed` or `discard`, at the revision `hub_inbox` showed, with a public, screened reason recorded under its actor. An attached Claude push-channel session may also settle its own `accepted` row that way (#1172); any other peer's `accepted` row is refused. It never replays the originals or changes task state. An unknown id, another peer's row and a row in neither state share one refusal, so the answer never confirms another peer's row. A channel `accepted` row that gets neither native completion nor that disposition within `bus.accepted_settle_ms` (default ten minutes) becomes `needs_review` with no replay. With `conductor.feed` on, the configured conductor gets one ids-only notice for an important, task or review timeout. The person, the hub, a remote peer, a paused or held peer, and recovery, shutdown or storage holds are refused. A row that carries an invocation stays person-only, because its outcome is uncertain. An explicit `hub_inbox` read may return newly queued messages behind such a hold,
|
|
887
|
+
`hub_delivery_retry` grants an eligible recipient one retry of its own `needs_review` work, never pause removal. `hub_delivery_resolve` (#1112) lets a local agent mark only its own `needs_review` row `completed` or `discard`, at the revision `hub_inbox` showed, with a public, screened reason recorded under its actor. An attached Claude push-channel session may also settle its own `accepted` row that way (#1172); any other peer's `accepted` row is refused. It never replays the originals or changes task state. An unknown id, another peer's row and a row in neither state share one refusal, so the answer never confirms another peer's row. A channel `accepted` row that gets neither native completion nor that disposition within `bus.accepted_settle_ms` (default ten minutes) becomes `needs_review` with no replay. With `conductor.feed` on, the configured conductor gets one ids-only notice for an important, task or review timeout. The person, the hub, a remote peer, a paused or held peer, and recovery, shutdown or storage holds are refused. A row that carries an invocation stays person-only, because its outcome is uncertain. An explicit `hub_inbox` read may return newly queued messages behind such a hold, and only when no recovery, pause, lifecycle or storage fence applies. It may also show the caller's own held originals (#1359) as a read-only inspection: at most 32 of its own `needs_review` rows (and `accepted` rows only for the current explicit-settlement channel) within the host pull byte budget, through the public queue body projection (private and missing tasks and private envelopes stubbed, unsafe metadata withheld, bodies sanitized); the caller cannot name another recipient, and the view never retries, resolves, acknowledges or changes an attempt. A held review inspection stays excluded from observer capture across restart until an explicit disposition. Durable per-original evidence survives journal pruning; unknown retry history or a used retry requires the person. Hub presence prefaces are excluded from attempted-work identity, so a shared context preface does not consume an unrelated message's retry. Delivery-only local and ACP peers (including Jcode) cannot invoke recipient retry; tool exposure hints do not replace the daemon's actual-adapter guard. Their held work requires person resolution. Before transport handoff, storage failure preserves the queue and preface; after handoff an uncertain effect is never automatically replayed.
|
|
861
888
|
|
|
862
889
|
A declared instance whose only role is reviewer gets review requests, task messages addressed to it and the person's messages; agent chat, digests and presence are discarded and journaled, and it gets no memory recall (task 223). The headless Claude reviewer runs one new `claude -p` per review with `--setting-sources ""`, `--strict-mcp-config`, `--no-session-persistence`, tools limited to Read, Grep, Glob, `hub_review` and `hub_task_show`, and `dontAsk`. Its prompt holds hub facts and a bounded diff, never the builder's summary, and its `hub_task_show` drops the builder's notes. Changes touching `local.deny` or `pii.paths` are withheld and passed as `Read` deny rules, which Claude enforces, not the hub. Private tasks are never given to it. Its `hub_review` counts only while the child started for that task still runs; a stop or exit revokes it first, and surviving processes hold the delivery as `needs_review` and keep the reviewer busy.
|
|
863
890
|
|
|
@@ -865,7 +892,7 @@ A terminal Claude implementer or verifier instance (#525-5) owns write-class tas
|
|
|
865
892
|
|
|
866
893
|
A planner-only instance (#525-6: `planner` without `implementer` or `verifier`) plans on the project checkout, so a declared `worktree` is refused. A Codex planner's `thread/start` and `thread/resume` are requested read-only, and a thread is adopted only when Codex's reply positively confirms a read-only sandbox; an unconfirmed or malformed reply refuses that RPC and closes the link before the hub adopts the thread or delivers work, and the current roles are rechecked before each injection. This is an initial ceiling, not confinement of the person's attached TUI, which can change its native sandbox later. A declared planner-only Claude channel instance gets no automatic grant from its facts hook for any tool but Read, LS, Glob and Grep, whatever the permission mode.
|
|
867
894
|
|
|
868
|
-
The headless Claude implementer (#525-4) runs one owned `claude -p` child per turn in its declared worktree, with `--setting-sources ""`, `--strict-mcp-config`, native permission mode `default`, the hub's managed PreToolUse hook and `--permission-prompt-tool mcp__agent-hub__hub_permission_request`; never `--bare`, `acceptEdits`, `dontAsk` or `bypassPermissions`, and `never-ask` is refused. Each task keeps its own persisted session; unscoped chat reuses one only while exactly one task is in progress, and a `hub_inbox` read refuses a batch attributed to another task. The approval path fails closed: `hub_permission_request` is accepted only from the current child's launch and generation, goes to the console's existing approval queue and `approvals.timeout_s`, and offers allow-once and deny only, with no allow-always or session grant. A timeout, a prompt failure, a disconnect, a hub that is down or refusing, or a stale child binding answers deny; a failed hook decides nothing, so the call still waits for a person. The approval title is the tool name and a JSON rendering of the arguments passed through `sanitize()` and the public-text screen (any PII, secret or private-path match withholds the whole value as `[withheld]`, before any cut), never task text, cut at 600 characters with a `[cut, N chars]` marker; the original arguments stay with the child and are not logged. The MCP wire cannot tell a native permission dispatch from a call the model makes itself; a person allow still refers only to its original arguments. Automatic Bash authorization uses the separate single-use host wrapper contract below, never a caller-supplied tool id as native provenance. A stop holds an uncertain delivery until the owned process group is confirmed gone. The [native permission receipt](verification/2026-10-23-headless-claude-permissions.md) is model-free on Claude Code 2.1.309, [repeated on 2.1.310](verification/2026-10-26-claude-implementer-2.1.310.md), [on 2.1.314](verification/2026-10-31-claude-implementer-2.1.314.md), [on 2.1.316](verification/2026-10-31-claude-implementer-2.1.316.md)
|
|
895
|
+
The headless Claude implementer (#525-4) runs one owned `claude -p` child per turn in its declared worktree, with `--setting-sources ""`, `--strict-mcp-config`, native permission mode `default`, the hub's managed PreToolUse hook and `--permission-prompt-tool mcp__agent-hub__hub_permission_request`; never `--bare`, `acceptEdits`, `dontAsk` or `bypassPermissions`, and `never-ask` is refused. Each task keeps its own persisted session; unscoped chat reuses one only while exactly one task is in progress, and a `hub_inbox` read refuses a batch attributed to another task. The approval path fails closed: `hub_permission_request` is accepted only from the current child's launch and generation, goes to the console's existing approval queue and `approvals.timeout_s`, and offers allow-once and deny only, with no allow-always or session grant. A timeout, a prompt failure, a disconnect, a hub that is down or refusing, or a stale child binding answers deny; a failed hook decides nothing, so the call still waits for a person. The approval title is the tool name and a JSON rendering of the arguments passed through `sanitize()` and the public-text screen (any PII, secret or private-path match withholds the whole value as `[withheld]`, before any cut), never task text, cut at 600 characters with a `[cut, N chars]` marker; the original arguments stay with the child and are not logged. The MCP wire cannot tell a native permission dispatch from a call the model makes itself; a person allow still refers only to its original arguments. Automatic Bash authorization uses the separate single-use host wrapper contract below, never a caller-supplied tool id as native provenance. A stop holds an uncertain delivery until the owned process group is confirmed gone. The [native permission receipt](verification/2026-10-23-headless-claude-permissions.md) is model-free on Claude Code 2.1.309, [repeated on 2.1.310](verification/2026-10-26-claude-implementer-2.1.310.md), [on 2.1.314](verification/2026-10-31-claude-implementer-2.1.314.md), [on 2.1.316](verification/2026-10-31-claude-implementer-2.1.316.md) [on 2.1.318](verification/2026-11-05-claude-implementer-2.1.318.md), [on 2.1.319](verification/2026-11-06-claude-implementer-2.1.319.md) and [on 2.1.322](verification/2026-11-10-claude-implementer-2.1.322.md); it is not sandbox proof, and a real account, model and person interaction remains a live leg.
|
|
869
896
|
|
|
870
897
|
The #845 host shell wrapper is the only automatic Bash path for a headless implementer. In `ask-when-needed`, a complete public input must pass the existing #816 read-only proof or the closed task-command proof, with an active owned task and registered worktree. Enabled action-policy classes still ask, and `ask`, PII handling and the `never-ask` refusal are unchanged. The native request and authenticated host response both name wrapper protocol 1, so an older plugin cannot drop the rewrite and execute an original command automatically.
|
|
871
898
|
|
|
@@ -873,16 +900,18 @@ A grant uses a random, expiring single-use nonce and an in-memory record bound t
|
|
|
873
900
|
|
|
874
901
|
Task branch authority uses recorded `refs.branch`, otherwise a host-observed non-default attached branch on the first eligible task-command request, excluding `main`, `master`, unknown/detached HEAD and another open task's branch. The binding is a normal `Tasks` write with history and an opaque canonical-root hash; a changed branch or worktree asks and never rebinds. Push grants accept only `git push origin <bound>` or `git push -u origin <bound>`; force, refspec, deletion and other remotes ask. Every origin push URL is checked against the captured project repository and PR argv pins that repository. Execution uses an explicit same-branch refspec; configured remote.origin.push/mirror refuses. Project/worktree PATH directories and aliases are removed, and gh child Git inherits core SAFE_CONFIG through fixed environment configuration. PR body-file content is bounded, screened and snapshotted into executed --body bytes. See [the design contract](specs/2026-09-19-agent-hub-design.md#headless-implementer-host-shell-execution-845) for the exact closed forms and [the native receipt](verification/2026-10-26-headless-claude-shell-context.md) for verification limits.
|
|
875
902
|
|
|
876
|
-
The fresh Codex reviewer (#519) needs `review_mode: "fresh"` and a compat-admitted Codex (receipt-verified 0.146.0, 0.163.0 and 0.
|
|
903
|
+
The fresh Codex reviewer (#519) needs `review_mode: "fresh"` and a compat-admitted Codex (receipt-verified 0.146.0, 0.163.0, 0.164.0 and 0.166.0; `ahub agents` shows the current policy); an unverified/untrusted version is unavailable. Before each review it requires a model-free isolation receipt: binary and config unchanged, only the two hub tools in the configured MCP inventory (each approved by its own name, never by a server-wide default, #783), plugins, hooks and Apps disabled (Apps by a separate feature readback), and a named filesystem profile whose fixtures prove public reads, private-path denial (exact, glob and symlink), standard host credential denial and write denial. Credential and tool-home roots are denied even with an empty `local.deny`; that list does not cover every personal file. A dangling or unreadable credential root refuses the reviewer, and the reason names only its path class (`~/.docker`, `$DOCKER_CONFIG`), never the path or its contents. A failed per-review start names one class from a closed list (`version`, `binary`, `mcp_inventory`, `plugins_hooks_apps`, `sandbox_proof`, `credential_root`, `timeout`, `unknown`) with a fixed sentence in the unavailable reason, `hub.log` and the `reviewer` line of `ahub status`; it never carries a path, native CLI text or a token (#722). Its shell is sandboxed read-only, not Claude's Read/Grep/Glob whitelist. Network and web search are configured disabled but not observed: managed requirements can still select cached web search, and no run has shown the review selecting the profile through `default_permissions`. A failed receipt or start never falls back to a continuing native session, and a child that ends without a saved verdict is never approval. The agy reviewer slot is an unavailable placeholder and never runs; it binds nothing, so agy's own `hub_task_show` reads are not fenced as a review (#792).
|
|
877
904
|
|
|
878
905
|
The fresh Kimi reviewer (#533) needs `review_mode: "fresh"` and a compat-admitted Kimi Code (receipt-verified 2.2.0, 2.3.0, 2.3.1, 2.3.2, 2.4.1 and 2.5.1; `ahub agents` shows the current policy) with its native OAuth login; an unverified/untrusted version, or a failed preparation, is unavailable. The [2.3.0](verification/2026-10-22-kimi-qwen-compat.md), [2.3.1](verification/2026-10-25-kimi-231-reviewer-compat.md) and [2.5.1](verification/2026-11-06-kimi-251-reviewer-compat.md) receipts are model-free and do not prove real login or a model review. It is a native tool-authority boundary, not a sandbox: no Seatbelt wraps it, and same-user native code is not isolated from the filesystem or network. Each review starts a new child in a private `KIMI_CODE_HOME` with managed-provider-only config, a clean temporary working directory and an empty skills directory. Its agent may use only `hub_review` and `hub_task_show`, served by a loopback MCP session bound to the task, head and review revision that never carries the hub's control token; it has no native read, file or shell tool and sees only the screened review brief and host facts. Its `credentials/` and `oauth/` directories and `device_id` link to the person's native ones, so refresh keeps Kimi's own lock and atomic rename; no token is copied and `KIMI_DISABLE_OAUTH_LOCK` is never set. A stop revokes its verdict authority before termination; killing it mid-refresh may require a native re-login. Private tasks are never given to it, and a child that ends without a saved verdict is never approval.
|
|
879
906
|
|
|
880
|
-
The review brief (#520) withholds private changes whole (both sides of a move) and counts them; a rule file that fails the private-data screen is named, not shown. Attributes and rules are read at the merge base, so a change cannot loosen its own review. Optional changed symbols (#684) come from ripwire 0.6.7 on the daemon's host PATH, run as an owned process on a disposable snapshot of the task's commit; each path, name and kind passes the hub's public metadata screen before the brief, the console's task detail or the dashboard shows it, a private task stores and shows none, and a failed or missing read is `unknown`, never a gate. Spec acceptance, plan review, plan conformance, premature-review, cost, test-integrity (#481 S4), issue and PR identity linking (#694) and dogfood scorecard (#687) reads fetch GitHub metadata only (edit times, check states, thread authorship and resolution, changed file names, open PR heads, workflow run conclusions), never issue bodies, comments or patches. Issue identity linking at propose and accept (#723) parses the task's title and refs locally, reads nothing from GitHub and skips PII tasks. The CI workflow keeps `contents: read` and `actions: read`.
|
|
907
|
+
The review brief (#520) withholds private changes whole (both sides of a move) and counts them; a rule file that fails the private-data screen is named, not shown. Attributes and rules are read at the merge base, so a change cannot loosen its own review. Optional changed symbols (#684) come from ripwire 0.6.7 on the daemon's host PATH, run as an owned process on a disposable snapshot of the task's commit; each path, name and kind passes the hub's public metadata screen before the brief, the console's task detail or the dashboard shows it, a private task stores and shows none, and a failed or missing read is `unknown`, never a gate. Spec acceptance, plan review, plan conformance, premature-review, cost, test-integrity (#481 S4), issue and PR identity linking (#694) and dogfood scorecard (#687) reads fetch GitHub metadata only (edit times, check states, thread authorship and resolution, changed file names, open PR heads, workflow run conclusions), never issue bodies, comments or patches. Required-check discovery at `ahub init --sdlc advise|enforce` (#1344) makes at most three capped GitHub reads (the default branch, the latest completed default-branch run, that run's jobs), each bounded to 5 s within a 20 s deadline, and otherwise reads only literal job names from `.github/workflows/*.yml`, refusing links. Issue identity linking at propose and accept (#723) parses the task's title and refs locally, reads nothing from GitHub and skips PII tasks. The CI workflow keeps `contents: read` and `actions: read`.
|
|
881
908
|
|
|
882
909
|
Deliverable records (#509a). `hub_task_done` and `hub_sdlc_record` name files as `{path, format, version?}`; the hub hashes them itself and refuses a claimed `sha256`, `hash` or `bytes` and any field it does not own. Paths resolve under the owner's execution root with `realPath` and `guardPath` in read mode: outside the project, the secrets denylist, the hub's own state (`.git`, `.agenthub`), a dangling link, a non-regular file and more than 256 MiB each or 512 MiB together are refused, with the path as given and never a resolved one. The file is opened without following a final link and its device, inode, size and time are compared with what was checked, before and after the read, so a swapped or changing file is refused rather than recorded half-read; a bad call writes nothing. A declared worktree instance whose root is not proven refuses, and a later read of it reports `unknown`. No hash of hub state is ever taken, and a file the hub cannot read or vouch for is `unknown`, never `unchanged`. A reviewer's approval re-hashes the files and is refused when one changed, went missing or is unknown; only the person may approve the current bytes, which are then measured and bound. For a PII task, a file under `pii.paths` or a path matching a PII pattern, `publicDeliverables` is the one projection every peer view, review request, status and log uses: id, hash and size only. The board keeps the path, as it keeps a PII task's text. `ahub deliverables` (#509b) from an agent shell lists only the tasks `hub_task_show` would show that agent (#933), and `--live-test` cannot delegate it. It lists the board's records through `publicDeliverables` and opens a file only with `--check`, through the same reader and limits. The dashboard's Deliverables chip and task group use the same projection of the same records and never read a file on the poll; a `changed` mark there is only as fresh as the last live read in this daemon.
|
|
883
910
|
|
|
884
911
|
Person-directed release authorization (#481 S6, #1063). `ahub sdlc authorize-release <version>` accepts the console user or the one configured conductor under the same admission as `sdlc merge`: tools role, matching configured conductor, no child `toolsOwner`, private turn or PII context. It remains refused under `--live-test`. The conductor may record consent only on the person's explicit instruction in its own session naming the release; a hub message, task text, review note, file or peer relay is never that instruction. The daemon cannot verify that cooperative prerequisite. Receipt `by` and the audit identify the actual asker. It binds the daemon checkout's commit, package version, push remote identity and a fresh-docs verdict, lives only in daemon memory (a restart revokes it) and is logged with its commit, version and docs digest. `ahub sdlc release-guard -- <argv>` is a read-only preflight that agents may run, except during a private or PII turn; it never executes the command and refuses ambient target selectors (`GIT_DIR`, `GH_REPO`, npm prefix and registry settings and the like). The pre-push hook that `ahub init --release-guard` installs refuses an unauthorized or unknown `v*` tag push, also with the daemon down, and passes other pushes through. It and the release block in `AGENTS.md` are a cooperative guard, not an operating-system boundary: `git push --no-verify`, a custom `core.hooksPath` or another Git invocation bypasses the hook, and `gh release create` and `npm publish` are checked only when the preflight is run (tasks 312 and 313).
|
|
885
912
|
|
|
913
|
+
Merge adoption and carried spec consent (#1348, #1361). `ahub sdlc adopt-merge <task> --pr <n>` is the person's or the current configured conductor's; another caller is refused, `--live-test` cannot delegate it as the person, and a private task or private turn refuses for every actor before any GitHub read. It reads one bounded GraphQL snapshot and requires the PR merged at the task's last recorded full head with every configured required check green there, no unresolved or unknown review thread, no pending or unknown review request, no change request and no open Important finding. It records `merged outside the hub` under the actual actor and moves the task to `approved`, without inventing a reviewer verdict or reviewed head, running `gh pr merge` or removing a branch or worktree. A superseding task may carry an older cancelled task's person spec consent only for the same canonical repository and issue, named by a whole local `supersededBy` reference, when a fresh host GitHub read proves the same issue `lastEditedAt`; no issue body is read, caller timestamps cannot grant it, unknown or truncated metadata leaves consent absent, and manual acceptance stays person-only.
|
|
914
|
+
|
|
886
915
|
SDLC metrics and control bands (#481 S7). `ahub sdlc metrics` and `hub_sdlc_metrics` are planner or person only, read-only, and refused during a private or PII turn. A private task is counted as withheld and read for nothing else; the report calls no model and makes no GitHub read. Band breaches are written only by the daemon's evaluator through Tasks, never while it is stopping, recovering or has a storage error. A `diagnose` or `propose` card is a backlog task (`triage` or `plan`) whose text is fixed words, numbers and task ids, never task text; it passes the PII signal check and the candidate-text screen before it is written, and no GitHub issue is created. A `log` breach is one hub notice, remembered in the board's `band_notices` table as a marker (`<metric>:#<task>:log`, checked against a fixed pattern) and a time, nothing else.
|
|
887
916
|
|
|
888
917
|
Design specs (#1097, #1102, #1107). `hub_specs` is read-only and refused during a private or PII turn. PII tasks and private turns publish no spec paths through task notices. `spec_ack` on `hub_task_done` is refused for private work and while specs review is off. Each id and reason must be public metadata, a withheld reason is refused, and the acknowledgements are recorded at the exact head. `ahub specs stamp` is person-only: refused for an agent identity and under `--live-test`, and refused without a terminal even with `--yes`. After the person answers, it rechecks HEAD, the state of each covered path and every target file's bytes, and any change refuses the whole run.
|
|
@@ -1293,6 +1322,115 @@ source note identifies incoming-message text and never attributes it as the
|
|
|
1293
1322
|
recipient peer's own speech. `status.json`, events, logs and memory never
|
|
1294
1323
|
receive a derived copy. Removed-instance and Local bindings are not retained.
|
|
1295
1324
|
|
|
1325
|
+
## Person-owned live model overrides (#1317)
|
|
1326
|
+
|
|
1327
|
+
`ahub model set|clear|list` is person-only: the daemon refuses a non-console
|
|
1328
|
+
caller, so agent shells, `--live-test` and every hub-tool caller are refused,
|
|
1329
|
+
list included, and a conductor role grants nothing. The dashboard path needs a
|
|
1330
|
+
person settings session with preview and confirm. An override is desired
|
|
1331
|
+
runtime state in `hub.db` (cleared by `ahub reset`), applies from the next
|
|
1332
|
+
eligible turn and never changes a running turn; a stale callback cannot mark a
|
|
1333
|
+
newer value or another adapter owner applied. Model ids are one bounded token
|
|
1334
|
+
(letters, digits and `._:/@+-`, at most 128 bytes, no leading dash), so an id
|
|
1335
|
+
cannot inject a flag. The override grants no model, provider or account
|
|
1336
|
+
authority, leaves the machine-local `instances.*.model` and `*_cmd` tier 3
|
|
1337
|
+
values as they are, and an unsupported surface is refused without a restart.
|
|
1338
|
+
|
|
1339
|
+
## Optional adec decision route (#554)
|
|
1340
|
+
|
|
1341
|
+
A `decision` route with `decision_backend = "adec"` is off unless configured and
|
|
1342
|
+
supports `shadow` only (`enforce` is refused at config load); the proposed pair
|
|
1343
|
+
never replaces the heuristic model, effort or conversation. The endpoint must be
|
|
1344
|
+
numeric HTTP loopback with path `/v1/route`, no userinfo, query or fragment; no
|
|
1345
|
+
redirects, ambient proxies, credentials or browser headers are used, and the hub
|
|
1346
|
+
never starts the service or reads its credentials. Evidence is a bounded 8 KiB
|
|
1347
|
+
projection (a capped latest-user fragment, recent assistant and tool tails,
|
|
1348
|
+
screened tool names and numeric dimensions) that passes the public-view pattern,
|
|
1349
|
+
private-path and secret checks; tool arguments, system or developer instructions
|
|
1350
|
+
and older history are never sent. Review-observer-excluded and remote turns skip
|
|
1351
|
+
it. A PII or private turn needs positive `onCampus()` before any evidence is
|
|
1352
|
+
built and then sends dimensions only with its privacy flags. Privacy, observer
|
|
1353
|
+
and authority facts are rechecked across every await, a changed authority
|
|
1354
|
+
refuses the stale turn, and route events keep closed metadata only, never
|
|
1355
|
+
evidence, credentials or service error prose.
|
|
1356
|
+
|
|
1357
|
+
A `stage` route with `classifier = "decision"` (#1373) uses the same endpoint
|
|
1358
|
+
rules and modes and asks only when its own score lies within `ambiguous_band`
|
|
1359
|
+
(default 0.05, at most 0.5) of its threshold, once per user turn. The question
|
|
1360
|
+
carries the route's closed numeric stage evidence (signals, dimensions and
|
|
1361
|
+
scores) and the two configured tiers, never the conversation projection; a PII
|
|
1362
|
+
or private turn sends only dimensions and needs a positive `onCampus()`. The
|
|
1363
|
+
answer is recorded and changes no tier, model, effort or conversation. A held
|
|
1364
|
+
answer is reused only while its privacy and observer facts still hold, and a
|
|
1365
|
+
change across the request refuses the stale turn. The PII screen, `assign()` and
|
|
1366
|
+
the escalation and advisor triggers never use it.
|
|
1367
|
+
|
|
1368
|
+
## Bounded visual attachments (#1058)
|
|
1369
|
+
|
|
1370
|
+
`hub_visual` stores a validated acon `VisualPayload` in `hub.db` under hub
|
|
1371
|
+
admission ceilings (1 MiB serialized and per-field UTF-8 limits; oversized data is
|
|
1372
|
+
refused, never truncated), screening every text field and record key before and
|
|
1373
|
+
after sanitization. Peers and the bus get only a stub
|
|
1374
|
+
(`[visual <id>] <kind>: <title or caption>` and `refs.visual`); an explicit
|
|
1375
|
+
remote recipient refuses the whole call and nothing crosses the room broker. Publication is refused in a
|
|
1376
|
+
private turn or on a PII task, including when privacy changes during an awaited
|
|
1377
|
+
image read, and current privacy gates `hub_visual_show`, snapshots and asset
|
|
1378
|
+
reads later. Images go through the guarded deliverable reader: a public PNG, JPEG
|
|
1379
|
+
or WebP of at most 8 MiB whose signature matches its extension, refusing SVG,
|
|
1380
|
+
secret or PII paths, hub state, outside paths, links swapped during inspection
|
|
1381
|
+
and two names for one file; paths are replaced with opaque asset ids, and each
|
|
1382
|
+
asset read repeats the guard and hash check, with the acon provider binding the
|
|
1383
|
+
project and instance. Raw tool input and results never reach observer capture,
|
|
1384
|
+
even on refusal.
|
|
1385
|
+
|
|
1386
|
+
## Supervision proposals (#1221)
|
|
1387
|
+
|
|
1388
|
+
`supervision.mode` is machine-local and off by default: a committed
|
|
1389
|
+
`.agenthub/config.json` cannot turn it on. `shadow` stores bounded proposals and
|
|
1390
|
+
does nothing else (no inbox row, notice or turn); `advisory` may also show a
|
|
1391
|
+
pending one in the console inbox. The queue holds at most 100 pending proposals,
|
|
1392
|
+
three per task revision, and keeps 400 terminal rows for dedupe; one read
|
|
1393
|
+
returns at most 50, and a reading past a bound is refused and counted. Rules read
|
|
1394
|
+
only public structured facts (task history, the hub's own deliverable measurement
|
|
1395
|
+
and declared-overlap rows), never notes, review findings, transcripts or file
|
|
1396
|
+
bodies, and a private task is never proposed on, read or decided. Only a present
|
|
1397
|
+
role on the task (its owner or reviewer, a configured planner, the conductor or
|
|
1398
|
+
the person) reads or decides a proposal, and there is no supervisor role. An
|
|
1399
|
+
accept runs the one existing action the proposal names through that action's own
|
|
1400
|
+
authority, so an `escalate` is accepted only by the conductor or the person; a
|
|
1401
|
+
refusal starts nothing. There is no automatic pause, retry, cancel, reroute,
|
|
1402
|
+
approval or rollback, no resident worker and no timer, and an action whose
|
|
1403
|
+
outcome the hub could not observe is recorded `unknown` and never retried.
|
|
1404
|
+
|
|
1405
|
+
## Guidance variants (#1225)
|
|
1406
|
+
|
|
1407
|
+
`ahub guidance create|list|show|withdraw` and the matching hub tools record
|
|
1408
|
+
immutable advisory role variants on one task. Writes follow task-role admission:
|
|
1409
|
+
the person or the task's current rostered owner; an agent cannot write under
|
|
1410
|
+
review, every actor is refused on an approved or cancelled task, a conductor
|
|
1411
|
+
designation grants nothing, and the CLI refuses `--live-test` person promotion.
|
|
1412
|
+
Private turns, review-observer input and PII tasks refuse every actor before any
|
|
1413
|
+
id, count or body is read. Raw role snapshots and variant bytes stay in private
|
|
1414
|
+
local hub tables, separate from the task, its history, public views, bus notices
|
|
1415
|
+
and memory. Reads return a closed metadata projection and a screened section diff;
|
|
1416
|
+
the rationale texts and experiment id are field-screened and shown as `withheld`
|
|
1417
|
+
when they do not clear. Bounds are 8192 bytes per role file and 32768 bytes per
|
|
1418
|
+
record. The tools' arguments and results never reach observer capture, and a
|
|
1419
|
+
variant grants no activation, permission, role or probe.
|
|
1420
|
+
|
|
1421
|
+
## Execution lineage (#1220)
|
|
1422
|
+
|
|
1423
|
+
`ahub lineage show` and `hub_lineage_show` read a bounded public metadata
|
|
1424
|
+
neighborhood: at most 100 nodes, 200 edges and 256 KiB per page, with explicit
|
|
1425
|
+
truncation. They expose no titles, prompts, paths, session ids or review bodies;
|
|
1426
|
+
unsupported, missing and denied reads share one unavailable shape, and only an
|
|
1427
|
+
authorized diagnostic operator sees a reason. `ahub lineage link` and
|
|
1428
|
+
`hub_lineage_link` admit an inert declared reference through Tasks under the
|
|
1429
|
+
task's current actor, revision, project and privacy; a stale or changed one
|
|
1430
|
+
refuses without writing. A reference never fetches its producer or attests to a
|
|
1431
|
+
runner outcome, and foreign project keys stay opaque. The acon console reads the
|
|
1432
|
+
same page through a provider port with no new action.
|
|
1433
|
+
|
|
1296
1434
|
## Questions a peer asks the person (#1053)
|
|
1297
1435
|
|
|
1298
1436
|
`hub_ask` lets any peer put a structured question (one to four questions, two to eight options each) to the person. A question is not a permission: it is its own record in `hub.db` (`questions`), has its own control messages, and never expires as a denial.
|
package/docs/smoke.md
CHANGED
|
@@ -98,6 +98,20 @@ operationId, console hello and initiating-peer audit (225 related tests passed).
|
|
|
98
98
|
This is fixture/CLI proof, not an actual native Pi restoration; that live leg
|
|
99
99
|
remains owed in #273.
|
|
100
100
|
|
|
101
|
+
## Kimi TUI completion facts (#1282)
|
|
102
|
+
|
|
103
|
+
Run this only on Kimi 2.5.2 in a disposable Git project and an isolated `KIMI_CODE_HOME`; `compat.ts` `kimi-tui` refuses every other version. The launcher must print its launch-scoped plugin notice before the TUI starts, and `plugins/installed.json` must contain only that launch's `agentHubLaunch` plus its owner pid and process signature. Another project's active owner must not be replaced; only a proven-gone owner is stale. Do not use the person's project or global `config.toml`.
|
|
104
|
+
|
|
105
|
+
1. `ahub up --no-console --no-agents` in the disposable project, then `ahub kimi --mode tui`. `--print-command` must describe the same conditional plugin without writing it. Refuse `native_hook_launch` once: the TUI still starts and reports that completion receipts are off. An unverified version also starts without them.
|
|
106
|
+
2. Send an ordinary prompt. `ahub results --json` shows one private `done` only after `turn.ended`, with the same native turn id in `native_turn_end`.
|
|
107
|
+
3. Start a real background `sleep 15` through Kimi's Bash tool. The results stay empty while `agents/main/tasks/<id>.json` says `running`; after the task and notification turn finish, exactly one `done` appears even if TaskStarted/Notification hooks never arrive.
|
|
108
|
+
4. Queue a hub message with `ahub say @kimi native-origin-probe`, then call `mcp__agent-hub__hub_inbox` once. The pulled message creates no second person-originated run; the person's prompt that called the tool settles once.
|
|
109
|
+
5. Block the first Stop with exit 2. `agent.turn.ended` may appear, but no `turn.ended` and no completion appears until the final Stop is allowed. Check delayed final output and a replayed old Stop.
|
|
110
|
+
6. Point the isolated provider at a closed loopback port. StopFailure alone creates no result until the matching `turn.ended(reason: "failed")`; then the outcome is `failed`. Interrupt yields `cancelled` and no unread result. Closing the launcher or restarting the daemon yields at most one `interrupted` for that run.
|
|
111
|
+
7. Confirm forged, stale, wrong-launch, wrong-session and wrong-cwd observations create no run or receipt, and prompt, response, error, task command and task title are absent from completion rows, `events.jsonl`, `hub.log` and memory. Exit the TUI normally: the launch-scoped plugin record and files are removed and other plugins remain.
|
|
112
|
+
|
|
113
|
+
The exact-version receipt is `docs/verification/2026-11-08-kimi-tui-completion-1282.md`. A version lacking any of these readbacks keeps `settle` disabled.
|
|
114
|
+
|
|
101
115
|
## Kimi usage counting (#285 AC11)
|
|
102
116
|
|
|
103
117
|
The [2026-10-25 Kimi 2.3.1 receipt](verification/2026-10-25-kimi-usage-ac11.md)
|
|
@@ -227,7 +227,7 @@ interface Envelope {
|
|
|
227
227
|
kind: "chat" | "task" | "review" | "status" | "budget" | "presence";
|
|
228
228
|
priority: "important" | "status" | "fyi";
|
|
229
229
|
body: string; // agent conclusions only, never tool noise
|
|
230
|
-
refs?: { repo?: string; branch?: string; commit?: string; paths?: string[]; task?: string };
|
|
230
|
+
refs?: { repo?: string; branch?: string; commit?: string; paths?: string[]; task?: string; visual?: string };
|
|
231
231
|
ts: number;
|
|
232
232
|
}
|
|
233
233
|
```
|
|
@@ -439,10 +439,15 @@ inside a peer.
|
|
|
439
439
|
hub's own count of Kimi's session wire log (`src/adapters/kimi-wire-usage.ts`, wire protocol 1.5, read on Kimi 2.3.0; the issue
|
|
440
440
|
read 2.1.1), not an ACP total: each `usage.record` row of the owned session, sub-agents included, is a `usage` event
|
|
441
441
|
(`source: kimi_wire`) and a `tokens` event, and the rolling 5 h sum of `inputOther + inputCacheCreation + output` (cache reads are
|
|
442
|
-
recorded, never counted) is the `tokens` window, source `hub count, kimi wire log, of kimi_tokens_5h N`.
|
|
442
|
+
recorded, never counted) is the `tokens` window, source `hub count, kimi wire log, of kimi_tokens_5h N`. #1281 adds one coalesced
|
|
443
|
+
delayed drain per peer after each cue (250 ms, 1,000 ms and 2,000 ms, at most three follow-ups), cancelled on stop, offline and
|
|
444
|
+
session replacement; offline keeps the final synchronous `collect -> drop`. A native row time selects a unique interval among the
|
|
445
|
+
32 most recent captured turns, with no unique match recorded as `unattributed`. Late rows update usage, token increments, the
|
|
446
|
+
roll-up and soft window without rewriting an earlier `turn_end` or incrementing a later turn. A reader slice commits offsets only
|
|
447
|
+
after its rows are recorded, so cancellation cannot advance past an unrecorded row. Any read the reader
|
|
443
448
|
cannot trust gives unknown (one notice, the reading dropped), never a short count. `ahub budget set`
|
|
444
449
|
feeds a reading by hand. `local` has no quota and is never paused.
|
|
445
|
-
- Gate at `budget.gate` (default 0.
|
|
450
|
+
- Gate at `budget.gate` (default 0.99, a registered setting) on any fresh window; readings older than
|
|
446
451
|
`budget.stale_min` are ignored. Checkpoint first, pause second: the peer gets one
|
|
447
452
|
important envelope asking it to write `.agenthub/checkpoint.md` and call `hub_checkpoint`,
|
|
448
453
|
the hub waits up to `budget.checkpoint_timeout_s`, then pauses it; a hard-limited peer is
|
|
@@ -3505,17 +3510,18 @@ the queue.
|
|
|
3505
3510
|
|
|
3506
3511
|
- T0 ran live on Qwen Code 0.26.1 under an isolated HOME ([verification](../verification/2026-10-25-qwen-dual-output-t0.md)): Q2, Q3, Q5 and Q6 pass, Q4 fails. The owner decided on 2026-10-25 to build Part 3 with the two limits below stated, so AC9's condition reads "Q2, Q3, Q5 and Q6 pass; Q4's limit is stated".
|
|
3507
3512
|
- Launch: `ahub qwen --mode tui` runs `qwen --input-file <in> --json-file <out> --mcp-config <hub server> --approval-mode default` in the person's terminal, as `ahub pi --mode tui` does. Both files live under the project state dir, mode 0600. The event file is a regular file the adapter tails from a saved offset.
|
|
3508
|
-
- Version gate: a separate compat entry for the dual-output contract, verified 0.26.1
|
|
3509
|
-
- Delivery: `deliver()` sets busy synchronously and appends one `{"type":"submit","text"}` line with the digest.
|
|
3513
|
+
- Version gate: a separate compat entry for the dual-output contract, verified 0.26.1, exact 0.27.0 and exact 0.27.1 (matched account-free receipts for [0.27.0](../verification/2026-11-10-qwen-0270-dual-output.md) and [0.27.1](../verification/2026-11-10-qwen-0271-dual-output.md)). It does not widen the headless `qwen` entry, whose ACP receipts are separate.
|
|
3514
|
+
- Delivery: `deliver()` sets busy synchronously and appends one `{"type":"submit","text"}` line with the digest. Required Q2 follows the actual normal Bus/QwenDualPeer path: a second envelope is enqueued while the first fixture-provider response is held; only one submit is present before release. After the first non-tool-use assistant and its message_stop, the second user/provider/final-assistant/message_stop must have distinct, ordered event indices. The direct-native-busy-submit claim from the original 0.26.1 receipt was not reproduced by the v2 producer's matched 0.26.1 control; it is recorded characterization, not a substitute Q2 pass/fail. The [2026-11-10 receipt](../verification/2026-11-10-qwen-0270-dual-output.md) records ruling `fa75c5f2-fc78-42a1-85dc-cf206e6a7825` and the revised procedure, whose matched private 0.26.1/candidate 0.27.0 Q2 runs pass two distinct normal-Bus turns; the remaining required Q3/Q5/Q6/Q7 pair also passed, supporting exact 0.27.0 admission with Q4's existing external-stop limit stated.
|
|
3510
3515
|
- Turn end: Qwen emits no `result` event in this mode. A turn ends at an `assistant` event whose `stop_reason` is not `tool_use`, followed by `message_stop`; that assistant text is the turn's shared answer. A `result` event, if a later build emits one, also ends the turn.
|
|
3511
3516
|
- Approvals: `control_request` with `subtype: can_use_tool` goes to the hub approval path, and the answer is `{"type":"confirmation_response","request_id","allowed"}`. Allow or deny only. The hub's own tools are approved by the exact `tool_name` (`mcp__<server>__<tool>`), never by prefix. A `control_response` for a pending request that the hub did not answer means the person answered in the TUI: withdraw the hub's pending approval. A `control_response` error for a stale id is logged, never retried.
|
|
3512
|
-
- Limit 1, deny:
|
|
3517
|
+
- Limit 1, deny: an appended hub deny settles the delivery as known `completed`, without a shared answer, but supplies no native completion ACK. Persist `denyPending: true` before appending it and retain a continuous input fence. Only a newly observed same-session personal USER followed by that personal turn's normal final assistant/message_stop under the same verified owner, or a verified fresh native launch generation, releases the fence. Denied-turn pairs, approval responses, orphan Stops, replayed session starts and file readability do not. The 30 s operational wait expires offline with queued messages unsubmitted and an actionable terminal/restart notice; the durable fence remains and passive recovery still observes those proofs. Detach/adoption invalidate unfinished proof, and adoption cannot reuse buffered personal frames. See [adapter contract](../design/adapters.md#qwen-deny-input-fence-888).
|
|
3518
|
+
- Input writes: append one full UTF8 Buffer once, require the exact byte count, and never retry a remainder. Short/throwing writes retain `needs_review` and offline; non-newline input tails before append or attachment fence input until a verified fresh generation, never personal completion. The live uncertain-write latch is RAM-only and crash detection reads the actual tail. A torn prefix ending in newline remains undetected; a durable per-write intent record is the upgrade path if observed.
|
|
3513
3519
|
- Limit 2, no external stop: the input protocol has only `submit` and `confirmation_response`, and SIGINT does not stop a turn. The inactivity watchdog never cancels a Qwen TUI turn. It reports the stalled turn to the person (status, console and dashboard: "stalled; press Esc in the Qwen terminal") and keeps the peer busy. The hub never types into the terminal or signals the process to stop a turn.
|
|
3514
3520
|
- Prompt channel: the input file is a prompt channel. Qwen's own write and shell tools reach it only through approval, and the hub's approval path refuses any write or command that names the state dir. No other peer can write it.
|
|
3515
3521
|
- Detached: the TUI keeps working when nobody reads the event file (T0 Q5). A daemon that cannot read the file treats the peer as detached, not idle; on reattach the adapter resumes from its saved offset.
|
|
3516
3522
|
- Recovery: `qwen -r <session_id>` with the same two files resumes the conversation, does not replay earlier submits, and appends to the event file. The adapter records `session_id` from `system/session_start` and resumes from its saved offset, so events from before the restart are not processed twice.
|
|
3517
3523
|
- Implementation notes (#449, measured on 0.26.1 where stated):
|
|
3518
|
-
- Files and state: `<state dir>/qwen/qwen-dual/{input.jsonl,events.jsonl,mcp.json,state.json}`; `state.json` holds `session_id`, the read offset, a generation counter and the bound owner (pid with its `processSignature`). `ahub qwen --mode tui` is explicit only: Qwen's `start.forms` stays `["headless"]`, so Qwen is not a start-mode peer and the hub never opens this terminal itself. The TUI driver is the definition's `start.createTui` on the `qwen-dual` daemon port, a fixed-builtin capability.
|
|
3524
|
+
- Files and state: `<state dir>/qwen/qwen-dual/{input.jsonl,events.jsonl,mcp.json,state.json}`; `state.json` holds `session_id`, the read offset, a generation counter and the bound owner (pid with its `processSignature`), plus the optional host-only `denyPending: true` input fence. `ahub qwen --mode tui` is explicit only: Qwen's `start.forms` stays `["headless"]`, so Qwen is not a start-mode peer and the hub never opens this terminal itself. The TUI driver is the definition's `start.createTui` on the `qwen-dual` daemon port, a fixed-builtin capability.
|
|
3519
3525
|
- Gate: checked twice, by `qwen --version` against `COMPAT["qwen-dual"]` before any file is made, and by the TUI's own `session_start` (version, `protocol_version` 2, the events the adapter reads). An unverified TUI is not attached and the person gets a notice.
|
|
3520
3526
|
- Event file: Qwen opens an existing `--json-file` at byte 0 without truncating it (it overwrote the head of a 3 KB file in place), so appending after a restart is not what it does. A fresh or resumed launch therefore starts from empty files (the old event file is kept as `events.prev.jsonl`, the saved offset restarts at 0 for the new file), and a hub restart while the person's Qwen keeps running adopts it and reads on from the saved offset with no launch. Qwen starts reading the input file at its size at start, so earlier submits are not replayed either way.
|
|
3521
3527
|
- Owner: bound from the host's process table (the one process whose argv contains `--input-file <this adapter's file>`; two matches is no owner), at `session_start` and then every second. No launcher message is trusted for it. When the owner is gone the peer goes offline, an open hub turn settles `needs_review` and a notice says the terminal ended. The hub never signals it.
|
|
@@ -18,3 +18,25 @@
|
|
|
18
18
|
## Consequence for #286 AC9
|
|
19
19
|
|
|
20
20
|
AC9 is conditional on Q2 to Q6 passing. Q4 fails, so the condition does not hold as written. Building Part 3 anyway needs an owner decision and a spec amendment that names the two limits: the watchdog reports a stalled Qwen TUI turn to the person instead of stopping it, and the adapter itself marks the turn ended when the hub sends a deny, because Qwen emits nothing for it.
|
|
21
|
+
|
|
22
|
+
## Later Q2 reproduction boundary (2026-11-10)
|
|
23
|
+
|
|
24
|
+
The historical Q2 Pass above describes this original real-model run and is not a
|
|
25
|
+
new exact-artifact qualification. The fixed-provider v2 workload later failed
|
|
26
|
+
its two-user-turn assertion on a private matched 0.26.1 control as well as newer
|
|
27
|
+
candidates ([0.26.8 receipt](2026-11-06-qwen-0268-dual-output.md)). That did not
|
|
28
|
+
reproduce the original native-busy-submit queue observation. The extra provider
|
|
29
|
+
POSTs are unclassified, so no underlying native cause is inferred.
|
|
30
|
+
|
|
31
|
+
Ruling fa75c5f2-fc78-42a1-85dc-cf206e6a7825 defines required Q2 at the actual normal
|
|
32
|
+
Bus/QwenDualPeer boundary with two distinct user/final-stop turns, while direct
|
|
33
|
+
native-busy-submit behavior remains recorded characterization. The
|
|
34
|
+
[2026-11-10 receipt](2026-11-10-qwen-0270-dual-output.md) records the revised
|
|
35
|
+
procedure and its own evidence: the private matched 0.26.1 and candidate 0.27.0
|
|
36
|
+
normal-Bus Q2 runs each passed two distinct turns, and the matching required
|
|
37
|
+
Q3/Q5/Q6/Q7 pair subsequently passed with the existing Q4 limit. A separate
|
|
38
|
+
direct-busy characterization on both artifacts observed one user/assistant/Stop
|
|
39
|
+
with both markers in one assistant.
|
|
40
|
+
This does not retrospectively reproduce the native-busy-submit claim. The
|
|
41
|
+
original account/global-install harness is
|
|
42
|
+
not the account-free procedure for that new qualification.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Bounded Python receipt-helper startup (#1248 T1)
|
|
2
|
+
|
|
3
|
+
Date: 2026-11-07. Task #775, Refs #1248. Hosted [measurement run 42361191648](https://github.com/STAIxBWLB/agent-hub/actions/runs/42361191648). Exact measurement source: `e9e10b8f1130d02dd5c9907ddc2507671a3e2d25`.
|
|
4
|
+
|
|
5
|
+
All 12 planned artifacts are present: three fresh hosted-VM jobs per OS/helper mode. Source SHA, committed helper SHA-256, flags, replicate identity, runner OS/architecture, metadata scalars and all helper/refusal outcomes validate. This follow-up selects an 8000 ms helper allowance from this complete series and the larger prior completed CI observation below.
|
|
6
|
+
|
|
7
|
+
| OS / architecture | Actual mode | Cold ms, replicates 1 / 2 / 3 | Cold max ms | Warm samples | Warm max ms |
|
|
8
|
+
| --- | --- | --- | ---: | ---: | ---: |
|
|
9
|
+
| macOS arm64 | output-check (-I) | 1067.451583 / 1435.647209 / 1578.762166 | 1578.762166 | 15 | 131.304500 |
|
|
10
|
+
| macOS arm64 | extract (no -I) | 1187.909083 / 1129.775667 / 2032.190459 | 2032.190459 | 15 | 101.507000 |
|
|
11
|
+
| Ubuntu x64 | output-check (-I) | 26.032033 / 20.150258 / 24.773280 | 26.032033 | 15 | 27.823435 |
|
|
12
|
+
| Ubuntu x64 | extract (no -I) | 33.736413 / 23.114327 / 34.226551 | 34.226551 | 15 | 32.182228 |
|
|
13
|
+
|
|
14
|
+
Counts: 12 cold, 60 warm, 12 refusal controls and 12 later interpreter metadata invocations, 96 total observations. Censored: 0. Errors: 0. Refusal controls: 12/12 expected exit 2. No failed or censored observation was dropped.
|
|
15
|
+
|
|
16
|
+
## Binding and procedure
|
|
17
|
+
|
|
18
|
+
- Output check uses the exact committed `write-output.py` with production `-I` and an inherited owned directory capability at FD3. The occupied-output refusal is unchanged.
|
|
19
|
+
- Extraction uses the exact committed `extract-archive.py`, without `-I` as production does. Node zlib creates the tiny public regular-file ustar before the first Python execution; the traversal archive is a separate refusal control.
|
|
20
|
+
- No Bun/npm installation, setup-python, native agent, account, model, or interpreter metadata probe precedes the first helper. Warm samples and refusal controls precede the interpreter metadata invocation.
|
|
21
|
+
- The controlled launcher records its first Python invocation; no claim is made that the OS/image caches were absolutely cold. Each child has a 15000 ms measurement ceiling and 4096-byte output cap. A timeout would remain right-censored; none occurred.
|
|
22
|
+
|
|
23
|
+
| Helper | SHA-256 at measured commit |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| output-check | `a6e056a59506922d4e15765495cec6e15cc33568ad6fdf90f5cc30c7b344217b` |
|
|
26
|
+
| extract | `7daf837943d279f2e72ca7e03cc8e6ea3c0bc9ab1eda6db738f20d57045c7eb3` |
|
|
27
|
+
|
|
28
|
+
| OS | Interpreter | Runner image |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| darwin | CPython 3.9.6 | macos15 20261104.0514.1 |
|
|
31
|
+
| linux | CPython 3.12.3 | ubuntu24 20261101.360.1 |
|
|
32
|
+
|
|
33
|
+
## Eight-second sizing tradeoff
|
|
34
|
+
|
|
35
|
+
The complete series has maximum cold time 2032.190459 ms (macOS extractor replicate 3). The separately recorded completed CI extractor sample remains larger: 3835.40 ms in [run 42355168440](https://github.com/STAIxBWLB/agent-hub/actions/runs/42355168440), macOS shard 1/4; it is not one of these 12 samples and is not discarded. Twice that known completed sample is 7670.80 ms. The selected 8000 ms helper allowance is 2.0858 times that prior sample, leaving 4164.60 ms beyond it.
|
|
36
|
+
|
|
37
|
+
The direct output-check maximum is 1578.762166 ms; using the larger extractor tail to size output-helper startup is a conservative shared-interpreter allowance, not a claim that the writer itself took 3835.40 ms. Both helper modes were measured explicitly.
|
|
38
|
+
|
|
39
|
+
Keeping two individually bounded output operations means `RECEIPT_OUTPUT_MS = 16000` ms. Existing controller aggregation includes that value automatically, increasing its advertised worst-case output allowance by 12000 ms from the former 4000 ms. The production 180000 ms installation allowance remains unchanged. Only the archive test fixture reuses one helper allowance for both totalMs/installMs.
|
|
40
|
+
|
|
41
|
+
Eight seconds reduces false timeout risk at the cost of allowing a genuine helper hang to block up to eight seconds per operation, rather than two. The finite timeout, kill/reap behavior, FD/no-follow, collision, ownership, integrity and explicit timeout assertions must remain intact. No unbounded warm-up is proposed. Three cold samples per cell do not estimate a statistical p99 or guarantee all future runner tails.
|
|
42
|
+
|
|
43
|
+
All 12 records were reviewed before the bound changed. The temporary measurement workflow was restored in `c4a40cee`, before normally merging origin/main at `3e27f16c`. The permanent measurement module remains callable; the scheduled compatibility workflow is unchanged by this follow-up. No package, real home, account, model, machine trust or agent CLI was installed or used. This receipt is not a native compatibility qualification.
|
|
44
|
+
|
|
45
|
+
## Regression checks and evidence limits
|
|
46
|
+
|
|
47
|
+
The output test retains every FD, ancestry, collision, no-follow and content assertion and changes only the exact total-budget contract from 4000 to 16000. A temporary helper uses `exec /bin/sleep 3` to exceed the former two-second allowance and finish. A second uses `exec /bin/sleep 60`; the actual eight-second spawnSync timeout must report `timeout`, reap that same owned helper process and publish no output. Both tests retain an explicit 20-second outer hang guard. No forked background helper is created. The generic npm fixture remains at 3000 ms installation budget; explicit timeout and archive-integrity controls are unchanged.
|
|
48
|
+
|
|
49
|
+
Committed-head DGX checks and hosted CI are separate from the measurement run and are reported at their tested SHA in the task/PR. They are not inferred from these hosted timing observations. No verified stamp is refreshed.
|
|
50
|
+
|
|
51
|
+
Per-observation elapsed/censor/outcome/exit fields are retained in the hosted per-job `measurement/result.json` artifacts and the workspace-local `task775-measurement-e9-complete/validated-complete.json` projection. No raw helper stdout/stderr, private paths or environment values are included in this report or the validated projection.
|