/**
 * ActionClasses -- Explicit action classification types and per-class policy config.
 *
 * Defines the six mandatory approval-gate classes that the ApprovalGateEnforcer
 * recognises, plus the per-class policy configuration model.
 *
 * Relationship to PR #24 (feat/p3-t1-autonomy-spectrum):
 *   PR #24 ships AutonomySpectrumEnforcer with a "gated classes at Level 4" concept
 *   (DEFAULT_L4_APPROVAL_CLASSES set). That feature answers "does this class need an
 *   approval queue entry?" at the autonomy level.
 *
 *   This module answers a DIFFERENT question: "given that we are at a gate point,
 *   what is the per-class disposition (requires-approval / auto-approve-low-risk /
 *   always-deny), what is the timeout, and who may approve?" The two systems are
 *   complementary. AutonomySpectrumEnforcer routes traffic to ApprovalGateEnforcer;
 *   ApprovalGateEnforcer owns the gate lifecycle from that point forward.
 *
 * Compliance bindings:
 *   HIPAA 164.308(a)(1): Security management process
 *   HIPAA 164.312(a)(1): Access controls
 *   SOC 2 CC6.1: Logical access restrictions
 *   GDPR Art. 22: Automated decision-making controls
 *   PCI DSS Req 7: Restrict access by business need
 *   NIST 800-53 AC-3: Access enforcement
 *
 * @connexum/ai-governance P3-T2
 */
/**
 * The six canonical approval-gate action classes.
 *
 * Each class corresponds to a category of action that carries distinct risk
 * profile and therefore needs its own governance configuration.
 *
 * Rationale for each class:
 *
 *   DESTRUCTIVE      -- Actions that delete or overwrite data with no obvious
 *                       rollback path. Examples: rm -rf, DROP TABLE, overwrite
 *                       production config with no backup.
 *
 *   IRREVERSIBLE     -- Actions that cannot be undone once committed. Examples:
 *                       blockchain transactions, email sends to external parties,
 *                       publishing artefacts to a registry that does not support
 *                       deletion (npm, PyPI with immutable releases).
 *
 *   FINANCIAL        -- Actions that move or commit money. Examples: payment API
 *                       calls, subscription changes, contract execution, invoice
 *                       generation that triggers billing.
 *
 *   DATA_EXPORT      -- Actions that copy regulated data outside the governance
 *                       boundary. Examples: exporting PII to a third party,
 *                       generating a report file containing PHI, S3 bucket policy
 *                       changes that make data public.
 *
 *   NETWORK_EGRESS   -- Actions that establish outbound network connections to
 *                       external systems. Examples: HTTP requests to third-party
 *                       APIs, webhook delivery, DNS lookups for non-allowlisted
 *                       domains, SSH tunnel creation.
 *
 *   SECRET_ROTATION  -- Actions that create, update, delete, or re-issue
 *                       credentials. Examples: API key regeneration, certificate
 *                       renewal, password changes for service accounts, OAuth
 *                       client secret updates.
 */
export declare enum ActionClass {
    DESTRUCTIVE = "destructive",
    IRREVERSIBLE = "irreversible",
    FINANCIAL = "financial",
    DATA_EXPORT = "data-export",
    NETWORK_EGRESS = "network-egress",
    SECRET_ROTATION = "secret-rotation"
}
/**
 * Disposition for a given action class.
 *
 *   REQUIRES_APPROVAL     -- Block the action and queue it for human approval.
 *                            The call does not return until the approval is
 *                            granted, rejected, or the timeout elapses.
 *
 *   AUTO_APPROVE_LOW_RISK -- Allow the action without queuing, but write an
 *                            audit entry recording the auto-approval. Intended
 *                            for classes where the majority of invocations are
 *                            routine and human latency is unacceptable, but
 *                            a full audit trail is still required.
 *
 *   ALWAYS_DENY           -- Unconditionally refuse the action. No approval
 *                            queue entry is created; the caller receives an
 *                            immediate rejection result. Use when the action
 *                            class is prohibited by policy (e.g., the tenant
 *                            has contractually disabled financial actions).
 */
export type ActionClassDisposition = 'requires-approval' | 'auto-approve-low-risk' | 'always-deny';
/**
 * Per-class configuration controlling gate behaviour for one action class.
 */
export interface ActionClassPolicy {
    /** How the gate handles this class by default. */
    disposition: ActionClassDisposition;
    /**
     * Maximum milliseconds the gate waits for a human decision before timing out.
     * On timeout, the gate defaults to DENY (safe default).
     * Overrides the enforcer-level default when set.
     *
     * Recommended defaults:
     *   financial:        3_600_000  (1 h  -- high-stakes; give humans time)
     *   secret-rotation:  1_800_000  (30 m -- time-sensitive but important)
     *   destructive:        600_000  (10 m -- fast action needed but reviewable)
     *   irreversible:       600_000  (10 m)
     *   data-export:        600_000  (10 m)
     *   network-egress:      60_000  ( 1 m -- typically high-frequency, low-latency)
     */
    timeoutMs?: number;
    /**
     * Optional list of approver IDs that are authorised to approve this class.
     * When set, submitApproval() validates the approverId against this list.
     * When undefined, any approver identity is accepted.
     * Use this for "financial actions require a CFO-role approver" semantics.
     */
    allowedApprovers?: string[];
    /**
     * Human-readable description of why this class has this disposition.
     * Captured in audit entries for compliance documentation.
     */
    rationale?: string;
}
/**
 * Complete per-class policy map. All six classes must be present.
 * Use `buildDefaultClassPolicies()` to start from safe defaults.
 */
export type ClassPolicyMap = Record<ActionClass, ActionClassPolicy>;
/**
 * Safe default per-class policies.
 *
 * These are conservative by design -- all classes default to
 * 'requires-approval'. Operators who want auto-approve for specific
 * classes must explicitly opt in via the enforcer config.
 */
export declare function buildDefaultClassPolicies(): ClassPolicyMap;
/**
 * PT-APPROVAL-2: Validate a ClassPolicyMap at construction time.
 * Throws ConfigValidationError on any invalid value to prevent silent
 * mis-configuration from reaching the gate.
 *
 * Checks:
 *   - All six ActionClass values are present.
 *   - timeoutMs, when set, is a positive finite number.
 *   - disposition is a valid ActionClassDisposition value.
 *   - allowedApprovers, when set, contains at least one entry.
 */
export declare function validateClassPolicies(policies: ClassPolicyMap): void;
export declare class ConfigValidationError extends Error {
    constructor(message: string);
}
//# sourceMappingURL=action-classes.d.ts.map