import { type IAgentRuntime, Service, type UUID } from "../../../types/index.ts";
import { type SecurityContext } from "../types/security.ts";
import type { SecurityModule } from "./SecurityModule.ts";
export interface CredentialThreatDetection {
    detected: boolean;
    confidence: number;
    threatType: "credential_request" | "phishing" | "social_engineering" | "prompt_injection" | "none";
    sensitiveData: string[];
    recommendation: string;
}
export declare class CredentialProtector extends Service {
    static serviceType: "credential-protector";
    capabilityDescription: string;
    private securityModule;
    private readonly keywordPatternCache;
    private static normalizeForScan;
    private static reverseString;
    private readonly SENSITIVE_PATTERNS;
    private readonly SENSITIVE_KEYWORDS;
    private readonly THEFT_REQUEST_PATTERNS;
    private readonly PROMPT_INJECTION_PATTERNS;
    private readonly LEGITIMATE_CONTEXTS;
    initialize(_runtime: IAgentRuntime, securityModule: SecurityModule): Promise<void>;
    stop(): Promise<void>;
    static start(runtime: IAgentRuntime): Promise<Service>;
    /**
     * Scan message for credential theft attempts
     */
    scanForCredentialTheft(message: string, entityId: UUID, context: SecurityContext): Promise<CredentialThreatDetection>;
    /**
     * Protect sensitive data by redacting it
     */
    protectSensitiveData(content: string): Promise<string>;
    /**
     * Alert potential victims of credential theft
     */
    alertPotentialVictims(threatActor: UUID, victims: UUID[], threatDetails: CredentialThreatDetection): Promise<void>;
    /**
     * Analyze a conversation for credential theft patterns
     */
    analyzeConversation(messages: Array<{
        entityId: UUID;
        content: string;
        timestamp: number;
    }>, context: SecurityContext): Promise<{
        overallThreat: number;
        suspiciousEntities: UUID[];
        recommendations: string[];
    }>;
    /**
     * Private helper methods
     */
    private detectSensitiveData;
    private hasTheftRequest;
    private hasPromptInjectionPattern;
    private isLegitimateContext;
    private hasPhishingIndicators;
    private getKeywordPattern;
    private containsKeywordVariant;
    private logThreatEvent;
}
//# sourceMappingURL=CredentialProtector.d.ts.map