feat: hydrate managed workspaces in cli - #1845
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the uipath CLI runtime wiring to support managed workspace hydration for cloud jobs, restoring workspace files across suspend/resume and carrying conversation-scoped workspace snapshots via metadata events, with equivalent behavior for both run and debug executions.
Changes:
- Bump
uipathto 2.15.0 and requireuipath-runtime>=0.13.0,<0.14.0. - Wrap runtimes in
cli runandcli debugwithHydrationRuntime(job-scoped) andConversationalWorkspaceRuntime(conversation-scoped) when managed workspaces are enabled. - Add CLI tests asserting workspace runtime chain installation, precedence rules, and cleanup behavior.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/uipath/uv.lock | Updates lockfile for uipath 2.15.0 and uipath-runtime 0.13.0. |
| packages/uipath/pyproject.toml | Bumps package version and runtime dependency constraint. |
| packages/uipath/testcases/langchain-cross/pyproject.toml | Extends uv overrides to include uipath-runtime version range. |
| packages/uipath/src/uipath/_cli/cli_run.py | Adds managed-workspace hydration + conversational snapshot runtime wrapping and revised cleanup logic. |
| packages/uipath/src/uipath/_cli/cli_debug.py | Mirrors managed-workspace wrapping behavior for debug execution chain and cleanup. |
| packages/uipath/tests/cli/test_run.py | Adds tests for workspace runtime installation, precedence, and cleanup robustness in run. |
| packages/uipath/tests/cli/test_debug_simulation.py | Adds tests validating workspace runtime installation in debug chain and related cleanup behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| client = UiPath() | ||
| workspace = Workspace.create() | ||
| workspace.path = workspace.path.resolve() | ||
| hydrator = WorkspaceHydrator( | ||
| workspace_path=workspace.path, | ||
| attachments=client.attachments, | ||
| jobs=client.jobs, | ||
| current_job_key=ctx.job_id, |
| client = UiPath() | ||
| workspace = Workspace.create() | ||
| workspace.path = workspace.path.resolve() | ||
| hydrator = WorkspaceHydrator( | ||
| workspace_path=workspace.path, | ||
| attachments=client.attachments, | ||
| jobs=client.jobs, | ||
| current_job_key=ctx.job_id, | ||
| folder_key=ctx.folder_key, | ||
| ) |
b4a1d24 to
c74d124
Compare
228cf64 to
5ecf1e4
Compare
� Conflicts: � packages/uipath/pyproject.toml � packages/uipath/src/uipath/_cli/cli_debug.py � packages/uipath/uv.lock
5ecf1e4 to
0d83655
Compare
|
🚨 Heads up:
|



Summary
Why
Depends on #1843.
managed workspaces need both job-scoped suspend state and conversation-scoped snapshots, with suspended state taking precedence.