feat: add conversational_run_as_me to runtime context#148
Open
maxduu wants to merge 1 commit into
Open
Conversation
Exposes fpsProperties.conversationalService.runAsMe on UiPathRuntimeContext.conversational_run_as_me so downstream layers (e.g. langchain tool factory) can mirror the parent conversational agent job's RunAsMe flag onto child process/API-workflow tool invocations, replacing the brittle token sub_type inspection that was misclassifying user tokens. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
There was a problem hiding this comment.
Pull request overview
Adds support for propagating the conversational agent job’s RunAsMe flag through UiPathRuntimeContext by exposing it as a first-class context field and loading it from fpsProperties in uipath.json. This enables downstream layers to read conversational_run_as_me when spawning child processes / invoking API-workflow tools.
Changes:
- Add
UiPathRuntimeContext.conversational_run_as_me(defaultFalse) and mapfpsProperties["conversationalService.runAsMe"]onto it. - Extend context-loading tests to cover
runAsMeextraction and verify the default isFalsewhen absent. - Bump package version to
0.12.3(and lockfile entry).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/uipath/runtime/context.py |
Introduces conversational_run_as_me and maps the fpsProperties key to it in from_config. |
tests/test_context.py |
Adds assertions and a new test to validate conversational_run_as_me behavior. |
pyproject.toml |
Bumps project version to 0.12.3. |
uv.lock |
Updates locked version for uipath-runtime to 0.12.3. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [project] | ||
| name = "uipath-runtime" | ||
| version = "0.12.2" | ||
| version = "0.12.3" |
3 tasks
cristipufu
approved these changes
Jul 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
fpsProperties.conversationalService.runAsMeonUiPathRuntimeContext.conversational_run_as_meso downstream layers can mirror the parent conversational agent job'sRunAsMeflag onto child process / API-workflow tool invocations.sub_type == "user"inspection in the langchain tool factory, which was misclassifying user tokens and preventingRunAsMefrom propagating correctly to child jobs.uipath-runtimeto0.12.3.Related PRs
run_as_meoncreate_tools_from_resources): fix: remove token sub_type inspection; accept run_as_me from caller uipath-langchain-python#981Test plan
uv run pytest tests/test_context.py— 26 passed (includes the newtest_conversational_run_as_me_defaults_false_when_fps_property_absentand the extendedtest_from_config_extracts_fps_properties_without_runtime).🤖 Generated with Claude Code