import { type IAgentRuntime, type UUID } from "../../../types/index.ts";
import type { AccessDecision, AccessRequest, ElevationRequest, ElevationResult, Permission, PermissionContext, PermissionDelegation } from "../types/permissions.ts";
import type { SecurityModule } from "./SecurityModule.ts";
import type { TrustEngine } from "./TrustEngine.ts";
export declare class ContextualPermissionSystem {
    private runtime;
    private trustEngine;
    private securityModule;
    private permissionCache;
    private elevations;
    private delegations;
    private static readonly ROLE_PERMISSIONS;
    private static readonly TRUST_ACTION_THRESHOLDS;
    private static readonly TRUST_ONLY_ACTIONS;
    private static readonly ADMIN_ONLY_ACTIONS;
    initialize(runtime: IAgentRuntime, trustEngine: TrustEngine, securityModule: SecurityModule): Promise<void>;
    hasPermission(entityId: UUID, permission: Permission, context: PermissionContext): Promise<boolean>;
    checkAccess(request: AccessRequest): Promise<AccessDecision>;
    private checkRolePermissions;
    private checkTrustPermissions;
    private checkDelegatedPermissions;
    requestElevation(request: ElevationRequest): Promise<ElevationResult>;
    /**
     * Check if the entity has an active (non-expired) elevation grant for the requested action.
     */
    private checkActiveElevations;
    /**
     * Create a delegation granting another entity specific permissions.
     */
    addDelegation(delegation: PermissionDelegation): void;
    /**
     * Revoke a delegation by ID.
     */
    revokeDelegation(delegationId: UUID, revokedBy: UUID): boolean;
    private createDecision;
    private roleHasPermission;
    private getEntityRoles;
    private generateDenialReason;
}
//# sourceMappingURL=ContextualPermissionSystem.d.ts.map