//#region src/telemetry/index.d.ts /** * Zero-default telemetry stub. * * The framework promises to make zero outbound network calls without * an explicit user action. This module exists so consumers can: * * - inspect the telemetry posture from CLI / health endpoints, * - register the reserved `GRAPHORIN_TELEMETRY` / `GRAPHORIN_NO_PHONE_HOME` * environment variables for forward compatibility, * - assert in tests that no implicit telemetry surface exists. * * Attempting to enable telemetry pre-v0.2 returns a sentinel result; it * never opens a socket. * * @packageDocumentation */ /** * Result returned by {@link getTelemetryStatus}. * * @stable */ interface TelemetryStatus { /** Always `false` in v0.1. Reserved field. */ readonly enabled: false; /** Plain-English explanation of the current state. */ readonly reason: string; /** Resolved value of `GRAPHORIN_TELEMETRY` (if any). */ readonly env?: string; /** Resolved value of `GRAPHORIN_NO_PHONE_HOME` (if any). */ readonly noPhoneHome?: string; } /** * Snapshot of the telemetry posture. Reads from `process.env` once * unless `env` is provided. * * @stable */ declare function getTelemetryStatus(env?: NodeJS.ProcessEnv): TelemetryStatus; /** * Best-effort enable hook. Always returns the sentinel * `{ status: 'disabled', reason: ... }` payload. Reserved for v0.2+. * * @stable */ declare function enableTelemetry(): { readonly status: 'disabled'; readonly reason: string; }; /** * Detect the reserved env vars and emit one informational line per * process. Returns the lines as an array so callers can route them to * any sink they like (defaults to `console.info`). * * @stable */ declare function announceTelemetryPosture(opts?: { readonly env?: NodeJS.ProcessEnv; readonly sink?: (line: string) => void; }): ReadonlyArray; //#endregion export { TelemetryStatus, announceTelemetryPosture, enableTelemetry, getTelemetryStatus }; //# sourceMappingURL=index.d.ts.map