Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
"forceLoginMethod": "github",
"permissions": {
"defaultMode": "invalid-mode"
},
"spinnerVerbs": {
"mode": "merge",
"verbs": ["Analyzing"]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extraKnownMarketplaces": {
"internal-git": {
"source": {
"source": "hostPattern"
}
}
},
"strictKnownMarketplaces": [
{
"hostPattern": 123,
"source": "hostPattern"
}
]
}
19 changes: 19 additions & 0 deletions src/negative_test/claude-code-settings/wrong-property-types.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
{
"cleanupPeriodDays": "thirty",
"enableAllProjectMcpServers": 1,
"hooks": {
"PreToolUse": [
{
"hooks": [
{
"async": "true",
"command": "echo test",
"type": "command"
}
]
}
]
},
"includeCoAuthoredBy": "yes",
"permissions": {
"additionalDirectories": "should be array",
"allow": "should be array",
"ask": "should be array"
},
"sandbox": {
"network": {
"allowAllUnixSockets": "yes",
"allowedDomains": "api.anthropic.com"
}
}
}
84 changes: 83 additions & 1 deletion src/schemas/json/claude-code-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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__.*)$",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kanghyojun @hyperupcall @domdomegg I had removed SlashCommand from this regex in #5300 . As per my understanding, after the new behavior of treating commands as skills, SlashCommand tool permission requests are not going to be sought.

The only reason to retain it could be to cover the use case of someone consciously using much older versions, which still used the SlashCommand tool. However, it's been a long time since the change from SlashCommand to Skill. So I am wondering whether there is merit to retain it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Miteshashar is right — SlashCommand was renamed to Skill as a tool name back in October 2025. A SlashCommand(...) permission rule would be silently ignored since no tool has that name anymore. Fine to drop it.

"examples": [
"Bash",
"Bash(npm run build)",
Expand All @@ -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"
Expand Down Expand Up @@ -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"
}
}
},
Expand All @@ -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"
}
}
}
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)",
Expand Down
1 change: 1 addition & 0 deletions src/test/claude-code-settings/hooks-complete.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
{
"hooks": [
{
"async": true,
"command": "echo 'Running bash command' >> /tmp/claude-log.txt",
"timeout": 5,
"type": "command"
Expand Down
16 changes: 16 additions & 0 deletions src/test/claude-code-settings/marketplace-host-pattern.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extraKnownMarketplaces": {
"internal-git": {
"source": {
"hostPattern": "git.internal.example.com",
"source": "hostPattern"
}
}
},
"strictKnownMarketplaces": [
{
"hostPattern": "*.corp.example",
"source": "hostPattern"
}
]
}
21 changes: 21 additions & 0 deletions src/test/claude-code-settings/modern-complete-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}