Construction Kit Library Management
OctoMesh provides built-in tools for managing Construction Kit (CK) model libraries across tenants. This includes browsing available libraries from catalogs, checking compatibility, resolving dependencies, and importing libraries with full dependency resolution.
Catalog Sources
CK model libraries are distributed through catalogs. OctoMesh supports multiple catalog sources:
| Catalog | Description | Default |
|---|---|---|
| EmbeddedResource | System models embedded in the service binaries | Always active |
| PublicGitHub | Public GitHub repository with released CK libraries | Enabled |
| PrivateGitHub | Private GitHub repository for development/pre-release libraries | Disabled in production |
| LocalFileSystem | Local file system for development use | Disabled in production |
Catalog sources can be configured per environment via Helm values or environment variables.
System-Managed Models
Models whose name is System or starts with System. (e.g., System.Identity, System.Communication) are managed by the OctoMesh services themselves. These models:
- Are imported automatically during tenant creation and service startup
- Cannot be updated by users through the Library Management UI or CLI
- Are shown with a "Service-Managed" badge in the Library Overview
- Are excluded from the "Fix All" batch operation
Version Compatibility
When evaluating whether a CK library can be imported into a tenant, OctoMesh checks transitive compatibility against installed system model versions:
- The check walks the full dependency chain recursively
- For each dependency on a system-managed model, the major version must match the installed version
- Example: If
System-2.0.7is installed, a library requiringSystem-3.0.0(different major) is incompatible - A library requiring
System-2.0.3is compatible (same major, installed version is higher)
Incompatible libraries are flagged in both the UI and CLI and cannot be imported.
Dependency Resolution
When importing a CK library, OctoMesh automatically resolves its full dependency tree:
- Fetch the target model from the catalog
- Walk its
Dependencieslist (exact version references) - For each dependency, recursively resolve sub-dependencies
- Deduplicate by model name, keeping the highest required version
- Exclude system-managed models (they are managed by services)
- Order topologically (dependencies before dependents)
The result is a flat, ordered list of models to import. Each model is imported sequentially via Hangfire background jobs, ensuring that dependencies are available before dependents are imported.
Import Pipeline
The import flow uses the existing asynchronous job pipeline:
Authorization
CK library management operations are protected by the Data Model Management authorization policy:
| Operation | Required Scope |
|---|---|
| Browse catalogs (list, search) | octo_api.read_only or octo_api |
| View library status | octo_api.read_only or octo_api |
| Resolve dependencies | octo_api.read_only or octo_api |
| Import models / Refresh caches | octo_api.data_model_management or octo_api |
The DataModelManagement role is included in the default TenantOwners group.
REST API Endpoints
System Scope
| Method | Endpoint | Description |
|---|---|---|
GET | system/v1/ckmodelcatalog | List all models from all catalogs |
GET | system/v1/ckmodelcatalog/search?q={term} | Search models |
GET | system/v1/ckmodelcatalog/catalogs | List catalog sources |
GET | system/v1/ckmodelcatalog/{catalogName} | List models from specific catalog |
POST | system/v1/ckmodelcatalog/refresh | Refresh all catalog caches |
Tenant Scope
| Method | Endpoint | Description |
|---|---|---|
GET | {tenantId}/v1/models/LibraryStatus | Merged view: installed + catalog |
POST | {tenantId}/v1/models/ResolveDependenciesBatch | Resolve dependency trees |
POST | {tenantId}/v1/models/ImportFromCatalogBatch | Batch import with jobs |
POST | {tenantId}/v1/models/CheckUpgrade | Pre-flight migration check |
POST | {tenantId}/v1/models/ImportFromCatalog | Single model import |