diff --git a/src/schemas/json/claude-code-settings.json b/src/schemas/json/claude-code-settings.json index d8e8508ccac..9eaebdb6aa0 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.\nSee https://code.claude.com/docs/en/settings#permission-rule-syntax\nSee https://code.claude.com/docs/en/settings#tools-available-to-claude for full list of tools available to Claude.", - "pattern": "^((Agent|Bash|Edit|ExitPlanMode|Glob|Grep|KillShell|LS|LSP|MultiEdit|NotebookEdit|NotebookRead|Read|Skill|Task|TaskCreate|TaskGet|TaskList|TaskOutput|TaskStop|TaskUpdate|TodoWrite|ToolSearch|WebFetch|WebSearch|Write)(\\((?=.*[^)*?])[^)]+\\))?|mcp__.*)$", + "pattern": "^((Agent|Bash|Edit|ExitPlanMode|Glob|Grep|KillShell|LSP|NotebookEdit|Read|Skill|TaskCreate|TaskGet|TaskList|TaskOutput|TaskStop|TaskUpdate|TodoWrite|ToolSearch|WebFetch|WebSearch|Write)(\\((?=.*[^)*?])[^)]+\\))?|mcp__.*)$", "examples": [ "Bash", "Bash(npm run build)", @@ -14,14 +14,12 @@ "Bash(ls*)", "Bash(git * main)", "Edit", - "MultiEdit", "Edit(/src/**/*.ts)", "Read(./.env)", "Read(./secrets/**)", "Read(//Users/alice/secrets/**)", "Read(~/Documents/*.pdf)", "Agent(Explore)", - "Task(Explore)", "WebFetch", "WebFetch(domain:example.com)", "mcp__puppeteer", @@ -225,6 +223,20 @@ "examples": ["aws sso login --profile myprofile"], "minLength": 1 }, + "claudeMdExcludes": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "description": "Glob patterns for CLAUDE.md files to exclude from loading. Useful in monorepos to skip irrelevant instructions from other teams. Patterns match against absolute file paths. Arrays merge across settings layers. Managed policy CLAUDE.md files cannot be excluded. See https://code.claude.com/docs/en/memory#exclude-specific-claudemd-files", + "examples": [ + [ + "**/monorepo/CLAUDE.md", + "/home/user/monorepo/other-team/.claude/rules/**" + ] + ] + }, "cleanupPeriodDays": { "type": "integer", "minimum": 0, @@ -369,11 +381,22 @@ "description": "Restrict which models users can select. When defined at multiple settings levels (user, project, etc.), arrays are merged and deduplicated. See https://code.claude.com/docs/en/model-config#restrict-model-selection", "examples": [["sonnet", "haiku"]] }, + "modelOverrides": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Map Anthropic model IDs to provider-specific model IDs such as Bedrock inference profile ARNs, Vertex AI version names, or Foundry deployment names. Each model picker entry uses its mapped value when calling the provider API. Unknown keys are ignored. See https://code.claude.com/docs/en/model-config#override-model-ids-per-version", + "examples": [ + { + "claude-opus-4-6": "arn:aws:bedrock:us-east-2:123456789012:application-inference-profile/opus-prod" + } + ] + }, "effortLevel": { "type": "string", "enum": ["low", "medium", "high"], - "description": "Control Opus 4.6 adaptive reasoning effort. Lower effort is faster and cheaper for straightforward tasks, higher effort provides deeper reasoning. Opus 4.6 defaults to medium effort for Max and Team subscribers. Also configurable via CLAUDE_CODE_EFFORT_LEVEL environment variable. See https://code.claude.com/docs/en/model-config#adjust-effort-level", - "default": "high" + "description": "Control Opus 4.6 adaptive reasoning effort. Lower effort is faster and cheaper for straightforward tasks, higher effort provides deeper reasoning. Defaults vary by model and plan (Opus 4.6 defaults to medium for Max and Team subscribers). Use /effort auto to reset to model default. Also configurable via CLAUDE_CODE_EFFORT_LEVEL environment variable. See https://code.claude.com/docs/en/model-config#adjust-effort-level" }, "fastMode": { "type": "boolean", @@ -385,6 +408,13 @@ "description": "Require per-session opt-in for fast mode. When true, fast mode does not persist across sessions and users must enable it with /fast each session. Useful for controlling costs. See https://code.claude.com/docs/en/fast-mode", "default": false }, + "feedbackSurveyRate": { + "type": "number", + "minimum": 0, + "maximum": 1, + "description": "Probability (0–1) that the session quality survey appears when eligible. A value of 0.05 means 5% of eligible sessions. See https://code.claude.com/docs/en/settings", + "examples": [0.05] + }, "enableAllProjectMcpServers": { "type": "boolean", "description": "Whether to automatically approve all MCP servers in the project. See https://code.claude.com/docs/en/mcp", @@ -498,6 +528,15 @@ }, "description": "Enterprise denylist of MCP servers that are explicitly blocked. If a server is on the denylist, it will be blocked across all scopes including enterprise. Denylist takes precedence over allowlist - if a server is on both lists, it is denied. See https://code.claude.com/docs/en/mcp#restriction-options" }, + "httpHookAllowedEnvVars": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "description": "Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook's effective allowedEnvVars is the intersection with this list. Undefined = no restriction. Arrays merge across settings sources. See https://code.claude.com/docs/en/settings#hook-configuration", + "examples": [["MY_TOKEN", "HOOK_SECRET"]] + }, "hooks": { "type": "object", "additionalProperties": false, @@ -589,6 +628,27 @@ "$ref": "#/$defs/hookMatcher" } }, + "PostCompact": { + "type": "array", + "description": "Hooks that run after the context is compacted. See https://code.claude.com/docs/en/hooks", + "items": { + "$ref": "#/$defs/hookMatcher" + } + }, + "Elicitation": { + "type": "array", + "description": "Hooks that run when an MCP server requests user input during a tool call. See https://code.claude.com/docs/en/hooks", + "items": { + "$ref": "#/$defs/hookMatcher" + } + }, + "ElicitationResult": { + "type": "array", + "description": "Hooks that run after a user responds to an MCP elicitation, before the response is sent back to the server. See https://code.claude.com/docs/en/hooks", + "items": { + "$ref": "#/$defs/hookMatcher" + } + }, "TeammateIdle": { "type": "array", "description": "Hooks that run when an agent team teammate is about to go idle. Exit code 2 sends feedback and keeps the teammate working. Does not support matchers. Agent teams are experimental. See https://code.claude.com/docs/en/hooks#teammateidle", @@ -658,6 +718,15 @@ "type": "boolean", "description": "Disable all hooks and statusLine execution. When true in managed settings, user and project-level disableAllHooks cannot override it. See https://code.claude.com/docs/en/hooks#disable-or-remove-hooks" }, + "allowedHttpHookUrls": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "description": "Allowlist of URL patterns that HTTP hooks may target. Supports * as a wildcard. When set, hooks with non-matching URLs are blocked. Undefined = no restriction, empty array = block all HTTP hooks. Arrays merge across settings sources. See https://code.claude.com/docs/en/settings#hook-configuration", + "examples": [["https://hooks.example.com/*", "http://localhost:*"]] + }, "allowManagedHooksOnly": { "type": "boolean", "description": "(Managed settings only) Prevent loading of user, project, and plugin hooks. Only allows managed hooks and SDK hooks. See https://code.claude.com/docs/en/settings#hook-configuration" @@ -1087,7 +1156,7 @@ }, "outputStyle": { "type": "string", - "description": "Controls the output style for assistant responses. See https://code.claude.com/docs/en/output-styles", + "description": "Controls the output style for assistant responses. Built-in styles: default, Explanatory, Learning. Custom styles can be added in ~/.claude/output-styles/ or .claude/output-styles/. See https://code.claude.com/docs/en/output-styles", "examples": ["default", "Explanatory", "Learning"], "minLength": 1 }, @@ -1140,7 +1209,7 @@ }, "allowManagedDomainsOnly": { "type": "boolean", - "description": "(Managed settings only) Only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources." + "description": "(Managed settings only) Only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources. Non-allowed domains are automatically blocked without user prompts." } }, "additionalProperties": false @@ -1301,6 +1370,22 @@ "description": "How agent team teammates display: \"auto\" picks split panes in tmux or iTerm2, in-process otherwise. Agent teams are experimental and disabled by default. Enable them by adding CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS to your settings.json or environment. See https://code.claude.com/docs/en/agent-teams", "default": "auto" }, + "worktree": { + "type": "object", + "additionalProperties": false, + "description": "Configuration for --worktree sessions. See https://code.claude.com/docs/en/settings", + "properties": { + "sparsePaths": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "description": "Directories to check out in each worktree via git sparse-checkout (cone mode). Only the listed paths are written to disk, which is faster in large monorepos.", + "examples": [["packages/my-app", "shared/utils"]] + } + } + }, "pluginTrustMessage": { "type": "string", "description": "(Managed settings only) Custom message appended to the plugin trust warning shown before installation. Use to provide organization-specific context about approved plugins. See https://code.claude.com/docs/en/settings#plugin-settings", diff --git a/src/test/claude-code-settings/hooks-complete.json b/src/test/claude-code-settings/hooks-complete.json index 0fe259ae23a..2529cd188e4 100644 --- a/src/test/claude-code-settings/hooks-complete.json +++ b/src/test/claude-code-settings/hooks-complete.json @@ -1,4 +1,5 @@ { + "allowedHttpHookUrls": ["https://hooks.example.com/*"], "hooks": { "ConfigChange": [ { @@ -11,6 +12,26 @@ "matcher": "user_settings" } ], + "Elicitation": [ + { + "hooks": [ + { + "command": "echo 'MCP elicitation requested' >> /tmp/claude-mcp.log", + "type": "command" + } + ] + } + ], + "ElicitationResult": [ + { + "hooks": [ + { + "command": "echo 'Elicitation result received' >> /tmp/claude-mcp.log", + "type": "command" + } + ] + } + ], "InstructionsLoaded": [ { "hooks": [ @@ -52,6 +73,16 @@ "matcher": "Bash" } ], + "PostCompact": [ + { + "hooks": [ + { + "command": "echo 'Post compact hook' >> /tmp/claude-session.log", + "type": "command" + } + ] + } + ], "PostToolUse": [ { "hooks": [ @@ -224,5 +255,6 @@ ] } ] - } + }, + "httpHookAllowedEnvVars": ["WEBHOOK_SECRET"] } diff --git a/src/test/claude-code-settings/modern-complete-config.json b/src/test/claude-code-settings/modern-complete-config.json index 91c409da731..20968266ed2 100644 --- a/src/test/claude-code-settings/modern-complete-config.json +++ b/src/test/claude-code-settings/modern-complete-config.json @@ -2,6 +2,7 @@ "$schema": "https://json.schemastore.org/claude-code-settings.json", "allowManagedHooksOnly": false, "allowManagedPermissionRulesOnly": false, + "allowedHttpHookUrls": ["https://hooks.example.com/*", "http://localhost:*"], "alwaysThinkingEnabled": false, "apiKeyHelper": "/usr/local/bin/claude-auth-helper", "attribution": { @@ -19,6 +20,10 @@ "source": "pathPattern" } ], + "claudeMdExcludes": [ + "**/other-team/CLAUDE.md", + "/home/user/monorepo/.claude/rules/**" + ], "cleanupPeriodDays": 60, "companyAnnouncements": ["Welcome to the team!"], "disableAllHooks": false, @@ -44,6 +49,7 @@ }, "fastMode": true, "fastModePerSessionOptIn": true, + "feedbackSurveyRate": 0.05, "fileSuggestion": { "command": "~/.claude/file-suggestion.sh", "type": "command" @@ -146,10 +152,14 @@ } ] }, + "httpHookAllowedEnvVars": ["HOOK_TOKEN", "WEBHOOK_SECRET"], "includeCoAuthoredBy": true, "includeGitInstructions": false, "language": "english", "model": "opus", + "modelOverrides": { + "claude-opus-4-6": "arn:aws:bedrock:us-east-2:123456789012:application-inference-profile/opus-prod" + }, "otelHeadersHelper": "/usr/local/bin/otel-headers.sh", "outputStyle": "Explanatory", "permissions": { @@ -232,5 +242,8 @@ "type": "command" }, "teammateMode": "tmux", - "terminalProgressBarEnabled": false + "terminalProgressBarEnabled": false, + "worktree": { + "sparsePaths": ["packages/my-app", "shared/utils"] + } }