From 51aa82eff63e8389e50141f4df0c65b1d79f7117 Mon Sep 17 00:00:00 2001 From: Andrzej Chmiel <40674613+andret2344@users.noreply.github.com> Date: Tue, 29 Sep 2026 00:53:09 +0200 Subject: [PATCH] Claude Code plugin manifest: allow options in userConfig (#6426) * Added options to userConfig in the Claude Code plugin manifest schema. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .../user-config-options-empty-value.json | 13 +++++++++++++ .../json/claude-code-plugin-manifest.json | 18 ++++++++++++++++++ .../user-config-options.json | 13 +++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 src/negative_test/claude-code-plugin-manifest/user-config-options-empty-value.json create mode 100644 src/test/claude-code-plugin-manifest/user-config-options.json diff --git a/src/negative_test/claude-code-plugin-manifest/user-config-options-empty-value.json b/src/negative_test/claude-code-plugin-manifest/user-config-options-empty-value.json new file mode 100644 index 00000000000..3732a830b62 --- /dev/null +++ b/src/negative_test/claude-code-plugin-manifest/user-config-options-empty-value.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://www.schemastore.org/claude-code-plugin-manifest.json", + "name": "example-plugin", + "userConfig": { + "tone": { + "default": "neutral", + "description": "Voice for generated replies", + "options": ["neutral", ""], + "title": "Tone", + "type": "string" + } + } +} diff --git a/src/schemas/json/claude-code-plugin-manifest.json b/src/schemas/json/claude-code-plugin-manifest.json index 469b7ddd777..5711af1bb3b 100644 --- a/src/schemas/json/claude-code-plugin-manifest.json +++ b/src/schemas/json/claude-code-plugin-manifest.json @@ -943,6 +943,15 @@ } ] }, + "options": { + "description": "For string type: the values the field accepts, shown as a picker. Not allowed with multiple or sensitive. Requires Claude Code v2.1.271 or later", + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, "multiple": { "description": "For string type: allow an array of strings", "type": "boolean" @@ -1698,6 +1707,15 @@ } ] }, + "options": { + "description": "For string type: the values the field accepts, shown as a picker. Not allowed with multiple or sensitive. Requires Claude Code v2.1.271 or later", + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, "multiple": { "description": "For string type: allow an array of strings", "type": "boolean" diff --git a/src/test/claude-code-plugin-manifest/user-config-options.json b/src/test/claude-code-plugin-manifest/user-config-options.json new file mode 100644 index 00000000000..fb73fcbd107 --- /dev/null +++ b/src/test/claude-code-plugin-manifest/user-config-options.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://www.schemastore.org/claude-code-plugin-manifest.json", + "name": "example-plugin", + "userConfig": { + "tone": { + "default": "neutral", + "description": "Voice for generated replies", + "options": ["neutral", "warm", "formal"], + "title": "Tone", + "type": "string" + } + } +}