Skip to content

Commit e8f579d

Browse files
fix(common): Improve constant SEP from "-" to "__" for namespaced names (#298)
* fix(common): Improve constant SEP from "-" to "__" for namespaced names - Modify test cases to include prompt testing * fix(#298): Improve some hard-coded SEP value in tests * fix(#298): Change 'check_weather_tool' back to 'check_weather' to avoid affect other tests * update * filtering improvements * improve filtering * break down filtering tests --------- Co-authored-by: evalstate <[email protected]>
1 parent 4b7e941 commit e8f579d

File tree

14 files changed

+314
-312
lines changed

14 files changed

+314
-312
lines changed

examples/a2a/agent_executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
DEFAULT_AGENT_NAME = "helper"
1919

2020
fast = FastAgent(
21-
"A2A FastAgent Demo",
21+
"A2A fast-agent Demo",
2222
parse_cli_args=False,
2323
quiet=True,
2424
)

src/fast_agent/agents/agent_types.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from dataclasses import dataclass, field
66
from enum import StrEnum, auto
77
from pathlib import Path
8-
from typing import Dict, List, Optional
98

109
from mcp.client.session import ElicitationFnT
1110

@@ -35,12 +34,12 @@ class AgentConfig:
3534

3635
name: str
3736
instruction: str = "You are a helpful agent."
38-
servers: List[str] = field(default_factory=list)
39-
tools: Optional[Dict[str, List[str]]] = None
40-
resources: Optional[Dict[str, List[str]]] = None
41-
prompts: Optional[Dict[str, List[str]]] = None
37+
servers: list[str] = field(default_factory=list)
38+
tools: dict[str, list[str]] = field(default_factory=dict) # filters for tools
39+
resources: dict[str, list[str]] = field(default_factory=dict) # filters for resources
40+
prompts: dict[str, list[str]] = field(default_factory=dict) # filters for prompts
4241
skills: SkillManifest | SkillRegistry | Path | str | None = None
43-
skill_manifests: List[SkillManifest] = field(default_factory=list, repr=False)
42+
skill_manifests: list[SkillManifest] = field(default_factory=list, repr=False)
4443
model: str | None = None
4544
use_history: bool = True
4645
default_request_params: RequestParams | None = None

src/fast_agent/agents/llm_agent.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,7 @@
1010

1111
from typing import Callable, List, Optional, Tuple
1212

13-
try:
14-
from a2a.types import AgentCapabilities # type: ignore
15-
except Exception: # pragma: no cover - optional dependency fallback
16-
from dataclasses import dataclass
17-
18-
@dataclass
19-
class AgentCapabilities: # minimal fallback
20-
streaming: bool = False
21-
push_notifications: bool = False
22-
state_transition_history: bool = False
23-
24-
13+
from a2a.types import AgentCapabilities
2514
from mcp import Tool
2615
from rich.text import Text
2716

0 commit comments

Comments
 (0)