/**
 * GovernedAgent -- Simple "front door" factory for @connexum/ai-governance.
 *
 * Instead of wiring 50+ classes together, call createGovernedAgent(config)
 * and get back a governed agent that enforces rules, logs audit trails,
 * and computes compliance scores.
 *
 * @connexum/ai-governance
 */
import { type ActionContext, type ActionDecision } from './adapters/index';
import { type CompliancePack } from './packs/index';
import { PackEvaluator, type PackEvaluatorVerdict } from './governance/pack-evaluator';
/**
 * Thrown by execute() when the pack evaluator produces a DENY verdict.
 * Callers should catch this to surface a governance-blocked result.
 */
export declare class PackPolicyViolation extends Error {
    /** Human-readable explanation from the pack evaluator. */
    readonly packReason: string;
    /** IDs of packs whose rules produced the DENY verdict. */
    readonly triggeringPackIds: string[];
    /**
     * F-NEW-CRIT-39i-2: classifier IDs (e.g. PHI_MRN, GDPR_DOB) that
     * fired inside the triggering packs. Surfaces from
     * PackEvaluatorVerdict.triggeringClassifierIds so the gov-server
     * audit chain (CRIT-39i regulatoryViolations) can record per-
     * category breadcrumbs instead of pack-level only.
     */
    readonly triggeringClassifierIds: string[];
    /** F-NEW-CRIT-39j-3: true when DENY came from adapter default-deny (no rule matched). */
    readonly defaultDenyTriggered: boolean;
    constructor(reason: string, triggeringPackIds: string[], triggeringClassifierIds?: string[], defaultDenyTriggered?: boolean);
}
/**
 * Thrown by createGovernedAgent() when a requested pack ID is not found in
 * BUILT_IN_PACKS. Replaces the previous silent-skip behavior (Task 3 fix).
 *
 * A customer requesting a non-existent pack was silently getting zero
 * enforcement -- indistinguishable from a correctly-configured agent with
 * no restrictions. This error makes the misconfiguration immediately visible.
 *
 * Callers that want softer handling (e.g., during pack catalog migrations)
 * can catch MissingPackError at the call site.
 */
export declare class MissingPackError extends Error {
    /** The pack ID that was not found. */
    readonly packId: string;
    constructor(packId: string, message: string);
}
export interface GovernanceRule {
    tool: string | RegExp;
    decision: 'allow' | 'deny' | 'require_approval';
    reason: string;
    conditions?: Record<string, unknown>;
}
export interface GovernedAgentConfig {
    name: string;
    platform: 'claude' | 'openai' | 'gemini' | string;
    packs?: string[];
    licenseKey?: string;
    rules?: GovernanceRule[];
    onDecision?: (decision: ActionDecision) => void;
    onError?: (error: Error) => void;
    auditDir?: string;
    defaultDeny?: boolean;
    /**
     * Human-in-the-loop mode. When enabled (default: true), all DENY decisions
     * are converted to REQUIRE_APPROVAL and routed to the approval queue.
     * No action is hard-blocked without a human seeing it first.
     */
    humanInTheLoop?: boolean;
    /**
     * Optional directory for the internal EventBus used by the PackEvaluator.
     * Defaults to a temporary directory when not provided.
     * If auditDir is set and this is not, auditDir is used.
     */
    eventBusDir?: string;
    /**
     * Optional pre-constructed PackEvaluator for injection in tests.
     * When provided, the factory will use this evaluator instead of creating one.
     * This allows tests to inject a pre-seeded evaluator without needing to
     * configure packs through the config.packs[] path.
     */
    _packEvaluator?: PackEvaluator;
    /**
     * DI: optional function to submit a PENDING PackEvaluatorVerdict to the
     * approval queue storage. Eliminates the async dynamic-import boundary in
     * the execute() hot path for multi-package deployments.
     *
     * When provided: used directly -- no dynamic import occurs.
     * When absent: the legacy dynamic-import-with-graceful-degrade path is used,
     *   which preserves backward compat for single-package / unit-test deployments.
     *
     * The governance-server passes submitPendingApprovalForPackVerdict from
     * pack-verdict-adapter.ts when constructing GovernedAgent.
     */
    pendingApprovalSubmitter?: (verdict: PackEvaluatorVerdict) => Promise<{
        id: string;
    }>;
    /**
     * Opt-in flag to allow packs with PLACEHOLDER STATUS to be activated.
     * PLACEHOLDER packs bundle multiple jurisdictions and require Vera (Legal) +
     * counsel sign-off per jurisdiction before production activation. Activating a
     * PLACEHOLDER pack without this flag throws to prevent silent under/over-enforcement.
     * F-NEW-VERA-PACK-FINAL-004 (2026-05-03): added for lpo2024 PLACEHOLDER gate.
     */
    allowPlaceholderPacks?: boolean;
}
export interface AuditEntry {
    timestamp: string;
    agentName: string;
    toolName: string;
    decision: ActionDecision;
    context: ActionContext;
}
export interface GovernedAgent {
    execute(context: ActionContext): Promise<ActionDecision>;
    getAuditTrail(): AuditEntry[];
    getComplianceScore(): number;
    shutdown(): Promise<void>;
}
export declare const BUILT_IN_PACKS: Record<string, CompliancePack>;
export declare function createGovernedAgent(config: GovernedAgentConfig): GovernedAgent;
//# sourceMappingURL=governed-agent.d.ts.map