summaryrefslogtreecommitdiffhomepage
path: root/dispatch.toml
blob: 9f09ef72ad52d1e06183434cdfd4de67c29b0259 (plain)
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
# Dispatch — Key & Permission Configuration
# Credentials and API keys are stored in the SQLite database.
# Use the Model Status panel to import credentials, or run bin/import-credentials.ts.

# ─── API Keys ───────────────────────────────────────────────────

[[keys]]
id = "claude-pro"
provider = "anthropic"
base_url = "https://api.anthropic.com/v1"
credentials_file = "/home/tradam/.claude/.credentials-pro.json"

[[keys]]
id = "claude-max"
provider = "anthropic"
base_url = "https://api.anthropic.com/v1"
credentials_file = "/home/tradam/.claude/.credentials-max.json"

[[keys]]
id = "opencode-1"
provider = "opencode-go"
base_url = "https://opencode.ai/zen/go/v1"

[[keys]]
id = "opencode-2"
provider = "opencode-go"
base_url = "https://opencode.ai/zen/go/v1"# ─── 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"

# ─── Language Servers (LSP) ──────────────────────────────────────
# Optional. Declare LSP servers to give agents diagnostics (and, with the
# `lsp` tool, hover/definition/references) for the files they edit. This block
# is PROJECT-SCOPED: it is read from the `dispatch.toml` in a tab's effective
# working directory (re-consulted when you change the CWD). Config-driven only —
# there is no builtin server registry and no auto-download, so the executable
# in `command[0]` must already be on PATH.
#
# After `write_file` edits a file whose extension matches a server below,
# dispatch opens it through the server and appends any error diagnostics to the
# tool result ("LSP errors detected in this file, please fix: ..."). Grant the
# `perm_lsp` permission to also expose the on-demand `lsp` tool.
#
# The example below is the Roblox Luau setup using luau-lsp
# (https://github.com/JohnnyMorganz/luau-lsp). Uncomment and adapt for your
# project. luau-lsp's `sourcemap.autogenerate` makes luau-lsp run
# `rojo sourcemap --watch` itself, so `rojo` must be on PATH (or set
# `[lsp.luau-lsp.env]` PATH / luau-lsp's sourcemap.rojoPath accordingly).
#
# [lsp.luau-lsp]
# command = ["luau-lsp", "lsp", "--definitions=globalTypes.d.luau", "--docs=api-docs.json"]
# extensions = [".luau"]
#
# [lsp.luau-lsp.initialization.luau-lsp.platform]
# type = "roblox"
#
# [lsp.luau-lsp.initialization.luau-lsp.sourcemap]
# enabled = true
# autogenerate = true
# rojoProjectFile = "default.project.json"
#
# [lsp.luau-lsp.initialization.luau-lsp.types]
# roblox = true
# definitionFiles = ["globalTypes.d.luau"]
# documentationFiles = ["api-docs.json"]
#
# [lsp.luau-lsp.initialization.luau-lsp.diagnostics]
# strictDatamodelTypes = false
#
# [lsp.luau-lsp.initialization.luau-lsp.completion.imports]
# useConst = true