Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
5 changes: 5 additions & 0 deletions src/uipath/runtime/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions tests/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading