/**
 * Classification of PII data by category.
 * Ordered roughly from least to most sensitive.
 */
export type PIICategory = 'personal' | 'contact' | 'identity' | 'financial' | 'health' | 'location' | 'behavioral' | 'biometric' | 'sensitive-special';
/**
 * Legal basis for processing personal data (GDPR Art. 6 / LGPD / CCPA equivalents).
 */
export type LegalBasis = 'consent' | 'contract' | 'legal-obligation' | 'vital-interest' | 'public-task' | 'legitimate-interest';
/**
 * What triggers the deletion of personal data.
 */
export type RetentionTrigger = 'time-expiry' | 'user-request' | 'account-closure' | 'contract-end' | 'consent-withdrawal' | 'legal-expiry';
/**
 * How data is deleted or made non-identifiable.
 */
export type DeletionType = 'logical' | 'physical' | 'anonymized';
/**
 * Supported privacy regulatory frameworks.
 */
export type PrivacyFramework = 'GDPR' | 'CCPA' | 'LGPD' | 'PIPEDA' | 'PDPA' | 'custom';
/**
 * Types of privacy-specific drift detected by detect_drift.
 */
export type PrivacyDriftType = 'new-pii-without-criteria' | 'endpoint-exposes-undeclared-pii' | 'missing-audit-trail' | 'retention-policy-missing';
/**
 * Retention policy for personal data associated with a spec or model.
 */
export interface RetentionPolicy {
    retentionPeriodDays: number;
    triggers: RetentionTrigger[];
    deletionType: DeletionType;
    propagationSystems: string[];
    verificationRequired: boolean;
    legalMinimumDays?: number;
}
/**
 * A detected PII field within a spec or schema.
 */
export interface PIIField {
    fieldName: string;
    modelContext: string;
    category: PIICategory;
    isSensitiveSpecial: boolean;
    canBeAnonymized: boolean;
    canBePseudonymized: boolean;
}
/**
 * Result of running PII detection on a spec.
 */
export interface PIIDetectionResult {
    hasPII: boolean;
    fields: PIIField[];
    sensitiveSpecialCount: number;
    recommendedLegalBasis: LegalBasis;
    requiresConsentFlow: boolean;
    requiresRightToErasure: boolean;
    requiresAuditTrail: boolean;
}
/**
 * Full privacy requirement generated for a spec that contains PII.
 */
export interface PrivacyRequirement {
    specId: string;
    detectedAt: string;
    piiFields: PIIField[];
    legalBasis: LegalBasis;
    retentionPolicy: RetentionPolicy;
    consentRequired: boolean;
    consentGranular: boolean;
    auditTrailRequired: boolean;
    auditRetentionDays: number;
    privacyNoticeSection: string;
    challengeRequired: boolean;
    challengeCompleted: boolean;
    challengeJustification?: string;
}
/**
 * A data transfer to a third party (analytics, CRM, email, ads, etc.).
 */
export interface DataTransfer {
    destination: string;
    destinationType: 'analytics' | 'crm' | 'email' | 'ads' | 'storage' | 'auth' | 'other';
    dataShared: PIIField[];
    hasDPA: boolean;
    isMinimized: boolean;
    restrictedRegions: string[];
    requiresDPAReview: boolean;
}
/**
 * Project-level privacy configuration stored in knowledge.json under "privacyConfig".
 */
export interface ProjectPrivacyConfig {
    framework: PrivacyFramework;
    defaultRetentionDays: number;
    auditRetentionDays: number;
    dataProcessors: DataTransfer[];
    customRules?: Record<string, unknown>;
}
/**
 * Privacy drift item reported by detect_drift.
 */
export interface PrivacyDrift {
    specId: string;
    driftType: PrivacyDriftType;
    field?: string;
    description: string;
    severity: 'critical' | 'high' | 'medium';
    detectedAt: string;
}
/**
 * Configuration for a single privacy regulatory framework in pii-patterns.json.
 */
export interface PiiFrameworkConfig {
    defaultRetentionDays: number;
    auditRetentionDays: number;
    sensitiveSpecialRequiresExplicitConsent: boolean;
    rightToErasure: boolean;
    dataPortability: boolean;
    regions: string[];
}
/**
 * Full structure of pii-patterns.json.
 */
export interface PiiPatterns {
    vocabulary: Record<string, string[]>;
    modelContextBlacklist: string[];
    modelContextWhitelist: string[];
    frameworks: Record<string, PiiFrameworkConfig>;
    thirdPartySignatures: Record<string, string[]>;
}
/**
 * Input for the data_governance MCP tool.
 */
export interface DataGovernanceInput {
    specId?: string;
    projectId: string;
    subcommand: 'detect' | 'retention-policy' | 'privacy-notice' | 'audit';
    modelName?: string;
    specContent?: string;
}
//# sourceMappingURL=privacy.d.ts.map