Skip to content

Commit 233f4e3

Browse files
authored
feat(remote-a2a): resolve a2a agent via resource-override bindings (#1748)
1 parent 7dec553 commit 233f4e3

7 files changed

Lines changed: 11 additions & 14 deletions

File tree

packages/uipath-platform/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-platform"
3-
version = "0.1.73"
3+
version = "0.1.74"
44
description = "HTTP client library for programmatic access to UiPath Platform"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

packages/uipath-platform/src/uipath/platform/agenthub/_remote_a2a_service.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from typing import Any, List
1010

1111
from ..common._base_service import BaseService
12+
from ..common._bindings import resource_override
1213
from ..common._config import UiPathApiConfig
1314
from ..common._execution_context import UiPathExecutionContext
1415
from ..common._folder_context import FolderContext, header_folder
@@ -149,6 +150,7 @@ async def main():
149150
data = response.json()
150151
return [RemoteA2aAgent.model_validate(agent) for agent in data.get("value", [])]
151152

153+
@resource_override(resource_type="remoteA2aAgent", resource_identifier="slug")
152154
def retrieve(
153155
self,
154156
slug: str,
@@ -190,6 +192,7 @@ def retrieve(
190192
)
191193
return RemoteA2aAgent.model_validate(response.json())
192194

195+
@resource_override(resource_type="remoteA2aAgent", resource_identifier="slug")
193196
async def retrieve_async(
194197
self,
195198
slug: str,

packages/uipath-platform/uv.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/uipath/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[project]
22
name = "uipath"
3-
version = "2.11.10"
3+
version = "2.11.11"
44
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"
77
dependencies = [
88
"uipath-core>=0.5.21, <0.6.0",
99
"uipath-runtime>=0.11.0, <0.12.0",
10-
"uipath-platform>=0.1.73, <0.2.0",
10+
"uipath-platform>=0.1.74, <0.2.0",
1111
"click>=8.3.1",
1212
"httpx>=0.28.1",
1313
"pyjwt>=2.10.1",

packages/uipath/src/uipath/agent/models/agent.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,6 @@ class AgentA2aResourceConfig(BaseAgentResourceConfig):
544544
id: str
545545
slug: str = Field(..., alias="slug")
546546
folder_path: str = Field(alias="folderPath")
547-
a2a_url: str = Field(..., alias="a2aUrl")
548547
cached_agent_card: Optional[Dict[str, Any]] = Field(
549548
default=None, alias="cachedAgentCard"
550549
)

packages/uipath/tests/agent/models/test_agent.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3995,7 +3995,6 @@ def test_a2a_resource(self):
39953995
"slug": "philosopher-agent",
39963996
"description": "A philosophical agent that answers questions with wisdom and philosopher quotes",
39973997
"folderPath": "shared",
3998-
"a2a_url": "https://cloud.uipath.com/a2a/5045dca3",
39993998
"cachedAgentCard": {
40003999
"name": "Philosopher Agent",
40014000
"description": "Philosopher Agent assistant",
@@ -4071,7 +4070,6 @@ def test_a2a_resource(self):
40714070
)
40724071
assert a2a_resource.id == "755e2f7d-5a3d-47f3-8e9d-7ff0bf226357"
40734072
assert a2a_resource.folder_path == "shared"
4074-
assert a2a_resource.a2a_url == "https://cloud.uipath.com/a2a/5045dca3"
40754073

40764074
# Validate cached agent card is a plain dict
40774075
card = a2a_resource.cached_agent_card
@@ -4110,7 +4108,6 @@ def test_a2a_resource_without_cached_card(self):
41104108
"slug": "minimal-a2a",
41114109
"description": "A minimal A2A agent",
41124110
"folderPath": "shared",
4113-
"a2a_url": "https://cloud.uipath.com/a2a/abc-123",
41144111
}
41154112
],
41164113
"features": [],
@@ -4130,7 +4127,6 @@ def test_a2a_resource_without_cached_card(self):
41304127
assert a2a_resource.name == "Minimal A2A Agent"
41314128
assert a2a_resource.slug == "minimal-a2a"
41324129
assert a2a_resource.folder_path == "shared"
4133-
assert a2a_resource.a2a_url == "https://cloud.uipath.com/a2a/abc-123"
41344130
assert a2a_resource.cached_agent_card is None
41354131

41364132
def test_a2a_resource_case_insensitive(self):
@@ -4158,7 +4154,6 @@ def test_a2a_resource_case_insensitive(self):
41584154
"slug": "case-test",
41594155
"description": "Testing case insensitive parsing",
41604156
"folderPath": "shared",
4161-
"a2a_url": "https://cloud.uipath.com/a2a/case-test-id",
41624157
}
41634158
],
41644159
"features": [],

packages/uipath/uv.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)