/** * Effect ledger v1 vocabulary: the identifiers, phases, kinds and reason codes * pinned by `docs/contracts/effect-ledger.v1.md` and `schemas/effects/*`. */ export declare const EFFECT_PREDICATE_TYPE: "https://aiwg.io/attestations/effect/v1"; export declare const IN_TOTO_STATEMENT_TYPE: "https://in-toto.io/Statement/v1"; export declare const STATEMENT_PAYLOAD_TYPE: "application/vnd.in-toto+json"; export declare const CHECKPOINT_PAYLOAD_TYPE: "application/vnd.aiwg.effect-checkpoint.v1+json"; export declare const ROTATION_PAYLOAD_TYPE: "application/vnd.aiwg.effect-key-rotation.v1+json"; export declare const RECORD_SCHEMA_VERSION: "aiwg.effect.record.v1"; export declare const SEGMENT_LINE_SCHEMA_VERSION: "aiwg.effect.segment-line.v1"; export declare const CHECKPOINT_SCHEMA_VERSION: "aiwg.effect.checkpoint.v1"; export declare const KEYRING_SCHEMA_VERSION: "aiwg.effect.keyring.v1"; export declare const ROTATION_SCHEMA_VERSION: "aiwg.effect.key-rotation.v1"; export declare const VERIFIER_RESULT_SCHEMA_VERSION: "aiwg.effect.verifier-result.v1"; export declare const INDEX_SCHEMA_VERSION: "aiwg.effect.index.v1"; export declare const EFFECT_SUBSYSTEMS: readonly ["review", "job", "delivery", "custom"]; export type EffectSubsystem = typeof EFFECT_SUBSYSTEMS[number]; export declare const EFFECT_PHASES: readonly ["intent", "completed", "failed", "reconciled", "tombstone"]; export type EffectPhase = typeof EFFECT_PHASES[number]; export declare const CORE_EFFECT_KINDS: readonly ["git.commit", "git.tag", "file.digest", "decision.receipt", "decision.review.continuation", "tracker.comment", "tracker.issue.closed", "tracker.pr.merged"]; export type CoreEffectKind = typeof CORE_EFFECT_KINDS[number]; export declare const EFFECT_ID_DERIVATION_NAMES: readonly ["aiwg.effect/v1", "d13.review/v1"]; export type EffectIdDerivationName = typeof EFFECT_ID_DERIVATION_NAMES[number]; export declare const PRESENT_REASONS: readonly ["marker-match", "state-match", "digest-match", "heuristic-match"]; export declare const ABSENT_REASONS: readonly ["complete-query-no-match"]; export declare const UNKNOWN_REASONS: readonly ["verifier-missing", "verifier-version-mismatch", "verifier-cannot-report-absent", "network-error", "timeout", "auth-denied", "rate-limited", "server-error", "container-unreadable", "paging-incomplete", "consistency-lag", "tracker-blocked", "tracker-provider-unresolved", "tracker-repository-mismatch", "tracker-credential-missing", "tracker-no-access-route", "malformed-response", "evidence-conflict"]; export type PresentReason = typeof PRESENT_REASONS[number]; export type AbsentReason = typeof ABSENT_REASONS[number]; export type UnknownReason = typeof UNKNOWN_REASONS[number]; export declare const FAILURE_REASONS: readonly ["target-rejected", "precondition-failed", "cancelled-before-dispatch"]; export type FailureReason = typeof FAILURE_REASONS[number]; export type EffectContextValue = string | number | boolean; export type EffectContext = Record; export interface EffectScope { tenant: string; project: string; subsystem: EffectSubsystem; } export interface EffectIdentityInput { scope: EffectScope; kind: string; target: string; context: EffectContext; } export interface VerifierRef { kind: string; version: string; canReportAbsent: boolean; } export type VerificationResult = 'present' | 'absent' | 'unknown'; export interface EffectVerification { verifier: VerifierRef; result: VerificationResult; reason: string; complete: boolean; checkedAt: string; evidenceDigest?: string; } export interface EffectFailure { reason: FailureReason; evidenceDigest?: string; } export interface EffectTombstone { originalRecordHash: string; originalKeyid: string; originalPhase: Exclude; purgedAt: string; retentionPolicy: string; } export interface EffectLinks { operatorDecisionEventId?: string; operatorDecisionRecordHash?: string; traceId?: string; spanId?: string; toolCallId?: string; } export interface EffectPredicate { schemaVersion: typeof RECORD_SCHEMA_VERSION; effectId: string; idDerivation: EffectIdDerivationName; scope: EffectScope; kind: string; target?: string; context?: EffectContext; phase: EffectPhase; payloadDigest: string; writer: string; seq: number; prev: string | null; recordedAt: string; verification?: EffectVerification; failure?: EffectFailure; tombstone?: EffectTombstone; links: EffectLinks; authorizationGrant?: import('./authorization-grant.js').AuthorizationGrant; } export interface EffectStatement { _type: typeof IN_TOTO_STATEMENT_TYPE; subject: [{ name: string; digest: { sha256: string; }; }]; predicateType: typeof EFFECT_PREDICATE_TYPE; predicate: EffectPredicate; } export interface EffectSignature { keyid: string; sig: string; } export interface EffectEnvelope { payloadType: typeof STATEMENT_PAYLOAD_TYPE; payload: string; signatures: EffectSignature[]; } export interface EffectSegmentLine { schemaVersion: typeof SEGMENT_LINE_SCHEMA_VERSION; writer: string; seq: number; recordHash: string; envelope: EffectEnvelope; } export interface EffectKeyringKey { keyid: string; algorithm: 'ed25519'; publicKey: string; validFrom: string; validUntil?: string; status: 'active' | 'retired' | 'revoked'; revokedAt?: string; } export interface EffectKeyRotationBody { schemaVersion: typeof ROTATION_SCHEMA_VERSION; sequence: number; from: string; to: string; effectiveAt: string; reason: 'scheduled' | 'custody-change' | 'compromise'; } export interface EffectKeyRotation extends EffectKeyRotationBody { signatures: Array<{ role: 'prior' | 'successor'; keyid: string; sig: string; }>; } export interface EffectKeyring { schemaVersion: typeof KEYRING_SCHEMA_VERSION; scope: EffectScope; keys: EffectKeyringKey[]; rotations: EffectKeyRotation[]; } export interface EffectCheckpointWriter { writer: string; segment: string; count: number; headHash: string; } export interface EffectCheckpointBody { schemaVersion: typeof CHECKPOINT_SCHEMA_VERSION; scope: EffectScope; sequence: number; createdAt: string; writers: EffectCheckpointWriter[]; root: string; keyringDigest: string; previousCheckpoint: string | null; } export interface EffectCheckpoint extends EffectCheckpointBody { signatures: EffectSignature[]; } export interface EffectVerifierResult { schemaVersion: typeof VERIFIER_RESULT_SCHEMA_VERSION; effectId: string; kind: string; verification: EffectVerification; exitCode: 0 | 3 | 4; } //# sourceMappingURL=types.d.ts.map