fix(team-mode): keep member communication tools visible
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user