/**
 * Audit Trail Extension
 *
 * Provides comprehensive audit logging for all agent activities.
 * Integrates with Vorion's proof module for cryptographic sealing
 * of audit records.
 *
 * @packageDocumentation
 * @module @vorion/car-extensions/builtin-extensions/audit
 * @license Apache-2.0
 */
import type { CARExtension } from '../types.js';
/**
 * Audit event types
 */
export type AuditEventType = 'capability.requested' | 'capability.granted' | 'capability.denied' | 'capability.expired' | 'action.initiated' | 'action.completed' | 'action.failed' | 'trust.adjusted' | 'trust.revoked' | 'attestation.verified' | 'attestation.failed' | 'anomaly.detected' | 'anomaly.responded';
/**
 * Audit record structure
 */
export interface AuditEvent {
    /** Unique event ID */
    id: string;
    /** Event type */
    type: AuditEventType;
    /** Event timestamp */
    timestamp: Date;
    /** Agent DID */
    agentDid: string;
    /** Agent CAR at time of event */
    agentCarId: string;
    /** Event details */
    details: Record<string, unknown>;
    /** Request/action ID if applicable */
    correlationId?: string;
    /** Previous event in chain */
    previousEventId?: string;
    /** Hash of the event for integrity */
    hash?: string;
    /** Signature if cryptographically sealed */
    signature?: string;
}
/**
 * Audit configuration
 */
interface AuditConfig {
    /** Whether to log to external audit service */
    externalLogging: boolean;
    /** Whether to include detailed parameters in audit */
    includeDetails: boolean;
    /** Retention period in days */
    retentionDays: number;
    /** Whether to chain events cryptographically */
    chainEvents: boolean;
}
/**
 * Query audit events for an agent
 */
export declare function queryAuditEvents(agentDid: string, options?: {
    type?: AuditEventType;
    startTime?: Date;
    endTime?: Date;
    limit?: number;
}): AuditEvent[];
/**
 * Verify audit chain integrity
 */
export declare function verifyAuditChain(agentDid: string): {
    valid: boolean;
    brokenAt?: string;
    details?: string;
};
/**
 * Audit Trail Extension
 *
 * Provides comprehensive audit logging including:
 * - Capability request/grant auditing
 * - Action initiation/completion auditing
 * - Trust adjustment auditing
 * - Anomaly response auditing
 * - Cryptographic chaining of events
 */
export declare const auditExtension: CARExtension;
/**
 * Create audit extension with custom configuration
 */
export declare function createAuditExtension(config?: Partial<AuditConfig>): CARExtension;
export default auditExtension;
//# sourceMappingURL=audit.d.ts.map