From bd53a82a5a70e9bbd31a0f7c8141bc86d135e55c Mon Sep 17 00:00:00 2001 From: Maxwell Du <60411452+maxduu@users.noreply.github.com> Date: Wed, 27 May 2026 14:38:11 -0400 Subject: [PATCH 1/3] feat: set uipath conversation-id in env when in fpsproperties --- src/uipath/runtime/context.py | 5 +++++ tests/test_context.py | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/uipath/runtime/context.py b/src/uipath/runtime/context.py index 2fe81a8..3e50c9a 100644 --- a/src/uipath/runtime/context.py +++ b/src/uipath/runtime/context.py @@ -337,6 +337,11 @@ def with_defaults( for k, v in kwargs.items(): setattr(base, k, v) + # Export resolved conversation ID (from fpsProperties). Used for specific tools run by + # conversational-agents to have the conversation ID passed in. + if base.conversation_id: + os.environ["UIPATH_CONVERSATION_ID"] = base.conversation_id + return base @classmethod diff --git a/tests/test_context.py b/tests/test_context.py index 9231f65..5ee5d06 100644 --- a/tests/test_context.py +++ b/tests/test_context.py @@ -241,6 +241,26 @@ def test_from_config_loads_runtime_and_fps_properties(tmp_path: Path) -> None: assert ctx.mcp_server_slug == "test-server-slug" +def test_with_defaults_exports_conversation_id_to_env( + tmp_path: Path, monkeypatch: pytest.MonkeyPatch +) -> None: + """Resolved conversation_id should be exported to UIPATH_CONVERSATION_ID.""" + cfg = { + "fpsProperties": { + "conversationalService.conversationId": "conv-from-config", + } + } + config_path = tmp_path / "uipath.json" + config_path.write_text(json.dumps(cfg)) + monkeypatch.delenv("UIPATH_CONVERSATION_ID", raising=False) + + UiPathRuntimeContext.with_defaults(config_path=str(config_path)) + + import os + + assert os.environ.get("UIPATH_CONVERSATION_ID") == "conv-from-config" + + def test_result_file_written_on_faulted_trigger_error(tmp_path: Path) -> None: runtime_dir = tmp_path / "runtime" ctx = UiPathRuntimeContext( From 545c2ca674da792cd56f40083e7e087d89d0f12d Mon Sep 17 00:00:00 2001 From: Maxwell Du <60411452+maxduu@users.noreply.github.com> Date: Wed, 27 May 2026 14:49:56 -0400 Subject: [PATCH 2/3] chore: lint --- src/uipath/runtime/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uipath/runtime/context.py b/src/uipath/runtime/context.py index 3e50c9a..bde191d 100644 --- a/src/uipath/runtime/context.py +++ b/src/uipath/runtime/context.py @@ -337,7 +337,7 @@ def with_defaults( for k, v in kwargs.items(): setattr(base, k, v) - # Export resolved conversation ID (from fpsProperties). Used for specific tools run by + # Export resolved conversation ID (from fpsProperties). Used for specific tools run by # conversational-agents to have the conversation ID passed in. if base.conversation_id: os.environ["UIPATH_CONVERSATION_ID"] = base.conversation_id From 481dcb1fda6b56592b5492ebcb07e52e416d67fb Mon Sep 17 00:00:00 2001 From: Maxwell Du <60411452+maxduu@users.noreply.github.com> Date: Wed, 27 May 2026 14:51:11 -0400 Subject: [PATCH 3/3] chore: bump version --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 018cbe1..4dbe605 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath-runtime" -version = "0.10.4" +version = "0.10.5" description = "Runtime abstractions and interfaces for building agents and automation scripts in the UiPath ecosystem" readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.11" diff --git a/uv.lock b/uv.lock index d0a9a24..0db9ff5 100644 --- a/uv.lock +++ b/uv.lock @@ -1012,7 +1012,7 @@ wheels = [ [[package]] name = "uipath-runtime" -version = "0.10.4" +version = "0.10.5" source = { editable = "." } dependencies = [ { name = "uipath-core" },