You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(tools): configurable LLM tool list via tools config, env, and --tool/--no-tool
Add a new config section with (whitelist) and
(blacklist) plus CLI flags / and env vars
/ . This supports deployments
where odek should only expose a subset of tools, e.g. a chatbot with
web_search + voice but no shell or file writes.
Key changes:
- internal/config/loader.go: ToolConfig/ToolsConfig types, file/env/CLI
merge logic, and project-level security restriction (project config can
only disable, never enable).
- internal/tool/registry.go: FilterTools helper with whitelist/blacklist
and required-tool preservation.
- odek.go: ToolFilterConfig on Config; memory tool is no longer appended
unconditionally — it respects the filter.
- cmd/odek/*.go: wire filtering into run, continue, repl, serve, telegram,
subagent, schedule, and mcp surfaces.
- Docs and help text updated with examples and env vars.
Tests:
- internal/config/tools_test.go
- internal/tool/filter_test.go
- cmd/odek/run_flags_tools_test.go
- odek_test.go memory-filter regression tests
All existing tests pass.
|`enabled`|`ODEK_TOOLS_ENABLED`| unset | Whitelist. When set, only these tools are registered. Comma-separated in env. |
577
+
|`disabled`|`ODEK_TOOLS_DISABLED`| unset | Blacklist. These tools are removed from the default set. Comma-separated in env. |
578
+
579
+
CLI flags override file and env config:
580
+
581
+
```bash
582
+
# Whitelist mode: only these tools
583
+
odek run --tool web_search --tool vision "what's new in Go?"
584
+
585
+
# Blacklist mode: remove specific tools
586
+
odek run --no-tool shell --no-tool write_file "review this code"
587
+
588
+
# Environment
589
+
ODEK_TOOLS_ENABLED=web_search,vision odek run "search and summarize"
590
+
```
591
+
592
+
Resolution rules:
593
+
594
+
-`enabled` is set by the highest-priority layer that provides it.
595
+
-`disabled` is merged across layers.
596
+
- If both are present: start from `enabled`, then subtract `disabled`.
597
+
- Unknown tool names are silently ignored.
598
+
- The `memory` tool is also subject to this filter, so a whitelist must
599
+
include `"memory"` if you want persistent memory.
600
+
601
+
Project-level `./odek.json`**cannot enable tools** — it may only append to
602
+
`disabled`. This prevents a malicious repository from widening the tool
603
+
surface.
604
+
559
605
## Tool Progress
560
606
561
607
Controls how per-tool progress messages appear inside the Telegram bot during agent runs. Independent from `interaction_mode` — you can have engaging terminal output with minimal Telegram progress, or verbose terminal with rich progress bubbles.
0 commit comments