/**
 * LangChain Integration for ShieldCortex
 *
 * Provides two exports:
 * - ShieldCortexMemory: A BaseMemory-compatible class that scans content through
 *   the defence pipeline before storing memories.
 * - ShieldCortexGuard: A standalone scanner that can be used as middleware
 *   in any LangChain chain without storing memories.
 *
 * Usage:
 *   import { ShieldCortexMemory, ShieldCortexGuard } from 'shieldcortex/integrations/langchain';
 *
 *   // As a memory backend
 *   const memory = new ShieldCortexMemory({ mode: 'balanced' });
 *   const vars = await memory.loadMemoryVariables({});
 *   await memory.saveContext({ input: 'hello' }, { output: 'hi' });
 *
 *   // As a standalone guard
 *   const guard = new ShieldCortexGuard();
 *   const result = guard.scan('some suspicious content');
 *   if (!result.allowed) { ... }
 */
import type { DefenceConfig, DefencePipelineResult, DefenceSource } from '../defence/types.js';
export interface ShieldCortexMemoryConfig {
    /** Defence mode: strict, balanced, or permissive. Default: balanced */
    mode?: DefenceConfig['mode'];
    /** Source identifier for audit trail. Default: 'langchain-agent' */
    sourceIdentifier?: string;
    /** Source type. Default: 'agent' */
    sourceType?: DefenceSource['type'];
    /** Maximum memories to return from loadMemoryVariables. Default: 10 */
    maxResults?: number;
    /** Memory key used in the variables dict. Default: 'history' */
    memoryKey?: string;
    /** Project scope for memories. Default: auto-detected */
    project?: string;
    /** Allow clear() to delete memories. Default: false (throws error for safety) */
    allowClear?: boolean;
}
/**
 * LangChain-compatible memory class that runs the defence pipeline
 * on all content before storage. Blocked content is quarantined.
 *
 * Implements the same interface as LangChain's BaseMemory:
 * - memoryVariables: string[]
 * - loadMemoryVariables(values): Promise<Record<string, string>>
 * - saveContext(inputValues, outputValues): Promise<void>
 * - clear(): Promise<void>
 */
export declare class ShieldCortexMemory {
    private config;
    private source;
    private maxResults;
    private _memoryKey;
    private project?;
    private allowClear;
    /** Keys this memory populates (LangChain interface) */
    get memoryVariables(): string[];
    constructor(options?: ShieldCortexMemoryConfig);
    /**
     * Load relevant memories. Searches by recent context or returns recent memories.
     */
    loadMemoryVariables(values: Record<string, unknown>): Promise<Record<string, string>>;
    /**
     * Save conversation context. Runs the defence pipeline before storing.
     * Blocked content is automatically quarantined.
     */
    saveContext(inputValues: Record<string, unknown>, outputValues: Record<string, unknown>): Promise<void>;
    /**
     * Clear memories. Disabled by default for safety.
     * Pass { allowClear: true } to constructor to enable.
     * For targeted deletion, use the MCP forget tool or REST API instead.
     */
    clear(): Promise<void>;
}
export interface ShieldCortexGuardConfig {
    mode?: DefenceConfig['mode'];
    sourceIdentifier?: string;
    sourceType?: DefenceSource['type'];
}
/**
 * Standalone content scanner. Does NOT store memories.
 * Use this as middleware to scan content before passing it to any memory backend.
 */
export declare class ShieldCortexGuard {
    private config;
    private source;
    constructor(options?: ShieldCortexGuardConfig);
    /**
     * Scan content through the full defence pipeline.
     * Returns the pipeline result — check result.allowed.
     */
    scan(content: string, title?: string, source?: DefenceSource): DefencePipelineResult;
    /**
     * Convenience: returns true if content is safe.
     */
    isAllowed(content: string, title?: string): boolean;
}
