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
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ Used by: `tombi-toml/tombi`. See [this](https://tombi-toml.github.io/tombi/docs/

Used by: `tombi-toml/tombi`. See [this](https://tombi-toml.github.io/tombi/docs/json-schema#x-tombi-string-formats) for details.

**`x-tombi-additional-key-label`**

Used by: `tombi-toml/tombi`. See [this](https://tombi-toml.github.io/tombi/docs/json-schema#x-tombi-additional-key-label) for details.

**`x-intellij-language-injection`**

Used by Intellij.
Expand Down
1 change: 1 addition & 0 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ async function ajvFactory(
'x-tombi-array-values-order-by',
'x-tombi-table-keys-order',
'x-tombi-string-formats',
'x-tombi-additional-key-label',
'x-intellij-language-injection',
'x-intellij-html-description',
'x-intellij-enum-metadata',
Expand Down
4 changes: 2 additions & 2 deletions src/api/json/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,9 @@
"*.cv.yml",
"*.cv.toml"
],
"url": "https://raw.githubusercontent.com/hexagonkt/codecv/master/cv.schema.json",
"url": "https://raw.githubusercontent.com/codecv-co/codecv/master/cv.schema.json",
"versions": {
"0.9.9": "https://raw.githubusercontent.com/hexagonkt/codecv/0.9.9/cv.schema.json"
"0.9.24": "https://raw.githubusercontent.com/codecv-co/codecv/0.9.24/cv.schema.json"
}
},
{
Expand Down
3 changes: 2 additions & 1 deletion src/schema-validation.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@
"xunit.runner.schema.json",
"gitversion.json",
"lazygit.json",
"circleciconfig.json"
"circleciconfig.json",
"ogen.json"
],
"catalogEntryNoLintNameOrDescription": [
"https://json-schema.org/draft-04/schema",
Expand Down
87 changes: 77 additions & 10 deletions src/schemas/json/claude-code-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,20 @@
},
"permissionRule": {
"type": "string",
"description": "Tool permission rule (e.g., 'Bash(ls:*)', 'Read(~/.zshrc)', 'WebFetch(domain:github.com)')",
"pattern": "^((Agent|Bash|Edit|Glob|Grep|LS|MultiEdit|NotebookEdit|NotebookRead|Read|TodoRead|TodoWrite|WebFetch|WebSearch|Write)\\(?|^mcp__)"
"description": "Tool permission rule",
"pattern": "^((Bash|Edit|Glob|Grep|MultiEdit|NotebookEdit|NotebookRead|Read|SlashCommand|Task|TodoWrite|WebFetch|WebSearch|Write)\\(?|^mcp__)",
"examples": [
"Bash(npm run lint)",
"Bash(npm run test:*)",
"Bash(git push:*)",
"Bash(curl:*)",
"Read(~/.zshrc)",
"Read(./.env)",
"Read(./secrets/**)",
"WebFetch(domain:github.com)",
"Edit(~/projects/**)",
"mcp__github__search_repositories"
]
}
},
"description": "Configuration file for Claude Code CLI settings",
Expand All @@ -60,13 +72,15 @@
},
"apiKeyHelper": {
"type": "string",
"description": "Custom script path to generate an auth value"
"description": "Custom script path to generate an auth value",
"examples": ["/bin/generate_temp_api_key.sh"]
},
"cleanupPeriodDays": {
"type": "integer",
"description": "How long to locally retain chat transcripts (in days)",
"default": 30,
"minimum": 0
"minimum": 0,
"examples": [20, 30, 60]
},
"env": {
"type": "object",
Expand Down Expand Up @@ -134,21 +148,24 @@
},
"enableAllProjectMcpServers": {
"type": "boolean",
"description": "Whether to automatically approve all MCP servers in the project"
"description": "Whether to automatically approve all MCP servers in the project",
"examples": [true]
},
"enabledMcpjsonServers": {
"type": "array",
"description": "List of allowed MCP servers from .mcp.json",
"items": {
"type": "string"
}
},
"examples": [["memory", "github"]]
},
"disabledMcpjsonServers": {
"type": "array",
"description": "List of denied MCP servers from .mcp.json",
"items": {
"type": "string"
}
},
"examples": [["filesystem"]]
},
"hooks": {
"type": "object",
Expand All @@ -170,6 +187,11 @@
"description": "Hooks that trigger on notifications",
"items": { "$ref": "#/$defs/hookMatcher" }
},
"UserPromptSubmit": {
"type": "array",
"description": "Hooks that run when a user submits a prompt",
"items": { "$ref": "#/$defs/hookMatcher" }
},
"Stop": {
"type": "array",
"description": "Hooks that run when agents finish responding",
Expand All @@ -180,9 +202,9 @@
"description": "Hooks that run when subagents finish responding",
"items": { "$ref": "#/$defs/hookMatcher" }
},
"ToolError": {
"PreCompact": {
"type": "array",
"description": "Hooks that run when a tool call fails",
"description": "Hooks that run before the context is compacted",
"items": { "$ref": "#/$defs/hookMatcher" }
},
"SessionStart": {
Expand All @@ -200,7 +222,52 @@
"forceLoginMethod": {
"type": "string",
"description": "Force a specific login method, and skip the login method selection screen",
"enum": ["claudeai", "console"]
"enum": ["claudeai", "console"],
"examples": ["claudeai"]
},
"disableAllHooks": {
"type": "boolean",
"description": "Disable all hooks"
},
"statusLine": {
"type": "object",
"description": "Custom status line configuration",
"properties": {
"type": {
"type": "string",
"const": "command"
},
"command": {
"type": "string",
"description": "Shell command to execute to generate the status line"
},
"padding": {
"type": "number",
"description": "Optional padding for the status line"
}
},
"required": ["type", "command"],
"examples": [{ "type": "command", "command": "~/.claude/statusline.sh" }]
},
"outputStyle": {
"type": "string",
"description": "The output style to use. Can be 'default', 'explanatory', 'learning', or a custom style name.",
"examples": ["default", "explanatory", "learning"]
},
"forceLoginOrgUUID": {
"type": "string",
"description": "Force login with a specific organization UUID",
"examples": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]
},
"awsAuthRefresh": {
"type": "string",
"description": "Command to refresh AWS credentials.",
"examples": ["aws sso login --profile myprofile"]
},
"awsCredentialExport": {
"type": "string",
"description": "Command to export AWS credentials as JSON.",
"examples": ["/bin/generate_aws_grant.sh"]
}
}
}
5 changes: 5 additions & 0 deletions src/schemas/json/ogen.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "https://raw.githubusercontent.com/ogen-go/ogen/refs/heads/main/examples/config/ogen.jsonschema.json",
"title": "ogen configuration"
}
16 changes: 13 additions & 3 deletions src/test/claude-code-settings/hooks-complete.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
"matcher": "Edit"
}
],
"PreCompact": [
{
"hooks": [
{
"command": "echo 'Pre compact hook' >> /tmp/claude-session.log",
"type": "command"
}
]
}
],
"PreToolUse": [
{
"hooks": [
Expand Down Expand Up @@ -81,14 +91,14 @@
"type": "command"
}
],
"matcher": "Agent"
"matcher": "Task"
}
],
"ToolError": [
"UserPromptSubmit": [
{
"hooks": [
{
"command": "echo 'Tool error occurred' >> /tmp/claude-error.log",
"command": "echo 'User prompt submitted' >> /tmp/claude-session.log",
"type": "command"
}
]
Expand Down
4 changes: 1 addition & 3 deletions src/test/claude-code-settings/modern-complete-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,11 @@
"permissions": {
"additionalDirectories": ["~/Documents/reference", "~/.config/claude-code"],
"allow": [
"Agent",
"Bash(git:*)",
"Bash(npm:*)",
"Edit",
"Glob",
"Grep",
"LS",
"MultiEdit",
"NotebookEdit",
"Read",
Expand All @@ -55,7 +53,7 @@
"Write",
"mcp__*"
],
"ask": ["TodoRead", "NotebookRead", "Bash(pip:*)", "Write(~/.cache/**)"],
"ask": ["NotebookRead", "Bash(pip:*)", "Write(~/.cache/**)"],
"defaultMode": "plan",
"deny": [
"Bash(sudo:*)",
Expand Down
4 changes: 1 addition & 3 deletions src/test/claude-code-settings/permissions-advanced.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
"/opt/company/resources"
],
"allow": [
"Agent",
"Glob",
"Grep",
"LS",
"Read(~/projects/**)",
"Edit(~/projects/**)",
"MultiEdit",
Expand All @@ -19,7 +17,7 @@
"mcp__ide__getDiagnostics",
"mcp__ide__executeCode"
],
"ask": ["Write(~/projects/**)", "TodoRead", "NotebookRead", "Bash(make:*)"],
"ask": ["Write(~/projects/**)", "NotebookRead", "Bash(make:*)"],
"defaultMode": "acceptEdits",
"deny": ["Bash(rm:*)", "Write(/etc/**)", "WebFetch(domain:malicious.com)"],
"disableBypassPermissionsMode": "disable"
Expand Down