fast-agent-mcp 0.3.1__py3-none-any.whl → 0.3.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fast-agent-mcp might be problematic. Click here for more details.
- fast_agent/__init__.py +6 -0
- fast_agent/agents/mcp_agent.py +1 -5
- fast_agent/core/fastagent.py +27 -0
- {fast_agent_mcp-0.3.1.dist-info → fast_agent_mcp-0.3.2.dist-info}/METADATA +1 -1
- {fast_agent_mcp-0.3.1.dist-info → fast_agent_mcp-0.3.2.dist-info}/RECORD +8 -8
- {fast_agent_mcp-0.3.1.dist-info → fast_agent_mcp-0.3.2.dist-info}/WHEEL +0 -0
- {fast_agent_mcp-0.3.1.dist-info → fast_agent_mcp-0.3.2.dist-info}/entry_points.txt +0 -0
- {fast_agent_mcp-0.3.1.dist-info → fast_agent_mcp-0.3.2.dist-info}/licenses/LICENSE +0 -0
fast_agent/__init__.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""fast-agent - An MCP native agent application framework"""
|
|
2
|
+
from typing import TYPE_CHECKING as _TYPE_CHECKING
|
|
2
3
|
|
|
3
4
|
# Configuration and settings (safe - pure Pydantic models)
|
|
4
5
|
from fast_agent.config import (
|
|
@@ -83,6 +84,11 @@ def __getattr__(name: str):
|
|
|
83
84
|
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
84
85
|
|
|
85
86
|
|
|
87
|
+
# Help static analyzers/IDEs resolve symbols and signatures without importing at runtime.
|
|
88
|
+
if _TYPE_CHECKING: # pragma: no cover - typing aid only
|
|
89
|
+
from fast_agent.core.fastagent import FastAgent as FastAgent # noqa: F401
|
|
90
|
+
|
|
91
|
+
|
|
86
92
|
__all__ = [
|
|
87
93
|
# Core fast-agent components (lazy loaded)
|
|
88
94
|
"Core",
|
fast_agent/agents/mcp_agent.py
CHANGED
|
@@ -43,7 +43,6 @@ from fast_agent.constants import HUMAN_INPUT_TOOL_NAME
|
|
|
43
43
|
from fast_agent.core.exceptions import PromptExitError
|
|
44
44
|
from fast_agent.core.logging.logger import get_logger
|
|
45
45
|
from fast_agent.interfaces import FastAgentLLMProtocol
|
|
46
|
-
from fast_agent.mcp.helpers.content_helpers import normalize_to_extended_list
|
|
47
46
|
from fast_agent.mcp.mcp_aggregator import MCPAggregator
|
|
48
47
|
from fast_agent.tools.elicitation import (
|
|
49
48
|
get_elicitation_tool,
|
|
@@ -624,12 +623,9 @@ class McpAgent(ABC, ToolAgent):
|
|
|
624
623
|
Returns:
|
|
625
624
|
An instance of the specified model, or None if coercion fails
|
|
626
625
|
"""
|
|
627
|
-
assert self._llm
|
|
628
|
-
# Normalize all input types to a list of PromptMessageExtended
|
|
629
|
-
normalized_messages = normalize_to_extended_list(messages)
|
|
630
626
|
|
|
631
627
|
with self._tracer.start_as_current_span(f"Agent: '{self._name}' structured"):
|
|
632
|
-
return await
|
|
628
|
+
return await super().structured(messages, model, request_params)
|
|
633
629
|
|
|
634
630
|
async def apply_prompt_messages(
|
|
635
631
|
self, prompts: List[PromptMessageExtended], request_params: RequestParams | None = None
|
fast_agent/core/fastagent.py
CHANGED
|
@@ -251,6 +251,33 @@ class FastAgent:
|
|
|
251
251
|
return self.app.context
|
|
252
252
|
|
|
253
253
|
# Decorator methods with type-safe implementations
|
|
254
|
+
# Provide annotations so IDEs can discover these attributes on instances
|
|
255
|
+
if TYPE_CHECKING: # pragma: no cover - typing aid only
|
|
256
|
+
from typing import Awaitable, ParamSpec, Protocol, TypeVar # re-import for type block
|
|
257
|
+
|
|
258
|
+
from fast_agent.core.direct_decorators import (
|
|
259
|
+
DecoratedAgentProtocol,
|
|
260
|
+
DecoratedChainProtocol,
|
|
261
|
+
DecoratedEvaluatorOptimizerProtocol,
|
|
262
|
+
DecoratedOrchestratorProtocol,
|
|
263
|
+
DecoratedParallelProtocol,
|
|
264
|
+
DecoratedRouterProtocol,
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
P = ParamSpec("P")
|
|
268
|
+
R = TypeVar("R")
|
|
269
|
+
|
|
270
|
+
# These are declared as attributes so IDEs show autocomplete on `fast.agent` etc.
|
|
271
|
+
def agent(self, *args, **kwargs) -> "DecoratedAgentProtocol[P, R]": ...
|
|
272
|
+
def custom(self, *args, **kwargs) -> "DecoratedAgentProtocol[P, R]": ...
|
|
273
|
+
def orchestrator(self, *args, **kwargs) -> "DecoratedOrchestratorProtocol[P, R]": ...
|
|
274
|
+
def iterative_planner(self, *args, **kwargs) -> "DecoratedOrchestratorProtocol[P, R]": ...
|
|
275
|
+
def router(self, *args, **kwargs) -> "DecoratedRouterProtocol[P, R]": ...
|
|
276
|
+
def chain(self, *args, **kwargs) -> "DecoratedChainProtocol[P, R]": ...
|
|
277
|
+
def parallel(self, *args, **kwargs) -> "DecoratedParallelProtocol[P, R]": ...
|
|
278
|
+
def evaluator_optimizer(self, *args, **kwargs) -> "DecoratedEvaluatorOptimizerProtocol[P, R]": ...
|
|
279
|
+
|
|
280
|
+
# Runtime bindings (actual implementations)
|
|
254
281
|
agent = agent_decorator
|
|
255
282
|
custom = custom_decorator
|
|
256
283
|
orchestrator = orchestrator_decorator
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
fast_agent/__init__.py,sha256=
|
|
1
|
+
fast_agent/__init__.py,sha256=sljPsYHqDmv5v0fBpQdhtwBm5IDyu37lwdSQA0IPEwQ,3628
|
|
2
2
|
fast_agent/config.py,sha256=8CPbTctXGdSneAkMory5ZRXkUsUj4AyKnaf_nmEamQA,19886
|
|
3
3
|
fast_agent/constants.py,sha256=d5EMSO2msRkjRFz8MgnnhpMnO3woqKP0EcQ4b_yI60w,235
|
|
4
4
|
fast_agent/context.py,sha256=nBelOqehSH91z3aG2nYhwETP-biRzz-iuA2fqmKdHP8,7700
|
|
@@ -11,7 +11,7 @@ fast_agent/agents/__init__.py,sha256=kBI2VWTitLyWf8K3dFMyuE-K7Ufp7mkHBomM2K3I8H8
|
|
|
11
11
|
fast_agent/agents/agent_types.py,sha256=ugolD3lC2KxSfBYjjRf9HjNATZaFx1o4Fhjb15huSgk,1776
|
|
12
12
|
fast_agent/agents/llm_agent.py,sha256=iuy3kO5Q-f9bm3tjYLG2Wurd0gK2sLhTfTkSnfVWzSw,8311
|
|
13
13
|
fast_agent/agents/llm_decorator.py,sha256=yzaYqsT8lqey4dbZrv1oK9qUqf8I2RMPYiWOy0uVHqA,16443
|
|
14
|
-
fast_agent/agents/mcp_agent.py,sha256=
|
|
14
|
+
fast_agent/agents/mcp_agent.py,sha256=BMSTcGd9_SdoyEGNGVAWXu8ubaE1TAeAMl-2c_wymQU,35240
|
|
15
15
|
fast_agent/agents/tool_agent.py,sha256=zSaVQH-mBICgE3ildeZx24i00u_KMOk5P4OuJBTiQ3g,6571
|
|
16
16
|
fast_agent/agents/workflow/chain_agent.py,sha256=Pd8dOH_YdKu3LXsKa4fwqzY_B2qVuhzdfCUiKi5v17s,6293
|
|
17
17
|
fast_agent/agents/workflow/evaluator_optimizer.py,sha256=rhzazy8Aj-ydId6kmBC77TmtYZ5mirSe7eV6PPMWkBA,12040
|
|
@@ -38,7 +38,7 @@ fast_agent/core/direct_decorators.py,sha256=eHhQfKLbeaoH-W0snzAVJRxga7wTNGXBk5DE
|
|
|
38
38
|
fast_agent/core/direct_factory.py,sha256=HGGnnF4Z9k_N3r0Iin_sp2Ch308To1oKX8JTKHjuUq0,21350
|
|
39
39
|
fast_agent/core/error_handling.py,sha256=xoyS2kLe0eG0bj2eSJCJ2odIhGUve2SbDR7jP-A-uRw,624
|
|
40
40
|
fast_agent/core/exceptions.py,sha256=ENAD_qGG67foxy6vDkIvc-lgopIUQy6O7zvNPpPXaQg,2289
|
|
41
|
-
fast_agent/core/fastagent.py,sha256=
|
|
41
|
+
fast_agent/core/fastagent.py,sha256=PJPeRREuQqlqdVub7RqamfsArpoZ1D50B8Hz-CsDenA,26792
|
|
42
42
|
fast_agent/core/prompt.py,sha256=qNUFlK3KtU7leYysYUglzBYQnEYiXu__iR_T8189zc0,203
|
|
43
43
|
fast_agent/core/validation.py,sha256=GZ0hUTxkr5KMY1wr6_ifDy91Ycvcx384gZEMOwdie9w,12681
|
|
44
44
|
fast_agent/core/executor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -196,8 +196,8 @@ fast_agent/ui/mermaid_utils.py,sha256=MpcRyVCPMTwU1XeIxnyFg0fQLjcyXZduWRF8NhEqvX
|
|
|
196
196
|
fast_agent/ui/progress_display.py,sha256=hajDob65PttiJ2mPS6FsCtnmTcnyvDWGn-UqQboXqkQ,361
|
|
197
197
|
fast_agent/ui/rich_progress.py,sha256=vMeDD5cybsPf_0IjOM98U8TVaE_yYIOKZa8JnRgTYUo,7451
|
|
198
198
|
fast_agent/ui/usage_display.py,sha256=ltJpn_sDzo8PDNSXWx-QdEUbQWUnhmajCItNt5mA5rM,7285
|
|
199
|
-
fast_agent_mcp-0.3.
|
|
200
|
-
fast_agent_mcp-0.3.
|
|
201
|
-
fast_agent_mcp-0.3.
|
|
202
|
-
fast_agent_mcp-0.3.
|
|
203
|
-
fast_agent_mcp-0.3.
|
|
199
|
+
fast_agent_mcp-0.3.2.dist-info/METADATA,sha256=iaD5FYCGdDqTIAnGvq32PatCS2P-SbVzy-x79bmfIUA,30462
|
|
200
|
+
fast_agent_mcp-0.3.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
201
|
+
fast_agent_mcp-0.3.2.dist-info/entry_points.txt,sha256=i6Ujja9J-hRxttOKqTYdbYP_tyaS4gLHg53vupoCSsg,199
|
|
202
|
+
fast_agent_mcp-0.3.2.dist-info/licenses/LICENSE,sha256=Gx1L3axA4PnuK4FxsbX87jQ1opoOkSFfHHSytW6wLUU,10935
|
|
203
|
+
fast_agent_mcp-0.3.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|