vibesketch.server.store¶
The server’s documents: in memory, revisioned, optionally backed by a file.
Human and agent edit the same document through the revision counter
(roadmap, section 3.2): every write names the revision it read, and a stale
write gets a conflict and must re-read. A document opened from a file on the
command line (vibe-sketch serve scheme.vsk) can be saved back to that
file, and only to it: the HTTP API never takes a filesystem path.
Classes
Exceptions
|
The write named a revision that is no longer current. |
No document with that id. |
- exception vibesketch.server.store.Conflict(current, given)[source]¶
Bases:
RuntimeErrorThe write named a revision that is no longer current.
- class vibesketch.server.store.Entry(id: 'str', document: 'Document', path: 'Path | None' = None, saved_revision: 'int | None' = None, warnings: 'list[str]' = <factory>, result: 'dict[str, Any] | None'=None, digest: 'str | None' = None)[source]¶
Bases:
object- Parameters:
- result: dict[str, Any] | None = None¶
What the QVF job container it was opened from says about its calculation.
- digest: str | None = None¶
The file’s bytes as last read or written (
digest_of()), so a save never replaces a change made outside vibe-sketch.
- class vibesketch.server.store.Store[source]¶
Bases:
object- replace(identifier, document, *, expected, warnings=None)[source]¶
Store
documentas the next revision, ifexpectedis current.
- save(identifier)[source]¶
Write the document back to the file it came from.
Refused with
SaveRefused(aValueError) when the file changed since it was opened or last saved.