Commit Graph
140 Commits
Author SHA1 Message Date
apairon 59841adf9c ✨ types(auth): E-Mail-Rückfallebene und gemerkte Geräte
- `AdminMfaChallenge` trägt `mfaEnrollmentRecommended` und `rememberDeviceDays`.
- `AdminMfaStatus.emailFallback` markiert die erzwungene Rückfallebene.
- `AdminTrustedDevice`/`AdminTrustedDevices` für die Geräteliste.
- `AdminAuthMethod` kennt `trusted_device` und `impersonation`; `AdminMfaMethod`
  schließt beide aus.
2026-11-06 21:27:31 +00:00
apairon 2187ef3d1c ✨ types(auth): Admin-Übersicht und Nutzer-MFA-Status
`AdminMfaOverview` (Quote: Nutzer, mit/ohne Faktor, erzwungen, Policy) und
`AdminUserMfaStatus` (Faktorstatus eines Kontos für die Admin-Sicht).
2026-11-06 20:34:56 +00:00
apairon 5bf93ef035 ✨ types(auth): Passkey-Optionen für den passwortlosen Login
`AdminPasskeyOptions` mit `publicKey` (Request-Options) und dem kurzlebigen
`challengeToken`, der die Assertion an die Server-Challenge bindet.
2026-11-06 20:19:08 +00:00
apairon ba549a016b ✨ types(auth): E-Mail-Faktor und maskierter Hinweis
- `AdminAuthMethod`/`AdminMfaMethod` enthalten jetzt `email`.
- `AdminMfaStatus` um `emailEnabled`, `email` (maskiert), `emailVerified`
  erweitert.
- `AdminMfaChallenge.emailHint` für die maskierte Adresse, wenn der Faktor
  angeboten wird.
- Type-Test deckt die neue Methode und den Status ab.
2026-11-06 19:33:11 +00:00
apairon 2546d05b25 ✨ types(auth): Admin-Login-, MFA- und WebAuthn-Verträge
Eine Quelle für Server und Admin-UI:
- `AdminLoginResponse`: Union aus `AdminMfaChallenge` (`mfaRequired: true`)
  und `AdminLoginSession` (`token`, `user`, `amr`, `mfaEnrollmentRecommended`).
  Die Diskriminante ist `mfaRequired`, damit Clients sauber narrowen.
- `AdminAuthMethod` (`pwd|totp|recovery|webauthn`) vs. `AdminMfaMethod`
  (ohne `pwd`) — Go schreibt `pwd` immer in `amr`, bietet es aber nie als
  Faktor an.
- `AdminMfaStatus`, `AdminMfaTotpEnrollment`, `AdminMfaConfirmResult`,
  `AdminStepUpResult`.
- WebAuthn: `AdminWebAuthnCreationOptions`,
  `AdminWebAuthnRequestOptions`, `AdminWebAuthnCredentialJSON`,
  `AdminWebAuthnCredentialView`, `AdminAuthenticatorTransport`.

Type-Tests in `types-test/admin-auth.ts`: `Expect<Equal<…>>`-Assertions und
`@ts-expect-error` für die nicht möglichen Felder der Challenge. `npm test`
führt jetzt Schemas **und** `tsc` aus (TypeScript als devDependency).
2026-11-06 19:09:14 +00:00
apairon 24c2d34b3a ✨ types(hooks): webauthn-Paket (Passkeys/WebAuthn Level 2)
- `WebAuthnPackage` mit `verifyRegistration` und `verifyAssertion`, verdrahtet
  in `HookContext`.
- `WebAuthnRegistrationOptions`/`WebAuthnAssertionOptions`,
  `WebAuthnCredentialJSON` (Binärfelder base64url oder Byte-Array).
- Diskriminierte Ergebnistypen: `verified: true` mit Credential-Daten bzw.
  `verified: false` mit `WebAuthnErrorCode` und optionalem Detail.
- `attestationTrusted` als explizite Warnung: heute immer `false`, die AAGUID
  ist damit nicht authentisiert.
