Skip to content
Merged
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.11.7"
version = "0.11.8"
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
4 changes: 4 additions & 0 deletions src/uipath/runtime/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ class UiPathRuntimeContext(BaseModel):
True,
description="Whether to emit the exchange end event for CAS",
)
conversational_outputs_enabled: bool = Field(
False, description="Whether conversational agent output-generation is enabled."
)
conversational_user_id: str | None = Field(
None,
description="Conversation owner id for CAS (a real cloud user id or a synthetic user id)",
Expand Down Expand Up @@ -408,6 +411,7 @@ def from_config(
"conversationalService.exchangeId": "exchange_id",
"conversationalService.messageId": "message_id",
"conversationalService.endExchange": "end_exchange",
"conversationalService.enableOutputs": "conversational_outputs_enabled",
"conversationalService.conversationalUserId": "conversational_user_id",
"mcpServer.id": "mcp_server_id",
"mcpServer.slug": "mcp_server_slug",
Expand Down
20 changes: 20 additions & 0 deletions tests/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ def test_from_config_extracts_fps_properties_without_runtime(tmp_path: Path) ->
"conversationalService.conversationId": "conv-123",
"conversationalService.exchangeId": "ex-456",
"conversationalService.messageId": "msg-789",
"conversationalService.enableOutputs": True,
"conversationalService.conversationalUserId": "owner-guid",
"mcpServer.id": "server-id-123",
"mcpServer.slug": "my-mcp-server",
Expand All @@ -196,11 +197,30 @@ def test_from_config_extracts_fps_properties_without_runtime(tmp_path: Path) ->
assert ctx.conversation_id == "conv-123"
assert ctx.exchange_id == "ex-456"
assert ctx.message_id == "msg-789"
assert ctx.conversational_outputs_enabled is True
assert ctx.conversational_user_id == "owner-guid"
assert ctx.mcp_server_id == "server-id-123"
assert ctx.mcp_server_slug == "my-mcp-server"


def test_from_config_conversational_outputs_enabled_defaults_false(
tmp_path: Path,
) -> None:
"""When enableOutputs isn't in fpsProperties, the field defaults to False —
legacy safe behavior for pre-migration conversational agents."""
cfg = {
"fpsProperties": {
"conversationalService.conversationId": "conv-legacy",
}
}
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_outputs_enabled is False


def test_from_config_loads_runtime_and_fps_properties(tmp_path: Path) -> None:
"""runtime.* keys and fpsProperties.* keys should both be applied."""
cfg = {
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