import type { BaselineCatalog } from "../baseline-evidence/catalog.js"; import { type BaselineEvidencePipelineDeps } from "../baseline-evidence/pipeline.js"; import { type PlanResult } from "../internals/execute.js"; import { type PlanContext } from "../internals/plan.js"; import type { OrgPolicy } from "../org-policy/schema.js"; import { type TrustSource } from "../trust/fetch.js"; import { type EccMaterializationTarget } from "./materialization-target.js"; export interface GovernedEccMaterializationInput { catalog: BaselineCatalog; source: TrustSource; /** The parsed governed policy, already read through the product's own reader. */ policy: OrgPolicy; /** {@link governedEccComponentIds}, resolved by the caller BEFORE the source. */ componentIds: readonly string[]; /** * The requested governed targets, narrowed by * `assertGovernedMaterializationTargets` BEFORE the source is resolved — a * target this lifecycle refuses must create no quarantine. */ targets: readonly EccMaterializationTarget[]; } /** * The component ids the policy selected for this framework — the identity the * evidence gate verifies and the selection resolver matches on. An id the * catalog does not carry is refused here, by name: the alternative is a raw * catalog error that never mentions the policy the id came from. * * Also the provenance gate. Each item's `source.repository`/`source.commit` is * the POLICY'S CLAIM about where its bytes came from, and it flows verbatim into * the materialization receipt (`materialization-selection.ts:191-197`) — while * the bytes actually come from the catalog pin this run verifies against. When * those disagree the receipt would assert a provenance nothing checked, so the * run refuses and names both values. The authoring surface derives the claim * from this same catalog identity (`src/org-policy/catalog.ts:388-392`), so an * authored policy always agrees; a hand-edited one, a fork, or a stale pin * against an `AIH_ECC_REF` override is exactly what this catches. * * Exported so the caller can validate BEFORE resolving a source: source * resolution creates a quarantine directory, and a refusing invocation must * create nothing. */ export declare function governedEccComponentIds(policy: OrgPolicy, catalog: BaselineCatalog): string[]; /** * Run the governed framework lifecycle's install verb. The caller has already * proved the repository is governed and resolved the pinned source; this owns * the evidence run and the chain that follows it. */ export declare function executeGovernedEccMaterialization(ctx: PlanContext, input: GovernedEccMaterializationInput, deps?: BaselineEvidencePipelineDeps): Promise;