solace-agent-mesh 1.0.9__py3-none-any.whl → 1.3.0__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 solace-agent-mesh might be problematic. Click here for more details.
- solace_agent_mesh/agent/adk/adk_llm.txt +182 -42
- solace_agent_mesh/agent/adk/artifacts/artifacts_llm.txt +171 -0
- solace_agent_mesh/agent/adk/callbacks.py +165 -104
- solace_agent_mesh/agent/adk/embed_resolving_mcp_toolset.py +0 -18
- solace_agent_mesh/agent/adk/models/models_llm.txt +104 -55
- solace_agent_mesh/agent/adk/runner.py +25 -17
- solace_agent_mesh/agent/adk/services.py +3 -3
- solace_agent_mesh/agent/adk/setup.py +11 -0
- solace_agent_mesh/agent/adk/stream_parser.py +8 -1
- solace_agent_mesh/agent/adk/tool_wrapper.py +10 -3
- solace_agent_mesh/agent/agent_llm.txt +355 -18
- solace_agent_mesh/agent/protocol/event_handlers.py +460 -317
- solace_agent_mesh/agent/protocol/protocol_llm.txt +54 -7
- solace_agent_mesh/agent/sac/app.py +2 -2
- solace_agent_mesh/agent/sac/component.py +211 -517
- solace_agent_mesh/agent/sac/sac_llm.txt +133 -63
- solace_agent_mesh/agent/testing/testing_llm.txt +25 -58
- solace_agent_mesh/agent/tools/peer_agent_tool.py +15 -11
- solace_agent_mesh/agent/tools/tools_llm.txt +234 -69
- solace_agent_mesh/agent/utils/artifact_helpers.py +35 -1
- solace_agent_mesh/agent/utils/utils_llm.txt +90 -105
- solace_agent_mesh/assets/docs/404.html +3 -3
- solace_agent_mesh/assets/docs/assets/js/6e0db977.39a79ca9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{75384d09.ccd480c4.js → 75384d09.bf78fbdb.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/90dd9cf6.88f385ea.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/f284c35a.fb68323a.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/main.08d30374.js +2 -0
- solace_agent_mesh/assets/docs/assets/js/runtime~main.458efb1d.js +1 -0
- solace_agent_mesh/assets/docs/docs/documentation/concepts/agents/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/concepts/architecture/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/concepts/cli/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/concepts/gateways/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/concepts/orchestrator/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/concepts/plugins/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/deployment/debugging/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/deployment/deploy/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/deployment/observability/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/component-overview/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/configurations/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/installation/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/quick-start/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/migration-guides/a2a-upgrade-to-0.3.0/a2a-gateway-upgrade-to-0.3.0/index.html +105 -0
- solace_agent_mesh/assets/docs/docs/documentation/migration-guides/a2a-upgrade-to-0.3.0/a2a-technical-migration-map/index.html +53 -0
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/bedrock-agents/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/custom-agent/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/event-mesh-gateway/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/mcp-integration/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/mongodb-integration/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/rag-integration/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/rest-gateway/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/slack-integration/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/sql-database/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/artifact-management/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/audio-tools/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/data-analysis-tools/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/embeds/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/create-agents/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/create-gateways/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/creating-service-providers/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/solace-ai-connector/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/structure/index.html +4 -4
- solace_agent_mesh/assets/docs/lunr-index-1757433031159.json +1 -0
- solace_agent_mesh/assets/docs/lunr-index.json +1 -1
- solace_agent_mesh/assets/docs/search-doc-1757433031159.json +1 -0
- solace_agent_mesh/assets/docs/search-doc.json +1 -1
- solace_agent_mesh/assets/docs/sitemap.xml +1 -1
- solace_agent_mesh/cli/__init__.py +1 -1
- solace_agent_mesh/cli/commands/add_cmd/agent_cmd.py +125 -48
- solace_agent_mesh/cli/commands/eval_cmd.py +14 -0
- solace_agent_mesh/cli/commands/init_cmd/__init__.py +53 -31
- solace_agent_mesh/cli/commands/init_cmd/database_step.py +91 -0
- solace_agent_mesh/cli/commands/init_cmd/env_step.py +19 -8
- solace_agent_mesh/cli/commands/init_cmd/orchestrator_step.py +80 -25
- solace_agent_mesh/cli/commands/init_cmd/web_init_step.py +32 -10
- solace_agent_mesh/cli/commands/init_cmd/webui_gateway_step.py +74 -15
- solace_agent_mesh/cli/commands/plugin_cmd/create_cmd.py +0 -2
- solace_agent_mesh/cli/commands/run_cmd.py +5 -3
- solace_agent_mesh/cli/utils.py +68 -12
- solace_agent_mesh/client/webui/frontend/static/assets/authCallback-vY5eu2lI.js +1 -0
- solace_agent_mesh/client/webui/frontend/static/assets/client-BeBkzgWW.js +25 -0
- solace_agent_mesh/client/webui/frontend/static/assets/main-Bjys1KQs.js +339 -0
- solace_agent_mesh/client/webui/frontend/static/assets/main-C03yrETa.css +1 -0
- solace_agent_mesh/client/webui/frontend/static/assets/vendor-CE0AeXyK.js +395 -0
- solace_agent_mesh/client/webui/frontend/static/auth-callback.html +3 -2
- solace_agent_mesh/client/webui/frontend/static/index.html +4 -3
- solace_agent_mesh/common/a2a/__init__.py +213 -0
- solace_agent_mesh/common/a2a/a2a_llm.txt +182 -0
- solace_agent_mesh/common/a2a/artifact.py +328 -0
- solace_agent_mesh/common/a2a/events.py +183 -0
- solace_agent_mesh/common/a2a/message.py +307 -0
- solace_agent_mesh/common/a2a/protocol.py +513 -0
- solace_agent_mesh/common/a2a/task.py +127 -0
- solace_agent_mesh/common/a2a/translation.py +653 -0
- solace_agent_mesh/common/a2a/types.py +54 -0
- solace_agent_mesh/common/a2a_spec/a2a.json +2576 -0
- solace_agent_mesh/common/a2a_spec/a2a_spec_llm.txt +407 -0
- solace_agent_mesh/common/a2a_spec/schemas/agent_progress_update.json +18 -0
- solace_agent_mesh/common/a2a_spec/schemas/artifact_creation_progress.json +31 -0
- solace_agent_mesh/common/a2a_spec/schemas/llm_invocation.json +18 -0
- solace_agent_mesh/common/a2a_spec/schemas/schemas_llm.txt +235 -0
- solace_agent_mesh/common/a2a_spec/schemas/tool_invocation_start.json +26 -0
- solace_agent_mesh/common/a2a_spec/schemas/tool_result.json +25 -0
- solace_agent_mesh/common/agent_registry.py +1 -1
- solace_agent_mesh/common/common_llm.txt +192 -70
- solace_agent_mesh/common/data_parts.py +99 -0
- solace_agent_mesh/common/middleware/middleware_llm.txt +17 -17
- solace_agent_mesh/common/sac/__init__.py +0 -0
- solace_agent_mesh/common/sac/sac_llm.txt +71 -0
- solace_agent_mesh/common/sac/sam_component_base.py +252 -0
- solace_agent_mesh/common/services/providers/providers_llm.txt +51 -84
- solace_agent_mesh/common/services/services_llm.txt +206 -26
- solace_agent_mesh/common/utils/artifact_utils.py +29 -0
- solace_agent_mesh/common/utils/embeds/embeds_llm.txt +176 -80
- solace_agent_mesh/common/utils/embeds/resolver.py +1 -0
- solace_agent_mesh/common/utils/utils_llm.txt +323 -42
- solace_agent_mesh/config_portal/backend/common.py +2 -2
- solace_agent_mesh/config_portal/backend/plugin_catalog/constants.py +1 -1
- solace_agent_mesh/config_portal/frontend/static/client/assets/_index-bFMKlzKf.js +98 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/{manifest-d845808d.js → manifest-89db7c30.js} +1 -1
- solace_agent_mesh/config_portal/frontend/static/client/index.html +1 -1
- solace_agent_mesh/core_a2a/core_a2a_llm.txt +10 -8
- solace_agent_mesh/core_a2a/service.py +20 -44
- solace_agent_mesh/evaluation/message_organizer.py +35 -56
- solace_agent_mesh/evaluation/run.py +26 -5
- solace_agent_mesh/evaluation/subscriber.py +35 -10
- solace_agent_mesh/evaluation/summary_builder.py +27 -34
- solace_agent_mesh/gateway/base/app.py +27 -1
- solace_agent_mesh/gateway/base/base_llm.txt +177 -72
- solace_agent_mesh/gateway/base/component.py +294 -523
- solace_agent_mesh/gateway/gateway_llm.txt +299 -58
- solace_agent_mesh/gateway/http_sse/ARCHITECTURE_GUIDE.md +676 -0
- solace_agent_mesh/gateway/http_sse/alembic/env.py +85 -0
- solace_agent_mesh/gateway/http_sse/alembic/script.py.mako +28 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/b1c2d3e4f5g6_add_database_indexes.py +83 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/d5b3f8f2e9a0_create_initial_database.py +58 -0
- solace_agent_mesh/gateway/http_sse/alembic.ini +147 -0
- solace_agent_mesh/gateway/http_sse/api/__init__.py +11 -0
- solace_agent_mesh/gateway/http_sse/api/controllers/__init__.py +9 -0
- solace_agent_mesh/gateway/http_sse/api/controllers/session_controller.py +355 -0
- solace_agent_mesh/gateway/http_sse/api/controllers/task_controller.py +279 -0
- solace_agent_mesh/gateway/http_sse/api/controllers/user_controller.py +35 -0
- solace_agent_mesh/gateway/http_sse/api/dto/__init__.py +10 -0
- solace_agent_mesh/gateway/http_sse/api/dto/requests/__init__.py +37 -0
- solace_agent_mesh/gateway/http_sse/api/dto/requests/session_requests.py +49 -0
- solace_agent_mesh/gateway/http_sse/api/dto/requests/task_requests.py +66 -0
- solace_agent_mesh/gateway/http_sse/api/dto/responses/__init__.py +43 -0
- solace_agent_mesh/gateway/http_sse/api/dto/responses/session_responses.py +68 -0
- solace_agent_mesh/gateway/http_sse/api/dto/responses/task_responses.py +74 -0
- solace_agent_mesh/gateway/http_sse/app.py +31 -1
- solace_agent_mesh/gateway/http_sse/application/__init__.py +3 -0
- solace_agent_mesh/gateway/http_sse/application/services/__init__.py +3 -0
- solace_agent_mesh/gateway/http_sse/application/services/session_service.py +135 -0
- solace_agent_mesh/gateway/http_sse/component.py +371 -236
- solace_agent_mesh/gateway/http_sse/components/components_llm.txt +29 -29
- solace_agent_mesh/gateway/http_sse/dependencies.py +142 -39
- solace_agent_mesh/gateway/http_sse/domain/entities/__init__.py +3 -0
- solace_agent_mesh/gateway/http_sse/domain/entities/session.py +90 -0
- solace_agent_mesh/gateway/http_sse/domain/repositories/__init__.py +3 -0
- solace_agent_mesh/gateway/http_sse/domain/repositories/session_repository.py +54 -0
- solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +272 -36
- solace_agent_mesh/gateway/http_sse/infrastructure/__init__.py +4 -0
- solace_agent_mesh/gateway/http_sse/infrastructure/dependency_injection/__init__.py +3 -0
- solace_agent_mesh/gateway/http_sse/infrastructure/dependency_injection/container.py +123 -0
- solace_agent_mesh/gateway/http_sse/infrastructure/persistence/__init__.py +4 -0
- solace_agent_mesh/gateway/http_sse/infrastructure/persistence/database_persistence_service.py +16 -0
- solace_agent_mesh/gateway/http_sse/infrastructure/persistence/database_service.py +119 -0
- solace_agent_mesh/gateway/http_sse/infrastructure/persistence/models.py +31 -0
- solace_agent_mesh/gateway/http_sse/infrastructure/persistence_service.py +12 -0
- solace_agent_mesh/gateway/http_sse/infrastructure/repositories/__init__.py +3 -0
- solace_agent_mesh/gateway/http_sse/infrastructure/repositories/session_repository.py +174 -0
- solace_agent_mesh/gateway/http_sse/main.py +293 -91
- solace_agent_mesh/gateway/http_sse/routers/agents.py +1 -1
- solace_agent_mesh/gateway/http_sse/routers/artifacts.py +137 -56
- solace_agent_mesh/gateway/http_sse/routers/config.py +3 -1
- solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +231 -5
- solace_agent_mesh/gateway/http_sse/routers/tasks.py +199 -171
- solace_agent_mesh/gateway/http_sse/routers/visualization.py +7 -7
- solace_agent_mesh/gateway/http_sse/services/agent_service.py +1 -1
- solace_agent_mesh/gateway/http_sse/services/services_llm.txt +89 -135
- solace_agent_mesh/gateway/http_sse/services/task_service.py +2 -5
- solace_agent_mesh/gateway/http_sse/session_manager.py +64 -30
- solace_agent_mesh/gateway/http_sse/shared/__init__.py +9 -0
- solace_agent_mesh/gateway/http_sse/shared/auth_utils.py +29 -0
- solace_agent_mesh/gateway/http_sse/shared/enums.py +45 -0
- solace_agent_mesh/gateway/http_sse/shared/types.py +45 -0
- solace_agent_mesh/solace_agent_mesh_llm.txt +362 -0
- solace_agent_mesh/templates/gateway_component_template.py +149 -98
- solace_agent_mesh/templates/shared_config.yaml +4 -5
- solace_agent_mesh/templates/webui.yaml +8 -10
- {solace_agent_mesh-1.0.9.dist-info → solace_agent_mesh-1.3.0.dist-info}/METADATA +9 -6
- {solace_agent_mesh-1.0.9.dist-info → solace_agent_mesh-1.3.0.dist-info}/RECORD +197 -141
- solace_agent_mesh/assets/docs/assets/js/f284c35a.731836ad.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/main.3d0e7879.js +0 -2
- solace_agent_mesh/assets/docs/assets/js/runtime~main.05d19492.js +0 -1
- solace_agent_mesh/assets/docs/lunr-index-1757091012487.json +0 -1
- solace_agent_mesh/assets/docs/search-doc-1757091012487.json +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/authCallback-BmF2l6vg.js +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/client-D881Dttc.js +0 -49
- solace_agent_mesh/client/webui/frontend/static/assets/main-D0FnP_W4.css +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-Do32sFPX.js +0 -708
- solace_agent_mesh/common/a2a_protocol.py +0 -564
- solace_agent_mesh/common/client/__init__.py +0 -4
- solace_agent_mesh/common/client/card_resolver.py +0 -21
- solace_agent_mesh/common/client/client.py +0 -85
- solace_agent_mesh/common/client/client_llm.txt +0 -133
- solace_agent_mesh/common/server/__init__.py +0 -4
- solace_agent_mesh/common/server/server.py +0 -122
- solace_agent_mesh/common/server/server_llm.txt +0 -169
- solace_agent_mesh/common/server/task_manager.py +0 -291
- solace_agent_mesh/common/server/utils.py +0 -28
- solace_agent_mesh/common/types.py +0 -411
- solace_agent_mesh/config_portal/frontend/static/client/assets/_index-Bym6YkMd.js +0 -98
- solace_agent_mesh/gateway/http_sse/routers/sessions.py +0 -80
- solace_agent_mesh/gateway/http_sse/routers/users.py +0 -59
- /solace_agent_mesh/assets/docs/assets/js/{main.3d0e7879.js.LICENSE.txt → main.08d30374.js.LICENSE.txt} +0 -0
- {solace_agent_mesh-1.0.9.dist-info → solace_agent_mesh-1.3.0.dist-info}/WHEEL +0 -0
- {solace_agent_mesh-1.0.9.dist-info → solace_agent_mesh-1.3.0.dist-info}/entry_points.txt +0 -0
- {solace_agent_mesh-1.0.9.dist-info → solace_agent_mesh-1.3.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,411 +0,0 @@
|
|
|
1
|
-
from pydantic import BaseModel, Field, TypeAdapter, field_validator
|
|
2
|
-
from typing import Literal, List, Annotated, Optional, Union, Dict, Any, TypedDict
|
|
3
|
-
from datetime import datetime, timezone
|
|
4
|
-
from pydantic import model_validator, ConfigDict, field_serializer
|
|
5
|
-
from uuid import uuid4
|
|
6
|
-
from enum import Enum
|
|
7
|
-
from typing_extensions import Self
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class TaskState(str, Enum):
|
|
11
|
-
SUBMITTED = "submitted"
|
|
12
|
-
WORKING = "working"
|
|
13
|
-
INPUT_REQUIRED = "input-required"
|
|
14
|
-
COMPLETED = "completed"
|
|
15
|
-
CANCELED = "canceled"
|
|
16
|
-
FAILED = "failed"
|
|
17
|
-
UNKNOWN = "unknown"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class TextPart(BaseModel):
|
|
21
|
-
type: Literal["text"] = "text"
|
|
22
|
-
text: str
|
|
23
|
-
metadata: dict[str, Any] | None = None
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class FileContent(BaseModel):
|
|
27
|
-
name: str | None = None
|
|
28
|
-
mimeType: str | None = None
|
|
29
|
-
bytes: str | None = None
|
|
30
|
-
uri: str | None = None
|
|
31
|
-
|
|
32
|
-
@model_validator(mode="after")
|
|
33
|
-
def check_content(self) -> Self:
|
|
34
|
-
if not (self.bytes or self.uri):
|
|
35
|
-
raise ValueError("Either 'bytes' or 'uri' must be present in the file data")
|
|
36
|
-
if self.bytes and self.uri:
|
|
37
|
-
raise ValueError(
|
|
38
|
-
"Only one of 'bytes' or 'uri' can be present in the file data"
|
|
39
|
-
)
|
|
40
|
-
return self
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
class FilePart(BaseModel):
|
|
44
|
-
type: Literal["file"] = "file"
|
|
45
|
-
file: FileContent
|
|
46
|
-
metadata: dict[str, Any] | None = None
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
class DataPart(BaseModel):
|
|
50
|
-
type: Literal["data"] = "data"
|
|
51
|
-
data: dict[str, Any]
|
|
52
|
-
metadata: dict[str, Any] | None = None
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Part = Annotated[Union[TextPart, FilePart, DataPart], Field(discriminator="type")]
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
class Message(BaseModel):
|
|
59
|
-
role: Literal["user", "agent"]
|
|
60
|
-
parts: List[Part]
|
|
61
|
-
metadata: dict[str, Any] | None = None
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
class TaskStatus(BaseModel):
|
|
65
|
-
state: TaskState
|
|
66
|
-
message: Message | None = None
|
|
67
|
-
timestamp: datetime = Field(default_factory=lambda: datetime.now(timezone.utc))
|
|
68
|
-
|
|
69
|
-
@field_serializer("timestamp")
|
|
70
|
-
def serialize_dt(self, dt: datetime, _info):
|
|
71
|
-
return dt.isoformat()
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
class Artifact(BaseModel):
|
|
75
|
-
name: str | None = None
|
|
76
|
-
description: str | None = None
|
|
77
|
-
parts: List[Part]
|
|
78
|
-
metadata: dict[str, Any] | None = None
|
|
79
|
-
index: int = 0
|
|
80
|
-
append: bool | None = None
|
|
81
|
-
lastChunk: bool | None = None
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
class Task(BaseModel):
|
|
85
|
-
id: str
|
|
86
|
-
sessionId: str | None = None
|
|
87
|
-
status: TaskStatus
|
|
88
|
-
artifacts: List[Artifact] | None = None
|
|
89
|
-
history: List[Message] | None = None
|
|
90
|
-
metadata: dict[str, Any] | None = None
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
class TaskStatusUpdateEvent(BaseModel):
|
|
94
|
-
id: str
|
|
95
|
-
status: TaskStatus
|
|
96
|
-
final: bool = False
|
|
97
|
-
metadata: dict[str, Any] | None = None
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
class TaskArtifactUpdateEvent(BaseModel):
|
|
101
|
-
id: str
|
|
102
|
-
artifact: Artifact
|
|
103
|
-
metadata: dict[str, Any] | None = None
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
class AuthenticationInfo(BaseModel):
|
|
107
|
-
model_config = ConfigDict(extra="allow")
|
|
108
|
-
|
|
109
|
-
schemes: List[str]
|
|
110
|
-
credentials: str | None = None
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
class PushNotificationConfig(BaseModel):
|
|
114
|
-
url: str
|
|
115
|
-
token: str | None = None
|
|
116
|
-
authentication: AuthenticationInfo | None = None
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
class TaskIdParams(BaseModel):
|
|
120
|
-
id: str
|
|
121
|
-
metadata: dict[str, Any] | None = None
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
class TaskQueryParams(TaskIdParams):
|
|
125
|
-
historyLength: int | None = None
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
class TaskSendParams(BaseModel):
|
|
129
|
-
id: str
|
|
130
|
-
sessionId: str = Field(default_factory=lambda: uuid4().hex)
|
|
131
|
-
message: Message
|
|
132
|
-
acceptedOutputModes: Optional[List[str]] = None
|
|
133
|
-
pushNotification: PushNotificationConfig | None = None
|
|
134
|
-
historyLength: int | None = None
|
|
135
|
-
metadata: dict[str, Any] | None = None
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
class TaskPushNotificationConfig(BaseModel):
|
|
139
|
-
id: str
|
|
140
|
-
pushNotificationConfig: PushNotificationConfig
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
class ParallelToolCallInfo(TypedDict):
|
|
144
|
-
"""
|
|
145
|
-
A dictionary structure to hold information about parallel tool calls within a single turn.
|
|
146
|
-
"""
|
|
147
|
-
|
|
148
|
-
total: int
|
|
149
|
-
completed: int
|
|
150
|
-
results: List[Dict[str, Any]]
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
## RPC Messages
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
class JSONRPCMessage(BaseModel):
|
|
157
|
-
jsonrpc: Literal["2.0"] = "2.0"
|
|
158
|
-
id: int | str | None = Field(default_factory=lambda: uuid4().hex)
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
class JSONRPCRequest(JSONRPCMessage):
|
|
162
|
-
method: str
|
|
163
|
-
params: dict[str, Any] | None = None
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
class JSONRPCError(BaseModel):
|
|
167
|
-
code: int
|
|
168
|
-
message: str
|
|
169
|
-
data: Any | None = None
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
class JSONRPCResponse(JSONRPCMessage):
|
|
173
|
-
result: Any | None = None
|
|
174
|
-
error: JSONRPCError | None = None
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
class SendTaskRequest(JSONRPCRequest):
|
|
178
|
-
method: Literal["tasks/send"] = "tasks/send"
|
|
179
|
-
params: TaskSendParams
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
class SendTaskResponse(JSONRPCResponse):
|
|
183
|
-
result: Task | None = None
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
class SendTaskStreamingRequest(JSONRPCRequest):
|
|
187
|
-
method: Literal["tasks/sendSubscribe"] = "tasks/sendSubscribe"
|
|
188
|
-
params: TaskSendParams
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
class SendTaskStreamingResponse(JSONRPCResponse):
|
|
192
|
-
result: TaskStatusUpdateEvent | TaskArtifactUpdateEvent | None = None
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
class GetTaskRequest(JSONRPCRequest):
|
|
196
|
-
method: Literal["tasks/get"] = "tasks/get"
|
|
197
|
-
params: TaskQueryParams
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
class GetTaskResponse(JSONRPCResponse):
|
|
201
|
-
result: Task | None = None
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
class CancelTaskRequest(JSONRPCRequest):
|
|
205
|
-
method: Literal["tasks/cancel",] = "tasks/cancel"
|
|
206
|
-
params: TaskIdParams
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
class CancelTaskResponse(JSONRPCResponse):
|
|
210
|
-
result: Task | None = None
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
class SetTaskPushNotificationRequest(JSONRPCRequest):
|
|
214
|
-
method: Literal["tasks/pushNotification/set",] = "tasks/pushNotification/set"
|
|
215
|
-
params: TaskPushNotificationConfig
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
class SetTaskPushNotificationResponse(JSONRPCResponse):
|
|
219
|
-
result: TaskPushNotificationConfig | None = None
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
class GetTaskPushNotificationRequest(JSONRPCRequest):
|
|
223
|
-
method: Literal["tasks/pushNotification/get",] = "tasks/pushNotification/get"
|
|
224
|
-
params: TaskIdParams
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
class GetTaskPushNotificationResponse(JSONRPCResponse):
|
|
228
|
-
result: TaskPushNotificationConfig | None = None
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
class TaskResubscriptionRequest(JSONRPCRequest):
|
|
232
|
-
method: Literal["tasks/resubscribe",] = "tasks/resubscribe"
|
|
233
|
-
params: TaskIdParams
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
A2ARequest = TypeAdapter(
|
|
237
|
-
Annotated[
|
|
238
|
-
Union[
|
|
239
|
-
SendTaskRequest,
|
|
240
|
-
GetTaskRequest,
|
|
241
|
-
CancelTaskRequest,
|
|
242
|
-
SetTaskPushNotificationRequest,
|
|
243
|
-
GetTaskPushNotificationRequest,
|
|
244
|
-
TaskResubscriptionRequest,
|
|
245
|
-
SendTaskStreamingRequest,
|
|
246
|
-
],
|
|
247
|
-
Field(discriminator="method"),
|
|
248
|
-
]
|
|
249
|
-
)
|
|
250
|
-
|
|
251
|
-
## Error types
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
class JSONParseError(JSONRPCError):
|
|
255
|
-
code: int = -32700
|
|
256
|
-
message: str = "Invalid JSON payload"
|
|
257
|
-
data: Any | None = None
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
class InvalidRequestError(JSONRPCError):
|
|
261
|
-
code: int = -32600
|
|
262
|
-
message: str = "Request payload validation error"
|
|
263
|
-
data: Any | None = None
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
class MethodNotFoundError(JSONRPCError):
|
|
267
|
-
code: int = -32601
|
|
268
|
-
message: str = "Method not found"
|
|
269
|
-
data: None = None
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
class InvalidParamsError(JSONRPCError):
|
|
273
|
-
code: int = -32602
|
|
274
|
-
message: str = "Invalid parameters"
|
|
275
|
-
data: Any | None = None
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
class InternalError(JSONRPCError):
|
|
279
|
-
code: int = -32603
|
|
280
|
-
message: str = "Internal error"
|
|
281
|
-
data: Any | None = None
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
class TaskNotFoundError(JSONRPCError):
|
|
285
|
-
code: int = -32001
|
|
286
|
-
message: str = "Task not found"
|
|
287
|
-
data: None = None
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
class TaskNotCancelableError(JSONRPCError):
|
|
291
|
-
code: int = -32002
|
|
292
|
-
message: str = "Task cannot be canceled"
|
|
293
|
-
data: None = None
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
class PushNotificationNotSupportedError(JSONRPCError):
|
|
297
|
-
code: int = -32003
|
|
298
|
-
message: str = "Push Notification is not supported"
|
|
299
|
-
data: None = None
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
class UnsupportedOperationError(JSONRPCError):
|
|
303
|
-
code: int = -32004
|
|
304
|
-
message: str = "This operation is not supported"
|
|
305
|
-
data: None = None
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
class ContentTypeNotSupportedError(JSONRPCError):
|
|
309
|
-
code: int = -32005
|
|
310
|
-
message: str = "Incompatible content types"
|
|
311
|
-
data: None = None
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
class AgentProvider(BaseModel):
|
|
315
|
-
organization: str
|
|
316
|
-
url: str | None = None
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
class AgentCapabilities(BaseModel):
|
|
320
|
-
streaming: bool = False
|
|
321
|
-
pushNotifications: bool = False
|
|
322
|
-
stateTransitionHistory: bool = False
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
class AgentAuthentication(BaseModel):
|
|
326
|
-
schemes: List[str]
|
|
327
|
-
credentials: str | None = None
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
class AgentSkill(BaseModel):
|
|
331
|
-
id: str
|
|
332
|
-
name: str
|
|
333
|
-
description: str | None = None
|
|
334
|
-
tags: List[str] | None = None
|
|
335
|
-
examples: List[str] | None = None
|
|
336
|
-
inputModes: List[str] | None = None
|
|
337
|
-
outputModes: List[str] | None = None
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
class AgentCard(BaseModel):
|
|
341
|
-
name: str
|
|
342
|
-
display_name: str | None = None
|
|
343
|
-
description: str | None = None
|
|
344
|
-
url: str
|
|
345
|
-
provider: AgentProvider | None = None
|
|
346
|
-
version: str
|
|
347
|
-
documentationUrl: str | None = None
|
|
348
|
-
capabilities: AgentCapabilities
|
|
349
|
-
authentication: AgentAuthentication | None = None
|
|
350
|
-
defaultInputModes: List[str] = ["text"]
|
|
351
|
-
defaultOutputModes: List[str] = ["text"]
|
|
352
|
-
skills: List[AgentSkill]
|
|
353
|
-
tools: Optional[List[AgentSkill]] = None
|
|
354
|
-
peer_agents: Dict[str, "AgentCard"]
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
class ArtifactInfo(BaseModel):
|
|
358
|
-
"""
|
|
359
|
-
Represents information about an artifact, typically for listing or display.
|
|
360
|
-
Mirrors the frontend ArtifactInfo type and the model used in artifact_helpers.py.
|
|
361
|
-
"""
|
|
362
|
-
|
|
363
|
-
filename: str
|
|
364
|
-
mime_type: Optional[str] = None
|
|
365
|
-
size: int
|
|
366
|
-
last_modified: Optional[str] = None
|
|
367
|
-
description: Optional[str] = None
|
|
368
|
-
schema_definition: Optional[Dict[str, Any]] = Field(default=None, alias="schema")
|
|
369
|
-
uri: Optional[str] = None
|
|
370
|
-
version: Optional[Union[int, str]] = None
|
|
371
|
-
version_count: int
|
|
372
|
-
|
|
373
|
-
model_config = ConfigDict(populate_by_name=True)
|
|
374
|
-
|
|
375
|
-
@field_validator("version")
|
|
376
|
-
@classmethod
|
|
377
|
-
def validate_version_string(cls, v: Union[int, str]) -> Union[int, str]:
|
|
378
|
-
if isinstance(v, str):
|
|
379
|
-
if v.lower() == "latest":
|
|
380
|
-
return v
|
|
381
|
-
try:
|
|
382
|
-
int(v)
|
|
383
|
-
return v
|
|
384
|
-
except ValueError:
|
|
385
|
-
raise ValueError(
|
|
386
|
-
f"String version must be 'latest' or a valid integer representation. Got: '{v}'"
|
|
387
|
-
)
|
|
388
|
-
return v
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
class A2AClientError(Exception):
|
|
392
|
-
pass
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
class A2AClientHTTPError(A2AClientError):
|
|
396
|
-
def __init__(self, status_code: int, message: str):
|
|
397
|
-
self.status_code = status_code
|
|
398
|
-
self.message = message
|
|
399
|
-
super().__init__(f"HTTP Error {status_code}: {message}")
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
class A2AClientJSONError(A2AClientError):
|
|
403
|
-
def __init__(self, message: str):
|
|
404
|
-
self.message = message
|
|
405
|
-
super().__init__(f"JSON Error: {message}")
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
class MissingAPIKeyError(Exception):
|
|
409
|
-
"""Exception for missing API key."""
|
|
410
|
-
|
|
411
|
-
pass
|