@@ -34,10 +34,6 @@ class AgentDefinition(BaseModel):
3434 default_factory = list , description = "List of allowed tools for this agent"
3535 )
3636 system_prompt : str = Field (default = "" , description = "System prompt content" )
37- allowed_commands : list [str ] = Field (
38- default_factory = list ,
39- description = "List of allowed shell commands for this agent" ,
40- )
4137 source : str | None = Field (
4238 default = None , description = "Source file path for this agent"
4339 )
@@ -93,18 +89,6 @@ def load(cls, agent_path: Path) -> AgentDefinition:
9389 else :
9490 tools = []
9591
96- # Parse allowed_commands (supports both snake_case and kebab-case)
97- allowed_commands_raw = (
98- fm .get ("allowed_commands" ) or fm .get ("allowed-commands" ) or []
99- )
100- allowed_commands : list [str ]
101- if isinstance (allowed_commands_raw , str ):
102- allowed_commands = [allowed_commands_raw ]
103- elif isinstance (allowed_commands_raw , list ):
104- allowed_commands = [str (c ) for c in allowed_commands_raw ]
105- else :
106- allowed_commands = []
107-
10892 # Extract whenToUse examples from description
10993 when_to_use_examples = _extract_examples (description )
11094
@@ -115,8 +99,6 @@ def load(cls, agent_path: Path) -> AgentDefinition:
11599 "model" ,
116100 "color" ,
117101 "tools" ,
118- "allowed_commands" ,
119- "allowed-commands" ,
120102 }
121103 metadata = {k : v for k , v in fm .items () if k not in known_fields }
122104
@@ -126,7 +108,6 @@ def load(cls, agent_path: Path) -> AgentDefinition:
126108 model = model ,
127109 color = color ,
128110 tools = tools ,
129- allowed_commands = allowed_commands ,
130111 system_prompt = content ,
131112 source = str (agent_path ),
132113 when_to_use_examples = when_to_use_examples ,
0 commit comments