{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/scripts\/pipeline\/pipeline.py",
"limit": 50
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/scripts\/pipeline\/pipeline.py",
"content": "#!\/usr\/bin\/env python3\n\"\"\"\nKI-System Document Pipeline\nMain orchestration script for document processing.\n\nUsage:\n python pipeline.py scan # Scan for new documents\n python pipeline.py process # Process queued documents\n python pipeline.py embed # Embed pending chunks\n python pipeline.py semantic <id> # Run semantic analysis on document\n python pipeline.py semantic-queue # Process semantic queue\n python pipeline.py enrich-entities # Enrich entity descriptions via Ollama\n python pipeline.py enrich-entities 50 # Limit to 50 entities\n python pipeline.py all # Full pipeline run\n python pipeline.py all --pipeline-id=1 --run-id=5 # With tracking\n python pipeline.py file <path> # Process single file\n python pipeline.py status # Show pipeline status\n\"\"\"\n\nimport argparse\nimport os\nimport time\nfrom pathlib import Path\n\nfrom config import (\n MAX_RETRIES,\n RETRY_BACKOFF_BASE,\n SEMANTIC_AUTO_QUEUE,\n SEMANTIC_SYNC,\n SEMANTIC_USE_ANTHROPIC,\n)\nfrom constants import DEFAULT_LIMIT\nfrom db import PipelineProgress, db\nfrom detect import queue_files, scan_directory\nfrom step_embed import EmbeddingStep\nfrom step_entity_enrich import EntityEnrichStep\nfrom step_extract import ExtractionStep\nfrom step_load import LoadStep\nfrom step_semantic import SemanticStep\nfrom step_semantic_extended import (\n DuplicateCheckStep,\n KnowledgeSemanticAnalyzeStep,\n KnowledgeSemanticStoreStep,\n TextSemanticAnalyzeStep,\n TextSemanticStoreStep,\n)\nfrom step_transform import TransformationStep\n\n\ndef process_file(file_path, progress=None):",
"numLines": 50,
"startLine": 1,
"totalLines": 662
}
}
}