File tree Expand file tree Collapse file tree 5 files changed +15
-8
lines changed
Expand file tree Collapse file tree 5 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 3333 "icon" : " code" ,
3434 "versions" : [
3535 {
36- "version" : " 0.5.8 " ,
36+ "version" : " 0.5.9 " ,
3737 "groups" : [
3838 {
3939 "group" : " Get Started" ,
Original file line number Diff line number Diff line change @@ -189,18 +189,25 @@ def as_tools(self) -> list[mcp_types.Tool]:
189189 """Return tools in MCP format (base format).
190190
191191 Applies agent-level include/exclude filtering if set.
192+ Supports fnmatch-style wildcards (e.g., "*setup*", "browser_*").
192193 """
194+ import fnmatch
195+
193196 tools = self ._router .tools
194197
195198 # Apply agent-level filtering (from v4 allowed_tools/disallowed_tools)
196199 if self ._agent_include is not None or self ._agent_exclude is not None :
197200 filtered = []
198201 for tool in tools :
199- # Include filter: None means include all
200- if self ._agent_include is not None and tool .name not in self ._agent_include :
202+ # Include filter: None means include all, check if matches any pattern
203+ if self ._agent_include is not None and not any (
204+ fnmatch .fnmatch (tool .name , pattern ) for pattern in self ._agent_include
205+ ):
201206 continue
202- # Exclude filter
203- if self ._agent_exclude is not None and tool .name in self ._agent_exclude :
207+ # Exclude filter: skip if tool matches any exclude pattern
208+ if self ._agent_exclude is not None and any (
209+ fnmatch .fnmatch (tool .name , pattern ) for pattern in self ._agent_exclude
210+ ):
204211 continue
205212 filtered .append (tool )
206213 return filtered
Original file line number Diff line number Diff line change @@ -5,4 +5,4 @@ def test_import():
55 """Test that the package can be imported."""
66 import hud
77
8- assert hud .__version__ == "0.5.8 "
8+ assert hud .__version__ == "0.5.9 "
Original file line number Diff line number Diff line change 44
55from __future__ import annotations
66
7- __version__ = "0.5.8 "
7+ __version__ = "0.5.9 "
Original file line number Diff line number Diff line change 11[project ]
22name = " hud-python"
3- version = " 0.5.8 "
3+ version = " 0.5.9 "
44description = " SDK for the HUD platform."
55readme = " README.md"
66requires-python = " >=3.11, <3.13"
You can’t perform that action at this time.
0 commit comments