{ "$comment": "Generated by Inkfinite's binding generator. Do not edit this file manually.", "$defs": { "ActorId": { "description": "Stable identifier for a human, agent, or system actor.", "type": "string" }, "AssetId": { "description": "Stable identifier for an embedded or linked asset.", "type": "string" }, "AssetRecord": { "description": "Image, font, or other binary asset.", "properties": { "digest": { "description": "Content digest including its algorithm prefix.", "type": "string" }, "id": { "$ref": "#/$defs/AssetId", "description": "Stable record identifier." }, "media_type": { "description": "IANA media type.", "type": "string" }, "name": { "description": "User-visible asset name.", "type": "string" }, "provenance": { "$ref": "#/$defs/Provenance", "description": "Attribution for the asset." }, "source": { "$ref": "#/$defs/AssetSource", "description": "Stored or linked content." }, "version": { "$ref": "#/$defs/RecordVersion", "description": "Version used by optimistic operation preconditions." } }, "required": [ "id", "name", "media_type", "digest", "source", "provenance", "version" ], "type": "object" }, "AssetSource": { "description": "Storage form for asset contents.", "oneOf": [ { "description": "Bytes stored inside the canonical document.", "properties": { "bytes": { "description": "Raw asset bytes.", "items": { "format": "uint8", "maximum": 255, "minimum": 0, "type": "integer" }, "type": "array" }, "kind": { "const": "embedded", "type": "string" } }, "required": [ "kind", "bytes" ], "type": "object" }, { "description": "Stable external URI retained for formats that cannot embed an asset.", "properties": { "kind": { "const": "external", "type": "string" }, "uri": { "description": "URI used to resolve the content.", "type": "string" } }, "required": [ "kind", "uri" ], "type": "object" } ] }, "BindingAnchor": { "description": "Attachment point on a bound shape.", "oneOf": [ { "description": "Attach to the calculated center.", "properties": { "kind": { "const": "center", "type": "string" } }, "required": [ "kind" ], "type": "object" }, { "description": "Attach at normalized shape coordinates.", "properties": { "kind": { "const": "edge", "type": "string" }, "x": { "description": "Normalized horizontal coordinate.", "format": "double", "type": "number" }, "y": { "description": "Normalized vertical coordinate.", "format": "double", "type": "number" } }, "required": [ "kind", "x", "y" ], "type": "object" } ] }, "BindingId": { "description": "Stable identifier for a binding.", "type": "string" }, "BindingKind": { "description": "Registry key for a binding definition.", "type": "string" }, "BindingRecord": { "description": "Relationship between two shapes.", "properties": { "anchor": { "$ref": "#/$defs/BindingAnchor", "description": "Attachment point on the target." }, "id": { "$ref": "#/$defs/BindingId", "description": "Stable record identifier." }, "kind": { "$ref": "#/$defs/BindingKind", "description": "Registry key describing binding behavior." }, "relation_type": { "description": "Optional semantic relationship type, such as `depends_on`.", "type": [ "string", "null" ] }, "source_handle": { "description": "Named source handle, such as `start` or `end`.", "type": "string" }, "source_shape_id": { "$ref": "#/$defs/ShapeId", "description": "Shape that owns the binding, such as an arrow." }, "target_shape_id": { "$ref": "#/$defs/ShapeId", "description": "Shape to which the source is bound." }, "version": { "$ref": "#/$defs/RecordVersion", "description": "Version used by optimistic operation preconditions." } }, "required": [ "id", "kind", "source_shape_id", "target_shape_id", "source_handle", "anchor", "version" ], "type": "object" }, "ChangeHash": { "description": "Opaque causal hash supplied by the CRDT implementation.", "type": "string" }, "ContainerLayout": { "description": "Optional automatic layout applied by a container shape.", "oneOf": [ { "description": "Children retain their explicit transforms.", "properties": { "kind": { "const": "free", "type": "string" } }, "required": [ "kind" ], "type": "object" }, { "description": "Children flow along one axis.", "properties": { "alignment": { "$ref": "#/$defs/LayoutAlignment", "description": "Alignment on the cross axis." }, "direction": { "$ref": "#/$defs/StackDirection", "description": "Flow direction." }, "gap": { "description": "Space between adjacent children.", "format": "double", "type": "number" }, "kind": { "const": "stack", "type": "string" }, "padding": { "$ref": "#/$defs/Insets", "description": "Space between children and container edges." } }, "required": [ "kind", "direction", "gap", "padding", "alignment" ], "type": "object" }, { "description": "Children flow through a fixed number of columns.", "properties": { "alignment": { "$ref": "#/$defs/LayoutAlignment", "description": "Alignment within cells." }, "column_gap": { "description": "Horizontal gap between cells.", "format": "double", "type": "number" }, "columns": { "description": "Positive number of grid columns.", "format": "uint32", "minimum": 0, "type": "integer" }, "kind": { "const": "grid", "type": "string" }, "padding": { "$ref": "#/$defs/Insets", "description": "Space between children and container edges." }, "row_gap": { "description": "Vertical gap between cells.", "format": "double", "type": "number" } }, "required": [ "kind", "columns", "column_gap", "row_gap", "padding", "alignment" ], "type": "object" } ] }, "Document": { "description": "Normalized, materialized Inkfinite document.", "properties": { "assets": { "additionalProperties": { "$ref": "#/$defs/AssetRecord" }, "description": "Assets indexed by their stable IDs.", "type": "object" }, "bindings": { "additionalProperties": { "$ref": "#/$defs/BindingRecord" }, "description": "Bindings indexed by their stable IDs.", "type": "object" }, "layers": { "additionalProperties": { "$ref": "#/$defs/LayerRecord" }, "description": "Layers indexed by their stable IDs.", "type": "object" }, "page_ids": { "description": "Pages in user-visible order.", "items": { "$ref": "#/$defs/PageId" }, "type": "array" }, "pages": { "additionalProperties": { "$ref": "#/$defs/PageRecord" }, "description": "Pages indexed by their stable IDs.", "type": "object" }, "shapes": { "additionalProperties": { "$ref": "#/$defs/ShapeRecord" }, "description": "Shapes indexed by their stable IDs.", "type": "object" } }, "required": [ "pages", "page_ids", "layers", "shapes", "bindings", "assets" ], "type": "object" }, "DocumentId": { "description": "Stable identifier for a document.", "type": "string" }, "FormatId": { "description": "Stable identifier for a serialized contract.", "type": "string" }, "Insets": { "description": "Padding inside a layout container.", "properties": { "bottom": { "description": "Bottom inset.", "format": "double", "type": "number" }, "left": { "description": "Left inset.", "format": "double", "type": "number" }, "right": { "description": "Right inset.", "format": "double", "type": "number" }, "top": { "description": "Top inset.", "format": "double", "type": "number" } }, "required": [ "top", "right", "bottom", "left" ], "type": "object" }, "LayerId": { "description": "Stable identifier for a layer.", "type": "string" }, "LayerRecord": { "description": "A layer record and its ordered root-shape list.", "properties": { "id": { "$ref": "#/$defs/LayerId", "description": "Stable record identifier." }, "locked": { "description": "Whether descendants can be selected or changed.", "type": "boolean" }, "name": { "description": "User-visible layer name.", "type": "string" }, "opacity": { "$ref": "#/$defs/Opacity", "description": "Opacity inherited by descendants." }, "page_id": { "$ref": "#/$defs/PageId", "description": "Page that owns this layer." }, "shape_ids": { "description": "Root shape IDs in back-to-front draw order.", "items": { "$ref": "#/$defs/ShapeId" }, "type": "array" }, "version": { "$ref": "#/$defs/RecordVersion", "description": "Version used by optimistic operation preconditions." }, "visible": { "description": "Whether descendants participate in rendering and hit testing.", "type": "boolean" } }, "required": [ "id", "page_id", "name", "shape_ids", "visible", "locked", "opacity", "version" ], "type": "object" }, "LayoutAlignment": { "description": "Cross-axis alignment for laid-out children.", "oneOf": [ { "const": "start", "description": "Align children to the start edge.", "type": "string" }, { "const": "center", "description": "Center children on the cross axis.", "type": "string" }, { "const": "end", "description": "Align children to the end edge.", "type": "string" }, { "const": "stretch", "description": "Stretch children across the cross axis.", "type": "string" } ] }, "Opacity": { "description": "Opacity constrained to the inclusive range from zero to one.", "format": "float", "maximum": 1.0, "minimum": 0.0, "type": "number" }, "Origin": { "description": "Origin of a record or transaction.", "oneOf": [ { "const": "human", "description": "Direct edit made by a person.", "type": "string" }, { "const": "agent", "description": "Edit proposed or applied by an agent.", "type": "string" }, { "const": "sync", "description": "Change received from a trusted peer.", "type": "string" }, { "const": "system", "description": "Deterministic repair or other internal change.", "type": "string" } ] }, "PageId": { "description": "Stable identifier for a page.", "type": "string" }, "PageRecord": { "description": "A page record and its ordered layer list.", "properties": { "id": { "$ref": "#/$defs/PageId", "description": "Stable record identifier." }, "layer_ids": { "description": "Layer IDs in back-to-front draw order.", "items": { "$ref": "#/$defs/LayerId" }, "type": "array" }, "name": { "description": "User-visible page name.", "type": "string" }, "version": { "$ref": "#/$defs/RecordVersion", "description": "Version used by optimistic operation preconditions." } }, "required": [ "id", "name", "layer_ids", "version" ], "type": "object" }, "Provenance": { "description": "Attribution retained with content.", "properties": { "actor_id": { "$ref": "#/$defs/ActorId", "description": "Actor responsible for the record's current form." }, "origin": { "$ref": "#/$defs/Origin", "description": "Path by which the record entered the document." }, "source": { "description": "Optional source identifier, such as an external reference or proposal ID.", "type": [ "string", "null" ] }, "timestamp": { "$ref": "#/$defs/Timestamp", "description": "Time at which this provenance entry was recorded." } }, "required": [ "actor_id", "origin", "timestamp" ], "type": "object" }, "RecordVersion": { "description": "Monotonic version of a record within the document history.", "format": "uint64", "minimum": 0, "type": "integer" }, "SemanticMetadata": { "description": "Human- and agent-readable meaning attached to a shape.", "properties": { "agent_editable": { "description": "Whether an agent may propose or apply edits to this shape.", "type": "boolean" }, "body": { "default": null, "description": "Optional card body.", "type": [ "string", "null" ] }, "custom_metadata": { "additionalProperties": true, "default": {}, "description": "Optional user-defined structured metadata. An empty map means no custom fields.", "type": "object" }, "description": { "description": "Optional longer description.", "type": [ "string", "null" ] }, "link": { "default": null, "description": "Optional external link associated with the content.", "type": [ "string", "null" ] }, "locked": { "description": "Whether direct edits to this shape are prohibited.", "type": "boolean" }, "name": { "description": "Optional display name.", "type": [ "string", "null" ] }, "provenance": { "$ref": "#/$defs/Provenance", "description": "Attribution for the record." }, "role": { "description": "Optional semantic selector such as `architecture.service`.", "type": [ "string", "null" ] }, "source": { "default": null, "description": "Optional content source, such as a citation or file path.", "type": [ "string", "null" ] }, "tags": { "description": "Searchable, user-defined tags.", "items": { "type": "string" }, "type": "array" }, "title": { "default": null, "description": "Optional card title.", "type": [ "string", "null" ] } }, "required": [ "tags", "locked", "agent_editable", "provenance" ], "type": "object" }, "ShapeId": { "description": "Stable identifier for a shape.", "type": "string" }, "ShapeKind": { "description": "Registry key for a shape definition.", "type": "string" }, "ShapeParent": { "description": "Parent that owns a shape's sole draw-order entry.", "oneOf": [ { "description": "The shape is a root child of a layer.", "properties": { "id": { "$ref": "#/$defs/LayerId" }, "kind": { "const": "layer", "type": "string" } }, "required": [ "kind", "id" ], "type": "object" }, { "description": "The shape is a child of a container shape.", "properties": { "id": { "$ref": "#/$defs/ShapeId" }, "kind": { "const": "shape", "type": "string" } }, "required": [ "kind", "id" ], "type": "object" } ] }, "ShapeRecord": { "description": "A shape record shared by all built-in shape definitions.", "properties": { "child_ids": { "description": "Ordered children when this shape is a container. This list is the\nframe presentation and export order.", "items": { "$ref": "#/$defs/ShapeId" }, "type": "array" }, "id": { "$ref": "#/$defs/ShapeId", "description": "Stable record identifier." }, "kind": { "$ref": "#/$defs/ShapeKind", "description": "Registry key. Built-in values are exposed as `*_KIND` constants." }, "layout": { "anyOf": [ { "$ref": "#/$defs/ContainerLayout" }, { "type": "null" } ], "description": "Optional automatic layout for container shapes." }, "metadata": { "$ref": "#/$defs/SemanticMetadata", "description": "Human- and agent-readable semantics and permissions." }, "parent": { "$ref": "#/$defs/ShapeParent", "description": "Parent relation; ordering comes only from the parent's child list." }, "properties": { "additionalProperties": true, "description": "Kind-specific serialized properties validated by the registry.", "type": "object" }, "style": { "$ref": "#/$defs/ShapeStyle", "description": "Visual properties common to all kinds." }, "transform": { "$ref": "#/$defs/Transform", "description": "Transform relative to `parent`." }, "version": { "$ref": "#/$defs/RecordVersion", "description": "Version used by optimistic operation preconditions." } }, "required": [ "id", "kind", "parent", "transform", "child_ids", "properties", "metadata", "style", "version" ], "type": "object" }, "ShapeStyle": { "description": "Common visual style shared by all shape kinds.", "properties": { "fill_opacity": { "anyOf": [ { "$ref": "#/$defs/Opacity" }, { "type": "null" } ], "description": "Optional opacity override for fills." }, "opacity": { "$ref": "#/$defs/Opacity", "description": "Opacity applied to the complete shape." }, "stroke_opacity": { "anyOf": [ { "$ref": "#/$defs/Opacity" }, { "type": "null" } ], "description": "Optional opacity override for strokes." } }, "required": [ "opacity" ], "type": "object" }, "StackDirection": { "description": "Stack direction for container layout.", "oneOf": [ { "const": "horizontal", "description": "Place children from left to right.", "type": "string" }, { "const": "vertical", "description": "Place children from top to bottom.", "type": "string" } ] }, "Timestamp": { "description": "Milliseconds since the Unix epoch.", "format": "int64", "type": "integer" }, "Transform": { "description": "Transform relative to a shape's parent container or layer.", "properties": { "rotation": { "description": "Clockwise rotation in radians.", "format": "double", "type": "number" }, "scale_x": { "description": "Horizontal scale.", "format": "double", "type": "number" }, "scale_y": { "description": "Vertical scale.", "format": "double", "type": "number" }, "translation": { "$ref": "#/$defs/Vec2", "description": "Translation in parent coordinates." } }, "required": [ "translation", "rotation", "scale_x", "scale_y" ], "type": "object" }, "Vec2": { "description": "Two-dimensional point or vector in document coordinates.", "properties": { "x": { "description": "Horizontal component.", "format": "double", "type": "number" }, "y": { "description": "Vertical component.", "format": "double", "type": "number" } }, "required": [ "x", "y" ], "type": "object" } }, "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "Materialized document plus its format and causal identity.", "properties": { "document": { "$ref": "#/$defs/Document", "description": "Normalized records." }, "document_id": { "$ref": "#/$defs/DocumentId", "description": "Stable document identifier." }, "format": { "$ref": "#/$defs/FormatId", "description": "Stable format identifier." }, "format_version": { "description": "Version of the document contract.", "format": "uint32", "minimum": 0, "type": "integer" }, "heads": { "description": "Causal CRDT heads represented by this snapshot.", "items": { "$ref": "#/$defs/ChangeHash" }, "type": "array" } }, "required": [ "format", "format_version", "document_id", "heads", "document" ], "title": "DocumentSnapshot", "type": "object" }