@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
|
@@ -4,11 +4,11 @@ import { isMainThread, parentPort, workerData, Worker } from "worker_threads";
|
|
|
4
4
|
|
|
5
5
|
// src/adapters/kimi-review-policy.ts
|
|
6
6
|
import { createHash } from "crypto";
|
|
7
|
-
import { lstatSync, readFileSync } from "fs";
|
|
7
|
+
import { lstatSync as lstatSync2, readFileSync } from "fs";
|
|
8
8
|
import { dirname as dirname2, join as join2, resolve as resolve2 } from "path";
|
|
9
9
|
|
|
10
10
|
// node_modules/@staix/agent-mem/src/memory/platform.ts
|
|
11
|
-
import { realpathSync } from "fs";
|
|
11
|
+
import { lstatSync, realpathSync } from "fs";
|
|
12
12
|
import { basename, dirname, join, resolve, sep } from "path";
|
|
13
13
|
import { createRequire } from "module";
|
|
14
14
|
var require2 = createRequire(import.meta.url);
|
|
@@ -39,7 +39,7 @@ var CREDENTIAL_KEYS = new Set(["credential.helper=", "core.askpass="]);
|
|
|
39
39
|
// src/adapters/kimi-review-policy.ts
|
|
40
40
|
var kimiReviewFingerprint = (text) => createHash("sha256").update(text).digest("hex");
|
|
41
41
|
function readKimiReviewFile(file, limit = 262144) {
|
|
42
|
-
const stat =
|
|
42
|
+
const stat = lstatSync2(file);
|
|
43
43
|
if (!stat.isFile() || stat.size > limit)
|
|
44
44
|
throw new Error("unsupported reviewer file");
|
|
45
45
|
return readFileSync(file, "utf8");
|
|
@@ -52,7 +52,7 @@ function assertCleanCwdAncestors(...candidates) {
|
|
|
52
52
|
if (!seen.has(ancestor)) {
|
|
53
53
|
seen.add(ancestor);
|
|
54
54
|
for (const marker of [".git", ".kimi-code", "AGENTS.md"]) {
|
|
55
|
-
if (
|
|
55
|
+
if (lstatSync2(join2(ancestor, marker), { throwIfNoEntry: false }) !== undefined) {
|
|
56
56
|
throw new Error("private cwd ancestor contains ambient configuration");
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -88,7 +88,7 @@ function projectKimiReviewPolicyBinding(binding) {
|
|
|
88
88
|
function checkKimiReviewPolicy(binding) {
|
|
89
89
|
try {
|
|
90
90
|
assertCleanCwdAncestors(binding.lexicalCwd, binding.physicalCwd);
|
|
91
|
-
const now =
|
|
91
|
+
const now = lstatSync2(binding.executable), expected = binding.executableStat;
|
|
92
92
|
return realPath(binding.sourcePath) === binding.source && now.dev === expected.dev && now.ino === expected.ino && now.size === expected.size && now.mtimeMs === expected.mtimeMs && now.ctimeMs === expected.ctimeMs && kimiReviewFingerprint(readKimiReviewFile(binding.sourceConfig)) === binding.sourceConfigHash && binding.privateFiles.length === 3 && binding.privateFiles.every((file) => kimiReviewFingerprint(readKimiReviewFile(file.path, 2097152)) === file.hash) && binding.authTargets.length === 3 && ["credentials", "oauth", "device_id"].every((name, index) => realPath(join2(binding.source, name)) === binding.authTargets[index] && realPath(join2(binding.tool, name)) === binding.authTargets[index]);
|
|
93
93
|
} catch {
|
|
94
94
|
return false;
|