refactor(agent): unify local and SSH workspace execution - #2707
Merged
bobleer merged 5 commits intoAug 31, 2026
Conversation
bobleer
force-pushed
the
bob/unify-workspace-agent-io
branch
from
August 31, 2026 09:09
62c7762 to
fb0ac56
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.
Summary
Unify local and SSH workspace file tools behind the existing host-side Agent Runtime and session-bound filesystem providers. Remote workspaces remain lightweight: this does not install BitFun CLI or a daemon on the target.
Type and Areas
Refactor, bug fixes, regression tests, CI, and architecture documentation. Areas: tool execution, Runtime ports, local/SFTP/Docker providers, Session fork, snapshots, Desktop APIs, and Web UI.
Motivation / Impact
Remote Read/Edit/search previously had separate implementations and drifted from local behavior. This change shares file reading, mutation validation, directory listing, matching, result reduction, and snapshot file IO. Providers own transport and filesystem differences.
rgor standardgrepcan prefilter literal candidates; unavailable accelerators fall back to streaming. Model-authored shell commands are preserved. Search covers unknown extensions, relative globs, complete counts, bounded result retention, and cancellation.Verification
All 13 CI jobs passed on final head
3eb2c4a63a389965cad9c8b0c5f0c9044951eaec: CI run. This includes Windows/macOS/Linux Rust and CLI checks, frontend checks, and x64/arm64 release installer and Relay image validation.Passed locally on macOS, using Node 22 for frontend checks:
pnpm run check:web(types and appearance/theme contracts).c150f6ce0.check:core-boundaries,check:repo-hygiene,check:github-config, changed-Rust formatting, andgit diff --checkpassed.Rust owner commands:
Reviewer Notes
Legacy payloads retain defaults and round-trip coverage; existing Session/profile/snapshot data is not deleted or reset. Forked history keeps its inline tool results but drops the source Session's derived snapshot-preview marker. Runtime ownership, credentials, hooks, Peer Device transport, and Detached Dispatch deployment contracts are unchanged.
Windows CI passed the native metadata regression and 144 workspace Agent contracts, including the local/remote Write and LS fixtures. The existing Windows Desktop library harness still encounters the pre-test Tauri loader limitation (#13419); this PR does not broaden that exception. Desktop tests ran on macOS and Linux.
Tests include shared local/remote-provider fixtures, real loopback SSH protocol cancellation, real local search accelerators, and shell-level Docker adapter scripts. These do not substitute for customer-host, ProxyJump, or live Docker end-to-end testing. The CI OS matrix now executes workspace provider and Agent contracts explicitly.
Checklist