add tagging

This commit is contained in:
team 1
2026-02-21 16:23:34 +01:00
parent 5a3852db12
commit cf5b473034
23 changed files with 1984 additions and 85 deletions

View File

@@ -6,14 +6,12 @@ parameters:
# ------------------------------------------------------------
# Root
# ------------------------------------------------------------
mto.root: '%kernel.project_dir%'
mto.kernel.dir: '%mto.root%'
# ------------------------------------------------------------
# Knowledge Root (ZENTRAL)
# ------------------------------------------------------------
mto.knowledge.root: '%mto.root%/var/knowledge'
mto.knowledge.ndjson: '%mto.knowledge.root%/index.ndjson'
@@ -23,13 +21,28 @@ parameters:
mto.runtime.meta: '%mto.knowledge.root%/index_runtime.json'
mto.knowledge.upload: '%mto.knowledge.root%/uploads'
# ------------------------------------------------------------
# Tags (Document Routing)
# ------------------------------------------------------------
mto.knowledge.tags_ndjson: '%mto.knowledge.root%/tags.ndjson'
# Tag vector index outputs
mto.knowledge.vector_tags_index: '%mto.knowledge.root%/vector_tags.index'
mto.knowledge.vector_tags_index_meta: '%mto.knowledge.root%/vector_tags.index.meta.json'
# Tag vector scripts (in src/Vector)
mto.vector.ingest_tags_script: '%mto.root%/src/Vector/vector_ingest_tags.py'
mto.vector.search_tags_script: '%mto.root%/src/Vector/vector_search_tags.py'
# Lock for tag rebuild jobs
mto.tags.rebuild_lock: '%mto.knowledge.root%/locks/tag_rebuild.lock'
# Backward compatibility alias
mto.vector.data.upload.path: '%mto.knowledge.upload%'
# ------------------------------------------------------------
# Index Configuration (Fallback Guardrails)
# ------------------------------------------------------------
mto.index.chunk_size: 800
mto.index.chunk_overlap: 100
mto.index.embedding_model: 'all-MiniLM-L6-v2'
@@ -39,7 +52,6 @@ parameters:
# ------------------------------------------------------------
# Python / Vector Runtime
# ------------------------------------------------------------
mto.vector.python_bin: '/var/www/html/.venv/bin/python3'
mto.vector.ingest_script: '%mto.root%/src/Vector/vector_ingest.py'
mto.vector.search_script: '%mto.root%/src/Vector/vector_search.py'
@@ -158,6 +170,52 @@ services:
$timeoutSeconds: '%mto.vector.timeout%'
$configurationProvider: '@App\Index\IndexConfigurationProvider'
# ------------------------------------------------------------
# Tags Export (Document Routing)
# ------------------------------------------------------------
App\Tag\TagNdjsonExporter:
arguments:
$tagsNdjsonPath: '%mto.knowledge.tags_ndjson%'
# ------------------------------------------------------------
# Tags Vector (Builder + Search) ✅ HIER IST DER FIX
# ------------------------------------------------------------
App\Tag\TagVectorIndexBuilder:
arguments:
$pythonBin: '%mto.vector.python_bin%'
$scriptPath: '%mto.vector.ingest_tags_script%'
$tagsNdjsonPath: '%mto.knowledge.tags_ndjson%'
$vectorTagsIndexPath: '%mto.knowledge.vector_tags_index%'
$embeddingModel: '%mto.index.embedding_model%'
$timeoutSeconds: '%mto.vector.timeout%'
$agentLogger: '@monolog.logger.agent'
App\Tag\TagVectorSearchClient:
arguments:
$pythonBin: '%mto.vector.python_bin%'
$scriptPath: '%mto.vector.search_tags_script%'
$vectorTagsIndexPath: '%mto.knowledge.vector_tags_index%'
$vectorTagsMetaPath: '%mto.knowledge.vector_tags_index_meta%'
$embeddingModel: '%mto.index.embedding_model%'
$agentLogger: '@monolog.logger.agent'
App\Tag\TagRoutingService: ~
# ------------------------------------------------------------
# Tag Rebuild Jobs (8A)
# ------------------------------------------------------------
App\Service\TagRebuildJobService:
arguments:
$projectDir: '%mto.root%'
$agentLogger: '@monolog.logger.agent'
App\Command\TagRebuildRunJobCommand:
arguments:
$lockFilePath: '%mto.tags.rebuild_lock%'
# ------------------------------------------------------------
# Admin Utilities
# ------------------------------------------------------------