fix(team-mode): keep member communication tools visible

This commit is contained in:
YeonGyu-Kim
2026-05-10 12:54:16 +09:00
parent 1e4a51e21b
commit b36389ef2c
5 changed files with 82 additions and 37 deletions
+6 -2
View File
@@ -59,14 +59,18 @@ const AGENT_RESTRICTIONS: Record<string, Record<string, boolean>> = {
},
}
export function getAgentToolRestrictions(agentName: string): Record<string, boolean> {
type AgentToolRestrictionsOptions = {
includeTeamToolDenylist?: boolean
}
export function getAgentToolRestrictions(agentName: string, options: AgentToolRestrictionsOptions = {}): Record<string, boolean> {
const stripped = stripInvisibleAgentCharacters(agentName)
const agentRestrictions = AGENT_RESTRICTIONS[stripped]
?? Object.entries(AGENT_RESTRICTIONS).find(([key]) => key.toLowerCase() === stripped.toLowerCase())?.[1]
?? {}
return {
...TEAM_TOOL_DENYLIST,
...(options.includeTeamToolDenylist === false ? {} : TEAM_TOOL_DENYLIST),
...agentRestrictions,
}
}