feat(mcp-jobs): framework-neutral core for long-running UiPath jobs over MCP#1717
Open
edis-uipath wants to merge 1 commit into
Open
feat(mcp-jobs): framework-neutral core for long-running UiPath jobs over MCP#1717edis-uipath wants to merge 1 commit into
edis-uipath wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new uipath.platform.mcp_jobs package that provides an MCP-SDK-free core for the uipath.com/job _meta contract and a framework-neutral execution abstraction for long-running Orchestrator jobs, along with unit tests and a package version bump.
Changes:
- Introduced value objects (
UiPathJobHandle,JobStart) and_metahelpers for START/FETCH signaling over plain dicts. - Added an executor protocol plus a default polling implementation (
BlockingJobExecutor) for awaiting job completion then FETCHing results. - Added new
tests/mcp_jobs/*coverage and bumpeduipath-platformversion to0.1.65.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/uipath-platform/uv.lock | Bumps locked editable package version to 0.1.65. |
| packages/uipath-platform/pyproject.toml | Bumps package version to 0.1.65. |
| packages/uipath-platform/src/uipath/platform/mcp_jobs/init.py | Public exports for the new MCP jobs core API. |
| packages/uipath-platform/src/uipath/platform/mcp_jobs/_handle.py | Adds frozen dataclass value objects for job handle and START outcome. |
| packages/uipath-platform/src/uipath/platform/mcp_jobs/_meta.py | Adds framework-neutral helpers to build/parse the uipath.com/job _meta contract. |
| packages/uipath-platform/src/uipath/platform/mcp_jobs/_executor.py | Adds executor protocol and default polling-based executor implementation. |
| packages/uipath-platform/tests/mcp_jobs/test_meta.py | Unit tests for _meta builder/parser helpers. |
| packages/uipath-platform/tests/mcp_jobs/test_executor.py | Unit tests for polling executor behavior (non-job, terminal states, timeout). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+108
to
+109
| version = section.get("version") | ||
| return version if isinstance(version, int) else None |
Comment on lines
+129
to
+130
| loop = asyncio.get_event_loop() | ||
| deadline = None if self._timeout is None else loop.time() + self._timeout |
…ver MCP Adds `uipath.platform.mcp_jobs`, the MCP-SDK-free core for the Option-6 "UiPath jobs over MCP via _meta" contract: - `UiPathJobHandle` / `JobStart` value objects (frozen dataclasses). - `_meta` helpers for the single `uipath.com/job` key — `build_start_meta`, `build_fetch_meta`, `read_job_handle`, `read_job_version` — operating on plain dicts so they work across any mcp SDK version (no `mcp` import). - `McpJobExecutor` Protocol (`run(*, start, fetch, tool_name)`) and the neutral `BlockingJobExecutor` default (polls `jobs.retrieve_async` to a terminal state, then FETCHes). Framework adapters (e.g. LangGraph suspend) live downstream. Framework integrations reuse this core and supply only their own executor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
90a6728 to
39888d8
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Framework-neutral core for long-running UiPath jobs over MCP
Adds
uipath.platform.mcp_jobs— the MCP-SDK-free core for theuipath.com/jobcontract (Option 6 of the design). It lets any UiPath framework integration suspend an agent while an Orchestrator job that an MCP server started runs, then resume with the result.What's here
UiPathJobHandle/JobStartvalue objects (frozen dataclasses)._metahelpers for the singleuipath.com/jobkey —build_start_meta,build_fetch_meta,read_job_handle,read_job_version— operating on plain dicts, so they work against anymcpSDK version with nomcpimport.McpJobExecutorProtocol (run(*, start, fetch, tool_name)) + the neutralBlockingJobExecutordefault (pollsjobs.retrieve_asyncto a terminal state, then FETCHes).Framework adapters (e.g. a LangGraph suspend executor — see the uipath-langchain PR) reuse this core and supply only their own executor;
interrupt/framework primitives never leak in here.Why mcp-free
uipath-python has no
mcpdependency (the SDK only appears in samples). Keeping the core on plain dicts makes it robust across mcp 1.x/2.x; the wire (CallToolRequest/CallToolResult) is owned by the consumer.Testing
packages/uipath-platform: 14 new tests (tests/mcp_jobs/);ruff+mypyclean.Downstream
This is the base for the uipath-langchain client PR (
feat/mcp-uipath-jobs), which bumps itsuipath-platformfloor to the version this ships.🤖 Generated with Claude Code