{ "$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" }, "AssetPatch": { "description": "Mutable asset fields.", "properties": { "name": { "description": "Replacement display name.", "type": [ "string", "null" ] }, "provenance_source": { "description": "Replacement attribution source label.", "type": [ "string", "null" ] } }, "type": "object" }, "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" } ] }, "GraphLayoutAlgorithm": { "description": "Graph layout algorithm exposed by Inkfinite.", "oneOf": [ { "const": "flow", "description": "Layer a directed graph by rank.", "type": "string" }, { "const": "tree", "description": "Layer a directed graph with tree-oriented stable ordering.", "type": "string" }, { "const": "radial", "description": "Place graph ranks on concentric circles.", "type": "string" } ] }, "GraphLayoutDirection": { "description": "Direction of ranked graph layouts.", "oneOf": [ { "const": "top_to_bottom", "description": "Sources appear above their targets.", "type": "string" }, { "const": "left_to_right", "description": "Sources appear to the left of their targets.", "type": "string" } ] }, "GraphLayoutOptions": { "description": "Options shared by graph layout operations.", "properties": { "algorithm": { "$ref": "#/$defs/GraphLayoutAlgorithm", "description": "Layout algorithm to use." }, "direction": { "$ref": "#/$defs/GraphLayoutDirection", "description": "Direction for ranked layouts." }, "node_gap": { "description": "Space between adjacent nodes in one rank or radial ring.", "format": "double", "type": "number" }, "rank_gap": { "description": "Space between ranked rows or radial rings.", "format": "double", "type": "number" } }, "required": [ "algorithm", "direction", "node_gap", "rank_gap" ], "type": "object" }, "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" }, "LayerContentsDisposition": { "description": "Policy for children of a deleted non-empty layer.", "oneOf": [ { "description": "Move root shapes to the specified layer while preserving their order.", "properties": { "destination_layer_id": { "$ref": "#/$defs/LayerId" }, "kind": { "const": "move_to", "type": "string" } }, "required": [ "kind", "destination_layer_id" ], "type": "object" }, { "description": "Delete every descendant explicitly.", "properties": { "kind": { "const": "delete", "type": "string" } }, "required": [ "kind" ], "type": "object" } ] }, "LayerId": { "description": "Stable identifier for a layer.", "type": "string" }, "LayerPatch": { "description": "Mutable layer fields.", "properties": { "locked": { "description": "Replacement locked state.", "type": [ "boolean", "null" ] }, "name": { "description": "Replacement display name.", "type": [ "string", "null" ] }, "opacity": { "anyOf": [ { "$ref": "#/$defs/Opacity" }, { "type": "null" } ], "description": "Replacement inherited opacity." }, "visible": { "description": "Replacement visibility.", "type": [ "boolean", "null" ] } }, "type": "object" }, "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" } ] }, "LayoutAxis": { "description": "Axis used by alignment and distribution operations.", "oneOf": [ { "const": "horizontal", "description": "Horizontal document axis.", "type": "string" }, { "const": "vertical", "description": "Vertical document 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" }, "Operation": { "description": "Durable document operation. Ordered insertions use sibling anchors only.", "oneOf": [ { "description": "Insert a page into the document's ordered page list.", "properties": { "anchor": { "$ref": "#/$defs/SiblingAnchor", "description": "Placement relative to an existing page." }, "page": { "$ref": "#/$defs/PageRecord", "description": "Complete new page record." }, "type": { "const": "create_page", "type": "string" } }, "required": [ "type", "page", "anchor" ], "type": "object" }, { "description": "Rename a page.", "properties": { "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "name": { "description": "Replacement name.", "type": "string" }, "page_id": { "$ref": "#/$defs/PageId", "description": "Page to rename." }, "type": { "const": "rename_page", "type": "string" } }, "required": [ "type", "page_id", "name" ], "type": "object" }, { "description": "Delete a page and its owned records.", "properties": { "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "page_id": { "$ref": "#/$defs/PageId", "description": "Page to delete." }, "type": { "const": "delete_page", "type": "string" } }, "required": [ "type", "page_id" ], "type": "object" }, { "description": "Insert a layer into a page's ordered layer list.", "properties": { "anchor": { "$ref": "#/$defs/SiblingAnchor2", "description": "Placement relative to an existing layer." }, "layer": { "$ref": "#/$defs/LayerRecord", "description": "Complete new layer record." }, "type": { "const": "create_layer", "type": "string" } }, "required": [ "type", "layer", "anchor" ], "type": "object" }, { "description": "Change mutable layer fields.", "properties": { "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "layer_id": { "$ref": "#/$defs/LayerId", "description": "Layer to change." }, "patch": { "$ref": "#/$defs/LayerPatch", "description": "Requested field replacements." }, "type": { "const": "patch_layer", "type": "string" } }, "required": [ "type", "layer_id", "patch" ], "type": "object" }, { "description": "Move a layer within its page.", "properties": { "anchor": { "$ref": "#/$defs/SiblingAnchor2", "description": "New placement relative to a sibling layer." }, "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "layer_id": { "$ref": "#/$defs/LayerId", "description": "Layer to move." }, "type": { "const": "reorder_layer", "type": "string" } }, "required": [ "type", "layer_id", "anchor" ], "type": "object" }, { "description": "Delete a layer using an explicit child disposition.", "properties": { "contents": { "$ref": "#/$defs/LayerContentsDisposition", "description": "Required handling for existing shapes." }, "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "layer_id": { "$ref": "#/$defs/LayerId", "description": "Layer to delete." }, "type": { "const": "delete_layer", "type": "string" } }, "required": [ "type", "layer_id", "contents" ], "type": "object" }, { "description": "Insert a shape into its parent's ordered child list.", "properties": { "anchor": { "$ref": "#/$defs/SiblingAnchor3", "description": "Placement relative to an existing shape child." }, "shape": { "$ref": "#/$defs/ShapeRecord", "description": "Complete new shape record." }, "type": { "const": "create_shape", "type": "string" } }, "required": [ "type", "shape", "anchor" ], "type": "object" }, { "description": "Change mutable shape fields without moving it.", "properties": { "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "patch": { "$ref": "#/$defs/ShapePatch", "description": "Requested field replacements." }, "shape_id": { "$ref": "#/$defs/ShapeId", "description": "Shape to change." }, "type": { "const": "patch_shape", "type": "string" } }, "required": [ "type", "shape_id", "patch" ], "type": "object" }, { "description": "Move a shape to another layer or container and place it by sibling anchor.", "properties": { "anchor": { "$ref": "#/$defs/SiblingAnchor3", "description": "Placement relative to a child of the replacement parent." }, "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "parent": { "$ref": "#/$defs/ShapeParent", "description": "Replacement parent." }, "shape_id": { "$ref": "#/$defs/ShapeId", "description": "Shape to move." }, "type": { "const": "reparent_shape", "type": "string" } }, "required": [ "type", "shape_id", "parent", "anchor" ], "type": "object" }, { "description": "Change a shape's registry kind and kind-specific properties.\n\nTransform, common style, semantic metadata, hierarchy, and stable ID\nremain attached to the existing shape record.", "properties": { "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "kind": { "description": "Replacement registry kind.", "type": "string" }, "properties": { "additionalProperties": true, "description": "Replacement kind-specific properties.", "type": "object" }, "shape_id": { "$ref": "#/$defs/ShapeId", "description": "Shape to convert." }, "style": { "anyOf": [ { "$ref": "#/$defs/ShapeStyle" }, { "type": "null" } ], "description": "Optional replacement common style." }, "type": { "const": "convert_shape", "type": "string" } }, "required": [ "type", "shape_id", "kind", "properties" ], "type": "object" }, { "description": "Delete a shape and its owned descendants.", "properties": { "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "shape_id": { "$ref": "#/$defs/ShapeId", "description": "Shape to delete." }, "type": { "const": "delete_shape", "type": "string" } }, "required": [ "type", "shape_id" ], "type": "object" }, { "description": "Create a relationship between two shapes.", "properties": { "binding": { "$ref": "#/$defs/BindingRecord", "description": "Complete new binding record." }, "type": { "const": "create_binding", "type": "string" } }, "required": [ "type", "binding" ], "type": "object" }, { "description": "Delete a binding.", "properties": { "binding_id": { "$ref": "#/$defs/BindingId", "description": "Binding to delete." }, "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "type": { "const": "delete_binding", "type": "string" } }, "required": [ "type", "binding_id" ], "type": "object" }, { "description": "Add an asset to the document.", "properties": { "asset": { "$ref": "#/$defs/AssetRecord", "description": "Complete new asset record." }, "type": { "const": "create_asset", "type": "string" } }, "required": [ "type", "asset" ], "type": "object" }, { "description": "Change mutable asset metadata.", "properties": { "asset_id": { "$ref": "#/$defs/AssetId", "description": "Asset to change." }, "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "patch": { "$ref": "#/$defs/AssetPatch", "description": "Requested field replacements." }, "type": { "const": "patch_asset", "type": "string" } }, "required": [ "type", "asset_id", "patch" ], "type": "object" }, { "description": "Delete an asset that is no longer referenced.", "properties": { "asset_id": { "$ref": "#/$defs/AssetId", "description": "Asset to delete." }, "expected_version": { "anyOf": [ { "$ref": "#/$defs/RecordVersion" }, { "type": "null" } ], "description": "Optional optimistic record version." }, "type": { "const": "delete_asset", "type": "string" } }, "required": [ "type", "asset_id" ], "type": "object" }, { "description": "Align two or more shapes using their materialized bounds.", "properties": { "alignment": { "$ref": "#/$defs/ShapeAlignment", "description": "Alignment line shared by the shapes." }, "expected_versions": { "additionalProperties": { "$ref": "#/$defs/RecordVersion" }, "description": "Optional optimistic versions keyed by shape ID.", "type": "object" }, "shape_ids": { "description": "Shapes to align.", "items": { "$ref": "#/$defs/ShapeId" }, "type": "array" }, "type": { "const": "align_shapes", "type": "string" } }, "required": [ "type", "shape_ids", "alignment", "expected_versions" ], "type": "object" }, { "description": "Distribute three or more shapes with equal gaps between their bounds.", "properties": { "axis": { "$ref": "#/$defs/LayoutAxis", "description": "Axis on which to distribute the shapes." }, "expected_versions": { "additionalProperties": { "$ref": "#/$defs/RecordVersion" }, "description": "Optional optimistic versions keyed by shape ID.", "type": "object" }, "shape_ids": { "description": "Shapes to distribute.", "items": { "$ref": "#/$defs/ShapeId" }, "type": "array" }, "type": { "const": "distribute_shapes", "type": "string" } }, "required": [ "type", "shape_ids", "axis", "expected_versions" ], "type": "object" }, { "description": "Stack two or more shapes along one axis with a shared cross-axis center.", "properties": { "axis": { "$ref": "#/$defs/LayoutAxis", "description": "Axis on which to stack the shapes." }, "expected_versions": { "additionalProperties": { "$ref": "#/$defs/RecordVersion" }, "description": "Optional optimistic versions keyed by shape ID.", "type": "object" }, "gap": { "description": "Space between adjacent shape bounds.", "format": "double", "type": "number" }, "shape_ids": { "description": "Shapes to stack.", "items": { "$ref": "#/$defs/ShapeId" }, "type": "array" }, "type": { "const": "stack_shapes", "type": "string" } }, "required": [ "type", "shape_ids", "axis", "gap", "expected_versions" ], "type": "object" }, { "description": "Arrange two or more shapes in a deterministic row-major grid.", "properties": { "column_gap": { "description": "Horizontal space between grid columns.", "format": "double", "type": "number" }, "columns": { "description": "Number of columns in the grid.", "format": "uint32", "minimum": 0, "type": "integer" }, "expected_versions": { "additionalProperties": { "$ref": "#/$defs/RecordVersion" }, "description": "Optional optimistic versions keyed by shape ID.", "type": "object" }, "row_gap": { "description": "Vertical space between grid rows.", "format": "double", "type": "number" }, "shape_ids": { "description": "Shapes to arrange.", "items": { "$ref": "#/$defs/ShapeId" }, "type": "array" }, "type": { "const": "grid_shapes", "type": "string" } }, "required": [ "type", "shape_ids", "columns", "column_gap", "row_gap", "expected_versions" ], "type": "object" }, { "description": "Tidy two or more shapes into a balanced row-major grid.", "properties": { "expected_versions": { "additionalProperties": { "$ref": "#/$defs/RecordVersion" }, "description": "Optional optimistic versions keyed by shape ID.", "type": "object" }, "gap": { "description": "Space between grid cells.", "format": "double", "type": "number" }, "shape_ids": { "description": "Shapes to tidy.", "items": { "$ref": "#/$defs/ShapeId" }, "type": "array" }, "type": { "const": "tidy_shapes", "type": "string" } }, "required": [ "type", "shape_ids", "gap", "expected_versions" ], "type": "object" }, { "description": "Arrange selected shapes from their structured connections.", "properties": { "expected_versions": { "additionalProperties": { "$ref": "#/$defs/RecordVersion" }, "description": "Optional optimistic versions keyed by shape ID.", "type": "object" }, "layout": { "$ref": "#/$defs/GraphLayoutOptions", "description": "Graph algorithm and spacing options." }, "shape_ids": { "description": "Shapes to arrange.", "items": { "$ref": "#/$defs/ShapeId" }, "type": "array" }, "type": { "const": "graph_layout", "type": "string" } }, "required": [ "type", "shape_ids", "layout", "expected_versions" ], "type": "object" } ] }, "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" }, "ShapeAlignment": { "description": "Edge or center line used to align a group of shapes.", "oneOf": [ { "const": "left", "description": "Align left bounds.", "type": "string" }, { "const": "center", "description": "Align horizontal centers.", "type": "string" }, { "const": "right", "description": "Align right bounds.", "type": "string" }, { "const": "top", "description": "Align top bounds.", "type": "string" }, { "const": "middle", "description": "Align vertical centers.", "type": "string" }, { "const": "bottom", "description": "Align bottom bounds.", "type": "string" } ] }, "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" } ] }, "ShapePatch": { "description": "Mutable shape fields. `Some(None)` clears an optional field.", "properties": { "layout": { "anyOf": [ { "$ref": "#/$defs/ContainerLayout" }, { "type": "null" } ], "description": "Replacement or removal of container layout." }, "metadata": { "anyOf": [ { "$ref": "#/$defs/SemanticMetadata" }, { "type": "null" } ], "description": "Replacement semantic metadata." }, "properties": { "additionalProperties": true, "description": "Replacement kind-specific properties.", "type": [ "object", "null" ] }, "style": { "anyOf": [ { "$ref": "#/$defs/ShapeStyle" }, { "type": "null" } ], "description": "Replacement common style." }, "transform": { "anyOf": [ { "$ref": "#/$defs/Transform" }, { "type": "null" } ], "description": "Replacement relative transform." } }, "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" }, "SiblingAnchor": { "description": "Anchor used to place an item in an ordered child list without numeric indexes.", "oneOf": [ { "description": "Place the item before every existing sibling.", "properties": { "position": { "const": "first", "type": "string" } }, "required": [ "position" ], "type": "object" }, { "description": "Place the item after every existing sibling.", "properties": { "position": { "const": "last", "type": "string" } }, "required": [ "position" ], "type": "object" }, { "description": "Place the item immediately before the identified sibling.", "properties": { "position": { "const": "before", "type": "string" }, "sibling_id": { "$ref": "#/$defs/PageId" } }, "required": [ "position", "sibling_id" ], "type": "object" }, { "description": "Place the item immediately after the identified sibling.", "properties": { "position": { "const": "after", "type": "string" }, "sibling_id": { "$ref": "#/$defs/PageId" } }, "required": [ "position", "sibling_id" ], "type": "object" } ] }, "SiblingAnchor2": { "description": "Anchor used to place an item in an ordered child list without numeric indexes.", "oneOf": [ { "description": "Place the item before every existing sibling.", "properties": { "position": { "const": "first", "type": "string" } }, "required": [ "position" ], "type": "object" }, { "description": "Place the item after every existing sibling.", "properties": { "position": { "const": "last", "type": "string" } }, "required": [ "position" ], "type": "object" }, { "description": "Place the item immediately before the identified sibling.", "properties": { "position": { "const": "before", "type": "string" }, "sibling_id": { "$ref": "#/$defs/LayerId" } }, "required": [ "position", "sibling_id" ], "type": "object" }, { "description": "Place the item immediately after the identified sibling.", "properties": { "position": { "const": "after", "type": "string" }, "sibling_id": { "$ref": "#/$defs/LayerId" } }, "required": [ "position", "sibling_id" ], "type": "object" } ] }, "SiblingAnchor3": { "description": "Anchor used to place an item in an ordered child list without numeric indexes.", "oneOf": [ { "description": "Place the item before every existing sibling.", "properties": { "position": { "const": "first", "type": "string" } }, "required": [ "position" ], "type": "object" }, { "description": "Place the item after every existing sibling.", "properties": { "position": { "const": "last", "type": "string" } }, "required": [ "position" ], "type": "object" }, { "description": "Place the item immediately before the identified sibling.", "properties": { "position": { "const": "before", "type": "string" }, "sibling_id": { "$ref": "#/$defs/ShapeId" } }, "required": [ "position", "sibling_id" ], "type": "object" }, { "description": "Place the item immediately after the identified sibling.", "properties": { "position": { "const": "after", "type": "string" }, "sibling_id": { "$ref": "#/$defs/ShapeId" } }, "required": [ "position", "sibling_id" ], "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" }, "TransactionId": { "description": "Stable identifier for a transaction.", "type": "string" }, "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": "One durable edit submitted to the transaction engine.", "properties": { "actor_id": { "$ref": "#/$defs/ActorId", "description": "Actor responsible for the transaction." }, "base_heads": { "description": "Causal heads inspected by the caller.", "items": { "$ref": "#/$defs/ChangeHash" }, "type": "array" }, "description": { "description": "Human-readable explanation retained in history.", "type": "string" }, "id": { "$ref": "#/$defs/TransactionId", "description": "Stable transaction identifier." }, "operations": { "description": "Ordered operations committed as one CRDT change.", "items": { "$ref": "#/$defs/Operation" }, "type": "array" }, "origin": { "$ref": "#/$defs/Origin", "description": "Path by which the transaction entered the engine." }, "timestamp": { "$ref": "#/$defs/Timestamp", "description": "Client-recorded transaction time." } }, "required": [ "id", "actor_id", "origin", "base_heads", "description", "operations", "timestamp" ], "title": "TransactionDraft", "type": "object" }