@staix/agent-hub 0.43.0 → 0.45.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 +61 -0
- package/README.md +3 -8
- package/docs/agent-notes/adapters.md +2 -2
- package/docs/agent-notes/daemon.md +4 -4
- package/docs/agent-notes/local-worker.md +2 -1
- package/docs/agent-notes/security-review.md +1 -1
- package/docs/agent-notes/tasks.md +5 -2
- package/docs/agent-notes/tests.md +4 -3
- package/docs/design/adapters.md +4 -2
- package/docs/design/agent-hub-architecture.md +2 -0
- package/docs/design/agent-hub.md +1 -1
- package/docs/design/roadmap.md +75 -2
- package/docs/design/supervision.md +34 -2
- package/docs/design/task-board.md +36 -2
- package/docs/dogfood.md +20 -5
- package/docs/events.md +9 -3
- package/docs/influences.md +7 -0
- package/docs/memory.md +4 -4
- package/docs/operations.md +84 -31
- package/docs/quickstart.md +14 -2
- package/docs/research.md +18 -0
- package/docs/roadmap.json +4 -0
- package/docs/roadmap.md +9 -0
- package/docs/sdlc.md +19 -4
- package/docs/security.md +4 -4
- package/docs/verification/2026-11-11-supervision-pilot-1221.md +864 -0
- package/docs/verification/2026-11-19-0.44.0.md +60 -0
- package/docs/verification/2026-11-19-claude-implementer-2.1.328.md +49 -0
- package/docs/verification/2026-11-20-claude-implementer-2.1.329.md +49 -0
- package/docs/verification/2026-11-20-sdlc-metrics-diagnosis.md +7 -0
- package/docs/verification/2026-11-21-0.45.0.md +69 -0
- package/docs/verification/2026-11-22-codex-0171-reviewer-isolation.md +47 -0
- package/docs/verified.json +32 -26
- package/package.json +2 -2
- package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-hub/kimi-hook.js +585 -264
- package/plugins/agent-hub/kimi-review-policy-worker.js +5 -5
- package/plugins/agent-hub/server.js +629 -293
- package/scripts/check-docs.mjs +9 -1
- package/src/adapters/acp.ts +11 -1
- package/src/adapters/compat.ts +3 -3
- package/src/adapters/definitions/builtin-metadata.ts +2 -2
- package/src/adapters/definitions/native-context.ts +10 -0
- package/src/adapters/jcode.ts +10 -0
- package/src/adapters/local-worker.ts +3 -2
- package/src/adapters/pi.ts +15 -4
- package/src/cli/console-state.ts +3 -1
- package/src/cli/help.ts +3 -1
- package/src/cli/identity.ts +2 -1
- package/src/cli/main.ts +12 -6
- package/src/cli/output.ts +2 -2
- package/src/cli/recovery-package.ts +16 -3
- package/src/cli/roadmap-write.ts +59 -0
- package/src/cli/roadmap.ts +81 -4
- package/src/cli/sdlc-output.ts +11 -1
- package/src/cli/upgrade-runtime.ts +10 -6
- package/src/cli/upgrade.ts +9 -3
- package/src/hub/agent-mem-range.ts +43 -0
- package/src/hub/board.ts +116 -2
- package/src/hub/bus.ts +4 -0
- package/src/hub/check-runner.ts +25 -1
- package/src/hub/claude-shell-wrapper.ts +2 -1
- package/src/hub/config-apply.ts +4 -2
- package/src/hub/config-trust.ts +1 -1
- package/src/hub/context-window.ts +1 -1
- package/src/hub/control-write-trace.ts +39 -2
- package/src/hub/cost-governance.ts +11 -7
- package/src/hub/daemon.ts +318 -53
- package/src/hub/dogfood-read.ts +4 -2
- package/src/hub/edit-guard.ts +100 -0
- package/src/hub/events.ts +79 -8
- package/src/hub/facts.ts +85 -2
- package/src/hub/hub-tools.ts +3 -1
- package/src/hub/lifecycle.ts +6 -1
- package/src/hub/log-rotation.ts +130 -0
- package/src/hub/memory-profile.ts +137 -21
- package/src/hub/no-writes.ts +1 -0
- package/src/hub/operational-authority.ts +3 -2
- package/src/hub/operational-settings.ts +2 -2
- package/src/hub/quota-events.ts +40 -0
- package/src/hub/recovery-store.ts +70 -24
- package/src/hub/report.ts +1 -1
- package/src/hub/research-experiments.ts +132 -0
- package/src/hub/research-quality.ts +13 -3
- package/src/hub/research-record.ts +38 -2
- package/src/hub/research.ts +128 -28
- package/src/hub/restart.ts +49 -2
- package/src/hub/roadmap-check.ts +65 -0
- package/src/hub/roadmap-decompose.ts +80 -0
- package/src/hub/roadmap-export.ts +27 -0
- package/src/hub/roadmap-sync.ts +97 -0
- package/src/hub/roadmap.ts +40 -0
- package/src/hub/runtime-capture-prune.ts +9 -1
- package/src/hub/runtime-prune-health.ts +5 -1
- package/src/hub/sdlc-branch-ci.ts +128 -0
- package/src/hub/sdlc-merge.ts +12 -5
- package/src/hub/sdlc-metrics.ts +33 -10
- package/src/hub/sdlc.ts +90 -10
- package/src/hub/settings.ts +1 -0
- package/src/hub/snapshots.ts +56 -1
- package/src/hub/startup-event-seeds.ts +21 -15
- package/src/hub/startup-timing.ts +3 -1
- package/src/hub/supervision-proposals.ts +10 -2
- package/src/hub/supervision-rules.ts +27 -4
- package/src/hub/supervision.ts +7 -0
- package/src/hub/task-pr.ts +47 -0
- package/src/hub/task-shell-command.ts +124 -0
- package/src/hub/task-worktree.ts +18 -11
- package/src/hub/tasks.ts +617 -45
- package/src/hub/usage-rollup.ts +35 -20
- package/src/hub/worktree-shelf.ts +2 -1
- package/src/local/sandbox.ts +2 -1
- package/src/local/shell-environment.ts +6 -0
- package/src/local/tools.ts +13 -1
- package/src/memory/brief.ts +10 -1
- package/src/memory/client.ts +3 -2
- package/src/pi/extension.ts +15 -3
- package/src/pi/tool-receipts.ts +26 -0
package/docs/operations.md
CHANGED
|
@@ -1211,7 +1211,7 @@ operation cannot confirm startup.
|
|
|
1211
1211
|
Each completed daemon startup writes one `startup timings ms:` line to `hub.log`,
|
|
1212
1212
|
with fixed phase names and durations; the span before `task_runtime` carries
|
|
1213
1213
|
the sub-phases `task_checks`, `task_ports`, `task_board` and `task_recovery`
|
|
1214
|
-
(#1445), and its board reads cover open tasks only. `task_checks` no longer waits for the first check-runner probe (about 8 s over ssh to a remote runner): startup waits for it at most 500 ms, `ahub status` reports the runner as unavailable with `runner probe in progress` until it settles, and `check_run` joins the same single probe. The three event-seed consumers share one
|
|
1214
|
+
(#1445), and its board reads cover open tasks only. The work after readiness is split into one boundary per step (`post_ready_handoff`, `_queue`, `_watch`, `_reconcile`, `_goals`, `_leases`, `_crash`, `_pi`, `_drift`, #1591), so a slow start names the step that held control replies. `task_checks` no longer waits for the first check-runner probe (about 8 s over ssh to a remote runner): startup waits for it at most 500 ms, `ahub status` reports the runner as unavailable with `runner probe in progress` until it settles, and `check_run` joins the same single probe. The three event-seed consumers share one
|
|
1215
1215
|
lossless streaming pass; abandoned snapshot bodies are not read for startup.
|
|
1216
1216
|
The [startup receipt](verification/2026-11-07-daemon-startup-1232.md) separates
|
|
1217
1217
|
seed I/O from bounded usage-rollup I/O and records the isolated measurements.
|
|
@@ -1304,7 +1304,9 @@ the selected Xcode or Command Line Tools dir (`xcode-select -p`; for an Xcode
|
|
|
1304
1304
|
app, its whole `Contents`, whose `SharedFrameworks` its tools load), write the
|
|
1305
1305
|
project and a temp dir of their own (`TMPDIR`, made for each command and
|
|
1306
1306
|
removed when it ends; one left by a hub crash, named `ahub-cmd-*`, goes with
|
|
1307
|
-
the OS temp cleanup), and nothing else; the shared temp dirs are closed.
|
|
1307
|
+
the OS temp cleanup), and nothing else; the shared temp dirs are closed. Bun's
|
|
1308
|
+
and npm's package caches default to that temp dir (`BUN_INSTALL_CACHE_DIR`,
|
|
1309
|
+
`NPM_CONFIG_CACHE`) unless the command's environment already names them (#1549).
|
|
1308
1310
|
|
|
1309
1311
|
Some names stay closed to those commands, and to Pi's, wherever they may
|
|
1310
1312
|
otherwise write: anything named `.git` at any depth, the `config` and `hooks`
|
|
@@ -1527,7 +1529,11 @@ The daemon samples its event loop every 100 ms. A missed tick delayed by at leas
|
|
|
1527
1529
|
Recently completed synchronous intervals are retained so a span that blocked the
|
|
1528
1530
|
loop can be identified after its callback has returned. An open asynchronous span
|
|
1529
1531
|
is only a concurrent wait, not proof that it occupied the CPU; untracked occupancy
|
|
1530
|
-
is reported as unknown.
|
|
1532
|
+
is reported as unknown. An asynchronous span that starts and settles inside one
|
|
1533
|
+
loop turn is counted as a synchronous interval, and after a span's first await
|
|
1534
|
+
the probe follows at most 16 microtask hops per request to record a continuation
|
|
1535
|
+
that runs synchronously; a block after a real I/O wait is beyond that bound, so
|
|
1536
|
+
such a slice is a lower bound (#1545). Background snapshot, queue/status and memory boundaries
|
|
1531
1537
|
use the fixed `background` kind rather than inventing a tool request.
|
|
1532
1538
|
|
|
1533
1539
|
Per observer, retained work is capped at 128 operations, 256 active span registrations, 512
|
|
@@ -1867,7 +1873,10 @@ delivery. A delivery or answer is not a task completion receipt.
|
|
|
1867
1873
|
|
|
1868
1874
|
The hub writes structured events to `.agenthub/state/events.jsonl` alongside
|
|
1869
1875
|
`hub.log` (schema: `docs/events.md`). They carry ids, routing, sizes, states and
|
|
1870
|
-
token counts, never message bodies or task titles.
|
|
1876
|
+
token counts, never message bodies or task titles. Both rotate by size (#1546):
|
|
1877
|
+
`events.jsonl` in 64 MiB segments with three kept (longer while an open task may
|
|
1878
|
+
need one) and `hub.log` at 16 MiB with two kept; every reader reads the segments
|
|
1879
|
+
before the live file, so rotation loses no input (`docs/events.md` "Rotation").
|
|
1871
1880
|
|
|
1872
1881
|
```bash
|
|
1873
1882
|
ahub report --since 7d # turns, busy time and tokens per peer, messages, overlaps, task events
|
|
@@ -1883,6 +1892,8 @@ PRs through `gh`, and the feature table in `docs/dogfood.md`. It covers the last
|
|
|
1883
1892
|
document as `--json` with `unknown` in place of null; missing or truncated evidence is unknown, never 0. It exports ids, timestamps and counts
|
|
1884
1893
|
only and runs no model. Its bounds and the weekly routine are in [dogfood](dogfood.md#weekly-scorecard).
|
|
1885
1894
|
|
|
1895
|
+
`ahub report` labels quota counts as `quota rows` and `hard rows`: they count recorded events, not provider polls. Its JSON retains `quota.readings` and `quota.hard` with the same recorded-row meaning.
|
|
1896
|
+
|
|
1886
1897
|
Per peer and model route, `ahub report` also counts model changes between consecutive
|
|
1887
1898
|
decisions, how many of them landed inside tool loops and, with `stay_switch` on, sessions
|
|
1888
1899
|
and the planner's switches (#197). With `stay_switch = "off"` session boundaries are not
|
|
@@ -2073,7 +2084,7 @@ ahub memory forget 1a2b3c4d # also promote, demote, supersede, rebu
|
|
|
2073
2084
|
|
|
2074
2085
|
`"memory": { "native": false }` in `.agenthub/config.json` turns it off for a project.
|
|
2075
2086
|
|
|
2076
|
-
The
|
|
2087
|
+
The declared `@staix/agent-mem` range (`>=0.33.0 <1.0.0` in `package.json`, resolved to 0.33.0 by `bun.lock`) resolves `AMEM_HOME`, then `$AGENTHUB_HOME/memory`, then `~/.agenthub/memory`. A plain release inside that range opens memory without a hub release when its host API range intersects the supported `[1, 1]`; an out-of-range, unattested, prerelease or host-API-incompatible package refuses to open it. A new minor can raise the store format floor: an older hub or amem cannot read a store a newer one wrote, so roll back the hub together with the store. An absent `M/profile.json` selects shared v1; an explicit generation selects `M/generations/G` with the package's readonly legacy bridge. All daemon memory consumers and the hub memory/goal CLI use that selected profile. Invalid metadata or a missing selected generation makes native memory unavailable while the bus and board continue; there is no fallback to legacy writes. Inspect the daemon's memory binding/availability before interpreting missing memory as an empty store.
|
|
2077
2088
|
|
|
2078
2089
|
The daemon checks its selector at hub operation entry and before candidate/counter writes. It does not hot-switch handles or provide an atomic fence against selection changes during an in-flight core call. Quiesce consumers and close their handles before migration or selection changes; reopen through the supported session-preserving lifecycle afterward. Candidate/counter storage remains `M/candidates.db`, independent of `G`; since agent-mem 0.7.0 `amem review` also lists and accepts candidates on a selected generation. Every running hub using this home needs an authenticated receipt: a matching ready binding, or a generation-capable unbound receipt (`disabled` when native memory is off, `unavailable` when opening failed) proving it holds no memory handle. An unbound daemon and zero running hubs are quiesced for memory; a stale bound handle, unreadable registry or unknown runtime is not ready. Existing JSON memory/goal results remain unchanged; the additive binding receipt belongs to daemon status, profile-check and the decay object. This source integration does not authorize installing a new runtime, migrating real memory, restarting sessions or claiming real-machine sync/capture receipts. Migration/deactivation and their limits belong to [agent-mem](https://github.com/STAIxBWLB/agent-mem); see [the hub profile contract](memory.md#selected-memory-profile).
|
|
2079
2090
|
|
|
@@ -2174,8 +2185,14 @@ ahub undo <turn> --yes --context # Codex's latest turn: also drop it from Codex
|
|
|
2174
2185
|
cannot be undone. So does a turn whose boundary evidence is unknown: snapshot
|
|
2175
2186
|
Git calls made in one callback burst share a 250 ms budget, and a capture that
|
|
2176
2187
|
runs past it, fails, or sees HEAD move while it is taken is unknown, never a
|
|
2177
|
-
stale baseline (hub.log says `snapshot unavailable`
|
|
2188
|
+
stale baseline (for a task or review capture hub.log says `snapshot unavailable`
|
|
2189
|
+
once per burst; a turn boundary logs it only when a cooldown starts). A turn
|
|
2178
2190
|
whose diff or HEAD-move evidence cannot be read is unknown as well (#576).
|
|
2191
|
+
After five consecutive exhausted bursts in one execution root (the project
|
|
2192
|
+
root or a peer's worktree), turn boundaries there skip the capture for ten
|
|
2193
|
+
minutes and record unknown evidence; the first boundary after that tries
|
|
2194
|
+
again, one more exhausted burst starts the wait again, and a restart clears
|
|
2195
|
+
the count (#1550).
|
|
2179
2196
|
- Claude's turns are not recorded: its channel shows the hub no turn boundary.
|
|
2180
2197
|
Claude Code's own checkpoints cover its edits, though not its shell commands.
|
|
2181
2198
|
- The snapshots are unreferenced objects in the repository's own object store, so
|
|
@@ -2817,7 +2834,7 @@ A guarded file edit that the daemon keeps at its accepted value remains visible
|
|
|
2817
2834
|
| Routing | `tasks.rescreen_max` (1-100 attempts, default 10) | `config.local.json` | live; the next release-timer re-screen uses it |
|
|
2818
2835
|
| Routing | `tasks.split_min_observations` (3-100 measured tasks, default 5) | `config.local.json` | live; the next shadow split prediction uses it |
|
|
2819
2836
|
| Routing | `tasks.split_max_failure_share` (0-1, default 0.3) | `config.local.json` | live; the next shadow split prediction uses it |
|
|
2820
|
-
| Switches | `tasks.auto_pull` (default off: pull the top explicitly reserved ready card when a
|
|
2837
|
+
| Switches | `tasks.auto_pull` (default off: pull the top explicitly reserved ready card when a slot frees, a backlog plan or dependency approval readies it, or its peer first attaches idle) | `config.local.json` | live; the next trigger uses it |
|
|
2821
2838
|
| Routing | `tasks.queue_backpressure.max_queued` (0-10000), `.max_oldest_s` (0-604800); 0, the default, disables each ([backpressure](#queue-backpressure-on-automatic-task-offers-800)) | `config.local.json` | live |
|
|
2822
2839
|
| Roles | `planner` (one or up to eight planner holders) | `config.local.json` | at once |
|
|
2823
2840
|
| Routing | `bus.max_attempts` (1-100 attempts, default 3) | `config.local.json` | live; next safe-failure retry evaluation, retaining existing counts and quota pauses |
|
|
@@ -2831,7 +2848,7 @@ A guarded file edit that the daemon keeps at its accepted value remains visible
|
|
|
2831
2848
|
| Routing | `recovery.control_timeout_s` (30-300 seconds, default 30) | `config.local.json` | next use; the next control request of the recovery coordinator to a hub reads it |
|
|
2832
2849
|
| Routing | `recovery.shutdown_wait_s` (30-300 seconds, default 30) | `config.local.json` | next use; the next wait for a committed source to stop reads it once, at its start |
|
|
2833
2850
|
| Routing | `recovery.terminal_idle_wait_s` (30-600 seconds, default 120) | `config.local.json` | next use; the next wait for a terminal to go idle before it is closed reads it |
|
|
2834
|
-
| Start | `adapter_timing.acp_tool_ceiling_min` (1-
|
|
2851
|
+
| Start | `adapter_timing.acp_tool_ceiling_min` (1-120 minutes, default 60) | `config.local.json` | next use; a new ACP launch captures it; effective ceiling is at least the watchdog |
|
|
2835
2852
|
| Start | `adapter_timing.acp_activity_batch_ms` (10-50 ms, default 50) | `config.local.json` | next use; a new ACP launch captures its activity batch delay; pending flushes are unchanged |
|
|
2836
2853
|
| Start | `adapter_timing.jcode_steer_timeout_s` (5-60 seconds, default 5) | `config.local.json` | next use; a new Jcode launch captures one total native steer deadline |
|
|
2837
2854
|
| Routing | `model_relay.cooldown_failures` (1-100, default 3) | `config.local.json` | restart; consecutive transport/startup failures before cooling an alias |
|
|
@@ -2948,9 +2965,20 @@ primitive option values for Kimi/generic ACP and Jcode, including Jcode's inheri
|
|
|
2948
2965
|
ACP options. An accepted edit leaves active tool ceilings, pending activity
|
|
2949
2966
|
flushes and native steer deadlines unchanged until a new peer starts.
|
|
2950
2967
|
|
|
2951
|
-
The open-tool ceiling defaults to
|
|
2952
|
-
|
|
2953
|
-
|
|
2968
|
+
The open-tool ceiling defaults to 60 minutes, because this repository's own
|
|
2969
|
+
instructions expect a gate run to wait up to 50 (`dot remote verify --wait 50m`);
|
|
2970
|
+
it can be tightened or raised, and remains `max(watchdogMs, configured ceiling)`
|
|
2971
|
+
with remaining-only rearming, so a tool call that reports no progress for those
|
|
2972
|
+
minutes still ends the turn. A turn the ceiling cancels names its cause: hub.log
|
|
2973
|
+
gets the ceiling and its minutes for a configured kind whose own native
|
|
2974
|
+
diagnostics stay withheld, plus the launch that restarts that peer (`ahub jcode`,
|
|
2975
|
+
or `ahub jcode --as <peer>` for an extra instance) and the held row it leaves
|
|
2976
|
+
behind; a private turn's tool titles stay withheld with them. That restart brings
|
|
2977
|
+
the peer back but does not redeliver the cancelled delivery, so the person settles
|
|
2978
|
+
it with the command `ahub queue show <id>` prints, after
|
|
2979
|
+
`ahub queue list --peer <peer>` names the row.
|
|
2980
|
+
|
|
2981
|
+
The activity delay defaults to the legacy 50 ms and never exceeds that buffer window;
|
|
2954
2982
|
its 4096-character threshold and privacy handling stay fixed. Jcode's default
|
|
2955
2983
|
5-second steer deadline can only rise, and one absolute timer covers all native
|
|
2956
2984
|
phases; pre-send refusals and post-send uncertainty retain their existing fences.
|
|
@@ -3507,9 +3535,10 @@ them automatically.
|
|
|
3507
3535
|
|
|
3508
3536
|
For an ACP peer (headless Kimi, Qwen, Jcode) a tool call that was announced and
|
|
3509
3537
|
has not completed or failed counts as running work, not silence: the inactivity
|
|
3510
|
-
watchdog (`watchdog_ms`) keeps the turn alive up to
|
|
3511
|
-
|
|
3512
|
-
|
|
3538
|
+
watchdog (`watchdog_ms`) keeps the turn alive up to the open-tool ceiling
|
|
3539
|
+
(`adapter_timing.acp_tool_ceiling_min`, default 60 min since #1601, never below
|
|
3540
|
+
`watchdog_ms`) since the peer's last output, then cancels the turn as before and
|
|
3541
|
+
logs which open tool call was silent (#542).
|
|
3513
3542
|
|
|
3514
3543
|
After the inactivity watchdog cancels a Codex turn, a late acceptance, answer or
|
|
3515
3544
|
completion from that turn is dropped and never reaches a later audience; its
|
|
@@ -3704,7 +3733,7 @@ approval that leaves a backlog card with no unresolved dependency adds
|
|
|
3704
3733
|
per planner, ids only; a newer one merges and replaces the unsettled copy, which
|
|
3705
3734
|
survives a restart. By default nothing is pulled automatically: the planner reads the
|
|
3706
3735
|
board and decides. With `tasks.auto_pull` on (opt-in, see below) the hub itself pulls
|
|
3707
|
-
the top card explicitly reserved for
|
|
3736
|
+
the top eligible card explicitly reserved for a peer when an auto-pull trigger fires.
|
|
3708
3737
|
|
|
3709
3738
|
When `hub_task_done` leaves a review whose exact-head CI is not yet green (the
|
|
3710
3739
|
lifecycle must be on, the task linked to a PR and not private), the hub starts one watcher
|
|
@@ -3717,7 +3746,10 @@ deadline once, and a deadline after a told result ends silently (#540). Cancelle
|
|
|
3717
3746
|
attempts and a draft PR's deferred `check (macos-latest)` are pending to this watcher,
|
|
3718
3747
|
not failures; it keeps watching for a replacement run. After `gh pr ready`, an older
|
|
3719
3748
|
macOS aggregate failure stays pending while a newer same-workflow macOS shard is queued
|
|
3720
|
-
or running (#1490).
|
|
3749
|
+
or running (#1490). Review admission accepts this repository's draft head when Ubuntu,
|
|
3750
|
+
seeded guards and the other required checks pass and the failed macOS aggregate's
|
|
3751
|
+
exact-head job proves its draft-deferral step was the only failure (#1576); merge
|
|
3752
|
+
still needs the full macOS gate. If GitHub returns multiple
|
|
3721
3753
|
rows for one check, the hub uses an older-run filter only when workflow identity and
|
|
3722
3754
|
start times identify one unique latest run; ambiguous duplicates cannot establish a
|
|
3723
3755
|
pass (#1527). On the result the owner and the reviewer each get one
|
|
@@ -3728,14 +3760,17 @@ once more after a fresh readiness read. A deadline tells the console only. No pe
|
|
|
3728
3760
|
CI, and nothing is polled outside a watcher.
|
|
3729
3761
|
|
|
3730
3762
|
`tasks.auto_pull` (default off, machine-local, live) lets the hub act on that
|
|
3731
|
-
wake-up (#785).
|
|
3732
|
-
|
|
3763
|
+
wake-up (#785, #1547). A slot release, an eligibility-changing backlog plan, a
|
|
3764
|
+
dependency approval that readies a reserved card, or the peer's first idle
|
|
3765
|
+
attachment queues a pull for that peer. The hub pulls the one top backlog card
|
|
3766
|
+
explicitly reserved for that peer, through the same planner pull a
|
|
3733
3767
|
planner makes: revision, dependency, reservation, pinned, frozen-release, P0 order
|
|
3734
3768
|
and WIP checks all apply unchanged, and a refusal becomes a console notice naming
|
|
3735
3769
|
why. Unreserved cards, cards reserved for another peer and private (PII) cards are
|
|
3736
|
-
never pulled. One card per
|
|
3737
|
-
the history entry reads `by: hub` with that planner and the
|
|
3738
|
-
`auto_pull:
|
|
3770
|
+
never pulled. One card per trigger, as the hub for the card's own planner of record:
|
|
3771
|
+
the history entry reads `by: hub` with that planner and a reason of the form
|
|
3772
|
+
`auto_pull: <cause> for <peer>; hub acted for planner <planner>`. The cause is
|
|
3773
|
+
`capacity released`, `backlog planned`, `backlog ready` or `peer available`. A hub that
|
|
3739
3774
|
is paused for recovery pulls nothing, also when the setting is turned off or recovery begins while a pull is already waiting on its screening: that pull writes nothing, and a recovery waits for pulls in flight. A committed `config.json` cannot turn it on: like
|
|
3740
3775
|
the other machine-local policies it is ignored there with a log line.
|
|
3741
3776
|
|
|
@@ -4108,7 +4143,10 @@ registry installs, unversioned coordinator sources, unknown layouts and symlinks
|
|
|
4108
4143
|
remain. Reserved `.runtime-prune-*` quarantine paths cannot launch a managed
|
|
4109
4144
|
runtime. Changed or unknown quarantined contents remain undeleted for inspection.
|
|
4110
4145
|
Admission is home-wide, at most once per hour with at most three removals per
|
|
4111
|
-
run.
|
|
4146
|
+
run. A start while a recovery hold exists (or cannot be read) schedules no pass;
|
|
4147
|
+
the recovery runner schedules one after it releases its lock, a pass deferred
|
|
4148
|
+
only by recovery coordination starts no one-hour wait, and `ahub doctor` reports
|
|
4149
|
+
that deferral without failing runtime pruning (#1546). `~/.agenthub/runtime-prune.db` records admission and the bounded outcome.
|
|
4112
4150
|
Admission stores the worker's PID and process signature. The next admission
|
|
4113
4151
|
atomically replaces a worker proven gone; live or uncertain owners remain
|
|
4114
4152
|
fenced. Worker completion uses the normal database wait bound, while startup
|
|
@@ -4367,7 +4405,7 @@ release. The global CLI is promoted last.
|
|
|
4367
4405
|
|
|
4368
4406
|
A lost commit or start reply is reconciled against the actual daemon identity,
|
|
4369
4407
|
package digest, terminal binding, and phase receipt. An uncertain terminal
|
|
4370
|
-
creation is never repeated blindly. Recovery retains the
|
|
4408
|
+
creation is never repeated blindly. Recovery retains the first-party memory package with the preserved runtime, includes its identity and bytes in the digest, and refuses missing, symlinked or changed retained dependencies instead of resolving a mutable ancestor/global installation. It does not copy the full dependency tree.
|
|
4371
4409
|
|
|
4372
4410
|
After creating a managed terminal, the coordinator saves its exact handle, incarnation and worktree before waiting up to 600 seconds (10 minutes) for authenticated attachment to the expected target hub and conversation. A pending or failed creation receipt also waits when the current target has a verified live launcher; its saved binding retains the pending/failed origin across interruption. An idle terminal alone is not attachment proof: after idle, the coordinator re-reads the launch record and Orca's identity every second within the same bound, until the terminal maps to the expected session or contradicts it (#599). Without a current launch record, a confirmed-ended row for another terminal and an attached session still reporting no id keep the chosen terminal waiting within the same bound; a late matching record continues that wait. Live replacement and unreadable records still block. Only non-offline session ids count, and older-instance launchers are checked before declaring a launch gone. Timeout retains the binding and diagnostic receipt; resume waits on that same binding rather than opening a duplicate.
|
|
4373
4411
|
|
|
@@ -4772,7 +4810,7 @@ next actions").
|
|
|
4772
4810
|
its own (that hub keeps running), stops a target hub it started and has not
|
|
4773
4811
|
released (one an older coordinator started is stopped at that release's
|
|
4774
4812
|
control protocol), moves that operation's
|
|
4775
|
-
`restart.json` aside as `restart.abandoned.<hash>.json` and leaves any other
|
|
4813
|
+
`restart.json` aside as `restart.abandoned.<hash>.json` (only the 5 newest released and abandoned copies are kept) and leaves any other
|
|
4776
4814
|
hub running; only then is the operation recorded `cancelled` and the lock
|
|
4777
4815
|
released. If it fails partway it keeps the lock, records what it did, and
|
|
4778
4816
|
`resume` refuses until you run it again. Once a stop-and-archive is recorded,
|
|
@@ -5455,7 +5493,7 @@ has appeared for `AHUB_CHECK_QUIET_S` seconds (300 by default, set to 300 in CI)
|
|
|
5455
5493
|
slow suite that is still passing tests is never cut. `scripts/progress-tee.sh` passes bun's
|
|
5456
5494
|
output through unchanged and appends one byte to a progress file for each of those lines;
|
|
5457
5495
|
the watchdog polls that file's size. On a stop it prints where the run is and the process
|
|
5458
|
-
table below it first. `AHUB_CHECK_HANG_S` (
|
|
5496
|
+
table below it first. `AHUB_CHECK_HANG_S` (2700 by default, 45 minutes: the owner raised it from 2250 on 2026-11-19 after healthy full runs on the remote host were ended at exit 143 while still printing passing results, #1564; #1086 had sized 2250 from two measured full runs on dgx02 of 1483 s and 1487 s of test time, and before that it was 960) is only the backstop for a run
|
|
5459
5497
|
that keeps printing results while hung; hosted CI sets 1500 on Linux inside a 35-minute
|
|
5460
5498
|
job limit (#378, #593, #752, task 516). The macOS leg runs as four shards and the Ubuntu leg as six (#548, #1490): `AHUB_CHECK_SHARD=i/n`
|
|
5461
5499
|
makes `scripts/check.sh` run slice `i` of the full suite through `bun test --shard=i/n --timings=scripts/test-timings.json`, which puts
|
|
@@ -6131,6 +6169,21 @@ proposed milestones and link open issues. Imports are idempotent, partial reads
|
|
|
6131
6169
|
are marked, and nothing is written back to GitHub. See the [bottom-up placement
|
|
6132
6170
|
contract](design/roadmap.md#bottom-up-placement-r3).
|
|
6133
6171
|
|
|
6172
|
+
### Decomposition (R2)
|
|
6173
|
+
|
|
6174
|
+
`ahub roadmap decompose <id>` asks the configured planner or unique conductor's
|
|
6175
|
+
hub model how one milestone decomposes, reading only the milestone's public title
|
|
6176
|
+
and outcome, the goal or architecture specs it links and the issues it links. Each
|
|
6177
|
+
proposed part cites an id it was shown and says whether it needs its own spec
|
|
6178
|
+
issue or goes straight to a task; an answer that cites nothing it was shown is
|
|
6179
|
+
dropped whole. The kept parts are saved as one pending model answer per milestone,
|
|
6180
|
+
so a second run supersedes the first. Proposing intakes, links and publishes nothing.
|
|
6181
|
+
`ahub roadmap decompose <id> --accept <part>` holds one proposed part as a backlog
|
|
6182
|
+
intake draft linked to the milestone, carrying its spec or task kind; nothing offers,
|
|
6183
|
+
pulls or routes it until the person releases it with `ahub intake approve`, and
|
|
6184
|
+
accepting the same part again returns the same draft. No part becomes a spec issue on
|
|
6185
|
+
GitHub. See the [decomposition contract](design/roadmap.md#decomposition-r2).
|
|
6186
|
+
|
|
6134
6187
|
## Planning and phased releases (#263)
|
|
6135
6188
|
|
|
6136
6189
|
Use `ahub backlog list` to read public staged work (a table by rank with the reserved owner, dependencies and cut titles, then a count by reserved owner; `--full` and piped output keep whole titles and `--json` prints the raw listing), then `ahub backlog plan <id>
|
|
@@ -6579,7 +6632,7 @@ Default-branch capture runs only at daemon startup when a Claude implementer is
|
|
|
6579
6632
|
|
|
6580
6633
|
Project Git retains the core policy that clears credential.helper and core.askpass; an HTTPS push needing those helpers may fail, rather than importing credentials or relaxing that policy. Task branch/config proof reads are bounded synchronous reads (1.5 seconds per reader); slow or unknown evidence asks. The existing sandbox profile discovery is also synchronous; moving it to an asynchronous inventory proof with a shared deadline remains a follow-up. The nonce is visible in a permission response, so it proves a bounded grant rather than native-dispatch provenance.
|
|
6581
6634
|
|
|
6582
|
-
The [native permission receipt](verification/2026-10-23-headless-claude-permissions.md) covers Claude Code 2.1.309, and the [2.1.310 receipt](verification/2026-10-26-claude-implementer-2.1.310.md) repeats it on 2.1.310 (with 2.1.309 as a control), and the [2.1.314 receipt](verification/2026-10-31-claude-implementer-2.1.314.md) repeats it and the host-wrapper procedure on 2.1.314 (with 2.1.310 as a control), and the [2.1.316 receipt](verification/2026-10-31-claude-implementer-2.1.316.md) repeats both on 2.1.316 (with 2.1.314 as a control), and the [2.1.318 receipt](verification/2026-11-05-claude-implementer-2.1.318.md) repeats both on 2.1.318 (with 2.1.316 as a control), and the [2.1.319 receipt](verification/2026-11-06-claude-implementer-2.1.319.md) repeats both on 2.1.319 (with 2.1.318 as a control), and the [2.1.322 receipt](verification/2026-11-10-claude-implementer-2.1.322.md) repeats both on 2.1.322 (with 2.1.319 as a control),
|
|
6635
|
+
The [native permission receipt](verification/2026-10-23-headless-claude-permissions.md) covers Claude Code 2.1.309, and the [2.1.310 receipt](verification/2026-10-26-claude-implementer-2.1.310.md) repeats it on 2.1.310 (with 2.1.309 as a control), and the [2.1.314 receipt](verification/2026-10-31-claude-implementer-2.1.314.md) repeats it and the host-wrapper procedure on 2.1.314 (with 2.1.310 as a control), and the [2.1.316 receipt](verification/2026-10-31-claude-implementer-2.1.316.md) repeats both on 2.1.316 (with 2.1.314 as a control), and the [2.1.318 receipt](verification/2026-11-05-claude-implementer-2.1.318.md) repeats both on 2.1.318 (with 2.1.316 as a control), and the [2.1.319 receipt](verification/2026-11-06-claude-implementer-2.1.319.md) repeats both on 2.1.319 (with 2.1.318 as a control), and the [2.1.322 receipt](verification/2026-11-10-claude-implementer-2.1.322.md) repeats both on 2.1.322 (with 2.1.319 as a control), the [2.1.323 receipt](verification/2026-11-13-claude-implementer-2.1.323.md) repeats both on 2.1.323 (with 2.1.322 as a control), and the [2.1.328](verification/2026-11-19-claude-implementer-2.1.328.md) and [2.1.329](verification/2026-11-20-claude-implementer-2.1.329.md) receipts repeat both on those versions (each with 2.1.323 as a control), each with a deterministic loopback fixture and no real account/model call. It is not sandbox proof or a runtime receipt gate. The real account/model/person interaction remains a separate live leg.
|
|
6583
6636
|
|
|
6584
6637
|
A headless Claude reviewer is run by the hub instead (task 223): declare
|
|
6585
6638
|
`"claude-review": { "kind": "claude", "roles": ["reviewer"], "start_mode": "headless" }`
|
|
@@ -6717,7 +6770,7 @@ Native launcher connections retry transport timeouts/unclean closes with bounded
|
|
|
6717
6770
|
|
|
6718
6771
|
## amem runtime (agent-mem#13 P4)
|
|
6719
6772
|
|
|
6720
|
-
The hub
|
|
6773
|
+
The hub accepts @staix/agent-mem <!-- facts:agent-mem-pin -->>=0.33.0 <1.0.0<!-- /facts:agent-mem-pin --> (a range `bun.lock` resolves; a newer plain release in it with a supported host API needs no hub release) for recall, curated evidence and local deterministic capture. No runtime call reaches a claude-mem worker; `memory.worker_url` is ignored. The person's `ahub memory import claude-mem` remains explicit and off by default. Existing profile, alias, PII and private-turn fences still apply. `ask --remember` and context checkpoints propose machine-local candidates, never automatic curated evidence. See [memory integration](memory.md#in-process-recall-and-capture-agent-mem13-p4) for changed behavior and bounded-view ceilings.
|
|
6721
6774
|
|
|
6722
6775
|
## Person-run backlog legs (#1176)
|
|
6723
6776
|
|
|
@@ -7221,7 +7274,7 @@ settled stubs fit the current response ceiling.
|
|
|
7221
7274
|
|
|
7222
7275
|
## Handing work to another project (#604, agent-hub#1030)
|
|
7223
7276
|
|
|
7224
|
-
Work that belongs to another repository that runs agent-hub on this machine goes onto that repository's board, not into this session. Its own roles plan, implement and review it, and each state change it reaches is reported back here. The first case: after a library you maintain publishes a release, raising
|
|
7277
|
+
Work that belongs to another repository that runs agent-hub on this machine goes onto that repository's board, not into this session. Its own roles plan, implement and review it, and each state change it reaches is reported back here. The first case: after a library you maintain publishes a release that a consumer's declared range does not cover, raising it in the consumer belongs on the consumer's board.
|
|
7225
7278
|
|
|
7226
7279
|
```
|
|
7227
7280
|
ahub task handoff --project <root|id> [<class>] <title...> [--path <p>]... [--issue <n>] [--task <n>] [--detail <text>] [--duplicate-ok <reason>] [--key <uuid>]
|
|
@@ -7361,11 +7414,11 @@ Corrupt or unreadable provenance stays unknown and held. The status next step di
|
|
|
7361
7414
|
|
|
7362
7415
|
A ready memory profile does not prove a successful sync. Read the separate automatic-sync result and timestamp in `ahub status` or Memory. It resets to not run after daemon restart; it is not a machine-global record of manual CLI attempts. Missing remote configuration (shared v1, generation and sharded homes alike) is the neutral `not-configured` state; an interrupted/stopped attempt is neutral `stopped`. Both keep their safe next step and produce no failure log under `quietSyncError`.
|
|
7363
7416
|
|
|
7364
|
-
For policy-declined rows, a person or an agent shell runs `ahub memory declined --json` to inspect IDs and safe rule categories, never note text. The
|
|
7417
|
+
For policy-declined rows, a person or an agent shell runs `ahub memory declined --json` to inspect IDs and safe rule categories, never note text. The agent-mem public `inspectSyncPolicy` API (0.32.1 and later) bounds physical outbound inspection for shared-v1 and generation profiles. A complete result supplies the declined IDs and rules; `complete:false` means the scan is unavailable, stale or over its diagnostic bound, not zero declined rows. The command stays read-only and rechecks its profile binding. No migration or policy edit is performed automatically.
|
|
7365
7418
|
|
|
7366
|
-
The hub projects verified withheld/exported counts when a trusted SDK sync returns a successful placement result. That projection is covered by an injected-result fixture, not an activated-store sync. Agent-mem requires a fresh `placementAttestation` even for an already active v3 store; since 0.35.0 the daemon builds one with the package's own `createPlacementAttestation` on every sync pass and supplies no writer facts of its own, so no attestation is fabricated. A refused attestation is the closed cause `writer` in status, the dashboard and the log: its category, its cause class (`missing`, `changed`, `unavailable`) and the next step (repair the amem install and its host pin, then a person runs `amem migrate --sync-placement --dry-run`). Activation remains a person-run action. A nonzero withheld count in a successful result is not a transport failure and does not mean those rows were deleted, rewritten or published. Inspect the IDs and rules before deliberately changing any source or approved policy; a forget operation does not remove its original text from physical history.
|
|
7419
|
+
The hub projects verified withheld/exported counts when a trusted SDK sync returns a successful placement result. That projection is covered by an injected-result fixture, not an activated-store sync. Agent-mem requires a fresh `placementAttestation` even for an already active v3 store; since 0.35.0 the daemon builds one with the package's own `createPlacementAttestation` on every sync pass and supplies no writer facts of its own, so no attestation is fabricated. A refused attestation is the closed cause `writer` in status, the dashboard and the log: its category, its cause class (`missing`, `changed`, `unavailable`) and the next step (repair the amem install and its host pin, then a person runs `amem migrate --sync-placement --dry-run`). An in-place agent-mem patch upgrade inside the declared range turns the writer proof to `changed` the same way, because placement records each writer's installed version and file hash, and it stays that way until a person re-runs `amem migrate --sync-placement --dry-run`. Activation remains a person-run action. A nonzero withheld count in a successful result is not a transport failure and does not mean those rows were deleted, rewritten or published. Inspect the IDs and rules before deliberately changing any source or approved policy; a forget operation does not remove its original text from physical history.
|
|
7367
7420
|
|
|
7368
|
-
A legacy store without active per-row placement still blocks a sync containing declined rows. Status names inactive placement and the person-only `amem migrate --sync-placement --dry-run` preview, which requires every local writer installation through repeatable `--writer-root` flags. It keeps `ahub memory declined` as the safe inspection step. The native CLI supports activation from 0.22.0; the
|
|
7421
|
+
A legacy store without active per-row placement still blocks a sync containing declined rows. Status names inactive placement and the person-only `amem migrate --sync-placement --dry-run` preview, which requires every local writer installation through repeatable `--writer-root` flags. It keeps `ahub memory declined` as the safe inspection step. The native CLI supports activation from 0.22.0; the declared core floor is 0.33.0. See the [activation preview and prerequisites](memory.md#automatic-sync-health-1173) before any separately authorized apply. Preview writes nothing, and activation does not migrate layouts, change policy or automatically raise a format floor. The hub does not invoke it or fabricate its proof.
|
|
7369
7422
|
|
|
7370
7423
|
The bounded diagnostic addresses #1173 AC4; AC5 has result projection and the host attestation. Whether an activated store syncs on a person's machine is not established by the isolated fixtures.
|
|
7371
7424
|
|
package/docs/quickstart.md
CHANGED
|
@@ -18,7 +18,7 @@ Or use the matching GitHub release:
|
|
|
18
18
|
|
|
19
19
|
<!-- facts:install-tag -->
|
|
20
20
|
```bash
|
|
21
|
-
bun add -g github:STAIxBWLB/agent-hub#v0.
|
|
21
|
+
bun add -g github:STAIxBWLB/agent-hub#v0.45.0
|
|
22
22
|
ahub setup
|
|
23
23
|
```
|
|
24
24
|
<!-- /facts:install-tag -->
|
|
@@ -54,6 +54,18 @@ A project whose hub is stopped is upgraded without starting it: `ahub upgrade
|
|
|
54
54
|
--all-stopped --to <version>` does that for every stopped project at once
|
|
55
55
|
(`--dry-run` lists each one first).
|
|
56
56
|
|
|
57
|
+
## Upgrading to 0.45.0
|
|
58
|
+
|
|
59
|
+
The memory library moves from an exact agent-mem pin to the range `>=0.33.0 <1.0.0` (0.33.0 in the lockfile): a newer agent-mem minor now loads without a hub release when its host API matches, and `ahub doctor` names the cause when it does not. No memory home or sync format floor is raised automatically, but a newer minor may raise a store format floor, so roll the hub back together with the store. An ACP peer (headless Kimi, Qwen, Jcode) now keeps a turn with a silent open tool call alive for up to 60 minutes instead of 30, so a long gate wait no longer cancels it; a value you set in `adapter_timing.acp_tool_ceiling_min` is kept, and the setting now accepts up to 120. When the ceiling does cancel a Jcode turn, `hub.log` says so and names the restart and queue commands. `events.jsonl` and `hub.log` now rotate by size (`docs/events.md` "Rotation"): a script of your own that reads `events.jsonl` directly should read the `events.jsonl.<offset>` segments before the live file. With `research.enabled`, research records gain a text-free `edits` block. `ahub roadmap check`, `sync` and `export` are new; nothing writes to GitHub unless you apply with a confirmation fingerprint. `ahub roadmap decompose <id>` proposes cited parts of a milestone, and `--accept <part>` holds one as an intake draft until you release it with `ahub intake approve`. The opt-in `edit_governance.arm` setting stays `baseline` unless you change it.
|
|
60
|
+
|
|
61
|
+
`ahub upgrade` does not update the global CLI or the shared Claude plugin: run `bun add -g @staix/agent-hub@0.45.0` and then `ahub setup` yourself, and `ahub doctor` warns while either is older than a running daemon.
|
|
62
|
+
|
|
63
|
+
## Upgrading to 0.44.0
|
|
64
|
+
|
|
65
|
+
The memory library moves to agent-mem 0.30.0. No memory home or sync format floor is raised automatically; coordinate any later floor change across every installation sharing the home. Sandboxed commands get writable Bun and npm caches when the caller has not set their paths. Ready reserved backlog work can now be pulled automatically when it becomes eligible.
|
|
66
|
+
|
|
67
|
+
`ahub upgrade` does not update the global CLI or the shared Claude plugin: run `bun add -g @staix/agent-hub@0.44.0` and then `ahub setup` yourself, and `ahub doctor` warns while either is older than a running daemon.
|
|
68
|
+
|
|
57
69
|
## Upgrading to 0.43.0
|
|
58
70
|
|
|
59
71
|
The memory library moves to agent-mem 0.29.0, which stops a hub memory sync from holding the daemon for minutes. If you turned the periodic sync off while waiting for that fix, turn it back on with `ahub settings set memory.sync_interval_min 10 --now` (the key now applies without a restart), or delete the `memory` block you added to `.agenthub/config.local.json`. Each memory profile rebuilds its index once on first open, so the first memory call after the upgrade can be slower on a large home; a 0.42.0 hub keeps its own index file and can still share the home. `ahub upgrade --all-stopped --to 0.43.0` retargets every stopped project without starting its hub. Nothing else changes until you use it.
|
|
@@ -496,7 +508,7 @@ More: `ahub help`. How it is built and why: [`docs/specs/2026-09-19-agent-hub-de
|
|
|
496
508
|
|
|
497
509
|
## Shared memory
|
|
498
510
|
|
|
499
|
-
The hub
|
|
511
|
+
The hub accepts the first-party `@staix/agent-mem` <!-- facts:agent-mem-pin -->>=0.33.0 <1.0.0<!-- /facts:agent-mem-pin --> core as a range below the next major: a plain release inside it with a supported host API needs no hub release, and the lockfile resolves one release. That includes deterministic capture; no claude-mem worker is needed. Existing shared-v1 memory remains the default; upgrading does not migrate it. Managed agents use screened `hub_memory_search`, `hub_memory_show` and `hub_memory_graph` tools, or propose a correction with `hub_memory_correct`; only a person accepts candidates through the supported `amem review` path. Since agent-mem 0.7.0, `amem review` also accepts candidates on a selected generation.
|
|
500
512
|
|
|
501
513
|
Before any real generation migration, upgrade every hub sharing that memory home to 0.12.30 or later and check its authenticated binding with `ahub memory profile-check` in each custom registry. Ready bindings prove compatibility, not an atomic live cutover: quiesce consumers and close their handles before migrating, then reopen through the supported session-preserving lifecycle. Invalid or changed profiles disable native memory without falling back to legacy writes; the bus and board continue. See [memory operations](operations.md#hub-memory) for the remaining rollout gates.
|
|
502
514
|
|
package/docs/research.md
CHANGED
|
@@ -36,6 +36,8 @@ held record lacked, and a held v2 row written before `ownerModels` existed (#140
|
|
|
36
36
|
`ahub research backfill` can prove an owner model from the surviving events (readers keep the latest row of a task). A v2 row also replaces a held v1 row of the same task. A failing write is one `hub.log` line per hub run and
|
|
37
37
|
never changes the task flow.
|
|
38
38
|
|
|
39
|
+
The live writer does not read `events.jsonl` from byte 0 at each closure (#1555 AC5). One catch-up pass over the bytes appended since the last closure (the first closure after a hub start reads the file once) keeps, for each task id, the byte offset of its latest proposal and the cross-task state as of that offset: which peers are attached, their add-on fingerprints, whether the log reports briefs at all, and the first hub run that attributes person events. A closing task then reads only its own slice from that offset, skips `quota` rows (no record field reads one), and ignores a usage row whose key the log counted before the slice. A task whose proposal the tail does not hold, or an id the log started more than once, is read whole, as before. The row is the same one the whole-file fold gives for that task, byte for byte (`test/research-slice.test.ts`); a difference is a defect.
|
|
40
|
+
|
|
39
41
|
`ahub research backfill` builds the same records from a project's existing `events.jsonl` (marked
|
|
40
42
|
`writer.source: "backfill"`), reading every event attributed to a task, and appends those the store does not hold yet.
|
|
41
43
|
It is for tasks approved before research was on: a record it writes is final, so running it while a live record still
|
|
@@ -97,6 +99,20 @@ delivery is created no later than it is updated), and treats the journal as unkn
|
|
|
97
99
|
| `stalls` | persisted idle-ladder entries on the task's history (the stall table itself is cleared when a task closes); null without the board |
|
|
98
100
|
| `handoffs` | `in`, `out` from the handoff tables |
|
|
99
101
|
| `cohort` | `silent`, `advisory` or `none` |
|
|
102
|
+
| `edits` | #1556 T2, text-free counts folded from `turn_end.edits` of the owner turns of a non-PII task: `observability` (`hook_and_tree`, `stream_and_tree`, `tree_only`, `unknown`), `policyArm`, `editTool` and `shellRoute` (`total`, `verifiedFullRead`, `partialReadOnly`, `blindOrStale`, and `occRejected` or `blockedByGuard`), `unattributedTreeWrites`, `postEdit`. `editTool` and `shellRoute` are null, never 0, when no hook or stream saw the task's tool calls (`tree_only`) or the log holds no edit evidence; `quality.json` then counts each of their leaves as unknown. Live writer and `ahub research backfill` fold the same events with one function, so the rows are byte-identical. A row written before this has no block and reads as unknown |
|
|
103
|
+
|
|
104
|
+
When a write's pre-image is unavailable, its route total remains known but all three read-grade fields are null. A task mixing observability kinds has unknown route totals instead of partial counts. A tree-write or post-edit total is null when any contributing turn lacks that evidence.
|
|
105
|
+
|
|
106
|
+
### Edit-governance factorial analysis
|
|
107
|
+
|
|
108
|
+
`groupEditRates` reads the latest task records and groups only an unambiguous single owner, owner model, family and recorded arm. Private records are withheld; missing or ambiguous identity and unknown arms are counted as unknown. `policyArm` is the last recorded turn arm, not proof that all turns used that arm; model evidence grades remain visible.
|
|
109
|
+
|
|
110
|
+
The five labels are `baseline`, `soft_guidance`, `route_guard`, `occ_guard` and `combined_guard`. For each group, `p = S / (E + S)`, `b_E = E_blind_or_stale / E`, `b_S = S_blind_or_stale / S`, and `B = (1-p)b_E + p b_S`. Partial reads are reported separately and are not silently added to blind or stale. The sensitivities are `b_S - b_E` and `p`. Missing counts, invalid counts, a zero denominator, or unknown or nonzero unattributed tree writes make the affected result null, never zero.
|
|
111
|
+
|
|
112
|
+
`editFactorial` compares baseline, route, OCC and combined rates as descriptive arithmetic; `editFactorialGroup` also requires the same family, owner model and task class on all four groups. Neither result establishes causal comparability; a separately preregistered and evidenced design is needed. `editMarginalBenefit` computes the declared formula only from caller-supplied costs, deltas and penalties and never selects a live arm.
|
|
113
|
+
|
|
114
|
+
`C_success` stays unknown until a later spec defines measured, unit-consistent cost components; `quality.json` reports `fields["edits.costPerVerifiedSuccess"]` as null and counts every v2 task as unknown. `editSuccessCost` accepts caller-supplied component totals only when execution, verification, rework and human costs have separate evidence, the same unit and identical task sets, and the caller supplies an evidenced nonempty verified-success subset. These are declared inputs, not a host verification; aggregate TaskRecord tokens or time are never substituted.
|
|
115
|
+
|
|
100
116
|
|
|
101
117
|
The record reads the board through a read-only handle (`readEvidence`): titles, details, plans, refs and notes are never
|
|
102
118
|
decoded, and the journal's envelope bodies are never read.
|
|
@@ -186,3 +202,5 @@ association, not cause. Controlled arms are `ahub bench run --addon <name>=on|of
|
|
|
186
202
|
taken from both are in `docs/addons/`.
|
|
187
203
|
|
|
188
204
|
Agents may read the measures and export (ids and counts only), `--dataset` included; `backfill` is the person's or the configured conductor's (#933), and an agent labels only its own task.
|
|
205
|
+
|
|
206
|
+
Quota rows are windowed by reading time (`measuredAt` when available, otherwise event time). Quota quality `readings` and `stalenessP95Ms` describe recorded rows. Gaps and gap duration preserve the unfiltered stream; intervals between recorded rows are either original silences of at least 15 minutes or shorter than 30 minutes for in-order readings.
|
package/docs/roadmap.md
ADDED
package/docs/sdlc.md
CHANGED
|
@@ -156,13 +156,15 @@ are the ones printed by `ahub help`; placeholders name values to choose.
|
|
|
156
156
|
|
|
157
157
|
Task lifecycle fields store stage, issue/PR identity, observed head, reviewed head, local-gate head/result and bounded check/readback metadata. Legacy rows read with no lifecycle metadata. Every change goes through Tasks and records its actor; adapters/tools/CLI never write Board directly. Readback timestamps identify observations, not a freshness promise. Persist no task text in lifecycle receipts; public output uses the existing PII stub and publicTitle/publicView.
|
|
158
158
|
|
|
159
|
-
A reviewer records the head it actually reviewed. If GitHub no longer reports that head, a stale verdict refuses before effects. Changes requested does not require green CI. Approval requires a current review and all configured required checks successful on that head; neutral/skipped does not substitute unless explicitly allowed by the project's gate contract. A local check records an exact SHA and its result; it is a claimed local receipt, labelled separately from externally fetched CI.
|
|
159
|
+
A reviewer records the head it actually reviewed. If GitHub no longer reports that head, a stale verdict refuses before effects. Changes requested does not require green CI. Approval requires a current review and all configured required checks successful on that head, except the proven draft macOS deferral described below; neutral/skipped does not substitute unless explicitly allowed by the project's gate contract. For that draft only, missing GitHub approval and outstanding review requests are deferred to merge, because the connector does not review a draft. Unknown review-request evidence, a pending change request, unresolved threads and all other blockers still refuse approval. A local check records an exact SHA and its result; it is a claimed local receipt, labelled separately from externally fetched CI.
|
|
160
160
|
|
|
161
161
|
## Readbacks and presentation
|
|
162
162
|
|
|
163
163
|
Use structured gh JSON/GraphQL read-only calls (the guarded merge below is the one exception) with validated repository and numeric artifact identities. No shell interpolation, PR/issue body fetching, token logging or unbounded comment storage. Failure yields unknown. Required checks come from repository rules or explicitly configured names; an empty/unknown set is not silently green. Review-thread status is counted, not copied. Cancellation and task-owner generation fencing prevent a late read from approving reassigned work.
|
|
164
164
|
|
|
165
|
-
GitHub may return more than one row for a named check after a rerun or cancellation. When every row has a workflow identity and start time, and those identify one uniquely newest run of the same workflow, the hub evaluates that run and drops older rows. If workflow identity or ordering is ambiguous, it retains the rows; duplicate evidence remains a blocker rather than a guessed pass. In the CI watcher, cancelled attempts and a draft PR's deferred `check (macos-latest)` read as pending so the watcher can wait for a replacement run
|
|
165
|
+
GitHub may return more than one row for a named check after a rerun or cancellation. When every row has a workflow identity and start time, and those identify one uniquely newest run of the same workflow, the hub evaluates that run and drops older rows. If workflow identity or ordering is ambiguous, it retains the rows; duplicate evidence remains a blocker rather than a guessed pass. In the CI watcher, cancelled attempts and a draft PR's deferred `check (macos-latest)` read as pending so the watcher can wait for a replacement run. Review admission can accept this repository's draft head only when Ubuntu and seeded guards pass, the remaining required checks pass, and the failed macOS aggregate's exact-head job proves its draft-deferral step was the sole failure. Incomplete or stale proof remains a blocker. This is review readiness, not a successful full gate: the macOS aggregate still needs to pass for merge.
|
|
166
|
+
|
|
167
|
+
For the repository workflow, see the `Draft first` and `Merging after approval` rules in `AGENTS.md`. The connector reviews after the approved draft is marked ready; its unresolved threads and pending change requests still block merge. A later push invalidates the earlier head's approval. The reviewer marks the approved head ready and merges only after the full exact-head gate and review blockers settle.
|
|
166
168
|
|
|
167
169
|
ahub sdlc status and explain expose mode, stage, gate, observed/reviewed/local-check heads, next actor and next action. Console/dashboard derive the same result. Merge ordering compares exact PR path sets, reports intersections and never guesses an automatic landing order where dependencies are unknown. Release readiness lists merged work since the tag, stale/nonancestor documentation stamps and open native/live receipts; each unknown remains visible.
|
|
168
170
|
|
|
@@ -409,9 +411,10 @@ S9 ceilings: a private build task with an issue reference cannot satisfy enforce
|
|
|
409
411
|
|
|
410
412
|
What each metric reads, and what it does not:
|
|
411
413
|
|
|
412
|
-
- `first_pass_check`
|
|
414
|
+
- `first_pass_check` uses the first completion check; if none exists, it uses the latest isolated run before the first done at that done's recorded head. Without matching evidence it is unknown.
|
|
415
|
+
- `accepted_to_plan_ms` measures task acceptance to plan review only when no spec-acceptance event was recorded. A carried spec acceptance counts as a spec-acceptance anchor.
|
|
413
416
|
- `stale_head_re_reviews` counts review rounds whose verdict was bound to a different head than the review was requested for (the `done`'s recorded head against the verdict's findings head), so it needs both heads on the round. New done entries record the requested commit independently of cost plans; older done entries use the cost head or the head of the bound spec report. A task with no such round is `unknown`, not 0. (A `done` after an `approved` is not a signal: the board cannot produce one.)
|
|
414
|
-
- `acceptance_to_merge_ms`, `same_head_ci_reruns`, `ci_runs_at_merge`, `github_reviews_at_merge` and `review_rounds_at_merge` come from the merge-time readback. The guarded merge (`ahub sdlc merge`, or the auto-merge after an approving verdict) reads the merged PR once, after the merge is observed, and records on the task's merge record `cost: { mergedAt, ciRuns, ciReruns, reviews }`: CI runs linked to any head of the PR (an attempt after the first of one run id is a rerun) and distinct GitHub reviews. The read is bounded (8 s, the same fixed queries as `ahub sdlc costs`), host-written and never a tool input, and it never decides the merge result. A CI figure is known only when the run list was complete, and a failed or partial read leaves the field `null`; a task whose merge was not read, merged
|
|
417
|
+
- `acceptance_to_merge_ms`, `same_head_ci_reruns`, `ci_runs_at_merge`, `github_reviews_at_merge` and `review_rounds_at_merge` come from the merge-time readback. The guarded merge (`ahub sdlc merge`, or the auto-merge after an approving verdict) reads the merged PR once, after the merge is observed, and records on the task's merge record `cost: { mergedAt, ciRuns, ciReruns, reviews }`: CI runs linked to any head of the PR (an attempt after the first of one run id is a rerun) and distinct GitHub reviews. When GitHub omits a run's link to the PR, the runs are the PR branch's complete pull-request run inventory between the PR's creation and its merge, read only for a same-repository head on a branch no other overlapping PR uses (#1584); incomplete pagination or ambiguous branch ownership keeps the figure unknown. The read is bounded (8 s, the same fixed queries as `ahub sdlc costs`), host-written and never a tool input, and it never decides the merge result. A CI figure is known only when the run list was complete, and a failed or partial read leaves the field `null`; a task whose merge was not read, merged before this record existed or merged by hand where the host did not observe it, is `unknown` for all of them, never 0. A PR merged outside the hub while its repository's merge mode is `off` is observed by the host for an approved task (`mergeReadback`, #1555: a pass every 5 minutes that reads at most three tasks and reads a task again no sooner than 10 minutes later, for 24 hours after the approval; only a merge at the reviewed head is recorded) and supplies the same figures when its cost read completes. `review_rounds_at_merge` counts the task's review handoffs (`done`) up to the merge. `merged` in the report says how many counted tasks have a read merge and how many do not. `ahub sdlc costs` still carries the per-PR cost table with its own scope.
|
|
415
418
|
- `stalls` counts open stalls on public tasks by kind and the dones recorded without writes.
|
|
416
419
|
|
|
417
420
|
`.agenthub/sdlc.toml` may set `[bands.<metric>]` for `acceptance_to_plan_ms`, `acceptance_to_first_review_ms`, `first_pass_approval`, `rework_rounds`, `first_pass_check`, `stale_head_re_reviews`, `hotfix_rate` or `security_open_alerts`. Every field is optional and bounded: `window` (4 to 200, default 20), `min_samples` (3 to 200, default 8, at most `window`), `log_sigma` 2, `diagnose_sigma` 3, `propose_sigma` 4 (ordered, 0.5 to 20), `drift_run` (3 to 50, default 6) and `min_delta` (the smallest step worth any tier: an hour for the times, one round, half a rate). An unknown metric or field is refused with its path. The newest value is compared with the mean and population standard deviation of the `window` values before it, on the bad side only (a longer time, more rework, a lower rate). The deviation is floored per metric (half an hour, or half a round or a rate) so a flat baseline does not turn one step into thousands of deviations. Fewer than `min_samples` before it fires nothing, and so does a step under `min_delta`, drift included. A run of `drift_run` newest values all more than one deviation on the bad side is at least `diagnose` even when none reaches a sigma tier, provided the newest step clears `min_delta`. Tiers:
|
|
@@ -724,3 +727,15 @@ Security finding text and paths remain in authorized private reports, not
|
|
|
724
727
|
public backlog cards, briefs or memory. Lifecycle off advertises no survey tool
|
|
725
728
|
or additional task readback. Live audit/survey dogfood (#1403 T8) still requires
|
|
726
729
|
the person's separate instruction; this feature adds no schedule or live run.
|
|
730
|
+
|
|
731
|
+
Externally observed merged PRs use host-only `mergeReadback` evidence. Its cost fields remain unknown if the bounded readback cannot complete. The latest configured security scan reports a per-source number or `unknown`; an unreadable source is never reported as zero.
|
|
732
|
+
|
|
733
|
+
## Closed-task compaction (#1555 AC6)
|
|
734
|
+
|
|
735
|
+
A task that reaches `approved` or `cancelled` drops its ephemeral state, and nothing a metric or a verdict reads:
|
|
736
|
+
|
|
737
|
+
- Its `touches` rows (`Turns.pruneTouches`). Every reader looks at open tasks only (`conflictsOf`, `pathWarnings`, the owner-write evidence of an in-progress task), and the overlap counts are already frozen in `tasks.history`. A startup pass also prunes rows of tasks that closed while no hub ran. A turn that ends after its task closed records no rows.
|
|
738
|
+
- The output tail and staged `output.log` of its finished or stale isolated checks (`ContainerRunner.compactTask`). The receipt keeps its status, exit, head, tree, timing, owner and revision; a queued or running run is never touched.
|
|
739
|
+
- The settled results of a closed Pi session in `pi_tool_receipts` (`compactPiResult`): a new session closes the earlier ones, and a result over 2,000 characters keeps its prefix and, for a shell result, its exit code. The active session's receipts are untouched.
|
|
740
|
+
|
|
741
|
+
Task rows, history, `sdlc` receipts, `usage_rollup` and `rollup_seen` are never deleted or edited. `test/terminal-compaction.test.ts` computes `sdlcMetrics`, `costMetrics`, `releaseMetrics`, the usage roll-up and the whole task rows before and after a compaction and requires them identical.
|
package/docs/security.md
CHANGED
|
@@ -9,7 +9,7 @@ agent-hub connects agents that can each run commands. This page says what the hu
|
|
|
9
9
|
- **Write retry keys grant no authority (#1078).** The `tool_write_idempotency` feature binds top-level control `requestId` keys to authenticated actor/role/launch/generation/execution scope and canonical business arguments. For task proposals and reviews, MCP `request_id` is an explicit retry argument, independent of JSON-RPC correlation; it is removed before dispatch. A timeout or connection loss remains `outcome: unknown`, with a settling read, while a pre-admission refusal says this attempt did not run. Reusing another scope's key, changed arguments, expired or old-instance IDs never starts a new write. Current authority and privacy are rechecked before a cached result is returned, including the PII status of overlap references. Request payloads are hashed rather than retained; result records are bounded and remain in daemon memory. Limits are per authenticated actor (512 entries/15 minutes), not one shared admission budget. Delivery acknowledgement uses the journal's existing idempotence and socket/generation ownership checks without consuming that cache, so another actor's filled window cannot prevent settlement. Legacy clients without keys keep their path; current clients refuse explicit replay to an older daemon that would ignore it. See [safe retry and refusal semantics](operations.md#control-write-outcomes-and-safe-retries-1078).
|
|
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
|
-
- **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
|
|
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 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
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.
|
|
@@ -61,7 +61,7 @@ instead of changing the backend or copying dependency files.
|
|
|
61
61
|
|
|
62
62
|
## Native memory authority and profile selection
|
|
63
63
|
|
|
64
|
-
The portable core is the
|
|
64
|
+
The portable core is the first-party `@staix/agent-mem` package, accepted as the range `>=0.33.0 <1.0.0` in `package.json` (a plain release whose host API the hub supports; the lockfile resolves one); 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.
|
|
65
65
|
|
|
66
66
|
`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.
|
|
67
67
|
|
|
@@ -937,7 +937,7 @@ A terminal Claude implementer or verifier instance (#525-5) owns write-class tas
|
|
|
937
937
|
|
|
938
938
|
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.
|
|
939
939
|
|
|
940
|
-
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), [on 2.1.322](verification/2026-11-10-claude-implementer-2.1.322.md)
|
|
940
|
+
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), [on 2.1.322](verification/2026-11-10-claude-implementer-2.1.322.md), [on 2.1.323](verification/2026-11-13-claude-implementer-2.1.323.md), [on 2.1.328](verification/2026-11-19-claude-implementer-2.1.328.md) and [on 2.1.329](verification/2026-11-20-claude-implementer-2.1.329.md); it is not sandbox proof, and a real account, model and person interaction remains a live leg.
|
|
941
941
|
|
|
942
942
|
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.
|
|
943
943
|
|
|
@@ -1155,7 +1155,7 @@ it has no reach a same-user process lacks (see "What is not defended").
|
|
|
1155
1155
|
|
|
1156
1156
|
`hub_check_start` accepts only a current owner's in-progress task, its recorded branch/commit and either `typecheck` or one to 32 existing `test/*.test.ts` paths. `checks.runner = "container"` is a person opt-in in an untracked config file; a tracked config cannot grant it. Missing service/image, an unverified internal network, stale task/owner/native generation, unavailable dependencies or an invalid path fails closed. There is no host-shell, network or Seatbelt fallback.
|
|
1157
1157
|
|
|
1158
|
-
The runner uses Apple `container`, pinned Bun 1.4.
|
|
1158
|
+
The runner uses Apple `container`, pinned Bun 1.4.4 and a verified `hostOnly` internal network with DNS disabled, two CPUs and 4 GiB. It starts a named, labeled VM with a bounded idle process, copies a hub-owned snapshot into the running VM, then invokes a fixed `container exec` check. This run/copy/exec sequence is required because Apple `container copy` rejects a stopped container. No host directory, home, credential directory, hub state or socket is mounted. Source blobs are read from the exact Git commit; symlinks and gitlinks anywhere in the source refuse the run before exclusions. Directory prefixes and filenames are checked for NFC/Unicode case-fold collisions before staging writes, including denied entries; folding must reach a fixed point within a bounded number of passes or the run refuses. This is a conservative collision screen, not a claim of exact parity with every host filesystem. Denied and PII paths are excluded and counted. Dependency files require an equal lockfile, bounded regular files/directories and internal relative symlinks. No dependency installation or Internet access occurs in the VM.
|
|
1159
1159
|
|
|
1160
1160
|
The optional remote backend (#793) selects `checks.runner = "remote"` and a strict `checks.remote` object containing `host`, digest-pinned `image` and absolute `root`. Both the grant and destination must come from an untracked `config.local.json`; a tracked or shared-file grant is refused. The destination is host-owned configuration, never a peer argument. OpenSSH uses BatchMode, disables TTY allocation (`-T`), agent/X11 forwarding (`-a`, `-x`), configured forwardings and local SSH commands, and retains only the hub-owned agent socket for local SSH authentication. It uses fixed Docker operations, and every remote argument is shell-quoted because OpenSSH joins the command before the remote shell interprets it. SSH diagnostics are discarded. Only actual check execution merges remote command stderr into screened output; readiness JSON keeps stdout separate from withheld diagnostics. Exit 255 discards stdout too; retained container stdout is screened and destination/root strings are replaced before receipt/output persistence. Public image identity is digest-only. Platform comes from inspected Linux image metadata and the actual fixed Bun probe architecture, with only a numeric Docker version prefix. No host, account or remote root is included in those projections.
|
|
1161
1161
|
|