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.
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.
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).
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.
- 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.
- 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.
The server config object definition has been added to the global declaration file to provide clear documentation on the structure of the server configuration object. This will help developers understand the expected format of the server configuration object and its properties.
The ConfigPackage interface is added to provide utility functions for configuration management. It includes methods to get the current namespace string and the current project object, enhancing the flexibility and ease of managing configurations within the application.
The copy method is added to the global declaration in order to provide a convenient way to copy files or directories. This method takes the source path and destination path as parameters and performs the copy operation. This addition enhances the functionality of the global declaration and allows for easier file management within the application.
This commit adds three new methods to the global declaration file: api(), project(), and collection(). These methods return an object with any key-value pairs, allowing for more flexibility in the codebase.
The RequestOptions interface now includes a timeout property, which specifies the number of seconds before the request times out. This improves the usability of the interface by allowing developers to specify a timeout for requests.