/**
 * Defence layer type definitions
 *
 * Backend-agnostic security types that define the interface for protecting
 * any memory backend, not just the built-in Cortex store.
 */
export type SensitivityLevel = 'PUBLIC' | 'INTERNAL' | 'CONFIDENTIAL' | 'RESTRICTED';
export type FirewallResult = 'ALLOW' | 'BLOCK' | 'QUARANTINE';
export type ThreatIndicator = 'instruction_injection' | 'privilege_escalation' | 'encoding_obfuscation' | 'credential_leak' | 'external_url' | 'fragmented_payload' | 'restricted_content' | 'pipeline_error' | 'custom_rule' | 'custom_pattern' | 'builtin_rule';
export interface DefenceSource {
    type: 'user' | 'cli' | 'hook' | 'email' | 'web' | 'agent' | 'file' | 'api' | 'tool_response';
    identifier: string;
}
export interface ToolResponseScanResult {
    clean: boolean;
    mode: 'advisory' | 'enforce';
    toolName: string;
    injection: import('./iron-dome/injection-scanner.js').InjectionScanResult;
    credentials: import('./credential-leak/index.js').CredentialScanResult;
    threatIndicators: ThreatIndicator[];
    summary: string;
    durationMs: number;
    auditId: number;
}
export interface FirewallAnalysis {
    result: FirewallResult;
    reason: string;
    threatIndicators: ThreatIndicator[];
    anomalyScore: number;
    blockedPatterns: string[];
}
export interface FragmentationAnalysis {
    score: number;
    relatedMemoryIds: number[];
    suspiciousEntities: string[];
    assemblyRisk: string;
}
export interface SensitivityClassification {
    level: SensitivityLevel;
    confidence: number;
    detectedPatterns: string[];
    redactionRequired: boolean;
}
export interface TrustScore {
    score: number;
    source: DefenceSource;
    hierarchy: string[];
}
export interface DefencePipelineResult {
    allowed: boolean;
    firewall: FirewallAnalysis;
    fragmentation: FragmentationAnalysis | null;
    sensitivity: SensitivityClassification;
    trust: TrustScore;
    credentialScan?: import('./credential-leak/index.js').CredentialScanResult;
    auditId: number;
}
export interface DefenceConfig {
    mode: 'strict' | 'balanced' | 'permissive';
    enableFragmentationDetection: boolean;
    fragmentationWindowHours: number;
    trustThresholdForActions: number;
    autoQuarantineThreshold: number;
    flagThreshold: number;
    /** When true, unknown/undetected sources get trust 0.3 instead of 0.5, and all writes are auto-quarantined */
    strictSourceMode: boolean;
}
export declare const DEFAULT_DEFENCE_CONFIG: DefenceConfig;
export interface VerifyThreat {
    type: string;
    description: string;
    severity: string;
}
export interface VerifyResult {
    id: number;
    verdict?: string;
    confidence?: number;
    threats_detected?: VerifyThreat[];
    action?: string;
    cached?: boolean;
    duration_ms?: number;
    status: string;
}
export interface DefencePipelineResultWithVerify extends DefencePipelineResult {
    verification?: {
        id: number;
        status: 'pending' | 'completed' | 'failed' | 'skipped';
        verdict?: string;
        confidence?: number;
        threats_detected?: VerifyThreat[];
        action?: string;
        mode: 'advisory' | 'enforce';
        originalFirewallResult?: FirewallResult;
    };
}
export interface QuarantineEntry {
    id: number;
    original_content: string;
    original_title: string | null;
    source_type: string;
    source_identifier: string;
    reason: string;
    threat_indicators: string;
    anomaly_score: number;
    firewall_result: 'BLOCK' | 'QUARANTINE';
    status: 'pending' | 'approved' | 'rejected' | 'expired';
    reviewed_at: string | null;
    reviewed_by: string | null;
    created_at: string;
    expires_at: string | null;
    audit_id: number | null;
}
export interface AuditEntry {
    id: number;
    memory_id: number | null;
    project: string | null;
    timestamp: string;
    source_type: string;
    source_identifier: string;
    trust_score: number;
    sensitivity_level: string;
    firewall_result: FirewallResult;
    anomaly_score: number;
    threat_indicators: string;
    blocked_patterns: string;
    reason: string | null;
    fragmentation_score: number | null;
    pipeline_duration_ms: number | null;
}
