Skip to content

refactor: narrow voice_mode to Literal["session"]#110

Draft
JoshParkSJ wants to merge 1 commit intomainfrom
josh/remove-legacy-voice-job-modes
Draft

refactor: narrow voice_mode to Literal["session"]#110
JoshParkSJ wants to merge 1 commit intomainfrom
josh/remove-legacy-voice-job-modes

Conversation

@JoshParkSJ
Copy link
Copy Markdown
Contributor

Summary

  • Narrow UiPathRuntimeContext.voice_mode from Literal["config", "toolCall"] to Literal["session"] and update its description.
  • Pairs with the deprecation of the legacy "1 job per tool call" / "1 job per agent config" voice paths in uipath-agents-python's VoiceJobRuntime. After that change, session is the only mode the runtime factory ever sees on this field.
  • Wire format unchanged for the surviving path: CAS still emits voice.mode: 'session' in the started job's FPS properties; context.py still maps voice.modevoice_mode.

Coordination

  • Companion PR (uipath-agents-python): collapses VoiceJobRuntime to session-only, drops _execute_get_config / _execute_tool_call / post_to_cas, drops voice_mode constructor arg.
  • Companion change (AgentInterfaces): removes VoiceController, voice.routes.ts, the voiceStreamAgentEnabled feature flag, Redis pub/sub plumbing, and VoiceJobMode.Config/.ToolCall.

This PR is breaking on the field's literal type but the runtime callers in uipath-agents-python only check voice_mode is not None, so the runtime impact is limited to type-checker diagnostics for any consumer that passed the deprecated literals.

Test plan

  • uv run ruff check src/uipath/runtime/context.py
  • uv run mypy src/uipath/runtime/context.py
  • uv run pytest tests/ — 84 passed

The legacy "1 job per tool call" / "1 job per agent config" voice paths
have been removed in uipath-agents-python's VoiceJobRuntime. The only
remaining voice mode is "session" (long-lived URT job that streams tool
calls over socket.io to CAS). Narrow voice_mode accordingly so dead
literals don't propagate into runtime callers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant