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] 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"