Files
tibi-types/schemas/config/collection-meta.schema.json
LeanAgent 4c55f82446
continuous-integration/drone/push Build is passing
feat(schema): meta.query in Collection-Meta + designGuide-Einrückung
Hooks lesen oft zusätzliche Query-Parameter (ctx.request().query(name)).
Mit meta.query werden sie deklariert, für Agenten dokumentiert
(REST _meta/OpenAPI, MCP collection_describe) und bei MCP-Calls
validiert. Vergleiche docs 04-collections (meta.query).
2026-10-12 16:12:01 +00:00

538 lines
13 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "collection-meta.schema.json",
"title": "Tibi collection meta config",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"muiIcon": {
"type": "string"
},
"group": {
"type": "string"
},
"exports": {
"description": "Custom scripted exports (tibi-admin-nova ExportDialog). The script loads data itself via db.find/loadAll.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"file": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"filename": {
"type": "string"
}
},
"required": [
"name",
"file"
]
}
},
"designGuide": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"imageUrl": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"hide": {
"type": "boolean"
},
"singleton": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"key": {
"type": "string"
}
},
"required": [
"enabled"
]
},
"subNavigation": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"muiIcon": {
"type": "string"
},
"filter": {
"type": "object",
"additionalProperties": true
},
"defaultSort": {
"type": "object",
"additionalProperties": false,
"properties": {
"field": {
"$ref": "defs.schema.json#/definitions/sortField"
},
"order": {
"type": "string",
"enum": [
"ASC",
"DESC"
]
}
},
"required": [
"field"
]
},
"setDefault": {
"type": "object",
"additionalProperties": false,
"description": "Pre-fill a field with a default value when creating a new entry while this subNav tab is active.",
"properties": {
"field": {
"type": "string"
},
"value": {}
},
"required": [
"field",
"value"
]
}
},
"required": [
"name"
]
}
},
"preview": {
"$ref": "defs.schema.json#/definitions/previewConfig"
},
"i18n": {
"oneOf": [
{
"type": "boolean",
"enum": [
false
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"defaultLanguage": {
"type": "string"
},
"languages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
}
},
"required": [
"code"
]
}
},
"entry": {
"type": "object",
"additionalProperties": false,
"properties": {
"languageField": {
"type": "string"
},
"groupField": {
"type": "string"
},
"clearFields": {
"type": "array",
"items": {
"type": "string"
}
},
"copyFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"languageField",
"groupField"
]
}
}
}
]
},
"defaultSort": {
"type": "object",
"additionalProperties": false,
"properties": {
"field": {
"$ref": "defs.schema.json#/definitions/sortField"
},
"order": {
"type": "string",
"enum": [
"ASC",
"DESC",
"MANUALLY"
]
}
},
"required": [
"field"
]
},
"viewHint": {
"oneOf": [
{
"type": "string",
"enum": [
"table",
"cards"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"media": {
"type": "object",
"additionalProperties": false,
"properties": {
"upload": {
"type": "object",
"additionalProperties": false,
"properties": {
"autoFill": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"ai": {
"type": "object",
"additionalProperties": false,
"properties": {
"targetField": {
"type": "string"
},
"prompt": {
"type": "string"
},
"image": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxWidth": {
"type": "number",
"exclusiveMinimum": 0
},
"maxHeight": {
"type": "number",
"exclusiveMinimum": 0
},
"quality": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1
}
}
}
}
}
}
},
"navigation": {
"type": "object",
"additionalProperties": false,
"properties": {
"nodesField": {
"type": "string"
},
"preview": {
"$ref": "defs.schema.json#/definitions/previewConfig"
},
"declaredTrees": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"singleton": {
"type": "object",
"additionalProperties": true
},
"maxLevel": {
"type": "number"
}
},
"required": [
"singleton"
]
}
}
}
},
"blockStudio": {
"type": "object",
"additionalProperties": false,
"properties": {
"previewField": {
"type": "string"
},
"lint": {
"type": "boolean"
},
"renderer": {
"type": "object",
"additionalProperties": false,
"properties": {
"file": {
"type": "string"
}
},
"required": [
"file"
]
}
}
}
},
"oneOf": [
{
"required": [
"media"
]
},
{
"required": [
"navigation"
]
},
{
"required": [
"blockStudio"
]
}
]
}
]
},
"pagebuilder": {
"type": "object",
"additionalProperties": false,
"properties": {
"defaultViewport": {
"$ref": "defs.schema.json#/definitions/pagebuilderViewport"
},
"blockTypeField": {
"type": "string"
},
"blockRegistry": {
"type": "object",
"additionalProperties": false,
"properties": {
"file": {
"type": "string"
}
},
"required": [
"file"
]
},
"screenshot": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"field": {
"$ref": "defs.schema.json#/definitions/fieldPath"
},
"fileField": {
"$ref": "defs.schema.json#/definitions/fieldPath"
},
"screenWidth": {
"type": "integer",
"minimum": 1
},
"imageWidth": {
"type": "integer",
"minimum": 1
}
},
"required": [
"field",
"fileField"
]
}
}
}
},
"sidebar": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"group": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
}
},
"required": [
"group"
]
}
},
"sections": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"group": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"collapsible": {
"type": "boolean"
},
"collapsed": {
"type": "boolean"
}
},
"required": [
"group"
]
}
},
"openapi": {
"$ref": "openapi.schema.json"
},
"query": {
"description": "Additional query parameters hooks may read (ctx.request().query(name)). Documented for agents (REST _meta/OpenAPI, MCP collection_describe + extra argument) and validated on MCP calls. Credential-like keys (permission token names, auth headers) and core query keys are never allowed.",
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"number",
"boolean"
]
},
"enum": {
"type": "array",
"items": {
"type": [
"string",
"number",
"boolean"
]
}
},
"maxLength": {
"type": "integer",
"minimum": 1
},
"description": {
"$ref": "defs.schema.json#/definitions/i18nText"
}
}
}
},
"agent": {
"description": "Editor- und Agenten-Dokumentation (Zweck, Workflows, Gotchas). Freiform-Doku, wird u.a. ueber MCP/REST _meta ausgespielt.",
"type": "object",
"additionalProperties": true,
"properties": {
"purpose": {
"type": "string"
},
"instructions": {
"type": "string"
},
"fieldHints": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"examples": {
"type": "array"
},
"workflows": {
"type": "array",
"items": {
"type": "string"
}
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}