import type { PIArtifactSnapshot } from './activation-types.js'; import type { PromotionEvidenceSnapshot, OwnerPromotionActor } from './rulecode-owner-decision-service.js'; export interface PromotionEvidenceOwnerIdentity { principalKind: string; actorId: string; authenticationMethod: string; credentialId?: string | null; } export interface BuildPromotionEvidenceSnapshotInput { activationId?: string; evaluationId?: string; checks: { checkId: string; status: 'passed' | 'failed'; reasonCode?: string; }[]; artifact?: PIArtifactSnapshot; expectedArtifactDigest?: string; ownerIdentity?: PromotionEvidenceOwnerIdentity | OwnerPromotionActor | null; hostRuntimeVersion?: string; shadowSummary?: PromotionEvidenceSnapshot['shadowSummary']; lineageRefs?: string[]; configurationVersion?: string; now?: () => string; newSnapshotId?: () => string; } export declare function computeArtifactDigest(artifact: PIArtifactSnapshot): string; /** * Outcome of enforcement-time digest re-verification (security audit run-1, * rulecode-approval-content-unbound). * * - `verified` — the row's recomputed digest matches the approved digest. * - `tampered` — the row recomputed cleanly but diverges from the approved * digest: an integrity failure. Callers must skip the activation (and * surface a structured warning); they must NOT evaluate the content. * - `unverifiable` — the row is malformed (or the approved digest is not a * string) so no comparison was possible. Callers apply their own policy. * - `no_binding` — no activation-scoped decision exists for this activation * (pre-owner-decision legacy row): nothing to verify against; callers keep * their prior behavior. */ export type ArtifactDigestCheck = { outcome: 'verified'; } | { outcome: 'tampered'; actualDigest: string; } | { outcome: 'unverifiable'; error: string; } | { outcome: 'no_binding'; }; /** * Re-verify a pi_artifacts row (as freshly read from state.db, fields treated * as unknown per rc-1) against the digest the Owner decision recorded at * promotion time. THE single implementation of this check — the host-runtime * production gate and the OpenClaw plugin RuleHost both call this; do not * hand-roll a second copy (the mapping/ordering inside mapPiArtifactRow is * what makes the recomputed digest byte-identical to the promotion-time one). */ export declare function verifyPiArtifactRowDigest(row: Record, contentJson: string, approvedDigest: string | null): ArtifactDigestCheck; export declare function normalizeOwnerIdentity(actor?: PromotionEvidenceOwnerIdentity | OwnerPromotionActor | null): PromotionEvidenceOwnerIdentity | null; export declare function buildPromotionEvidenceSnapshot(input: BuildPromotionEvidenceSnapshotInput): PromotionEvidenceSnapshot; //# sourceMappingURL=promotion-evidence-snapshot.d.ts.map