summaryrefslogtreecommitdiffhomepage
path: root/dispatch.toml
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-04 16:16:45 +0900
committerAdam Malczewski <[email protected]>2026-06-04 16:16:45 +0900
commit81a9cdbadf8c9d940d4fe9a2a0de607dee1f5f1a (patch)
treedff8ce0e55f27b490445ddaf9fb6536d1313ffcf /dispatch.toml
parent24bdaa6ca0333b91369ac50b23e929f83af01c3a (diff)
downloaddispatch-81a9cdbadf8c9d940d4fe9a2a0de607dee1f5f1a.tar.gz
dispatch-81a9cdbadf8c9d940d4fe9a2a0de607dee1f5f1a.zip
feat(config): add subdirectory LSP config watchers and fix permission ordering
- Add watchDirConfig() for per-directory config watching - Register watchers for subdirectories with their own dispatch.toml - Fix permission ordering: move "*" wildcard to front so findLast reaches specific rules first (was silently breaking all specific bash permission rules) - Add comprehensive tests for watcher functionality - Update mocks in test files
Diffstat (limited to 'dispatch.toml')
-rw-r--r--dispatch.toml8
1 files changed, 7 insertions, 1 deletions
diff --git a/dispatch.toml b/dispatch.toml
index 9477842..6964993 100644
--- a/dispatch.toml
+++ b/dispatch.toml
@@ -48,11 +48,18 @@ base_url = "https://opencode.ai/zen/go/v1"
[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"
@@ -63,7 +70,6 @@ read = "allow"
"git commit *" = "allow"
"git push *" = "allow"
"ls *" = "allow"
-"*" = "ask"
[permissions.external_directory]
"~/*" = "ask"