v0.3.0: Project sync into sandboxes, background processes - #2
Open
cooleel wants to merge 8 commits into
Open
Conversation
cooleel
force-pushed
the
sw/new_features
branch
from
August 22, 2026 02:50
0530d83 to
fe8b477
Compare
- Sync the local project into the sandbox: git repos push to a Tensorlake-hosted sync repo and clone inside the sandbox (with automatic sync-back of agent commits), tl fs mounts attach directly, and plain folders upload to a cloud volume - bash background=true starts a long-running sandbox process; new bash_output and bash_kill tools read output and stop it - Rename TensorLake -> Tensorlake throughout - Treat 'timeout' sandbox status as terminal Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cooleel
force-pushed
the
sw/new_features
branch
from
August 23, 2026 15:10
2c34998 to
5781c1c
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Re-sync: explicit sync tool plus automatic re-push when local HEAD
or dirty state changed since the last sync (15 s throttle).
- Uncommitted sandbox work: each idle turn captures the sandbox's
dirty tree as a WIP commit and stages it locally on
tensorlake-wip/<branch>; never applied to the user's tree.
- Post-sync setup command: plugin option {"setup": "..."} (env
TENSORLAKE_SETUP_COMMAND wins), runs once per sandbox lifetime via a
marker file inside the stateful sandbox.
- Volume-mode sync-back: on idle, one status() call detects changes;
a contentId-pruned tree walk downloads changed files. Local edits
are never clobbered (per-file hash guard, conflicts reported),
remote deletions never delete local files, and uploads pull pending
agent changes down first.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The SDK now derives organization/project scope from the API key at ingress: introspectApiKey() is gone, explicit scope options are deprecated, PATs are no longer accepted, and RepositoryClient.url() became async. - Drop resolveScope/introspection; cloudOptions() is now synchronous and passes only apiKey/apiUrl - Await all five repos.url() call sites (one was interpolated into the sandbox clone script and would have failed only at runtime) - Stop forwarding TENSORLAKE_ORGANIZATION_ID/PROJECT_ID in client options and remove the PAT env-var escape hatch from the project-key warning - Update README: project API keys only, drop the org/project env rows Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Track exec bits in the volume manifest so exec-only changes sync back, and preserve non-exec permission bits when applying them - Refuse sync-back writes that resolve through symlinks to outside the worktree, and keep user-deleted files deleted (report as conflicts) - Keep skipped-but-present paths tracked so later deletes still propagate - Fingerprint repos with no commits via a temp-index tree hash so edits still trigger re-sync - Replace only the sync host's line in ~/.git-credentials instead of overwriting the whole file - Detach a stale filesystem before attaching a different one at the same mount path, waiting for the guest to unmount - Await the background refresh sync when the setup command has not yet run, so setup always completes before the first tool call Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
OpenCode ships a built-in apply_patch tool that edits files on the local machine. The plugin replaced bash/read/write/edit/ls/glob/grep but not apply_patch, so an agent could bypass the sandbox and modify the host project directly. Shadow it by name with a sandbox-side implementation of the same patch format (*** Begin Patch envelope with Add/Update/ Delete File sections): - Context hunks match exactly, then ignoring trailing whitespace, then ignoring edge whitespace; the file's own context lines are preserved so a fuzzy match does not churn whitespace - All updates are planned (read + hunks applied in memory) before any write, so a bad hunk cannot leave earlier files half-applied - Supports @@ anchors, pure insertions at EOF, and Move to renames; relative paths resolve against the sandbox project directory Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
New features added: