import type { AdaptiveRuntimeCaller, AdaptiveRuntimeGate } from "./adaptiveCapabilitySelector.js";
export type AdaptiveResourceName = "concurrency" | "tokenBudget" | "memoryMb" | "timeoutMs" | (string & {});
export type AdaptiveResourceTunerBoundary = "input" | "contract" | "governance" | "runtime-state" | "resource" | "scope";
export type AdaptiveResourceTunerErrorCode = "MISSING_RUNTIME_ID" | "MISSING_CALLER" | "MISSING_RESOURCES" | "MISSING_RESOURCE_NAME" | "INVALID_RESOURCE_RANGE" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED";
export type AdaptiveResourceTunerError = {
    code: AdaptiveResourceTunerErrorCode;
    message: string;
    boundary: AdaptiveResourceTunerBoundary;
    publicSafe: true;
};
export type AdaptiveResourceSignalInput = {
    loadRatio?: number;
    errorRate?: number;
    latencyMs?: number;
    budgetPressure?: number;
};
export type AdaptiveResourceInput = {
    name?: AdaptiveResourceName;
    current?: number;
    min?: number;
    max?: number;
    step?: number;
    scopes?: readonly string[];
    metadata?: Readonly<Record<string, unknown>>;
};
export type AdaptiveResourceTunerMode = "conservative" | "balanced" | "aggressive" | (string & {});
export type AdaptiveResourceTunerRequest = {
    runtimeId?: string;
    caller?: AdaptiveRuntimeCaller;
    resources?: readonly AdaptiveResourceInput[];
    signals?: AdaptiveResourceSignalInput;
    mode?: AdaptiveResourceTunerMode;
    allowedScopes?: readonly string[];
    runtimeReady?: boolean;
    contract?: AdaptiveRuntimeGate;
    governance?: AdaptiveRuntimeGate;
};
export type AdaptiveResourceSnapshot = {
    name: AdaptiveResourceName;
    current: number;
    min: number;
    max: number;
    step: number;
    scopes: readonly string[];
    metadata: Readonly<Record<string, unknown>>;
};
export type AdaptiveResourceRecommendation = {
    name: AdaptiveResourceName;
    current: number;
    recommended: number;
    delta: number;
    reason: "pressure-high" | "pressure-low" | "stable";
};
export type AdaptiveResourceTuningPlan = {
    planId: string;
    runtimeId: string;
    caller: AdaptiveRuntimeCaller;
    route: "runtime.adaptiveRuntime.adaptiveResourceTuner";
    mode: AdaptiveResourceTunerMode;
    signals: Required<AdaptiveResourceSignalInput>;
    resources: readonly AdaptiveResourceSnapshot[];
    recommendations: readonly AdaptiveResourceRecommendation[];
    contractChecked: true;
    governanceChecked: true;
    dryRun: true;
    unsafeSideEffects: false;
};
export type AdaptiveResourceTunerResult = {
    ok: true;
    plan: AdaptiveResourceTuningPlan;
    events: readonly string[];
} | {
    ok: false;
    error: AdaptiveResourceTunerError;
    events: readonly string[];
};
export declare function tuneAdaptiveResources(request?: AdaptiveResourceTunerRequest): AdaptiveResourceTunerResult;
