Skip to content

Commit 9a743f8

Browse files
scottcmgclaude
andcommitted
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) <noreply@anthropic.com>
1 parent 4233a02 commit 9a743f8

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/uipath/runtime/context.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ class UiPathRuntimeContext(BaseModel):
3737
)
3838
exchange_id: str | None = Field(None, description="Exchange identifier for CAS")
3939
message_id: str | None = Field(None, description="Message identifier for CAS")
40+
synthetic_user_id: str | None = Field(
41+
None, description="Conversation owner id (synthetic user) for CAS"
42+
)
4043
voice_mode: Literal["session"] | None = Field(
4144
None, description="Voice job type for CAS"
4245
)
@@ -364,6 +367,7 @@ def from_config(
364367
"conversationalService.conversationId": "conversation_id",
365368
"conversationalService.exchangeId": "exchange_id",
366369
"conversationalService.messageId": "message_id",
370+
"conversationalService.syntheticUserId": "synthetic_user_id",
367371
"mcpServer.id": "mcp_server_id",
368372
"mcpServer.slug": "mcp_server_slug",
369373
"voice.mode": "voice_mode",

tests/test_context.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ def test_from_config_extracts_fps_properties_without_runtime(tmp_path: Path) ->
183183
"conversationalService.conversationId": "conv-123",
184184
"conversationalService.exchangeId": "ex-456",
185185
"conversationalService.messageId": "msg-789",
186+
"conversationalService.syntheticUserId": "owner-guid",
186187
"mcpServer.id": "server-id-123",
187188
"mcpServer.slug": "my-mcp-server",
188189
}
@@ -195,6 +196,7 @@ def test_from_config_extracts_fps_properties_without_runtime(tmp_path: Path) ->
195196
assert ctx.conversation_id == "conv-123"
196197
assert ctx.exchange_id == "ex-456"
197198
assert ctx.message_id == "msg-789"
199+
assert ctx.synthetic_user_id == "owner-guid"
198200
assert ctx.mcp_server_id == "server-id-123"
199201
assert ctx.mcp_server_slug == "my-mcp-server"
200202

0 commit comments

Comments
 (0)