Skip to content

Commit 37317ec

Browse files
authored
chore: Regenerate python types from updated spec, per a2aproject/A2A#590 (#50)
* Regenerate python types from updated spec, per a2aproject/A2A#590 * Run nox format * Fix examples to remove unused auth * More missed instances of AgentAuthentication + nox format * Update check-spelling metadata
1 parent d266fc0 commit 37317ec

File tree

8 files changed

+307
-156
lines changed

8 files changed

+307
-156
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
excinfo
2+
GVsb
3+
notif
4+
otherurl

examples/google_adk/birthday_planner/__main__.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,13 @@
66
import click
77
import uvicorn
88

9-
from adk_agent_executor import ADKAgentExecutor # type: ignore[import-untyped]
9+
from adk_agent_executor import ADKAgentExecutor # type: ignore[import-untyped]
1010
from dotenv import load_dotenv
1111

1212
from a2a.server.apps import A2AStarletteApplication
1313
from a2a.server.request_handlers import DefaultRequestHandler
1414
from a2a.server.tasks import InMemoryTaskStore
15-
from a2a.types import (
16-
AgentAuthentication,
17-
AgentCapabilities,
18-
AgentCard,
19-
AgentSkill,
20-
)
15+
from a2a.types import AgentCapabilities, AgentCard, AgentSkill
2116

2217

2318
load_dotenv()
@@ -69,7 +64,6 @@ def main(host: str, port: int, calendar_agent: str):
6964
defaultOutputModes=['text'],
7065
capabilities=AgentCapabilities(streaming=True),
7166
skills=[skill],
72-
authentication=AgentAuthentication(schemes=['public']),
7367
)
7468
request_handler = DefaultRequestHandler(
7569
agent_executor=agent_executor, task_store=InMemoryTaskStore()

examples/google_adk/calendar_agent/__main__.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@
44
import click
55
import uvicorn
66

7-
from adk_agent import create_agent # type: ignore[import-not-found]
8-
from adk_agent_executor import ADKAgentExecutor # type: ignore[import-untyped]
7+
from adk_agent import create_agent # type: ignore[import-not-found]
8+
from adk_agent_executor import ADKAgentExecutor # type: ignore[import-untyped]
99
from dotenv import load_dotenv
10-
from google.adk.artifacts import InMemoryArtifactService # type: ignore[import-untyped]
11-
from google.adk.memory.in_memory_memory_service import InMemoryMemoryService # type: ignore[import-untyped]
12-
from google.adk.runners import Runner # type: ignore[import-untyped]
13-
from google.adk.sessions import InMemorySessionService # type: ignore[import-untyped]
10+
from google.adk.artifacts import (
11+
InMemoryArtifactService, # type: ignore[import-untyped]
12+
)
13+
from google.adk.memory.in_memory_memory_service import (
14+
InMemoryMemoryService, # type: ignore[import-untyped]
15+
)
16+
from google.adk.runners import Runner # type: ignore[import-untyped]
17+
from google.adk.sessions import (
18+
InMemorySessionService, # type: ignore[import-untyped]
19+
)
1420
from starlette.applications import Starlette
1521
from starlette.requests import Request
1622
from starlette.responses import PlainTextResponse
@@ -19,12 +25,7 @@
1925
from a2a.server.apps import A2AStarletteApplication
2026
from a2a.server.request_handlers import DefaultRequestHandler
2127
from a2a.server.tasks import InMemoryTaskStore
22-
from a2a.types import (
23-
AgentAuthentication,
24-
AgentCapabilities,
25-
AgentCard,
26-
AgentSkill,
27-
)
28+
from a2a.types import AgentCapabilities, AgentCard, AgentSkill
2829

2930

3031
load_dotenv()
@@ -63,7 +64,6 @@ def main(host: str, port: int):
6364
defaultOutputModes=['text'],
6465
capabilities=AgentCapabilities(streaming=True),
6566
skills=[skill],
66-
authentication=AgentAuthentication(schemes=['public']),
6767
)
6868

6969
adk_agent = create_agent(

examples/helloworld/__main__.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
from agent_executor import HelloWorldAgentExecutor # type: ignore[import-untyped]
1+
from agent_executor import (
2+
HelloWorldAgentExecutor, # type: ignore[import-untyped]
3+
)
24

35
from a2a.server.apps import A2AStarletteApplication
46
from a2a.server.request_handlers import DefaultRequestHandler
57
from a2a.server.tasks import InMemoryTaskStore
6-
from a2a.types import (
7-
AgentAuthentication,
8-
AgentCapabilities,
9-
AgentCard,
10-
AgentSkill,
11-
)
8+
from a2a.types import AgentCapabilities, AgentCard, AgentSkill
129

1310

1411
if __name__ == '__main__':
@@ -29,7 +26,6 @@
2926
defaultOutputModes=['text'],
3027
capabilities=AgentCapabilities(streaming=True),
3128
skills=[skill],
32-
authentication=AgentAuthentication(schemes=['public']),
3329
)
3430

3531
request_handler = DefaultRequestHandler(

examples/langgraph/__main__.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,14 @@
44
import click
55
import httpx
66

7-
from agent import CurrencyAgent # type: ignore[import-untyped]
8-
from agent_executor import CurrencyAgentExecutor # type: ignore[import-untyped]
7+
from agent import CurrencyAgent # type: ignore[import-untyped]
8+
from agent_executor import CurrencyAgentExecutor # type: ignore[import-untyped]
99
from dotenv import load_dotenv
1010

1111
from a2a.server.apps import A2AStarletteApplication
1212
from a2a.server.request_handlers import DefaultRequestHandler
1313
from a2a.server.tasks import InMemoryPushNotifier, InMemoryTaskStore
14-
from a2a.types import (
15-
AgentAuthentication,
16-
AgentCapabilities,
17-
AgentCard,
18-
AgentSkill,
19-
)
14+
from a2a.types import AgentCapabilities, AgentCard, AgentSkill
2015

2116

2217
load_dotenv()
@@ -64,7 +59,6 @@ def get_agent_card(host: str, port: int):
6459
defaultOutputModes=CurrencyAgent.SUPPORTED_CONTENT_TYPES,
6560
capabilities=capabilities,
6661
skills=[skill],
67-
authentication=AgentAuthentication(schemes=['public']),
6862
)
6963

7064

0 commit comments

Comments
 (0)