zephyr-agent
Version:
Zephyr plugin agent
24 lines • 1.16 kB
text/typescript
import { writeFileSync } from 'node:fs';
import { type ZeGitInfo } from '../build-context/ze-util-get-git-info.mjs';
interface PrivateAuthenticationArtifact {
filePath: string;
cleanup(): void;
}
/**
* Check if the user is already authenticated. If not, ask if they want to open a browser
* to authenticate. Display a message to the console.
*
* @returns The token as a string.
*/
export declare function checkAuth(git_config?: ZeGitInfo): Promise<void>;
export { isTokenStillValid } from './token-expiry.mjs';
/**
* Format the one-time authorization URL for the interactive terminal only.
*
* This value must never be passed to `logFn`, a debug logger, an error, or the file
* logger. Keeping this as a dedicated terminal prompt preserves the copy/paste login flow
* while making persistent logging paths redact the state parameter.
*/
export declare function formatAuthenticationPromptForTerminal(authUrl: string, interactive?: string | boolean): string;
export declare function createPrivateAuthenticationArtifact(url: string, writeArtifact?: typeof writeFileSync): PrivateAuthenticationArtifact;
//# sourceMappingURL=login.d.mts.map