import * as Effect from "effect/Effect"; import * as FileSystem from "effect/FileSystem"; import * as Layer from "effect/Layer"; import * as ServiceMap from "effect/Context"; import * as Path from "effect/Path"; import * as HttpClient from "effect/unstable/http/HttpClient"; import type { TelemetryMode } from "./mode.js"; export type TelemetryPropertyValue = string | number | boolean | null; export type TelemetryProperties = Record; export type TelemetryErrorClass = "internal" | "user" | "external"; export interface TelemetryClientService { readonly trackEvent: (event: string, properties?: TelemetryProperties, options?: { /** Await the send (bounded) so the event lands before process exit. */ readonly bounded?: boolean; }) => Effect.Effect; readonly reportError: (error: { readonly name: string; readonly category?: string; readonly level: "error" | "fatal"; readonly errorClass: TelemetryErrorClass; readonly handled: boolean; readonly command: string; }) => Effect.Effect; } /** * The host facts telemetry observes. It is a port because observing the host * is a native boundary that can fail, and a failure there must be invisible * to the command — which is only demonstrable when the failure can be stated. */ export interface TelemetryHostObservation { readonly osRelease: () => string; } export declare const nodeTelemetryHost: TelemetryHostObservation; export interface TelemetryClientOptions { readonly mode: TelemetryMode; readonly command: string; readonly client: { readonly name: string; readonly version: string; }; /** * Deliver even while the repository's own test run is executing. Delivery * is suppressed under Vitest so no test reaches the telemetry service; a * specification that observes delivery asks for it explicitly here. */ readonly deliverInTest?: boolean; /** Where non-identifying operating-system facts come from. */ readonly host?: TelemetryHostObservation; /** Deterministic test seam; production persists a random installation ID. */ readonly installationId?: string; /** Deterministic test seam; production assigns a fresh event ID per event. */ readonly eventIdFactory?: () => string; } declare const TelemetryClient_base: ServiceMap.ServiceClass; export declare class TelemetryClient extends TelemetryClient_base { } export declare const TelemetryClientTest: Layer.Layer; export declare const TELEMETRY_EVENT_TIMEOUT = "250 millis"; export declare const makeTelemetryClient: (options: TelemetryClientOptions) => Effect.Effect; export declare const TelemetryClientLive: (options: TelemetryClientOptions) => Layer.Layer; export {}; //# sourceMappingURL=client.d.ts.map