From 62d8299480779c20bacf1619953ab9dcb368ddb3 Mon Sep 17 00:00:00 2001 From: Lars Date: Tue, 9 Sep 2025 16:15:22 +0200 Subject: [PATCH] schemas/edge.schema.json aktualisiert --- schemas/edge.schema.json | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/schemas/edge.schema.json b/schemas/edge.schema.json index 47f0826..4a87630 100644 --- a/schemas/edge.schema.json +++ b/schemas/edge.schema.json @@ -2,15 +2,30 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "mindnet_edge", "type": "object", - "required": ["src_id", "dst_id", "edge_type", "scope"], + "description": "Edge-Payload (Qdrant). Unterstützt Legacy (edge_type/src_id/dst_id) und neues Schema (kind/source_id/target_id/note_id/status).", + "properties": { - "src_id": {"type": "string"}, - "dst_id": {"type": "string"}, - "edge_type": {"type": "string"}, - "scope": {"type": "string", "enum": ["note","chunk"]}, - "weight": {"type": "number"}, - "meta": {"type": "object"}, - "created_at": {"type": "string"} + "scope": { "type": "string", "enum": ["note","chunk"] }, + + "edge_type": { "type": "string", "description": "Legacy: z. B. references/backlink/belongs_to/prev/next" }, + "src_id": { "type": "string", "description": "Legacy: source_id" }, + "dst_id": { "type": "string", "description": "Legacy: target_id" }, + + "kind": { "type": "string", "description": "Neu: z. B. references/backlink/belongs_to/prev/next" }, + "source_id": { "type": "string" }, + "target_id": { "type": "string" }, + "note_id": { "type": "string", "description": "Owner-Note für diesen Edge (Filter/Purge)" }, + "status": { "type": "string", "description": "optional, z. B. 'unresolved'" }, + + "weight": { "type": "number" }, + "meta": { "type": "object" }, + "created_at":{ "type": "string" } }, + + "anyOf": [ + { "required": ["src_id", "dst_id", "edge_type", "scope"] }, + { "required": ["source_id", "target_id", "kind", "scope"] } + ], + "additionalProperties": true }