import type { TokenStorageResult } from '@doist/cli-core/auth'; import type { CommsAccount, CommsTokenStore } from '../../lib/auth-provider.js'; /** * Surface a `TokenStorageResult` from a save/clear operation: the * human-readable confirmation goes to stdout, any keyring-fallback warning * goes to stderr. Pass `isMachineOutput: true` when the command is in * `--json` / `--ndjson` mode so the stdout confirmation is suppressed and * the warning still reaches the operator on stderr. */ export declare function logTokenStorageResult(result: TokenStorageResult, secureStoreMessage: string, isMachineOutput?: boolean): void; /** * Surface the result of a token-store `clear()` (stashed on the adapter via * `getLastClearResult`, since cli-core's `clear` can't return it directly). * Shared by `auth logout`'s `onCleared` and `account remove`'s `onRemoved` so * the confirmation/warning UX can't drift between the two. */ export declare function logStoredTokenRemoval(store: { getLastClearResult(): TokenStorageResult | undefined; }, view: { json?: boolean; ndjson?: boolean; }): void; export declare function resetCurrentWorkspaceAfterLogin(store: CommsTokenStore, account: CommsAccount): Promise; /** * Drop the `oauthClients` cache of DCR-registered clients that earlier versions * kept in config. Logins now use the client ID metadata document, and * refreshing an existing account reads the client id stored on that account, * so nothing reads the cache any more. Best-effort: login should not fail * because this tidy-up did. */ export declare function clearLegacyOAuthClientsAfterLogin(): Promise; //# sourceMappingURL=helpers.d.ts.map