Appearance
block-definition schema
A block TYPE's own declared property/event contract (what core.grid, core.container, etc. accept).
Pull the full JSON Schema: erp schema pull block-definition · MCP: erp_get_schema {"name":"block-definition"}
Top-level properties
| Property | Type | Required | Notes |
|---|---|---|---|
contractVersion | — | yes | |
type | string | yes | Globally unique block-type id, dot-namespaced (e.g. core.text-input, acme-hr.org-chart). |
version | string | yes | Semver. Instances pin the version they were authored against; minor/patch upgrades apply automatically, major upgrades require an explicit migration (W1-05). |
publisher | string | yes | The Phase 21 marketplace publisher id. |
inputClass | boolean | True for input-class blocks: the block inherits the validation-message surface (invalid state + message slot + aria-invalid/aria-describedby) from the base contract, which Phase 6's validation pipeline populates (round 2). | |
properties | array | yes | |
inputs | array | ||
outputs | array | ||
events | array | yes | |
permissions | object | yes | Which permission hook points the block honors (W2-05). Enforcement lands in Phase 11; the hooks are in the render path from day one. |
a11y | object | yes | |
designer | object | yes | Block-level designer metadata: what Phase 10's palette and property panel render for a block they have never seen (gap audit). |
slots | array | Container-class blocks only: named child slots and what they may contain. | |
composition | array | 2026-07-18: present only on tenant-authored composite Block definitions (Studio's Block Designer) - the block's own fixed internal content, an array of frozen @erp/block-engine BlockInstanceConfig, validated against the live BlockRegistry at mount time exactly like a page item's or a container's own children. undefined for every core/plugin block. |
Named sub-definitions
identifier, i18nKey, propertyType, valueSourceKind, selectOption, propertySpec, portSpec, eventSpec