distributed-a2a 0.1.9rc6__tar.gz → 0.1.9rc8__tar.gz
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.
- {distributed_a2a-0.1.9rc6/distributed_a2a.egg-info → distributed_a2a-0.1.9rc8}/PKG-INFO +1 -1
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/distributed_a2a/model.py +1 -1
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/distributed_a2a/router.py +9 -10
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/distributed_a2a/server.py +1 -4
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8/distributed_a2a.egg-info}/PKG-INFO +1 -1
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/pyproject.toml +1 -1
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/LICENSE +0 -0
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/MANIFEST.in +0 -0
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/README.md +0 -0
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/distributed_a2a/__init__.py +0 -0
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/distributed_a2a/agent.py +0 -0
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/distributed_a2a/client.py +0 -0
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/distributed_a2a/executors.py +0 -0
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/distributed_a2a/registry.py +0 -0
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/distributed_a2a.egg-info/SOURCES.txt +0 -0
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/distributed_a2a.egg-info/dependency_links.txt +0 -0
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/distributed_a2a.egg-info/requires.txt +0 -0
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/distributed_a2a.egg-info/top_level.txt +0 -0
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/requirements.txt +0 -0
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/setup.cfg +0 -0
- {distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/setup.py +0 -0
|
@@ -19,7 +19,7 @@ class RegistryItemConfig(BaseModel):
|
|
|
19
19
|
|
|
20
20
|
class RegistryConfig(BaseModel):
|
|
21
21
|
agent: RegistryItemConfig = Field(description="The agent registry configuration")
|
|
22
|
-
mcp: Optional[RegistryItemConfig] = Field(description="The mcp registry configuration",
|
|
22
|
+
mcp: Optional[RegistryItemConfig] = Field(description="The mcp registry configuration", default=None)
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
class LLMConfig(BaseModel):
|
|
@@ -14,7 +14,7 @@ from .server import CAPABILITIES, HEART_BEAT_INTERVAL_SEC, get_expire_at
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
def load_router(router_dic: dict[str, Any]) -> FastAPI:
|
|
17
|
-
router_config = RouterConfig.model_validate(router_dic)
|
|
17
|
+
router_config: RouterConfig = RouterConfig.model_validate(router_dic)
|
|
18
18
|
agent_card = AgentCard(
|
|
19
19
|
name="Router",
|
|
20
20
|
description="Agent to redirect to the best matching agent based on the agent card",
|
|
@@ -39,15 +39,14 @@ def load_router(router_dic: dict[str, Any]) -> FastAPI:
|
|
|
39
39
|
|
|
40
40
|
@asynccontextmanager
|
|
41
41
|
async def lifespan(_: FastAPI) -> AsyncGenerator[None, Any]:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
))
|
|
42
|
+
import asyncio
|
|
43
|
+
asyncio.create_task(registry_heart_beat(
|
|
44
|
+
name=router_config.router.card.name,
|
|
45
|
+
registry_url=router_config.router.registry.agent.url,
|
|
46
|
+
agent_card=agent_card,
|
|
47
|
+
interval_sec=HEART_BEAT_INTERVAL_SEC,
|
|
48
|
+
get_expire_at=get_expire_at
|
|
49
|
+
))
|
|
51
50
|
yield
|
|
52
51
|
|
|
53
52
|
return A2ARESTFastAPIApplication(
|
|
@@ -14,16 +14,13 @@ from fastapi import FastAPI
|
|
|
14
14
|
|
|
15
15
|
from .executors import RoutingAgentExecutor
|
|
16
16
|
from .model import AgentConfig
|
|
17
|
-
from .registry import
|
|
17
|
+
from .registry import registry_heart_beat, AgentRegistryLookup
|
|
18
18
|
|
|
19
19
|
CAPABILITIES = AgentCapabilities(streaming=False, push_notifications=False)
|
|
20
20
|
|
|
21
21
|
HEART_BEAT_INTERVAL_SEC = 5
|
|
22
22
|
MAX_HEART_BEAT_MISSES = 3
|
|
23
23
|
|
|
24
|
-
AGENT_CARD_TABLE = "agent-cards"
|
|
25
|
-
AGENT_REGISTRY_URL = ""
|
|
26
|
-
|
|
27
24
|
def get_expire_at() -> int:
|
|
28
25
|
return int(time.time() + MAX_HEART_BEAT_MISSES * HEART_BEAT_INTERVAL_SEC)
|
|
29
26
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/distributed_a2a.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{distributed_a2a-0.1.9rc6 → distributed_a2a-0.1.9rc8}/distributed_a2a.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|