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.12.2"
version = "0.12.3"
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 @@ -58,6 +58,10 @@ class UiPathRuntimeContext(BaseModel):
None,
description="Conversation owner id for CAS (a real cloud user id or a synthetic user id)",
)
conversational_run_as_me: bool = Field(
False,
description="Whether the conversational agent job is running with RunAsMe: true.",
)
voice_mode: Literal["session", "maestro_flow"] | None = Field(
None, description="Voice job type for CAS"
)
Expand Down Expand Up @@ -413,6 +417,7 @@ def from_config(
"conversationalService.endExchange": "end_exchange",
"conversationalService.enableOutputs": "conversational_outputs_enabled",
"conversationalService.conversationalUserId": "conversational_user_id",
"conversationalService.runAsMe": "conversational_run_as_me",
"mcpServer.id": "mcp_server_id",
"mcpServer.slug": "mcp_server_slug",
"voice.mode": "voice_mode",
Expand Down
19 changes: 19 additions & 0 deletions tests/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ def test_from_config_extracts_fps_properties_without_runtime(tmp_path: Path) ->
"conversationalService.messageId": "msg-789",
"conversationalService.enableOutputs": True,
"conversationalService.conversationalUserId": "owner-guid",
"conversationalService.runAsMe": True,
"mcpServer.id": "server-id-123",
"mcpServer.slug": "my-mcp-server",
}
Expand All @@ -199,10 +200,28 @@ def test_from_config_extracts_fps_properties_without_runtime(tmp_path: Path) ->
assert ctx.message_id == "msg-789"
assert ctx.conversational_outputs_enabled is True
assert ctx.conversational_user_id == "owner-guid"
assert ctx.conversational_run_as_me is True
assert ctx.mcp_server_id == "server-id-123"
assert ctx.mcp_server_slug == "my-mcp-server"


def test_conversational_run_as_me_defaults_false_when_fps_property_absent(
tmp_path: Path,
) -> None:
"""conversational_run_as_me defaults to False when the fps key is missing."""
cfg = {
"fpsProperties": {
"conversationalService.conversationId": "conv-123",
}
}
config_path = tmp_path / "uipath.json"
config_path.write_text(json.dumps(cfg))

ctx = UiPathRuntimeContext.from_config(config_path=str(config_path))

assert ctx.conversational_run_as_me is False


def test_from_config_conversational_outputs_enabled_defaults_false(
tmp_path: Path,
) -> None:
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