import type { AcceptanceTuple } from "../baseline-evidence/acceptance.js"; import type { BaselineCatalog } from "../baseline-evidence/catalog.js"; import type { ResolveOrgBaselineEvidenceResult, resolveOrgBaselineEvidence } from "../baseline-evidence/org.js"; import { type BaselineEvidencePipelineDeps } from "../baseline-evidence/pipeline.js"; import type { BaselineEvidenceLock } from "../baseline-evidence/schema.js"; import type { BaselineAuthorization, BaselineHeldComponent } from "../baseline-evidence/verify.js"; import { type EccProfileLifecycleCommandDeps } from "../ecc-profile/command.js"; import type { Cli } from "../internals/clis.js"; import { type PlanResult } from "../internals/execute.js"; import { type Plan, type PlanContext } from "../internals/plan.js"; import { type TrustSource } from "../trust/fetch.js"; import type { EccComponentSelection } from "./components.js"; import { type EccInstallPreviewArtifact } from "./install-preview.js"; import { type ProjectRegistration, type RegistrationLedger } from "./registration.js"; import { type VerifiedEccRequest } from "./verified.js"; /** * `verifiedEccInstallPlan`'s shape, plus the evidence records the gate held * back. Declared rather than derived so a builder that reports WHY a selected * component did not install — the governed materialization lifecycle — is * expressible without every existing four-parameter builder having to change. */ export type EccInstallPlanBuilder = (ctx: PlanContext, sourceRoot: string, request: VerifiedEccRequest, authorizations: readonly BaselineAuthorization[], held: readonly BaselineHeldComponent[]) => Plan | Promise; export interface EccEvidencePipelineDeps extends BaselineEvidencePipelineDeps { catalog?: BaselineCatalog; source?: TrustSource; /** When set, only accepted-with-conditions decisions for this exact tuple apply. */ acceptanceTuple?: AcceptanceTuple; vendorLock?: BaselineEvidenceLock; vendorLockSha256?: string; buildInstallPlan?: EccInstallPlanBuilder; resolveOrgEvidence?: (input: Parameters[0]) => Promise; installPreview?: EccInstallPreviewArtifact; } export interface EccCommandDeps extends EccEvidencePipelineDeps { executeProfileLifecycle?: (ctx: PlanContext, deps?: EccProfileLifecycleCommandDeps) => Promise; profileLifecycle?: EccProfileLifecycleCommandDeps; } export interface EccRegistrationRequest extends VerifiedEccRequest { selection: EccComponentSelection; project: ProjectRegistration; ledger: RegistrationLedger; /** Policy governance makes AIH the sole MCP/hook projector. */ governance?: true; } export declare function buildEccRegistrationRequest(ctx: PlanContext, clis: Cli[]): EccRegistrationRequest; /** * Acquire, authorize, re-hash, and only then construct ECC install actions. * The quarantine is removed after execution on every success/failure path. */ export declare function executeEccEvidencePipeline(ctx: PlanContext, request: VerifiedEccRequest, deps?: EccEvidencePipelineDeps): Promise; /** Resolve the ordinary ECC command inputs once, then route mutating targets through evidence. */ export declare function executeEccCommand(ctx: PlanContext, deps?: EccCommandDeps): Promise;