/**
 * Negative memo for failed/cancelled macOS keychain reads (the "back-off").
 *
 * A cancelled Touch ID sheet is the user saying "not now" — but a polling
 * caller (AGI EXT host's `agents view` loop, a watch script)
 * retries the same read a few seconds later and pops the sheet again, forever.
 * The headless guard (index.ts `assertRawKeychainReadAllowed`) covers the
 * no-TTY case; this memo covers a context that CAN prompt but just had its
 * prompt cancelled or fail: the next read of the same item within the TTL
 * throws the back-off error instead of re-prompting. Any successful read (or
 * write) of the item clears the memo.
 *
 * Stored as regenerable state under `~/.agents/.cache/keychain-read-backoff/`,
 * one file per item (filename is a hash of the item name; the file carries no
 * secret material — a name and a deadline only). All operations are
 * best-effort: a lost memo costs at most one extra prompt, never a read.
 */
/** How long a failed/cancelled read suppresses retries of the same item. */
export declare const KEYCHAIN_READ_BACKOFF_TTL_MS: number;
/** Test seam: point the memo at a temp dir so tests never touch the real cache. */
export declare function setKeychainReadBackoffDirForTest(dir: string | null): void;
/** True while `key` is inside the back-off window opened by a failed/cancelled read. */
export declare function isKeychainReadBackedOff(key: string, now?: number): boolean;
/** Open (or refresh) the back-off window for `key` after a failed/cancelled read. */
export declare function noteKeychainReadFailure(key: string, now?: number): void;
/** Clear the memo: a successful read or write of the item resets the back-off. */
export declare function clearKeychainReadBackoff(key: string): void;
