import { type AssetKind } from "./asset-scanner.js"; import { type AgentMapping, type AgentTeamCaller } from "./agent-map.js"; /** * v1.3.2 §10.5 — adoption dry-run report. READ-ONLY: scans a registered repo * (§10.1 Discover), runs the matching validator on each asset * (validate-then-adopt, §10.6), and flags id collisions with the bundle * (§10.4 — adoption would namespace these). No writes; this is the "show what * would happen, then confirm" surface (Terraform plan / Claude "Will install"). * * Agent assets are inventoried + conflict-checked but NOT graph-validated here: * their team/tier mapping (§10.3) precedes graph validation, and that mapping * is a later pipeline stage. So agents report status "deferred". */ export type ItemStatus = "ok" | "warn" | "error" | "deferred"; export interface AdoptionItem { kind: AssetKind; id: string; path: string; status: ItemStatus; conflict: boolean; findings: { code: string; message: string; }[]; /** §10.3 — for agents only: the proposed team/tier mapping. */ mapping?: AgentMapping; } export interface AdoptionReport { repoRoot: string; items: AdoptionItem[]; counts: Record; errorCount: number; conflictCount: number; } /** §10 — optional scope overrides. Default resolution is the shipped bundle * (deterministic, cwd-independent); callers may inject a wider/narrower set * (e.g. bundle + the destination workspace's already-adopted actors). */ export interface AdoptionScopeOpts { /** Override the known-actor set used to resolve workflow `agent:` refs. */ knownAgents?: Set; /** Override the collision roster keyed by asset kind. */ bundledIds?: Record>; } export declare function buildAdoptionReport(repoRoot: string, opts?: AdoptionScopeOpts): AdoptionReport; /** * §10.3 — opt-in second pass: escalate the agents the heuristic left at * `default` (genuine ambiguity) to the injected LLM caller. Mutates the * report's agent items in place and returns it. Read-only otherwise; the * caller decides whether to consult a model (the dry-run never does). Agents * the heuristic already placed confidently are skipped, so the model is asked * at most once per unknown actor. */ export declare function refineAgentMappings(report: AdoptionReport, caller: AgentTeamCaller): Promise;