vibesketcher.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-sketcher 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 vibesketcher.server.store.Conflict(current, given)[source]¶
Bases:
RuntimeErrorThe write named a revision that is no longer current.
- class vibesketcher.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-sketcher.
- class vibesketcher.server.store.Store[source]¶
Bases:
object- add(document, *, path=None)[source]¶
Add a document; a supplied file binding must describe that same document.
Use
open()to parse and bind a file in one read. For compatibility, callers may still supply both a document and path, but stale or edited contents cannot be paired with that file’s current digest. A missing destination starts unsaved and may be created by its first save.