From 426ee6e1179d8f8dbfc49254e1872deb7a57839d Mon Sep 17 00:00:00 2001 From: Kang Hyojun Date: Mon, 2 Feb 2026 18:25:50 +0900 Subject: [PATCH 1/3] Update Claude Code settings schema for v2.1.29 --- .../invalid-enum-values.json | 4 + .../wrong-property-types.json | 19 +++++ src/schemas/json/claude-code-settings.json | 84 ++++++++++++++++++- .../claude-code-settings/hooks-complete.json | 1 + .../modern-complete-config.json | 21 +++++ 5 files changed, 128 insertions(+), 1 deletion(-) diff --git a/src/negative_test/claude-code-settings/invalid-enum-values.json b/src/negative_test/claude-code-settings/invalid-enum-values.json index 250d2b2b679..974395f2785 100644 --- a/src/negative_test/claude-code-settings/invalid-enum-values.json +++ b/src/negative_test/claude-code-settings/invalid-enum-values.json @@ -2,5 +2,9 @@ "forceLoginMethod": "github", "permissions": { "defaultMode": "invalid-mode" + }, + "spinnerVerbs": { + "mode": "merge", + "verbs": ["Analyzing"] } } diff --git a/src/negative_test/claude-code-settings/wrong-property-types.json b/src/negative_test/claude-code-settings/wrong-property-types.json index d199f2a58a4..3a89d4407d5 100644 --- a/src/negative_test/claude-code-settings/wrong-property-types.json +++ b/src/negative_test/claude-code-settings/wrong-property-types.json @@ -6,5 +6,24 @@ "additionalDirectories": "should be array", "allow": "should be array", "ask": "should be array" + }, + "sandbox": { + "network": { + "allowAllUnixSockets": "yes", + "allowedDomains": "api.anthropic.com" + } + }, + "hooks": { + "PreToolUse": [ + { + "hooks": [ + { + "async": "true", + "command": "echo test", + "type": "command" + } + ] + } + ] } } diff --git a/src/schemas/json/claude-code-settings.json b/src/schemas/json/claude-code-settings.json index 9957f96e8a8..7bbec15a43e 100644 --- a/src/schemas/json/claude-code-settings.json +++ b/src/schemas/json/claude-code-settings.json @@ -5,7 +5,7 @@ "permissionRule": { "type": "string", "description": "Tool permission rule. See https://code.claude.com/docs/en/settings#permission-rule-syntax", - "pattern": "^((Bash|Edit|ExitPlanMode|Glob|Grep|KillShell|NotebookEdit|Read|Skill|Task|TodoWrite|WebFetch|WebSearch|Write)(\\((?=.*[^)*?])[^)]+\\))?|mcp__.*)$", + "pattern": "^((Bash|Edit|ExitPlanMode|Glob|Grep|KillShell|LS|MultiEdit|NotebookEdit|NotebookRead|Read|Skill|SlashCommand|Task|TodoWrite|WebFetch|WebSearch|Write)(\\((?=.*[^)*?])[^)]+\\))?|mcp__.*)$", "examples": [ "Bash", "Bash(npm run build)", @@ -14,11 +14,13 @@ "Bash(ls*)", "Bash(git * main)", "Edit", + "MultiEdit", "Edit(/src/**/*.ts)", "Read(./.env)", "Read(./secrets/**)", "Read(/Users/alice/secrets/**)", "Read(~/Documents/*.pdf)", + "SlashCommand(/clear)", "WebFetch", "WebFetch(domain:example.com)", "mcp__github__search_repositories" @@ -46,6 +48,10 @@ "type": "number", "description": "Optional timeout in seconds", "exclusiveMinimum": 0 + }, + "async": { + "type": "boolean", + "description": "Run this hook asynchronously without blocking Claude Code" } } }, @@ -69,6 +75,10 @@ "type": "number", "description": "Optional timeout in seconds", "exclusiveMinimum": 0 + }, + "async": { + "type": "boolean", + "description": "Run this hook asynchronously without blocking Claude Code" } } } @@ -517,6 +527,21 @@ "required": ["source", "url"], "additionalProperties": false }, + { + "type": "object", + "properties": { + "source": { + "type": "string", + "const": "hostPattern" + }, + "hostPattern": { + "type": "string", + "description": "Git host pattern to trust for repositories in source specifications" + } + }, + "required": ["source", "hostPattern"], + "additionalProperties": false + }, { "type": "object", "properties": { @@ -627,6 +652,21 @@ "description": "(Managed settings only) Allowlist of plugin marketplaces users can add. Undefined = no restrictions, empty array = lockdown. Uses exact matching for source specifications. See https://code.claude.com/docs/en/settings#strictknownmarketplaces", "items": { "anyOf": [ + { + "type": "object", + "properties": { + "source": { + "type": "string", + "const": "hostPattern" + }, + "hostPattern": { + "type": "string", + "description": "Git host pattern to trust for repositories in source specifications" + } + }, + "required": ["source", "hostPattern"], + "additionalProperties": false + }, { "type": "object", "properties": { @@ -822,6 +862,26 @@ "minimum": 1, "maximum": 65535, "description": "SOCKS proxy port to use for network filtering. If not specified, a proxy server will be started automatically" + }, + "allowAllUnixSockets": { + "type": "boolean", + "description": "Allow all Unix domain socket connections. If true, this overrides allowUnixSockets" + }, + "allowedDomains": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "description": "Allowlist of network domains for sandboxed commands. Supports wildcard patterns like *.example.com" + }, + "deniedDomains": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "description": "Denylist of network domains for sandboxed commands. Supports wildcard patterns like *.example.com" } }, "additionalProperties": false @@ -863,6 +923,28 @@ }, "additionalProperties": false }, + "spinnerVerbs": { + "type": "object", + "description": "Customize the verbs shown in spinner progress messages", + "properties": { + "mode": { + "type": "string", + "enum": ["append", "replace"], + "description": "How custom verbs should be combined with the default spinner verbs" + }, + "verbs": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "description": "Custom verbs used in spinner progress text" + } + }, + "required": ["verbs"], + "additionalProperties": false + }, "spinnerTipsEnabled": { "type": "boolean", "description": "Show tips in the spinner while Claude is working. Set to false to disable tips (default: true)", diff --git a/src/test/claude-code-settings/hooks-complete.json b/src/test/claude-code-settings/hooks-complete.json index 922b8a4fba7..fbf955135aa 100644 --- a/src/test/claude-code-settings/hooks-complete.json +++ b/src/test/claude-code-settings/hooks-complete.json @@ -45,6 +45,7 @@ "hooks": [ { "command": "echo 'Running bash command' >> /tmp/claude-log.txt", + "async": true, "timeout": 5, "type": "command" } diff --git a/src/test/claude-code-settings/modern-complete-config.json b/src/test/claude-code-settings/modern-complete-config.json index 4caee0a228e..4b2e303892c 100644 --- a/src/test/claude-code-settings/modern-complete-config.json +++ b/src/test/claude-code-settings/modern-complete-config.json @@ -44,6 +44,14 @@ } ] }, + "extraKnownMarketplaces": { + "corp-git-host": { + "source": { + "hostPattern": "git.corp.example", + "source": "hostPattern" + } + } + }, "includeCoAuthoredBy": true, "language": "english", "outputStyle": "Explanatory", @@ -74,6 +82,19 @@ }, "plansDirectory": "./plans", "respectGitignore": true, + "sandbox": { + "network": { + "allowAllUnixSockets": false, + "allowLocalBinding": true, + "allowedDomains": ["api.anthropic.com", "*.example.com"], + "deniedDomains": ["malware.example"], + "socksProxyPort": 11080 + } + }, "showTurnDuration": true, + "spinnerVerbs": { + "mode": "append", + "verbs": ["Analyzing", "Building"] + }, "terminalProgressBarEnabled": true } From 8e28509c1958135d12fa974c3de2de8520a8009a Mon Sep 17 00:00:00 2001 From: Kang Hyojun Date: Mon, 2 Feb 2026 18:40:36 +0900 Subject: [PATCH 2/3] Add hostPattern marketplace tests for Claude Code settings --- .../invalid-marketplace-host-pattern.json | 16 ++++++++++++++++ .../marketplace-host-pattern.json | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 src/negative_test/claude-code-settings/invalid-marketplace-host-pattern.json create mode 100644 src/test/claude-code-settings/marketplace-host-pattern.json diff --git a/src/negative_test/claude-code-settings/invalid-marketplace-host-pattern.json b/src/negative_test/claude-code-settings/invalid-marketplace-host-pattern.json new file mode 100644 index 00000000000..5d37dd6ec33 --- /dev/null +++ b/src/negative_test/claude-code-settings/invalid-marketplace-host-pattern.json @@ -0,0 +1,16 @@ +{ + "extraKnownMarketplaces": { + "internal-git": { + "source": { + "source": "hostPattern", + "repo": "acme/internal-tools" + } + } + }, + "strictKnownMarketplaces": [ + { + "source": "hostPattern", + "hostPattern": 123 + } + ] +} diff --git a/src/test/claude-code-settings/marketplace-host-pattern.json b/src/test/claude-code-settings/marketplace-host-pattern.json new file mode 100644 index 00000000000..67b044f8538 --- /dev/null +++ b/src/test/claude-code-settings/marketplace-host-pattern.json @@ -0,0 +1,16 @@ +{ + "extraKnownMarketplaces": { + "internal-git": { + "source": { + "source": "hostPattern", + "hostPattern": "git.internal.example.com" + } + } + }, + "strictKnownMarketplaces": [ + { + "source": "hostPattern", + "hostPattern": "*.corp.example" + } + ] +} From 77533a4210af1105d8f514987ac6156239e45133 Mon Sep 17 00:00:00 2001 From: Kang Hyojun Date: Mon, 2 Feb 2026 19:02:16 +0900 Subject: [PATCH 3/3] Format and refine Claude Code settings tests --- .../invalid-marketplace-host-pattern.json | 7 +++--- .../wrong-property-types.json | 24 +++++++++---------- .../claude-code-settings/hooks-complete.json | 2 +- .../marketplace-host-pattern.json | 8 +++---- .../modern-complete-config.json | 16 ++++++------- 5 files changed, 28 insertions(+), 29 deletions(-) diff --git a/src/negative_test/claude-code-settings/invalid-marketplace-host-pattern.json b/src/negative_test/claude-code-settings/invalid-marketplace-host-pattern.json index 5d37dd6ec33..feb9ce9d9f5 100644 --- a/src/negative_test/claude-code-settings/invalid-marketplace-host-pattern.json +++ b/src/negative_test/claude-code-settings/invalid-marketplace-host-pattern.json @@ -2,15 +2,14 @@ "extraKnownMarketplaces": { "internal-git": { "source": { - "source": "hostPattern", - "repo": "acme/internal-tools" + "source": "hostPattern" } } }, "strictKnownMarketplaces": [ { - "source": "hostPattern", - "hostPattern": 123 + "hostPattern": 123, + "source": "hostPattern" } ] } diff --git a/src/negative_test/claude-code-settings/wrong-property-types.json b/src/negative_test/claude-code-settings/wrong-property-types.json index 3a89d4407d5..3a8f687c9da 100644 --- a/src/negative_test/claude-code-settings/wrong-property-types.json +++ b/src/negative_test/claude-code-settings/wrong-property-types.json @@ -1,18 +1,6 @@ { "cleanupPeriodDays": "thirty", "enableAllProjectMcpServers": 1, - "includeCoAuthoredBy": "yes", - "permissions": { - "additionalDirectories": "should be array", - "allow": "should be array", - "ask": "should be array" - }, - "sandbox": { - "network": { - "allowAllUnixSockets": "yes", - "allowedDomains": "api.anthropic.com" - } - }, "hooks": { "PreToolUse": [ { @@ -25,5 +13,17 @@ ] } ] + }, + "includeCoAuthoredBy": "yes", + "permissions": { + "additionalDirectories": "should be array", + "allow": "should be array", + "ask": "should be array" + }, + "sandbox": { + "network": { + "allowAllUnixSockets": "yes", + "allowedDomains": "api.anthropic.com" + } } } diff --git a/src/test/claude-code-settings/hooks-complete.json b/src/test/claude-code-settings/hooks-complete.json index fbf955135aa..b1ea64991d9 100644 --- a/src/test/claude-code-settings/hooks-complete.json +++ b/src/test/claude-code-settings/hooks-complete.json @@ -44,8 +44,8 @@ { "hooks": [ { - "command": "echo 'Running bash command' >> /tmp/claude-log.txt", "async": true, + "command": "echo 'Running bash command' >> /tmp/claude-log.txt", "timeout": 5, "type": "command" } diff --git a/src/test/claude-code-settings/marketplace-host-pattern.json b/src/test/claude-code-settings/marketplace-host-pattern.json index 67b044f8538..2ceda674c17 100644 --- a/src/test/claude-code-settings/marketplace-host-pattern.json +++ b/src/test/claude-code-settings/marketplace-host-pattern.json @@ -2,15 +2,15 @@ "extraKnownMarketplaces": { "internal-git": { "source": { - "source": "hostPattern", - "hostPattern": "git.internal.example.com" + "hostPattern": "git.internal.example.com", + "source": "hostPattern" } } }, "strictKnownMarketplaces": [ { - "source": "hostPattern", - "hostPattern": "*.corp.example" + "hostPattern": "*.corp.example", + "source": "hostPattern" } ] } diff --git a/src/test/claude-code-settings/modern-complete-config.json b/src/test/claude-code-settings/modern-complete-config.json index 4b2e303892c..da57e3e4044 100644 --- a/src/test/claude-code-settings/modern-complete-config.json +++ b/src/test/claude-code-settings/modern-complete-config.json @@ -15,6 +15,14 @@ "CLAUDE_LOG_LEVEL": "debug", "PROJECT_ROOT": "/home/user/projects" }, + "extraKnownMarketplaces": { + "corp-git-host": { + "source": { + "hostPattern": "git.corp.example", + "source": "hostPattern" + } + } + }, "fileSuggestion": { "command": "~/.claude/file-suggestion.sh", "type": "command" @@ -44,14 +52,6 @@ } ] }, - "extraKnownMarketplaces": { - "corp-git-host": { - "source": { - "hostPattern": "git.corp.example", - "source": "hostPattern" - } - } - }, "includeCoAuthoredBy": true, "language": "english", "outputStyle": "Explanatory",