mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-07 07:55:13 +02:00
A clean `ktx setup` was failing verification because the managed local-embeddings daemon URL was passed library-side through `process.env[KTX_MANAGED_SENTENCE_TRANSFORMERS_BASE_URL]`, and the setup flow never wrote that variable. With no resolved URL the embedding provider was null, the deep scan emitted `scan_enrichment_backend_not_configured`, descriptions + embeddings stayed `skipped`, and the agent-readiness check exited 1. Replace the env-var indirection with CLI-side substitution at the project-load boundary. New `loadKtxCliProject` wraps `loadKtxProject`, ensures the managed daemon when `managed:local-embeddings` is present in `config.ingest.embeddings` or `config.scan.enrichment.embeddings`, and substitutes the resolved baseUrl into the in-memory config. Runtime entry points (scan, ingest, public-ingest, admin-reindex) use the new loader; setup-time persistence paths keep raw `loadKtxProject` so the on-disk `ktx.yaml` keeps the portable sentinel. Cleanup follows from the new design: drop `MANAGED_SENTENCE_TRANSFORMERS_BASE_URL_ENV`, remove the env-var lookup branch in `resolveSentenceTransformersBaseUrl`, drop the `env` field from `ManagedLocalEmbeddingsDaemon`, and collapse the manual daemon-ensure dance in `admin-reindex.ts`. |
||
|---|---|---|
| .. | ||
| assets/demo/orbit | ||
| scripts | ||
| src | ||
| package.json | ||
| tsconfig.json | ||
| vitest.config.ts | ||