igel-qe-core 1.0.3 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +638 -54
- package/dist/cli/platform.js +115 -72
- package/dist/mcp/server.js +258 -17
- package/package.json +4 -4
- package/src/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/agents/__init__.py +3 -0
- package/src/agents/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/automation_design_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/automation_design_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/automation_design_agent.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/code_intelligence_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/code_intelligence_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/confidence_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/confidence_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/confidence_agent.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/execution_validation_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/execution_validation_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/execution_validation_agent.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/framework_analyzer_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/framework_analyzer_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/fusion_agent.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/graph.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/intent_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/intent_agent.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/kg_agent.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/memory_agent.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/reflection_agent.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/regression_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/regression_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/requirement_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/requirement_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/requirement_agent.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/retrieval_agent.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/scenario_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/scenario_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/scenario_agent.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/script_agent.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/script_generator_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/script_generator_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/script_generator_agent.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/state.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/temporal_agent.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/testcase_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/testcase_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/testcase_agent.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/validation_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/validation_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/validation_agent.cpython-314.pyc +0 -0
- package/src/agents/__pycache__/workflow_engine.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/workflow_engine.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/workflow_engine.cpython-314.pyc +0 -0
- package/{knowledge_base → src}/agents/automation_design_agent.py +14 -17
- package/{knowledge_base → src}/agents/code_intelligence_agent.py +2 -2
- package/src/agents/confidence_agent.py +114 -0
- package/{knowledge_base → src}/agents/execution_validation_agent.py +1 -1
- package/src/agents/feedback_agent.py +89 -0
- package/src/agents/framework_analyzer_agent.py +43 -0
- package/{knowledge_base → src}/agents/fusion_agent.py +3 -3
- package/{knowledge_base → src}/agents/graph.py +10 -10
- package/{knowledge_base → src}/agents/healing_agent.py +4 -4
- package/src/agents/intent_agent.py +30 -0
- package/src/agents/internal/__init__.py +3 -0
- package/src/agents/internal/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/agents/internal/__pycache__/approval_manager.cpython-313.pyc +0 -0
- package/src/agents/internal/__pycache__/question_engine.cpython-313.pyc +0 -0
- package/src/agents/internal/approval_manager.py +111 -0
- package/src/agents/internal/question_engine.py +111 -0
- package/src/agents/internal/workflow_engine.py +28 -0
- package/{knowledge_base → src}/agents/kg_agent.py +3 -3
- package/{knowledge_base → src}/agents/memory_agent.py +4 -4
- package/src/agents/orchestrator/__init__.py +3 -0
- package/src/agents/orchestrator/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/agents/orchestrator/__pycache__/orchestrator.cpython-313.pyc +0 -0
- package/src/agents/orchestrator/orchestrator.py +63 -0
- package/{knowledge_base → src}/agents/rca_agent.py +4 -4
- package/{knowledge_base → src}/agents/reflection_agent.py +1 -1
- package/{knowledge_base → src}/agents/regression_agent.py +2 -2
- package/src/agents/requirement_agent.py +97 -0
- package/{knowledge_base → src}/agents/retrieval_agent.py +2 -2
- package/{knowledge_base → src}/agents/scenario_agent.py +11 -17
- package/{knowledge_base → src}/agents/script_agent.py +6 -6
- package/{knowledge_base → src}/agents/script_generator_agent.py +12 -10
- package/{knowledge_base → src}/agents/temporal_agent.py +3 -3
- package/src/agents/testcase_agent.py +163 -0
- package/{knowledge_base → src}/agents/validation_agent.py +1 -1
- package/src/agents/workflow_engine.py +109 -0
- package/{knowledge_base → src}/alembic/README.md +4 -4
- package/{knowledge_base → src}/alembic/env.py +1 -1
- package/{knowledge_base → src}/alembic/script.py.mako +1 -1
- package/{knowledge_base → src}/api/middleware.py +3 -3
- package/{knowledge_base → src}/api/server.py +28 -28
- package/{knowledge_base → src}/chunking/chunker.py +3 -3
- package/src/cli/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/cli/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/cli/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/cli/__pycache__/workflow_cli.cpython-311.pyc +0 -0
- package/src/cli/__pycache__/workflow_cli.cpython-313.pyc +0 -0
- package/src/cli/__pycache__/workflow_cli.cpython-314.pyc +0 -0
- package/{knowledge_base → src}/cli/feedback_cli.py +10 -10
- package/{knowledge_base → src}/cli/generate.py +11 -11
- package/src/cli/index.ts +704 -0
- package/src/cli/platform.ts +147 -0
- package/src/cli/workflow_cli.py +930 -0
- package/{knowledge_base → src}/config/__init__.py +1 -1
- package/src/config/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/config/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/config/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/config/__pycache__/policy_config.cpython-311.pyc +0 -0
- package/src/config/__pycache__/policy_config.cpython-313.pyc +0 -0
- package/src/config/__pycache__/settings.cpython-311.pyc +0 -0
- package/src/config/__pycache__/settings.cpython-313.pyc +0 -0
- package/src/config/__pycache__/settings.cpython-314.pyc +0 -0
- package/src/config/policy_config.py +85 -0
- package/src/config/policy_rules.yaml +50 -0
- package/{knowledge_base → src}/config/settings.py +51 -6
- package/{knowledge_base → src}/connectors/__init__.py +1 -1
- package/src/connectors/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/connectors/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/connectors/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/connectors/__pycache__/base.cpython-311.pyc +0 -0
- package/src/connectors/__pycache__/base.cpython-313.pyc +0 -0
- package/src/connectors/__pycache__/base.cpython-314.pyc +0 -0
- package/src/connectors/__pycache__/jira_connector.cpython-311.pyc +0 -0
- package/src/connectors/__pycache__/jira_connector.cpython-313.pyc +0 -0
- package/src/connectors/__pycache__/jira_connector.cpython-314.pyc +0 -0
- package/src/connectors/__pycache__/query_bridge.cpython-313.pyc +0 -0
- package/src/connectors/__pycache__/query_bridge.cpython-314.pyc +0 -0
- package/src/connectors/bitbucket_connector.py +334 -0
- package/{knowledge_base → src}/connectors/community_connector.py +6 -6
- package/{knowledge_base → src}/connectors/confluence_connector.py +4 -4
- package/{knowledge_base → src}/connectors/jira_connector.py +7 -11
- package/{knowledge_base → src}/connectors/kb_igel_connector.py +6 -6
- package/{knowledge_base → src}/connectors/query_bridge.py +11 -11
- package/{knowledge_base → src}/connectors/search_backends.py +1 -1
- package/{knowledge_base → src}/connectors/serviceNow_connector.py +2 -2
- package/{knowledge_base → src}/connectors/sync_scheduler.py +12 -10
- package/{knowledge_base → src}/connectors/teamcity_connector.py +2 -2
- package/{knowledge_base → src}/connectors/testRail_connector.py +2 -2
- package/{knowledge_base → src}/connectors/web_fetcher.py +1 -1
- package/src/connectors/xray_connector.py +337 -0
- package/{knowledge_base → src}/core/__init__.py +1 -1
- package/src/core/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/core/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/core/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/core/__pycache__/circuit_breaker.cpython-313.pyc +0 -0
- package/src/core/__pycache__/circuit_breaker.cpython-314.pyc +0 -0
- package/src/core/__pycache__/confidence.cpython-311.pyc +0 -0
- package/src/core/__pycache__/confidence.cpython-313.pyc +0 -0
- package/src/core/__pycache__/confidence.cpython-314.pyc +0 -0
- package/src/core/__pycache__/context_engine.cpython-311.pyc +0 -0
- package/src/core/__pycache__/context_engine.cpython-313.pyc +0 -0
- package/src/core/__pycache__/evidence_resolver.cpython-311.pyc +0 -0
- package/src/core/__pycache__/evidence_resolver.cpython-313.pyc +0 -0
- package/src/core/__pycache__/guardrails.cpython-311.pyc +0 -0
- package/src/core/__pycache__/guardrails.cpython-313.pyc +0 -0
- package/src/core/__pycache__/hooks.cpython-311.pyc +0 -0
- package/src/core/__pycache__/hooks.cpython-313.pyc +0 -0
- package/src/core/__pycache__/intent_service.cpython-313.pyc +0 -0
- package/src/core/__pycache__/llm_executor.cpython-311.pyc +0 -0
- package/src/core/__pycache__/llm_executor.cpython-313.pyc +0 -0
- package/src/core/__pycache__/model_router.cpython-311.pyc +0 -0
- package/src/core/__pycache__/model_router.cpython-313.pyc +0 -0
- package/src/core/__pycache__/orchestration_contracts.cpython-311.pyc +0 -0
- package/src/core/__pycache__/orchestration_contracts.cpython-313.pyc +0 -0
- package/src/core/__pycache__/precedence.cpython-311.pyc +0 -0
- package/src/core/__pycache__/precedence.cpython-313.pyc +0 -0
- package/src/core/__pycache__/prompt_builder.cpython-311.pyc +0 -0
- package/src/core/__pycache__/prompt_builder.cpython-313.pyc +0 -0
- package/src/core/__pycache__/prompt_policy_engine.cpython-311.pyc +0 -0
- package/src/core/__pycache__/prompt_policy_engine.cpython-313.pyc +0 -0
- package/{knowledge_base → src}/core/cache.py +2 -2
- package/{knowledge_base → src}/core/confidence.py +2 -2
- package/src/core/context_engine.py +138 -0
- package/src/core/evidence_resolver.py +72 -0
- package/src/core/guardrails.py +22 -0
- package/src/core/hooks.py +57 -0
- package/src/core/intent_service.py +74 -0
- package/src/core/llm_executor.py +138 -0
- package/{knowledge_base → src}/core/logging_setup.py +1 -1
- package/src/core/model_router.py +246 -0
- package/src/core/orchestration_contracts.py +66 -0
- package/src/core/persistence_engine.py +159 -0
- package/src/core/prompt_builder.py +49 -0
- package/src/core/prompt_policy_engine.py +35 -0
- package/src/core/traceability_engine.py +56 -0
- package/src/db/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/db/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/db/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/db/__pycache__/client.cpython-311.pyc +0 -0
- package/src/db/__pycache__/client.cpython-313.pyc +0 -0
- package/src/db/__pycache__/client.cpython-314.pyc +0 -0
- package/src/db/__pycache__/igel_schema.cpython-311.pyc +0 -0
- package/src/db/__pycache__/igel_schema.cpython-313.pyc +0 -0
- package/src/db/__pycache__/igel_schema.cpython-314.pyc +0 -0
- package/src/db/__pycache__/kg_introspect.cpython-311.pyc +0 -0
- package/src/db/__pycache__/kg_introspect.cpython-313.pyc +0 -0
- package/{knowledge_base → src}/db/__pycache__/kg_introspect.cpython-314.pyc +0 -0
- package/{knowledge_base → src}/db/client.py +1 -1
- package/{knowledge_base → src}/db/connector_sync.py +1 -1
- package/{knowledge_base → src}/db/feedback_schema.py +2 -2
- package/{knowledge_base → src}/db/igel_schema.py +29 -4
- package/{knowledge_base → src}/db/kg_introspect.py +1 -1
- package/src/db/migrations.py +237 -0
- package/{knowledge_base → src}/db/schema.py +6 -6
- package/{knowledge_base → src}/deploy/Dockerfile +3 -3
- package/{knowledge_base → src}/deploy/feedback_automation.sh +3 -3
- package/{knowledge_base → src}/deploy/firecrawl-docker.sh +4 -4
- package/{knowledge_base → src}/deploy/igel-testgen.service +2 -2
- package/{knowledge_base → src}/deploy/install_reranker.sh +1 -1
- package/{knowledge_base → src}/deploy/requirements.txt +1 -2
- package/{knowledge_base → src}/deploy/run_server.sh +1 -1
- package/{knowledge_base → src}/docs/TEST_GENERATION_GUIDE.md +15 -15
- package/src/embeddings/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/embeddings/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/embeddings/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/embeddings/__pycache__/azure_embedder.cpython-311.pyc +0 -0
- package/src/embeddings/__pycache__/azure_embedder.cpython-313.pyc +0 -0
- package/{knowledge_base → src}/embeddings/__pycache__/azure_embedder.cpython-314.pyc +0 -0
- package/{knowledge_base → src}/embeddings/azure_embedder.py +10 -1
- package/{knowledge_base → src}/eval/__init__.py +3 -3
- package/{knowledge_base → src}/eval/__main__.py +7 -7
- package/src/eval/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/eval/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/eval/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/eval/__pycache__/baseline.cpython-311.pyc +0 -0
- package/src/eval/__pycache__/baseline.cpython-313.pyc +0 -0
- package/src/eval/__pycache__/baseline.cpython-314.pyc +0 -0
- package/src/eval/__pycache__/harness.cpython-311.pyc +0 -0
- package/src/eval/__pycache__/harness.cpython-313.pyc +0 -0
- package/src/eval/__pycache__/harness.cpython-314.pyc +0 -0
- package/src/eval/__pycache__/scorers.cpython-311.pyc +0 -0
- package/src/eval/__pycache__/scorers.cpython-313.pyc +0 -0
- package/src/eval/__pycache__/scorers.cpython-314.pyc +0 -0
- package/{knowledge_base → src}/eval/harness.py +6 -6
- package/{knowledge_base → src}/feedback/__init__.py +1 -1
- package/{knowledge_base → src}/feedback/analytics.py +1 -1
- package/{knowledge_base → src}/feedback/applier.py +4 -4
- package/{knowledge_base → src}/feedback/curator.py +2 -2
- package/{knowledge_base → src}/feedback/handler.py +1 -1
- package/src/generation/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/generation/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/generation/__pycache__/input_classifier.cpython-313.pyc +0 -0
- package/src/generation/__pycache__/manual_tc_parser.cpython-313.pyc +0 -0
- package/src/generation/__pycache__/prompts.cpython-313.pyc +0 -0
- package/src/generation/__pycache__/prompts.cpython-314.pyc +0 -0
- package/src/generation/__pycache__/test_generator.cpython-313.pyc +0 -0
- package/src/generation/__pycache__/test_generator.cpython-314.pyc +0 -0
- package/{knowledge_base → src}/generation/input_classifier.py +1 -1
- package/{knowledge_base → src}/generation/prompts.py +1 -1
- package/{knowledge_base → src}/generation/tc_transformer.py +10 -10
- package/{knowledge_base → src}/generation/test_generator.py +56 -10
- package/{knowledge_base → src}/graph_db/__init__.py +1 -1
- package/{knowledge_base → src}/graph_db/graphiti_client.py +2 -2
- package/{knowledge_base → src}/graph_db/kg_traversal.py +3 -3
- package/{knowledge_base → src}/graph_db/migrate_kg.py +4 -4
- package/{knowledge_base → src}/graph_db/neo4j_client.py +1 -1
- package/{knowledge_base → src}/graph_db/temporal_ingest.py +1 -1
- package/{knowledge_base → src}/ingestion/kg_extractor.py +6 -6
- package/{knowledge_base → src}/ingestion/web_ingest.py +6 -6
- package/src/intelligence/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/intelligence/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/intelligence/__pycache__/diff_analyzer.cpython-311.pyc +0 -0
- package/src/intelligence/__pycache__/diff_analyzer.cpython-313.pyc +0 -0
- package/src/intelligence/__pycache__/routing_engine.cpython-311.pyc +0 -0
- package/src/intelligence/__pycache__/routing_engine.cpython-313.pyc +0 -0
- package/src/intelligence/diff_analyzer.py +109 -0
- package/{knowledge_base → src}/intelligence/execution_ingest.py +3 -3
- package/src/intelligence/routing_engine.py +74 -0
- package/src/mcp/server.ts +384 -0
- package/src/memory/__init__.py +6 -0
- package/src/memory/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/memory/__pycache__/cognee_client.cpython-314.pyc +0 -0
- package/src/memory/__pycache__/memory_types.cpython-314.pyc +0 -0
- package/{knowledge_base → src}/memory/cognee_client.py +3 -3
- package/src/models/__pycache__/test_requirement.cpython-311.pyc +0 -0
- package/src/models/__pycache__/test_requirement.cpython-313.pyc +0 -0
- package/src/models/__pycache__/test_requirement.cpython-314.pyc +0 -0
- package/{knowledge_base → src}/models/test_requirement.py +12 -7
- package/{knowledge_base → src}/parsers/csv_parser.py +1 -1
- package/{knowledge_base → src}/parsers/doc_parser.py +1 -1
- package/{knowledge_base → src}/parsers/html_parser.py +1 -1
- package/{knowledge_base → src}/parsers/pdf_parser.py +1 -1
- package/src/project/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/project/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/project/__pycache__/ai_folder.cpython-311.pyc +0 -0
- package/src/project/__pycache__/ai_folder.cpython-313.pyc +0 -0
- package/src/project/__pycache__/context_enricher.cpython-313.pyc +0 -0
- package/src/project/__pycache__/context_projection_builder.cpython-311.pyc +0 -0
- package/src/project/__pycache__/context_projection_builder.cpython-313.pyc +0 -0
- package/src/project/__pycache__/context_requirement_sync.cpython-311.pyc +0 -0
- package/src/project/__pycache__/context_requirement_sync.cpython-313.pyc +0 -0
- package/src/project/ai_folder.py +602 -0
- package/src/project/context_enricher.py +333 -0
- package/src/project/context_projection_builder.py +167 -0
- package/src/project/context_requirement_sync.py +205 -0
- package/src/project/init_check.py +214 -0
- package/src/prompts/__pycache__/prompt_loader.cpython-313.pyc +0 -0
- package/src/prompts/automation_design.md +12 -0
- package/src/prompts/policies/automation_generation_policy.md +11 -0
- package/src/prompts/policies/generation_instructions.md +24 -0
- package/src/prompts/policies/guardrails.md +6 -0
- package/src/prompts/policies/traceability_policy.md +9 -0
- package/src/prompts/prompt_loader.py +56 -0
- package/src/prompts/requirement_understanding.md +17 -0
- package/src/prompts/scenario_generator.md +17 -0
- package/src/prompts/script_generator.md +13 -0
- package/src/prompts/test_case_generator.md +23 -0
- package/src/retrieval/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/retrieval/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/retrieval/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/retrieval/__pycache__/knowledge_graph.cpython-311.pyc +0 -0
- package/src/retrieval/__pycache__/knowledge_graph.cpython-313.pyc +0 -0
- package/src/retrieval/__pycache__/knowledge_graph.cpython-314.pyc +0 -0
- package/src/retrieval/__pycache__/retriever.cpython-311.pyc +0 -0
- package/src/retrieval/__pycache__/retriever.cpython-313.pyc +0 -0
- package/src/retrieval/__pycache__/retriever.cpython-314.pyc +0 -0
- package/src/retrieval/__pycache__/unified_query.cpython-313.pyc +0 -0
- package/src/retrieval/__pycache__/unified_query.cpython-314.pyc +0 -0
- package/{knowledge_base → src}/retrieval/context_fusion.py +3 -3
- package/{knowledge_base → src}/retrieval/knowledge_graph.py +4 -4
- package/{knowledge_base → src}/retrieval/reranker.py +2 -2
- package/{knowledge_base → src}/retrieval/retriever.py +11 -11
- package/{knowledge_base → src}/retrieval/unified_query.py +7 -7
- package/{knowledge_base → src}/retrieval/web_retriever.py +6 -6
- package/{knowledge_base → src}/validators/step_fidelity.py +1 -1
- package/src/vision/__init__.py +0 -0
- package/{knowledge_base → src}/vision/image_describer.py +1 -1
- package/knowledge_base/__pycache__/__init__.cpython-314.pyc +0 -0
- package/knowledge_base/agents/__init__.py +0 -6
- package/knowledge_base/agents/confidence_agent.py +0 -94
- package/knowledge_base/agents/feedback_agent.py +0 -56
- package/knowledge_base/agents/intent_agent.py +0 -76
- package/knowledge_base/agents/requirement_agent.py +0 -71
- package/knowledge_base/agents/testcase_agent.py +0 -111
- package/knowledge_base/agents/workflow_engine.py +0 -87
- package/knowledge_base/cli/generate_qcapps134.py +0 -391
- package/knowledge_base/cli/workflow_cli.py +0 -93
- package/knowledge_base/config/.env +0 -100
- package/knowledge_base/config/.env.example +0 -75
- package/knowledge_base/connectors/bitbucket_connector.py +0 -25
- package/knowledge_base/db/__pycache__/__init__.cpython-314.pyc +0 -0
- package/knowledge_base/db/__pycache__/client.cpython-314.pyc +0 -0
- package/knowledge_base/db/migrations.py +0 -22
- package/knowledge_base/embeddings/__pycache__/__init__.cpython-314.pyc +0 -0
- package/knowledge_base/ingestion/ingest.py +0 -346
- package/knowledge_base/ingestion/ingest_images.py +0 -330
- package/knowledge_base/memory/__init__.py +0 -6
- package/knowledge_base/memory/ingest_memory.py +0 -60
- /package/{knowledge_base → src}/__init__.py +0 -0
- /package/{knowledge_base → src}/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/confidence.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/config.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/config.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/config.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/context_fusion.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/context_fusion.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/feedback_analytics.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/feedback_applier.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/feedback_cli.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/feedback_curator.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/feedback_handler.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/generate.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/generate_qcapps134.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/input_classifier.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/input_classifier.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/kg_extractor.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/knowledge_graph.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/knowledge_graph.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/manual_tc_parser.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/manual_tc_parser.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/precedence.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/prompts.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/prompts.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/reranker.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/reranker.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/retrieval_debug.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/retrieval_debug.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/retriever.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/retriever.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/server.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/tc_transformer.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/tc_transformer.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/test_generator.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/test_generator.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/fusion_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/fusion_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/graph.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/graph.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/healing_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/intent_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/intent_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/kg_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/kg_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/memory_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/memory_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/rca_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/reflection_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/reflection_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/regression_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/retrieval_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/retrieval_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/script_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/script_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/state.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/state.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/temporal_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/temporal_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/validation_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/validation_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/state.py +0 -0
- /package/{knowledge_base → src}/alembic/__pycache__/env.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/alembic/__pycache__/env.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/alembic/versions/.gitkeep +0 -0
- /package/{knowledge_base → src}/alembic/versions/001_phase0_feedback.py +0 -0
- /package/{knowledge_base → src}/alembic/versions/002_feedback_promotions.py +0 -0
- /package/{knowledge_base → src}/alembic/versions/003_enterprise_hardening.py +0 -0
- /package/{knowledge_base → src}/alembic/versions/__pycache__/001_phase0_feedback.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/alembic/versions/__pycache__/001_phase0_feedback.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/alembic/versions/__pycache__/002_feedback_promotions.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/alembic/versions/__pycache__/002_feedback_promotions.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/api/__init__.py +0 -0
- /package/{knowledge_base → src}/api/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/api/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/api/__pycache__/middleware.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/api/__pycache__/server.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/api/__pycache__/server.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/chunking/__init__.py +0 -0
- /package/{knowledge_base → src}/chunking/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/chunking/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/chunking/__pycache__/chunker.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/chunking/__pycache__/chunker.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/chunking/__pycache__/validators.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/chunking/__pycache__/validators.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/chunking/validators.py +0 -0
- /package/{knowledge_base → src}/cli/__init__.py +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/feedback_cli.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/feedback_cli.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/generate.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/generate.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/generate_qcapps134.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/config/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/config/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/config/__pycache__/settings.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/config/__pycache__/settings.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/base.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/base.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/bitbucket_connector.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/bitbucket_connector.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/community_connector.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/confluence_connector.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/confluence_connector.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/jira_connector.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/jira_connector.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/kb_igel_connector.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/playwright_fetcher.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/query_bridge.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/search_backends.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/serviceNow_connector.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/serviceNow_connector.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/sync_scheduler.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/sync_scheduler.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/teamcity_connector.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/teamcity_connector.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/testRail_connector.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/testRail_connector.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/web_fetcher.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/base.py +0 -0
- /package/{knowledge_base → src}/connectors/playwright_fetcher.py +0 -0
- /package/{knowledge_base → src}/core/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/cache.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/circuit_breaker.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/confidence.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/confidence.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/logging_setup.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/metrics.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/precedence.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/precedence.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/request_context.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/core/circuit_breaker.py +0 -0
- /package/{knowledge_base → src}/core/metrics.py +0 -0
- /package/{knowledge_base → src}/core/precedence.py +0 -0
- /package/{knowledge_base → src}/core/request_context.py +0 -0
- /package/{knowledge_base → src}/db/__init__.py +0 -0
- /package/{knowledge_base → src}/db/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/client.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/client.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/connector_sync.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/feedback_schema.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/feedback_schema.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/kg_introspect.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/kg_introspect.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/schema.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/schema.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/embeddings/__init__.py +0 -0
- /package/{knowledge_base → src}/embeddings/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/embeddings/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/embeddings/__pycache__/azure_embedder.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/embeddings/__pycache__/azure_embedder.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/__main__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/baseline.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/baseline.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/harness.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/harness.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/scorers.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/scorers.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/eval/baseline.py +0 -0
- /package/{knowledge_base → src}/eval/queries_50.json +0 -0
- /package/{knowledge_base → src}/eval/scorers.py +0 -0
- /package/{knowledge_base → src}/exemplars/README.md +0 -0
- /package/{knowledge_base → src}/exemplars/__pycache__/pytest_reference_snippet.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/exemplars/gold_manual_concise_snippet.md +0 -0
- /package/{knowledge_base → src}/exemplars/gold_manual_detailed_snippet.md +0 -0
- /package/{knowledge_base → src}/exemplars/pytest_reference_snippet.py +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/analytics.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/analytics.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/applier.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/applier.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/curator.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/curator.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/handler.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/handler.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/generation/__init__.py +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/input_classifier.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/input_classifier.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/manual_tc_parser.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/manual_tc_parser.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/prompts.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/prompts.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/tc_transformer.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/test_generator.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/test_generator.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/generation/manual_tc_parser.py +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/graphiti_client.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/kg_traversal.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/migrate_kg.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/neo4j_client.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/neo4j_client.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/schema.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/temporal_ingest.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/schema.py +0 -0
- /package/{knowledge_base → src}/ingestion/__init__.py +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/ingest.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/ingest.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/ingest_images.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/ingest_images.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/kg_extractor.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/kg_extractor.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/web_ingest.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/intelligence/__init__.py +0 -0
- /package/{knowledge_base → src}/intelligence/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/intelligence/__pycache__/execution_ingest.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/intelligence/__pycache__/predictive_engine.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/intelligence/__pycache__/risk_scorer.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/intelligence/predictive_engine.py +0 -0
- /package/{knowledge_base → src}/intelligence/risk_scorer.py +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/cognee_client.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/cognee_client.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/ingest_memory.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/memory_types.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/memory_types.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/memory/memory_types.py +0 -0
- /package/{knowledge_base → src}/parsers/__init__.py +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/csv_parser.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/csv_parser.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/doc_parser.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/doc_parser.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/html_parser.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/image_extractor.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/image_extractor.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/markdown_parser.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/markdown_parser.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/pdf_parser.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/pdf_parser.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/parsers/image_extractor.py +0 -0
- /package/{knowledge_base → src}/parsers/markdown_parser.py +0 -0
- /package/{knowledge_base/vision → src/project}/__init__.py +0 -0
- /package/{knowledge_base → src}/retrieval/__init__.py +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/context_fusion.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/context_fusion.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/knowledge_graph.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/knowledge_graph.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/reranker.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/reranker.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/retrieval_debug.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/retrieval_debug.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/retriever.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/retriever.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/unified_query.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/web_retriever.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/retrieval_debug.py +0 -0
- /package/{knowledge_base → src}/validators/__init__.py +0 -0
- /package/{knowledge_base → src}/validators/__pycache__/__init__.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/validators/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/validators/__pycache__/step_fidelity.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/validators/__pycache__/step_fidelity.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/vision/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/vision/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/vision/__pycache__/image_describer.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/vision/__pycache__/image_describer.cpython-38.pyc +0 -0
|
@@ -10,8 +10,8 @@ Manages tables for the AI Platform Layer:
|
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
12
12
|
import logging
|
|
13
|
-
from
|
|
14
|
-
from
|
|
13
|
+
from src.db.client import get_conn
|
|
14
|
+
from src.config import cfg
|
|
15
15
|
|
|
16
16
|
logger = logging.getLogger(__name__)
|
|
17
17
|
|
|
@@ -122,6 +122,23 @@ CREATE TABLE IF NOT EXISTS igel_asset_mappings (
|
|
|
122
122
|
created_at TIMESTAMP DEFAULT NOW()
|
|
123
123
|
);
|
|
124
124
|
|
|
125
|
+
-- ==========================================
|
|
126
|
+
-- 4b. Context Intelligence Registry
|
|
127
|
+
-- ==========================================
|
|
128
|
+
CREATE TABLE IF NOT EXISTS igel_context_registry (
|
|
129
|
+
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
|
130
|
+
context_path TEXT UNIQUE NOT NULL,
|
|
131
|
+
folder_path TEXT NOT NULL,
|
|
132
|
+
content TEXT NOT NULL,
|
|
133
|
+
key_assets JSONB DEFAULT '[]'::jsonb,
|
|
134
|
+
dependency_graph JSONB DEFAULT '[]'::jsonb,
|
|
135
|
+
metadata JSONB DEFAULT '{{}}'::jsonb,
|
|
136
|
+
source_hash TEXT,
|
|
137
|
+
updated_at TIMESTAMP DEFAULT NOW()
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
CREATE INDEX IF NOT EXISTS igel_context_registry_folder_idx ON igel_context_registry(folder_path);
|
|
141
|
+
|
|
125
142
|
-- ==========================================
|
|
126
143
|
-- 5. Granular Human Feedback
|
|
127
144
|
-- ==========================================
|
|
@@ -138,7 +155,7 @@ CREATE TABLE IF NOT EXISTS igel_granular_feedback (
|
|
|
138
155
|
"""
|
|
139
156
|
|
|
140
157
|
def ensure_igel_tables():
|
|
141
|
-
"""Create IGEL enterprise tables
|
|
158
|
+
"""Create IGEL enterprise tables and run all schema migrations."""
|
|
142
159
|
try:
|
|
143
160
|
with get_conn() as conn:
|
|
144
161
|
with conn.cursor() as cur:
|
|
@@ -146,5 +163,13 @@ def ensure_igel_tables():
|
|
|
146
163
|
conn.commit()
|
|
147
164
|
logger.info("IGEL Enterprise DB schema verified.")
|
|
148
165
|
except Exception as e:
|
|
149
|
-
logger.error(f"Failed to create IGEL schema: {
|
|
166
|
+
logger.error(f"Failed to create IGEL schema: {e}")
|
|
167
|
+
raise
|
|
168
|
+
|
|
169
|
+
# Run incremental migrations (idempotent, append-only)
|
|
170
|
+
try:
|
|
171
|
+
from src.db.migrations import run_all_migrations
|
|
172
|
+
run_all_migrations()
|
|
173
|
+
except Exception as e:
|
|
174
|
+
logger.error(f"Schema migrations failed: {e}")
|
|
150
175
|
raise
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
"""Idempotent schema migrations for the IGEL QE Agent.
|
|
2
|
+
|
|
3
|
+
Design rules:
|
|
4
|
+
- Every statement is safe to run multiple times (IF NOT EXISTS guards).
|
|
5
|
+
- No destructive operation (DROP COLUMN) runs without an archive step first.
|
|
6
|
+
- Called from ensure_igel_tables() on every startup via run_all_migrations().
|
|
7
|
+
- Structured log output only; caller controls verbosity.
|
|
8
|
+
|
|
9
|
+
Migration list (append-only — never edit existing entries):
|
|
10
|
+
M001 — Archive igel_automation_scripts.code_content, then drop it; Git is source of truth.
|
|
11
|
+
M002 — Add version/parent_id/created_by/source lineage columns.
|
|
12
|
+
M003 — Add script_version + commit_hash to igel_automation_scripts.
|
|
13
|
+
M004 — Create igel_generation_history table.
|
|
14
|
+
M005 — Ensure connector_sync_state table exists.
|
|
15
|
+
M006 — Create first-class business rule registry and linkage tables.
|
|
16
|
+
|
|
17
|
+
Legacy Alembic helper kept below for repos that still use alembic.ini.
|
|
18
|
+
"""
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
import logging
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
|
|
24
|
+
from src.db.client import get_conn
|
|
25
|
+
|
|
26
|
+
logger = logging.getLogger(__name__)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# ── schema helpers ─────────────────────────────────────────────────────────────
|
|
30
|
+
|
|
31
|
+
def _column_exists(cur, table: str, column: str) -> bool:
|
|
32
|
+
cur.execute(
|
|
33
|
+
"SELECT 1 FROM information_schema.columns WHERE table_name=%s AND column_name=%s",
|
|
34
|
+
(table, column),
|
|
35
|
+
)
|
|
36
|
+
return cur.fetchone() is not None
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _table_exists(cur, table: str) -> bool:
|
|
40
|
+
cur.execute(
|
|
41
|
+
"SELECT 1 FROM information_schema.tables WHERE table_name=%s",
|
|
42
|
+
(table,),
|
|
43
|
+
)
|
|
44
|
+
return cur.fetchone() is not None
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _count(cur, table: str) -> int:
|
|
48
|
+
cur.execute(f"SELECT COUNT(*) FROM {table}")
|
|
49
|
+
row = cur.fetchone()
|
|
50
|
+
return row[0] if row else 0
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
# ── individual migrations ──────────────────────────────────────────────────────
|
|
54
|
+
|
|
55
|
+
def _m001_archive_and_drop_code_content(cur) -> None:
|
|
56
|
+
"""Archive igel_automation_scripts.code_content before dropping.
|
|
57
|
+
|
|
58
|
+
Git/Bitbucket is source of truth for script code going forward.
|
|
59
|
+
The archive table preserves all pre-migration rows so nothing is silently lost.
|
|
60
|
+
"""
|
|
61
|
+
if not _table_exists(cur, "igel_automation_scripts"):
|
|
62
|
+
return
|
|
63
|
+
if not _table_exists(cur, "igel_automation_scripts_archive"):
|
|
64
|
+
cur.execute("""
|
|
65
|
+
CREATE TABLE igel_automation_scripts_archive AS
|
|
66
|
+
SELECT * FROM igel_automation_scripts
|
|
67
|
+
WHERE code_content IS NOT NULL
|
|
68
|
+
""")
|
|
69
|
+
archived = _count(cur, "igel_automation_scripts_archive")
|
|
70
|
+
logger.info("M001: Created igel_automation_scripts_archive (%d rows)", archived)
|
|
71
|
+
if _column_exists(cur, "igel_automation_scripts", "code_content"):
|
|
72
|
+
cur.execute("ALTER TABLE igel_automation_scripts DROP COLUMN code_content")
|
|
73
|
+
logger.info("M001: Dropped code_content from igel_automation_scripts")
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def _m002_lineage_columns(cur) -> None:
|
|
77
|
+
"""Add version / parent_id / created_by / source lineage columns.
|
|
78
|
+
|
|
79
|
+
Regeneration contract (enforced at application layer):
|
|
80
|
+
- Re-generate always inserts a NEW row: version = prev + 1, parent_id = prev.id.
|
|
81
|
+
- Existing rows are NEVER mutated.
|
|
82
|
+
"""
|
|
83
|
+
for table in ("igel_requirements", "igel_generated_testcases"):
|
|
84
|
+
if not _table_exists(cur, table):
|
|
85
|
+
continue
|
|
86
|
+
for col, defn in [
|
|
87
|
+
("version", "INT NOT NULL DEFAULT 1"),
|
|
88
|
+
("parent_id", f"UUID REFERENCES {table}(id) ON DELETE SET NULL"),
|
|
89
|
+
("created_by", "TEXT"),
|
|
90
|
+
("source", "TEXT DEFAULT 'jira'"),
|
|
91
|
+
]:
|
|
92
|
+
if not _column_exists(cur, table, col):
|
|
93
|
+
cur.execute(f"ALTER TABLE {table} ADD COLUMN IF NOT EXISTS {col} {defn}")
|
|
94
|
+
logger.info("M002: Added %s.%s", table, col)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def _m003_script_metadata_columns(cur) -> None:
|
|
98
|
+
"""Add script_version + commit_hash to igel_automation_scripts."""
|
|
99
|
+
if not _table_exists(cur, "igel_automation_scripts"):
|
|
100
|
+
return
|
|
101
|
+
for col, defn in [
|
|
102
|
+
("script_version", "INT NOT NULL DEFAULT 1"),
|
|
103
|
+
("commit_hash", "TEXT"),
|
|
104
|
+
]:
|
|
105
|
+
if not _column_exists(cur, "igel_automation_scripts", col):
|
|
106
|
+
cur.execute(f"ALTER TABLE igel_automation_scripts ADD COLUMN IF NOT EXISTS {col} {defn}")
|
|
107
|
+
logger.info("M003: Added igel_automation_scripts.%s", col)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def _m004_generation_history(cur) -> None:
|
|
111
|
+
"""Create igel_generation_history — one row per LLM call with routing metadata."""
|
|
112
|
+
cur.execute("""
|
|
113
|
+
CREATE TABLE IF NOT EXISTS igel_generation_history (
|
|
114
|
+
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
|
115
|
+
jira_key TEXT,
|
|
116
|
+
action TEXT NOT NULL,
|
|
117
|
+
model_used TEXT NOT NULL,
|
|
118
|
+
task_type TEXT,
|
|
119
|
+
tokens_in INT,
|
|
120
|
+
tokens_out INT,
|
|
121
|
+
duration_ms INT,
|
|
122
|
+
quality_score FLOAT,
|
|
123
|
+
routed_by TEXT DEFAULT 'config',
|
|
124
|
+
created_at TIMESTAMPTZ DEFAULT NOW()
|
|
125
|
+
)
|
|
126
|
+
""")
|
|
127
|
+
for idx, col in [("gen_history_jira_idx", "jira_key"), ("gen_history_action_idx", "action"), ("gen_history_model_idx", "model_used")]:
|
|
128
|
+
cur.execute(f"CREATE INDEX IF NOT EXISTS {idx} ON igel_generation_history({col})")
|
|
129
|
+
logger.info("M004: Ensured igel_generation_history")
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def _m005_connector_sync_state(cur) -> None:
|
|
133
|
+
"""Ensure connector_sync_state exists (may also be created by connector_sync module)."""
|
|
134
|
+
cur.execute("""
|
|
135
|
+
CREATE TABLE IF NOT EXISTS connector_sync_state (
|
|
136
|
+
source TEXT PRIMARY KEY,
|
|
137
|
+
last_synced_at TIMESTAMPTZ,
|
|
138
|
+
status TEXT DEFAULT 'never_synced',
|
|
139
|
+
updated_at TIMESTAMPTZ DEFAULT NOW()
|
|
140
|
+
)
|
|
141
|
+
""")
|
|
142
|
+
logger.info("M005: Ensured connector_sync_state")
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
def _m006_business_rule_registry(cur) -> None:
|
|
146
|
+
"""Create first-class business rule registry and traceability links."""
|
|
147
|
+
cur.execute("""
|
|
148
|
+
CREATE TABLE IF NOT EXISTS igel_business_rule_registry (
|
|
149
|
+
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
|
150
|
+
rule_key TEXT UNIQUE,
|
|
151
|
+
rule_text TEXT NOT NULL,
|
|
152
|
+
source_type TEXT,
|
|
153
|
+
source_ref TEXT,
|
|
154
|
+
confidence FLOAT,
|
|
155
|
+
status TEXT DEFAULT 'active',
|
|
156
|
+
version INT NOT NULL DEFAULT 1,
|
|
157
|
+
created_at TIMESTAMPTZ DEFAULT NOW(),
|
|
158
|
+
updated_at TIMESTAMPTZ DEFAULT NOW()
|
|
159
|
+
)
|
|
160
|
+
""")
|
|
161
|
+
|
|
162
|
+
cur.execute("""
|
|
163
|
+
CREATE TABLE IF NOT EXISTS igel_rule_testcase_map (
|
|
164
|
+
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
|
165
|
+
business_rule_id UUID NOT NULL REFERENCES igel_business_rule_registry(id) ON DELETE CASCADE,
|
|
166
|
+
testcase_id UUID NOT NULL REFERENCES igel_generated_testcases(id) ON DELETE CASCADE,
|
|
167
|
+
created_at TIMESTAMPTZ DEFAULT NOW(),
|
|
168
|
+
UNIQUE(business_rule_id, testcase_id)
|
|
169
|
+
)
|
|
170
|
+
""")
|
|
171
|
+
|
|
172
|
+
cur.execute("""
|
|
173
|
+
CREATE TABLE IF NOT EXISTS igel_rule_script_map (
|
|
174
|
+
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
|
175
|
+
business_rule_id UUID NOT NULL REFERENCES igel_business_rule_registry(id) ON DELETE CASCADE,
|
|
176
|
+
script_id UUID NOT NULL REFERENCES igel_automation_scripts(id) ON DELETE CASCADE,
|
|
177
|
+
created_at TIMESTAMPTZ DEFAULT NOW(),
|
|
178
|
+
UNIQUE(business_rule_id, script_id)
|
|
179
|
+
)
|
|
180
|
+
""")
|
|
181
|
+
|
|
182
|
+
for idx, table, col in [
|
|
183
|
+
("rule_registry_key_idx", "igel_business_rule_registry", "rule_key"),
|
|
184
|
+
("rule_registry_source_idx", "igel_business_rule_registry", "source_ref"),
|
|
185
|
+
("rule_tc_rule_idx", "igel_rule_testcase_map", "business_rule_id"),
|
|
186
|
+
("rule_script_rule_idx", "igel_rule_script_map", "business_rule_id"),
|
|
187
|
+
]:
|
|
188
|
+
cur.execute(f"CREATE INDEX IF NOT EXISTS {idx} ON {table}({col})")
|
|
189
|
+
|
|
190
|
+
logger.info("M006: Ensured business rule registry and link maps")
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
# ── public entry point ─────────────────────────────────────────────────────────
|
|
194
|
+
|
|
195
|
+
def run_all_migrations() -> None:
|
|
196
|
+
"""Run all migrations in sequence. Safe to call on every startup."""
|
|
197
|
+
steps = [
|
|
198
|
+
("M001", _m001_archive_and_drop_code_content),
|
|
199
|
+
("M002", _m002_lineage_columns),
|
|
200
|
+
("M003", _m003_script_metadata_columns),
|
|
201
|
+
("M004", _m004_generation_history),
|
|
202
|
+
("M005", _m005_connector_sync_state),
|
|
203
|
+
("M006", _m006_business_rule_registry),
|
|
204
|
+
]
|
|
205
|
+
try:
|
|
206
|
+
with get_conn() as conn:
|
|
207
|
+
with conn.cursor() as cur:
|
|
208
|
+
for name, fn in steps:
|
|
209
|
+
try:
|
|
210
|
+
fn(cur)
|
|
211
|
+
except Exception as exc:
|
|
212
|
+
logger.error("Migration %s failed: %s", name, exc)
|
|
213
|
+
raise
|
|
214
|
+
conn.commit()
|
|
215
|
+
logger.info("All migrations complete")
|
|
216
|
+
except Exception as exc:
|
|
217
|
+
logger.error("Migration run aborted: %s", exc)
|
|
218
|
+
raise
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
# ── legacy Alembic helper (kept for repos using alembic.ini) ──────────────────
|
|
222
|
+
|
|
223
|
+
def run_migrations(revision: str = "head") -> None:
|
|
224
|
+
"""Apply Alembic migrations up to revision (default: head)."""
|
|
225
|
+
try:
|
|
226
|
+
from alembic import command
|
|
227
|
+
from alembic.config import Config
|
|
228
|
+
alembic_ini = Path(__file__).resolve().parent.parent.parent / "alembic.ini"
|
|
229
|
+
if not alembic_ini.exists():
|
|
230
|
+
logger.warning("alembic.ini not found at %s — skipping Alembic migrations", alembic_ini)
|
|
231
|
+
return
|
|
232
|
+
alembic_cfg = Config(str(alembic_ini))
|
|
233
|
+
command.upgrade(alembic_cfg, revision)
|
|
234
|
+
logger.info("Alembic migrations applied: %s", revision)
|
|
235
|
+
except ImportError:
|
|
236
|
+
logger.debug("Alembic not installed — skipping")
|
|
237
|
+
|
|
@@ -9,8 +9,8 @@ Tables:
|
|
|
9
9
|
eval_results - per-query evaluation results (Phase 0)
|
|
10
10
|
"""
|
|
11
11
|
from __future__ import annotations
|
|
12
|
-
from
|
|
13
|
-
from
|
|
12
|
+
from src.db.client import get_conn
|
|
13
|
+
from src.config import cfg
|
|
14
14
|
|
|
15
15
|
_SCHEMA_SQL = f"""
|
|
16
16
|
-- Enable required extensions
|
|
@@ -189,7 +189,7 @@ def ensure_knowledge_graph_tables() -> None:
|
|
|
189
189
|
)
|
|
190
190
|
cur.execute(_KG_INDEX_SQL)
|
|
191
191
|
try:
|
|
192
|
-
from
|
|
192
|
+
from src.db.kg_introspect import clear_kg_layout_cache
|
|
193
193
|
clear_kg_layout_cache()
|
|
194
194
|
except Exception:
|
|
195
195
|
pass
|
|
@@ -200,7 +200,7 @@ def ensure_knowledge_graph_tables() -> None:
|
|
|
200
200
|
def create_schema() -> None:
|
|
201
201
|
"""Ensure schema via Alembic migrations, with legacy DDL fallback."""
|
|
202
202
|
try:
|
|
203
|
-
from
|
|
203
|
+
from src.db.migrations import run_migrations
|
|
204
204
|
run_migrations("head")
|
|
205
205
|
except Exception as exc:
|
|
206
206
|
import logging
|
|
@@ -211,7 +211,7 @@ def create_schema() -> None:
|
|
|
211
211
|
with conn.cursor() as cur:
|
|
212
212
|
cur.execute(_SCHEMA_SQL)
|
|
213
213
|
ensure_knowledge_graph_tables()
|
|
214
|
-
from
|
|
214
|
+
from src.db.feedback_schema import ensure_feedback_tables
|
|
215
215
|
ensure_feedback_tables()
|
|
216
216
|
print(" Schema ready (Alembic + kb_documents, kb_parent_chunks, kb_chunks, knowledge_graph_*)")
|
|
217
217
|
|
|
@@ -416,7 +416,7 @@ def ingest_document_atomic(
|
|
|
416
416
|
Atomically insert document + parent + child chunks in one transaction.
|
|
417
417
|
Returns (doc_id, parent_count, chunk_count, validation_skipped).
|
|
418
418
|
"""
|
|
419
|
-
from
|
|
419
|
+
from src.db.client import get_transaction
|
|
420
420
|
|
|
421
421
|
validation_skipped = 0
|
|
422
422
|
with get_transaction() as conn:
|
|
@@ -5,10 +5,10 @@ WORKDIR /app
|
|
|
5
5
|
RUN apt-get update && apt-get install -y --no-install-recommends curl \
|
|
6
6
|
&& rm -rf /var/lib/apt/lists/*
|
|
7
7
|
|
|
8
|
-
COPY
|
|
8
|
+
COPY src/ src/
|
|
9
9
|
COPY alembic.ini alembic.ini
|
|
10
10
|
|
|
11
|
-
COPY
|
|
11
|
+
COPY src/deploy/requirements.txt requirements.txt
|
|
12
12
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
13
13
|
|
|
14
14
|
ENV PYTHONPATH=/app
|
|
@@ -20,4 +20,4 @@ EXPOSE 8000
|
|
|
20
20
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=3 \
|
|
21
21
|
CMD curl -f http://localhost:8000/health || exit 1
|
|
22
22
|
|
|
23
|
-
CMD ["uvicorn", "
|
|
23
|
+
CMD ["uvicorn", "src.api.server:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "2"]
|
|
@@ -4,9 +4,9 @@ set -euo pipefail
|
|
|
4
4
|
cd "$(dirname "$0")/../.."
|
|
5
5
|
export PYTHONPATH="${PWD}:${PYTHONPATH:-}"
|
|
6
6
|
/usr/bin/python3.8 - <<'PY'
|
|
7
|
-
from
|
|
8
|
-
from
|
|
9
|
-
from
|
|
7
|
+
from src.db.client import init_pool, close_pool
|
|
8
|
+
from src.feedback.applier import apply_pending_promotions
|
|
9
|
+
from src.memory.ingest_memory import ingest_curated_feedback
|
|
10
10
|
|
|
11
11
|
init_pool()
|
|
12
12
|
results = apply_pending_promotions(limit=50)
|
|
@@ -24,7 +24,7 @@ else
|
|
|
24
24
|
fi
|
|
25
25
|
|
|
26
26
|
cd "$INSTALL_DIR"
|
|
27
|
-
cat > .
|
|
27
|
+
cat > firecrawl-runtime.conf << EOF
|
|
28
28
|
PORT=${PORT}
|
|
29
29
|
HOST=0.0.0.0
|
|
30
30
|
USE_DB_AUTHENTICATION=false
|
|
@@ -32,14 +32,14 @@ BULL_AUTH_KEY=igel-kb-local
|
|
|
32
32
|
EOF
|
|
33
33
|
|
|
34
34
|
echo "Building and starting Firecrawl on port ${PORT} ..."
|
|
35
|
-
docker compose build
|
|
36
|
-
docker compose up -d
|
|
35
|
+
docker compose --env-file firecrawl-runtime.conf build
|
|
36
|
+
docker compose --env-file firecrawl-runtime.conf up -d
|
|
37
37
|
|
|
38
38
|
echo "Waiting for Firecrawl health ..."
|
|
39
39
|
for i in $(seq 1 30); do
|
|
40
40
|
if curl -sf "http://127.0.0.1:${PORT}/" >/dev/null 2>&1; then
|
|
41
41
|
echo "Firecrawl is up at http://127.0.0.1:${PORT}"
|
|
42
|
-
echo "Set in
|
|
42
|
+
echo "Set in your runtime environment:"
|
|
43
43
|
echo " FIRECRAWL_BASE_URL=http://127.0.0.1:${PORT}"
|
|
44
44
|
exit 0
|
|
45
45
|
fi
|
|
@@ -15,9 +15,9 @@ Wants=postgresql.service
|
|
|
15
15
|
Type=simple
|
|
16
16
|
User=root
|
|
17
17
|
WorkingDirectory=/root/IGEL/IGEL_Automation_Claude/IGEL/innominds
|
|
18
|
-
EnvironmentFile=-/
|
|
18
|
+
EnvironmentFile=-/etc/igel-testgen/runtime.conf
|
|
19
19
|
ExecStartPre=/bin/bash -c 'until pg_isready -h ${DB_HOST:-localhost} -p ${DB_PORT:-5432}; do sleep 2; done'
|
|
20
|
-
ExecStart=/bin/bash
|
|
20
|
+
ExecStart=/bin/bash src/deploy/run_server.sh
|
|
21
21
|
Restart=always
|
|
22
22
|
RestartSec=5
|
|
23
23
|
TimeoutStopSec=30
|
|
@@ -49,7 +49,7 @@ elapsed = perf_counter() - t0
|
|
|
49
49
|
print(f"OK — MiniLM reranked {len(pairs)} pairs in {elapsed:.2f}s, top score={float(max(scores)):.4f}")
|
|
50
50
|
PYEOF
|
|
51
51
|
|
|
52
|
-
echo "Done.
|
|
52
|
+
echo "Done. Ensure RERANKER_BACKEND=local is set in your runtime environment (default)."
|
|
53
53
|
|
|
54
54
|
echo "Installing free web search (DuckDuckGo ddgs)..."
|
|
55
55
|
# shellcheck disable=SC2086
|
|
@@ -26,13 +26,12 @@ tiktoken>=0.5.0
|
|
|
26
26
|
# Config / Utils
|
|
27
27
|
pydantic>=2.7.0
|
|
28
28
|
eval_type_backport>=0.2.0; python_version < "3.10"
|
|
29
|
-
python-dotenv==1.0.1
|
|
30
29
|
tenacity==9.0.0
|
|
31
30
|
rich==13.9.4
|
|
32
31
|
|
|
33
32
|
# OSS local reranker (CrossEncoder — free, runs on CPU/GPU)
|
|
34
33
|
# Default model: BAAI/bge-reranker-v2-m3 (multilingual, best open-source for IGEL DE/EN)
|
|
35
|
-
# Install: bash
|
|
34
|
+
# Install: bash src/deploy/install_reranker.sh
|
|
36
35
|
jinja2>=3.1.2,<3.2
|
|
37
36
|
MarkupSafe>=2.1.0,<3
|
|
38
37
|
tokenizers>=0.20,<0.21
|
|
@@ -28,7 +28,7 @@ echo " Python: $($PYTHON --version 2>&1)"
|
|
|
28
28
|
echo " Swagger UI: http://${HOST}:${PORT}/docs"
|
|
29
29
|
echo ""
|
|
30
30
|
|
|
31
|
-
exec "$PYTHON" -m uvicorn
|
|
31
|
+
exec "$PYTHON" -m uvicorn src.api.server:app \
|
|
32
32
|
--host "$HOST" \
|
|
33
33
|
--port "$PORT" \
|
|
34
34
|
--workers "$WORKERS" \
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# IGEL test case generation — operator guide
|
|
2
2
|
|
|
3
|
-
This document is for anyone running the RAG-powered test generator in `
|
|
3
|
+
This document is for anyone running the RAG-powered test generator in `src/`. The CLI (`python -m src.cli.generate`) **always retrieves context from PostgreSQL** (vector + full-text hybrid search + knowledge graph) before calling the LLM. Outputs are only as accurate as the **ingested documentation** in the KB.
|
|
4
4
|
|
|
5
5
|
## How it works (short)
|
|
6
6
|
|
|
@@ -30,18 +30,18 @@ Step-fidelity checks run after generation; warnings are returned when counts or
|
|
|
30
30
|
|
|
31
31
|
## Prerequisites
|
|
32
32
|
|
|
33
|
-
- PostgreSQL reachable with the KB populated (
|
|
34
|
-
- Documents ingested (`python -m
|
|
33
|
+
- PostgreSQL reachable with the KB populated (configured via runtime environment variables).
|
|
34
|
+
- Documents ingested (`python -m src.ingestion.ingest` — this **also populates the Knowledge Graph automatically**).
|
|
35
35
|
- Azure OpenAI credentials configured for the LLM and embeddings.
|
|
36
36
|
|
|
37
37
|
## Ingestion (single command — RAG + KG in sync)
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
python -m
|
|
41
|
-
python -m
|
|
42
|
-
python -m
|
|
43
|
-
python -m
|
|
44
|
-
python -m
|
|
40
|
+
python -m src.ingestion.ingest # Ingest all new docs + build KG
|
|
41
|
+
python -m src.ingestion.ingest --file x.pdf # Single file (KG extracted for that doc)
|
|
42
|
+
python -m src.ingestion.ingest --reset # Full re-ingest from scratch
|
|
43
|
+
python -m src.ingestion.ingest --stats # Show document, chunk, KG, and image counts
|
|
44
|
+
python -m src.ingestion.ingest --skip-kg # Text + embeddings only (rare; skips KG)
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
**No separate KG step is needed.** Each ingested document automatically has its registry keys (`app.*`), TC Setup paths, and feature nodes extracted into `knowledge_graph_nodes` / `knowledge_graph_edges`. The `--stats` output shows `kg_nodes`, `kg_edges`, and `kg_orphan_parents` (parents with no KG entity — ideally 0 or low).
|
|
@@ -49,7 +49,7 @@ python -m knowledge_base.ingestion.ingest --skip-kg # Text + embeddings only
|
|
|
49
49
|
If you ever need a backfill (e.g. after upgrading the KG extractor logic), you can still run the standalone extractor:
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
|
-
python -m
|
|
52
|
+
python -m src.ingestion.kg_extractor
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
## Always-running API service (recommended)
|
|
@@ -60,14 +60,14 @@ The server runs on **192.168.204.65:8000** and responds to any user query — no
|
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
62
|
# Option 1: systemd (starts on boot, restarts on crash)
|
|
63
|
-
sudo cp
|
|
63
|
+
sudo cp src/igel-testgen.service /etc/systemd/system/
|
|
64
64
|
sudo systemctl daemon-reload
|
|
65
65
|
sudo systemctl enable igel-testgen
|
|
66
66
|
sudo systemctl start igel-testgen
|
|
67
67
|
|
|
68
68
|
# Option 2: directly
|
|
69
69
|
cd /root/IGEL/IGEL_Automation_Claude/IGEL/innominds
|
|
70
|
-
./
|
|
70
|
+
./src/run_server.sh
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
### API endpoints
|
|
@@ -111,10 +111,10 @@ Response includes `markdown_content`, `python_content`, `traceability_table`, an
|
|
|
111
111
|
From the `innominds` package root (where `knowledge_base` is importable):
|
|
112
112
|
|
|
113
113
|
```bash
|
|
114
|
-
python -m
|
|
115
|
-
python -m
|
|
116
|
-
python -m
|
|
117
|
-
python -m
|
|
114
|
+
python -m src.cli.generate "Entra ID SSO login validation" --format both
|
|
115
|
+
python -m src.cli.generate "UMS profile assignment" --product UMS --top-k 10
|
|
116
|
+
python -m src.cli.generate "Chromium policies QCAPPS-429" --source-tc-file path/to/jira_export.csv --detail-level detailed
|
|
117
|
+
python -m src.cli.generate --interactive
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
- **`--product`**: narrows search (UMS, IGEL OS, COSMOS, etc.); if nothing matches, retrieval retries without the filter.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -12,7 +12,7 @@ import logging
|
|
|
12
12
|
from tenacity import retry, stop_after_attempt, wait_exponential, retry_if_exception_type
|
|
13
13
|
|
|
14
14
|
from openai import AzureOpenAI, RateLimitError, APIConnectionError, APITimeoutError
|
|
15
|
-
from
|
|
15
|
+
from src.config import cfg
|
|
16
16
|
|
|
17
17
|
logger = logging.getLogger(__name__)
|
|
18
18
|
|
|
@@ -94,6 +94,15 @@ def embed_single(text: str) -> list[float]:
|
|
|
94
94
|
return embed_texts([text])[0]
|
|
95
95
|
|
|
96
96
|
|
|
97
|
+
def get_embedding(text: str) -> str:
|
|
98
|
+
"""Backward-compatible wrapper returning a pgvector literal string.
|
|
99
|
+
|
|
100
|
+
Some legacy indexing paths expect a serialized vector value that can be
|
|
101
|
+
passed directly to SQL as ``%s::vector``.
|
|
102
|
+
"""
|
|
103
|
+
return format_for_pgvector(embed_single(text))
|
|
104
|
+
|
|
105
|
+
|
|
97
106
|
def format_for_pgvector(embedding: list[float]) -> str:
|
|
98
107
|
"""Format embedding as PostgreSQL vector literal string."""
|
|
99
108
|
return "[" + ",".join(f"{v:.8f}" for v in embedding) + "]"
|
|
@@ -10,7 +10,7 @@ Provides 5-dimensional scoring for test case generation quality:
|
|
|
10
10
|
"""
|
|
11
11
|
from __future__ import annotations
|
|
12
12
|
|
|
13
|
-
from
|
|
13
|
+
from src.eval.scorers import (
|
|
14
14
|
RetrievalScorer,
|
|
15
15
|
DomainScorer,
|
|
16
16
|
StructuralScorer,
|
|
@@ -18,8 +18,8 @@ from knowledge_base.eval.scorers import (
|
|
|
18
18
|
PublishScorer,
|
|
19
19
|
EvaluationResult,
|
|
20
20
|
)
|
|
21
|
-
from
|
|
22
|
-
from
|
|
21
|
+
from src.eval.harness import EvaluationHarness
|
|
22
|
+
from src.eval.baseline import BaselineManager
|
|
23
23
|
|
|
24
24
|
__all__ = [
|
|
25
25
|
"RetrievalScorer",
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
CLI entry point for running evaluations.
|
|
3
3
|
|
|
4
4
|
Usage:
|
|
5
|
-
python -m
|
|
6
|
-
python -m
|
|
7
|
-
python -m
|
|
5
|
+
python -m src.eval --baseline --queries queries_50.json
|
|
6
|
+
python -m src.eval --run my_run --queries queries_50.json
|
|
7
|
+
python -m src.eval --compare baseline my_run
|
|
8
8
|
"""
|
|
9
9
|
import argparse
|
|
10
10
|
import sys
|
|
@@ -13,8 +13,8 @@ from pathlib import Path
|
|
|
13
13
|
# Add parent directory to path to allow imports
|
|
14
14
|
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
|
|
15
15
|
|
|
16
|
-
from
|
|
17
|
-
from
|
|
16
|
+
from src.eval.baseline import BaselineManager
|
|
17
|
+
from src.eval.harness import EvaluationHarness
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
def main():
|
|
@@ -48,7 +48,7 @@ def main():
|
|
|
48
48
|
parser.add_argument(
|
|
49
49
|
"--queries",
|
|
50
50
|
type=str,
|
|
51
|
-
default="
|
|
51
|
+
default="src/eval/queries_50.json",
|
|
52
52
|
help="Path to query file (default: queries_50.json)",
|
|
53
53
|
)
|
|
54
54
|
parser.add_argument(
|
|
@@ -89,7 +89,7 @@ def main():
|
|
|
89
89
|
current = baseline_mgr.load_baseline(current_name)
|
|
90
90
|
|
|
91
91
|
# Create mock harness run for comparison
|
|
92
|
-
from
|
|
92
|
+
from src.eval.harness import HarnessRun
|
|
93
93
|
current_run = HarnessRun(
|
|
94
94
|
run_id=current.run_id,
|
|
95
95
|
timestamp=current.timestamp,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|