import { type ISupervisionPolicy, type SupervisionAction, type ISupervisionError } from '../Supervision';
import type { IExitSignal } from '../../engine/mailbox/IMailbox';
import type { ICapabilityToken, CapabilityRight } from './ICapabilityToken';
import type { ISupervisorSecurityPolicy } from './ISupervisorSecurityPolicy';
import type { ISecurityRealm, MessageDirection, IVerificationResult, IAttenuationOptions, IMintOptions } from './ISecurityRealm';
import type { ISpawnPolicyService, ISpawnRequest, ISpawnDecision } from './ISpawnPolicyService';
import type { IAuditService } from './IAuditService';
/**
 * SecurityRealm - Composes Supervisor + SecurityPolicy.
 *
 * Joe Armstrong's insight: "Supervision tree = Security tree."
 * The supervisor that handles errors is the same entity that
 * enforces security policy for its children.
 *
 * Expert consensus (2025-12-14):
 * - NO interface split - unified per Vision 27
 * - Composes existing Supervisor - no duplication
 * - Switch dispatch for policy sections - value objects
 *
 * See: Vision/27-SECURITY-FEDERATION-DRAFT.md
 */
export declare class SecurityRealm implements ISecurityRealm {
    private readonly _supervisor;
    private readonly _policy;
    private readonly _spawnPolicy;
    private readonly _auditService;
    private readonly _mintedCapabilities;
    private readonly _revokedCapabilities;
    constructor(supervisionPolicy?: ISupervisionPolicy, securityPolicy?: ISupervisorSecurityPolicy, spawnPolicy?: ISpawnPolicyService, auditService?: IAuditService);
    /** Get the audit service (for querying audit trail) */
    get auditService(): IAuditService;
    /** Realm identifier */
    get realm(): string;
    handleError(error: ISupervisionError): Promise<SupervisionAction>;
    handleExitSignal(signal: IExitSignal): Promise<SupervisionAction>;
    getRestartDelayMs(): number;
    isRestartAllStrategy(): boolean;
    resetChild(childId: string): void;
    /**
     * Mint a new capability for a target.
     */
    mintCapability(target: string, rights: CapabilityRight[], options?: IMintOptions): ICapabilityToken;
    /**
     * Attenuate a capability (reduce rights).
     *
     * Mark Miller: "Capabilities can only be attenuated, never amplified."
     */
    attenuateCapability(token: ICapabilityToken, options: IAttenuationOptions): ICapabilityToken;
    /**
     * Check if a capability is valid.
     *
     * Mark Miller: "Capabilities must be unforgeable."
     * We verify against our stored records, not the passed token's fields.
     */
    isCapabilityValid(token: ICapabilityToken): boolean;
    /**
     * Revoke a capability.
     */
    revokeCapability(tokenId: string): void;
    /**
     * Verify if a message is allowed by policy.
     */
    verifyMessage(direction: MessageDirection, capability?: ICapabilityToken, context?: {
        principal?: string;
        target?: string;
        command?: string;
    }): IVerificationResult;
    /**
     * Evaluate a spawn request against the security policy.
     *
     * Called before creating a child component to check if:
     * - The component type is allowed
     * - The props are acceptable (may be sanitized)
     * - The requestor has permission to spawn
     *
     * @param request - Spawn request details
     * @returns Decision with allowed/denied and optional modifications
     */
    evaluateSpawn(request: ISpawnRequest): ISpawnDecision;
    /**
     * Get the base policy section for a direction.
     * Returns only the common fields (requireCapability).
     *
     * Carl Hewitt: "Policy sections are VALUE OBJECTS.
     * Switch is appropriate for value-object dispatch."
     */
    private _getPolicySection;
    /**
     * Get verification depth for directions that support it.
     * Parent-to-child has no verification depth (parent is trusted).
     */
    private _getVerificationDepth;
    /**
     * Get audit level for a direction.
     *
     * Vision 27 Section 7.3:
     * - External: always 'full'
     * - Child-to-parent: per policy
     * - Parent-to-child: no audit level (uses 'none')
     * - Sibling: per policy (uses external as proxy)
     */
    private _getAuditLevel;
}
//# sourceMappingURL=SecurityRealm.d.ts.map