fix(agents): preserve explicit legacy tool denies

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-27 14:24:42 +09:00
parent c65f90ee09
commit ac8987a732
5 changed files with 77 additions and 3 deletions
+35
View File
@@ -553,4 +553,39 @@ describe("maybeCreateHephaestusConfig GPT apply_patch guard", () => {
expect(config?.permission).toHaveProperty("glob", "deny");
});
});
describe("#given non-frontier model with legacy user tools denying grep and glob", () => {
test("#when config is created #then explicit legacy denies are preserved", () => {
// given
const legacyOverride = {
model: "openai/gpt-5.4",
tools: {
grep: false,
glob: false,
},
};
const agentOverrides: AgentOverrides = {
hephaestus: legacyOverride,
};
const mergedCategories: Record<string, CategoryConfig> = {};
// when
const config = maybeCreateHephaestusConfig({
disabledAgents: [],
agentOverrides,
availableModels: new Set(["openai/gpt-5.4"]),
systemDefaultModel: "openai/gpt-5.4",
isFirstRunNoCache: false,
availableAgents: [],
availableSkills: [],
availableCategories: [],
mergedCategories,
useTaskSystem: false,
});
// then
expect(config?.permission).toHaveProperty("grep", "deny");
expect(config?.permission).toHaveProperty("glob", "deny");
});
});
});