Component manifest (kletso.components/v1)
The file kletso_flutter:sync writes and the dashboard imports, so the model knows your custom component props.
{
"schema": "kletso.components/v1",
"generatedAt": "2026-09-28T12:00:00.000Z",
"components": [
{
"type": "acme.productCard",
"description": "A product tile from the Acme catalogue: image, name, price with currency, star rating and stock state.",
"props": { "type": "object", "required": ["sku", "name", "price", "currency"],
"properties": { "sku": { "type": "string" }, "name": { "type": "string" },
"price": { "type": "number" }, "currency": { "type": "string" },
"rating": { "type": "number" }, "inStock": { "type": "boolean" } } },
"example": { "sku": "SKU-1001", "name": "Trail Runner 2", "price": 1899, "currency": "INR", "rating": 4.5, "inStock": true },
"actions": ["view", "add"],
"version": 1
}
]
}
| Field | Rules |
|---|---|
type | required; lowercase segments separated by dots, at least one dot (acme.productCard) |
description | required; what the model reads |
props | required; JSON Schema (object, array, string, number, boolean, enum; no $ref) |
example | optional; used in previews and prompts |
actions | optional; action ids the widget fires |
version | default 1 |
Import semantics in the dashboard: new types are added; a type whose description, props, example or actions differ is updated with version = max(current + 1, manifest.version); otherwise unchanged. Imported types get source sync and a title derived from the last segment.
Generate it with dart run kletso_flutter:sync [--file lib/kletso_components.dart] [--out kletso.components.json]. The spec file may import only package:kletso_core.