/**
 * Handles dashboard.diagnostics requests from Platform.
 *
 * Reads the AgentRegistry for connected agent info, extracts orchestrator
 * metadata from config, and computes label gap information from the job queue.
 *
 * Returns a response matching dashboardDiagnosticsResponseSchema.
 */
import type { AgentRegistry } from '../agent/registry.js';
import type { AppConfig } from '../config.js';
import type { ScalerManager } from '../scaler/manager.js';
import type { ScalerConfig, ScalerEntry } from '../scaler/types.js';
import type { DashboardDiagnosticsResponse, DashboardScalerCapacityResponse, DashboardScalerAgentsResponse } from '@kici-dev/engine';
import type { PeerRegistry } from '../cluster/peer-registry.js';
import type { RaftNode } from '../cluster/raft.js';
export interface DiagnosticsHandlerDeps {
    agentRegistry: AgentRegistry;
    config: AppConfig;
    /** Orchestrator version string (e.g. "0.0.1"). */
    version: string;
    /** Unique scaler backend types (e.g. ["container", "firecracker"]). */
    scalerBackends: string[];
    /** Optional job queue for queued job count. */
    jobQueue?: {
        getDepth(): Promise<number>;
    };
    /** Optional scaler manager for agent-to-scaler mapping. */
    scalerManager?: ScalerManager | null;
    /** Optional scaler config for scaler details. */
    scalerConfig?: ScalerConfig | null;
    /** Optional peer registry for cluster coordinator mode. */
    peerRegistry?: PeerRegistry | null;
    /** Optional Raft node for cluster election state. */
    raftNode?: RaftNode | null;
}
/**
 * Build a safe config subset for a scaler entry (no secrets like socketPath, uid, gid, etc).
 * Uses an explicit allowlist to prevent accidental secret leaks.
 */
export declare function buildSafeScalerConfig(entry: ScalerEntry): Record<string, unknown>;
/**
 * Build a diagnostics response for the given request.
 * When includeAgents is false (default), agents[] is empty and aggregate fields are populated.
 */
export declare function handleDiagnosticsRequest(deps: DiagnosticsHandlerDeps, requestId: string, includeAgents?: boolean): Promise<DashboardDiagnosticsResponse>;
/**
 * Build a per-scaler capacity response for the given request.
 * Reads ScalerManager status to get active/max counts per backend.
 */
export declare function handleScalerCapacityRequest(scalerManager: ScalerManager | null, requestId: string): DashboardScalerCapacityResponse;
/**
 * Build a per-scaler agents response for the given request.
 * When scalerName is null, returns agents not bound to any scaler (stateful agents).
 */
export declare function handleScalerAgentsRequest(deps: DiagnosticsHandlerDeps, requestId: string, scalerName: string | null): DashboardScalerAgentsResponse;
//# sourceMappingURL=dashboard-diagnostics-handler.d.ts.map