Skip to content

Commit eb0e7b7

Browse files
authored
Merge pull request #142 from UiPath/convo-agent-output
feat: expose conversationalService.enableOutputs FPS flag on context
2 parents eeb50a1 + 250f14b commit eb0e7b7

4 files changed

Lines changed: 26 additions & 2 deletions

File tree

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-runtime"
3-
version = "0.11.7"
3+
version = "0.11.8"
44
description = "Runtime abstractions and interfaces for building agents and automation scripts in the UiPath ecosystem"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

‎src/uipath/runtime/context.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ class UiPathRuntimeContext(BaseModel):
5151
True,
5252
description="Whether to emit the exchange end event for CAS",
5353
)
54+
conversational_outputs_enabled: bool = Field(
55+
False, description="Whether conversational agent output-generation is enabled."
56+
)
5457
conversational_user_id: str | None = Field(
5558
None,
5659
description="Conversation owner id for CAS (a real cloud user id or a synthetic user id)",
@@ -408,6 +411,7 @@ def from_config(
408411
"conversationalService.exchangeId": "exchange_id",
409412
"conversationalService.messageId": "message_id",
410413
"conversationalService.endExchange": "end_exchange",
414+
"conversationalService.enableOutputs": "conversational_outputs_enabled",
411415
"conversationalService.conversationalUserId": "conversational_user_id",
412416
"mcpServer.id": "mcp_server_id",
413417
"mcpServer.slug": "mcp_server_slug",

‎tests/test_context.py‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ def test_from_config_extracts_fps_properties_without_runtime(tmp_path: Path) ->
183183
"conversationalService.conversationId": "conv-123",
184184
"conversationalService.exchangeId": "ex-456",
185185
"conversationalService.messageId": "msg-789",
186+
"conversationalService.enableOutputs": True,
186187
"conversationalService.conversationalUserId": "owner-guid",
187188
"mcpServer.id": "server-id-123",
188189
"mcpServer.slug": "my-mcp-server",
@@ -196,11 +197,30 @@ def test_from_config_extracts_fps_properties_without_runtime(tmp_path: Path) ->
196197
assert ctx.conversation_id == "conv-123"
197198
assert ctx.exchange_id == "ex-456"
198199
assert ctx.message_id == "msg-789"
200+
assert ctx.conversational_outputs_enabled is True
199201
assert ctx.conversational_user_id == "owner-guid"
200202
assert ctx.mcp_server_id == "server-id-123"
201203
assert ctx.mcp_server_slug == "my-mcp-server"
202204

203205

206+
def test_from_config_conversational_outputs_enabled_defaults_false(
207+
tmp_path: Path,
208+
) -> None:
209+
"""When enableOutputs isn't in fpsProperties, the field defaults to False —
210+
legacy safe behavior for pre-migration conversational agents."""
211+
cfg = {
212+
"fpsProperties": {
213+
"conversationalService.conversationId": "conv-legacy",
214+
}
215+
}
216+
config_path = tmp_path / "uipath.json"
217+
config_path.write_text(json.dumps(cfg))
218+
219+
ctx = UiPathRuntimeContext.from_config(config_path=str(config_path))
220+
221+
assert ctx.conversational_outputs_enabled is False
222+
223+
204224
def test_from_config_loads_runtime_and_fps_properties(tmp_path: Path) -> None:
205225
"""runtime.* keys and fpsProperties.* keys should both be applied."""
206226
cfg = {

‎uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)