mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-03 08:26:41 +00:00
* docs(secrets): remove retired web credential paths * refactor(web): remove retired provider compatibility paths * refactor(providers): delete retired compatibility routes * refactor(secrets): remove retired credential aliases * refactor(plugin-sdk): delete retired compatibility surfaces * docs(plugin-sdk): remove retired migration guidance * chore(plugin-sdk): refresh rebased surface budgets * chore(plugin-sdk): refresh API removal baseline * refactor(compat): migrate retired internal callers * chore(plugin-sdk): refresh current-main baselines * test(config): migrate plugin-owned secret assertions * test(gateway): narrow plugin secret refs * fix(plugin-sdk): preserve private boundary type identity * chore(compat): remove stale sweep references * chore(lint): lower max-lines budget * refactor(secrets): remove unused web helper * build(plugin-sdk): drop removed compat entries * chore(plugin-sdk): refresh rebased API baseline * chore(plugin-sdk): use Linux API baseline hash * fix(plugin-sdk): preserve private bundled build entries * fix(plugin-sdk): package private runtime facades * fix(plugins): preserve external credential contracts
44 lines
1.4 KiB
TypeScript
44 lines
1.4 KiB
TypeScript
// Defines external auth contracts for provider plugins.
|
|
import type { AuthProfileStore, OAuthCredential } from "../agents/auth-profiles/types.js";
|
|
import type { ModelProviderAuthMode, ModelProviderConfig } from "../config/types.js";
|
|
import type { OpenClawConfig } from "../config/types.openclaw.js";
|
|
import type { SecretInputMode } from "./provider-auth-types.js";
|
|
|
|
export type ProviderAuthOptionBag = {
|
|
token?: string;
|
|
tokenProvider?: string;
|
|
secretInputMode?: SecretInputMode;
|
|
[key: string]: unknown;
|
|
};
|
|
|
|
/** Context for resolving synthetic provider credentials from config. */
|
|
export type ProviderResolveSyntheticAuthContext = {
|
|
config?: OpenClawConfig;
|
|
provider: string;
|
|
providerConfig?: ModelProviderConfig;
|
|
};
|
|
|
|
/** Synthetic provider credential returned by plugin auth helpers. */
|
|
export type ProviderSyntheticAuthResult = {
|
|
apiKey: string;
|
|
source: string;
|
|
mode: Exclude<ModelProviderAuthMode, "aws-sdk">;
|
|
expiresAt?: number;
|
|
};
|
|
|
|
/** Context for resolving external provider auth profiles. */
|
|
export type ProviderResolveExternalAuthProfilesContext = {
|
|
config?: OpenClawConfig;
|
|
agentDir?: string;
|
|
workspaceDir?: string;
|
|
env: NodeJS.ProcessEnv;
|
|
store: AuthProfileStore;
|
|
};
|
|
|
|
/** External auth profile credential resolved for a provider. */
|
|
export type ProviderExternalAuthProfile = {
|
|
profileId: string;
|
|
credential: OAuthCredential;
|
|
persistence?: "runtime-only" | "persisted";
|
|
};
|