fix(check): repair plugin and secret type drift

This commit is contained in:
Vincent Koc
2026-04-06 15:36:17 +01:00
parent a253dc44a3
commit 7bb61a07db
8 changed files with 56 additions and 38 deletions

View File

@@ -9,9 +9,11 @@ export type SecretResolverWarningCode =
| "SECRETS_REF_OVERRIDES_PLAINTEXT"
| "SECRETS_REF_IGNORED_INACTIVE_SURFACE"
| "WEB_SEARCH_PROVIDER_INVALID_AUTODETECT"
| "WEB_SEARCH_AUTODETECT_SELECTED"
| "WEB_SEARCH_KEY_UNRESOLVED_FALLBACK_USED"
| "WEB_SEARCH_KEY_UNRESOLVED_NO_FALLBACK"
| "WEB_FETCH_PROVIDER_INVALID_AUTODETECT"
| "WEB_FETCH_AUTODETECT_SELECTED"
| "WEB_FETCH_PROVIDER_KEY_UNRESOLVED_FALLBACK_USED"
| "WEB_FETCH_PROVIDER_KEY_UNRESOLVED_NO_FALLBACK";

View File

@@ -1,10 +1,16 @@
import type { OpenClawConfig } from "../config/config.js";
import { resolveSecretInputRef } from "../config/types.secrets.js";
import { resolveManifestContractOwnerPluginId } from "../plugins/manifest-registry.js";
import type { ResolverContext, SecretDefaults } from "./runtime-shared.js";
import type {
ResolverContext,
SecretDefaults,
SecretResolverWarningCode,
} from "./runtime-shared.js";
import { pushInactiveSurfaceWarning, pushWarning } from "./runtime-shared.js";
import type { RuntimeWebDiagnostic, RuntimeWebDiagnosticCode } from "./runtime-web-tools.types.js";
type RuntimeWebWarningDiagnosticCode = Extract<RuntimeWebDiagnosticCode, SecretResolverWarningCode>;
export type SecretResolutionResult<TSource extends string> = {
value?: string;
source: TSource;
@@ -43,9 +49,9 @@ export type RuntimeWebProviderSelectionParams<
context: ResolverContext;
defaults: SecretDefaults | undefined;
deferKeylessFallback: boolean;
fallbackUsedCode: string;
noFallbackCode: string;
autoDetectSelectedCode: string;
fallbackUsedCode: RuntimeWebWarningDiagnosticCode;
noFallbackCode: RuntimeWebWarningDiagnosticCode;
autoDetectSelectedCode: RuntimeWebDiagnosticCode;
readConfiguredCredential: (params: {
provider: TProvider;
config: OpenClawConfig;
@@ -134,7 +140,7 @@ export type ResolveRuntimeWebProviderSurfaceParams<
toolConfig: TToolConfig;
diagnostics: RuntimeWebDiagnostic[];
metadataDiagnostics: RuntimeWebDiagnostic[];
invalidAutoDetectCode: RuntimeWebDiagnosticCode;
invalidAutoDetectCode: RuntimeWebWarningDiagnosticCode;
sourceConfig: OpenClawConfig;
context: ResolverContext;
resolveProviders: (params: { configuredBundledPluginId?: string }) => TProvider[];