/** * Options for {@link inferEnvironmentName}. * Tests pass a custom `scope` to simulate worker / window globals. */ export type InferEnvironmentNameOptions = { scope?: unknown; }; /** * Infer a writer/environment identifier from the current execution context. * * Safe to invoke in any JS runtime — never throws. Falls back to `unknown::` * when the runtime can't be classified. * * Format is always three colon-separated segments: `::`. * - `scope` — `tab | dedicated-worker | shared-worker | service-worker | cf-worker | node | unknown`. * - `name` — `location.origin` for tabs, `self.name` for browser workers, `process.pid` * for node, empty for cf-workers / service workers / anonymous workers. * Note that `name` may itself contain `:` (e.g. `http://localhost:5173`); when parsing, * take the first segment as scope and the last as suffix, and treat everything in * between as the name. * - `suffix` — 6-char random; stable per-tab via `sessionStorage`, fresh per worker / process instance. */ export declare const inferEnvironmentName: (options?: InferEnvironmentNameOptions) => string; //# sourceMappingURL=environment.d.ts.map