vibe-sketcherDocumentation

vibesketcher.document.drafts

Provider-neutral, bounded scene review. A proposal never supplies trusted metadata.

Functions

bounded(document)

digest(document, *[, content])

encoded(value)

prepare(source, proposal, *[, cancelled, ...])

Prepare an inspectable draft in a killable worker, without editing source.

prepare_inside(source, proposal)

Worker implementation: derive, compare and render independently of live state.

Classes

Proposal(*, canvas, scope[, notes])

Scope(*[, whole_drawing, nodes, root_slots, ...])

Exceptions

DraftConflict

The review or transaction no longer names the current source.

DraftRefused

The entire proposal was refused without changing its source.

exception vibesketcher.document.drafts.DraftRefused[source]

Bases: ValueError

The entire proposal was refused without changing its source.

exception vibesketcher.document.drafts.DraftConflict[source]

Bases: DraftRefused

The review or transaction no longer names the current source.

class vibesketcher.document.drafts.Scope(*, whole_drawing=False, nodes=<factory>, root_slots=<factory>, species=<factory>, reactions=<factory>)[source]

Bases: BaseModel

Parameters:
model_config = {'extra': 'forbid', 'strict': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

whole_drawing: bool
nodes: list[str]
root_slots: list[int]
species: list[str]
reactions: list[str]
class vibesketcher.document.drafts.Proposal(*, canvas, scope, notes='')[source]

Bases: BaseModel

Parameters:
model_config = {'extra': 'forbid', 'strict': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

canvas: dict[str, Any]
scope: Scope
notes: str
vibesketcher.document.drafts.encoded(value)[source]
Parameters:

value (Any)

Return type:

bytes

vibesketcher.document.drafts.digest(document, *, content=False)[source]
Parameters:
Return type:

str

vibesketcher.document.drafts.bounded(document)[source]
Parameters:

document (Document)

Return type:

None

vibesketcher.document.drafts.prepare_inside(source, proposal)[source]

Worker implementation: derive, compare and render independently of live state.

Parameters:
Return type:

dict[str, Any]

vibesketcher.document.drafts.prepare(source, proposal, *, cancelled=None, timeout=30)[source]

Prepare an inspectable draft in a killable worker, without editing source.

Parameters:
Return type:

dict[str, Any]