@staix/agent-hub 0.44.0 → 0.46.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 +66 -0
- package/README.md +12 -11
- package/docs/adding-an-ai-tool.md +1 -0
- package/docs/agent-notes/adapters.md +35 -6
- package/docs/agent-notes/budget.md +2 -1
- package/docs/agent-notes/daemon.md +5 -1
- package/docs/agent-notes/local-worker.md +1 -1
- package/docs/agent-notes/security-review.md +3 -2
- package/docs/agent-notes/tasks.md +6 -2
- package/docs/agent-notes/tests.md +4 -3
- package/docs/design/adapters.md +20 -2
- package/docs/design/agent-hub-architecture.md +12 -0
- package/docs/design/agent-hub.md +1 -1
- package/docs/design/cli-output.md +2 -0
- package/docs/design/roadmap.md +158 -4
- package/docs/design/supervision.md +21 -1
- package/docs/design/task-board.md +32 -4
- package/docs/dogfood.md +28 -4
- package/docs/events.md +7 -3
- package/docs/influences.md +7 -0
- package/docs/memory.md +4 -4
- package/docs/operations.md +151 -36
- package/docs/quickstart.md +16 -4
- package/docs/research.md +16 -0
- package/docs/roadmap.json +4 -0
- package/docs/roadmap.md +9 -0
- package/docs/sdlc.md +15 -3
- package/docs/security.md +9 -7
- package/docs/smoke.md +1 -1
- package/docs/verification/2026-11-05-hardcoded-values-classification-rules.md +28 -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-agy-1.5.14.md +27 -0
- package/docs/verification/2026-11-22-claude-instruction-hook.md +35 -0
- package/docs/verification/2026-11-22-codex-0171-reviewer-isolation.md +47 -0
- package/docs/verification/2026-11-22-instructed-ipc.md +9 -0
- package/docs/verification/2026-11-22-jcode-1.0.3.md +71 -0
- package/docs/verification/2026-11-22-jcode-separate-home.md +14 -0
- package/docs/verification/2026-11-22-qwen-0283-acp.md +28 -0
- package/docs/verification/2026-11-22-qwen-0283-dual-output.md +33 -0
- package/docs/verification/2026-11-22-roadmap-r5-view-receipt.md +63 -0
- package/docs/verification/2026-11-23-0.46.0.md +44 -0
- package/docs/verification/assets/1483-r5-detail-1440-light.png +0 -0
- package/docs/verification/assets/1483-r5-detail-390-light.png +0 -0
- package/docs/verification/assets/1483-r5-view-1440-dark.png +0 -0
- package/docs/verification/assets/1483-r5-view-1440-light.png +0 -0
- package/docs/verification/assets/1483-r5-view-390-dark.png +0 -0
- package/docs/verification/assets/1483-r5-view-390-light.png +0 -0
- package/docs/verification/assets/1483-r5-view-820-dark.png +0 -0
- package/docs/verification/assets/1483-r5-view-820-light.png +0 -0
- package/docs/verified.json +33 -27
- package/package.json +3 -2
- package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-hub/kimi-hook.js +4743 -4048
- package/plugins/agent-hub/kimi-review-policy-worker.js +5 -5
- package/plugins/agent-hub/server.js +1641 -1265
- package/plugins/agent-hub/skills/ahub/SKILL.md +17 -0
- package/plugins/agent-hub/skills/ahub-manage/SKILL.md +37 -0
- package/plugins/agent-hub/skills/ahub-status/SKILL.md +14 -0
- package/plugins/agent-hub/skills/ahub-use/SKILL.md +12 -0
- package/scripts/check-docs.mjs +9 -1
- package/src/adapters/acp.ts +11 -1
- package/src/adapters/claude-channel.ts +2 -1
- package/src/adapters/compat.ts +15 -14
- package/src/adapters/definitions/builtin-metadata.ts +2 -2
- package/src/adapters/definitions/native-cli-claude-setup.ts +9 -1
- package/src/adapters/definitions/native-cli-doctor.ts +8 -5
- package/src/adapters/definitions/native-cli-jcode-home-init.ts +158 -0
- package/src/adapters/definitions/native-cli-jcode-home.ts +72 -0
- package/src/adapters/definitions/native-cli-jcode-mcp.ts +20 -0
- package/src/adapters/definitions/native-cli-skills.ts +29 -0
- 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/claude-profile-hook.ts +40 -3
- package/src/cli/console-state.ts +58 -27
- package/src/cli/console-usage.ts +5 -3
- package/src/cli/console.ts +35 -4
- package/src/cli/help.ts +17 -10
- package/src/cli/identity.ts +4 -2
- package/src/cli/instruction-hook.ts +28 -0
- package/src/cli/jcode-mcp.ts +2 -1
- package/src/cli/main.js +8 -0
- package/src/cli/main.ts +149 -23
- package/src/cli/output-standard.ts +3 -55
- package/src/cli/output.ts +8 -2
- package/src/cli/recovery-package.ts +62 -13
- package/src/cli/roadmap-write.ts +59 -0
- package/src/cli/roadmap.ts +115 -4
- package/src/cli/sdlc-output.ts +4 -0
- package/src/cli/setup-homes.ts +1 -0
- package/src/cli/setup.ts +1 -1
- package/src/cli/skills-install.ts +463 -0
- package/src/cli/task-output.ts +1 -1
- package/src/cli/upgrade-presentation-flags.ts +1 -1
- package/src/cli/upgrade-runtime.ts +10 -6
- package/src/hub/agent-mem-range.ts +43 -0
- package/src/hub/board.ts +144 -5
- package/src/hub/budget-projection.ts +99 -0
- package/src/hub/check-runner.ts +25 -1
- package/src/hub/claude-launch-proof.ts +5 -1
- package/src/hub/conductor.ts +8 -3
- package/src/hub/config-apply.ts +6 -3
- package/src/hub/config-tier.ts +1 -1
- package/src/hub/config-trust.ts +1 -1
- package/src/hub/context-window.ts +1 -1
- package/src/hub/control-client.ts +9 -2
- package/src/hub/cost-governance.ts +11 -7
- package/src/hub/daemon.ts +707 -53
- package/src/hub/dogfood-read.ts +4 -2
- package/src/hub/edit-guard.ts +100 -0
- package/src/hub/events.ts +80 -9
- package/src/hub/execution-budget.ts +29 -8
- package/src/hub/facts.ts +57 -4
- package/src/hub/hub-tools.ts +3 -1
- package/src/hub/inference.ts +1 -1
- package/src/hub/instances.ts +10 -1
- package/src/hub/instructed-exact.ts +95 -0
- package/src/hub/instructed-intent.ts +64 -0
- package/src/hub/instructed-ipc.ts +33 -0
- package/src/hub/instructed-runtime.ts +19 -0
- package/src/hub/instruction-receipt.ts +218 -0
- package/src/hub/lifecycle.ts +6 -1
- package/src/hub/log-rotation.ts +130 -0
- package/src/hub/manager.ts +46 -3
- 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/recovery-store.ts +49 -21
- package/src/hub/registry.ts +1 -1
- package/src/hub/research-experiments.ts +132 -0
- package/src/hub/research-quality.ts +8 -2
- package/src/hub/research-record.ts +35 -0
- package/src/hub/research.ts +128 -28
- package/src/hub/roadmap-check.ts +65 -0
- package/src/hub/roadmap-decompose.ts +139 -0
- package/src/hub/roadmap-export.ts +27 -0
- package/src/hub/roadmap-sync.ts +97 -0
- package/src/hub/roadmap.ts +59 -1
- package/src/hub/routing.ts +18 -1
- package/src/hub/runtime-capture-prune.ts +2 -1
- package/src/hub/sdlc-branch-ci.ts +128 -0
- package/src/hub/sdlc-merge.ts +6 -3
- package/src/hub/sdlc-metrics.ts +19 -5
- package/src/hub/sdlc.ts +73 -5
- package/src/hub/settings.ts +3 -1
- package/src/hub/snapshots.ts +13 -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 +26 -3
- package/src/hub/supervision.ts +7 -0
- package/src/hub/task-pr.ts +47 -0
- package/src/hub/task-worktree.ts +18 -11
- package/src/hub/tasks.ts +694 -44
- package/src/hub/ui.ts +6 -2
- package/src/hub/usage-rollup.ts +77 -22
- package/src/local/tools.ts +13 -1
- package/src/memory/client.ts +3 -2
- package/src/pi/extension.ts +15 -3
- package/src/pi/tool-receipts.ts +26 -0
- package/src/ui/index.html +342 -8
- package/src/ui/plugin.ts +6 -2
- package/src/ui/roadmap-model.ts +70 -0
|
@@ -3,8 +3,8 @@ export interface ReviewScope { scope: "none" | "delta" | "full"; reviewers: numb
|
|
|
3
3
|
export interface CostPlan { review?: ReviewScope; ci?: "focused" | "full" | "reuse" }
|
|
4
4
|
export interface ReviewCost extends CostPlan { head?: string }
|
|
5
5
|
export interface CostTask { repo: string; pr: number; private?: boolean; history: { event: string; at: number; reviewCost?: ReviewCost }[] }
|
|
6
|
-
export interface CostPr { repo: string; pr: number; state: "OPEN" | "CLOSED" | "MERGED"; mergedAt?: number; complete: boolean; ciRuns?: { id: number; attempt: number }[]; reviews?: number }
|
|
7
|
-
export interface CostRow { repo: string; pr: number; reviewRounds: number; ciRuns: number | null; ciReruns: number | null; fullReReviews: number; deltaReviews: number; reviewMs: number | null; unknownReviewScopes: number; githubReviews: number | null; complete: boolean }
|
|
6
|
+
export interface CostPr { repo: string; pr: number; state: "OPEN" | "CLOSED" | "MERGED"; mergedAt?: number; complete: boolean; ciRuns?: { id: number; attempt: number }[]; reviews?: number; fullGateRuns?: number; successfulGateRuns?: number; failedGateRuns?: number; cancelledGateRuns?: number; otherGateRuns?: number; macosShardRuns?: number; firstPass?: 0 | 1 | null }
|
|
7
|
+
export interface CostRow { repo: string; pr: number; reviewRounds: number; ciRuns: number | null; ciReruns: number | null; fullReReviews: number; deltaReviews: number; reviewMs: number | null; unknownReviewScopes: number; githubReviews: number | null; complete: boolean; fullGateRuns?: number; successfulGateRuns?: number; failedGateRuns?: number; cancelledGateRuns?: number; otherGateRuns?: number; macosShardRuns?: number }
|
|
8
8
|
export interface CostReport { rows: CostRow[]; truncated: boolean }
|
|
9
9
|
/**
|
|
10
10
|
* #1087: why a cost scope was refused. The message is fixed text that names the field and its allowed values and never the value given, so a call site may show it
|
|
@@ -43,7 +43,7 @@ export function cleanCostPlan(input: unknown, field: string | { review: string;
|
|
|
43
43
|
* #481 S7: what the guarded merge records about a merged PR, from the PR read once at merge. Every field is `null` when the read could not establish it, never 0.
|
|
44
44
|
* CI figures need the complete read (runs linked by every head of the PR); a rerun is an attempt after the first of one run id, i.e. the same head run again.
|
|
45
45
|
*/
|
|
46
|
-
export interface MergeCost { mergedAt: number | null; ciRuns: number | null; ciReruns: number | null; reviews: number | null }
|
|
46
|
+
export interface MergeCost { mergedAt: number | null; ciRuns: number | null; ciReruns: number | null; reviews: number | null; fullGateRuns?: number | null; successfulGateRuns?: number | null; failedGateRuns?: number | null; cancelledGateRuns?: number | null; otherGateRuns?: number | null; macosShardRuns?: number | null; firstPass?: 0 | 1 | null }
|
|
47
47
|
export function ciRunCounts(runs: readonly { id: number; attempt: number }[] | undefined): { runs: number; reruns: number } | null {
|
|
48
48
|
if (!runs || runs.length > 100) return null;
|
|
49
49
|
const attempts = new Map<number, number>();
|
|
@@ -57,13 +57,15 @@ export function mergeCostFrom(pr: CostPr | undefined): MergeCost | undefined {
|
|
|
57
57
|
if (!pr || pr.state !== "MERGED") return undefined;
|
|
58
58
|
const counts = pr.complete ? ciRunCounts(pr.ciRuns) : null;
|
|
59
59
|
return { mergedAt: Number.isSafeInteger(pr.mergedAt) && pr.mergedAt! >= 0 ? pr.mergedAt! : null, ciRuns: counts?.runs ?? null, ciReruns: counts?.reruns ?? null,
|
|
60
|
-
reviews: Number.isSafeInteger(pr.reviews) && pr.reviews! >= 0 ? pr.reviews! : null
|
|
60
|
+
reviews: Number.isSafeInteger(pr.reviews) && pr.reviews! >= 0 ? pr.reviews! : null,
|
|
61
|
+
...(pr.complete && pr.fullGateRuns !== undefined ? { fullGateRuns: pr.fullGateRuns, successfulGateRuns: pr.successfulGateRuns ?? null, failedGateRuns: pr.failedGateRuns ?? null, cancelledGateRuns: pr.cancelledGateRuns ?? null, otherGateRuns: pr.otherGateRuns ?? null, macosShardRuns: pr.macosShardRuns ?? null, firstPass: pr.firstPass ?? null } : {}) };
|
|
61
62
|
}
|
|
62
63
|
/** Bounded, finite or absent: a stored record is data, never trusted shape. */
|
|
63
64
|
export function cleanMergeCost(value: unknown): MergeCost | undefined {
|
|
64
65
|
if (!value || typeof value !== "object" || Array.isArray(value)) return undefined;
|
|
65
66
|
const raw = value as Record<string, unknown>, field = (key: string) => Number.isSafeInteger(raw[key]) && (raw[key] as number) >= 0 ? raw[key] as number : null;
|
|
66
|
-
return { mergedAt: field("mergedAt"), ciRuns: field("ciRuns"), ciReruns: field("ciReruns"), reviews: field("reviews")
|
|
67
|
+
return { mergedAt: field("mergedAt"), ciRuns: field("ciRuns"), ciReruns: field("ciReruns"), reviews: field("reviews"),
|
|
68
|
+
...(Object.hasOwn(raw, "fullGateRuns") ? { fullGateRuns: field("fullGateRuns"), successfulGateRuns: field("successfulGateRuns"), failedGateRuns: field("failedGateRuns"), cancelledGateRuns: field("cancelledGateRuns"), otherGateRuns: field("otherGateRuns"), macosShardRuns: field("macosShardRuns"), firstPass: raw.firstPass === 0 || raw.firstPass === 1 ? raw.firstPass : null } : {}) };
|
|
67
69
|
}
|
|
68
70
|
const validRepo = (repo: string) => /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(repo) && !repo.startsWith("-");
|
|
69
71
|
const key = (repo: string, pr: number) => `${repo.toLowerCase()}#${pr}`;
|
|
@@ -99,12 +101,14 @@ export function costMetrics(tasks: CostTask[], prs: CostPr[]): CostReport {
|
|
|
99
101
|
}
|
|
100
102
|
if (pr.ciRuns && pr.ciRuns.length > 100) { complete = false; truncated = true; }
|
|
101
103
|
if (!pr.ciRuns || pr.reviews === undefined || rounds.some(round => round.elapsed === undefined || round.scope === undefined)) complete = false;
|
|
104
|
+
const ci = pr.complete ? ciRunCounts(pr.ciRuns) : null;
|
|
102
105
|
rows.push({ repo: pr.repo.toLowerCase(), pr: pr.pr, reviewRounds: rounds.length,
|
|
103
|
-
ciRuns:
|
|
106
|
+
ciRuns: ci?.runs ?? null, ciReruns: ci?.reruns ?? null,
|
|
104
107
|
fullReReviews: rounds.filter((round, index) => index > 0 && round.scope === "full").length,
|
|
105
108
|
deltaReviews: rounds.filter(round => round.scope === "delta").length,
|
|
106
109
|
reviewMs: rounds.every(round => round.elapsed !== undefined) ? rounds.reduce((sum, round) => sum + round.elapsed!, 0) : null,
|
|
107
|
-
unknownReviewScopes: rounds.filter(round => round.scope === undefined).length, githubReviews: pr.reviews ?? null, complete
|
|
110
|
+
unknownReviewScopes: rounds.filter(round => round.scope === undefined).length, githubReviews: pr.reviews ?? null, complete,
|
|
111
|
+
...(pr.complete && pr.fullGateRuns !== undefined ? { fullGateRuns: pr.fullGateRuns, successfulGateRuns: pr.successfulGateRuns, failedGateRuns: pr.failedGateRuns, cancelledGateRuns: pr.cancelledGateRuns, otherGateRuns: pr.otherGateRuns, macosShardRuns: pr.macosShardRuns } : {}) });
|
|
108
112
|
}
|
|
109
113
|
return { rows: rows.sort((a, b) => a.repo.localeCompare(b.repo) || a.pr - b.pr), truncated };
|
|
110
114
|
}
|