/** All spec lifecycle and tool event types captured in the audit log. */
export type AuditEventType = 'spec.created' | 'spec.updated' | 'spec.status_changed' | 'spec.approved' | 'spec.drift_detected' | 'spec.reconciled' | 'tool.called' | 'role.assigned';
/** A single immutable audit log entry. */
export interface AuditEvent {
    /** Unique identifier for this event (UUID-like). */
    id: string;
    /** ISO-8601 timestamp. */
    timestamp: string;
    /** Classification of what happened. */
    eventType: AuditEventType;
    /** Optional: which spec this event relates to. */
    specId?: string;
    /** Optional: who performed the action (user/agent identifier). */
    userId?: string;
    /** Short verb describing the action (e.g., "created", "status changed to approved"). */
    action: string;
    /** Arbitrary additional context (change summary, metadata, etc.). */
    details: Record<string, unknown>;
    /** SHA-256 hash of the previous JSONL line (hex). Empty string for first entry. */
    previousHash: string;
    /** SHA-256 hash of this entry's canonical JSON (excluding this field itself). */
    hash: string;
}
/** Input filter for querying the audit log. */
export interface AuditQuery {
    projectId: string;
    specId?: string;
    userId?: string;
    eventType?: AuditEventType;
    from?: string;
    to?: string;
    limit?: number;
}
/** Result of an audit log query. */
export interface AuditQueryResult {
    events: AuditEvent[];
    total: number;
    truncated: boolean;
}
/** Payload passed to appendEvent (excludes hash chain fields). */
export interface AppendEventInput {
    eventType: AuditEventType;
    specId?: string;
    userId?: string;
    action: string;
    details?: Record<string, unknown>;
}
/** Result of verifying SHA-256 chain integrity. */
export interface ChainVerificationResult {
    valid: boolean;
    totalEntries: number;
    firstBrokenAt?: number;
    message: string;
}
/** Input for audit_trail tool — alias for AuditQuery for tool-handler consumers. */
export type AuditTrailInput = AuditQuery;
/** Input for generate_attestation tool. */
export interface GenerateAttestationInput {
    projectId: string;
    specId: string;
}
/** Structured attestation document (SPEC-167 — JSON, not actual PDF). */
export interface AttestationData {
    attestationId: string;
    generatedAt: string;
    projectId: string;
    specId: string;
    events: AuditEvent[];
    chainValid: boolean;
    summary: {
        totalEvents: number;
        firstEvent?: string;
        lastEvent?: string;
        eventTypes: Partial<Record<AuditEventType, number>>;
    };
}
//# sourceMappingURL=audit-trail.d.ts.map