@staix/agent-hub 0.40.0 → 0.42.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 +17 -1
- package/README.md +1 -1
- package/docs/addons/claude-mem.md +1 -1
- package/docs/agent-notes/tasks.md +1 -1
- package/docs/dogfood.md +5 -3
- package/docs/events.md +2 -0
- package/docs/memory.md +10 -7
- package/docs/operations.md +41 -8
- package/docs/quickstart.md +15 -3
- package/docs/research.md +1 -1
- package/docs/security.md +3 -3
- package/docs/verification/2026-11-16-0.41.0.md +33 -0
- package/docs/verification/2026-11-16-0.42.0.md +48 -0
- package/docs/verification/2026-11-16-compat-producer-gaps-1248.md +57 -0
- package/docs/verified.json +20 -20
- package/package.json +2 -2
- package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-hub/kimi-hook.js +35 -4
- package/plugins/agent-hub/server.js +35 -4
- package/src/cli/agent-attribution.ts +6 -0
- package/src/cli/help.ts +7 -7
- package/src/cli/identity.ts +8 -2
- package/src/cli/main.ts +2 -1
- package/src/cli/memory.ts +21 -6
- package/src/hub/checkpoint-fields.ts +60 -0
- package/src/hub/ci-watch.ts +17 -2
- package/src/hub/config-apply.ts +2 -2
- package/src/hub/daemon.ts +24 -10
- package/src/hub/events.ts +4 -0
- package/src/hub/hub-tools.ts +2 -1
- package/src/hub/operational-view.ts +6 -6
- package/src/hub/research-quality.ts +18 -3
- package/src/hub/tasks.ts +1 -1
- package/src/memory/recall.ts +44 -2
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Compat receipt producer gaps (#1248)
|
|
2
|
+
|
|
3
|
+
Date: 2026-11-16. Hub task 978, Refs #1248 and #888. The issue's "Not met yet" list named three gaps the daily `agent-compat` run showed on 2026-11-12: pi `producer-not-importable`, kimi-review `producer-not-committed` (with `autoAdmit: true`) and qwen `proof-failed` on the cleanup legs. This records what each one was, what changed, and what still keeps a version from being admitted by CI. No account, API key or model was used: every check below ran the harness (`scripts/compat-receipt.ts` and its worker) against the published npm or GitHub release artifact, with a private HOME, on this Mac (arm64) and on the hosted runs' stored artifacts.
|
|
4
|
+
|
|
5
|
+
## Result in one table
|
|
6
|
+
|
|
7
|
+
| Id | Gap on 2026-11-12 | Cause found | Change | Can CI open a PR now? |
|
|
8
|
+
| --- | --- | --- | --- | --- |
|
|
9
|
+
| pi | every leg `producer-not-importable` | The historical producers (`docs/verification/pi-152-model-free.ts`, `pi-152-native.mjs`) were top-level scripts and the worker had no `pi` branch, so the harness only installed the package | `proofs/pi.ts` plus the byte-identical driver `proofs/pi-native.mjs`, wired into `proof-worker.ts` | Yes. All nine legs pass on 1.5.2 and no required leg is human-only |
|
|
10
|
+
| kimi-review | `native-tool-loop`, `write-absent`, `write-positive-control` fail | Two producer bugs, below. Not a Kimi 2.6 regression | Update check switched off in the native child; the 2.6.x refusal wording accepted exactly | No. Its required `source-review` leg is human-only, so the outcome is `not-run` by design |
|
|
11
|
+
| qwen | cleanup legs `fail`, `ownedStopConfirmed: false` (0.27.2, 2026-11-12) | Not reproduced. One failed receipt of six read, none in six local runs | Nothing changed in the producer | No. `reviewed-optional-lifecycle-replay` is human-only, so the outcome is `not-run` by design |
|
|
12
|
+
|
|
13
|
+
## pi
|
|
14
|
+
|
|
15
|
+
The nine legs are the ones the 1.5.0 and 1.5.2 receipts record: native identity, extension load and RPC session identity, installed SDK registration, managed tool callback with receipt replay, failed tool result, zero provider requests, host permission modes, version admission and isolated-home cleanup. `proofs/pi.ts` keeps every assertion of the 1.5.2 producer and changes only what a harness needs: the launcher, package root and version are the installed candidate's (bound by the installer's npm integrity), each native child runs under the bounded command port, and the SDK driver is copied unchanged.
|
|
16
|
+
|
|
17
|
+
Two legs needed a decision, not a copy:
|
|
18
|
+
|
|
19
|
+
- `host-permission-modes` and `version-admission` test this checkout, not the candidate. They run the same test files the receipts ran (`test/permission-modes.test.ts` "Pi mode grants", and `test/pi-compat.test.ts` with `test/compat.test.ts`), with every hub variable removed from the environment.
|
|
20
|
+
- `isolated-home-cleanup` was a hash of the account's `~/.pi/agent` before and after in the receipts. It still is: SHA-256 over path and content of every file there, skipping `sessions`, `logs`, `cache`, `caches`, `install`, `installs` and `bin` (the entries the earlier receipts excluded), bounded to 20,000 entries. A home that is absent before must still be absent after, so a run that wrote outside its private home fails the leg.
|
|
21
|
+
|
|
22
|
+
Measured: `bun scripts/compat-receipt.ts pi 1.5.2` (through `runCompatReceipt`) installed the exact npm artifact (integrity `sha512-mUWI04rqF1Vd/m1q+Ps1XeWsTXEVvRUnsmRa83I3Dzua0Tx5bYS93imeqtIfrXf7PkkaR6ERz+AuQhIJlom5yA==`, equal to the 1.5.2 receipt's), ran in 11.4 s, and returned `outcome: pass`, `eligible: true`, all nine legs `pass`, owned stop confirmed. `test/compat-receipt-pi.test.ts` shows each leg failing for the fault it exists to catch (a wrong version, stderr noise, a missing extension, a second effect, an allowed denial, a nonzero message count, a missing shutdown event, a provider request, a failing host fixture, a changed account home, an unconfirmed stop, an aborted run).
|
|
23
|
+
|
|
24
|
+
Hosted evidence is the next daily run after this merges; this PR does not claim it.
|
|
25
|
+
|
|
26
|
+
## kimi-review
|
|
27
|
+
|
|
28
|
+
Both causes were found by running the harness on the verified 2.5.1 and on 2.6.2 and tracing the failing assertion. They fail identically, so neither is a 2.6 behavior change.
|
|
29
|
+
|
|
30
|
+
1. **The CLI's startup update check.** Kimi fetches the release manifest from `code.kimi.com` when it starts. The loopback-only preload refuses that attempt (as designed) and logs it, so the log that the producer requires to be empty was never empty, and every native leg failed. The documented switches `KIMI_CODE_NO_AUTO_UPDATE` and its legacy alias `KIMI_CLI_NO_AUTO_UPDATE` turn the check off. The producer now sets both in the native child's environment. The empty-log assertion is unchanged: any other network attempt still fails, which `test/compat-receipt-kimi.test.ts` checks with a fault that logs one.
|
|
31
|
+
2. **The injected-Write refusal wording.** For a tool the private agent does not list, Kimi 2.5.x returned `Tool Write not found`; 2.6.2 returns `<system>ERROR: Tool execution failed.</system>` then `Tool "Write" is disabled by the active tool policy`. The load-bearing facts are unchanged on both (the two-tool inventory on all four requests, the marker file unchanged, and the exact `hub_task_show`, `hub_review` broker sequence), so the leg now accepts either wording by its exact failure marker plus its exact Write sentence. A vague failure text still fails the leg (tested).
|
|
32
|
+
|
|
33
|
+
After both changes, on this Mac, `prepare`, `inventory`, `broker-refusals`, `native-tool-loop`, `write-absent`, `write-positive-control`, `environment-decoy`, `network-guard-control` and `cleanup` all pass for 2.5.1 and 2.6.2 (2.6.2's asset SHA-256 `0e198ee3ac1d40964a8dc1da08cdf55f80e5a26d28dfa7a0967cd5a645ec32be` matched the release's digest and its `.sha256` file). The preload (`kimi-loopback-only.cjs`) stays byte-identical to its receipt-bound source, which an existing test pins.
|
|
34
|
+
|
|
35
|
+
`source-review` stays `not-run (source-review-required)`: a diff of the scoped trust, MCP and allowlist source needs a person (the 2.5.1 receipt's "Source review" section). So the daily run for kimi-review ends in a drift-issue row, never a PR. This is the policy as written, not a gap I can close here.
|
|
36
|
+
|
|
37
|
+
## qwen
|
|
38
|
+
|
|
39
|
+
The 0.27.2 run on 2026-11-12 reported `ownedStopConfirmed: false` and failed four legs with `cleanup` or `proof-failed`. Everything else I could read says it was a one-off:
|
|
40
|
+
|
|
41
|
+
- I downloaded six hosted qwen receipts (0.27.1, 0.27.2 twice, 0.27.3 twice, 0.27.4, from 2026-11-10 to 2026-11-15). Five show every runnable leg `pass` with the owned stop confirmed; the 0.27.2 receipt of 2026-11-12 is the one failure. Its package integrity equals the passing 0.27.2 receipt of 2026-11-11, so the artifact did not differ. (A hosted job's own conclusion is not a verdict here: the workflow step exits 0 for a failed receipt so the artifact is kept, so I read the receipts, not the job colors. I did not read the 0.26.9 and 0.27.0 receipts.)
|
|
42
|
+
- On this Mac, six runs of 0.27.4 through the harness (three idle, three under twelve busy loops) passed every runnable leg with the owned stop confirmed.
|
|
43
|
+
- The cleanup confirmation reads the process table with `ps` under a 2 s bound inside a 10 s allowance (`scripts/compat-receipts/runner.ts`). A slow `ps` on a loaded hosted runner can end that confirmation as `false`; that is a hypothesis I could not reproduce, so I did not change the bounds.
|
|
44
|
+
|
|
45
|
+
No qwen code changed. A second hosted failure with the same cause would justify widening those bounds on evidence. As with kimi-review, `reviewed-optional-lifecycle-replay` is a human-only required leg, so qwen cannot be admitted by CI regardless.
|
|
46
|
+
|
|
47
|
+
## Decision recorded for the person
|
|
48
|
+
|
|
49
|
+
`autoAdmit` stays `true` for kimi-review and qwen (and for claude-implementer and jcode, which have the same shape: `upstream-impact-review` and `source-comparison`). The T0 audit defines it as policy eligibility after every required leg passes, and the existing tests pin that. The consequence is that only pi can reach a CI-opened admission PR today. Whether a human-only source leg should keep `autoAdmit: true` (the person supplies that leg some other way), or those ids should be marked `false` so the drift issue says so up front, is a policy choice for the person; this receipt does not make it.
|
|
50
|
+
|
|
51
|
+
A new manifest test now fails any `autoAdmit: true` id that has no producer branch in `proof-worker.ts`, which is how pi sat unnoticed.
|
|
52
|
+
|
|
53
|
+
## Not verified
|
|
54
|
+
|
|
55
|
+
- A hosted run of any of this. The next scheduled `agent-compat` run, or a `workflow_dispatch` with `dry: true` on main after merge, is the evidence that the workflow opens (or plans) its first admission PR for pi.
|
|
56
|
+
- Linux. Every leg ran on macOS arm64, as the manifest requires.
|
|
57
|
+
- Account-backed inference, OAuth refresh, quota and interactive TUI coexistence for pi and kimi-review. They remain explicit unverified follow-ups, not legs.
|
package/docs/verified.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"documents": {
|
|
4
4
|
"README.md": {
|
|
5
|
-
"verifiedAgainst": "
|
|
5
|
+
"verifiedAgainst": "c2ff556563d8ef092b68e278ad7897249d973063",
|
|
6
6
|
"paths": [
|
|
7
7
|
"package.json",
|
|
8
8
|
"src/",
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
13
|
"docs/security.md": {
|
|
14
|
-
"verifiedAgainst": "
|
|
14
|
+
"verifiedAgainst": "c2ff556563d8ef092b68e278ad7897249d973063",
|
|
15
15
|
"paths": [
|
|
16
16
|
"src/",
|
|
17
17
|
"templates/"
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"docs/operations.md": {
|
|
21
|
-
"verifiedAgainst": "
|
|
21
|
+
"verifiedAgainst": "c2ff556563d8ef092b68e278ad7897249d973063",
|
|
22
22
|
"paths": [
|
|
23
23
|
"package.json",
|
|
24
24
|
"src/",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
]
|
|
36
36
|
},
|
|
37
37
|
"docs/quickstart.md": {
|
|
38
|
-
"verifiedAgainst": "
|
|
38
|
+
"verifiedAgainst": "c2ff556563d8ef092b68e278ad7897249d973063",
|
|
39
39
|
"paths": [
|
|
40
40
|
"package.json",
|
|
41
41
|
"src/",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
]
|
|
44
44
|
},
|
|
45
45
|
"docs/adding-an-ai-tool.md": {
|
|
46
|
-
"verifiedAgainst": "
|
|
46
|
+
"verifiedAgainst": "c2ff556563d8ef092b68e278ad7897249d973063",
|
|
47
47
|
"paths": [
|
|
48
48
|
"src/adapters/registry-types.ts",
|
|
49
49
|
"src/adapters/registry.ts",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
]
|
|
63
63
|
},
|
|
64
64
|
"docs/addons/claude-mem.md": {
|
|
65
|
-
"verifiedAgainst": "
|
|
65
|
+
"verifiedAgainst": "c2ff556563d8ef092b68e278ad7897249d973063",
|
|
66
66
|
"paths": [
|
|
67
67
|
"src/hub/tooling.ts",
|
|
68
68
|
"src/adapters/definitions/native-policy-aux.ts",
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
]
|
|
142
142
|
},
|
|
143
143
|
"docs/data-policy.md": {
|
|
144
|
-
"verifiedAgainst": "
|
|
144
|
+
"verifiedAgainst": "c2a1f646720b2d79990d80cf07faefc3de3f8c86",
|
|
145
145
|
"paths": [
|
|
146
146
|
"src/hub/path-policy.ts",
|
|
147
147
|
"src/local/tools.ts",
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
]
|
|
155
155
|
},
|
|
156
156
|
"docs/dogfood.md": {
|
|
157
|
-
"verifiedAgainst": "
|
|
157
|
+
"verifiedAgainst": "c2ff556563d8ef092b68e278ad7897249d973063",
|
|
158
158
|
"paths": [
|
|
159
159
|
"src/hub/dogfood.ts",
|
|
160
160
|
"src/hub/dogfood-read.ts",
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
]
|
|
165
165
|
},
|
|
166
166
|
"docs/events.md": {
|
|
167
|
-
"verifiedAgainst": "
|
|
167
|
+
"verifiedAgainst": "c2a1f646720b2d79990d80cf07faefc3de3f8c86",
|
|
168
168
|
"paths": [
|
|
169
169
|
"src/hub/events.ts",
|
|
170
170
|
"src/hub/attribution.ts",
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
]
|
|
178
178
|
},
|
|
179
179
|
"docs/memory.md": {
|
|
180
|
-
"verifiedAgainst": "
|
|
180
|
+
"verifiedAgainst": "c2ff556563d8ef092b68e278ad7897249d973063",
|
|
181
181
|
"paths": [
|
|
182
182
|
"package.json",
|
|
183
183
|
"src/memory/",
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
]
|
|
214
214
|
},
|
|
215
215
|
"docs/research.md": {
|
|
216
|
-
"verifiedAgainst": "
|
|
216
|
+
"verifiedAgainst": "c2a1f646720b2d79990d80cf07faefc3de3f8c86",
|
|
217
217
|
"paths": [
|
|
218
218
|
"src/hub/research.ts",
|
|
219
219
|
"src/hub/tooling.ts",
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
]
|
|
263
263
|
},
|
|
264
264
|
"docs/text-projection.md": {
|
|
265
|
-
"verifiedAgainst": "
|
|
265
|
+
"verifiedAgainst": "c2a1f646720b2d79990d80cf07faefc3de3f8c86",
|
|
266
266
|
"paths": [
|
|
267
267
|
"src/hub/text-projection.ts",
|
|
268
268
|
"src/hub/projection-exec.ts",
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
]
|
|
274
274
|
},
|
|
275
275
|
"docs/agent-notes/adapters.md": {
|
|
276
|
-
"verifiedAgainst": "
|
|
276
|
+
"verifiedAgainst": "c2ff556563d8ef092b68e278ad7897249d973063",
|
|
277
277
|
"paths": [
|
|
278
278
|
"src/adapters/",
|
|
279
279
|
"src/pi/",
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
]
|
|
324
324
|
},
|
|
325
325
|
"docs/agent-notes/budget.md": {
|
|
326
|
-
"verifiedAgainst": "
|
|
326
|
+
"verifiedAgainst": "c2a1f646720b2d79990d80cf07faefc3de3f8c86",
|
|
327
327
|
"paths": [
|
|
328
328
|
"src/hub/budget.ts",
|
|
329
329
|
"src/cli/statusline-tee.ts",
|
|
@@ -347,7 +347,7 @@
|
|
|
347
347
|
]
|
|
348
348
|
},
|
|
349
349
|
"docs/agent-notes/bus.md": {
|
|
350
|
-
"verifiedAgainst": "
|
|
350
|
+
"verifiedAgainst": "c2a1f646720b2d79990d80cf07faefc3de3f8c86",
|
|
351
351
|
"paths": [
|
|
352
352
|
"src/hub/bus.ts",
|
|
353
353
|
"src/hub/envelope.ts",
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
]
|
|
363
363
|
},
|
|
364
364
|
"docs/agent-notes/daemon.md": {
|
|
365
|
-
"verifiedAgainst": "
|
|
365
|
+
"verifiedAgainst": "c2ff556563d8ef092b68e278ad7897249d973063",
|
|
366
366
|
"paths": [
|
|
367
367
|
"src/hub/daemon.ts",
|
|
368
368
|
"src/hub/control-client.ts",
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
]
|
|
474
474
|
},
|
|
475
475
|
"docs/agent-notes/tasks.md": {
|
|
476
|
-
"verifiedAgainst": "
|
|
476
|
+
"verifiedAgainst": "c2ff556563d8ef092b68e278ad7897249d973063",
|
|
477
477
|
"paths": [
|
|
478
478
|
"src/hub/tasks.ts",
|
|
479
479
|
"src/hub/board.ts",
|
|
@@ -521,7 +521,7 @@
|
|
|
521
521
|
]
|
|
522
522
|
},
|
|
523
523
|
"docs/agent-notes/tests.md": {
|
|
524
|
-
"verifiedAgainst": "
|
|
524
|
+
"verifiedAgainst": "c2ff556563d8ef092b68e278ad7897249d973063",
|
|
525
525
|
"paths": [
|
|
526
526
|
"test/",
|
|
527
527
|
"scripts/check.sh",
|
|
@@ -559,7 +559,7 @@
|
|
|
559
559
|
]
|
|
560
560
|
},
|
|
561
561
|
"src/cli/help.ts": {
|
|
562
|
-
"verifiedAgainst": "
|
|
562
|
+
"verifiedAgainst": "c2ff556563d8ef092b68e278ad7897249d973063",
|
|
563
563
|
"paths": [
|
|
564
564
|
"src/cli/main.ts",
|
|
565
565
|
"src/cli/launch.ts",
|
|
@@ -578,7 +578,7 @@
|
|
|
578
578
|
]
|
|
579
579
|
},
|
|
580
580
|
"docs/agent-notes/security-review.md": {
|
|
581
|
-
"verifiedAgainst": "
|
|
581
|
+
"verifiedAgainst": "c2a1f646720b2d79990d80cf07faefc3de3f8c86",
|
|
582
582
|
"paths": [
|
|
583
583
|
"src/hub/envelope.ts",
|
|
584
584
|
"src/hub/conductor.ts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@staix/agent-hub",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "Native multi-agent hub: Claude Code, Codex, Kimi Code, Pi and local inference as peers in one project",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"bun": ">=1.4.4"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@staix/agent-mem": "0.
|
|
20
|
+
"@staix/agent-mem": "0.28.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-hub",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "Channel between Claude Code and the agent-hub daemon: peer messages from Codex, Kimi and the local worker arrive as channel events; hub_send replies.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Young Joon Lee",
|
|
@@ -13519,7 +13519,7 @@ var package_default;
|
|
|
13519
13519
|
var init_package = __esm(() => {
|
|
13520
13520
|
package_default = {
|
|
13521
13521
|
name: "@staix/agent-hub",
|
|
13522
|
-
version: "0.
|
|
13522
|
+
version: "0.42.0",
|
|
13523
13523
|
description: "Native multi-agent hub: Claude Code, Codex, Kimi Code, Pi and local inference as peers in one project",
|
|
13524
13524
|
license: "MIT",
|
|
13525
13525
|
type: "module",
|
|
@@ -13536,7 +13536,7 @@ var init_package = __esm(() => {
|
|
|
13536
13536
|
bun: ">=1.4.4"
|
|
13537
13537
|
},
|
|
13538
13538
|
dependencies: {
|
|
13539
|
-
"@staix/agent-mem": "0.
|
|
13539
|
+
"@staix/agent-mem": "0.28.0"
|
|
13540
13540
|
},
|
|
13541
13541
|
devDependencies: {
|
|
13542
13542
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
@@ -14448,6 +14448,11 @@ var init_note_add = __esm(() => {
|
|
|
14448
14448
|
init_cli_attribution();
|
|
14449
14449
|
});
|
|
14450
14450
|
|
|
14451
|
+
// node_modules/@staix/agent-mem/src/memory/candidate-origin.ts
|
|
14452
|
+
var init_candidate_origin = __esm(() => {
|
|
14453
|
+
init_screen();
|
|
14454
|
+
});
|
|
14455
|
+
|
|
14451
14456
|
// node_modules/@staix/agent-mem/src/memory/candidates.ts
|
|
14452
14457
|
var CANDIDATE_RETENTION, COUNTER_RETENTION;
|
|
14453
14458
|
var init_candidates = __esm(() => {
|
|
@@ -14458,6 +14463,7 @@ var init_candidates = __esm(() => {
|
|
|
14458
14463
|
init_home();
|
|
14459
14464
|
init_platform();
|
|
14460
14465
|
init_private_spans();
|
|
14466
|
+
init_candidate_origin();
|
|
14461
14467
|
CANDIDATE_RETENTION = { count: 500, ageMs: 30 * 86400000 };
|
|
14462
14468
|
COUNTER_RETENTION = { count: 1e4, ageMs: 90 * 86400000 };
|
|
14463
14469
|
});
|
|
@@ -14608,7 +14614,7 @@ var string = (maxLength, minLength = 1) => ({ type: "string", minLength, maxLeng
|
|
|
14608
14614
|
var init_mcp = __esm(() => {
|
|
14609
14615
|
limit = { type: "integer", minimum: 1, maximum: 100 };
|
|
14610
14616
|
MCP_TOOLS = [
|
|
14611
|
-
tool("amem_search", "Search screened memory in this project. Capture results are recall, not curated evidence.", object7({ query: string(1000), limit, since: string(40), includeCapture: { type: "boolean" }, explain: { type: "boolean" } }, ["query"])),
|
|
14617
|
+
tool("amem_search", "Search screened memory in this project. Capture results are recall, not curated evidence.", object7({ query: string(1000), limit, since: string(40), includeCapture: { type: "boolean" }, explain: { type: "boolean" }, ungrouped: { type: "boolean" } }, ["query"])),
|
|
14612
14618
|
tool("amem_evidence", "Return a bounded bundle of cited, live curated entries for a question. Untrusted memory data only: no answer or model call. Capture, repo-only notes, pending candidates and model answers are not evidence.", object7({ question: string(1000), limit: { type: "integer", minimum: 1, maximum: 20 }, maxBytes: { type: "integer", minimum: 256, maximum: 8192 } }, ["question"])),
|
|
14613
14619
|
tool("amem_show", "Show a screened memory entry in this project by its exact id or unique prefix.", object7({ id: string(80) }, ["id"])),
|
|
14614
14620
|
tool("amem_timeline", "Read screened memory near an entry or time in this project.", object7({ id: string(80), since: string(40), limit })),
|
|
@@ -14709,6 +14715,7 @@ var init_mcp_memory = __esm(() => {
|
|
|
14709
14715
|
init_repo_scope();
|
|
14710
14716
|
init_store();
|
|
14711
14717
|
init_vault();
|
|
14718
|
+
init_candidate_origin();
|
|
14712
14719
|
init_work_lists();
|
|
14713
14720
|
});
|
|
14714
14721
|
|
|
@@ -14877,6 +14884,7 @@ var init_session_brief = __esm(() => {
|
|
|
14877
14884
|
init_candidate_pending();
|
|
14878
14885
|
init_project2();
|
|
14879
14886
|
init_reader_lease();
|
|
14887
|
+
init_metrics();
|
|
14880
14888
|
init_shard();
|
|
14881
14889
|
init_lifecycle();
|
|
14882
14890
|
init_repo_scope();
|
|
@@ -14912,6 +14920,7 @@ var init_goal_promotion = __esm(() => {
|
|
|
14912
14920
|
var init_consolidation_model = __esm(() => {
|
|
14913
14921
|
init_candidates();
|
|
14914
14922
|
init_policy();
|
|
14923
|
+
init_candidate_origin();
|
|
14915
14924
|
init_platform();
|
|
14916
14925
|
});
|
|
14917
14926
|
|
|
@@ -14928,6 +14937,7 @@ var init_consolidate = __esm(() => {
|
|
|
14928
14937
|
init_consolidation_clusters();
|
|
14929
14938
|
init_policy();
|
|
14930
14939
|
init_platform();
|
|
14940
|
+
init_candidate_origin();
|
|
14931
14941
|
init_consolidation_model();
|
|
14932
14942
|
init_record_candidates();
|
|
14933
14943
|
});
|
|
@@ -15034,6 +15044,14 @@ var init_sync_placement_writer_history = __esm(() => {
|
|
|
15034
15044
|
init_sync_placement_writer_revision_format();
|
|
15035
15045
|
});
|
|
15036
15046
|
|
|
15047
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-batch-intent.ts
|
|
15048
|
+
var PLACEMENT_BATCH_INTENT_MAX_BYTES;
|
|
15049
|
+
var init_sync_placement_batch_intent = __esm(() => {
|
|
15050
|
+
init_generation();
|
|
15051
|
+
init_sync_placement_journal_format();
|
|
15052
|
+
PLACEMENT_BATCH_INTENT_MAX_BYTES = 20 * 1024 * 1024;
|
|
15053
|
+
});
|
|
15054
|
+
|
|
15037
15055
|
// node_modules/@staix/agent-mem/src/memory/sync-placement-journal-storage.ts
|
|
15038
15056
|
var inflight, publicationDurability;
|
|
15039
15057
|
var init_sync_placement_journal_storage = __esm(() => {
|
|
@@ -15047,6 +15065,8 @@ var init_sync_placement_journal_storage = __esm(() => {
|
|
|
15047
15065
|
init_sync_placement_projection();
|
|
15048
15066
|
init_sync_placement_writer_revision_format();
|
|
15049
15067
|
init_sync_placement_writer_history();
|
|
15068
|
+
init_sync_placement_batch_intent();
|
|
15069
|
+
init_formats();
|
|
15050
15070
|
inflight = new WeakSet;
|
|
15051
15071
|
publicationDurability = new WeakMap;
|
|
15052
15072
|
});
|
|
@@ -15536,6 +15556,7 @@ var init_sync_placement_writer_context = __esm(() => {
|
|
|
15536
15556
|
|
|
15537
15557
|
// node_modules/@staix/agent-mem/src/index.ts
|
|
15538
15558
|
var init_src = __esm(() => {
|
|
15559
|
+
init_cli_attribution();
|
|
15539
15560
|
init_search_fts();
|
|
15540
15561
|
init_platform();
|
|
15541
15562
|
init_candidates();
|
|
@@ -18201,6 +18222,15 @@ var init_runtime = __esm(() => {
|
|
|
18201
18222
|
init_plan_execute_choice();
|
|
18202
18223
|
});
|
|
18203
18224
|
|
|
18225
|
+
// src/hub/checkpoint-fields.ts
|
|
18226
|
+
var CHECKPOINT_FIELDS, CHECKPOINT_HEADINGS, CHECKPOINT_FIELD_MAX_LINES = 5, CHECKPOINT_FIELD_MAX_LINE_CHARS = 200, CHECKPOINT_FIELDS_SENTENCE;
|
|
18227
|
+
var init_checkpoint_fields = __esm(() => {
|
|
18228
|
+
init_tool_refusal();
|
|
18229
|
+
CHECKPOINT_FIELDS = ["done", "in_progress", "next", "verified_by", "traps"];
|
|
18230
|
+
CHECKPOINT_HEADINGS = { done: "Done", in_progress: "In progress", next: "Next", verified_by: "Verified by", traps: "Traps" };
|
|
18231
|
+
CHECKPOINT_FIELDS_SENTENCE = `Optional structured fields, each at most ${CHECKPOINT_FIELD_MAX_LINES} lines of ${CHECKPOINT_FIELD_MAX_LINE_CHARS} characters: ${CHECKPOINT_FIELDS.map((name) => `${name} (${CHECKPOINT_HEADINGS[name].toLowerCase()})`).join(", ")}. Use the same headings in .agenthub/checkpoint.md.`;
|
|
18232
|
+
});
|
|
18233
|
+
|
|
18204
18234
|
// src/hub/hub-tools.ts
|
|
18205
18235
|
function projectPeerIds(value) {
|
|
18206
18236
|
if (!Array.isArray(value) || value.length > 256 || value.some((id) => typeof id !== "string" || !/^[a-z][a-z0-9-]{0,31}$/.test(id) || ["user", "hub", "digest"].includes(id)) || new Set(value).size !== value.length)
|
|
@@ -18313,6 +18343,7 @@ var IMPLEMENTER_HUB_TOOL_NAMES, IMPLEMENTER_PERMISSION_TOOL, ACTIONABLE_MESSAGE_
|
|
|
18313
18343
|
}), STUDY_TOOLS, SURVEY_REPORT_TOOL, WAIT_TOOL, AUDIT_REPORT_TOOL, EVIDENCE_RECORD_TOOL, EVIDENCE_READ_TOOL, HANDOFF_TOOLS, LINEAGE_TOOL_NAMES, executionReference, lineageShow, GUIDANCE_TOOL_NAMES, guidanceEpoch, guidanceContentId, guidanceText, guidanceVariant, BOUNDED_TASK_TOOLS, CAPABILITY_TOOLS, TASK_TOOLS, PLANNER_REVIEW_TOOLS, SESSION_TITLE_TOOL, ASK_TOOL, ASK_ANSWER_TOOL, QUESTION_TOOLS, TASK_TOOL_NAMES, CONDUCTOR_TOOLS, CONDUCTOR_TOOL_NAMES, READ_ONLY_PROJECT_TOOLS, ROLE_TEXT, DEFAULT_ROLES;
|
|
18314
18344
|
var init_hub_tools = __esm(() => {
|
|
18315
18345
|
init_execution_reference();
|
|
18346
|
+
init_checkpoint_fields();
|
|
18316
18347
|
init_roadmap();
|
|
18317
18348
|
init_execution_links();
|
|
18318
18349
|
init_guidance_variants();
|
|
@@ -18632,7 +18663,7 @@ var init_hub_tools = __esm(() => {
|
|
|
18632
18663
|
tool2("hub_task_list", "The task board, newest updated first, 50 compact rows (id, state, owner, reviewer, title) per call. The reply is {tasks, total, next?}: pass next as cursor for the following page. Use ids for full rows of specific tasks, or detail: true for full rows of a page. PII tasks show as [pii].", { state: { type: "string", enum: ["proposed", "in_progress", "in_review", "approved", "changes_requested", "cancelled"] }, ready: { type: "boolean", description: "only proposed tasks with nothing left to wait for" }, limit: { type: "integer", minimum: 1, maximum: 200, description: "rows per page, default 50" }, cursor: { type: "string", description: "the next value from the previous reply, unchanged" }, ids: { type: "array", minItems: 1, maxItems: 200, items: { type: "integer", minimum: 1 }, description: "full rows for exactly these task numbers; no paging" }, detail: { type: "boolean", description: "full rows instead of compact rows" } }),
|
|
18633
18664
|
tool2("hub_specs", "Read the project's design-spec checks or find specs covering repository-relative paths. Read-only; at most 20 result items are returned. Does not reveal private task data.", { action: { type: "string", enum: ["check", "covers"] }, paths: { type: "array", maxItems: 32, items: { type: "string", minLength: 1, maxLength: 2000 } } }, ["action"]),
|
|
18634
18665
|
tool2("hub_review", "Give your verdict on a task you were asked to review: map the changed signatures and call sites to the task's plan or detail, read the check result (hub_task_show has it, with the done summary), and list what is unmet. The verdict notifies the task owner; no duplicate hub_send chat is needed. Consecutive changes_requested verdicts (three by default, `tasks.escalate_after`) move the task to another peer.", { id: id2, head: { type: "string", description: "full SHA actually reviewed; enforce binds approval to the current PR head" }, findings: reviewFindings, verdict: { type: "string", enum: ["approved", "changes_requested"] }, note: str2, unmet: { type: "array", items: str2, description: 'each requirement of the plan or detail that the change does not meet; when the review request lists acceptance criteria, start an item with its id ("AC1: what is missing") so the verdict names it' }, coverage: { type: "object", description: "the review brief's reviewable paths you read (reviewed) and any you did not (skipped, each with a reason); in enforce an approval must account for every one", properties: { reviewed: { type: "array", items: str2 }, skipped: { type: "array", items: { type: "object", properties: { path: str2, reason: str2 }, required: ["path", "reason"] } } } } }, ["id", "verdict"]),
|
|
18635
|
-
tool2("hub_checkpoint",
|
|
18666
|
+
tool2("hub_checkpoint", `Answer a checkpoint request from the hub (quota or context window pressure): what you were doing, what is half done, what whoever continues must know. Write the same to .agenthub/checkpoint.md first if you can. ${CHECKPOINT_FIELDS_SENTENCE} A field over its limit is refused, never cut; summary stays required.`, { summary: str2, ...Object.fromEntries(CHECKPOINT_FIELDS.map((name) => [name, { type: "string", description: `${CHECKPOINT_HEADINGS[name]}: at most ${CHECKPOINT_FIELD_MAX_LINES} lines of ${CHECKPOINT_FIELD_MAX_LINE_CHARS} characters` }])), request_id: { type: "string", description: "The request id supplied by a context checkpoint request; required for context checkpoints" } }, ["summary"]),
|
|
18636
18667
|
tool2("hub_source_read", "Read a registered source snapshot. Unicode character range, at most 32 KiB of sanitized UTF-8 text with next character offset. Private sources return only id, kind and private unless called by the on-prem worker inside a PII task. Excluded from capture.", { id: { type: "string", pattern: "^src:[0-9a-f]{16}$" }, range: { type: "object", properties: { offset: { type: "integer", minimum: 0 }, length: { type: "integer", minimum: 1 } }, required: ["offset", "length"], additionalProperties: false } }, ["id"]),
|
|
18637
18668
|
tool2("hub_memory_search", "Search daemon-scoped visible memory, fails first. Query <=200 UTF-8 bytes; default 8, max 20 lines; whole output <=4 KB. Incomplete excerpts are marked. No project argument.", { query: { type: "string", maxLength: 200, description: "At most 200 UTF-8 bytes, enforced by the daemon" }, limit: { type: "integer", minimum: 1, maximum: 20 } }, ["query"]),
|
|
18638
18669
|
tool2("hub_memory_show", "Read up to 8 visible memory ids or unique prefixes (6..64 UTF-8 bytes each). Original ids redirect; unavailable ids share one refusal. Whole output <=8 KB.", { ids: { type: "array", minItems: 1, maxItems: 8, items: { type: "string", minLength: 6, maxLength: 64, description: "6 to 64 UTF-8 bytes" } } }, ["ids"]),
|
|
@@ -13501,7 +13501,7 @@ var package_default;
|
|
|
13501
13501
|
var init_package = __esm(() => {
|
|
13502
13502
|
package_default = {
|
|
13503
13503
|
name: "@staix/agent-hub",
|
|
13504
|
-
version: "0.
|
|
13504
|
+
version: "0.42.0",
|
|
13505
13505
|
description: "Native multi-agent hub: Claude Code, Codex, Kimi Code, Pi and local inference as peers in one project",
|
|
13506
13506
|
license: "MIT",
|
|
13507
13507
|
type: "module",
|
|
@@ -13518,7 +13518,7 @@ var init_package = __esm(() => {
|
|
|
13518
13518
|
bun: ">=1.4.4"
|
|
13519
13519
|
},
|
|
13520
13520
|
dependencies: {
|
|
13521
|
-
"@staix/agent-mem": "0.
|
|
13521
|
+
"@staix/agent-mem": "0.28.0"
|
|
13522
13522
|
},
|
|
13523
13523
|
devDependencies: {
|
|
13524
13524
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
@@ -14430,6 +14430,11 @@ var init_note_add = __esm(() => {
|
|
|
14430
14430
|
init_cli_attribution();
|
|
14431
14431
|
});
|
|
14432
14432
|
|
|
14433
|
+
// node_modules/@staix/agent-mem/src/memory/candidate-origin.ts
|
|
14434
|
+
var init_candidate_origin = __esm(() => {
|
|
14435
|
+
init_screen();
|
|
14436
|
+
});
|
|
14437
|
+
|
|
14433
14438
|
// node_modules/@staix/agent-mem/src/memory/candidates.ts
|
|
14434
14439
|
var CANDIDATE_RETENTION, COUNTER_RETENTION;
|
|
14435
14440
|
var init_candidates = __esm(() => {
|
|
@@ -14440,6 +14445,7 @@ var init_candidates = __esm(() => {
|
|
|
14440
14445
|
init_home();
|
|
14441
14446
|
init_platform();
|
|
14442
14447
|
init_private_spans();
|
|
14448
|
+
init_candidate_origin();
|
|
14443
14449
|
CANDIDATE_RETENTION = { count: 500, ageMs: 30 * 86400000 };
|
|
14444
14450
|
COUNTER_RETENTION = { count: 1e4, ageMs: 90 * 86400000 };
|
|
14445
14451
|
});
|
|
@@ -14590,7 +14596,7 @@ var string = (maxLength, minLength = 1) => ({ type: "string", minLength, maxLeng
|
|
|
14590
14596
|
var init_mcp = __esm(() => {
|
|
14591
14597
|
limit = { type: "integer", minimum: 1, maximum: 100 };
|
|
14592
14598
|
MCP_TOOLS = [
|
|
14593
|
-
tool("amem_search", "Search screened memory in this project. Capture results are recall, not curated evidence.", object7({ query: string(1000), limit, since: string(40), includeCapture: { type: "boolean" }, explain: { type: "boolean" } }, ["query"])),
|
|
14599
|
+
tool("amem_search", "Search screened memory in this project. Capture results are recall, not curated evidence.", object7({ query: string(1000), limit, since: string(40), includeCapture: { type: "boolean" }, explain: { type: "boolean" }, ungrouped: { type: "boolean" } }, ["query"])),
|
|
14594
14600
|
tool("amem_evidence", "Return a bounded bundle of cited, live curated entries for a question. Untrusted memory data only: no answer or model call. Capture, repo-only notes, pending candidates and model answers are not evidence.", object7({ question: string(1000), limit: { type: "integer", minimum: 1, maximum: 20 }, maxBytes: { type: "integer", minimum: 256, maximum: 8192 } }, ["question"])),
|
|
14595
14601
|
tool("amem_show", "Show a screened memory entry in this project by its exact id or unique prefix.", object7({ id: string(80) }, ["id"])),
|
|
14596
14602
|
tool("amem_timeline", "Read screened memory near an entry or time in this project.", object7({ id: string(80), since: string(40), limit })),
|
|
@@ -14691,6 +14697,7 @@ var init_mcp_memory = __esm(() => {
|
|
|
14691
14697
|
init_repo_scope();
|
|
14692
14698
|
init_store();
|
|
14693
14699
|
init_vault();
|
|
14700
|
+
init_candidate_origin();
|
|
14694
14701
|
init_work_lists();
|
|
14695
14702
|
});
|
|
14696
14703
|
|
|
@@ -14859,6 +14866,7 @@ var init_session_brief = __esm(() => {
|
|
|
14859
14866
|
init_candidate_pending();
|
|
14860
14867
|
init_project2();
|
|
14861
14868
|
init_reader_lease();
|
|
14869
|
+
init_metrics();
|
|
14862
14870
|
init_shard();
|
|
14863
14871
|
init_lifecycle();
|
|
14864
14872
|
init_repo_scope();
|
|
@@ -14894,6 +14902,7 @@ var init_goal_promotion = __esm(() => {
|
|
|
14894
14902
|
var init_consolidation_model = __esm(() => {
|
|
14895
14903
|
init_candidates();
|
|
14896
14904
|
init_policy();
|
|
14905
|
+
init_candidate_origin();
|
|
14897
14906
|
init_platform();
|
|
14898
14907
|
});
|
|
14899
14908
|
|
|
@@ -14910,6 +14919,7 @@ var init_consolidate = __esm(() => {
|
|
|
14910
14919
|
init_consolidation_clusters();
|
|
14911
14920
|
init_policy();
|
|
14912
14921
|
init_platform();
|
|
14922
|
+
init_candidate_origin();
|
|
14913
14923
|
init_consolidation_model();
|
|
14914
14924
|
init_record_candidates();
|
|
14915
14925
|
});
|
|
@@ -15016,6 +15026,14 @@ var init_sync_placement_writer_history = __esm(() => {
|
|
|
15016
15026
|
init_sync_placement_writer_revision_format();
|
|
15017
15027
|
});
|
|
15018
15028
|
|
|
15029
|
+
// node_modules/@staix/agent-mem/src/memory/sync-placement-batch-intent.ts
|
|
15030
|
+
var PLACEMENT_BATCH_INTENT_MAX_BYTES;
|
|
15031
|
+
var init_sync_placement_batch_intent = __esm(() => {
|
|
15032
|
+
init_generation();
|
|
15033
|
+
init_sync_placement_journal_format();
|
|
15034
|
+
PLACEMENT_BATCH_INTENT_MAX_BYTES = 20 * 1024 * 1024;
|
|
15035
|
+
});
|
|
15036
|
+
|
|
15019
15037
|
// node_modules/@staix/agent-mem/src/memory/sync-placement-journal-storage.ts
|
|
15020
15038
|
var inflight, publicationDurability;
|
|
15021
15039
|
var init_sync_placement_journal_storage = __esm(() => {
|
|
@@ -15029,6 +15047,8 @@ var init_sync_placement_journal_storage = __esm(() => {
|
|
|
15029
15047
|
init_sync_placement_projection();
|
|
15030
15048
|
init_sync_placement_writer_revision_format();
|
|
15031
15049
|
init_sync_placement_writer_history();
|
|
15050
|
+
init_sync_placement_batch_intent();
|
|
15051
|
+
init_formats();
|
|
15032
15052
|
inflight = new WeakSet;
|
|
15033
15053
|
publicationDurability = new WeakMap;
|
|
15034
15054
|
});
|
|
@@ -15518,6 +15538,7 @@ var init_sync_placement_writer_context = __esm(() => {
|
|
|
15518
15538
|
|
|
15519
15539
|
// node_modules/@staix/agent-mem/src/index.ts
|
|
15520
15540
|
var init_src = __esm(() => {
|
|
15541
|
+
init_cli_attribution();
|
|
15521
15542
|
init_search_fts();
|
|
15522
15543
|
init_platform();
|
|
15523
15544
|
init_candidates();
|
|
@@ -18183,6 +18204,15 @@ var init_runtime = __esm(() => {
|
|
|
18183
18204
|
init_plan_execute_choice();
|
|
18184
18205
|
});
|
|
18185
18206
|
|
|
18207
|
+
// src/hub/checkpoint-fields.ts
|
|
18208
|
+
var CHECKPOINT_FIELDS, CHECKPOINT_HEADINGS, CHECKPOINT_FIELD_MAX_LINES = 5, CHECKPOINT_FIELD_MAX_LINE_CHARS = 200, CHECKPOINT_FIELDS_SENTENCE;
|
|
18209
|
+
var init_checkpoint_fields = __esm(() => {
|
|
18210
|
+
init_tool_refusal();
|
|
18211
|
+
CHECKPOINT_FIELDS = ["done", "in_progress", "next", "verified_by", "traps"];
|
|
18212
|
+
CHECKPOINT_HEADINGS = { done: "Done", in_progress: "In progress", next: "Next", verified_by: "Verified by", traps: "Traps" };
|
|
18213
|
+
CHECKPOINT_FIELDS_SENTENCE = `Optional structured fields, each at most ${CHECKPOINT_FIELD_MAX_LINES} lines of ${CHECKPOINT_FIELD_MAX_LINE_CHARS} characters: ${CHECKPOINT_FIELDS.map((name) => `${name} (${CHECKPOINT_HEADINGS[name].toLowerCase()})`).join(", ")}. Use the same headings in .agenthub/checkpoint.md.`;
|
|
18214
|
+
});
|
|
18215
|
+
|
|
18186
18216
|
// src/hub/hub-tools.ts
|
|
18187
18217
|
function projectPeerIds(value) {
|
|
18188
18218
|
if (!Array.isArray(value) || value.length > 256 || value.some((id) => typeof id !== "string" || !/^[a-z][a-z0-9-]{0,31}$/.test(id) || ["user", "hub", "digest"].includes(id)) || new Set(value).size !== value.length)
|
|
@@ -18295,6 +18325,7 @@ var IMPLEMENTER_HUB_TOOL_NAMES, IMPLEMENTER_PERMISSION_TOOL, ACTIONABLE_MESSAGE_
|
|
|
18295
18325
|
}), STUDY_TOOLS, SURVEY_REPORT_TOOL, WAIT_TOOL, AUDIT_REPORT_TOOL, EVIDENCE_RECORD_TOOL, EVIDENCE_READ_TOOL, HANDOFF_TOOLS, LINEAGE_TOOL_NAMES, executionReference, lineageShow, GUIDANCE_TOOL_NAMES, guidanceEpoch, guidanceContentId, guidanceText, guidanceVariant, BOUNDED_TASK_TOOLS, CAPABILITY_TOOLS, TASK_TOOLS, PLANNER_REVIEW_TOOLS, SESSION_TITLE_TOOL, ASK_TOOL, ASK_ANSWER_TOOL, QUESTION_TOOLS, TASK_TOOL_NAMES, CONDUCTOR_TOOLS, CONDUCTOR_TOOL_NAMES, READ_ONLY_PROJECT_TOOLS, ROLE_TEXT, DEFAULT_ROLES;
|
|
18296
18326
|
var init_hub_tools = __esm(() => {
|
|
18297
18327
|
init_execution_reference();
|
|
18328
|
+
init_checkpoint_fields();
|
|
18298
18329
|
init_roadmap();
|
|
18299
18330
|
init_execution_links();
|
|
18300
18331
|
init_guidance_variants();
|
|
@@ -18614,7 +18645,7 @@ var init_hub_tools = __esm(() => {
|
|
|
18614
18645
|
tool2("hub_task_list", "The task board, newest updated first, 50 compact rows (id, state, owner, reviewer, title) per call. The reply is {tasks, total, next?}: pass next as cursor for the following page. Use ids for full rows of specific tasks, or detail: true for full rows of a page. PII tasks show as [pii].", { state: { type: "string", enum: ["proposed", "in_progress", "in_review", "approved", "changes_requested", "cancelled"] }, ready: { type: "boolean", description: "only proposed tasks with nothing left to wait for" }, limit: { type: "integer", minimum: 1, maximum: 200, description: "rows per page, default 50" }, cursor: { type: "string", description: "the next value from the previous reply, unchanged" }, ids: { type: "array", minItems: 1, maxItems: 200, items: { type: "integer", minimum: 1 }, description: "full rows for exactly these task numbers; no paging" }, detail: { type: "boolean", description: "full rows instead of compact rows" } }),
|
|
18615
18646
|
tool2("hub_specs", "Read the project's design-spec checks or find specs covering repository-relative paths. Read-only; at most 20 result items are returned. Does not reveal private task data.", { action: { type: "string", enum: ["check", "covers"] }, paths: { type: "array", maxItems: 32, items: { type: "string", minLength: 1, maxLength: 2000 } } }, ["action"]),
|
|
18616
18647
|
tool2("hub_review", "Give your verdict on a task you were asked to review: map the changed signatures and call sites to the task's plan or detail, read the check result (hub_task_show has it, with the done summary), and list what is unmet. The verdict notifies the task owner; no duplicate hub_send chat is needed. Consecutive changes_requested verdicts (three by default, `tasks.escalate_after`) move the task to another peer.", { id: id2, head: { type: "string", description: "full SHA actually reviewed; enforce binds approval to the current PR head" }, findings: reviewFindings, verdict: { type: "string", enum: ["approved", "changes_requested"] }, note: str2, unmet: { type: "array", items: str2, description: 'each requirement of the plan or detail that the change does not meet; when the review request lists acceptance criteria, start an item with its id ("AC1: what is missing") so the verdict names it' }, coverage: { type: "object", description: "the review brief's reviewable paths you read (reviewed) and any you did not (skipped, each with a reason); in enforce an approval must account for every one", properties: { reviewed: { type: "array", items: str2 }, skipped: { type: "array", items: { type: "object", properties: { path: str2, reason: str2 }, required: ["path", "reason"] } } } } }, ["id", "verdict"]),
|
|
18617
|
-
tool2("hub_checkpoint",
|
|
18648
|
+
tool2("hub_checkpoint", `Answer a checkpoint request from the hub (quota or context window pressure): what you were doing, what is half done, what whoever continues must know. Write the same to .agenthub/checkpoint.md first if you can. ${CHECKPOINT_FIELDS_SENTENCE} A field over its limit is refused, never cut; summary stays required.`, { summary: str2, ...Object.fromEntries(CHECKPOINT_FIELDS.map((name) => [name, { type: "string", description: `${CHECKPOINT_HEADINGS[name]}: at most ${CHECKPOINT_FIELD_MAX_LINES} lines of ${CHECKPOINT_FIELD_MAX_LINE_CHARS} characters` }])), request_id: { type: "string", description: "The request id supplied by a context checkpoint request; required for context checkpoints" } }, ["summary"]),
|
|
18618
18649
|
tool2("hub_source_read", "Read a registered source snapshot. Unicode character range, at most 32 KiB of sanitized UTF-8 text with next character offset. Private sources return only id, kind and private unless called by the on-prem worker inside a PII task. Excluded from capture.", { id: { type: "string", pattern: "^src:[0-9a-f]{16}$" }, range: { type: "object", properties: { offset: { type: "integer", minimum: 0 }, length: { type: "integer", minimum: 1 } }, required: ["offset", "length"], additionalProperties: false } }, ["id"]),
|
|
18619
18650
|
tool2("hub_memory_search", "Search daemon-scoped visible memory, fails first. Query <=200 UTF-8 bytes; default 8, max 20 lines; whole output <=4 KB. Incomplete excerpts are marked. No project argument.", { query: { type: "string", maxLength: 200, description: "At most 200 UTF-8 bytes, enforced by the daemon" }, limit: { type: "integer", minimum: 1, maximum: 20 } }, ["query"]),
|
|
18620
18651
|
tool2("hub_memory_show", "Read up to 8 visible memory ids or unique prefixes (6..64 UTF-8 bytes each). Original ids redirect; unavailable ids share one refusal. Whole output <=8 KB.", { ids: { type: "array", minItems: 1, maxItems: 8, items: { type: "string", minLength: 6, maxLength: 64, description: "6 to 64 UTF-8 bytes" } } }, ["ids"]),
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { configuredPolicy, memoryHome, withCliAttribution } from "@staix/agent-mem";
|
|
2
|
+
|
|
3
|
+
/** Run an agent's memory commands in the public amem attribution and visibility scope. */
|
|
4
|
+
export async function withAgentAttribution<T>(peer: string, cwd: string, work: () => Promise<T>): Promise<T> {
|
|
5
|
+
return withCliAttribution({ actor: "agent", peer, policy: () => configuredPolicy(memoryHome(), cwd) }, work);
|
|
6
|
+
}
|
package/src/cli/help.ts
CHANGED
|
@@ -197,12 +197,12 @@ const SECTIONS: [string, [usage: string, description: string][]][] = [
|
|
|
197
197
|
["ahub bench export [--format jsonl|csv]", "benchmark records for outside analysis: ids, outcomes and counts, never suite text"],
|
|
198
198
|
["ahub check-path <file> [--peer <id>]", "other owners' open tasks that claim or changed a file"],
|
|
199
199
|
["ahub memory [list] [--tier short|long] [--kind <kind>] [--peer <p>] [--machine <id>] [--since <iso>] [--limit N] [--json]", "the hub's own memory for this project: decisions, contracts, fails and findings, short- and long-term (docs/memory.md)"],
|
|
200
|
-
["ahub memory search <words> | show <id> | graph <id|node> [--hops 1|2] [--history | --as-of <iso>] [--json]", "find entries, read one with its provenance, or list its graph neighbourhood; superseded and expired entries are hidden unless a person asks for --history or --as-of"],
|
|
201
|
-
["ahub memory promote|demote|forget <id> | supersede <old> <new> | rebuild", "
|
|
202
|
-
["ahub memory sync [--remote <private git url>] | machine [--label <name>]", "sync hub memory with your other machines through a private git remote
|
|
203
|
-
["ahub memory import claude-mem [--db <path>] [--limit N] [--restart] | dedupe [--apply] | suggestions | confirm|reject <id>", "copy the hub's notes from claude-mem into hub memory
|
|
204
|
-
["ahub memory decay [--days N] [--json]", "
|
|
205
|
-
["ahub memory declined [--json]", "
|
|
200
|
+
["ahub memory search <words> [--ungrouped] | show <id> | graph <id|node> [--hops 1|2] [--history | --as-of <iso>] [--json]", "find entries, read one with its provenance, or list its graph neighbourhood; search groups visible hits by task unless --ungrouped; superseded and expired entries are hidden unless a person asks for --history or --as-of"],
|
|
201
|
+
["ahub memory promote|demote|forget <id> | supersede <old> <new> | rebuild", "change memory: move an entry between tiers, forget it, mark it superseded, or rebuild the index from the logs; an agent shell's change is recorded as that agent"],
|
|
202
|
+
["ahub memory sync [--remote <private git url>] | machine [--label <name>]", "sync hub memory with your other machines through a private git remote, or show or name this machine"],
|
|
203
|
+
["ahub memory import claude-mem [--db <path>] [--limit N] [--restart] | dedupe [--apply] | suggestions | confirm|reject <id>", "copy the hub's notes from claude-mem into hub memory; review the model's suggested edges (confirm and reject are a person's)"],
|
|
204
|
+
["ahub memory decay [--days N] [--json]", "list long-term entries older than N days (default 90) that no open goal links; review only, nothing is changed"],
|
|
205
|
+
["ahub memory declined [--json]", "list declined physical outbound row ids and safe rule labels; never shows row text; reports incomplete scans explicitly"],
|
|
206
206
|
["ahub memory profile-check [--json]", "read-only check of the running hubs' memory bindings against their memory profiles; exits 1 when one is not ready"],
|
|
207
207
|
["ahub goal [list] [--all] | show <id> [--json]", "long-term tasks: state, which machine holds each and until when, linked board tasks"],
|
|
208
208
|
["ahub goal new <title> [--milestone <text>]... [--depends <id>]... [--shared] | link <id> <task> | state <id> <state> | done <id> | take <id> [--force]", "a person's changes to long-term tasks (link also the configured conductor's); take --force voids other machines' claims"],
|
|
@@ -413,7 +413,7 @@ export const FLAG_DESCRIPTIONS: Readonly<Record<string, string>> = {
|
|
|
413
413
|
"--nodes": "at most this many nodes", "--edges": "at most this many edges", "--bytes": "at most this many bytes", "--ref": "execution reference as JSON", "--from": "reference the link comes from, as JSON",
|
|
414
414
|
"--context": "also drop a Codex turn from its conversation", "--dogfood": "print the dogfood scorecard", "--dataset": "directory for the per-project datasets", "--arm": "label of the arm being run", "--repeat": "attempts per task",
|
|
415
415
|
"--tasks": "run only these tasks (a,b)", "--addon": "declare an add-on: name=on or name=off", "--suite": "suite to compare", "--mixed": "compare across suites", "--tier": "short or long term", "--kind": "decision, contract, fail or finding",
|
|
416
|
-
"--machine": "only entries from this machine", "--hops": "graph depth: 1 or 2", "--history": "include superseded and expired entries", "--as-of": "memory as it stood at this time", "--remote": "private git remote to sync with",
|
|
416
|
+
"--machine": "only entries from this machine", "--hops": "graph depth: 1 or 2", "--history": "include superseded and expired entries", "--ungrouped": "show individual same-task search hits", "--as-of": "memory as it stood at this time", "--remote": "private git remote to sync with",
|
|
417
417
|
"--db": "claude-mem database to read", "--restart": "revisit rows skipped under an earlier policy", "--days": "older than this many days (default 90)", "--depends": "goal it depends on (repeatable)", "--shared": "share the goal across machines",
|
|
418
418
|
"--force": "void other machines' claims", "--no-open": "print the link, do not open it", "--settings": "open with a settings session", "--stop": "stop the dashboard manager", "--hook": "run as a Claude Code hook; never blocks",
|
|
419
419
|
// a flag one command uses for something other than its own entry
|
package/src/cli/identity.ts
CHANGED
|
@@ -78,6 +78,11 @@ export function detectCliIdentity(env: Readonly<Record<string, string | undefine
|
|
|
78
78
|
|
|
79
79
|
export type PeerCommandAccess = "allowed" | "conductor" | "console";
|
|
80
80
|
|
|
81
|
+
/** #1522: the `ahub memory` subcommands an agent shell runs (reads, and the changes amem records under the agent's own name). Anything else in the family stays the person's. */
|
|
82
|
+
export const AGENT_MEMORY_SUBS: readonly string[] = ["list", "search", "show", "suggestions", "machine", "sync", "import", "dedupe", "promote", "demote", "forget", "supersede", "rebuild", "decay", "declined"];
|
|
83
|
+
/** The ones that change memory and record an actor: `memoryCommand` runs these under the agent's attribution. Reads and the two review previews run unchanged. */
|
|
84
|
+
export const AGENT_MEMORY_RECORDING_SUBS: readonly string[] = ["sync", "import", "dedupe", "promote", "demote", "forget", "supersede", "rebuild"];
|
|
85
|
+
|
|
81
86
|
/** Flags the read-only forms of #812 accept: display options that change no behaviour. */
|
|
82
87
|
const peerReadFlags = (args: readonly string[]): boolean =>
|
|
83
88
|
args.every((arg) => ["--json", "--full", "--verbose", "--color=always", "--color=never", "--color=auto"].includes(arg) || arg.startsWith("--color="));
|
|
@@ -192,8 +197,9 @@ export function classifyPeerCommand(command: string, args: readonly string[], ca
|
|
|
192
197
|
if (command === "agents") return args.every(arg => arg === "--json") ? "allowed" : "console";
|
|
193
198
|
// #247: reading the research measures and records is harmless (ids and counts only); #933 made backfill a conductor operation (above).
|
|
194
199
|
if (command === "research") return args[0] === "backfill" ? "console" : "allowed";
|
|
195
|
-
// #
|
|
196
|
-
|
|
200
|
+
// #1522 (hub task 969): an agent shell runs the memory family as itself. The CLI wraps the writers in amem's agent attribution (`memoryCommand`), so the recorded and displayed actor is the agent, never the person.
|
|
201
|
+
// Left to the person: `graph` (its labels are unscreened note text), `confirm`/`reject` (judgments of suggested links), `profile-check` and every command outside `memory`; hub verdicts are not memory commands.
|
|
202
|
+
if (command === "memory") { const sub = args.find((arg) => arg !== "--json"); return sub === undefined || sub.startsWith("--") || AGENT_MEMORY_SUBS.includes(sub) ? "allowed" : "console"; }
|
|
197
203
|
if (command === "goal") { const sub = args.find((arg) => arg !== "--json"); return sub === undefined || sub.startsWith("--") || ["list", "show"].includes(sub) ? "allowed" : "console"; }
|
|
198
204
|
// #251: a run resets the bench project's tree and proposes work (#933: a conductor operation, above); reading results is harmless.
|
|
199
205
|
// The subcommand is the first argument that is not --json, which the command accepts anywhere.
|