Files
openclaw/src/plugin-sdk/secret-input.ts
2026-03-27 01:45:53 +00:00

28 lines
841 B
TypeScript

import { z } from "zod";
import {
hasConfiguredSecretInput,
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 } from "../config/types.secrets.js";
export {
buildSecretInputSchema,
hasConfiguredSecretInput,
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());
}