/**
 * @fileoverview Health snapshot utility to surface observability/runtime readiness.
 * This avoids heavy checks and focuses on quick signals for status endpoints or logs.
 * @module src/utils/internal/health
 */
import { config } from '../../config/index.js';
import { logger } from '../../utils/internal/logger.js';
import { runtimeCaps } from '../../utils/internal/runtime.js';
/**
 * Returns a lightweight, synchronous health snapshot of the running server.
 *
 * Aggregates app identity, runtime environment flags, logger state, and
 * OpenTelemetry configuration into a single object. Suitable for `/healthz`
 * endpoints, startup log lines, or diagnostic tooling.
 *
 * No I/O is performed — all data comes from already-initialized module singletons.
 *
 * @returns A {@link HealthSnapshot} reflecting current server state.
 * @example
 * ```typescript
 * const health = getHealthSnapshot();
 * logger.info('Server health', health);
 * ```
 */
export function getHealthSnapshot() {
    return {
        app: {
            name: config.mcpServerName,
            version: config.mcpServerVersion,
            environment: config.environment,
        },
        runtime: {
            isNode: runtimeCaps.isNode,
            isWorkerLike: runtimeCaps.isWorkerLike,
            isBrowserLike: runtimeCaps.isBrowserLike,
        },
        telemetry: {
            enabled: Boolean(config.openTelemetry.enabled),
            diagLevel: config.openTelemetry.logLevel,
        },
        logging: {
            initialized: logger.isInitialized(),
        },
    };
}
//# sourceMappingURL=health.js.map