harden struct
This commit is contained in:
@@ -3,23 +3,45 @@
|
||||
# ------------------------------------------------------------
|
||||
|
||||
parameters:
|
||||
mto.kernel.dir: '%kernel.project_dir%'
|
||||
# ------------------------------------------------------------
|
||||
# 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'
|
||||
mto.knowledge.index_meta: '%mto.knowledge.root%/index_meta.json'
|
||||
mto.knowledge.vector_index: '%mto.knowledge.root%/vector.index'
|
||||
mto.knowledge.vector_index_meta: '%mto.knowledge.root%/vector.index.meta.json'
|
||||
mto.knowledge.upload: '%mto.knowledge.root%/uploads'
|
||||
# Backward compatibility alias
|
||||
mto.vector.data.upload.path: '%mto.knowledge.upload%'
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Index Configuration (Guardrails)
|
||||
# ------------------------------------------------------------
|
||||
|
||||
mto.index.chunk_size: 800
|
||||
mto.index.chunk_overlap: 100
|
||||
mto.index.embedding_model: 'all-MiniLM-L6-v2' #nomic-embed-text
|
||||
mto.index.embedding_model: 'all-MiniLM-L6-v2'
|
||||
mto.index.embedding_dimension: 768
|
||||
mto.index.scoring_version: 1
|
||||
|
||||
mto.vector.python_bin: '/var/www/html/.venv/bin/python3'
|
||||
mto.vector.ingest_script: '/src/Vector/vector_ingest.py'
|
||||
mto.vector.search_script: '%kernel.project_dir%/src/Vector/vector_search.py'
|
||||
# ------------------------------------------------------------
|
||||
# Python / Vector Runtime
|
||||
# ------------------------------------------------------------
|
||||
|
||||
mto.vector.data.path: '%kernel.project_dir%/var/knowledge'
|
||||
mto.vector.data.upload.path: '%mto.vector.data.path%/uploads'
|
||||
mto.vector.data.ndjson.path: '%mto.vector.data.path%/index.ndjson'
|
||||
mto.vector.data.vector_index.path: '%mto.vector.data.path%/vector.index'
|
||||
mto.vector.data.vector_index_meta_json.path: '%mto.vector.data.path%/vector.index.meta.json'
|
||||
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'
|
||||
|
||||
mto.vector.timeout: 600
|
||||
|
||||
@@ -29,20 +51,13 @@ parameters:
|
||||
|
||||
services:
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Default service configuration
|
||||
# ------------------------------------------------------------
|
||||
_defaults:
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
|
||||
bind:
|
||||
Psr\Log\LoggerInterface $agentLogger: '@monolog.logger.agent'
|
||||
string $projectDir: '%kernel.project_dir%'
|
||||
string $projectDir: '%mto.root%'
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Automatically register all services in src/
|
||||
# ------------------------------------------------------------
|
||||
App\:
|
||||
resource: '../src/'
|
||||
exclude:
|
||||
@@ -57,6 +72,7 @@ services:
|
||||
# ------------------------------------------------------------
|
||||
# AI Agent – Infrastructure
|
||||
# ------------------------------------------------------------
|
||||
|
||||
App\Infrastructure\OllamaClient:
|
||||
arguments:
|
||||
$apiUrl: '%env(AI_LLM_API_URL)%'
|
||||
@@ -66,10 +82,11 @@ services:
|
||||
# ------------------------------------------------------------
|
||||
# AI Agent – Context & Runner
|
||||
# ------------------------------------------------------------
|
||||
|
||||
App\Context\ContextService:
|
||||
arguments:
|
||||
$historyDir: '%env(AI_HISTORY_DIR)%'
|
||||
$projectDir: '%kernel.project_dir%'
|
||||
$projectDir: '%mto.root%'
|
||||
|
||||
App\Agent\AgentRunner:
|
||||
arguments:
|
||||
@@ -78,7 +95,7 @@ services:
|
||||
$logContext: '%env(bool:AI_LOG_CONTEXT)%'
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# NDJSON Retrieval Stack (FINAL ARCHITECTURE)
|
||||
# NDJSON Retrieval Stack
|
||||
# ------------------------------------------------------------
|
||||
|
||||
App\Knowledge\Retrieval\NdjsonChunkLookup: ~
|
||||
@@ -100,22 +117,34 @@ services:
|
||||
alias: App\Knowledge\Retrieval\CachedRetriever
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Vector Search (FAISS NDJSON-based)
|
||||
# Vector Search (noch unverändert – Umbau kommt in Schritt 2)
|
||||
# ------------------------------------------------------------
|
||||
App\Index\IndexMetaManager:
|
||||
arguments:
|
||||
$metaPath: '%mto.knowledge.index_meta%'
|
||||
$config: '@App\Index\IndexConfiguration'
|
||||
|
||||
App\Vector\VectorSearchClient:
|
||||
arguments:
|
||||
$binPythonDir: '%mto.vector.python_bin%'
|
||||
$vectorSearchPyPath: '%mto.vector.search_script%'
|
||||
$pythonBin: '%mto.vector.python_bin%'
|
||||
$scriptPath: '%mto.vector.search_script%'
|
||||
$vectorIndexPath: '%mto.knowledge.vector_index%'
|
||||
$vectorMetaPath: '%mto.knowledge.vector_index_meta%'
|
||||
$indexMetaPath: '%mto.knowledge.index_meta%'
|
||||
$agentLogger: '@monolog.logger.agent'
|
||||
|
||||
App\Vector\VectorIndexBuilder:
|
||||
arguments:
|
||||
$pythonBin: '%mto.vector.python_bin%'
|
||||
$relativeScriptPath: '%mto.vector.ingest_script%'
|
||||
$scriptPath: '%mto.vector.ingest_script%'
|
||||
$indexNdjsonPath: '%mto.knowledge.ndjson%'
|
||||
$indexMetaPath: '%mto.knowledge.index_meta%'
|
||||
$vectorIndexPath: '%mto.knowledge.vector_index%'
|
||||
$timeoutSeconds: '%mto.vector.timeout%'
|
||||
$indexConfiguration: '@App\Index\IndexConfiguration'
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Index Configuration (Guardrails)
|
||||
# Index Configuration
|
||||
# ------------------------------------------------------------
|
||||
|
||||
App\Index\IndexConfiguration:
|
||||
@@ -130,5 +159,5 @@ services:
|
||||
|
||||
App\Service\Admin\IndexNdjsonInspector:
|
||||
arguments:
|
||||
$ndJsonPath: '%mto.vector.data.ndjson.path%'
|
||||
$indexMetaPath: '%mto.vector.data.vector_index_meta_json.path%'
|
||||
$ndJsonPath: '%mto.knowledge.ndjson%'
|
||||
$indexMetaPath: '%mto.knowledge.index_meta%'
|
||||
|
||||
Reference in New Issue
Block a user