export type GovernancePolicySource = "dsl" | "application-config" | "official-module" | "management-plane";
export type GovernancePolicyEffect = "allow" | "deny" | "approval-required" | "degrade";
export type GovernancePolicyCompilerBoundary = "input" | "contract" | "governance" | "runtime-state";
export type GovernancePolicyCompilerErrorCode = "MISSING_RUNTIME_ID" | "MISSING_POLICY_ID" | "MISSING_POLICY_SOURCE" | "INVALID_POLICY_PRIORITY" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED";
export type GovernancePolicyGateCheck = {
    accepted: boolean;
    reason?: string;
};
export type GovernancePolicyDefaults = {
    effect?: GovernancePolicyEffect;
    subjects?: readonly string[];
    actions?: readonly string[];
    scopes?: readonly string[];
};
export type GovernancePolicyDeclaration = {
    policyId: string;
    source?: GovernancePolicySource;
    priority?: number;
    effect?: GovernancePolicyEffect;
    subjects?: readonly string[];
    actions?: readonly string[];
    scopes?: readonly string[];
    disabled?: boolean;
    overrides?: readonly string[];
    reason?: string;
};
export type CompiledGovernanceRule = {
    ruleId: string;
    policyId: string;
    source: GovernancePolicySource;
    priority: number;
    effect: GovernancePolicyEffect;
    subjects: readonly string[];
    actions: readonly string[];
    scopes: readonly string[];
    reason?: string;
    overrides: readonly string[];
};
export type CompiledGovernancePolicySet = {
    runtimeId: string;
    defaultEffect: GovernancePolicyEffect;
    rules: readonly CompiledGovernanceRule[];
    disabledPolicyIds: readonly string[];
    overriddenPolicyIds: readonly string[];
    readyForRuntimeEvaluation: true;
    unsafeSideEffects: false;
};
export type GovernancePolicyCompilerRequest = {
    runtimeId?: string;
    policies?: readonly GovernancePolicyDeclaration[];
    defaults?: GovernancePolicyDefaults;
    runtimeReady?: boolean;
    contract?: GovernancePolicyGateCheck;
    governance?: GovernancePolicyGateCheck;
};
export type GovernancePolicyCompilerError = {
    code: GovernancePolicyCompilerErrorCode;
    message: string;
    boundary: GovernancePolicyCompilerBoundary;
    safeForInspection: true;
};
export type GovernancePolicyCompilerResult = {
    ok: true;
    policySet: CompiledGovernancePolicySet;
    events: readonly string[];
} | {
    ok: false;
    error: GovernancePolicyCompilerError;
    events: readonly string[];
};
export declare function compileGovernancePolicySet(request?: GovernancePolicyCompilerRequest): GovernancePolicyCompilerResult;
