@staix/agent-hub 0.52.0 → 0.54.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 +37 -0
- package/README.md +4 -3
- package/docs/addons/open-code-review.md +3 -6
- package/docs/agent-notes/README.md +1 -1
- package/docs/agent-notes/adapters.md +5 -4
- package/docs/agent-notes/budget.md +2 -2
- package/docs/agent-notes/bus.md +1 -0
- package/docs/agent-notes/daemon.md +6 -5
- package/docs/agent-notes/models.md +1 -1
- package/docs/agent-notes/tasks.md +3 -3
- package/docs/agent-notes/tests.md +4 -4
- package/docs/contracts/companion-cli-v2.json +90 -0
- package/docs/contracts/companion-cli-v3.json +348 -0
- package/docs/design/adapters.md +1 -1
- package/docs/design/agent-hub-architecture.md +8 -5
- package/docs/design/bus.md +1 -1
- package/docs/design/cli-output-inventory.md +4 -2
- package/docs/design/execution-reference.md +1 -1
- package/docs/design/guidance-experiments.md +1 -0
- package/docs/design/guidance-probes.md +1 -0
- package/docs/design/model-routes.md +20 -5
- package/docs/design/roadmap.md +6 -4
- package/docs/design/task-board.md +21 -2
- package/docs/dogfood.md +13 -6
- package/docs/events.md +1 -1
- package/docs/memory.md +2 -2
- package/docs/operations.md +158 -50
- package/docs/quickstart.md +14 -2
- package/docs/security.md +17 -9
- package/docs/specs/2026-09-19-agent-hub-design.md +5 -3
- package/docs/specs/2026-09-19-multi-project-design.md +1 -1
- package/docs/specs/2026-09-20-upgrade-recovery-design.md +24 -0
- package/docs/specs/2026-12-04-arev-adoption-design.md +84 -0
- package/docs/specs/mcp-endpoint.md +15 -4
- package/docs/specs/relay-contract.md +38 -0
- package/docs/verification/2026-12-04-host-shared-receipts.md +43 -0
- package/docs/verification/2026-12-05-0.53.0.md +101 -0
- package/docs/verification/2026-12-05-agy-1.5.24.md +55 -0
- package/docs/verification/2026-12-05-claude-implementer-2.1.337.md +43 -0
- package/docs/verification/2026-12-06-0.54.0.md +76 -0
- package/docs/verification/2026-12-06-codex-0174-reviewer-isolation.md +43 -0
- package/docs/verification/2026-12-06-codex-0174-reviewer-tool-call.md +34 -0
- package/docs/verification/2026-12-06-compat-codex-capabilities-0.174.0.md +25 -0
- package/docs/verification/2026-12-06-compat-pi-1.8.0.md +23 -0
- package/docs/verified.json +38 -29
- package/package.json +9 -3
- package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-hub/.mcp.json +1 -1
- package/plugins/agent-hub/compat.json +9 -5
- package/plugins/agent-hub/kimi-hook.js +892 -874
- package/plugins/agent-hub/relay-launcher.js +24 -0
- package/plugins/agent-hub/server.js +27271 -25146
- package/src/adapters/acp-session-model.ts +1 -1
- package/src/adapters/acp.ts +5 -4
- package/src/adapters/agy/definition.ts +1 -1
- package/src/adapters/agy/hooks.ts +1 -1
- package/src/adapters/channel-peer.ts +3 -1
- package/src/adapters/claude-channel-evidence.ts +26 -1
- package/src/adapters/claude-channel.ts +27 -30
- package/src/adapters/claude-connection-policy.ts +62 -0
- package/src/adapters/claude-relay.ts +255 -0
- package/src/adapters/codex-review-isolation.ts +1 -2
- package/src/adapters/compat.ts +28 -18
- package/src/adapters/definitions/native-cli-preview-pi.ts +2 -1
- package/src/adapters/definitions/native-config-defaults.ts +1 -1
- package/src/adapters/definitions/native-context.ts +1 -2
- package/src/adapters/definitions/native-factories.ts +4 -1
- package/src/adapters/definitions/native-quota.ts +1 -1
- package/src/adapters/definitions/native-recovery.ts +3 -1
- package/src/adapters/external-modules.ts +2 -2
- package/src/adapters/kimi-review.ts +1 -1
- package/src/adapters/kimi-tui-facts.ts +1 -1
- package/src/adapters/local-worker.ts +3 -3
- package/src/adapters/native-capabilities.ts +1 -1
- package/src/adapters/pi.ts +26 -7
- package/src/adapters/registry-types.ts +2 -0
- package/src/adapters/relay-launcher.ts +27 -0
- package/src/adapters/reviewer-mcp.ts +1 -1
- package/src/cli/agents.ts +20 -8
- package/src/cli/agy-mcp.ts +1 -1
- package/src/cli/claude-profile-hook.ts +1 -1
- package/src/cli/command-table.ts +1 -0
- package/src/cli/commands/agents.ts +18 -1
- package/src/cli/commands/doctor.ts +18 -4
- package/src/cli/commands/launch-line.ts +32 -0
- package/src/cli/commands/status.ts +14 -3
- package/src/cli/help.ts +7 -4
- package/src/cli/identity.ts +1 -1
- package/src/cli/init-roles.ts +1 -1
- package/src/cli/init-settings.ts +1 -1
- package/src/cli/launch-line-plan.ts +82 -0
- package/src/cli/launch-line-project.ts +13 -0
- package/src/cli/main.ts +10 -9
- package/src/cli/pi-steps-warning.ts +14 -0
- package/src/cli/recovery-package.ts +60 -6
- package/src/cli/reset.ts +1 -1
- package/src/cli/shell-quote.ts +1 -3
- package/src/cli/upgrade-interactive.ts +7 -2
- package/src/cli/upgrade-keep-plan.ts +47 -0
- package/src/cli/upgrade-restore-state.ts +1 -1
- package/src/cli/upgrade-runtime.ts +119 -18
- package/src/cli/upgrade.ts +17 -2
- package/src/hub/accounts.ts +8 -4
- package/src/hub/action-class.ts +1 -3
- package/src/hub/adec-triage.ts +105 -0
- package/src/hub/autonomy.ts +1 -1
- package/src/hub/board.ts +3 -27
- package/src/hub/bus.ts +39 -6
- package/src/hub/capabilities.ts +1 -1
- package/src/hub/channel-project-base.ts +46 -0
- package/src/hub/channel-project.ts +21 -46
- package/src/hub/config-apply.ts +1 -1
- package/src/hub/config-edit.ts +1 -1
- package/src/hub/config-tier.ts +1 -1
- package/src/hub/config.ts +2 -2
- package/src/hub/confirmation-matrix.ts +1 -1
- package/src/hub/control/board-messages.ts +415 -0
- package/src/hub/control/dashboard-messages.ts +221 -0
- package/src/hub/control/delivery-messages.ts +356 -0
- package/src/hub/control/dispatch.ts +114 -0
- package/src/hub/control/hub-tool-helpers.ts +243 -0
- package/src/hub/control/hub-tools.ts +147 -0
- package/src/hub/control/native-messages.ts +665 -0
- package/src/hub/control/operations-messages.ts +269 -0
- package/src/hub/control/peer-messages.ts +126 -0
- package/src/hub/control/recovery-messages.ts +391 -0
- package/src/hub/control/recovery-operation.ts +480 -0
- package/src/hub/control/scope.ts +460 -0
- package/src/hub/control/sdlc-messages.ts +373 -0
- package/src/hub/control/task-ops-more.ts +245 -0
- package/src/hub/control/task-ops.ts +553 -0
- package/src/hub/control/ui-actions.ts +241 -0
- package/src/hub/control-write-trace.ts +1 -4
- package/src/hub/daemon.ts +485 -4324
- package/src/hub/delivery-hints.ts +2 -0
- package/src/hub/delivery-journal.ts +17 -6
- package/src/hub/events.ts +2 -1
- package/src/hub/execution-reference.ts +1 -1
- package/src/hub/host.ts +41 -9
- package/src/hub/hub-tools.ts +3 -4
- package/src/hub/invocations.ts +1 -1
- package/src/hub/lifecycle.ts +4 -3
- package/src/hub/mcp-endpoint-serve.ts +4 -3
- package/src/hub/mcp-endpoint.ts +15 -6
- package/src/hub/memory-profile-check.ts +1 -1
- package/src/hub/no-writes.ts +1 -1
- package/src/hub/peers.ts +2 -0
- package/src/hub/pi-exit-policy.ts +27 -0
- package/src/hub/progress.ts +1 -1
- package/src/hub/project-runtime-state.ts +17 -4
- package/src/hub/project-runtime.ts +3 -1
- package/src/hub/protocol-window.ts +1 -1
- package/src/hub/recovery-continuity.ts +3 -3
- package/src/hub/recovery-kept-roster.ts +50 -0
- package/src/hub/review-anchor.ts +13 -181
- package/src/hub/review-brief.ts +78 -28
- package/src/hub/review-findings.ts +15 -193
- package/src/hub/review-ledger.ts +162 -0
- package/src/hub/review-material.ts +3 -3
- package/src/hub/reviewer-pool.ts +4 -2
- package/src/hub/roadmap-issue-states.ts +65 -14
- package/src/hub/roadmap-sync.ts +39 -14
- package/src/hub/routing.ts +9 -0
- package/src/hub/runtime-capture-prune.ts +8 -2
- package/src/hub/runtime-package-assets.ts +3 -0
- package/src/hub/sdlc-release-policy.ts +1 -2
- package/src/hub/settings.ts +1 -1
- package/src/hub/spec-ack-tool.ts +4 -0
- package/src/hub/spec-report-history.ts +36 -0
- package/src/hub/specs.ts +1 -4
- package/src/hub/supervision.ts +33 -6
- package/src/hub/tasks-audit.ts +390 -0
- package/src/hub/tasks-backlog.ts +522 -0
- package/src/hub/tasks-handoff.ts +208 -0
- package/src/hub/tasks-release.ts +257 -0
- package/src/hub/tasks-roadmap.ts +17 -3
- package/src/hub/tasks-specs.ts +672 -0
- package/src/hub/tasks-types.ts +334 -0
- package/src/hub/tasks.ts +286 -1961
- package/src/hub/upgrade-session-contract.ts +11 -0
- package/src/local/probe-sandbox.ts +1 -2
- package/src/local/probe-workspace.ts +1 -1
- package/src/models/route/config.ts +4 -4
- package/src/models/route/decision.ts +18 -10
- package/src/models/route/observation-signals.ts +1 -2
- package/src/models/route/runtime.ts +8 -5
- package/src/npm-artifact.ts +76 -0
- package/src/omniroute/client.ts +6 -0
- package/src/pi/extension.ts +5 -2
- package/src/pi/install.ts +77 -0
- package/src/pi/pin.ts +49 -0
- package/src/primitives.ts +14 -0
- package/src/version.ts +2 -0
- package/templates/adec/README.md +10 -6
- package/templates/config.json +1 -1
- package/templates/specs.block.md +1 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
// The type and interface declarations of the task flow (#1830 S4e-1): moved unchanged out of tasks.ts, which re-exports every name it exported before.
|
|
2
|
+
import type { TriageAdec } from "./adec-triage.ts";
|
|
3
|
+
import type { RoadmapConfig } from "./roadmap.ts";
|
|
4
|
+
import type { GuidanceProbeStore } from "./guidance-probe-store.ts";
|
|
5
|
+
import type { ProbeStoredState, ProbeSlot, GuidanceProbeFakePorts, ProbeWorkerFramePreparer } from "./guidance-probes.ts";
|
|
6
|
+
import type { JournalDelivery } from "./delivery-journal.ts";
|
|
7
|
+
import type { EvidenceReceipt, EvidenceLinkV1 } from "./research-evidence.ts";
|
|
8
|
+
import type { ReviewMaterialBatch } from "./review-material.ts";
|
|
9
|
+
import type { EvidenceSourceRead } from "./source-read.ts";
|
|
10
|
+
import type { SourceMeta } from "./sources.ts";
|
|
11
|
+
import type { ContextAdmission } from "./context-window.ts";
|
|
12
|
+
import type { queueBackpressure, QueueBackpressurePolicy } from "./queue-backpressure.ts";
|
|
13
|
+
import type { GeneratedNoteProof } from "../memory/record-provenance.ts";
|
|
14
|
+
import type { MemorySymbolNodes } from "./memory-symbols.ts";
|
|
15
|
+
import type { types } from "node:util";
|
|
16
|
+
import type { ResearchCampaignStatus } from "./research-campaign.ts";
|
|
17
|
+
import type { ResearchUnitBinding, TaskRefs } from "./board.ts";
|
|
18
|
+
import type { ReviewBudgetSnapshot, ReviewGate, ReviewUnknownQuota } from "./review-budget.ts";
|
|
19
|
+
import type { AuditSummary, PublicAuditFinding } from "./security-audit.ts";
|
|
20
|
+
import type { AuditSource } from "./audit-source.ts";
|
|
21
|
+
import type { InstancesConfig } from "./instances.ts";
|
|
22
|
+
import type { ReviewScope } from "./review-scope.ts";
|
|
23
|
+
import type { ReleaseReportPolicy } from "./sdlc-release.ts";
|
|
24
|
+
import type { RoleCatalog } from "./roles.ts";
|
|
25
|
+
import type { MemoryScreen } from "./read-tools.ts";
|
|
26
|
+
import type { profileData, ProfileName, ProjectProfile } from "./profiles.ts";
|
|
27
|
+
import type { publicDeliverables, DeliverableStatus } from "./deliverables.ts";
|
|
28
|
+
import type { relative } from "node:path";
|
|
29
|
+
import type { Briefs, NativeItem } from "../memory/brief.ts";
|
|
30
|
+
import type { MemoryClient } from "../memory/client.ts";
|
|
31
|
+
import type { CandidateStore, MemoryStore } from "@staix/agent-mem";
|
|
32
|
+
import type { TaskStall, Board, Task, TaskClass, SpecAck, SpecTaskReport } from "./board.ts";
|
|
33
|
+
import type { Bus } from "./bus.ts";
|
|
34
|
+
import type { PeerId } from "./envelope.ts";
|
|
35
|
+
import type { PiiVerdict, ScreenRecord } from "./inference.ts";
|
|
36
|
+
import type { PeerCapabilities, Routing, SplitPrediction } from "./routing.ts";
|
|
37
|
+
import type { ExecutionBudget } from "./execution-budget.ts";
|
|
38
|
+
import type { TaskWorktreePort } from "./task-worktree.ts";
|
|
39
|
+
import type { BriefFile, ReviewBrief } from "./review-brief.ts";
|
|
40
|
+
import type { HubReviewRecord, LedgerOutcome } from "./review-ledger.ts";
|
|
41
|
+
import type { SpecsConfig } from "./specs-config.ts";
|
|
42
|
+
import type { SpecsCheckReport, SpecsCoverReport } from "./specs.ts";
|
|
43
|
+
import type { ProjectAdapterCatalog } from "../adapters/registry.ts";
|
|
44
|
+
import type { TaskSweepConfig } from "./task-sweep.ts";
|
|
45
|
+
import type { SdlcConfig, SdlcGh } from "./sdlc.ts";
|
|
46
|
+
|
|
47
|
+
export type TaskAssignmentRole = "owner" | "reviewer" | "planner";
|
|
48
|
+
|
|
49
|
+
export type EvidenceReadOrigins = { state: "known"; group: string; groups: number } | { state: "unknown" };
|
|
50
|
+
|
|
51
|
+
export type EvidenceReadResult = EvidenceReceipt & ({ status: "private" | "stale" | "unavailable" | "withdrawn" }
|
|
52
|
+
| { status: "resolved"; link: EvidenceLinkV1; excerpt: string; excerptSha256: string; locator: EvidenceLinkV1["locator"]; origins: EvidenceReadOrigins });
|
|
53
|
+
|
|
54
|
+
/** What `hub_remember` carries (#802: one shape for `remember` and `rememberOutcome`). */
|
|
55
|
+
export interface RememberInput { text?: string; title?: string; kind?: string; task?: unknown; horizon?: unknown; scope?: unknown; approach?: unknown; symptom?: unknown; cause?: unknown; evidence?: unknown; retry_when?: unknown }
|
|
56
|
+
|
|
57
|
+
export interface ReleaseWindow { at: number; host: boolean; quota: boolean; idle: boolean; reasons: string[]; current?: () => boolean; close?: () => Promise<void>; }
|
|
58
|
+
|
|
59
|
+
/** #1403 A4: the audit as a caller reads it. `withheld` counts open important findings whose text the view leaves out. */
|
|
60
|
+
export interface AuditView extends AuditSummary {
|
|
61
|
+
units: { unit: string; state: string; prior?: { audit: number; head: string }; reason?: string }[];
|
|
62
|
+
items: PublicAuditFinding[];
|
|
63
|
+
withheld?: number;
|
|
64
|
+
/** Findings in this report that were already verified or rejected, so the hub left them as decided. */
|
|
65
|
+
notUpdated?: string[];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface TasksDeps {
|
|
69
|
+
/** #1647 AC4: the hub's own token increments per task (a task id to its count, null when unknown), for the metrics grouped by reason. Read-only; absent means no reading. */
|
|
70
|
+
taskTokens?: () => Readonly<Record<number, number | null>>;
|
|
71
|
+
/** Timing-only owner question evidence for the idle-owner ladder. */
|
|
72
|
+
ownerQuestionWait?: (task: number, peer: PeerId) => { open: boolean; settled?: number } | undefined;
|
|
73
|
+
/** Private probe ledger and host-selected runner. Wire input selects only an already registered content ID. */
|
|
74
|
+
guidanceProbes?: {
|
|
75
|
+
store: GuidanceProbeStore;
|
|
76
|
+
fakePorts?: GuidanceProbeFakePorts;
|
|
77
|
+
live?: { id: string; adapter: Pick<import("../local/probe-types.ts").ProbeLocalAdapter, "ports" | "prepareWorkerFrame"> };
|
|
78
|
+
prepareWorkerFrame?: ProbeWorkerFramePreparer;
|
|
79
|
+
prepareEditorFrame?: (state: ProbeStoredState, slot: ProbeSlot) => string | Promise<string>;
|
|
80
|
+
session?: (by: PeerId) => { generation: string | number; nativeSession: string | null; requestConnectionId: string; current: () => void } | undefined;
|
|
81
|
+
timer?: { set(callback: () => void, ms: number): unknown; clear(handle: unknown): void };
|
|
82
|
+
};
|
|
83
|
+
adapterCatalog?: ProjectAdapterCatalog;
|
|
84
|
+
/** Host-bound evidence only; absent/expired observations never admit a release cut. */
|
|
85
|
+
releaseWindow?: () => Promise<ReleaseWindow>;
|
|
86
|
+
/** Effective per-peer planner capacity, taken from the existing settings loader. */
|
|
87
|
+
wipLimit?: (peer: PeerId) => number;
|
|
88
|
+
recordPlanning?: (change: { by: string; task?: number; release?: number; fields: string[]; revision: number }) => void;
|
|
89
|
+
/** The clock of the planner board-changed notice window (#758); tests inject one. Absent: `Date.now`. */
|
|
90
|
+
now?: () => number;
|
|
91
|
+
board: Board;
|
|
92
|
+
bus: Bus;
|
|
93
|
+
routing: () => Routing;
|
|
94
|
+
/** #800: normalized machine-local admission policy; absent or both zero preserve the old queue behaviour. */
|
|
95
|
+
queueBackpressure?: () => QueueBackpressurePolicy;
|
|
96
|
+
/** Host-only native context snapshots, separate from checkpoint notification and quota. */
|
|
97
|
+
contextAdmission?: () => ContextAdmission;
|
|
98
|
+
/** Startup-bound project declarations; routing never discovers instances from peer names. */
|
|
99
|
+
instances?: () => InstancesConfig;
|
|
100
|
+
/** Host proof of each live extra runtime's actual isolated execution root; config paths alone are not proof. */
|
|
101
|
+
ownerIsolation?: () => Readonly<Record<string, boolean>>;
|
|
102
|
+
cwd: string;
|
|
103
|
+
project: string;
|
|
104
|
+
/** Startup-bound namespace/key and an already-open exact-id journal read; never query-controlled. */
|
|
105
|
+
executionLineage?: { projectKey: string; cursorKey: string; readDelivery?(id: string): JournalDelivery | undefined };
|
|
106
|
+
profile?: ProfileName;
|
|
107
|
+
profileData?: ProjectProfile;
|
|
108
|
+
piiPaths?: string[];
|
|
109
|
+
/** The project's secrets denylist (`local.deny`), for the deliverable file reader (#509a). */
|
|
110
|
+
deny?: string[];
|
|
111
|
+
/**
|
|
112
|
+
* #509a: the root a peer's files live under: its verified execution root (the daemon's `ownerWriteRoot`), which for a declared worktree
|
|
113
|
+
* instance is not the project checkout. `undefined` means the root is not proven right now. Absent (library use): the project root.
|
|
114
|
+
*/
|
|
115
|
+
executionRoot?: (peer: PeerId) => string | undefined;
|
|
116
|
+
catalog?: RoleCatalog;
|
|
117
|
+
/** Role ids whose contract was prepared for the current native session. */
|
|
118
|
+
sessionRoles?: (peer: PeerId) => string[];
|
|
119
|
+
/** Optional bounded snapshot presentation; never stored in task history or memory. */
|
|
120
|
+
projectedReview?: (task: Task) => string | undefined;
|
|
121
|
+
/** Closed host evidence since the current acceptance: false means proven no writes; undefined is unknown. */
|
|
122
|
+
ownerWrites?: (task: Task, since: number) => boolean | undefined;
|
|
123
|
+
/** Explicit acceptance/self-claim only; implicit done has no pre-work baseline. */
|
|
124
|
+
ownerAccepted?: (task: Task) => void;
|
|
125
|
+
/** #520: the review brief for a task's commit (git only, bounded); undefined when the task names no commit. */
|
|
126
|
+
prepareReviewBrief?: (task: Task) => Promise<void>;
|
|
127
|
+
reviewBrief?: (task: Task) => ReviewBrief | { unavailable: string } | undefined;
|
|
128
|
+
/** #1874 V4: records a head-bound verdict in the AREV ledger (the daemon wires `recordHubReview`); throws a message naming the cause and next step. */
|
|
129
|
+
reviewLedger?: (task: Task, input: HubReviewRecord) => LedgerOutcome;
|
|
130
|
+
/** Current public coverage for a task's declared paths; absent when notices are disabled or no specs exist. */
|
|
131
|
+
specNotice?: (task: Task) => SpecsCoverReport | undefined;
|
|
132
|
+
/** Inspect spec metadata at a verified task head; undefined is authoritative quiet (no specs/stamps or review off). */
|
|
133
|
+
inspectSpecs?: (task: Task, head: string, changedFiles: readonly BriefFile[] | undefined, acks: readonly SpecAck[]) => Promise<SpecTaskReport | undefined>;
|
|
134
|
+
/** Effective shared and machine-local specs policy. */
|
|
135
|
+
specsConfig?: () => SpecsConfig;
|
|
136
|
+
/** Explicit, read-only inspection remains available when task notices are disabled. */
|
|
137
|
+
specsRead?: (action: "check" | "covers", paths: readonly string[]) => SpecsCheckReport | SpecsCoverReport;
|
|
138
|
+
/** R3 (#1481): spec ids with their status, for the unplaced list. Absent or throwing is "unavailable", never "no specs". */
|
|
139
|
+
specsList?: () => { specs: { id: string; title: string; status: string | null; type?: string; paths?: string[] }[]; errors: number; truncated: boolean };
|
|
140
|
+
/** R3 (#1481): the model for triage. Absent, off or failing is no suggestion; it carries no authority and links nothing. */
|
|
141
|
+
roadmapModel?: (system: string, user: string, allowed: () => boolean) => Promise<string | undefined>;
|
|
142
|
+
/** R3 (#1481): host-only `gh` runner for the roadmap's read-only issue and milestone reads (tests); production uses `sdlc.gh`. */
|
|
143
|
+
roadmapGh?: SdlcGh;
|
|
144
|
+
/** Host-only origin proof for tests; production reads the project-local Git origin. */
|
|
145
|
+
roadmapOrigin?: () => string | undefined;
|
|
146
|
+
roadmapConfig?: () => RoadmapConfig;
|
|
147
|
+
/** Host-verified existing symbols at this task's admitted completion head; never plan guesses. */
|
|
148
|
+
memorySymbolNodes?: (task: Task) => MemorySymbolNodes | undefined;
|
|
149
|
+
/** Host-only release report selector; derives its answer from committed policy and the in-memory authorization ledger. */
|
|
150
|
+
sdlc?: { config: () => SdlcConfig; gh?: SdlcGh; reportPolicy?: (head: string, repo: string) => ReleaseReportPolicy | undefined };
|
|
151
|
+
/** #1403 A4: read-only git for the security audit (the checkout's head and changed paths); absent means the audit commands are unavailable. */
|
|
152
|
+
auditSource?: AuditSource;
|
|
153
|
+
/**
|
|
154
|
+
* #1646 T2: a read-only reader for the checkout a reviewing session reported for itself, resolved and proven by the host to be a
|
|
155
|
+
* worktree of this repository. Absent means the hub knows no such checkout, so the verdict's evidence names the project
|
|
156
|
+
* checkout instead. The path comes from the host's own socket record, never from a tool argument.
|
|
157
|
+
*/
|
|
158
|
+
reviewerCheckout?: (peer: PeerId) => AuditSource | undefined;
|
|
159
|
+
/** #785 P1b: the per-head CI watcher's bounds; tests shorten them, the defaults are `CI_WATCH_*` in `ci-watch.ts`. */
|
|
160
|
+
ciWatch?: { deadlineMs?: number; missingRunMs?: number; pollMs?: number };
|
|
161
|
+
/** #785 P1c: `tasks.auto_pull`, read for every automatic pull trigger; absent or false pulls nothing. */
|
|
162
|
+
autoPull?: () => boolean;
|
|
163
|
+
briefs?: Briefs;
|
|
164
|
+
/** Screened live fail notes directly intersecting the task plan or refs; read-only advice. */
|
|
165
|
+
planFails?: (task: Task) => NativeItem[];
|
|
166
|
+
candidates?: CandidateStore;
|
|
167
|
+
candidateScreen?: MemoryScreen;
|
|
168
|
+
/** Authenticated live turn context, not a model-supplied flag. */
|
|
169
|
+
privateTurn?: (peer: PeerId) => boolean;
|
|
170
|
+
/** Host-only observer provenance, separate from task/turn authority. Sample before any operation await. */
|
|
171
|
+
observerExcludedTurn?: (peer: PeerId) => boolean;
|
|
172
|
+
/** #223 R4: the hub's reading of a verdict's context (`fresh` only for a reviewer session started for this review). */
|
|
173
|
+
reviewContext?: (by: PeerId, task: number) => "fresh" | "continuing" | undefined;
|
|
174
|
+
/** Current-turn input carries review material or anchored findings; it expires on the next ordinary input. */
|
|
175
|
+
reviewObserverInput?: (peer: PeerId) => boolean;
|
|
176
|
+
/** Latch an anchor-bearing hub_review input before its first await or effect, even if the verdict is refused. */
|
|
177
|
+
onReviewObserverInput?: (peer: PeerId) => void;
|
|
178
|
+
/** #852: what a reviewer reads. `code` (the fixed sandboxed reviewers by default, or a local `review_scope`) reads the code only; unset or `full` also runs tests and reads CI. */
|
|
179
|
+
reviewScope?: (peer: PeerId) => ReviewScope;
|
|
180
|
+
/** #223 R2: a reviewer-only instance gets review facts, not the builder's done summary. */
|
|
181
|
+
reviewOnly?: (peer: PeerId) => boolean;
|
|
182
|
+
/** #223: captured when a verdict call starts; a non-undefined result refuses the verdict at every later check. */
|
|
183
|
+
reviewAuthority?: (by: PeerId, task: number) => (() => string | undefined) | undefined;
|
|
184
|
+
/** Host-captured current-child authority, rechecked before an admitted async tool first commits effects. */
|
|
185
|
+
requestAuthority?: (by: PeerId) => (() => string | undefined) | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* #933: whether `by` runs this call inside an admitted, audited conductor operation. The host rechecks the role on every call and throws
|
|
188
|
+
* its authority refusal when it ended; a peer outside such a call gets `false`. Host-only: never read from configuration or a tool.
|
|
189
|
+
*/
|
|
190
|
+
operational?: (by: PeerId) => boolean;
|
|
191
|
+
memory?: MemoryClient;
|
|
192
|
+
/** Captured native profile fence at our memory operation boundaries; no board mutation. */
|
|
193
|
+
memoryCheck?: () => void;
|
|
194
|
+
/** #258: the hub's own store, the project name it files entries under (the git chain) and the repo `#N` issues belong to. */
|
|
195
|
+
store?: { store: MemoryStore; project: string; repo: string; deny?: string[]; onNote?: (id: string) => void; onGeneratedNote?: (entry: GeneratedNoteProof) => void };
|
|
196
|
+
/** a line for the human: console tail and hub.log */
|
|
197
|
+
notify: (line: string) => void;
|
|
198
|
+
/** The completion check configured for a class, if any (local config only; issue #7). */
|
|
199
|
+
check?: (cls: TaskClass, task?: Task) => string | undefined;
|
|
200
|
+
/** #901: the key of the `checks` entry `check` chose for this task (the profile class alias, else the class): the same lookup, so the two cannot disagree. Absent: the key is unknown. */
|
|
201
|
+
checkKey?: (cls: TaskClass, task?: Task) => string | undefined;
|
|
202
|
+
/** Runs one check; the hub runs them one at a time. */
|
|
203
|
+
runCheck?: (command: string) => Promise<{ code: number | null; timedOut: boolean; interrupted?: boolean; tail: string }>;
|
|
204
|
+
/** Hands a saved note to every other peer; it rides on their next delivery. */
|
|
205
|
+
share?: (by: PeerId, line: string) => void;
|
|
206
|
+
/** Hands one peer a line that rides on its next delivery, without a turn of its own (issue #6). */
|
|
207
|
+
tell?: (peer: PeerId, line: string) => void;
|
|
208
|
+
/** Structured overlap records for telemetry (issue #40); the notice line stays for the human. */
|
|
209
|
+
/** #1054: a completion check this peer owned just ended (its ownership is already cleared), so a run that waited on it may settle. Advisory: a throw is ignored. */
|
|
210
|
+
checkEnded?: (owner: PeerId) => void;
|
|
211
|
+
recordOverlap?: (task: number, owner: PeerId, others: { task: number; owner: PeerId; paths: string[]; symbols?: string[] }[]) => void;
|
|
212
|
+
/** Quota per peer from fresh readings (issue #36): routing drains the windows that reset soonest first. */
|
|
213
|
+
quota?: () => Record<PeerId, { headroom: number; resetsAt?: number }>;
|
|
214
|
+
/** Optional persisted task/run execution limits (issue #102). */
|
|
215
|
+
executionBudget?: ExecutionBudget;
|
|
216
|
+
/** Project-scoped immutable-source metadata, read only before a study transaction. */
|
|
217
|
+
/**
|
|
218
|
+
* Host-scoped immutable-head/material batch; supports host-staged completion refs/sdlc, never client-staged Task objects. The shared
|
|
219
|
+
* reader owns file authorization and budgets. `scope: "brief"` widens the reader's scope to the task's own review brief (#1646 T3),
|
|
220
|
+
* which the host builds itself, never to paths a caller names.
|
|
221
|
+
*/
|
|
222
|
+
reviewMaterials?: (task: Task, requests: readonly { path: string; side?: "base" | "head" }[], scope?: "brief") => Promise<ReviewMaterialBatch>;
|
|
223
|
+
studySource?: (id: string) => { id: string; sha256: string; private: boolean } | undefined;
|
|
224
|
+
/** Host-owned screened snapshot read, never a public source-read excerpt reconstructed as a projection. */
|
|
225
|
+
/** Opaque host-only current raw/projection/converter token, never client evidence. */
|
|
226
|
+
evidenceSourceSnapshotKey?: (link: EvidenceLinkV1) => string | undefined;
|
|
227
|
+
evidenceSourceRead?: (by: PeerId, link: EvidenceLinkV1, current: () => boolean, mode?: { privacyReadOnly: true }) => Promise<EvidenceSourceRead>;
|
|
228
|
+
/** Fresh registered metadata for bounded, ephemeral origin grouping; no converter or model call. */
|
|
229
|
+
evidenceSourceMeta?: (id: string) => SourceMeta | undefined;
|
|
230
|
+
/** Host-only fixture clock; never read from model input or project configuration. */
|
|
231
|
+
studyNow?: () => number;
|
|
232
|
+
/** Host-only reader for this project's check-runner receipts; record inputs never supply a receipt. */
|
|
233
|
+
experimentCheck?: (run: string) => Promise<unknown>;
|
|
234
|
+
/** Fresh trusted machine-local runner registrations. A source-trust failure refuses new receipts. */
|
|
235
|
+
researchRunners?: () => unknown;
|
|
236
|
+
/** Reviewer choice from recorded review outcomes (issue #35); off unless the project config turns it on. */
|
|
237
|
+
review?: { adaptive: boolean; min_reviews: number; pool?: readonly string[]; rerotate?: boolean; same_family?: "fallback" | "never"; gate?: ReviewGate; unknown_quota?: ReviewUnknownQuota; max_minutes?: number };
|
|
238
|
+
reviewBudget?: () => Pick<ReviewBudgetSnapshot, "paused" | "manualPaused">;
|
|
239
|
+
/** Peers whose recent deliveries all failed, with the reason (issue #89); routing skips them. */
|
|
240
|
+
capabilities?: () => Record<PeerId, PeerCapabilities>;
|
|
241
|
+
/** #1115: the hub makes, commits and clears the task worktree of a hub-sandboxed peer. Absent: such a peer keeps the #1081 refusal. */
|
|
242
|
+
taskWorktree?: TaskWorktreePort;
|
|
243
|
+
repository?: string;
|
|
244
|
+
offerRead?: (peer: PeerId, envelopeId: string) => boolean;
|
|
245
|
+
offerPullOnly?: (peer: PeerId) => boolean;
|
|
246
|
+
cancellationHeld?: () => boolean;
|
|
247
|
+
stallNotice?: (stall: TaskStall) => void;
|
|
248
|
+
failing?: () => Record<PeerId, string>;
|
|
249
|
+
/** Peers whose queue a needs_review delivery holds, with the hold detail (issue #90); routing explains the hold, never rejects. */
|
|
250
|
+
held?: () => Record<PeerId, string>;
|
|
251
|
+
/** Closed host facts only; approval text and quota reasons never enter the grooming projection. */
|
|
252
|
+
plannerBlocks?: () => Record<PeerId, ("approvals" | "quota")[]>;
|
|
253
|
+
/** Roles from `.agenthub/config.json` (issue #92): peers with the reviewer role join the reviewer candidates. */
|
|
254
|
+
roles?: Record<string, string[]>;
|
|
255
|
+
/** Optional: name a class for a task proposed without one. `onCampus` says whether the model call stays on campus. */
|
|
256
|
+
triage?: { classify: (title: string, detail: string) => Promise<TaskClass | undefined>; onCampus: () => Promise<boolean>;
|
|
257
|
+
/** #1936: adec's triage question and the outcome label; absent or `off` changes nothing. */
|
|
258
|
+
adec?: Pick<TriageAdec, "mode" | "ask" | "settled"> };
|
|
259
|
+
/** #334: natural-language intake. `split` is the hub model's one call, `partsSchema` the profile's `hub_backlog_split` parts schema, `sourceKnown` the source registry. */
|
|
260
|
+
intake?: { split: (system: string, user: string, opts: { campusOnly: boolean }) => Promise<string | undefined>; partsSchema: () => unknown; sourceKnown: (id: string) => boolean };
|
|
261
|
+
/** The PII screen (issue #198): a closed verdict from a model on this machine or on campus, `unknown` on any failure. */
|
|
262
|
+
piiScreen?: (text: string) => Promise<PiiVerdict>;
|
|
263
|
+
/** Each screen verdict, for the record: item, label, source and category, never the text. */
|
|
264
|
+
recordScreen?: (record: ScreenRecord) => void;
|
|
265
|
+
/** Turn-free coordination (issue #107): configured and no PII task open. Asked at each use. */
|
|
266
|
+
turnFree?: () => boolean;
|
|
267
|
+
/** Coordination preference captured for each newly created task; existing rows keep their initial mode. */
|
|
268
|
+
coordination?: () => boolean;
|
|
269
|
+
/** Whether a peer's context path for facts is verified in its current session (issue #108). */
|
|
270
|
+
capable?: (peer: PeerId) => boolean;
|
|
271
|
+
/** Whether `peer` is between native turns now (issue #107): Codex not busy, Claude stopped since its last tool call. */
|
|
272
|
+
idle?: (peer: PeerId) => boolean;
|
|
273
|
+
/** One hash over these project files as they are now: an integration target (issue #107). */
|
|
274
|
+
treeHash?: (paths: string[], windows: { peer: PeerId; since: number; until?: number }[]) => string;
|
|
275
|
+
/** The facts due for a peer, offered with an integration request; acknowledged by its next done. */
|
|
276
|
+
integrationFacts?: (peer: PeerId) => { id: string; text: string } | undefined;
|
|
277
|
+
ackFacts?: (peer: PeerId, id: string) => void;
|
|
278
|
+
/** Whether a peer has been shown every change to its files. */
|
|
279
|
+
factsCurrent?: (peer: PeerId) => boolean;
|
|
280
|
+
/**
|
|
281
|
+
* A peer's split profile now (issue #109): the hub's version, its agent's and the hook profile. Each hand-over is
|
|
282
|
+
* tagged with it, and only records with a peer's current profile are its observations. Undefined while unknown.
|
|
283
|
+
*/
|
|
284
|
+
splitProfile?: (peer: PeerId) => string | undefined;
|
|
285
|
+
/**
|
|
286
|
+
* A shadow split prediction, for the record (issue #109): `routing` when routing chose the owner of a task that
|
|
287
|
+
* overlaps another owner's task not started yet (what calibration reads), `cohort` when an overlap formed a cohort.
|
|
288
|
+
*/
|
|
289
|
+
recordSplit?: (task: number, prediction: SplitPrediction, where: "routing" | "cohort") => void;
|
|
290
|
+
/** A cohort formed, changed or was lifted (issue #107), for the record: the benchmark's treatment check reads it. */
|
|
291
|
+
recordCohort?: (cohort: { id: number; event: "formed" | "joined" | "lifted"; silent: boolean; tasks: number[]; owners: PeerId[] }) => void;
|
|
292
|
+
sweep?: TaskSweepConfig;
|
|
293
|
+
/** #798 D1: the project's declared submodule paths, project-relative. Absent: none are known, so no notice. */
|
|
294
|
+
submodules?: () => string[];
|
|
295
|
+
/** Shutdown or coordinator work (recovery) holds task sweeps, and a guarded merge at its dispatch (#491). */
|
|
296
|
+
sweepHeld?: () => boolean;
|
|
297
|
+
/** Consecutive changes_requested verdicts that move a task to another peer (`tasks.escalate_after`, #488). */
|
|
298
|
+
escalateAfter?: () => number;
|
|
299
|
+
/** #489 H1: current host configuration, read at each planner-notice flush; no task/request override. */
|
|
300
|
+
groomFyiWindowMin?: () => number;
|
|
301
|
+
/** #489 H2: current host configuration, read at each use (no cache, no task/request override); absent is the constant each replaces. */
|
|
302
|
+
demoteAt?: () => number;
|
|
303
|
+
demotionHalfLifeH?: () => number;
|
|
304
|
+
contradictionWindowDays?: () => number;
|
|
305
|
+
rescreenMax?: () => number;
|
|
306
|
+
splitMinObservations?: () => number;
|
|
307
|
+
splitMaxFailureShare?: () => number;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export interface QueuePressurePass { ownerAfter: number; reviewAfter: number; ownerDone: boolean; reviewDone: boolean; retained: boolean; generation: number }
|
|
311
|
+
|
|
312
|
+
/** #694: a PR staged at done with the commit or branch it was read for. */
|
|
313
|
+
export interface ResearchCampaignReceipt { id: string; parentTaskId: number; revision: number; status: ResearchCampaignStatus; unitCount: number; units: ResearchUnitBinding[] }
|
|
314
|
+
|
|
315
|
+
export interface CompletionRefresh { revision: number; commit: string; state: "in_review" | "approved" }
|
|
316
|
+
|
|
317
|
+
export interface RefileHeadGuard { recorded?: string }
|
|
318
|
+
|
|
319
|
+
export interface IdentityLink { repo: string; pr: number; basis: { commit?: string; branch?: string }; managedRevision?: number }
|
|
320
|
+
|
|
321
|
+
/** What one live check of a task's files says as a whole (#317): `unchanged` only when EVERY file measured unchanged. A change outranks a missing file, which outranks one the hub could not read. */
|
|
322
|
+
export type DeliverableResult = "changed" | "missing" | "unknown" | "unchanged";
|
|
323
|
+
|
|
324
|
+
/** One row of `ahub deliverables` and one card's badge (#317): ids, hashes and sizes always; a path only where `publicDeliverables` allows it. */
|
|
325
|
+
export interface DeliverableRow {
|
|
326
|
+
task: number; title: string; taskState: string; state: "delivered" | "approved";
|
|
327
|
+
/** True only when the files were measured for this row. Without it `changedSinceReview` is absent: the board alone cannot know. */
|
|
328
|
+
checked: boolean; changedSinceReview?: boolean;
|
|
329
|
+
/** Present only when `checked`: the whole-row reading of the measurement (never `unchanged` while any file is missing or unreadable). */
|
|
330
|
+
result?: DeliverableResult;
|
|
331
|
+
files: { id: string; path?: string; format: string; version?: string; sha256: string; bytes: number; private?: true; state?: DeliverableStatus["state"] }[];
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export type ManagedHandoffRefs<Key extends symbol> = TaskRefs & { [K in Key]?: { task: number; owner: PeerId; revision: number; commit: string; branch: string; repo?: string; pr?: number } };
|