2026-11-06 14:58:24 +00:00
apairon b80af7ae58 ✨ types(hooks): AES-256-GCM und HKDF im crypto-Paket (#65)
continuous-integration/drone/push Build is passing
- SealedValue { iv, ciphertext, tag } (base64)
- encrypt/decrypt mit key, aad und encoding
- deriveKey (HKDF-SHA256) mit info, length und encoding

Refs #65
2026-11-05 10:20:25 +00:00
apairon 8f17bb7ad4 ✨ types(config): Projekt-Secrets (#66)
ConfigPackage.secret(name): string | null und secretNames(): string[]
ergänzt; project.schema.json erlaubt den secrets-Block (string-Map) mit
Hinweis, dass die Werte nie in API-Antworten oder config.project() landen.

Refs cms/tibi-server#66
2026-11-04 20:26:39 +00:00
apairon 081a87c492 ✨ types(hooks): totp-Paket (#63)
TotpPackage mit generate/verify/uri, TotpOptions (digits, period,
algorithm, t) und window beim Verify; totp im HookContext registriert.
Kommentare nennen Defaults, die State-Losigkeit und dass t nicht aus
Nutzereingaben kommen darf.

Refs cms/tibi-server#63
2026-11-04 19:42:25 +00:00
apairon b5a6c3657d ✨ types(hooks): base64-Varianten und padding (#62)
BaseVariant, Base64Options, Base64DecodeOptions; encode/decode typisieren
variant (base64|base64url|base32) und padding. Overloads erhalten den
Rückgabetyp abhängig von returnBytes.

Refs cms/tibi-server#62
2026-11-04 14:50:37 +00:00
apairon ce0ac300f5 ✨ types(hooks): crypto.hmac und timingSafeEqual (#60)
hmac mit sha1|sha256|sha512, Schlüssel/Daten als String oder Bytes und
encoding-abhängigem Rückgabetyp; timingSafeEqual als boolean. Kommentare
nennen die Begründung für SHA-1 (TOTP) und die Length-Grenze.

Refs cms/tibi-server#60
2026-11-04 14:20:15 +00:00
apairon cbec4753a1 ✨ types(audit): excludeFields und AuditEntry (#67)
collection.audit.excludeFields (dot notation) hält Werte aus dem Audit-Verlauf
heraus; AuditLog.redactedFields nennt die betroffenen Pfade. AuditEntry ist
jetzt als Typ deklariert, damit Clients das Feld sehen.

Refs cms/tibi-server#67
2026-11-04 13:33:58 +00:00
apairon 779dd574fc ✨ types(hooks): crypto.randomBytes und randomToken (#61)
randomBytes gibt je nach encoding Int8Array oder string zurück,
randomToken immer string (Default ungepolstertes base64url). Der neue Typ
ByteEncoding (hex|base64|base64url|bytes) wird von den kommenden
base64-/crypto-Erweiterungen mitgenutzt.

Refs cms/tibi-server#61
2026-11-04 13:22:30 +00:00
apairon eb681a73da Schema: fit-upscale im Bildfilter
continuous-integration/drone/push Build is passing
2026-10-29 14:56:26 +00:00
apairon f404b63673 Schema: dropShadow.reserve (shadow|padding)
continuous-integration/drone/push Build is passing
2026-10-29 14:27:29 +00:00
apairon 38f00fdeff Schema: Asset-maxPixels auf 200 MP anheben
continuous-integration/drone/push Build is passing
2026-10-29 13:49:52 +00:00
apairon 5458214ad9 Schema: cache.image im Projekt und optionaler Asset-cachePath
continuous-integration/drone/push Build is passing
- 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
apairon 8ca80136f4 Schema: outputType um bmp/tiff/gif ergaenzt
continuous-integration/drone/push Build is passing
Server akzeptiert jetzt jpeg, png, webp, bmp, tiff, gif; GIF wird wieder
gelesen (erstes Frame).
2026-10-27 20:50:18 +00:00
apairon dc7afc272b Schema: imageCachePath pro Sammlung
Konfigurierbarer Cache-Root fuer gefilterte Bildvarianten (relativ zum
Konfig-Verzeichnis), Default <configDir>/cache/images.
2026-10-27 18:18:09 +00:00
apairon 913d5f4cb6 Schema: Bildoperationen (removeBackground/dropShadow/flatten) und Asset-Bildmodus
- image-filter.schema.json: removeBackground (color/tolerance/fromEdges/edgeBlur/
  referenceWidth), dropShadow (color/opacity/blur/offsets/padding/referenceWidth/
  canvas/background), flatten; Tippfehler mitchellNetravili -> mitchellNetravali
- asset.schema.json: optionaler imageProcessing-Block (access/cachePath/
  allowOriginal/defaultFilter/allowedInputTypes/limits/imageFilter)
- index.d.ts: passende Interfaces inkl. AssetConfig
- Beispiel: examples/server/asset-image-processing.yml, demo-api imageFilter.shadow
- validate-schemas.mjs: examples/server-Pattern je Schema
2026-10-27 18:04:55 +00:00
apairon f26f8c7802 feat(schema): add tool schema, demo and admin tool types
continuous-integration/drone/push Build is passing
2026-10-20 22:56:04 +00:00
apairon 439c8773e6 feat(schema): add custom tools config and runtime types
continuous-integration/drone/push Build is passing
2026-10-20 20:45:19 +00:00
apairon 21472bdc72 Schema: ngram.sizes auf 2–10 begrenzen, combinedCache ergänzen
continuous-integration/drone/push Build is passing
Die Gesamtabnahme fand zwei Lücken im Config-Vertrag:

- ngram.sizes erlaubte minimum 1 und hatte kein maximum; der Server akzeptiert
  nur 2–10 (collection_setup.go) — das Schema ließ also Configs durch, die beim
  Projektload scheitern.
- combinedCache fehlte komplett, obwohl Server (models.CombinedCacheConfig) und
  Doku den Block als Projekt-YAML führen; additionalProperties:false lehnte
  gültige, dokumentierte Configs ab.

Ergänzt in collection.schema.json und index.d.ts (CombinedCacheConfig mit
enabled/ttl/maxEntries). Die Demo-Collection ngram-stopwords.yml enthält jetzt
eine Combined-Config mit combinedCache, sodass validate:schemas den Block
abdeckt. Gegenprobe per AJV: sizes [1] und [11] werden abgelehnt, [2,3] und
combinedCache akzeptiert.
2026-10-19 22:34:56 +00:00
apairon 9e12a8e9c3 Schema: ngram.stopwords, queryFilter und inMemory ergänzen
continuous-integration/drone/push Build is passing
Der Config-Vertrag kannte nur sizes und normalize. Damit lehnte
`validate:schemas` jedes Projekt ab, das die bereits im Server vorhandenen
ngram-Optionen nutzt (additionalProperties: false), und die generierte
Schema-Referenz konnte sie nie zeigen.

Ergänzt in collection.schema.json und index.d.ts:

- stopwords: { presets?: string[], words?: string[] }
- queryFilter: { minMatchRatio?: 0..1 }
- inMemory: { enabled?, maxDocs?, maxMemoryMB? }

plus demo-api/collections/ngram-stopwords.yml als Validierungs-Fixture; ohne
Schema-Erweiterung schlägt validate:schemas dort mit "must NOT have additional
properties" fehl.
2026-10-19 20:48:10 +00:00
apairon 3bf8055539 docs(example): Mehrfach-Duration (1m30s) als echter Wert im embedding-Beispiel
continuous-integration/drone/push Build is passing
Damit übt npm test den (...)+-Zweig des duration-Musters aus statt ihn nur zu
kommentieren (Review-Nachbefund, low).
2026-10-17 14:08:39 +00:00
apairon 1233bd393d fix(schema): latencyWindow ist ein String, duration-Muster folgt der Go-Grammatik
Review-Nachbefunde am neuen embedding-Schema:
- latencyWindow war als integer/number deklariert, ist in Go aber ein String
  (ConfigEmbeddingGroup.OnSingleQuery.LatencyWindow, per Atoi geprüft) — Schema
  und index.d.ts auf digits-String (>0) umgestellt.
- duration-Pattern erlaubte nur eine Einheit und akzeptierte Unsinn wie "1ss":
  jetzt (Zahl+Einheit)+, damit auch 1m30s/1h1m/1.5h gelten und 1ss/8/abc fallen.
- Beispiel examples/server/embedding.yml übt latencyWindow und Mehrfach-Einheiten
  aus (npm test: 5 YAML gegen 17 Schemas, tsc --noEmit --strict grün).
2026-10-17 14:07:30 +00:00
apairon 5a45c4dd3f feat(types): Embedding-Abschnitt der Server-Config (Provider, Failover-Gruppen, goldener Pfad) + Status-Payloads
index.d.ts: EmbeddingProviderConfig/EmbeddingGroupConfig (onSingleQuery, onBulkWrite,
health), EmbeddingConfig für config.server().embedding (Roh-JSON von config.Server.
Embedding) sowie die Status-Payloads von GET …/admin/embedding/status (Projekt- und
Server-Scope, Zustände live|degraded|quarantined|offline, Breaker closed|open|half-open).
VectorConfig.provider dokumentiert jetzt, dass dort auch ein Gruppenname stehen darf.

schemas/config/embedding.schema.json: validierbares Schema des Server-Abschnitts
(Enums für Policies/Distributionen, Go-Duration-Muster, Pflichtfelder, keine
erfundenen Properties); Beispiel examples/server/embedding.yml, per
scripts/validate-schemas.mjs mitgeprüft (npm test: 5 YAML gegen 17 Schemas).

Quelle der Wahrheit: internal/config/server.go + internal/config/embedding_group.go
(tibi-server). Typecheck: tsc --noEmit --strict über index.d.ts grün.
2026-10-17 14:00:53 +00:00
LeanAgent 4c55f82446 feat(schema): meta.query in Collection-Meta + designGuide-Einrückung
continuous-integration/drone/push Build is passing
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
LeanAgent ca684fb4b3 feat(schema): meta.agent in Collection- und Projekt-Schema
continuous-integration/drone/push Build is passing
Die Starter-Collections dokumentieren Editor-Workflows in meta.agent
(tibi-server spielt das ueber MCP/REST _meta aus), die Schemas kannten
den Schlüssel aber nicht – YAML-LS meldete 'Property agent is not
allowed'. agent ist bewusst freiform (additionalProperties: true),
damit die Doku nicht wieder hinterherhinkt.
2026-10-12 16:10:18 +00:00
apaironandClaude Opus 4.8 1934cf9b89 feat(schema): neues Section-Format — position: "section:<group>" + meta.sections
Feld-Meta position erlaubt jetzt section und section:<group> neben main/sidebar.
Collection-Meta bekommt sections: [{ group, label, collapsible, collapsed }] als
Pendant zu sidebar.

Ohne das Pattern-Update schlaegt die YAML-Validierung im Editor fehl und
position: "section:x" wird als ungueltig markiert.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-10-01 00:17:33 +00:00
apairon 7870253b73 merge: dynamic pagebuilder schemas (templateProps, schemaRef, designGuide, blockStudio)
# Conflicts:
#	schemas/config/collection-meta.schema.json
2026-09-30 20:37:08 +00:00
apairon 6720efbee2 feat(schema): collection meta exports (custom scripted exports)
Wiederhergestellt aus dem Arbeitsstand vor dem Dynamic-Blocks-Branch.
2026-09-30 20:36:46 +00:00
apairon 0fa213f3b6 feat(schema): templateProps + schemaRef + designGuide + blockStudio
Vorbereitung fuer dynamische Pagebuilder-Bloecke (nova feature/dynamic-pagebuilder-blocks):
- field-meta: Widget templateProps, meta.schemaRef {ref?, field required}
  (statische subFields / Sibling-Schema / FK-Schema fuer type:any-Felder)
- collection-meta: meta.designGuide (i18nText) als KI-Hinweis pro Collection
- collection-meta: viewHint.blockStudio {previewField, lint, renderer.file}
  (Spezial-View wie navigation/media, inkl. oneOf-Zweig)
2026-09-30 20:36:22 +00:00
apairon 19601b1f0f fix(schema): allow dashes in field names, i18n sections, number widget 2026-09-21 19:38:44 +00:00
apairon 1de0d67992 fix(schema): add cors to collection and action schemas 2026-09-21 16:47:03 +00:00
apairon 5e04a1ca3a fix(schema): allow !include string for choices (tibi-server YAML include)
choices previously only array|object, now also string to allow
choices: !include ../../choices/icon-choices.yml
which tibi-server resolves via yamlResolveIncludes before validation
2026-09-03 12:29:47 +00:00
apairon 3abdc52fef fix(schema): add audit to action schema (enabled + actions[post,get]) 2026-09-03 10:59:06 +00:00
apairon c1cdb6bdcc ✨ feat(schema): add project-level audit (only enabled) 2026-09-02 16:45:36 +00:00
apairon 7775164e6a fix(schema): allow openapi in project meta
- project.meta now accepts openapi: { $ref: openapi.schema.json }
- needed for renz-einfo legacy config (servers/info/tags) to validate
2026-08-25 12:59:26 +00:00
apairon 39aac68595 ✨ feat: add new JSON schemas for Tibi configuration including fields, hooks, jobs, and permissions
continuous-integration/drone/push Build is passing
- Introduced `field-list.schema.json`, `field-meta.schema.json`, and `field.schema.json` for field configurations.
- Added `hooks.schema.json` for defining hooks in the Tibi project.
- Created `image-filter.schema.json` for image processing configurations.
- Implemented `job.schema.json` for job scheduling configurations.
- Added `openapi.schema.json` for OpenAPI metadata generation.
- Introduced `permissions.schema.json` for managing permissions in the project.
- Created `project.schema.json` for overall project configuration.
- Added `projections.schema.json` for defining projections in the project.
- Implemented a validation script `validate-schemas.mjs` to ensure schema compliance.
2026-07-01 14:17:06 +00:00
apairon ca1b80acca Merge remote-tracking branch 'origin/master'
continuous-integration/drone/push Build is passing
# Conflicts:
#	schemas/config/project.schema.json
2026-07-01 14:13:53 +00:00
apairon 40b441df04 ✨ feat: add new JSON schemas for Tibi configuration including fields, hooks, jobs, and permissions
- Introduced `field-list.schema.json`, `field-meta.schema.json`, and `field.schema.json` for field configurations.
- Added `hooks.schema.json` for defining hooks in the Tibi project.
- Created `image-filter.schema.json` for image processing configurations.
- Implemented `job.schema.json` for job scheduling configurations.
- Added `openapi.schema.json` for OpenAPI metadata generation.
- Introduced `permissions.schema.json` for managing permissions in the project.
- Created `project.schema.json` for overall project configuration.
- Added `projections.schema.json` for defining projections in the project.
- Implemented a validation script `validate-schemas.mjs` to ensure schema compliance.
2026-07-01 09:23:43 +00:00
apairon 0804c3c3c4 ✨ feat: add new JSON schemas for Tibi configuration including fields, hooks, jobs, and permissions
continuous-integration/drone/push Build is passing
- Introduced `field-list.schema.json`, `field-meta.schema.json`, and `field.schema.json` for field configurations.
- Added `hooks.schema.json` for defining hooks in the Tibi project.
- Created `image-filter.schema.json` for image processing configurations.
- Implemented `job.schema.json` for job scheduling configurations.
- Added `openapi.schema.json` for OpenAPI metadata generation.
- Introduced `permissions.schema.json` for managing permissions in the project.
- Created `project.schema.json` for overall project configuration.
- Added `projections.schema.json` for defining projections in the project.
- Implemented a validation script `validate-schemas.mjs` to ensure schema compliance.
2026-07-01 09:21:26 +00:00
apairon 4b588d1269 feat(types): add action api types to ApiInfo 2026-04-16 15:59:32 +00:00
apairon 025a7ccca4 ✨ feat(schema): enhance API configuration schemas with new properties and validations
continuous-integration/drone/push Build is passing
- Updated collection.json to include upload defaults, audit logging, query limits, and more.
- Enhanced collectionNavigation.json with viewHint configurations.
- Added project-wide upload defaults and hook configurations in config.json.
- Expanded field.json to support new field types, validations, and properties.
- Improved fieldMeta.json with additional widget configurations and properties.
- Updated hooks.json to include new bulk operation hooks and audit logging.
- Enhanced imageFilter.json with additional image processing options.
- Added timeout properties to job.json for better execution control.
- Refined permissions.json to allow more granular control over HTTP method permissions and added filter and field visibility options.
2026-03-30 12:28:50 +00:00
apairon afa7c9b238 ✨ feat(schemas): format JSON schema properties for better readability
continuous-integration/drone/push Build is passing
2026-02-11 13:34:18 +00:00
apairon c2a54a4474 ✨ feat(index.d.ts): update CollectionDocument to use generic types for insertTime and updateTime
continuous-integration/drone/push Build is passing
2026-01-21 14:36:06 +00:00
apairon 1bb16ad994 ✨ feat(index.d.ts): add base64 property to global context for Base64Package interface 2026-01-21 13:57:14 +00:00
apairon 8696b25e9b ✨ feat(index.d.ts): add Base64Package interface for encoding and decoding data
continuous-integration/drone/push Build is passing
2025-08-28 14:31:06 +00:00
apairon 102a93f20c ✨ feat(index.d.ts): add includeHeader option to create method
continuous-integration/drone/push Build is passing
2025-08-27 16:51:08 +00:00