@staix/agent-hub 0.39.0 → 0.40.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 +39 -0
- package/README.md +12 -6
- package/docs/adding-an-ai-tool.md +1 -1
- package/docs/agent-notes/README.md +7 -0
- package/docs/agent-notes/adapters.md +5 -3
- package/docs/agent-notes/benchmarks.md +2 -0
- package/docs/agent-notes/budget.md +1 -0
- package/docs/agent-notes/bus.md +1 -0
- package/docs/agent-notes/daemon.md +8 -3
- package/docs/agent-notes/local-worker.md +3 -1
- package/docs/agent-notes/security-review.md +1 -0
- package/docs/agent-notes/tasks.md +7 -2
- package/docs/agent-notes/tests.md +7 -7
- package/docs/contracts/companion-cli-v1.json +4 -0
- package/docs/design/adapters.md +91 -0
- package/docs/design/agent-hub-architecture.md +17 -0
- package/docs/design/agent-hub.md +10 -0
- package/docs/design/bus.md +7 -0
- package/docs/design/cli-output.md +183 -0
- package/docs/design/execution-reference.md +6 -1
- package/docs/design/roadmap.md +191 -0
- package/docs/design/task-board.md +34 -0
- package/docs/dogfood.md +11 -4
- package/docs/events.md +4 -4
- package/docs/memory.md +3 -3
- package/docs/operations.md +153 -41
- package/docs/profiles.md +1 -0
- package/docs/quickstart.md +17 -4
- package/docs/sdlc.md +3 -1
- package/docs/security.md +40 -4
- package/docs/verification/2026-11-14-codex-0169-reviewer-isolation.md +70 -0
- package/docs/verification/2026-11-14-codex-0169-reviewer-tool-call.md +48 -0
- package/docs/verification/2026-11-14-pi-152-compat.md +45 -0
- package/docs/verification/2026-11-15-0.40.0.md +39 -0
- package/docs/verification/2026-11-16-pi-loopback-1447.md +39 -0
- package/docs/verification/pi-152-model-free.ts +57 -0
- package/docs/verification/pi-152-native.mjs +21 -0
- package/docs/verified.json +22 -22
- package/package.json +3 -3
- package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-hub/kimi-hook.js +332 -89
- package/plugins/agent-hub/kimi-review-policy-worker.js +16 -11
- package/plugins/agent-hub/server.js +417 -160
- package/src/adapters/agy/definition.ts +1 -1
- package/src/adapters/claude-channel.ts +1 -1
- package/src/adapters/codex-review-isolation.ts +61 -17
- package/src/adapters/compat.ts +7 -7
- package/src/adapters/definitions/builtin-metadata.ts +6 -6
- package/src/adapters/definitions/native-config-defaults.ts +1 -1
- package/src/adapters/definitions/native-config-policy.ts +1 -1
- package/src/adapters/definitions/qwen.ts +1 -1
- package/src/adapters/local-worker.ts +5 -3
- package/src/adapters/pi.ts +54 -11
- package/src/adapters/registry-types.ts +2 -1
- package/src/adapters/reviewer-print.ts +2 -1
- package/src/cli/answer-args.ts +11 -3
- package/src/cli/console-question.ts +1 -1
- package/src/cli/console-state.ts +95 -10
- package/src/cli/console.ts +6 -2
- package/src/cli/error-format.ts +19 -0
- package/src/cli/help.ts +290 -25
- package/src/cli/identity-audit.ts +8 -7
- package/src/cli/identity.ts +17 -0
- package/src/cli/init.ts +102 -9
- package/src/cli/main.js +2 -2
- package/src/cli/main.ts +57 -21
- package/src/cli/output-standard.ts +56 -0
- package/src/cli/output.ts +143 -8
- package/src/cli/roadmap.ts +215 -0
- package/src/cli/smoke-pty-bridge.ts +7 -24
- package/src/cli/task-output.ts +3 -1
- package/src/cli/upgrade-presentation-flags.ts +2 -2
- package/src/hub/board.ts +200 -3
- package/src/hub/bus.ts +9 -0
- package/src/hub/check-runner.ts +3 -4
- package/src/hub/ci-watch.ts +19 -4
- package/src/hub/control-client.ts +1 -1
- package/src/hub/daemon.ts +245 -43
- package/src/hub/events.ts +2 -2
- package/src/hub/execution-reference.ts +1 -1
- package/src/hub/github-import.ts +81 -0
- package/src/hub/hub-tools.ts +34 -9
- package/src/hub/install-policy.ts +23 -0
- package/src/hub/lifecycle-schema.ts +2 -2
- package/src/hub/no-writes.ts +3 -0
- package/src/hub/operational-authority.ts +3 -1
- package/src/hub/operational-view.ts +1 -1
- package/src/hub/pi-failure.ts +7 -0
- package/src/hub/question-desk.ts +26 -7
- package/src/hub/questions.ts +33 -5
- package/src/hub/restart.ts +7 -0
- package/src/hub/roadmap-triage.ts +86 -0
- package/src/hub/roadmap-unplaced.ts +169 -0
- package/src/hub/roadmap-view.ts +83 -0
- package/src/hub/roadmap.ts +127 -0
- package/src/hub/sdlc-merge.ts +5 -4
- package/src/hub/sdlc-queue.ts +3 -3
- package/src/hub/sdlc.ts +37 -2
- package/src/hub/specs-task.ts +7 -0
- package/src/hub/task-sweep.ts +29 -2
- package/src/hub/task-worktree.ts +37 -0
- package/src/hub/tasks.ts +381 -7
- package/src/pi/dependency-publish.ts +50 -0
- package/src/pi/extension.ts +1 -1
- package/src/pi/launch.ts +1 -1
- package/src/pi/task-dependencies.ts +249 -0
- package/src/ui/index.html +53 -13
- package/src/ui/plugin-questions.ts +5 -0
- package/src/ui/plugin.ts +6 -1
- package/templates/config.json +1 -1
package/src/hub/board.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PreEffectToolRefusal } from "./tool-refusal.ts";
|
|
1
2
|
import { GUIDANCE_VARIANT_LIMITS, GUIDANCE_PAGE_MAX_RECORDS, GUIDANCE_HASH_HEX_LENGTH, parseGuidanceVariantV1, parseGuidanceExperiment, parseGuidanceStoredRecord, validateGuidanceVariantV1, type GuidanceVariantV1, type GuidanceExperimentRecord, type GuidanceStoredRecord, type GuidanceWriteFence } from "./guidance-variants.ts";
|
|
2
3
|
import { ExecutionLinkError, EXECUTION_LINK_LIMITS, executionLinkActor, executionLinkInteger, executionLinkId, executionLinkReferences, executionReferenceDigest, parseExecutionLinkInput, parseExecutionLinkRecord, type ExecutionLinkInput, type ExecutionLinkRecord, type ExecutionLinkFence } from "./execution-links.ts";
|
|
3
4
|
import { executionReferenceKey, EXECUTION_REFERENCE_LIMITS } from "./execution-reference.ts";
|
|
@@ -19,6 +20,7 @@ import type { Database } from "./db-schema.ts";
|
|
|
19
20
|
import { openHubDatabase, advanceHubDbSchema } from "./db-schema.ts";
|
|
20
21
|
import { controlWriteSpan } from "./control-write-trace.ts";
|
|
21
22
|
import { planningPatch, type PlanningFields, type Release, type ReleaseState } from "./planning.ts";
|
|
23
|
+
import { MILESTONE_HISTORY_LIMIT, parseMilestoneInput, parseMilestonePatch, milestoneId, milestoneRevision, milestoneActor, milestoneHistory, milestoneLinkRef, type Milestone, type MilestoneInput, type MilestonePatch, type MilestoneLink, type MilestoneLinkKind, type MilestoneHistoryEntry, type MilestoneSuggestion, type SuggestionItemKind, type SuggestionState } from "./roadmap.ts";
|
|
22
24
|
import { HUB, USER, type PeerId } from "./envelope.ts";
|
|
23
25
|
import type { AuditFinding, AuditProfile, AuditUnit } from "./security-audit.ts";
|
|
24
26
|
import type { ReviewFinding } from "./review-findings.ts";
|
|
@@ -250,7 +252,7 @@ export type TaskPlan = Partial<Record<(typeof ALL_PLAN_KEYS)[number], string[]>>
|
|
|
250
252
|
/** Task outcomes older than this are pruned: demotion (issue #36) reads one week, seven half-lives. */
|
|
251
253
|
export const OUTCOMES_KEPT_MS = 7 * 24 * 3_600_000;
|
|
252
254
|
|
|
253
|
-
export const TASK_MOVE_REASONS = ["manual", "budget", "offline", "idle", "rejections", "declined", "inference_failed", "delivery_failed"] as const;
|
|
255
|
+
export const TASK_MOVE_REASONS = ["manual", "budget", "offline", "idle", "rejections", "declined", "inference_failed", "delivery_failed", "step_limit"] as const;
|
|
254
256
|
export type TaskMoveReason = (typeof TASK_MOVE_REASONS)[number];
|
|
255
257
|
export type InvocationHistory = Pick<InvocationRow, "id" | "caller" | "target" | "capability" | "digest" | "class" | "approval" | "argsSha256" | "outcome">;
|
|
256
258
|
|
|
@@ -282,6 +284,8 @@ export interface HistoryEntry {
|
|
|
282
284
|
reason?: TaskMoveReason;
|
|
283
285
|
/** Persisted task-idle ladder; never counted as fresh task activity (#186). */
|
|
284
286
|
sweep?: SweepRecord;
|
|
287
|
+
/** #1454: on a `wait recorded` entry, the bounded wait: when it ends and the owner it was recorded for. The reason is the entry's note. */
|
|
288
|
+
wait?: { until: number; owner: PeerId };
|
|
285
289
|
/** The PII screen did not clear this entry's note (#198): only the console reads it. */
|
|
286
290
|
withheld?: true;
|
|
287
291
|
/** Public, head-bound design-spec status; acknowledgement text is screened before this is written. */
|
|
@@ -623,6 +627,24 @@ export class Board {
|
|
|
623
627
|
this.db.run("CREATE INDEX IF NOT EXISTS releases_planner_present ON releases(planner) WHERE planner IS NOT NULL");
|
|
624
628
|
if (!(this.db.query("PRAGMA table_info(releases)").all() as { name: string }[]).some(row => row.name === "train")) this.db.run("ALTER TABLE releases ADD COLUMN train TEXT");
|
|
625
629
|
|
|
630
|
+
this.db.run(`CREATE TABLE IF NOT EXISTS milestones (
|
|
631
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT, title TEXT NOT NULL, outcome TEXT NOT NULL,
|
|
632
|
+
state TEXT NOT NULL, horizon TEXT NOT NULL, milestone_order INTEGER NOT NULL,
|
|
633
|
+
target TEXT, parent INTEGER, revision INTEGER NOT NULL DEFAULT 0, history TEXT NOT NULL,
|
|
634
|
+
created INTEGER NOT NULL, updated INTEGER NOT NULL)`);
|
|
635
|
+
this.db.run(`CREATE TABLE IF NOT EXISTS milestone_links (
|
|
636
|
+
milestone INTEGER NOT NULL, kind TEXT NOT NULL, ref TEXT NOT NULL, by TEXT NOT NULL, at INTEGER NOT NULL,
|
|
637
|
+
PRIMARY KEY(milestone,kind,ref))`);
|
|
638
|
+
// R3 (#1481): advisory model suggestions and the one-time GitHub milestone import marks. Additive, outside the roadmap integrity digest:
|
|
639
|
+
// a lost suggestion is triaged again, and an import mark only stops a repeat from creating a second milestone.
|
|
640
|
+
this.db.run(`CREATE TABLE IF NOT EXISTS milestone_suggestions (
|
|
641
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT, kind TEXT NOT NULL, ref TEXT NOT NULL, milestone INTEGER,
|
|
642
|
+
proposal TEXT, cite_milestone TEXT, cite_item TEXT NOT NULL, state TEXT NOT NULL, by TEXT NOT NULL,
|
|
643
|
+
created INTEGER NOT NULL, settled INTEGER, settled_by TEXT, created_milestone INTEGER)`);
|
|
644
|
+
this.db.run("CREATE UNIQUE INDEX IF NOT EXISTS milestone_suggestions_pending ON milestone_suggestions(kind,ref) WHERE state='pending'");
|
|
645
|
+
this.db.run(`CREATE TABLE IF NOT EXISTS milestone_imports (
|
|
646
|
+
repo TEXT NOT NULL, number INTEGER NOT NULL, milestone INTEGER NOT NULL, at INTEGER NOT NULL, PRIMARY KEY(repo,number))`);
|
|
647
|
+
|
|
626
648
|
this.db.run(`CREATE TABLE IF NOT EXISTS research_campaigns (
|
|
627
649
|
id TEXT NOT NULL, project TEXT NOT NULL, parent_task_id INTEGER NOT NULL, revision INTEGER NOT NULL,
|
|
628
650
|
status TEXT NOT NULL, body TEXT NOT NULL, body_sha256 TEXT NOT NULL, private INTEGER NOT NULL,
|
|
@@ -2663,7 +2685,7 @@ export class Board {
|
|
|
2663
2685
|
|
|
2664
2686
|
/** The only way a task changes. Validates the move, records who did what, returns the new row. */
|
|
2665
2687
|
/** A `plan` in the patch replaces the old one whole: a new plan is the owner's current intent, not an addition. */
|
|
2666
|
-
update(id: number, by: PeerId, event: string, patch: Partial<Pick<Task, "state" | "owner" | "planner" | "reviewer" | "reserved" | "refs" | "plan" | "rejections" | "signals" | "sdlc" | "role" | "cancelled" | "codeSymbols">>, note?: string, extra: Pick<HistoryEntry, "invocation" | "plannerReason" | "planAuthor" | "selfReview" | "profile" | "sweep" | "reason" | "from" | "capacity" | "conductorManual" | "withheld" | "noWrites" | "reviewCost" | "reviewContext" | "reviewScope" | "evidenceOnly" | "reviewedHead" | "reviewFindings" | "unmetCriteria" | "deliverables" | "checkKey" | "missingKeys" | "claim" | "planObservation" | "planDeparture" | "planDepartureInvalidated" | "specReport" | "specRefBinding" | "resolvedReviewComments" | "securityPass" | keyof ReviewerHistory> = {}, expectedFlowRevision?: number, codeSymbolsAuthority?: typeof HOST_CODE_SYMBOLS, adoptionAuthority?: typeof HOST_MERGE_ADOPTION): Task {
|
|
2688
|
+
update(id: number, by: PeerId, event: string, patch: Partial<Pick<Task, "state" | "owner" | "planner" | "reviewer" | "reserved" | "refs" | "plan" | "rejections" | "signals" | "sdlc" | "role" | "cancelled" | "codeSymbols">>, note?: string, extra: Pick<HistoryEntry, "invocation" | "plannerReason" | "planAuthor" | "selfReview" | "profile" | "sweep" | "wait" | "reason" | "from" | "capacity" | "conductorManual" | "withheld" | "noWrites" | "reviewCost" | "reviewContext" | "reviewScope" | "evidenceOnly" | "reviewedHead" | "reviewFindings" | "unmetCriteria" | "deliverables" | "checkKey" | "missingKeys" | "claim" | "planObservation" | "planDeparture" | "planDepartureInvalidated" | "specReport" | "specRefBinding" | "resolvedReviewComments" | "securityPass" | keyof ReviewerHistory> = {}, expectedFlowRevision?: number, codeSymbolsAuthority?: typeof HOST_CODE_SYMBOLS, adoptionAuthority?: typeof HOST_MERGE_ADOPTION): Task {
|
|
2667
2689
|
if (extra.resolvedReviewComments?.length && !this.db.inTransaction) return this.atomic(() => this.update(id, by, event, patch, note, extra, expectedFlowRevision, codeSymbolsAuthority, adoptionAuthority));
|
|
2668
2690
|
const task = this.get(id);
|
|
2669
2691
|
if (!task) throw new Error(`no task #${id}`);
|
|
@@ -2761,7 +2783,7 @@ export class Board {
|
|
|
2761
2783
|
&& priorHead !== undefined && /^[a-f0-9]{40}$/.test(priorHead);
|
|
2762
2784
|
const previousHistory = backfill ? task.history.map((entry, index) => index === priorApproval && !entry.reviewedHead
|
|
2763
2785
|
? { ...entry, reviewedHead: entry.reviewFindings?.head ?? priorHead } : entry) : task.history;
|
|
2764
|
-
const history = [...previousHistory, { at: Date.now(), by, event, ...(resolvedReviewComments?.length ? { resolvedReviewComments } : {}), ...(returnPlanning ? { planning: returnPlanning } : {}), ...(extra.invocation ? { invocation: extra.invocation } : {}), ...plannerHistory, ...authorHistory, ...(extra.selfReview === true ? { selfReview: true as const } : {}), ...(planRevision ? { planRevision } : {}), ...(extra.planObservation ? { planObservation: extra.planObservation } : {}), ...(extra.planDeparture ? { planDeparture: extra.planDeparture } : {}), ...(departureInvalidated ? { planDepartureInvalidated: true as const } : {}), ...reviewMetadata, ...specMetadata, ...(note ? { note } : {}), ...(patch.cancelled?.supersededBy ? { supersededBy: patch.cancelled.supersededBy } : {}), ...("owner" in patch ? { owner: next.owner } : {}), ...(extra.profile ? { profile: extra.profile } : {}), ...(extra.sweep ? { sweep: extra.sweep } : {}), ...(extra.reason && TASK_MOVE_REASONS.includes(extra.reason) ? { reason: extra.reason } : {}), ...(extra.from ? { from: extra.from } : {}), ...(extra.capacity === true ? { capacity: true as const } : {}), ...(extra.conductorManual === true ? { conductorManual: true as const } : {}), ...(extra.withheld && (note || reviewFindings) ? { withheld: true as const } : {}), ...(reviewFindings ? { reviewFindings } : {}), ...(extra.reviewedHead ? { reviewedHead: extra.reviewedHead } : {}), ...(unmetCriteria?.length ? { unmetCriteria } : {}), ...(securityPass ? { securityPass } : {}), ...(deliverables ? { deliverables } : {}), ...(extra.reviewContext === "fresh" || extra.reviewContext === "continuing" ? { reviewContext: extra.reviewContext } : {}), ...(extra.reviewScope === "code" ? { reviewScope: "code" as const } : {}), ...(extra.evidenceOnly === true && event === "changes_requested" ? { evidenceOnly: true as const } : {}), ...(extra.reviewCost ? { reviewCost: extra.reviewCost } : {}), ...(event === "done" && extra.noWrites === true ? { noWrites: true as const } : {}), ...(["check passed", "check failed"].includes(event) && typeof extra.checkKey === "string" && /^[a-z][a-z0-9_]{0,47}$/.test(extra.checkKey) ? { checkKey: extra.checkKey } : {}), ...(["check passed", "check failed"].includes(event) && Number.isSafeInteger(extra.missingKeys) && extra.missingKeys! >= 0 && extra.missingKeys! <= 100_000 ? { missingKeys: extra.missingKeys } : {}), ...(event === "claim verdict" && extra.claim ? { claim: extra.claim } : {}) }];
|
|
2786
|
+
const history = [...previousHistory, { at: Date.now(), by, event, ...(resolvedReviewComments?.length ? { resolvedReviewComments } : {}), ...(returnPlanning ? { planning: returnPlanning } : {}), ...(extra.invocation ? { invocation: extra.invocation } : {}), ...plannerHistory, ...authorHistory, ...(extra.selfReview === true ? { selfReview: true as const } : {}), ...(planRevision ? { planRevision } : {}), ...(extra.planObservation ? { planObservation: extra.planObservation } : {}), ...(extra.planDeparture ? { planDeparture: extra.planDeparture } : {}), ...(departureInvalidated ? { planDepartureInvalidated: true as const } : {}), ...reviewMetadata, ...specMetadata, ...(note ? { note } : {}), ...(patch.cancelled?.supersededBy ? { supersededBy: patch.cancelled.supersededBy } : {}), ...("owner" in patch ? { owner: next.owner } : {}), ...(extra.profile ? { profile: extra.profile } : {}), ...(extra.sweep ? { sweep: extra.sweep } : {}), ...(event === "wait recorded" && extra.wait && Number.isSafeInteger(extra.wait.until) && extra.wait.until > 0 ? { wait: { until: extra.wait.until, owner: extra.wait.owner } } : {}), ...(extra.reason && TASK_MOVE_REASONS.includes(extra.reason) ? { reason: extra.reason } : {}), ...(extra.from ? { from: extra.from } : {}), ...(extra.capacity === true ? { capacity: true as const } : {}), ...(extra.conductorManual === true ? { conductorManual: true as const } : {}), ...(extra.withheld && (note || reviewFindings) ? { withheld: true as const } : {}), ...(reviewFindings ? { reviewFindings } : {}), ...(extra.reviewedHead ? { reviewedHead: extra.reviewedHead } : {}), ...(unmetCriteria?.length ? { unmetCriteria } : {}), ...(securityPass ? { securityPass } : {}), ...(deliverables ? { deliverables } : {}), ...(extra.reviewContext === "fresh" || extra.reviewContext === "continuing" ? { reviewContext: extra.reviewContext } : {}), ...(extra.reviewScope === "code" ? { reviewScope: "code" as const } : {}), ...(extra.evidenceOnly === true && event === "changes_requested" ? { evidenceOnly: true as const } : {}), ...(extra.reviewCost ? { reviewCost: extra.reviewCost } : {}), ...(event === "done" && extra.noWrites === true ? { noWrites: true as const } : {}), ...(["check passed", "check failed"].includes(event) && typeof extra.checkKey === "string" && /^[a-z][a-z0-9_]{0,47}$/.test(extra.checkKey) ? { checkKey: extra.checkKey } : {}), ...(["check passed", "check failed"].includes(event) && Number.isSafeInteger(extra.missingKeys) && extra.missingKeys! >= 0 && extra.missingKeys! <= 100_000 ? { missingKeys: extra.missingKeys } : {}), ...(event === "claim verdict" && extra.claim ? { claim: extra.claim } : {}) }];
|
|
2765
2787
|
this.taskWrite(() => {
|
|
2766
2788
|
if (resolvedReviewComments?.length) for (const record of this.reviewComments(task.id, task.created)) {
|
|
2767
2789
|
if (!resolvedReviewComments.includes(record.thread.id) || record.lifecycle !== "sent") continue;
|
|
@@ -2904,6 +2926,169 @@ export class Board {
|
|
|
2904
2926
|
});
|
|
2905
2927
|
}
|
|
2906
2928
|
|
|
2929
|
+
/** Raw roadmap storage. Every external writer is admitted by Tasks. */
|
|
2930
|
+
newMilestone(input: MilestoneInput, by: string, now = Date.now()): Milestone {
|
|
2931
|
+
const value = parseMilestoneInput(input), actor = milestoneActor(by), at = milestoneId(now);
|
|
2932
|
+
return this.db.transaction(() => {
|
|
2933
|
+
this.milestoneParent(undefined, value.parent);
|
|
2934
|
+
const history = milestoneHistory([{ at, by: actor, event: "created" }]);
|
|
2935
|
+
const inserted = this.db.query("INSERT INTO milestones(title,outcome,state,horizon,milestone_order,target,parent,history,created,updated) VALUES(?,?,?,?,?,?,?,?,?,?)")
|
|
2936
|
+
.run(value.title, value.outcome, value.state, value.horizon, value.order, value.target, value.parent, JSON.stringify(history), at, at);
|
|
2937
|
+
return this.milestone(Number(inserted.lastInsertRowid))!;
|
|
2938
|
+
})();
|
|
2939
|
+
}
|
|
2940
|
+
|
|
2941
|
+
milestone(id: number): Milestone | undefined {
|
|
2942
|
+
milestoneId(id);
|
|
2943
|
+
const row = this.db.query("SELECT * FROM milestones WHERE id=?").get(id) as Record<string, unknown> | null;
|
|
2944
|
+
return row ? parseMilestone(row) : undefined;
|
|
2945
|
+
}
|
|
2946
|
+
|
|
2947
|
+
milestones(): Milestone[] {
|
|
2948
|
+
return (this.db.query("SELECT * FROM milestones ORDER BY milestone_order,id").all() as Record<string, unknown>[]).map(parseMilestone);
|
|
2949
|
+
}
|
|
2950
|
+
|
|
2951
|
+
milestoneLinks(id?: number): MilestoneLink[] {
|
|
2952
|
+
if (id !== undefined) milestoneId(id);
|
|
2953
|
+
const rows = (id === undefined
|
|
2954
|
+
? this.db.query("SELECT * FROM milestone_links ORDER BY milestone,kind,ref").all()
|
|
2955
|
+
: this.db.query("SELECT * FROM milestone_links WHERE milestone=? ORDER BY kind,ref").all(id)) as Record<string, unknown>[];
|
|
2956
|
+
return rows.map(row => ({ milestone: milestoneId(row.milestone), kind: row.kind as MilestoneLinkKind,
|
|
2957
|
+
ref: milestoneLinkRef(row.kind as MilestoneLinkKind, row.ref), by: milestoneActor(row.by), at: milestoneId(row.at) }));
|
|
2958
|
+
}
|
|
2959
|
+
|
|
2960
|
+
hasMilestoneState(): boolean {
|
|
2961
|
+
const row = this.db.query("SELECT EXISTS(SELECT 1 FROM milestones) OR EXISTS(SELECT 1 FROM milestone_links) AS present").get() as { present: number };
|
|
2962
|
+
return row.present === 1;
|
|
2963
|
+
}
|
|
2964
|
+
|
|
2965
|
+
roadmapIntegrity(): { milestones: number; links: number; digest: string } {
|
|
2966
|
+
return this.db.transaction(() => {
|
|
2967
|
+
const milestones = this.milestones().sort((a, b) => a.id - b.id), links = this.milestoneLinks();
|
|
2968
|
+
return { milestones: milestones.length, links: links.length, digest: createHash("sha256").update(JSON.stringify({ milestones, links })).digest("hex") };
|
|
2969
|
+
})();
|
|
2970
|
+
}
|
|
2971
|
+
|
|
2972
|
+
/** Parent shape and compare-and-set are checked under the same write transaction. */
|
|
2973
|
+
updateMilestone(id: number, patch: MilestonePatch, revision: number, event: MilestoneHistoryEntry): Milestone {
|
|
2974
|
+
const fields = parseMilestonePatch(patch), entry = milestoneHistory([event])[0]!;
|
|
2975
|
+
return this.db.transaction(() => this.writeMilestone(id, fields, revision, entry))();
|
|
2976
|
+
}
|
|
2977
|
+
|
|
2978
|
+
linkMilestone(id: number, kind: MilestoneLinkKind, ref: string, by: string, revision: number, now = Date.now()): Milestone {
|
|
2979
|
+
const key = milestoneLinkRef(kind, ref), actor = milestoneActor(by), at = milestoneId(now);
|
|
2980
|
+
return this.db.transaction(() => {
|
|
2981
|
+
const before = this.currentMilestone(id, revision);
|
|
2982
|
+
if (this.db.query("SELECT 1 FROM milestone_links WHERE milestone=? AND kind=? AND ref=?").get(id, kind, key)) return before;
|
|
2983
|
+
const updated = this.writeMilestone(id, {}, revision, { at, by: actor, event: "linked", kind });
|
|
2984
|
+
this.db.query("INSERT INTO milestone_links(milestone,kind,ref,by,at) VALUES(?,?,?,?,?)").run(id, kind, key, actor, at);
|
|
2985
|
+
return updated;
|
|
2986
|
+
})();
|
|
2987
|
+
}
|
|
2988
|
+
|
|
2989
|
+
unlinkMilestone(id: number, kind: MilestoneLinkKind, ref: string, by: string, revision: number, now = Date.now()): Milestone {
|
|
2990
|
+
const key = milestoneLinkRef(kind, ref), actor = milestoneActor(by), at = milestoneId(now);
|
|
2991
|
+
return this.db.transaction(() => {
|
|
2992
|
+
const before = this.currentMilestone(id, revision);
|
|
2993
|
+
if (!this.db.query("SELECT 1 FROM milestone_links WHERE milestone=? AND kind=? AND ref=?").get(id, kind, key)) return before;
|
|
2994
|
+
const updated = this.writeMilestone(id, {}, revision, { at, by: actor, event: "unlinked", kind });
|
|
2995
|
+
this.db.query("DELETE FROM milestone_links WHERE milestone=? AND kind=? AND ref=?").run(id, kind, key);
|
|
2996
|
+
return updated;
|
|
2997
|
+
})();
|
|
2998
|
+
}
|
|
2999
|
+
|
|
3000
|
+
/** R3: a pending model suggestion. One per item at a time; a repeat for the same item is ignored, never doubled. */
|
|
3001
|
+
addSuggestion(row: { kind: SuggestionItemKind; ref: string; milestone: number | null; proposal: { title: string; outcome: string } | null; citeMilestone: string | null; citeItem: string }, by: string, now = Date.now()): MilestoneSuggestion | undefined {
|
|
3002
|
+
const actor = milestoneActor(by), at = milestoneId(now);
|
|
3003
|
+
return this.db.transaction(() => {
|
|
3004
|
+
if (this.db.query("SELECT 1 FROM milestone_suggestions WHERE kind=? AND ref=? AND state='pending'").get(row.kind, row.ref)) return undefined;
|
|
3005
|
+
const inserted = this.db.query("INSERT INTO milestone_suggestions(kind,ref,milestone,proposal,cite_milestone,cite_item,state,by,created) VALUES(?,?,?,?,?,?,'pending',?,?)")
|
|
3006
|
+
.run(row.kind, row.ref, row.milestone, row.proposal ? JSON.stringify(row.proposal) : null, row.citeMilestone, row.citeItem, actor, at);
|
|
3007
|
+
// Settled rows are history, not storage: keep the newest 500.
|
|
3008
|
+
this.db.query("DELETE FROM milestone_suggestions WHERE state<>'pending' AND id NOT IN (SELECT id FROM milestone_suggestions WHERE state<>'pending' ORDER BY id DESC LIMIT 500)").run();
|
|
3009
|
+
return this.suggestion(Number(inserted.lastInsertRowid))!;
|
|
3010
|
+
})();
|
|
3011
|
+
}
|
|
3012
|
+
|
|
3013
|
+
suggestion(id: number): MilestoneSuggestion | undefined {
|
|
3014
|
+
milestoneId(id);
|
|
3015
|
+
const row = this.db.query("SELECT * FROM milestone_suggestions WHERE id=?").get(id) as Record<string, unknown> | null;
|
|
3016
|
+
return row ? parseSuggestion(row) : undefined;
|
|
3017
|
+
}
|
|
3018
|
+
|
|
3019
|
+
suggestions(state?: SuggestionState): MilestoneSuggestion[] {
|
|
3020
|
+
const rows = (state === undefined ? this.db.query("SELECT * FROM milestone_suggestions ORDER BY id").all() : this.db.query("SELECT * FROM milestone_suggestions WHERE state=? ORDER BY id").all(state)) as Record<string, unknown>[];
|
|
3021
|
+
return rows.map(parseSuggestion);
|
|
3022
|
+
}
|
|
3023
|
+
|
|
3024
|
+
/** Remember the milestone an accepted "new milestone" suggestion created, so a retry after a failed link never creates a second one. */
|
|
3025
|
+
suggestionCreated(id: number): number | undefined {
|
|
3026
|
+
const row = this.db.query("SELECT created_milestone AS made FROM milestone_suggestions WHERE id=?").get(milestoneId(id)) as { made: number | null } | null;
|
|
3027
|
+
return row?.made ?? undefined;
|
|
3028
|
+
}
|
|
3029
|
+
|
|
3030
|
+
setSuggestionCreated(id: number, milestone: number): void {
|
|
3031
|
+
this.db.query("UPDATE milestone_suggestions SET created_milestone=? WHERE id=? AND state='pending' AND created_milestone IS NULL").run(milestoneId(milestone), milestoneId(id));
|
|
3032
|
+
}
|
|
3033
|
+
|
|
3034
|
+
/** Compare-and-set from pending: a second settle of the same suggestion changes nothing. */
|
|
3035
|
+
settleSuggestion(id: number, state: "accepted" | "rejected" | "superseded", by: string, now = Date.now()): MilestoneSuggestion {
|
|
3036
|
+
const actor = milestoneActor(by), at = milestoneId(now);
|
|
3037
|
+
return this.db.transaction(() => {
|
|
3038
|
+
const result = this.db.query("UPDATE milestone_suggestions SET state=?,settled=?,settled_by=? WHERE id=? AND state='pending'").run(state, at, actor, milestoneId(id));
|
|
3039
|
+
const row = this.suggestion(id);
|
|
3040
|
+
if (!row) throw new PreEffectToolRefusal("roadmap suggestion does not exist; use ahub roadmap triage");
|
|
3041
|
+
if (result.changes !== 1 && row.state !== state) throw new PreEffectToolRefusal(`roadmap suggestion was already ${row.state}; run ahub roadmap triage for current suggestions`);
|
|
3042
|
+
return row;
|
|
3043
|
+
})();
|
|
3044
|
+
}
|
|
3045
|
+
|
|
3046
|
+
importedMilestone(repo: string, number: number): number | undefined {
|
|
3047
|
+
const row = this.db.query("SELECT milestone FROM milestone_imports WHERE repo=? AND number=?").get(repo.toLowerCase(), milestoneId(number)) as { milestone: number } | null;
|
|
3048
|
+
return row?.milestone;
|
|
3049
|
+
}
|
|
3050
|
+
|
|
3051
|
+
/** One transaction: the milestone and its import mark exist together or not at all, so a repeat finds the mark. */
|
|
3052
|
+
importMilestone(repo: string, number: number, input: MilestoneInput, by: string, now = Date.now()): { milestone: Milestone; created: boolean } {
|
|
3053
|
+
const key = repo.toLowerCase();
|
|
3054
|
+
return this.db.transaction(() => {
|
|
3055
|
+
const prior = this.importedMilestone(key, number);
|
|
3056
|
+
const existing = prior === undefined ? undefined : this.milestone(prior);
|
|
3057
|
+
if (existing) return { milestone: existing, created: false };
|
|
3058
|
+
const milestone = this.newMilestone(input, by, now);
|
|
3059
|
+
this.db.query("INSERT OR REPLACE INTO milestone_imports(repo,number,milestone,at) VALUES(?,?,?,?)").run(key, milestoneId(number), milestone.id, milestoneId(now));
|
|
3060
|
+
return { milestone, created: true };
|
|
3061
|
+
})();
|
|
3062
|
+
}
|
|
3063
|
+
|
|
3064
|
+
private currentMilestone(id: number, revision: number): Milestone {
|
|
3065
|
+
milestoneRevision(revision);
|
|
3066
|
+
const row = this.milestone(id);
|
|
3067
|
+
if (!row || row.revision !== revision) throw new PreEffectToolRefusal("roadmap revision changed; reload ahub roadmap show before retrying");
|
|
3068
|
+
return row;
|
|
3069
|
+
}
|
|
3070
|
+
|
|
3071
|
+
private milestoneParent(id: number | undefined, parent: number | null): void {
|
|
3072
|
+
if (parent === null) return;
|
|
3073
|
+
if (parent === id) throw new PreEffectToolRefusal("roadmap milestone cannot parent itself; choose another parent with ahub roadmap edit");
|
|
3074
|
+
const ancestor = this.milestone(parent);
|
|
3075
|
+
if (!ancestor || ancestor.parent !== null) throw new PreEffectToolRefusal("roadmap parent must exist at the top level; inspect ahub roadmap list");
|
|
3076
|
+
if (id !== undefined && this.db.query("SELECT 1 FROM milestones WHERE parent=? LIMIT 1").get(id)) throw new PreEffectToolRefusal("roadmap nesting is limited to one level; move child milestones first");
|
|
3077
|
+
}
|
|
3078
|
+
|
|
3079
|
+
private writeMilestone(id: number, patch: MilestonePatch, revision: number, event: MilestoneHistoryEntry): Milestone {
|
|
3080
|
+
const current = this.currentMilestone(id, revision), next = { ...current, ...patch };
|
|
3081
|
+
this.milestoneParent(id, next.parent);
|
|
3082
|
+
const settling = current.state !== next.state && (next.state === "done" || next.state === "dropped");
|
|
3083
|
+
if (current.history.length >= MILESTONE_HISTORY_LIMIT - 1 && !settling)
|
|
3084
|
+
throw new PreEffectToolRefusal(`roadmap history reserves its last slot for settlement; ask the person to run ahub roadmap state ${id} done or ahub roadmap state ${id} dropped`);
|
|
3085
|
+
const history = milestoneHistory([...current.history, event]);
|
|
3086
|
+
const result = this.db.query("UPDATE milestones SET title=?,outcome=?,state=?,horizon=?,milestone_order=?,target=?,parent=?,history=?,updated=?,revision=revision+1 WHERE id=? AND revision=?")
|
|
3087
|
+
.run(next.title, next.outcome, next.state, next.horizon, next.order, next.target, next.parent, JSON.stringify(history), event.at, id, revision);
|
|
3088
|
+
if (result.changes !== 1) throw new PreEffectToolRefusal("roadmap revision changed; reload ahub roadmap show before retrying");
|
|
3089
|
+
return this.milestone(id)!;
|
|
3090
|
+
}
|
|
3091
|
+
|
|
2907
3092
|
newRelease(name: string, goal: string, order: number, planner?: PeerId | null): Release {
|
|
2908
3093
|
const now = Date.now(), selected = plannerValue(planner);
|
|
2909
3094
|
const result = this.db.query("INSERT INTO releases(name,goal,release_order,created,updated,planner) VALUES(?,?,?,?,?,?)").run(name, goal, order, now, now, selected);
|
|
@@ -3034,6 +3219,18 @@ function parse(row: Record<string, unknown>): Task {
|
|
|
3034
3219
|
return out as unknown as Task;
|
|
3035
3220
|
}
|
|
3036
3221
|
|
|
3222
|
+
function parseMilestone(row: Record<string, unknown>): Milestone {
|
|
3223
|
+
return { ...parseMilestoneInput({ title: row.title, outcome: row.outcome, state: row.state, horizon: row.horizon, order: row.milestone_order, target: row.target, parent: row.parent }),
|
|
3224
|
+
id: milestoneId(row.id), revision: milestoneRevision(row.revision), history: milestoneHistory(JSON.parse(String(row.history))), created: milestoneId(row.created), updated: milestoneId(row.updated) };
|
|
3225
|
+
}
|
|
3226
|
+
|
|
3227
|
+
function parseSuggestion(row: Record<string, unknown>): MilestoneSuggestion {
|
|
3228
|
+
return { id: milestoneId(row.id), kind: row.kind as SuggestionItemKind, ref: String(row.ref), milestone: row.milestone == null ? null : milestoneId(row.milestone),
|
|
3229
|
+
proposal: row.proposal == null ? null : JSON.parse(String(row.proposal)) as { title: string; outcome: string }, citeMilestone: row.cite_milestone == null ? null : String(row.cite_milestone),
|
|
3230
|
+
citeItem: String(row.cite_item), state: row.state as SuggestionState, by: milestoneActor(row.by), created: milestoneId(row.created),
|
|
3231
|
+
settled: row.settled == null ? null : milestoneId(row.settled), settledBy: row.settled_by == null ? null : milestoneActor(row.settled_by) };
|
|
3232
|
+
}
|
|
3233
|
+
|
|
3037
3234
|
function parseRelease(row: Record<string, unknown>): Release {
|
|
3038
3235
|
return { ...(row.train == null ? {} : { train: JSON.parse(String(row.train)) }), planner: row.planner == null ? null : String(row.planner), id: Number(row.id), name: String(row.name), goal: String(row.goal), order: Number(row.release_order), state: row.state as ReleaseState,
|
|
3039
3236
|
plannedStart: row.planned_start as number | null, cut: row.cut as number | null, ship: row.ship as number | null,
|
package/src/hub/bus.ts
CHANGED
|
@@ -2049,6 +2049,15 @@ export class Bus {
|
|
|
2049
2049
|
const condensed = mayCondense ? await this.opts.condense!(delivery).catch(() => delivery) : delivery;
|
|
2050
2050
|
out = this.retryOut(id, delivery, condensed);
|
|
2051
2051
|
} finally { this.condensing -= mayCondense ? 1 : 0; }
|
|
2052
|
+
// #1447: the batch is still preparation, not a started native turn. Urgent work
|
|
2053
|
+
// queued during condensation must participate in the next take, ahead of chat.
|
|
2054
|
+
if (mayCondense && queue.some(env => env.priority === "important")) {
|
|
2055
|
+
if (!this.journal) {
|
|
2056
|
+
if (preface) this.restorePreface(id, preface);
|
|
2057
|
+
queue.unshift(...batch.filter(env => !this.withdrawn.has(env.id)));
|
|
2058
|
+
}
|
|
2059
|
+
continue;
|
|
2060
|
+
}
|
|
2052
2061
|
// A session that cannot show pushes may have taken the peer while this was condensed (issue #205).
|
|
2053
2062
|
if (!this.deliverable(id)) {
|
|
2054
2063
|
if (!this.journal) { if (preface) this.restorePreface(id, preface); queue.unshift(...batch.filter((e) => !this.withdrawn.has(e.id))); }
|
package/src/hub/check-runner.ts
CHANGED
|
@@ -8,10 +8,11 @@ import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
|
8
8
|
import { hubGitEnv, hubGitSync } from "./git.ts";
|
|
9
9
|
import { stopOwnedProcess, trackGroup } from "./child-process.ts";
|
|
10
10
|
import { hostExecutable } from "./host-executable.ts";
|
|
11
|
+
import { installScriptsRefused } from "./install-policy.ts";
|
|
11
12
|
import { PreEffectToolRefusal } from "./tool-refusal.ts";
|
|
12
13
|
import { processLiveness, processSignature } from "../pi/process-signature.ts";
|
|
13
14
|
|
|
14
|
-
export const CHECK_IMAGE = "oven/bun:1.4.
|
|
15
|
+
export const CHECK_IMAGE = "oven/bun:1.4.4@sha256:1d22548f177f4ff38e0c15baa3c2c46c6c2060ba2d1bc573bb4720b407548f1d";
|
|
15
16
|
const NETWORK = "agenthub-check";
|
|
16
17
|
const DAY = 86_400_000;
|
|
17
18
|
const MAX_OUTPUT = 1_048_576;
|
|
@@ -661,8 +662,6 @@ export function dependencyKey(parts: { lockfile: string; manifest: string; bun:
|
|
|
661
662
|
}
|
|
662
663
|
/** Files besides bun.lock that decide what `bun install --frozen-lockfile` produces: manifests, Bun and registry config, patches. */
|
|
663
664
|
const INSTALL_INPUT = /(?:^|\/)(?:package\.json|bunfig\.toml|\.npmrc)$|^patches\//;
|
|
664
|
-
/** Scripts bun runs during the root or a workspace install. They can read tracked source, so no manifest hash can bind their output. */
|
|
665
|
-
const INSTALL_LIFECYCLE = ["preinstall", "install", "postinstall", "prepublish", "preprepare", "prepare", "postprepare"];
|
|
666
665
|
/** Hash of every install-affecting file in the staged source, by path and content, so a changed manifest or config never reuses a volume. */
|
|
667
666
|
export async function dependencyManifest(source: string): Promise<string> {
|
|
668
667
|
const files: string[] = [];
|
|
@@ -684,7 +683,7 @@ export async function dependencyManifest(source: string): Promise<string> {
|
|
|
684
683
|
let manifest: unknown;
|
|
685
684
|
try { manifest = JSON.parse(data.toString("utf8")); } catch { throw new RemoteDependencyError(); }
|
|
686
685
|
const scripts = manifest && typeof manifest === "object" ? (manifest as { scripts?: unknown }).scripts : undefined;
|
|
687
|
-
if (
|
|
686
|
+
if (installScriptsRefused(scripts)) throw new RemoteDependencyError();
|
|
688
687
|
}
|
|
689
688
|
digest.update(`${path}\0${hash(data)}\0`);
|
|
690
689
|
}
|
package/src/hub/ci-watch.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { requiredCheckNames, parsePrEvidence, type SdlcGh } from "./sdlc.ts";
|
|
1
|
+
import { latestCheckRuns, requiredCheckNames, parsePrEvidence, type SdlcGh } from "./sdlc.ts";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* #785 P1b: one bounded watcher per exact PR head. It starts when `hub_task_done` names a head whose CI was not green,
|
|
@@ -20,19 +20,34 @@ export interface CiWatch { id: number; head: string; repo: string; pr: number; d
|
|
|
20
20
|
/** `reported`: a result was told, so a deadline ends silently. `renew`: the next pending read may renew the deadline once (set by each new told result). */
|
|
21
21
|
type Entry = { watch: CiWatch; timer?: ReturnType<typeof setTimeout>; reported?: boolean; renew?: boolean };
|
|
22
22
|
|
|
23
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* #1490: the required check a draft PR defers. Its aggregate fails with "macOS deferred" until `gh pr ready` (check.yml), which is not a CI failure of the head.
|
|
25
|
+
* ponytail: the name is this repository's own (`requiredCheckNames`); a project with another deferral names it here, or reads it from its workflow.
|
|
26
|
+
*/
|
|
27
|
+
const DEFERRED_ON_DRAFT: readonly string[] = ["check (macos-latest)"];
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* One read of the PR: the head, its state and the required checks of that head. A failed or unreadable read is `pending`; the deadline bounds the retries.
|
|
31
|
+
* #1490: a cancelled check (a superseded run, or the draft run that `gh pr ready` replaces) and a draft PR's deferred macOS check are `pending`, never `failed`: nobody has to fix them.
|
|
32
|
+
* A cancelled run of an older head never gets here (the head differs: `superseded`).
|
|
33
|
+
*/
|
|
24
34
|
export async function pollCi(target: { repo: string; pr: number }, head: string, required: readonly string[], run: SdlcGh): Promise<CiPoll> {
|
|
25
35
|
if (!REPO.test(target.repo) || !Number.isSafeInteger(target.pr) || target.pr < 1) return "closed";
|
|
26
36
|
const names = requiredCheckNames(target.repo, required);
|
|
27
37
|
if (!names.length) return "incomplete";
|
|
28
38
|
try {
|
|
29
|
-
const view = await run(["pr", "view", String(target.pr), "--repo", target.repo, "--json", "headRefOid,state,statusCheckRollup"], 10_000, undefined, 512 * 1024);
|
|
39
|
+
const view = await run(["pr", "view", String(target.pr), "--repo", target.repo, "--json", "headRefOid,state,statusCheckRollup,isDraft"], 10_000, undefined, 512 * 1024);
|
|
30
40
|
if (view.code !== 0) return "pending";
|
|
31
41
|
const body = JSON.parse(view.stdout);
|
|
32
42
|
if (body?.headRefOid !== head) return "superseded";
|
|
33
43
|
if (body.state !== "OPEN") return "closed";
|
|
44
|
+
const draft = body.isDraft === true;
|
|
45
|
+
const rollup = Array.isArray(body.statusCheckRollup) ? latestCheckRuns(body.statusCheckRollup as Record<string, unknown>[]).map((check: Record<string, unknown>) => {
|
|
46
|
+
const native = String(check?.conclusion ?? check?.state ?? "");
|
|
47
|
+
return native === "CANCELLED" || draft && DEFERRED_ON_DRAFT.includes(String(check?.name ?? check?.context)) && native !== "SUCCESS" ? { ...check, status: "PENDING" } : check;
|
|
48
|
+
}) : body.statusCheckRollup;
|
|
34
49
|
// The same check-state mapping as every other PR read; files are not requested here.
|
|
35
|
-
const evidence = parsePrEvidence({ ...body, files: [], changedFiles: 0 });
|
|
50
|
+
const evidence = parsePrEvidence({ ...body, statusCheckRollup: rollup, files: [], changedFiles: 0 });
|
|
36
51
|
const rows = names.map(name => evidence.checks.filter(check => check.name === name));
|
|
37
52
|
if (rows.some(row => row.some(check => check.state === "failed"))) return "failed";
|
|
38
53
|
if (rows.some(row => row.length === 0 || row.some(check => check.state === "pending"))) return "pending";
|
|
@@ -22,7 +22,7 @@ export const PROTOCOL = 17;
|
|
|
22
22
|
/** The descriptor's legacy protocol field remains this floor for previous published clients. */
|
|
23
23
|
export const PROTOCOL_MIN = 16;
|
|
24
24
|
// Literal metadata is read without executing a recovery target; consistency is pinned in tests.
|
|
25
|
-
export const DAEMON_FEATURES = ["guidance_views", "guidance_variants", "guidance_probes", "guidance_probe_receipts", "execution_lineage", "model_overrides", "visuals", "project_autonomy", "conductor_recovery", "encrypted_rooms", "external_adapter_instances", "external_adapter_modules", "configured_acp", "native_hook_launch", "task_cancel", "invocation", "recovery_deferred_hub", "peer_instances", "role_stages", "task_planners", "release_trains", "reviewer_pool", "reviewer_quota", "native_tui_launch", "terminal_owner", "cli_audit_delegated", "action_policy_floor", "calendar_schedules", "research_records", "research_dispatch", "research_dropped_offers", "research_experiments", "research_comparisons", "research_runners", "task_handoff", "session_identity", "schema_guard", "design_specs", "queue_discard_states", "tool_write_idempotency", "research_evidence", "research_synthesis", "research_evidence_withdrawal", "advisor_surveys", "review_comments", "questions", "accepted_delivery_settlement", "completions", "review_observer_input_state", "task_handoff_key", "task_handoff_seq", "peer_takeover"] as const;
|
|
25
|
+
export const DAEMON_FEATURES = ["roadmap", "guidance_views", "guidance_variants", "guidance_probes", "guidance_probe_receipts", "execution_lineage", "model_overrides", "visuals", "project_autonomy", "conductor_recovery", "encrypted_rooms", "external_adapter_instances", "external_adapter_modules", "configured_acp", "native_hook_launch", "task_cancel", "invocation", "recovery_deferred_hub", "peer_instances", "role_stages", "task_planners", "release_trains", "reviewer_pool", "reviewer_quota", "native_tui_launch", "terminal_owner", "cli_audit_delegated", "action_policy_floor", "calendar_schedules", "research_records", "research_dispatch", "research_dropped_offers", "research_experiments", "research_comparisons", "research_runners", "task_handoff", "session_identity", "schema_guard", "design_specs", "queue_discard_states", "tool_write_idempotency", "research_evidence", "research_synthesis", "research_evidence_withdrawal", "advisor_surveys", "review_comments", "questions", "accepted_delivery_settlement", "completions", "review_observer_input_state", "task_handoff_key", "task_handoff_seq", "peer_takeover"] as const;
|
|
26
26
|
/** Protocols a current coordinator may authenticate while upgrading a running source. */
|
|
27
27
|
export const RECOVERY_SOURCE_PROTOCOLS = [9, 10, 11, 12, 13, 14, 15, 16, PROTOCOL] as const;
|
|
28
28
|
|