diff --git a/src/schemas/json/claude-code-settings.json b/src/schemas/json/claude-code-settings.json index 7bbec15a43e..8eaffc637dc 100644 --- a/src/schemas/json/claude-code-settings.json +++ b/src/schemas/json/claude-code-settings.json @@ -5,12 +5,12 @@ "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|LS|MultiEdit|NotebookEdit|NotebookRead|Read|Skill|SlashCommand|Task|TodoWrite|WebFetch|WebSearch|Write)(\\((?=.*[^)*?])[^)]+\\))?|mcp__.*)$", + "pattern": "^((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__.*)$", "examples": [ "Bash", "Bash(npm run build)", - "Bash(git commit:*)", - "Bash(npm run:*)", + "Bash(git commit *)", + "Bash(npm run *)", "Bash(ls*)", "Bash(git * main)", "Edit", @@ -18,11 +18,12 @@ "Edit(/src/**/*.ts)", "Read(./.env)", "Read(./secrets/**)", - "Read(/Users/alice/secrets/**)", + "Read(//Users/alice/secrets/**)", "Read(~/Documents/*.pdf)", - "SlashCommand(/clear)", + "Task(Explore)", "WebFetch", "WebFetch(domain:example.com)", + "mcp__puppeteer", "mcp__github__search_repositories" ] }, @@ -57,7 +58,7 @@ }, { "type": "object", - "description": "LLM prompt hook", + "description": "LLM prompt hook. See https://code.claude.com/docs/en/hooks#prompt-based-hooks", "additionalProperties": false, "required": ["type", "prompt"], "properties": { @@ -71,14 +72,41 @@ "description": "Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON.", "minLength": 1 }, + "model": { + "type": "string", + "description": "Model to use for evaluation. Defaults to a fast model" + }, "timeout": { "type": "number", - "description": "Optional timeout in seconds", + "description": "Optional timeout in seconds (default: 30)", "exclusiveMinimum": 0 + } + } + }, + { + "type": "object", + "description": "Agent hook with multi-turn tool access for verification. See https://code.claude.com/docs/en/hooks#agent-based-hooks", + "additionalProperties": false, + "required": ["type", "prompt"], + "properties": { + "type": { + "type": "string", + "description": "Hook type", + "const": "agent" }, - "async": { - "type": "boolean", - "description": "Run this hook asynchronously without blocking Claude Code" + "prompt": { + "type": "string", + "description": "Prompt describing what to verify. Use $ARGUMENTS placeholder for hook input JSON.", + "minLength": 1 + }, + "model": { + "type": "string", + "description": "Model to use for evaluation. Defaults to a fast model" + }, + "timeout": { + "type": "number", + "description": "Optional timeout in seconds (default: 60)", + "exclusiveMinimum": 0 } } } @@ -222,8 +250,15 @@ }, "defaultMode": { "type": "string", - "enum": ["acceptEdits", "bypassPermissions", "default", "plan"], - "description": "Default permission mode when Claude Code needs access" + "enum": [ + "acceptEdits", + "bypassPermissions", + "default", + "delegate", + "dontAsk", + "plan" + ], + "description": "Default permission mode.\n\"default\": prompts on first use.\n\"acceptEdits\": auto-accepts file edits.\n\"plan\": read-only, no modifications.\n\"delegate\": coordination-only for agent team leads (agent teams are experimental; enable via CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS).\n\"dontAsk\": auto-denies unless pre-approved via permissions.\n\"bypassPermissions\": skips all prompts (use only in isolated environments).\nSee https://code.claude.com/docs/en/permissions" }, "disableBypassPermissionsMode": { "type": "string", @@ -242,7 +277,7 @@ } }, "additionalProperties": false, - "description": "Tool usage permissions configuration. See https://code.claude.com/docs/en/iam#configuring-permissions", + "description": "Tool usage permissions configuration. See https://code.claude.com/docs/en/permissions and https://code.claude.com/docs/en/settings#permission-settings", "examples": [ { "allow": ["Bash(git add:*)"], @@ -261,6 +296,12 @@ "type": "string", "description": "Override the default model used by Claude Code. See https://code.claude.com/docs/en/model-config" }, + "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. See https://code.claude.com/docs/en/model-config#adjust-effort-level", + "default": "high" + }, "enableAllProjectMcpServers": { "type": "boolean", "description": "Whether to automatically approve all MCP servers in the project. See https://code.claude.com/docs/en/mcp", @@ -407,9 +448,23 @@ "$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", + "items": { + "$ref": "#/$defs/hookMatcher" + } + }, + "TaskCompleted": { + "type": "array", + "description": "Hooks that run when a task is being marked as completed. Exit code 2 prevents completion and sends feedback. Does not support matchers. See https://code.claude.com/docs/en/hooks#taskcompleted", + "items": { + "$ref": "#/$defs/hookMatcher" + } + }, "Setup": { "type": "array", - "description": "Hooks that run during repository initialization (--init, --init-only) or maintenance (--maintenance)", + "description": "UNDOCUMENTED. Hooks that run during repository initialization (--init, --init-only) or maintenance (--maintenance)", "items": { "$ref": "#/$defs/hookMatcher" } @@ -438,6 +493,10 @@ "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" }, + "allowManagedPermissionRulesOnly": { + "type": "boolean", + "description": "(Managed settings only) Prevent user and project settings from defining allow, ask, or deny permission rules. Only rules in managed settings apply. See https://code.claude.com/docs/en/settings" + }, "statusLine": { "type": "object", "properties": { @@ -960,6 +1019,11 @@ "description": "Show turn duration messages after responses (e.g., \"Cooked for 1m 6s\"). Set to false to hide these messages (default: true)", "default": true }, + "prefersReducedMotion": { + "type": "boolean", + "description": "Reduce or disable UI animations (spinners, shimmer, flash effects) for accessibility", + "default": false + }, "alwaysThinkingEnabled": { "type": "boolean", "description": "Enable extended thinking by default for all sessions. Typically configured via the /config command rather than editing directly. See https://code.claude.com/docs/en/common-workflows#use-extended-thinking-thinking-mode" @@ -972,6 +1036,12 @@ }, "description": "Company announcements to display at startup (one will be randomly selected if multiple are provided)" }, + "teammateMode": { + "type": "string", + "enum": ["auto", "in-process", "tmux"], + "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" + }, "pluginConfigs": { "type": "object", "additionalProperties": { diff --git a/src/test/claude-code-settings/hooks-complete.json b/src/test/claude-code-settings/hooks-complete.json index b1ea64991d9..6acb0249943 100644 --- a/src/test/claude-code-settings/hooks-complete.json +++ b/src/test/claude-code-settings/hooks-complete.json @@ -10,6 +10,17 @@ ] } ], + "PermissionRequest": [ + { + "hooks": [ + { + "command": "echo 'Permission requested' >> /tmp/claude-permissions.log", + "type": "command" + } + ], + "matcher": "Bash" + } + ], "PostToolUse": [ { "hooks": [ @@ -21,6 +32,16 @@ "matcher": "Edit" } ], + "PostToolUseFailure": [ + { + "hooks": [ + { + "command": "echo 'Tool failure' >> /tmp/claude-errors.log", + "type": "command" + } + ] + } + ], "PreCompact": [ { "hooks": [ @@ -73,16 +94,38 @@ ] } ], - "Stop": [ + "Setup": [ { "hooks": [ { - "command": "echo 'Claude finished' | tee -a /tmp/claude-session.log", + "command": "echo 'Repository setup' >> /tmp/claude-setup.log", "type": "command" } ] } ], + "Stop": [ + { + "hooks": [ + { + "prompt": "Check if all tasks are complete before stopping: $ARGUMENTS", + "timeout": 30, + "type": "prompt" + } + ] + } + ], + "SubagentStart": [ + { + "hooks": [ + { + "command": "echo 'Subagent spawned' >> /tmp/claude-subagent.log", + "type": "command" + } + ], + "matcher": "Explore" + } + ], "SubagentStop": [ { "hooks": [ @@ -92,7 +135,29 @@ "type": "command" } ], - "matcher": "Task" + "matcher": "Explore" + } + ], + "TaskCompleted": [ + { + "hooks": [ + { + "prompt": "Verify all tests pass and code meets requirements before marking task complete: $ARGUMENTS", + "timeout": 120, + "type": "agent" + } + ] + } + ], + "TeammateIdle": [ + { + "hooks": [ + { + "command": "npm test", + "timeout": 120, + "type": "command" + } + ] } ], "UserPromptSubmit": [ diff --git a/src/test/claude-code-settings/modern-complete-config.json b/src/test/claude-code-settings/modern-complete-config.json index 18f2a341304..2be0e0a579d 100644 --- a/src/test/claude-code-settings/modern-complete-config.json +++ b/src/test/claude-code-settings/modern-complete-config.json @@ -10,6 +10,7 @@ "autoUpdatesChannel": "stable", "cleanupPeriodDays": 60, "disabledMcpjsonServers": ["untrusted-server"], + "effortLevel": "high", "enableAllProjectMcpServers": true, "env": { "ANTHROPIC_MODEL": "claude-3-5-sonnet-20241022", @@ -77,6 +78,7 @@ }, "includeCoAuthoredBy": true, "language": "english", + "model": "opus", "outputStyle": "Explanatory", "permissions": { "additionalDirectories": ["~/Documents/reference", "~/.config/claude-code"], @@ -104,6 +106,7 @@ ] }, "plansDirectory": "./plans", + "prefersReducedMotion": false, "respectGitignore": true, "sandbox": { "allowUnsandboxedCommands": false, @@ -127,5 +130,6 @@ "mode": "append", "verbs": ["Analyzing", "Building"] }, + "teammateMode": "auto", "terminalProgressBarEnabled": true } diff --git a/src/test/claude-code-settings/permissions-advanced.json b/src/test/claude-code-settings/permissions-advanced.json index 5293a9cac2d..8abd07c1f5a 100644 --- a/src/test/claude-code-settings/permissions-advanced.json +++ b/src/test/claude-code-settings/permissions-advanced.json @@ -6,6 +6,8 @@ "Grep", "Read(~/projects/**)", "Edit(~/projects/**)", + "ToolSearch", + "LSP", "NotebookEdit", "TodoWrite", "WebFetch(domain:github.com)",