/**
 * ATSF PolicyEngine Adapter
 *
 * Bridges SecurityPolicyEngine to the IPolicyEngine interface from atsf-core.
 * This allows the SecurityPolicyEngine to be injected into
 * TrustAwareEnforcementService for additional policy evaluation.
 *
 * @packageDocumentation
 */
import type { SecurityPolicyEngine } from './engine.js';
interface PolicyEvaluationInput {
    intent: {
        id: string;
        entityId: string;
        actionType?: string | null;
        dataSensitivity?: string | null;
        reversibility?: string | null;
        resourceScope?: string[] | null;
        [key: string]: unknown;
    };
    trustScore: number;
    trustLevel: number;
    context?: Record<string, unknown>;
}
interface PolicyViolation {
    policyId: string;
    policyName: string;
    action: 'deny' | 'escalate' | 'limit' | 'monitor';
    reason: string;
}
interface IPolicyEngine {
    evaluate(context: PolicyEvaluationInput): PolicyViolation[];
}
/**
 * Adapter that wraps SecurityPolicyEngine to satisfy IPolicyEngine.
 *
 * Since SecurityPolicyEngine.evaluate() is async but IPolicyEngine.evaluate()
 * is sync, this adapter uses a pre-evaluate / cache pattern:
 *
 * 1. Call `preEvaluate(input)` (async) before the synchronous call path.
 * 2. Call `evaluate(input)` (sync) which returns the cached result.
 *
 * The TrustAwareEnforcementService calls `evaluate()` synchronously within
 * its `decide()` flow. To bridge the async gap, call `preEvaluate()` in
 * the integration layer before `decide()`, or use `evaluateAsync()` as a
 * standalone async evaluation path.
 */
export declare class SecurityPolicyEngineAdapter implements IPolicyEngine {
    private engine;
    private lastResult;
    constructor(engine: SecurityPolicyEngine);
    /**
     * Synchronous evaluate -- returns cached violations from the last
     * `preEvaluate()` call.
     *
     * For the TrustAwareEnforcementService integration, call `preEvaluate()`
     * first in the decide() flow, then this returns the cached result.
     */
    evaluate(_input: PolicyEvaluationInput): PolicyViolation[];
    /**
     * Async evaluation -- call this before the synchronous `evaluate()`.
     *
     * Converts PolicyEvaluationInput to PolicyContext, runs the engine,
     * caches the result, and returns it.
     */
    preEvaluate(input: PolicyEvaluationInput): Promise<PolicyViolation[]>;
    /**
     * Convenience alias for `preEvaluate()` when used outside the
     * synchronous TrustAwareEnforcementService flow.
     */
    evaluateAsync(input: PolicyEvaluationInput): Promise<PolicyViolation[]>;
    /**
     * Convert PolicyEvaluationInput to PolicyContext.
     */
    private buildPolicyContext;
    /**
     * Convert PolicyDecision to PolicyViolation[].
     *
     * Only non-"allow" actions from matched policies are surfaced as violations.
     */
    private convertDecision;
    /**
     * Map trust level (0-7) to threat level.
     * Higher trust = lower threat.
     */
    private trustToThreatLevel;
}
/**
 * Create a SecurityPolicyEngineAdapter instance.
 */
export declare function createSecurityPolicyEngineAdapter(engine: SecurityPolicyEngine): SecurityPolicyEngineAdapter;
export {};
//# sourceMappingURL=atsf-adapter.d.ts.map