feat: unify installation model catalog
This commit is contained in:
@@ -12,8 +12,8 @@ import {
|
||||
import { supportsSessionRuntime } from "../src/workspaces/bindings.js";
|
||||
import { parseWorkspaceYaml } from "../src/workspaces/schema.js";
|
||||
|
||||
const workspaceV3 = parseWorkspaceYaml(`workspace:
|
||||
schema_version: 3
|
||||
const workspaceV4 = parseWorkspaceYaml(`workspace:
|
||||
schema_version: 4
|
||||
id: psd-clinical
|
||||
name: Policlinico San Donato
|
||||
language: it
|
||||
@@ -22,19 +22,6 @@ dwh:
|
||||
database: postgres
|
||||
schema: datawarehouse
|
||||
supported_transports: [postgres_direct, rest_api, ssh_tunnel]
|
||||
semantic_index:
|
||||
vector_store:
|
||||
engine: qdrant
|
||||
collection: psd-clinical
|
||||
dimensions: 1024
|
||||
distance: cosine
|
||||
embedding:
|
||||
provider: ollama_internal
|
||||
model: qwen3-embedding:0.6b
|
||||
dimensions: 1024
|
||||
llm_policy:
|
||||
default: zai/glm-5.2
|
||||
allowed: [zai/glm-5.2]
|
||||
`);
|
||||
const paths: RuntimePaths = {
|
||||
sessions: "/data/workspaces/psd-clinical/sessions",
|
||||
@@ -45,6 +32,7 @@ const paths: RuntimePaths = {
|
||||
const semanticRuntime: SemanticRuntimeConfig = {
|
||||
internalQdrantUrl: "http://qdrant:6333",
|
||||
internalEmbeddingUrl: "http://embedding:11434",
|
||||
internalEmbeddingId: "ollama/qwen3-embedding:0.6b",
|
||||
internalEmbeddingModel: "qwen3-embedding:0.6b",
|
||||
internalEmbeddingDimensions: 1024,
|
||||
};
|
||||
@@ -63,8 +51,8 @@ const directBindings: RuntimeBindings = {
|
||||
evidence: { missing: [], values: {} },
|
||||
};
|
||||
|
||||
test("renders only the schema-v3 internal Qdrant and Ollama runtime shape", () => {
|
||||
const rendered = parse(renderRuntimeConfig(workspaceV3, directBindings, paths, {
|
||||
test("derives the internal Qdrant and Ollama runtime shape from workspace v4 plus installation config", () => {
|
||||
const rendered = parse(renderRuntimeConfig(workspaceV4, directBindings, paths, {
|
||||
workspaceId: "psd-clinical", workspaceRevision: "a".repeat(40),
|
||||
}, {}, semanticRuntime));
|
||||
|
||||
@@ -95,8 +83,8 @@ test("renders only the schema-v3 internal Qdrant and Ollama runtime shape", () =
|
||||
expect(rendered).not.toHaveProperty("vector_rest");
|
||||
});
|
||||
|
||||
test("renders schema-v3 DWH REST without exposing secret contents", () => {
|
||||
const rendered = parse(renderRuntimeConfig(workspaceV3, {
|
||||
test("renders workspace-v4 DWH REST without exposing secret contents", () => {
|
||||
const rendered = parse(renderRuntimeConfig(workspaceV4, {
|
||||
dwh: {
|
||||
transport: "rest_api", missing: [], values: {
|
||||
THT_WS_PSD_CLINICAL_DWH_BASE_URL: "https://dwh.example.test",
|
||||
@@ -152,7 +140,7 @@ function evidenceWorkspace(
|
||||
}
|
||||
|
||||
const canonicalEvidenceWorkspace = `workspace:
|
||||
schema_version: 3
|
||||
schema_version: 4
|
||||
id: psd-clinical
|
||||
name: Runtime Evidence
|
||||
language: en
|
||||
@@ -161,18 +149,6 @@ dwh:
|
||||
database: analytics
|
||||
schema: mart
|
||||
supported_transports: [postgres_direct]
|
||||
semantic_index:
|
||||
vector_store:
|
||||
engine: qdrant
|
||||
collection: psd-clinical
|
||||
dimensions: 1024
|
||||
distance: cosine
|
||||
embedding:
|
||||
provider: ollama_internal
|
||||
model: qwen3-embedding:0.6b
|
||||
dimensions: 1024
|
||||
llm_policy:
|
||||
allowed: [zai/glm-5.2]
|
||||
`;
|
||||
|
||||
const evidenceRevision = "1".repeat(40);
|
||||
@@ -374,7 +350,7 @@ test("renders static S3 Evidence with endpoint policy, limits, and file paths bu
|
||||
|
||||
test("omits Evidence configuration and policy when the descriptor has no Evidence", () => {
|
||||
const rendered = parse(renderRuntimeConfig(
|
||||
workspaceV3,
|
||||
workspaceV4,
|
||||
directBindings,
|
||||
paths,
|
||||
evidenceContext,
|
||||
|
||||
Reference in New Issue
Block a user