import type { RuntimeAccessSession, RuntimeAccessSessionGate } from "./runtimeAccessSession.js";
import type { ManagementCommandEffect, ManagementCommandEnvelope, ManagementPolicyDecision, ManagementPolicyRule } from "./managementPolicyGate.js";
export type ManagementCommandRouteBoundary = "input" | "contract" | "governance" | "runtime-state" | "scope" | "session" | "router";
export type ManagementCommandRouterErrorCode = "MISSING_COMMAND" | "MISSING_SESSION" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "POLICY_REJECTED" | "POLICY_DENIED" | "ROUTE_NOT_FOUND" | "ROUTE_NOT_READY";
export type ManagementCommandRoute = {
    routeId: string;
    commandNames?: readonly string[];
    targetSurfaces?: readonly string[];
    requiredEffects?: readonly ManagementCommandEffect[];
    handlerRef?: string;
    mounted?: boolean;
    ready?: boolean;
};
export type ManagementCommandRouterRequest = {
    command?: ManagementCommandEnvelope;
    session?: RuntimeAccessSession;
    routes?: readonly ManagementCommandRoute[];
    policyRules?: readonly ManagementPolicyRule[];
    allowedEffects?: readonly ManagementCommandEffect[];
    runtimeReady?: boolean;
    nowIso?: string;
    contract?: RuntimeAccessSessionGate;
    governance?: RuntimeAccessSessionGate;
};
export type ManagementCommandRoutePlan = {
    runtimeId: string;
    commandId: string;
    commandName: string;
    routeId: string;
    targetSurface: string;
    handlerRef?: string;
    dispatchMode: "dry-run";
    policyStatus: ManagementPolicyDecision["status"];
    approvalRequired: boolean;
    governanceChecked: true;
    contractChecked: true;
    unsafeSideEffects: false;
};
export type ManagementCommandRouterError = {
    code: ManagementCommandRouterErrorCode;
    message: string;
    boundary: ManagementCommandRouteBoundary;
    safeForApplication: true;
    internalDetailExposed: false;
};
export type ManagementCommandRouterResult = {
    ok: true;
    plan: ManagementCommandRoutePlan;
    policy: ManagementPolicyDecision;
    events: readonly string[];
} | {
    ok: false;
    error: ManagementCommandRouterError;
    policy?: ManagementPolicyDecision;
    events: readonly string[];
};
export declare const managementCommandRouterDescriptor: {
    readonly surface: "runtime.managementPlane";
    readonly capability: "managementCommandRouter";
    readonly purpose: "route management command envelopes to a dry-run runtime surface plan after policy checks";
    readonly mode: "dry-run";
    readonly unsafeSideEffects: false;
};
export declare function routeManagementCommand(request?: ManagementCommandRouterRequest): ManagementCommandRouterResult;
