import { TelemetryEventName } from "./payload"; /** * Asking, and what the question looks like. * * ## Why the prompt comes *after* the work * * The first `rebase init` on a machine is the event most worth having, and it * is the one where no consent exists yet. Asking before scaffolding puts a * privacy negotiation in front of someone who has not yet seen the tool do * anything — the worst possible moment, and a reliable way to get a reflexive * no. * * So the question is asked once the project exists and the user has seen it * work. The event's data is still in memory at that point, so nothing is lost * by waiting, and — this is the part that matters — **nothing has been * transmitted or written**. Declining leaves no id, no file, no record. * * ## Why the payload is shown rather than described * * "Anonymous usage data" is a phrase that has been used to mean almost * anything. Printing the exact JSON costs four lines of output and replaces a * claim the user has to take on faith with something they can read. It is also * the same builder the sender uses, so it cannot drift into a comfortable * fiction. */ /** True when we may ask: no decision recorded, and nothing else forbids it. */ export declare function shouldPrompt(env?: NodeJS.ProcessEnv): boolean; export declare function renderPreview(event: TelemetryEventName, properties: Record): string; /** * Ask, record the answer, and report it. * * Never throws and never blocks a non-interactive run: `rebase init --yes` in * CI must behave exactly as it does today, which means not asking and not * sending. */ export declare function promptForConsent(event: TelemetryEventName, properties: Record): Promise; /** Human-readable current state, for `rebase telemetry status`. */ export declare function describeState(env?: NodeJS.ProcessEnv): string;