refactor(plugins): make manifests own config ui hints (#121329)

This commit is contained in:
Peter Steinberger
2026-08-09 18:48:49 -07:00
committed by GitHub
parent a6c410ef51
commit 620fcd0e27
16 changed files with 122 additions and 432 deletions
+2
View File
@@ -17,12 +17,14 @@ type ZodSchemaWithToJsonSchema = ZodTypeAny & {
};
type BuildPluginConfigSchemaOptions = {
/** @deprecated Declare top-level `uiHints` in `openclaw.plugin.json`. */
uiHints?: Record<string, PluginConfigUiHint>;
safeParse?: OpenClawPluginConfigSchema["safeParse"];
};
type BuildJsonPluginConfigSchemaOptions = {
cacheKey?: string;
/** @deprecated Declare top-level `uiHints` in `openclaw.plugin.json`. */
uiHints?: Record<string, PluginConfigUiHint>;
safeParse?: OpenClawPluginConfigSchema["safeParse"];
};
+6 -2
View File
@@ -7,8 +7,7 @@ type PluginConfigValidation = { ok: true; value?: unknown } | { ok: false; error
* Config schema contract accepted by plugin manifests and runtime registration.
*
* Plugins can provide a Zod-like parser, a lightweight `validate(...)`
* function, or both. `uiHints` and `jsonSchema` are optional extras for docs,
* forms, and config UIs.
* function, or both. `jsonSchema` is optional runtime schema metadata.
*/
export type OpenClawPluginConfigSchema = {
safeParse?: (value: unknown) => {
@@ -20,6 +19,11 @@ export type OpenClawPluginConfigSchema = {
};
parse?: (value: unknown) => unknown;
validate?: (value: unknown) => PluginConfigValidation;
/**
* @deprecated Declare config presentation metadata in the plugin's
* `openclaw.plugin.json` manifest via top-level `uiHints`. The host reads
* manifest hints and does not consume runtime config-schema hints.
*/
uiHints?: Record<string, PluginConfigUiHint>;
jsonSchema?: JsonSchemaObject;
};