Skip to content

feat: map conversationalService.syntheticUserId to runtime context [JAR-9965]#119

Open
scottcmg wants to merge 1 commit into
mainfrom
feat/urt-handshake-synthetic-user-id
Open

feat: map conversationalService.syntheticUserId to runtime context [JAR-9965]#119
scottcmg wants to merge 1 commit into
mainfrom
feat/urt-handshake-synthetic-user-id

Conversation

@scottcmg

Copy link
Copy Markdown

TL;DR

Map conversationalService.syntheticUserId from FpsProperties onto a new synthetic_user_id field on UiPathRuntimeContext, so the conversational bridge can present the conversation owner id to CAS on the WebSocket handshake.

Solution

  • runtime/context.py: add synthetic_user_id: str | None to UiPathRuntimeContext and a fps_mappings entry "conversationalService.syntheticUserId" -> "synthetic_user_id".
  • Test in tests/test_context.py (asserts the fps key maps onto the field).

Consumed by

uipath bridge (sends it as the X-UiPath-Internal-SyntheticUserId handshake header) → AgentInterfaces CAS (validates against conversation.user_id to authorize Unified Runtime Robot connections for RunAsMe=false conversations).

@scottcmg scottcmg changed the title feat: map conversationalService.syntheticUserId to runtime context feat: map conversationalService.syntheticUserId to runtime context [JAR-9965] Jun 12, 2026
@scottcmg scottcmg force-pushed the feat/urt-handshake-synthetic-user-id branch from 3eaf6bb to 9a743f8 Compare June 12, 2026 02:53
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>
@scottcmg scottcmg force-pushed the feat/urt-handshake-synthetic-user-id branch from 9a743f8 to 1642ce3 Compare June 12, 2026 02:57
@sonarqubecloud

Copy link
Copy Markdown

@scottcmg scottcmg marked this pull request as ready for review June 12, 2026 16:32
@scottcmg scottcmg requested a review from a team as a code owner June 12, 2026 16:32
Copilot AI review requested due to automatic review settings June 12, 2026 16:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends UiPathRuntimeContext to carry a conversation “owner” identifier (synthetic_user_id) by mapping it from fpsProperties["conversationalService.syntheticUserId"]. This enables downstream components (e.g., the conversational bridge) to include the synthetic user id during the CAS WebSocket handshake.

Changes:

  • Added synthetic_user_id: str | None to UiPathRuntimeContext.
  • Added an FPS mapping from conversationalService.syntheticUserIdsynthetic_user_id in UiPathRuntimeContext.from_config(...).
  • Extended tests/test_context.py to assert the new FPS key is correctly loaded into the context.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/uipath/runtime/context.py Adds the synthetic_user_id field and maps it from fpsProperties into runtime context.
tests/test_context.py Adds an assertion covering the new FPS→context mapping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@maxduu maxduu self-requested a review June 12, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants