/**
 * CAR Integration for Trust Engine
 *
 * Bridges the @vorionsys/contracts/car module with the Trust Engine,
 * providing trust-aware operations on CAR (Capability Authority Record) strings.
 *
 * CAR = Categorical Agentic Registry (formerly ACI - Categorical Agentic Registry)
 *
 * @packageDocumentation
 */
import { z } from 'zod';
import { type Attestation, type EffectivePermission, type PermissionCheckResult, attestationSchema, effectivePermissionSchema, permissionCheckResultSchema, CertificationTier, RuntimeTier, CapabilityLevel } from '@vorionsys/contracts/car';
import { TrustTier } from '@vorionsys/shared-constants';
export { type Attestation, type EffectivePermission, type PermissionCheckResult, attestationSchema, effectivePermissionSchema, permissionCheckResultSchema, CertificationTier, RuntimeTier, CapabilityLevel, };
export declare const AttestationSchema: z.ZodObject<{
    id: z.ZodString;
    issuer: z.ZodString;
    subject: z.ZodString;
    scope: z.ZodEnum<["full", "domain", "level", "training", "security", "compliance", "identity", "supervision"]>;
    certificationTier: z.ZodNativeEnum<typeof CertificationTier>;
    domains: z.ZodOptional<z.ZodArray<z.ZodEnum<["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]>, "many">>;
    issuedAt: z.ZodDate;
    expiresAt: z.ZodDate;
    status: z.ZodEnum<["active", "expired", "revoked", "suspended", "pending"]>;
    evidence: z.ZodOptional<z.ZodObject<{
        testResults: z.ZodOptional<z.ZodString>;
        auditReport: z.ZodOptional<z.ZodString>;
        trainingVerification: z.ZodOptional<z.ZodString>;
        complianceDocumentation: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodOptional<z.ZodString>, z.objectOutputType<{
        testResults: z.ZodOptional<z.ZodString>;
        auditReport: z.ZodOptional<z.ZodString>;
        trainingVerification: z.ZodOptional<z.ZodString>;
        complianceDocumentation: z.ZodOptional<z.ZodString>;
    }, z.ZodOptional<z.ZodString>, "strip">, z.objectInputType<{
        testResults: z.ZodOptional<z.ZodString>;
        auditReport: z.ZodOptional<z.ZodString>;
        trainingVerification: z.ZodOptional<z.ZodString>;
        complianceDocumentation: z.ZodOptional<z.ZodString>;
    }, z.ZodOptional<z.ZodString>, "strip">>>;
    proof: z.ZodOptional<z.ZodObject<{
        type: z.ZodString;
        created: z.ZodString;
        verificationMethod: z.ZodString;
        proofPurpose: z.ZodString;
        jws: z.ZodString;
        nonce: z.ZodOptional<z.ZodString>;
        challenge: z.ZodOptional<z.ZodString>;
        domain: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        type: string;
        created: string;
        verificationMethod: string;
        proofPurpose: string;
        jws: string;
        nonce?: string | undefined;
        domain?: string | undefined;
        challenge?: string | undefined;
    }, {
        type: string;
        created: string;
        verificationMethod: string;
        proofPurpose: string;
        jws: string;
        nonce?: string | undefined;
        domain?: string | undefined;
        challenge?: string | undefined;
    }>>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, "strip", z.ZodTypeAny, {
    status: "active" | "suspended" | "pending" | "revoked" | "expired";
    expiresAt: Date;
    id: string;
    scope: "compliance" | "security" | "training" | "domain" | "level" | "identity" | "full" | "supervision";
    issuedAt: Date;
    issuer: string;
    subject: string;
    certificationTier: CertificationTier;
    metadata?: Record<string, unknown> | undefined;
    proof?: {
        type: string;
        created: string;
        verificationMethod: string;
        proofPurpose: string;
        jws: string;
        nonce?: string | undefined;
        domain?: string | undefined;
        challenge?: string | undefined;
    } | undefined;
    domains?: ("A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z")[] | undefined;
    evidence?: z.objectOutputType<{
        testResults: z.ZodOptional<z.ZodString>;
        auditReport: z.ZodOptional<z.ZodString>;
        trainingVerification: z.ZodOptional<z.ZodString>;
        complianceDocumentation: z.ZodOptional<z.ZodString>;
    }, z.ZodOptional<z.ZodString>, "strip"> | undefined;
}, {
    status: "active" | "suspended" | "pending" | "revoked" | "expired";
    expiresAt: Date;
    id: string;
    scope: "compliance" | "security" | "training" | "domain" | "level" | "identity" | "full" | "supervision";
    issuedAt: Date;
    issuer: string;
    subject: string;
    certificationTier: CertificationTier;
    metadata?: Record<string, unknown> | undefined;
    proof?: {
        type: string;
        created: string;
        verificationMethod: string;
        proofPurpose: string;
        jws: string;
        nonce?: string | undefined;
        domain?: string | undefined;
        challenge?: string | undefined;
    } | undefined;
    domains?: ("A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z")[] | undefined;
    evidence?: z.objectInputType<{
        testResults: z.ZodOptional<z.ZodString>;
        auditReport: z.ZodOptional<z.ZodString>;
        trainingVerification: z.ZodOptional<z.ZodString>;
        complianceDocumentation: z.ZodOptional<z.ZodString>;
    }, z.ZodOptional<z.ZodString>, "strip"> | undefined;
}>;
/**
 * Trust context for CAR-based permission calculations
 */
export interface CARTrustContext {
    /** The CAR string being evaluated */
    car: string;
    /** Current trust score (0-1000) */
    trustScore: number;
    /** Current trust tier */
    trustTier: TrustTier;
    /** Certification tier from attestations */
    certificationTier?: CertificationTier;
    /** Runtime deployment tier */
    runtimeTier?: RuntimeTier;
    /** Capability level from CAR */
    capabilityLevel: CapabilityLevel;
    /** Active attestations */
    attestations: Attestation[];
    /** Observability ceiling */
    observabilityCeiling?: number;
    /** Context policy ceiling */
    contextPolicyCeiling?: number;
}
/**
 * @deprecated Use CARTrustContext instead
 */
export type ACITrustContext = CARTrustContext;
/**
 * Convert trust score to tier
 */
export declare function scoreToTier(score: number): TrustTier;
/**
 * Get minimum score for a certification tier
 */
export declare function certificationTierToMinScore(tier: CertificationTier): number;
/**
 * Get maximum score for a certification tier
 */
export declare function certificationTierToMaxScore(tier: CertificationTier): number;
/**
 * Get representative score for a certification tier (midpoint)
 */
export declare function certificationTierToScore(tier: CertificationTier): number;
/**
 * Get minimum score for a trust tier
 */
export declare function tierToMinScore(tier: TrustTier): number;
/**
 * Lookup certification tier from trust score (without hysteresis)
 */
export declare function lookupCertificationTier(score: number): CertificationTier;
/** Default hysteresis buffer for demotion protection */
export declare const DEFAULT_DEMOTION_HYSTERESIS = 25;
/**
 * Lookup certification tier with demotion hysteresis protection.
 *
 * - Promotion: Immediate when score reaches tier minimum
 * - Demotion: Only when score falls below (tier minimum - hysteresis)
 *
 * This prevents tier flapping when scores fluctuate near boundaries,
 * giving agents grace to recover before being demoted.
 *
 * @param score - Current trust score (0-1000)
 * @param currentTier - Agent's current certification tier (undefined for new agents)
 * @param hysteresis - Buffer below threshold before demotion (default: 25)
 */
export declare function lookupCertificationTierWithHysteresis(score: number, currentTier: CertificationTier | undefined, hysteresis?: number): CertificationTier;
/**
 * Get maximum capability level allowed by competence
 */
export declare function competenceLevelToCeiling(level: CapabilityLevel): number;
/**
 * Determine reason for capability ceiling
 */
export declare function determineCeilingReason(context: CARTrustContext): {
    ceiling: number;
    reason: string;
};
/**
 * Convert attestation to trust signal
 */
export declare function attestationToTrustSignal(attestation: Attestation): {
    source: string;
    weight: number;
    score: number;
    timestamp: Date;
};
/**
 * Calculate effective permission from CAR trust context
 */
export declare function calculateEffectiveFromCAR(context: CARTrustContext): EffectivePermission;
/**
 * @deprecated Use calculateEffectiveFromCAR instead
 */
export declare const calculateEffectiveFromACI: typeof calculateEffectiveFromCAR;
/**
 * Calculate effective tier from context
 */
export declare function calculateEffectiveTier(context: CARTrustContext): TrustTier;
/**
 * Calculate effective score from context
 */
export declare function calculateEffectiveScore(context: CARTrustContext): number;
/**
 * Apply CAR floor to trust score
 * Floor ensures minimum trust based on attestations
 */
export declare function applyCARFloor(context: CARTrustContext, score: number): number;
/**
 * @deprecated Use applyCARFloor instead
 */
export declare const applyACIFloor: typeof applyCARFloor;
/**
 * Enforce CAR ceiling on trust score
 * Ceiling prevents exceeding capability level limits
 */
export declare function enforceCARCeiling(context: CARTrustContext, score: number): number;
/**
 * @deprecated Use enforceCARCeiling instead
 */
export declare const enforceACICeiling: typeof enforceCARCeiling;
/**
 * Create a CAR trust context
 */
export declare function createCARTrustContext(options: {
    car: string;
    trustScore: number;
    capabilityLevel: CapabilityLevel;
    attestations?: Attestation[];
    certificationTier?: CertificationTier;
    runtimeTier?: RuntimeTier;
    observabilityCeiling?: number;
    contextPolicyCeiling?: number;
}): CARTrustContext;
/**
 * @deprecated Use createCARTrustContext instead
 */
export declare const createACITrustContext: typeof createCARTrustContext;
//# sourceMappingURL=car-integration.d.ts.map