-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsettings.example.jsonc
More file actions
95 lines (89 loc) · 3.12 KB
/
settings.example.jsonc
File metadata and controls
95 lines (89 loc) · 3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
// Current selection — updated automatically when switching via /model
"provider": "anthropic",
"model": "claude-sonnet-4-6",
"small_model": "claude-haiku-4-5", // auto-filled from provider config or main model
// Per-provider credentials and model catalog.
// Provider names are free-form; use "type" to specify the API protocol.
"providers": {
"anthropic": {
"api_key": "",
"models": ["claude-sonnet-4-6", "claude-opus-4-6"],
"small_model": "claude-haiku-4-5" // sub-agents model; omit to use main model
},
"openai": {
"api_key": "",
"base_url": "",
"models": ["gpt-5.4", "gpt-5.3-codex"],
"small_model": "gpt-5-mini"
},
"openrouter": {
"api_key": "",
"base_url": "https://openrouter.ai/api/v1",
"small_model": "stepfun/step-3.5-flash:free",
"models": ["stepfun/step-3.5-flash:free", "openrouter/hunter-alpha", "openrouter/healer-alpha"]
// no small_model — sub-agents will use the main model
},
"gemini": {
"api_key": "",
"models": ["gemini-3.1-pro", "gemini-2.5-flash"],
"small_model": "gemini-2.5-flash"
},
// Custom proxy example: "type" specifies the API protocol (openai/anthropic/gemini).
// Omit "type" for well-known provider names — it will be inferred automatically.
"my-proxy": {
"type": "openai",
"api_key": "sk-xxx",
"base_url": "https://proxy.example.com/v1",
"models": ["gpt-5", "claude-sonnet-4-5"],
"small_model": "gpt-4o-mini"
}
},
"context_window": 128000, // tokens
"auto_compaction": true, // compact when context fills up
"thinking_level": "low", // off | low | medium | high | xhigh
"max_turns": 30,
"search_provider": "tavily", // tavily | jina
"search_api_key": "",
// Hooks: shell commands triggered on lifecycle events.
// Global + project-level hooks are merged (appended, not replaced).
"hooks": {
"PreToolUse": [
{ "type": "command", "command": "echo $HOOK_TOOL_NAME >> ~/.codebot/audit.log", "matcher": "bash", "blocking": true, "timeout": 10 }
],
"PostToolUse": [
{ "type": "command", "command": "echo done" }
],
"Notification": [
{ "type": "command", "command": "notify-send 'codebot' 'Agent finished'" }
]
},
// 文件系统授权根目录。
// 默认 read_roots / write_roots 都只有当前工作目录 "."。
// 可以显式加入额外目录;写根目录通常应比读根目录更保守。
// 注意:roots 严格约束文件类工具(read/write/edit/glob/grep/ls),
// bash 仅约束启动目录(workdir),不保证命令实际访问范围,始终需要审批。
"permissions": {
"read_roots": [
".",
"../shared"
],
"write_roots": [
"."
],
"allow": [],
"deny": []
},
// MCP servers: stdio (local process) or http (remote endpoint)
"mcp_servers": {
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"]
},
"remote-api": {
"type": "http",
"url": "https://mcp.deepwiki.com/mcp",
"headers": { "Authorization": "Bearer your-token-here" }
}
}
}