Repository navigation
feat(workspace): add ManagedWorkspace to build workspace persistence [PC-5359] - #175
Open
tudormatei1 wants to merge 1 commit into
Open
tudormatei1 wants to merge 1 commit into
tudormatei1 wants to merge 1 commit into
Conversation
Coded agents lose the files they write when a job suspends and resumes. The wiring that builds the hydrator and the hydration and conversational wrappers lived only in uipath-agents. ManagedWorkspace builds them around one hydrator, so the uipath CLI and uipath-agents can share it. HydrationRuntime takes an optional runtime_id for outer wrappers, so uipath-agents can drop the subclass that only added that attribute. A debugger pause no longer uploads the workspace, and the call that continues skips the restore, so edits made before the pause stay. This applies only when the call asked for breakpoints; any other suspend uploads as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
There was a problem hiding this comment.
🟡 Changes recommended
The conversational wrapper invokes the services factory during construction, so credential validation can fail before execution, violating the stated credential-free wrapper construction guarantee.
1 open issue
What changed in this PR
Adds ManagedWorkspace to centralize workspace persistence wiring for coded agents and downstream integrations, helping preserve files across job suspension and resume.
Changes:
- Adds shared workspace, hydrator, and wrapper construction with public exports.
- Preserves local workspace changes across debugger pauses and exposes
runtime_id. - Adds persistence and breakpoint tests and bumps the package to 0.13.7.
| File | Description |
|---|---|
uv.lock |
Updates the locked package version to 0.13.7. |
tests/workspace/test_workspace_hydration.py |
Tests breakpoint continuation and suspension persistence. |
tests/workspace/test_managed_workspace.py |
Tests wrapper wiring, service initialization, persistence, and cleanup. |
src/uipath/runtime/workspace/managed.py |
Adds shared workspace and wrapper construction. |
src/uipath/runtime/workspace/hydration.py |
Handles debugger pauses and exposes runtime identity. |
src/uipath/runtime/workspace/__init__.py |
Exports the new workspace APIs. |
src/uipath/runtime/__init__.py |
Exposes the new APIs at package level. |
pyproject.toml |
Bumps the release version to 0.13.7. |
Review effort: Balanced
| """ | ||
| return ConversationalWorkspaceRuntime( | ||
| runtime, | ||
| hydrator=self.hydrator(), |
This branch has not been deployed
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.




Coded agents lose the files they write to disk when their job suspends and resumes. This adds
ManagedWorkspace, which builds the workspace hydrator and both wrappers in one place. TheuipathCLI uses it to give coded agents the persistence low-code advanced agents already have (UiPath/uipath-python#1976), and uipath-agents drops its own copy of the same wiring (https://github.com/UiPath/uipath-agents-python/pull/867).Note
Release this first. The uipath and uipath-agents PRs import
ManagedWorkspace, and their CI fails until 0.13.7 is on PyPI.Changes
ManagedWorkspace(workspace/managed.py) buildsHydrationRuntimeandConversationalWorkspaceRuntimearound one shared hydrator. The attachments and jobs services come in as a factory and are created on first use, so building the wrappers needs no credentials and this package stays free of platform code.HydrationRuntime: a debugger pause no longer uploads the workspace, and the call that continues skips the restore, so edits made before the pause aren't replaced by the last suspended version. This only applies when the call asked for breakpoints. Any other suspend uploads as before.HydrationRuntimetakes an optionalruntime_idfor outer wrappers to read; agents' telemetry reads it.Testing
ManagedWorkspace: resume restores files, services are created lazily, both wrappers share one hydrator, a folder it creates is removed and a caller's folder is kept.interrupt(), anduipath run --resumein a new process reads it back from job attachments. With the langchain opt-in turned off, the same check fails. The script is in my local playground, not in a repo.🤖 Generated with Claude Code