Conversation
1f6de07 to
33c8807
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the uipath-mcp package to align with the new UiPath 2.2 runtime model. The changes refactor the codebase to use the new runtime protocol-based architecture instead of the previous middleware-based approach.
Key changes:
- Migrates from middleware-based execution to runtime factory pattern
- Refactors runtime to implement
UiPathRuntimeProtocolwithexecute()andstream()methods - Updates import paths from
uipath._clitouipath.platformanduipath.runtime
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/uipath_mcp/middlewares.py | Removes init and run middleware registrations |
| src/uipath_mcp/_cli/cli_run.py | Deletes entire run middleware implementation |
| src/uipath_mcp/_cli/cli_init.py | Deletes entire init middleware implementation |
| src/uipath_mcp/_cli/_utils/_config.py | Adds type annotation for command field |
| src/uipath_mcp/_cli/_templates/server.py.template | Simplifies template by removing many example tool functions |
| src/uipath_mcp/_cli/_runtime/_session.py | Updates imports and adds type cast for command parameter |
| src/uipath_mcp/_cli/_runtime/_runtime.py | Major refactor to implement runtime protocol, adds factory pattern support, and streaming capabilities |
| src/uipath_mcp/_cli/_runtime/_factory.py | Adds new factory class for creating MCP runtime instances |
| src/uipath_mcp/_cli/_runtime/_exception.py | Updates import path for error classes |
| src/uipath_mcp/_cli/_runtime/_context.py | Removes UiPathMcpRuntimeContext class, keeps only UiPathServerType enum |
| src/uipath_mcp/_cli/_runtime/init.py | Adds factory registration and exports |
| pyproject.toml | Updates uipath dependency version and adds local development source |
| .vscode/settings.json | Adds new VS Code workspace configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
90495a9 to
e7df223
Compare
e7df223 to
80f2f3b
Compare
80f2f3b to
6c8f026
Compare
6c8f026 to
ce27d27
Compare
ce27d27 to
141dd08
Compare
- Update uipath SDK to >=2.8.23 and add uipath-runtime >=0.8.0 dependency - Use UiPathRuntimeContext for mcp_server_id/slug instead of manual uipath.json parsing - Add get_settings() method to factory protocol - Remove TODO comment on auth validation (confirmed needed) - Remove manual tracing/LlmOpsHttpExporter setup (handled by CLI) - Fix self.context.folder_key bug in _on_runtime_abort (use self._folder_key) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
141dd08 to
427cd65
Compare
06acbf1 to
4884c3e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ebda119 to
54a3433
Compare
54a3433 to
0d4649d
Compare
882facc to
2cfebf3
Compare
| @@ -607,8 +642,7 @@ def packaged(self) -> bool: | |||
| bool: True if this is a packaged runtime (has a process), False otherwise. | |||
| """ | |||
| process_key = None | |||
There was a problem hiding this comment.
we don't need this assignment anymore
|
|
||
| MCP servers don't emit intermediate events, so this just yields the final result. | ||
| """ | ||
| result = await self._run_server() |
There was a problem hiding this comment.
_run_server() returns UiPathRuntimeResult, while stream yields an AsyncGenerator[UiPathRuntimeEvent, None]. Even though it works at runtime since UiPathRuntimeResult is a subclass of UiPathRuntimeEvent, is there a reason why we need to use UiPathRuntimeEvent?
86c03de to
6adb5f9
Compare
6adb5f9 to
f452360
Compare
This PR updates the uipath-mcp package to align with the new UiPath 2.8 runtime model. The changes refactor the codebase to use the new runtime protocol-based architecture instead of the previous middleware-based approach.
Key changes
UiPathRuntimeProtocolwithexecute()andget_schema()methodsUiPathRuntimeFactoryProtocolwithget_settings(),discover_entrypoints(),discover_runtimes(),new_runtime(), anddispose()uipath._clitouipath.platformanduipath.runtimeuipathdependency to>=2.8.23, <2.9.0uipath-runtime>=0.8.0, <0.9.0dependencyUiPathRuntimeContextformcp_server_id/mcp_server_sluginstead of manualuipath.jsonparsingUiPathConfig.config_file_pathfor config path resolutionstream()method and event emitting — unnecessary complexity for MCP serversLlmOpsHttpExportersetup — now handled by the CLI automaticallycli_run.py,cli_init.py) and simplifies server templateDevelopment Package