Builtin Library
README.md
world_vcs.vcsWire
The wire helper every __spacetime_vcs.* caller shares, and the readers of the answers a read or a publish gives back.
awaitVcs(promise)waits for one of the__spacetime_vcs.*promises and answerstrue, payload, orfalse, messagefor anERR:payload.clarifyVcsError(message)restates the backend errors that read as something other than what happened: a live connection still establishing, a session not yet authorized, and a staging area another caller committed away.readVcs(promise, what)answers the payload of a read, raising withwhatand the backend's reason when the read could not be answered.readContentOrAbsent(promise, what, absent)answers a per-path content read's bytes, nil when the backend answeredabsent(ABSENT_STAGED,ABSENT_AT_COMMIT), and raises withwhatfor every other reason.isAlreadyPublished(message)andalreadyPublishedId(message)read a publish's answer that the remote already carries what it would publish, and the ZeroMind commit id it names.
local vcsWire = require("modules.world_vcs.vcsWire")
local ok, payload = vcsWire.awaitVcs(__spacetime_vcs.status("", "", "default"))