From 1642ce3860e4caa3562e557f589d84d951ab3d5b Mon Sep 17 00:00:00 2001 From: Christin <164907691+scottcmg@users.noreply.github.com> Date: Thu, 11 Jun 2026 17:47:03 -0700 Subject: [PATCH 1/2] feat: map conversationalService.syntheticUserId to runtime context Add synthetic_user_id to UiPathRuntimeContext plus the fps_mappings entry, so the conversational bridge can present the conversation owner id to CAS on the websocket handshake. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/uipath/runtime/context.py | 4 ++++ tests/test_context.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/uipath/runtime/context.py b/src/uipath/runtime/context.py index 2fe81a8..f226177 100644 --- a/src/uipath/runtime/context.py +++ b/src/uipath/runtime/context.py @@ -37,6 +37,9 @@ class UiPathRuntimeContext(BaseModel): ) exchange_id: str | None = Field(None, description="Exchange identifier for CAS") message_id: str | None = Field(None, description="Message identifier for CAS") + synthetic_user_id: str | None = Field( + None, description="Conversation owner id (synthetic user) for CAS" + ) voice_mode: Literal["session"] | None = Field( None, description="Voice job type for CAS" ) @@ -364,6 +367,7 @@ def from_config( "conversationalService.conversationId": "conversation_id", "conversationalService.exchangeId": "exchange_id", "conversationalService.messageId": "message_id", + "conversationalService.syntheticUserId": "synthetic_user_id", "mcpServer.id": "mcp_server_id", "mcpServer.slug": "mcp_server_slug", "voice.mode": "voice_mode", diff --git a/tests/test_context.py b/tests/test_context.py index 9231f65..41312c0 100644 --- a/tests/test_context.py +++ b/tests/test_context.py @@ -183,6 +183,7 @@ def test_from_config_extracts_fps_properties_without_runtime(tmp_path: Path) -> "conversationalService.conversationId": "conv-123", "conversationalService.exchangeId": "ex-456", "conversationalService.messageId": "msg-789", + "conversationalService.syntheticUserId": "owner-guid", "mcpServer.id": "server-id-123", "mcpServer.slug": "my-mcp-server", } @@ -195,6 +196,7 @@ def test_from_config_extracts_fps_properties_without_runtime(tmp_path: Path) -> assert ctx.conversation_id == "conv-123" assert ctx.exchange_id == "ex-456" assert ctx.message_id == "msg-789" + assert ctx.synthetic_user_id == "owner-guid" assert ctx.mcp_server_id == "server-id-123" assert ctx.mcp_server_slug == "my-mcp-server" From 3062bd0845e8a4add1cb672b60cf3bc6f4684990 Mon Sep 17 00:00:00 2001 From: Christin <164907691+scottcmg@users.noreply.github.com> Date: Mon, 15 Jun 2026 16:39:41 -0700 Subject: [PATCH 2/2] feat: rename syntheticUserId to conversationalUserId [JAR-9965] Match the CAS-side rename: the forwarded conversation owner id may be a real cloud user id or a synthetic user id, so 'synthetic' was misleading. Renames the context field (conversational_user_id) and the FpsProperties key (conversationalService.conversationalUserId). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/uipath/runtime/context.py | 7 ++++--- tests/test_context.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/uipath/runtime/context.py b/src/uipath/runtime/context.py index f226177..f76e8e9 100644 --- a/src/uipath/runtime/context.py +++ b/src/uipath/runtime/context.py @@ -37,8 +37,9 @@ class UiPathRuntimeContext(BaseModel): ) exchange_id: str | None = Field(None, description="Exchange identifier for CAS") message_id: str | None = Field(None, description="Message identifier for CAS") - synthetic_user_id: str | None = Field( - None, description="Conversation owner id (synthetic user) for CAS" + conversational_user_id: str | None = Field( + None, + description="Conversation owner id for CAS (a real cloud user id or a synthetic user id)", ) voice_mode: Literal["session"] | None = Field( None, description="Voice job type for CAS" @@ -367,7 +368,7 @@ def from_config( "conversationalService.conversationId": "conversation_id", "conversationalService.exchangeId": "exchange_id", "conversationalService.messageId": "message_id", - "conversationalService.syntheticUserId": "synthetic_user_id", + "conversationalService.conversationalUserId": "conversational_user_id", "mcpServer.id": "mcp_server_id", "mcpServer.slug": "mcp_server_slug", "voice.mode": "voice_mode", diff --git a/tests/test_context.py b/tests/test_context.py index 41312c0..af5d8de 100644 --- a/tests/test_context.py +++ b/tests/test_context.py @@ -183,7 +183,7 @@ def test_from_config_extracts_fps_properties_without_runtime(tmp_path: Path) -> "conversationalService.conversationId": "conv-123", "conversationalService.exchangeId": "ex-456", "conversationalService.messageId": "msg-789", - "conversationalService.syntheticUserId": "owner-guid", + "conversationalService.conversationalUserId": "owner-guid", "mcpServer.id": "server-id-123", "mcpServer.slug": "my-mcp-server", } @@ -196,7 +196,7 @@ def test_from_config_extracts_fps_properties_without_runtime(tmp_path: Path) -> assert ctx.conversation_id == "conv-123" assert ctx.exchange_id == "ex-456" assert ctx.message_id == "msg-789" - assert ctx.synthetic_user_id == "owner-guid" + assert ctx.conversational_user_id == "owner-guid" assert ctx.mcp_server_id == "server-id-123" assert ctx.mcp_server_slug == "my-mcp-server"