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
96
97
98
99
100
101
102
103
104
105
106
107
108
|
# Dispatch — Model & Key Configuration
# Keys reference env var names in .env.dispatch
# ─── Fallback Order (highest priority first) ────────────────────
# Exhaust claude-max first, then opencode-1, then opencode-2, then copilot.
# When all keys are exhausted the agent enters wait-for-refresh.
# Must be declared BEFORE any [[keys]] / [[models]] blocks.
fallback = ["claude-pro", "claude-max", "opencode-1", "opencode-2", "copilot"]
# ─── API Keys ───────────────────────────────────────────────────
[[keys]]
id = "claude-pro"
provider = "anthropic"
base_url = "https://api.anthropic.com/v1"
credentials_file = "/root/.claude/.credentials-1.json"
[[keys]]
id = "claude-max"
provider = "anthropic"
base_url = "https://api.anthropic.com/v1"
credentials_file = "/root/.claude/.credentials-2.json"
[[keys]]
id = "opencode-1"
provider = "opencode-go"
env = "OPENCODE_KEY_1"
base_url = "https://opencode.ai/zen/go/v1"
[[keys]]
id = "opencode-2"
provider = "opencode-go"
env = "OPENCODE_KEY_2"
base_url = "https://opencode.ai/zen/go/v1"
[[keys]]
id = "copilot"
provider = "github-copilot"
env = "COPILOT_TOKEN"
base_url = "https://api.githubcopilot.com"
# ─── Models ─────────────────────────────────────────────────────
[[models]]
id = "claude-sonnet-4-20250514"
provider = "anthropic"
tags = ["heavy", "coding", "review"]
[[models]]
id = "claude-opus-4-20250514"
provider = "anthropic"
tags = ["heavy", "coding", "review"]
[[models]]
id = "deepseek-v4-pro"
provider = "opencode-go"
tags = ["heavy", "coding"]
[[models]]
id = "deepseek-v4-flash"
provider = "opencode-go"
tags = ["light", "quick"]
[[models]]
id = "gpt-4o"
provider = "github-copilot"
tags = ["heavy", "coding"]
[[models]]
id = "claude-3.5-sonnet"
provider = "github-copilot"
tags = ["heavy", "coding", "review"]
# ─── Agent Templates ─────────────────────────────────────────────
[agents.default]
name = "Dispatch"
description = "Default coding assistant"
system_prompt = "You are a helpful AI coding assistant."
tools = ["read_file", "write_file", "list_files", "run_shell", "task_list"]
model_tag = "heavy"
# ─── Permissions ─────────────────────────────────────────────────
[permissions]
read = "allow"
[permissions.edit]
"*" = "ask"
"src/**" = "allow"
[permissions.bash]
"npm test" = "allow"
"npm run *" = "allow"
"git status" = "allow"
"git diff" = "allow"
"git log *" = "allow"
"git branch *" = "allow"
"git add *" = "allow"
"git commit *" = "allow"
"git push *" = "allow"
"ls *" = "allow"
"*" = "ask"
[permissions.external_directory]
"~/*" = "ask"
"/tmp/*" = "allow"
|