feat(claude-code-settings): sync to Claude Code v2.1.112#5585
Open
miteshashar wants to merge 2 commits intoSchemaStore:masterfrom
Open
feat(claude-code-settings): sync to Claude Code v2.1.112#5585miteshashar wants to merge 2 commits intoSchemaStore:masterfrom
miteshashar wants to merge 2 commits intoSchemaStore:masterfrom
Conversation
Subsumes open PRs SchemaStore#5483 and SchemaStore#5583 (credited; coverage.js changes deferred to a separate follow-up PR). Schema: - Add hookCommand fields: asyncRewake (command-only), shell (command-only, enum bash|powershell), if (filter on tool-related events). Omit `once` since docs scope it to skill frontmatter, not settings.json. - Add hook events: StopFailure (API-error matcher values documented) - Add 17 top-level properties: agent, allowedChannelPlugins, autoMemoryDirectory, autoMode (with allow/soft_deny/environment classifier customization), channelsEnabled, defaultShell, disableDeepLinkRegistration, disableSkillShellExecution, forceRemoteSettingsRefresh, minimumVersion, showClearContextOnPlanAccept, showThinkingSummaries, skipDangerousModePermissionPrompt, strictPluginOnlyCustomization, tui, useAutoModeDuringPlan, viewMode, voiceEnabled - Add permissions.disableAutoMode (nested, mirrors disableBypassPermissionsMode) - Add sandbox.network.allowMachLookup (macOS XPC/Mach service allowlist) - Add sandbox.ripgrep custom-binary configuration - Add statusLine.refreshInterval (min 1) - Add pluginConfigs.*.options (non-sensitive plugin userConfig values) - Extend effortLevel enum with xhigh (Opus 4.7) and max - Extend permissionRule pattern with Monitor and PowerShell tools - Tighten cleanupPeriodDays minimum from 0 to 1 (v2.1.89 validator rejects 0) - Fix stale doc anchors: hooks-guide#filter-hooks-with-matchers, hooks#http-hook-fields, memory#exclude-specific-claude-md-files, tools-reference (canonical page for tool list) Tests: - modern-complete-config.json: cover all new properties - complete-config.json: cover effortLevel medium and viewMode default - edge-cases.json: update cleanupPeriodDays 0 -> 1 - New enum-coverage.json: cover alternate enum values (bash, fullscreen, xhigh, verbose) for full positive coverage across new enums Negative tests: - invalid-enum-values.json: add invalid values for defaultShell, disableDeepLinkRegistration, permissions.disableAutoMode, tui, viewMode - New invalid-hook-shell.json: exercise hookCommand.shell invalid enum Excluded: - coverage.js \$defs-path fix from SchemaStore#5483 (scheduled for a separate PR crediting @r-johnv). Consequence: the #\$defs/hookCommand.shell enum coverage gate fails here; will be resolved when that PR lands. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Path-based traversal in collectValuesByPath cannot match $defs paths (e.g., "#$defs/hookCommand.shell") against test data because the path references the schema definition, not the test structure. Adds a deep name-based search fallback for the terminal property name so test files exercising the property via $ref usage are still matched. Included from SchemaStore#5483 by @r-johnv to extend the coverage gate so this sync PR can land without skipping the #\$defs/hookCommand.shell check. Co-Authored-By: Rohit John Varghese <rohit@contoro.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Thanks for the PR! This section of the codebase is owned by @domdomegg, @bogini, and @sarahdeaton - if they write a comment saying "LGTM" then it will be merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs
claude-code-settings.jsonfrom v2.1.76 (previous sync) to v2.1.112. Subsumes the contributions in open PRs #5483 (large v2.1.81 sync) and #5583 (hookCommand fields). Resulting diff reflects a deep review of live docs at https://code.claude.com/docs/en with multi-pass verification and matching with docs and Changelog.Schema
New hookCommand fields
asyncRewake(command-only) — background hook that wakes the model on exit code 2 (v2.1.79)shell(command-only, enumbash|powershell) — shell interpreter selector, per hooks documentation (v2.1.85)if(command/prompt/agent/http) — permission-rule-syntax filter, per hooks-guide#filter-hooks-with-matchers. Evaluated only on tool-related events; description notes the scope.once— proposed in claude-code-settings: addif,shell,onceto hookCommand #5583, but current hooks docs scope this field to skill frontmatter YAML, not settings.jsonhookCommand.New hook event
StopFailure— runs when a turn ends due to an API error (matcher values:rate_limit,authentication_failed,billing_error,invalid_request,server_error,max_output_tokens,unknown), per hooks documentation (v2.1.84)Top-level properties (17)
agent— run the main thread as a named subagent, per settings documentationallowedChannelPlugins— managed-only allowlist of plugins that may push channel notifications whenchannelsEnabledis trueautoMemoryDirectory— custom auto-memory storage path, per memory documentationautoMode— auto-mode classifier prompt customization (allow/soft_deny/environment), per permissions documentation. Description warns thatallow/soft_denyentirely replace classifier defaults.channelsEnabled— Teams/Enterprise opt-in for channel notificationsdefaultShell(enumbash|powershell) — default shell for input-box!commands; notes thatpowershellrequiresCLAUDE_CODE_USE_POWERSHELL_TOOL=1withpwshonPATHdisableDeepLinkRegistration("disable") — preventsclaude://protocol handler registration (managed-only)disableSkillShellExecution— disable inline shell execution in skills and custom slash commands (v2.1.91)forceRemoteSettingsRefresh— fail-closed managed-only bootstrap policy (v2.1.92)minimumVersion— prevents downgrades when switching release channelsshowClearContextOnPlanAccept— adds clear-context option on plan approval dialogshowThinkingSummaries— restore thinking summaries in transcript view (off by default, v2.1.89)skipDangerousModePermissionPrompt— tracks bypass-permissions opt-in dialog acceptancestrictPluginOnlyCustomization— managed-only; locks customization surfaces (skills/agents/hooks/mcp) to plugin sourcestui(enumfullscreen|default) — flicker-free alt-screen vs classic renderer (v2.1.110)useAutoModeDuringPlan— apply auto-mode classifier during plan modeviewMode(enumdefault|verbose|focus) — transcript view mode (focusis the Ctrl+O toggle)voiceEnabled— push-to-talk dictation (see voice-dictation docs)Nested additions
permissions.disableAutoMode("disable") — mirror ofdisableBypassPermissionsMode, per permissions documentation. Note: feat(claude-code): update settings schema to match v2.1.81 #5483 placed this at both top-level and underpermissions; only the nested form is correct per docs.sandbox.network.allowMachLookup— macOS-only XPC/Mach service allowlist, per settings documentation (v2.1.97)sandbox.ripgrep— custom ripgrep binary/argsstatusLine.refreshInterval(min 1) — re-run status line every N seconds, per statusline documentation (v2.1.97)pluginConfigs.*.options— non-sensitive pluginuserConfigvalues, per plugins-referenceEnum extensions
effortLevel: addxhigh(Opus 4.7, v2.1.111) andmax; description rewritten to match model-config documentation for per-model/plan defaults andmaxsession-only behaviorpermissionRulepattern: addMonitorandPowerShelltoolsTightenings
cleanupPeriodDaysminimum:0→1— v2.1.89 validator explicitly rejects0(previously silently disabled cleanup)Doc-anchor fixes
hooks-guide#filter-hooks-with-if→hooks-guide#filter-hooks-with-matchershooks#http-hooks→hooks#http-hook-fieldsmemory#exclude-specific-claudemd-files→memory#exclude-specific-claude-md-filessettings#tools-available-to-claude→/docs/en/tools-reference(canonical tool list page)Tests
modern-complete-config.json— exercises every new property for full coveragecomplete-config.json— addseffortLevel: mediumandviewMode: defaultfor enum-value spreadedge-cases.json— updatescleanupPeriodDays: 0→1(forced by tightened minimum)enum-coverage.json— filename/concept taken from feat(claude-code): update settings schema to match v2.1.81 #5483 by @r-johnv; content adapted to our schema to cover alternate enum values (bash,fullscreen,xhigh,verbose) and fill positive-coverage gaps across the new enumsNegative tests
invalid-enum-values.json— adds invalid values fordefaultShell,disableDeepLinkRegistration,permissions.disableAutoMode,tui,viewModeinvalid-hook-shell.json— identical to the file proposed in claude-code-settings: addif,shell,onceto hookCommand #5583 by @sarahdeaton; exercises thehookCommand.shellinvalid-enum pathCoverage helper
src/helpers/coverage.js— adds a deep name-based fallback for$defs-path resolution incollectValuesByPathso enum/required checks match values exercised via$ref. Included from feat(claude-code): update settings schema to match v2.1.81 #5483 by @r-johnv to extend the coverage gate so the#$defs/hookCommand.shellcheck passes in this sync (would otherwise fail the gate). Committed separately to preserve authorship.Skipped
oncehookCommand field (alike claude-code-settings: addif,shell,onceto hookCommand #5583) — Had added, but removed after validation. Per hooks documentation, theoncefield belongs to skill frontmatter YAML (hooks declared inside skills), not tohookCommandentries declared insettings.json.disableAutoModeduplicate from feat(claude-code): update settings schema to match v2.1.81 #5483 — kept only underpermissionsper docs.🤖 Generated with Claude Code