feat: render private semantic service endpoints

This commit is contained in:
2026-08-08 17:17:02 +02:00
parent f7b9f3276b
commit bc8afe0205
10 changed files with 372 additions and 19 deletions
+19
View File
@@ -37,10 +37,29 @@ test("loadConfig keeps local development defaults", () => {
maxImportBytes: 10 * 1024 * 1024,
maxImportEntries: 32,
},
internalQdrantUrl: "http://qdrant:6333",
internalEmbeddingUrl: "http://embedding:11434",
internalEmbeddingModel: "qwen3-embedding:0.6b",
internalEmbeddingDimensions: 1024,
});
expect(loadConfig({}).dataRoot).toBeUndefined();
});
test("loadConfig accepts only the allowed internal semantic runtime hosts", () => {
expect(loadConfig({
THT_INTERNAL_QDRANT_URL: "http://localhost:6333",
THT_INTERNAL_EMBEDDING_URL: "http://127.0.0.1:11434",
})).toMatchObject({
internalQdrantUrl: "http://localhost:6333",
internalEmbeddingUrl: "http://127.0.0.1:11434",
});
expect(() => loadConfig({ THT_INTERNAL_QDRANT_URL: "http://qdrant.internal:6333" }))
.toThrow(/internal.*qdrant|host validation|invalid/i);
expect(() => loadConfig({ THT_INTERNAL_EMBEDDING_URL: "http://example.com:11434" }))
.toThrow(/internal.*embedding|host validation|invalid/i);
});
test("loadConfig enables the legacy workspace request only through explicit local mode", () => {
expect(loadConfig({ THT_LEGACY_WORKSPACE_MODE: "local" }).legacyWorkspaceMode).toBe(true);