/** * The Antigravity usage notice on the CLI (Issue #4438, G4). * * The web UI shows the notice once per browser (the browser remembers it, keyed * by the terms' check date). The CLI's unit is "once per CLI environment": a * small file in CommandMate's own place holds the check date the notice was shown * for: `~/.commandmate` for a global install, the CLI package's root (the checkout * `bin/commandmate.js` lives in, `/antigravity-notice.json` is git-ignored there) * for a local run. Never the cwd: that is the user's working repository. A new * date, a missing, unreadable or malformed file shows it again. * * It is written to stderr only (never stdout, never `--json`): through * `clientWarning`, so on `send` / `ask` / `respond` it comes after a tool-policy * refusal's lines (the reason stays stderr's first line, I7d). Failing to read * or write the record changes nothing else: it shows the notice and goes on. * Only CommandMate's own place is written (never the cwd, never ~/.gemini). * * Under test (`isUnderTest()`, the one judge of that: a Vitest worker, or a child * process with `NODE_ENV=test`) the record is off unless `CM_ANTIGRAVITY_NOTICE_DIR` names a * directory (the suite must not write into a real config directory or into the * checkout); that variable is a test-only record location. * * @module cli/utils/antigravity-notice */ /** File name inside the config directory. */ export declare const ANTIGRAVITY_NOTICE_FILE_NAME = "antigravity-notice.json"; /** Test-only: names a directory for the record instead of CommandMate's own place. */ export declare const ANTIGRAVITY_NOTICE_DIR_ENV = "CM_ANTIGRAVITY_NOTICE_DIR"; /** The notice, one stderr line each. */ export declare function antigravityNoticeLines(): string[]; /** * The root of the running CLI package (where package.json is), found from this * module's location, so it does not depend on the cwd. */ export declare function cliPackageRoot(startDir?: string): string; /** Where the record lives for a real run: `~/.commandmate` (global) or the package root (local). */ export declare function defaultRecordDir(global?: boolean): string; /** * Say the notice (stderr) when `cliToolId` is antigravity and it has not been said * for the current check date in this CLI environment; record that it was. Any other * tool: nothing is said and nothing is written. Returns whether it was said. */ export declare function noteAntigravityNotice(cliToolId: string | undefined, emit?: (line: string) => void): boolean; //# sourceMappingURL=antigravity-notice.d.ts.map