Skip to content

Commit a22cfae

Browse files
authored
Merge pull request #134 from UiPath/josh/flow-part-1
chore(voice): align runtime context with session voice mode
2 parents d215115 + 2abc410 commit a22cfae

4 files changed

Lines changed: 20 additions & 3 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.12.0"
3+
version = "0.12.1"
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class UiPathRuntimeContext(BaseModel):
5858
None,
5959
description="Conversation owner id for CAS (a real cloud user id or a synthetic user id)",
6060
)
61-
voice_mode: Literal["session"] | None = Field(
61+
voice_mode: Literal["session", "maestro_flow"] | None = Field(
6262
None, description="Voice job type for CAS"
6363
)
6464
mcp_server_id: str | None = None

tests/test_context.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,3 +391,20 @@ def test_explicit_execution_source_not_overwritten() -> None:
391391
ctx = UiPathRuntimeContext(command="run", execution_source="custom")
392392

393393
assert ctx.execution_source == "custom"
394+
395+
396+
def test_constructor_accepts_maestro_flow_voice_mode() -> None:
397+
ctx = UiPathRuntimeContext(voice_mode="maestro_flow")
398+
399+
assert ctx.voice_mode == "maestro_flow"
400+
401+
402+
def test_from_config_accepts_maestro_flow_voice_mode(tmp_path: Path) -> None:
403+
config_path = tmp_path / "uipath.json"
404+
config_path.write_text(
405+
json.dumps({"fpsProperties": {"voice.mode": "maestro_flow"}})
406+
)
407+
408+
ctx = UiPathRuntimeContext.from_config(str(config_path))
409+
410+
assert ctx.voice_mode == "maestro_flow"

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)