/**
 * @fileoverview Runtime capability detection for multi-environment support.
 * Detects presence of Node features, Web/Workers APIs, and common globals.
 * @module src/utils/internal/runtime
 */
/**
 * Snapshot of runtime feature availability detected at module load time.
 * All fields are booleans computed once via safe feature-detection; they never
 * throw and never change after the module is first imported.
 *
 * Note: `isNode` and `isWorkerLike` can both be `true` simultaneously when a
 * Worker runtime exposes a Node-compatible `process` global (e.g., Cloudflare
 * Workers with the `nodejs_compat` flag). Gate Node-only filesystem and
 * transport features on `isNode && !isWorkerLike`.
 */
export interface RuntimeCapabilities {
    /** True when the Node.js `Buffer` global is available. */
    hasBuffer: boolean;
    /** True when `globalThis.performance.now` is a callable function. */
    hasPerformanceNow: boolean;
    /** True when the `process` global is defined (Node.js, Bun, or some bundled envs). */
    hasProcess: boolean;
    /** True when `TextEncoder` is available on `globalThis`. */
    hasTextEncoder: boolean;
    /** True when running in a browser main thread (has `window`, not a Worker or Node). */
    isBrowserLike: boolean;
    /**
     * True when running under Bun.
     * Bun sets both `process.versions.node` and `process.versions.bun`,
     * so `isNode` is also true in Bun environments.
     */
    isBun: boolean;
    /**
     * True when `process.versions.node` is a string. This is true in Node.js
     * and Bun, and also in Cloudflare Workers with the `nodejs_compat` flag.
     * Use `isNode && !isWorkerLike` to gate code that requires a real Node
     * runtime (e.g., `pino/file` transports, `node:worker_threads`).
     */
    isNode: boolean;
    /**
     * True when running inside a Cloudflare Worker or a Web Worker. Detected
     * via `navigator.userAgent === 'Cloudflare-Workers'` (canonical for CF
     * Workers with the `global_navigator` flag, auto-enabled on recent
     * compatibility dates) with a `WorkerGlobalScope` fallback for other
     * worker environments.
     */
    isWorkerLike: boolean;
}
/**
 * Singleton snapshot of runtime capabilities for the current environment.
 * Computed once at module load; safe to read at any time without async.
 *
 * @example
 * ```typescript
 * import { runtimeCaps } from './runtime.js';
 *
 * if (runtimeCaps.hasBuffer) {
 *   // Node.js / Bun path — use Buffer for encoding
 * } else {
 *   // Worker / browser path — use Web APIs
 * }
 * ```
 */
export declare const runtimeCaps: RuntimeCapabilities;
//# sourceMappingURL=runtime.d.ts.map