Add interactive ValidationDialog for handling 403 VALIDATION_REQUIRED errors. (#16231)

This commit is contained in:
Gaurav
2026-01-20 16:23:01 -08:00
committed by GitHub
parent aceb06a587
commit 3b626e7c61
18 changed files with 1060 additions and 12 deletions
+18
View File
@@ -37,3 +37,21 @@ export type FallbackModelHandler = (
fallbackModel: string,
error?: unknown,
) => Promise<FallbackIntent | null>;
/**
* Defines the intent returned by the UI layer during a validation required scenario.
*/
export type ValidationIntent =
| 'verify' // User chose to verify, wait for completion then retry.
| 'change_auth' // User chose to change authentication method.
| 'cancel'; // User cancelled the verification process.
/**
* The interface for the handler provided by the UI layer (e.g., the CLI)
* to interact with the user when validation is required.
*/
export type ValidationHandler = (
validationLink?: string,
validationDescription?: string,
learnMoreUrl?: string,
) => Promise<ValidationIntent>;