fix: respect disabled_tools config in agent prompts (fixes #2742)

- Check disabled_tools for 'question' in tool-config-handler permission logic
- Strip Question tool code examples from Prometheus prompts when disabled
- Pass disabled_tools through prometheus agent config builder pipeline
- Add tests for disabled_tools question permission handling
This commit is contained in:
YeonGyu-Kim
2026-03-23 18:13:38 +09:00
parent d886ac701f
commit f5eaa648e9
6 changed files with 153 additions and 5 deletions
@@ -44,7 +44,9 @@ export function applyToolConfig(params: {
const isCliRunMode = process.env.OPENCODE_CLI_RUN_MODE === "true";
const configQuestionPermission = getConfigQuestionPermission();
const isQuestionDisabledByPlugin = params.pluginConfig.disabled_tools?.includes("question") ?? false;
const questionPermission =
isQuestionDisabledByPlugin ? "deny" :
configQuestionPermission === "deny" ? "deny" :
isCliRunMode ? "deny" :
"allow";