# 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. # # ─── Global defaults ───────────────────────────────────────────── # A HOME-directory config at ~/.config/dispatch/dispatch.toml (override with # the DISPATCH_GLOBAL_CONFIG env var) is loaded and MERGED underneath this # project config, so machine-wide settings (e.g. globally available LSP # servers) work in any repository without per-repo setup. This LOCAL file # always takes PRECEDENCE on conflicts: # [lsp] merged by server id — a local [lsp.] overrides the # global one of the same id; non-conflicting ids from both # stay active. # [[keys]] merged by id — a local key overrides the global key of the # same id; non-conflicting ids from both stay active. # [permissions] merged per group: nested { pattern = action } groups merge # pattern-by-pattern (local patterns win), and a local value # replaces a global one of the same key. Global patterns are # emitted first so local rules win at evaluation time. # Both files hot-reload: editing either re-merges and applies live. # ─── 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" # NOTE on ordering: rules are flattened in file order and the LAST matching # rule wins (see evaluate()'s findLast). So a broad fallback like "*" must be # placed FIRST and the more-specific overrides AFTER it — otherwise a trailing # "*" would shadow every specific rule above it. (Global+local merge preserves # this: global patterns are emitted before local ones so local overrides win.) [permissions.edit] "*" = "ask" "src/**" = "allow" [permissions.bash] "*" = "ask" "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" [permissions.external_directory] "~/*" = "ask" "/tmp/*" = "allow" # ─── Language Servers (LSP) ────────────────────────────────────── # After `write_file` edits a matching file, dispatch appends any diagnostics. # Grant `perm_lsp` to also expose the on-demand `lsp` tool for hover/definition/references. [lsp.biome] command = ["/home/tradam/projects/dispatch/dispatch-source/node_modules/.bin/biome", "lsp-proxy"] extensions = [".ts", ".tsx", ".js", ".jsx", ".svelte", ".css", ".json"] [lsp.typescript-language-server] command = ["/home/tradam/.local/bin/typescript-language-server", "--stdio"] extensions = [".ts", ".tsx"] env = { PATH = "/home/tradam/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin" }