import type { SourceIdentity } from "./source-identity-types.js"; export declare const PROJECT_FINISH_ATTESTATION_SCHEMA: "project-finish-attestation.1"; export declare const PROJECT_FINISH_ATTESTATION_PREDICATE_TYPE: "https://github.com/jyt6640/persona-harness/attestations/project-finish-attestation.1"; export declare const PROJECT_FINISH_ATTESTATION_MAX_FRESHNESS_MS: number; export declare const PROJECT_FINISH_ATTESTATION_POLICY: { readonly catalogId: "persona-harness-project-gradle.1"; readonly event: "push"; readonly policyMarker: "project-finish-attestation-v1-public-push-main"; readonly producerRepository: "jyt6640/persona-harness"; readonly projectScope: "repository-root-gradle-project"; readonly ref: "refs/heads/main"; readonly subjectName: "receipt.json"; readonly workflowPath: ".github/workflows/persona-harness-project-finish.yml"; }; export declare const PROJECT_FINISH_ATTESTATION_COMMAND_CATALOG: readonly [{ readonly argv: readonly ["./gradlew", "--no-daemon", "--no-build-cache", "cleanTest", "test", "--console=plain"]; readonly id: "test"; }, { readonly argv: readonly ["./gradlew", "--no-daemon", "--no-build-cache", "build", "--console=plain"]; readonly id: "build"; }]; export type ProjectFinishAttestationCommand = { readonly argv: readonly string[]; readonly id: "test" | "build"; }; export type ProjectFinishAttestationReceipt = { readonly build: { readonly artifactDigest: string; readonly commandId: "build"; readonly outcome: "passed"; }; readonly event: typeof PROJECT_FINISH_ATTESTATION_POLICY.event; readonly gradle: { readonly catalog: readonly ProjectFinishAttestationCommand[]; readonly catalogDigest: string; readonly catalogId: typeof PROJECT_FINISH_ATTESTATION_POLICY.catalogId; readonly console: "plain"; readonly noBuildCache: true; readonly noDaemon: true; readonly wrapperPath: "./gradlew"; }; readonly lifecycle: { readonly attemptId: string; readonly expiresAt: string; readonly finishId: string; readonly issuedAt: string; readonly nonce: string; readonly runAttempt: number; readonly runId: string; readonly sessionId: string; }; readonly phVersion: string; readonly policyMarker: typeof PROJECT_FINISH_ATTESTATION_POLICY.policyMarker; readonly project: { readonly root: "."; readonly scope: typeof PROJECT_FINISH_ATTESTATION_POLICY.projectScope; }; readonly ref: typeof PROJECT_FINISH_ATTESTATION_POLICY.ref; readonly repository: { readonly id: number; readonly slug: string; readonly visibility: "public"; }; readonly schemaVersion: typeof PROJECT_FINISH_ATTESTATION_SCHEMA; readonly source: { readonly head: string; readonly identity: SourceIdentity; readonly root: "."; }; readonly test: { readonly commandId: "test"; readonly count: number; readonly failed: 0; readonly junitDigest: string; readonly passed: number; readonly skipped: number; }; readonly workflow: { readonly caller: { readonly ref: string; readonly sha: string; }; readonly certificateSan: string; readonly reusable: { readonly path: typeof PROJECT_FINISH_ATTESTATION_POLICY.workflowPath; readonly ref: string; readonly sha: string; }; readonly runAttempt: number; readonly runId: string; }; }; export type ProjectFinishAttestationStatement = { readonly _type: "https://in-toto.io/Statement/v1"; readonly predicate: { readonly policyMarker: typeof PROJECT_FINISH_ATTESTATION_POLICY.policyMarker; readonly receipt: ProjectFinishAttestationReceipt; readonly receiptDigest: string; readonly schemaVersion: typeof PROJECT_FINISH_ATTESTATION_SCHEMA; }; readonly predicateType: typeof PROJECT_FINISH_ATTESTATION_PREDICATE_TYPE; readonly subject: readonly [ { readonly digest: { readonly sha256: string; }; readonly name: typeof PROJECT_FINISH_ATTESTATION_POLICY.subjectName; } ]; }; export type ProjectFinishAttestationDiagnostic = { readonly code: "binding-mismatch" | "invalid-field" | "signature-unverified" | "wrong-policy"; readonly path: string; }; export type ProjectFinishAttestationParseResult = { readonly diagnostics: readonly ProjectFinishAttestationDiagnostic[]; readonly ok: false; } | { readonly ok: true; readonly value: ProjectFinishAttestationStatement; }; export type ProjectFinishAttestationAssessment = { readonly authorityEligible: false; readonly decision: "blocked"; readonly diagnostics: readonly ProjectFinishAttestationDiagnostic[]; readonly receipt?: ProjectFinishAttestationReceipt; readonly state: "binding-mismatch" | "malformed" | "signature-unverified" | "wrong-policy"; };