Files
tibi-types/schemas/config/project.schema.json
T
apairon 5458214ad9
continuous-integration/drone/push Build is passing
Schema: cache.image im Projekt und optionaler Asset-cachePath
- project.schema.json: cache.image.{path, autoCleanup.{maxAge,maxFiles,tempMaxAge}};
  Server-only-Knöpfe (enabled, interval, Laufbudgets) sind bewusst nicht vorgesehen.
- asset.schema.json: cachePath optional, ohne Pflicht-Verzeichnis, verweist auf
  cache.image.path als Default.
- index.d.ts und Beispiel-YAML nachgezogen.
2026-10-29 12:48:36 +00:00

430 lines
11 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "project.schema.json",
"title": "Tibi project config",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"namespace": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]+$"
},
"meta": {
"type": "object",
"additionalProperties": false,
"properties": {
"imageUrl": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"permissions": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
}
},
"required": [
"name"
]
}
},
"collectionGroups": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"icon": {
"type": "string"
}
},
"required": [
"name"
]
}
},
"ui": {
"type": "object",
"additionalProperties": false,
"properties": {
"css": {
"type": "string"
}
}
},
"tools": {
"type": "array",
"items": {
"$ref": "tool.schema.json"
}
},
"i18n": {
"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"
]
}
},
"messages": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": true
}
]
}
}
},
"required": [
"defaultLanguage",
"languages"
]
},
"openapi": {
"$ref": "openapi.schema.json"
},
"agent": {
"description": "Projektweite Editor- und Agenten-Dokumentation (Routen, Lookups, Workflows, Gotchas). Freiform-Doku, wird u.a. ueber MCP/REST _meta ausgespielt.",
"type": "object",
"additionalProperties": true,
"properties": {
"description": {
"type": "string"
},
"frontend": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"workflows": {
"type": "array",
"items": {
"type": "string"
}
},
"hints": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"upload": {
"$ref": "project.schema.json#/definitions/uploadConfig"
},
"collections": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "collection.schema.json"
}
]
}
},
"jobs": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "job.schema.json"
}
]
}
},
"actions": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "action.schema.json"
}
]
}
},
"assets": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "asset.schema.json"
}
]
}
},
"cors": {
"type": "object",
"additionalProperties": false,
"properties": {
"merge": {
"type": "boolean"
},
"allowOrigins": {
"type": "array",
"items": {
"type": "string"
}
},
"allowCredentials": {
"type": "boolean"
},
"allowHeaders": {
"type": "array",
"items": {
"type": "string"
}
},
"allowMethods": {
"type": "array",
"items": {
"type": "string"
}
},
"exposeHeaders": {
"type": "array",
"items": {
"type": "string"
}
},
"maxAge": {
"type": "integer",
"minimum": 0
}
}
},
"admin": {
"type": "object",
"additionalProperties": false,
"properties": {
"tokens": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"token": {
"type": "string"
},
"allowReload": {
"type": "boolean"
},
"allowRegenerateSearch": {
"type": "boolean"
},
"allowBackup": {
"type": "boolean",
"description": "Allow this token to download and restore project backups via the backup/restore API."
},
"allowSnapshots": {
"type": "boolean",
"description": "Allow this token to trigger, list, delete, restore, and download snapshots."
}
},
"required": [
"token"
]
}
}
}
},
"hook": {
"type": "object",
"additionalProperties": false,
"properties": {
"cache": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxEntries": {
"type": "integer",
"minimum": 0
},
"defaultTTL": {
"type": "string"
}
}
},
"ratelimit": {
"type": "object",
"additionalProperties": false,
"properties": {
"backoffInitialDelay": {
"type": "string"
},
"backoffMaxDelay": {
"type": "string"
},
"backoffResetAfter": {
"type": "string"
},
"windowSize": {
"type": "string"
},
"windowMaxHits": {
"type": "integer",
"minimum": 0
}
}
}
}
},
"audit": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"strictFields": {
"type": "boolean"
},
"snapshotPath": {
"type": "string",
"description": "Base directory for snapshot data, relative to configDir. Default: '{configDir}/snapshots'."
},
"cache": {
"type": "object",
"additionalProperties": false,
"description": "Per-project cache settings. Same key names as the server's cache.image block.",
"properties": {
"image": {
"type": "object",
"additionalProperties": false,
"description": "Derived image cache (filtered variants). Every value may only tighten cache.image.* of the server; path follows the usual security gates.",
"properties": {
"path": {
"type": "string",
"description": "Cache root for this project, relative to its config.yml. '..' needs security.allowUpperPaths, absolute needs security.allowAbsolutePaths."
},
"autoCleanup": {
"type": "object",
"additionalProperties": false,
"description": "Retention limits; the switch, the schedule and the per-run I/O budget are server-controlled.",
"properties": {
"maxAge": {
"type": "string",
"description": "How long an unused variant may stay (Go duration, e.g. '168h'). Only shorter than cache.image.autoCleanup.maxAge."
},
"maxFiles": {
"type": "integer",
"minimum": 1,
"description": "Maximum cache entries per cache directory. Only lower than cache.image.autoCleanup.maxFiles."
},
"tempMaxAge": {
"type": "string",
"description": "Lifetime of abandoned .tmp-* files (Go duration). Only shorter than cache.image.autoCleanup.tempMaxAge."
}
}
}
}
}
}
},
"snapshots": {
"type": "array",
"description": "List of snapshot profiles for automated point-in-time backups.",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "snapshot.schema.json"
}
]
}
},
"legacy": {
"type": "object",
"additionalProperties": false,
"properties": {
"httpCodes": {
"type": "boolean"
}
}
}
},
"required": [
"namespace"
],
"definitions": {
"uploadConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxBodySize": {
"type": "string"
},
"allowedMimeTypes": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}