fix: keep provider auth login sdk compat · openclaw/openclaw@3363528
steipete
·
2026-05-10
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1110,6 +1110,10 @@
|
1110 | 1110 | "types": "./dist/plugin-sdk/provider-auth-result.d.ts", |
1111 | 1111 | "default": "./dist/plugin-sdk/provider-auth-result.js" |
1112 | 1112 | }, |
| 1113 | +"./plugin-sdk/provider-auth-login": { |
| 1114 | +"types": "./dist/plugin-sdk/provider-auth-login.d.ts", |
| 1115 | +"default": "./dist/plugin-sdk/provider-auth-login.js" |
| 1116 | + }, |
1113 | 1117 | "./plugin-sdk/provider-selection-runtime": { |
1114 | 1118 | "types": "./dist/plugin-sdk/provider-selection-runtime.d.ts", |
1115 | 1119 | "default": "./dist/plugin-sdk/provider-selection-runtime.js" |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -25,6 +25,7 @@
|
25 | 25 | "music-generation-core", |
26 | 26 | "plugin-test-api", |
27 | 27 | "plugin-test-contracts", |
| 28 | +"provider-auth-login", |
28 | 29 | "provider-http-test-mocks", |
29 | 30 | "provider-test-contracts", |
30 | 31 | "reply-dedupe", |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -254,6 +254,7 @@
|
254 | 254 | "provider-auth-runtime", |
255 | 255 | "provider-auth-api-key", |
256 | 256 | "provider-auth-result", |
| 257 | +"provider-auth-login", |
257 | 258 | "provider-selection-runtime", |
258 | 259 | "plugin-entry", |
259 | 260 | "provider-catalog-runtime", |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Manual facade. Keep loader boundary explicit. |
| 2 | +import type { RuntimeEnv } from "../runtime.js"; |
| 3 | +import { loadBundledPluginPublicSurfaceModuleSync } from "./facade-loader.js"; |
| 4 | + |
| 5 | +type FacadeModule = { |
| 6 | +githubCopilotLoginCommand: ( |
| 7 | +opts: { profileId?: string; yes?: boolean; agentDir?: string }, |
| 8 | +runtime: RuntimeEnv, |
| 9 | +) => Promise<void>; |
| 10 | +}; |
| 11 | + |
| 12 | +function loadFacadeModule(): FacadeModule { |
| 13 | +return loadBundledPluginPublicSurfaceModuleSync<FacadeModule>({ |
| 14 | +dirName: "github-copilot", |
| 15 | +artifactBasename: "api.js", |
| 16 | +}); |
| 17 | +} |
| 18 | + |
| 19 | +/** @deprecated GitHub Copilot provider-owned login helper; use provider auth hooks instead. */ |
| 20 | +export const githubCopilotLoginCommand: FacadeModule["githubCopilotLoginCommand"] = ((...args) => |
| 21 | +loadFacadeModule()["githubCopilotLoginCommand"]( |
| 22 | + ...args, |
| 23 | +)) as FacadeModule["githubCopilotLoginCommand"]; |
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +/** @deprecated Provider-owned login helpers; use provider auth hooks instead. */ |
| 2 | +export { loginChutes } from "../commands/chutes-oauth.js"; |
| 3 | +/** @deprecated Provider-owned login helpers; use provider auth hooks instead. */ |
| 4 | +export { loginOpenAICodexOAuth } from "../plugins/provider-openai-codex-oauth.js"; |
| 5 | +/** @deprecated Provider-owned login helpers; use provider auth hooks instead. */ |
| 6 | +export { githubCopilotLoginCommand } from "./github-copilot-login.js"; |
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +/** |
| 2 | + * @deprecated Compatibility subpath for provider-owned login helpers. |
| 3 | + * Use provider auth hooks instead of importing bundled provider login commands. |
| 4 | + */ |
| 5 | + |
| 6 | +import { createLazyRuntimeMethodBinder, createLazyRuntimeModule } from "../shared/lazy-runtime.js"; |
| 7 | + |
| 8 | +type ProviderAuthLoginRuntime = typeof import("./provider-auth-login.runtime.js"); |
| 9 | + |
| 10 | +const loadProviderAuthLoginRuntime = createLazyRuntimeModule( |
| 11 | +() => import("./provider-auth-login.runtime.js"), |
| 12 | +); |
| 13 | +const bindProviderAuthLoginRuntime = createLazyRuntimeMethodBinder(loadProviderAuthLoginRuntime); |
| 14 | + |
| 15 | +/** @deprecated GitHub Copilot provider-owned login helper; use provider auth hooks instead. */ |
| 16 | +export const githubCopilotLoginCommand: ProviderAuthLoginRuntime["githubCopilotLoginCommand"] = |
| 17 | +bindProviderAuthLoginRuntime((runtime) => runtime.githubCopilotLoginCommand); |
| 18 | +/** @deprecated Chutes provider-owned login helper; use provider auth hooks instead. */ |
| 19 | +export const loginChutes: ProviderAuthLoginRuntime["loginChutes"] = bindProviderAuthLoginRuntime( |
| 20 | +(runtime) => runtime.loginChutes, |
| 21 | +); |
| 22 | +/** @deprecated OpenAI Codex provider-owned login helper; use provider auth hooks instead. */ |
| 23 | +export const loginOpenAICodexOAuth: ProviderAuthLoginRuntime["loginOpenAICodexOAuth"] = |
| 24 | +bindProviderAuthLoginRuntime((runtime) => runtime.loginOpenAICodexOAuth); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。