/** * Whether anything may be measured, and whether anything may leave the machine. * * TWO SWITCHES, DELIBERATELY SEPARATE, because they answer different * questions. `TOKEN_OPTIMIZER_TELEMETRY` aggregates counters locally so a * report has something to show; nothing crosses the network. `..._BEACON` * uploads an anonymous summary. Overloading one flag to mean both would make * every operator who once turned on local stats begin transmitting the moment * they upgraded, having answered a different question. HeadRoom's own * implementation splits them for exactly this reason and says so in its * docstring; the split is worth copying, the default is not. * * BOTH DEFAULT OFF, AND THE BEACON IS OPT-IN. This is the one place this * package diverges from theirs on purpose: their beacon is on unless told * otherwise. We publish a telemetry badge, and a product that ships an * opt-out beacon behind an opt-in badge has lied twice — once in the badge and * once in the default. Lower data volume is the price, and it is the right * price. * * THE WHOLE POLICY IS THE TWO CONSTANTS BELOW, so the default is one line to * audit and one line to reverse. Anything that reads the environment directly * instead of going through here is a second policy, and a second policy is how * a promise gets broken by accident. */ /** Local aggregation. Off unless explicitly enabled. */ export declare const LOCAL_DEFAULT_ON = false; /** Upload. Off unless explicitly enabled — see the note above before changing it. */ export declare const BEACON_DEFAULT_ON = false; /** * The cross-tool opt-out convention. * * Honoured for both switches, and honoured for any value that is not an * explicit off: someone who has already stated this preference should not have * to state it again per tool. `DO_NOT_TRACK=0` is the documented way to say * "no preference", so it is the only value that does not suppress. */ export declare function doNotTrack(env?: NodeJS.ProcessEnv): boolean; /** Is local aggregation permitted? Fail-closed: an unrecognised value is off. */ export declare function localTelemetryEnabled(env?: NodeJS.ProcessEnv): boolean; /** * May anything be uploaded? * * Fail-closed, and independent of local aggregation in one direction only: * upload requires its own explicit yes, but it also requires that we are * allowed to measure at all — there is nothing to send otherwise. */ export declare function beaconEnabled(env?: NodeJS.ProcessEnv): boolean; /** Why transmission is or is not permitted, for `doctor` and for tests. */ export declare function describePolicy(env?: NodeJS.ProcessEnv): string; //# sourceMappingURL=policy.d.ts.map