Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[project]
name = "uipath"
version = "2.2.27"
version = "2.2.28"
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
dependencies = [
"uipath-runtime>=0.2.3, <0.3.0",
"uipath-runtime>=0.2.5, <0.3.0",
"uipath-core>=0.1.0, <0.2.0",
"click>=8.3.1",
"httpx>=0.28.1",
Expand Down
13 changes: 8 additions & 5 deletions src/uipath/_cli/_chat/_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class SocketIOChatBridge:
def __init__(
self,
websocket_url: str,
websocket_path: str,
conversation_id: str,
exchange_id: str,
headers: dict[str, str],
Expand All @@ -43,6 +44,7 @@ def __init__(
auth: Optional authentication data to send during connection
"""
self.websocket_url = websocket_url
self.websocket_path = websocket_path
self.conversation_id = conversation_id
self.exchange_id = exchange_id
self.auth = auth
Expand Down Expand Up @@ -85,11 +87,10 @@ async def connect(self, timeout: float = 10.0) -> None:

try:
# Attempt to connect with timeout
logger.info(f"Connecting to WebSocket server: {self.websocket_url}")

await asyncio.wait_for(
self._client.connect(
url=self.websocket_url,
socketio_path=self.websocket_path,
headers=self.headers,
auth=self.auth,
transports=["websocket"],
Expand Down Expand Up @@ -260,20 +261,22 @@ def get_chat_bridge(
host = parsed.netloc

# Construct WebSocket URL for CAS
websocket_url = f"wss://{host}/autopilotforeveryone_/websocket_/socket.io?conversationId={context.conversation_id}"
websocket_url = f"wss://{host}?conversationId={context.conversation_id}"
websocket_path = "autopilotforeveryone_/websocket_/socket.io"

# Build headers from context
headers = {
"Authorization": f"Bearer {os.environ.get('UIPATH_ACCESS_TOKEN', '')}",
"X-UiPath-Internal-TenantId": context.tenant_id
"X-UiPath-Internal-TenantId": f"{context.tenant_id}"
or os.environ.get("UIPATH_TENANT_ID", ""),
"X-UiPath-Internal-AccountId": context.org_id
"X-UiPath-Internal-AccountId": f"{context.org_id}"
or os.environ.get("UIPATH_ORGANIZATION_ID", ""),
"X-UiPath-ConversationId": context.conversation_id,
}

return SocketIOChatBridge(
websocket_url=websocket_url,
websocket_path=websocket_path,
conversation_id=context.conversation_id,
exchange_id=context.exchange_id,
headers=headers,
Expand Down
16 changes: 8 additions & 8 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.