/** * Sending the diagnostic report, only when the person running KONECK has asked for it. * * There is a fair version of "know how KONECK is doing across everyone's machines" and an unfair * one, and they are not close. The fair version is a count: how often it crashes, where the time * goes, which failure modes are common, on what kind of hardware. None of that needs to know what * anyone is building. The unfair version reads their files to find out — and that is not telemetry, * it is surveillance, and it is refused elsewhere in this codebase for the reason it should be. * * So this sends the report from `report.ts`, which is built to hold nothing of the work: no prompt, * no reply, no reasoning, no file content, no path, no hostname, no username. And it sends it only * when two conditions are both true — `telemetry` is on and `telemetryUrl` is set — so a fresh * install sends nothing to anyone, and what it does send goes only to the address the person chose. * * ## Why it is arranged to be impossible to make covert by accident * * Default off. No baked-in URL. Fails silently and never blocks the run. Every one of those is so * that turning this into something it should not be takes a deliberate, visible change rather than * a default nobody noticed. A telemetry switch that is easy to flip to "on for everyone, sending * home" is one code review away from being the thing this comment says it is not. */ import type { Report } from './report.js'; export interface TelemetryConfig { enabled?: boolean; url?: string; } /** Whether a report would actually be sent, so a caller can skip building one when it would not. */ export declare function telemetryActive(cfg: TelemetryConfig): boolean; /** * Sends one report, and never gets in the way. * * Bounded, because a slow or dead collector must not hold up the end of a run — the report is a * convenience for whoever maintains KONECK, and the person whose machine it is gets nothing from * waiting on it. Any failure is swallowed for the same reason: a run that worked must not be * reported as failed because a stats endpoint was down. * * Returns whether it was sent, which the terminal uses to say so — because a machine sending * anything anywhere should be able to show that it did. */ export declare function sendTelemetry(report: Report, cfg: TelemetryConfig, fetchImpl?: typeof fetch): Promise; //# sourceMappingURL=telemetry.d.ts.map