Skip to content

The Vibe server workspace helper wraps common git operations behind API endpoints.

Workspace endpoints

  • GET /_vibe-agent/workspace/drop

    • Runs git checkout -- . and git clean -fd.
  • GET /_vibe-agent/workspace/reset

    • Runs git checkout main, git fetch, and git reset --hard origin/main, then git clean -fd.
  • GET /_vibe-agent/workspace/accept

    • Responds immediately with success: true unless a push is already running.
    • Runs an internal prompt to create .commit.txt.
    • Creates a new branch named vibenv/<timestamp>.
    • Runs git add . and git commit -F .commit.txt.
    • Pushes the branch and creates a GitLab merge request.

Change tracking

workspace.changes() returns:

  • additions and deletions from git diff --numstat
  • affectedFiles from git diff --numstat and untracked files
  • branch and isMain from git rev-parse --abbrev-ref HEAD