mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-22 22:52:03 +00:00
refactor(plugins): move provider onboarding auth into plugins
This commit is contained in:
@@ -119,6 +119,15 @@ export type ProviderAuthContext = {
|
||||
workspaceDir?: string;
|
||||
prompter: WizardPrompter;
|
||||
runtime: RuntimeEnv;
|
||||
/**
|
||||
* Optional onboarding CLI options that triggered this auth flow.
|
||||
*
|
||||
* Present for setup/configure/auth-choice flows so provider methods can
|
||||
* honor preseeded flags like `--openai-api-key` or generic
|
||||
* `--token/--token-provider` pairs. Direct `models auth login` usually
|
||||
* leaves this undefined.
|
||||
*/
|
||||
opts?: Partial<OnboardOptions>;
|
||||
/**
|
||||
* Onboarding secret persistence preference.
|
||||
*
|
||||
@@ -187,6 +196,14 @@ export type ProviderAuthMethod = {
|
||||
label: string;
|
||||
hint?: string;
|
||||
kind: ProviderAuthKind;
|
||||
/**
|
||||
* Optional wizard/onboarding metadata for this specific auth method.
|
||||
*
|
||||
* Use this when one provider exposes multiple setup entries (for example API
|
||||
* key + OAuth, or region-specific login flows). OpenClaw uses this to expose
|
||||
* method-specific auth choices while keeping the provider id stable.
|
||||
*/
|
||||
wizard?: ProviderPluginWizardSetup;
|
||||
run: (ctx: ProviderAuthContext) => Promise<ProviderAuthResult>;
|
||||
runNonInteractive?: (
|
||||
ctx: ProviderAuthMethodNonInteractiveContext,
|
||||
|
||||
Reference in New Issue
Block a user