fix(agents): hide grep glob for frontier agents

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 12:49:20 +09:00
parent f74d03ca90
commit c46b712997
8 changed files with 222 additions and 6 deletions
@@ -8,6 +8,7 @@ import { applyEnvironmentContext } from "./environment-context"
import { applyCategoryOverride, mergeAgentConfig } from "./agent-overrides"
import { applyModelResolution, getFirstFallbackModel } from "./model-resolution"
import { getGptApplyPatchPermission } from "../gpt-apply-patch-guard"
import { getFrontierToolSchemaPermission } from "../frontier-tool-schema-guard"
export function maybeCreateHephaestusConfig(input: {
disabledAgents: string[]
@@ -89,6 +90,11 @@ export function maybeCreateHephaestusConfig(input: {
}
const resolvedModel = hephaestusConfig.model ?? ""
const frontierDeny = getFrontierToolSchemaPermission(resolvedModel)
if (Object.keys(frontierDeny).length > 0 && hephaestusConfig.permission) {
Object.assign(hephaestusConfig.permission, frontierDeny)
}
const gptDeny = getGptApplyPatchPermission(resolvedModel)
if (Object.keys(gptDeny).length > 0 && hephaestusConfig.permission) {
Object.assign(hephaestusConfig.permission, gptDeny)