mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-25 20:05:46 -06:00
improve(setup): clarify local provider actions
This commit is contained in:
@@ -1258,6 +1258,7 @@ describe("loadPluginManifestRegistry", () => {
|
||||
assistantPriority: 10,
|
||||
assistantVisibility: "visible",
|
||||
appGuidedSecret: true,
|
||||
appGuidedActionLabel: "Connect account",
|
||||
appGuidedDiscovery: true,
|
||||
},
|
||||
],
|
||||
@@ -1326,6 +1327,7 @@ describe("loadPluginManifestRegistry", () => {
|
||||
assistantPriority: 10,
|
||||
assistantVisibility: "visible",
|
||||
appGuidedSecret: true,
|
||||
appGuidedActionLabel: "Connect account",
|
||||
appGuidedDiscovery: true,
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -321,6 +321,7 @@ export function normalizeProviderAuthChoices(
|
||||
const cliOption = normalizeOptionalString(entry.cliOption) ?? "";
|
||||
const cliDescription = normalizeOptionalString(entry.cliDescription) ?? "";
|
||||
const appGuidedSecret = entry.appGuidedSecret === true;
|
||||
const appGuidedActionLabel = normalizeOptionalString(entry.appGuidedActionLabel) ?? "";
|
||||
const appGuidedAuth =
|
||||
entry.appGuidedAuth === "oauth" || entry.appGuidedAuth === "device-code"
|
||||
? entry.appGuidedAuth
|
||||
@@ -351,6 +352,7 @@ export function normalizeProviderAuthChoices(
|
||||
...(cliOption ? { cliOption } : {}),
|
||||
...(cliDescription ? { cliDescription } : {}),
|
||||
...(appGuidedSecret ? { appGuidedSecret: true } : {}),
|
||||
...(appGuidedActionLabel ? { appGuidedActionLabel } : {}),
|
||||
...(appGuidedAuth ? { appGuidedAuth } : {}),
|
||||
...(onboardingScopes.length > 0 ? { onboardingScopes } : {}),
|
||||
});
|
||||
|
||||
@@ -550,6 +550,8 @@ export type PluginManifestProviderAuthChoice = {
|
||||
cliDescription?: string;
|
||||
/** One pasted secret plus provider defaults is sufficient for app-guided setup. */
|
||||
appGuidedSecret?: boolean;
|
||||
/** Short provider-owned command label for starting app-guided setup. */
|
||||
appGuidedActionLabel?: string;
|
||||
/** Provider-owned interactive login that native setup clients can render generically. */
|
||||
appGuidedAuth?: "oauth" | "device-code";
|
||||
/**
|
||||
|
||||
@@ -322,6 +322,7 @@ describe("provider auth choice manifest helpers", () => {
|
||||
cliFlag: "--openai-api-key",
|
||||
cliOption: "--openai-api-key <key>",
|
||||
appGuidedSecret: true,
|
||||
appGuidedActionLabel: "Connect account",
|
||||
appGuidedDiscovery: true,
|
||||
},
|
||||
],
|
||||
@@ -368,6 +369,7 @@ describe("provider auth choice manifest helpers", () => {
|
||||
cliFlag: "--openai-api-key",
|
||||
cliOption: "--openai-api-key <key>",
|
||||
appGuidedSecret: true,
|
||||
appGuidedActionLabel: "Connect account",
|
||||
appGuidedDiscovery: true,
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -31,6 +31,7 @@ export type ProviderAuthChoiceMetadata = {
|
||||
cliOption?: string;
|
||||
cliDescription?: string;
|
||||
appGuidedSecret?: boolean;
|
||||
appGuidedActionLabel?: string;
|
||||
appGuidedDiscovery?: boolean;
|
||||
appGuidedAuth?: "oauth" | "device-code";
|
||||
onboardingScopes?: ("text-inference" | "image-generation" | "music-generation")[];
|
||||
@@ -113,6 +114,7 @@ function toProviderAuthChoiceCandidate(params: {
|
||||
...(choice.cliOption ? { cliOption: choice.cliOption } : {}),
|
||||
...(choice.cliDescription ? { cliDescription: choice.cliDescription } : {}),
|
||||
...(choice.appGuidedSecret ? { appGuidedSecret: true } : {}),
|
||||
...(choice.appGuidedActionLabel ? { appGuidedActionLabel: choice.appGuidedActionLabel } : {}),
|
||||
...(choice.appGuidedDiscovery ? { appGuidedDiscovery: true } : {}),
|
||||
...(choice.appGuidedAuth ? { appGuidedAuth: choice.appGuidedAuth } : {}),
|
||||
...(choice.onboardingScopes ? { onboardingScopes: choice.onboardingScopes } : {}),
|
||||
|
||||
Reference in New Issue
Block a user