mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 08:03:46 +00:00
1.1 KiB
1.1 KiB
Spec: Project + Worktree Model
Proposed API Changes
- Add a project/worktree manager to the core session manager.
- Expose project metadata and active worktree operations (create/list/reset/delete).
Summary OpenCode relies on project and worktree endpoints for context and repo operations. We need a real project model backed by the workspace and VCS.
OpenCode Endpoints (Reference)
GET /opencode/projectGET /opencode/project/currentPATCH /opencode/project/{projectID}GET /opencode/experimental/worktreePOST /opencode/experimental/worktreeDELETE /opencode/experimental/worktreePOST /opencode/experimental/worktree/reset
Core Functionality Required
- Project identity and metadata (id, title, directory, branch).
- Current project derivation by directory/session.
- Worktree creation/reset/delete tied to VCS.
- Return consistent IDs and location data.
OpenCode Compat Wiring + Tests
- Replace stubs for
/project,/project/current,/project/{projectID}, and/experimental/worktree*endpoints. - Add E2E tests for worktree lifecycle and project metadata correctness.