Skip to content

v0.2.0: Project sync into sandboxes, background processes, and opencode auth login - #2

Open
cooleel wants to merge 2 commits into
mainfrom
sw/new_features
Open

v0.2.0: Project sync into sandboxes, background processes, and opencode auth login#2
cooleel wants to merge 2 commits into
mainfrom
sw/new_features

Conversation

@cooleel

@cooleel cooleel commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

New features added:

  • Project sync into sandbox
    • Git repos: worktree pushed to a TensorLake-hosted repo and cloned inside the sandbox, with credentials set up so the agent can push changes back.
    • Plain folders: uploaded to a cloud volume and mounted (writes persist durably); skips node_modules and other build junk.
    • Mode auto-detected, overridable via TENSORLAKE_SYNC_MODE=git|volume|off.
    • bash/ls/glob/grep now default to the synced project directory, and the system prompt tells the model where the project lives.
  • Migration to the new Tensorlake SDK API
    Moved off the deprecated SandboxClient to the Sandbox.create()/Sandbox.connect() statics.
  • Real background processes in the bash tool
    • background=true now uses sandbox.startProcess() and returns a real pid instead of fire-and-forget.
    • New bash_output tool (status + output lines new since last call) and bash_kill tool.
    • Processes stay queryable after exit/kill.
  • Reliability hardening
    • Stale sandbox handles (e.g. sandbox resumed on another host) are detected via typed SDK errors, dropped, and idempotent calls retried once — commands never retry, so nothing runs twice.
    • Re-sync is fast-forward-only, so commits made inside the sandbox are never clobbered.
    • Fixed a sandbox stuck mid-suspension being treated as live, and a latent deadlock in the cached-terminated path.
    • Project re-sync no longer blocks the first tool call when the sandbox already has a project copy — refresh runs in the background.
    • bash_output replay after a plugin restart is capped at 200 lines with stale-pid cleanup.
  • OpenCode-native auth
    • TensorLake registers as a provider in opencode auth login — no more mandatory env var.
    • Only project-scoped keys (tl_apiKey_…) accepted; the key is validated against the management API before OpenCode stores it in its standard auth.json, and its org/project scope comes from introspection so users never enter IDs separately.
    • Credentials resolved lazily on every use, so logging in mid-session works without restarting OpenCode.
    • TENSORLAKE_API_KEY still works and takes precedence (CI use case); missing credentials now produce an actionable error in chat, a toast, and a log line.
  • Housekeeping
    Dependency pins loosened to caret ranges (tensorlake ^0.5.109, @opencode-ai/plugin ^1.18.18), and the README updated throughout (login flow, testing guide, troubleshooting).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant