Files
openclaw/src/plugin-sdk/secret-input.ts
T
Josh Avant 1769fb2aa1 fix(secrets): align SecretRef inspect/strict behavior across preload/runtime paths (#66818)
* Config: add inspect/strict SecretRef string resolver

* CLI: pass resolved/source config snapshots to plugin preload

* Slack: keep HTTP route registration config-only

* Providers: normalize SecretRef handling for auth and web tools

* Secrets: add Exa web search target to registry and docs

* Telegram: resolve env SecretRef tokens at runtime

* Agents: resolve custom provider env SecretRef ids

* Providers: fail closed on blocked SecretRef fallback

* Telegram: enforce env SecretRef policy for runtime token refs

* Status/Providers/Telegram: tighten SecretRef preload and fallback handling

* Providers: enforce env SecretRef policy checks in fallback auth paths

* fix: add SecretRef lifecycle changelog entry (#66818) (thanks @joshavant)
2026-04-14 17:59:28 -05:00

36 lines
996 B
TypeScript

import { z } from "zod";
import {
hasConfiguredSecretInput,
isSecretRef,
resolveSecretInputString,
normalizeResolvedSecretInputString,
normalizeSecretInputString,
} from "../config/types.secrets.js";
import { normalizeSecretInput } from "../utils/normalize-secret-input.js";
import { buildSecretInputSchema } from "./secret-input-schema.js";
export type {
SecretInput,
SecretInputStringResolution,
SecretInputStringResolutionMode,
} from "../config/types.secrets.js";
export {
buildSecretInputSchema,
hasConfiguredSecretInput,
isSecretRef,
resolveSecretInputString,
normalizeResolvedSecretInputString,
normalizeSecretInput,
normalizeSecretInputString,
};
/** Optional version of the shared secret-input schema. */
export function buildOptionalSecretInputSchema() {
return buildSecretInputSchema().optional();
}
/** Array version of the shared secret-input schema. */
export function buildSecretInputArraySchema() {
return z.array(buildSecretInputSchema());
}