Branches
Every script has a repository with a main branch. Each write (write_files or POST /scripts/{script_id}/repo/commits) becomes a commit and needs the branch’s current expected_head. That way two AIs never erase each other’s work: if the branch moved, the write is refused and you must read again.
Versions
Publishing bundles thesrc/ folder, minifies it, protects it and creates a version. Each channel has a single live version, the one users receive.
To go back, use
rollback_release with the previous version: the channel starts delivering that version. Nothing is deleted.
Tools: Versions · Branches.
