#!/usr/bin/env node /** * `token-optimizer-rollout` -- which behaviours are on, and why. * * WHY A COMMAND AND NOT JUST THE DOCTOR SECTION. `doctor` answers the question * for the environment it is running in. The question a person actually has is * conditional: "if I set the canary channel and ask for these two features, * what would I get?" Answering that through `doctor` means exporting variables * into a shell, running it, and remembering to unset them -- and if the answer * is "nothing changed" they cannot tell a wrong channel name from a feature * their channel does not carry. * * `resolveRollout` already took `requested`, `disabled` and `strict`, and no * shipped caller passed any of them. This is the surface those parameters were * written for: the doc comment on `parseChannel` calls it "the inspector". * * WHY --strict EXITS NON-ZERO. A typo in `TOKEN_OPTIMIZER_FEATURES` is * normally ignored on purpose, because a hook that dies over a misspelled flag * is worse than one that runs with a default. That leniency is wrong in CI, * where the whole point is to find out. `--strict` turns every refusal into a * failure so a pipeline can assert its own configuration is spelled correctly. * * READS NOTHING AND WRITES NOTHING. No cache, no network, no files: this * command resolves variables and prints the result. */ import { type RolloutSnapshot } from './resolve.js'; interface Options { readonly channel: string | null; readonly requested: readonly string[]; readonly disabled: readonly string[]; readonly all: boolean; readonly json: boolean; readonly strict: boolean; readonly help: boolean; } /** * Parse argv, refusing a flag this command does not have and a flag that was * given no value. * * `--channel` with nothing after it silently becoming "no channel" is the * failure mode worth spending an error on: the reader asked a conditional * question and would be shown the unconditional answer. */ export declare function parseArguments(args: readonly string[]): Options | string; /** * The snapshot as plain data. * * Built field by field rather than handed to `JSON.stringify`, because the * snapshot carries methods: stringifying it directly would quietly drop * `digest()` -- the one field that lets two runs be compared -- and would pick * up whatever is added to the interface later without anyone deciding that it * belongs in a published shape. */ export declare function snapshotJson(snapshot: RolloutSnapshot): Record; /** Injected so a test never reads the real environment or the real stdout. */ export interface MainDependencies { readonly env?: NodeJS.ProcessEnv; readonly write?: (text: string) => void; } export declare function main(args: readonly string[], dependencies?: MainDependencies): Promise; export {}; //# sourceMappingURL=cli.d.ts.map