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
|
@@ -8,8 +8,8 @@ from urllib.parse import unquote_plus
|
|
|
8
8
|
|
|
9
9
|
import httpx
|
|
10
10
|
|
|
11
|
-
from
|
|
12
|
-
from
|
|
11
|
+
from src.config import cfg
|
|
12
|
+
from src.connectors.base import BaseConnector
|
|
13
13
|
|
|
14
14
|
logger = logging.getLogger(__name__)
|
|
15
15
|
|
|
@@ -140,7 +140,7 @@ class ConfluenceConnector(BaseConnector):
|
|
|
140
140
|
def ingest_to_kg(self, items: list[dict]) -> int:
|
|
141
141
|
if not items:
|
|
142
142
|
return 0
|
|
143
|
-
from
|
|
143
|
+
from src.db.client import get_conn
|
|
144
144
|
import json
|
|
145
145
|
count = 0
|
|
146
146
|
with get_conn() as conn:
|
|
@@ -161,5 +161,5 @@ class ConfluenceConnector(BaseConnector):
|
|
|
161
161
|
return count
|
|
162
162
|
|
|
163
163
|
def ingest_to_rag(self, items: list[dict]) -> int:
|
|
164
|
-
from
|
|
164
|
+
from src.ingestion.web_ingest import ingest_web_items
|
|
165
165
|
return ingest_web_items(items, source_label="confluence")
|
|
@@ -7,8 +7,8 @@ from datetime import datetime
|
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
|
-
from
|
|
11
|
-
from
|
|
10
|
+
from src.config import cfg
|
|
11
|
+
from src.connectors.base import BaseConnector
|
|
12
12
|
|
|
13
13
|
logger = logging.getLogger(__name__)
|
|
14
14
|
|
|
@@ -112,13 +112,13 @@ class JiraConnector(BaseConnector):
|
|
|
112
112
|
logger.warning("JIRA sync failed: %s", exc)
|
|
113
113
|
return []
|
|
114
114
|
|
|
115
|
-
def get_test_requirement(self, jira_key: str) -> '
|
|
115
|
+
def get_test_requirement(self, jira_key: str) -> 'src.models.test_requirement.TestRequirement':
|
|
116
116
|
"""Fetch a specific Jira issue and parse its manual Xray test steps."""
|
|
117
117
|
if not self.connect():
|
|
118
118
|
raise Exception("Jira is not configured or disabled.")
|
|
119
119
|
|
|
120
120
|
# We import here to avoid circular imports during init
|
|
121
|
-
from
|
|
121
|
+
from src.models.test_requirement import TestRequirement, TestStep
|
|
122
122
|
|
|
123
123
|
try:
|
|
124
124
|
with httpx.Client(timeout=30.0) as client:
|
|
@@ -179,15 +179,11 @@ class JiraConnector(BaseConnector):
|
|
|
179
179
|
except Exception as exc:
|
|
180
180
|
logger.error(f"Failed to get test requirement {jira_key}: {exc}")
|
|
181
181
|
raise
|
|
182
|
-
except Exception as exc:
|
|
183
|
-
logger.warning("JIRA sync failed: %s", exc)
|
|
184
|
-
raise
|
|
185
|
-
return items
|
|
186
182
|
|
|
187
183
|
def ingest_to_kg(self, items: list[dict]) -> int:
|
|
188
184
|
if not items:
|
|
189
185
|
return 0
|
|
190
|
-
from
|
|
186
|
+
from src.db.client import get_conn
|
|
191
187
|
count = 0
|
|
192
188
|
with get_conn() as conn:
|
|
193
189
|
with conn.cursor() as cur:
|
|
@@ -220,7 +216,7 @@ class JiraConnector(BaseConnector):
|
|
|
220
216
|
resp = client.get(
|
|
221
217
|
f"{cfg.JIRA_URL.rstrip('/')}/rest/api/2/issue/{key}",
|
|
222
218
|
params={"fields": "summary,description,status,issuetype,comment"},
|
|
223
|
-
|
|
219
|
+
**self._get_auth_kwargs(),
|
|
224
220
|
)
|
|
225
221
|
resp.raise_for_status()
|
|
226
222
|
data = resp.json()
|
|
@@ -243,7 +239,7 @@ class JiraConnector(BaseConnector):
|
|
|
243
239
|
return None
|
|
244
240
|
|
|
245
241
|
def ingest_to_rag(self, items: list[dict]) -> int:
|
|
246
|
-
from
|
|
242
|
+
from src.ingestion.web_ingest import ingest_web_items
|
|
247
243
|
web_items = []
|
|
248
244
|
for item in items:
|
|
249
245
|
web_items.append({
|
|
@@ -7,10 +7,10 @@ from datetime import datetime
|
|
|
7
7
|
from typing import Any
|
|
8
8
|
from urllib.parse import urlparse
|
|
9
9
|
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
10
|
+
from src.config import cfg
|
|
11
|
+
from src.connectors.base import BaseConnector
|
|
12
|
+
from src.connectors.web_fetcher import fetch_url, search_confluence_site
|
|
13
|
+
from src.parsers.html_parser import parse_html_page
|
|
14
14
|
|
|
15
15
|
logger = logging.getLogger(__name__)
|
|
16
16
|
|
|
@@ -117,7 +117,7 @@ class KbIgelConnector(BaseConnector):
|
|
|
117
117
|
def ingest_to_kg(self, items: list[dict]) -> int:
|
|
118
118
|
if not items:
|
|
119
119
|
return 0
|
|
120
|
-
from
|
|
120
|
+
from src.db.client import get_conn
|
|
121
121
|
import json
|
|
122
122
|
count = 0
|
|
123
123
|
with get_conn() as conn:
|
|
@@ -140,6 +140,6 @@ class KbIgelConnector(BaseConnector):
|
|
|
140
140
|
return count
|
|
141
141
|
|
|
142
142
|
def ingest_to_rag(self, items: list[dict]) -> int:
|
|
143
|
-
from
|
|
143
|
+
from src.ingestion.web_ingest import ingest_web_items
|
|
144
144
|
|
|
145
145
|
return ingest_web_items(items, source_label="kb.igel.com")
|
|
@@ -6,9 +6,9 @@ import logging
|
|
|
6
6
|
from dataclasses import dataclass, field
|
|
7
7
|
from time import perf_counter
|
|
8
8
|
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
9
|
+
from src.config import cfg
|
|
10
|
+
from src.connectors.base import BaseConnector
|
|
11
|
+
from src.core.circuit_breaker import is_open, record_failure, record_success
|
|
12
12
|
|
|
13
13
|
logger = logging.getLogger(__name__)
|
|
14
14
|
|
|
@@ -41,28 +41,28 @@ def _mcp_sources() -> list[str]:
|
|
|
41
41
|
def _connector_for(name: str):
|
|
42
42
|
# Keep this registry aligned with sync_scheduler CONNECTORS.
|
|
43
43
|
if name == "jira":
|
|
44
|
-
from
|
|
44
|
+
from src.connectors.jira_connector import JiraConnector
|
|
45
45
|
return JiraConnector()
|
|
46
46
|
if name == "confluence":
|
|
47
|
-
from
|
|
47
|
+
from src.connectors.confluence_connector import ConfluenceConnector
|
|
48
48
|
return ConfluenceConnector()
|
|
49
49
|
if name == "bitbucket":
|
|
50
|
-
from
|
|
50
|
+
from src.connectors.bitbucket_connector import BitbucketConnector
|
|
51
51
|
return BitbucketConnector()
|
|
52
52
|
if name == "teamcity":
|
|
53
|
-
from
|
|
53
|
+
from src.connectors.teamcity_connector import TeamCityConnector
|
|
54
54
|
return TeamCityConnector()
|
|
55
55
|
if name == "testrail":
|
|
56
|
-
from
|
|
56
|
+
from src.connectors.testRail_connector import TestRailConnector
|
|
57
57
|
return TestRailConnector()
|
|
58
58
|
if name == "servicenow":
|
|
59
|
-
from
|
|
59
|
+
from src.connectors.serviceNow_connector import ServiceNowConnector
|
|
60
60
|
return ServiceNowConnector()
|
|
61
61
|
if name == "kb_igel":
|
|
62
|
-
from
|
|
62
|
+
from src.connectors.kb_igel_connector import KbIgelConnector
|
|
63
63
|
return KbIgelConnector()
|
|
64
64
|
if name == "community":
|
|
65
|
-
from
|
|
65
|
+
from src.connectors.community_connector import CommunityConnector
|
|
66
66
|
return CommunityConnector()
|
|
67
67
|
logger.warning("Unsupported MCP source configured: %s", name)
|
|
68
68
|
return None
|
|
@@ -3,8 +3,8 @@ from __future__ import annotations
|
|
|
3
3
|
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
|
|
6
|
-
from
|
|
7
|
-
from
|
|
6
|
+
from src.config import cfg
|
|
7
|
+
from src.connectors.base import BaseConnector
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class ServiceNowConnector(BaseConnector):
|
|
@@ -8,16 +8,17 @@ import sys
|
|
|
8
8
|
import time
|
|
9
9
|
from datetime import datetime, timezone
|
|
10
10
|
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
from
|
|
19
|
-
from
|
|
20
|
-
from
|
|
11
|
+
from src.connectors.bitbucket_connector import BitbucketConnector
|
|
12
|
+
from src.connectors.community_connector import CommunityConnector
|
|
13
|
+
from src.connectors.confluence_connector import ConfluenceConnector
|
|
14
|
+
from src.connectors.jira_connector import JiraConnector
|
|
15
|
+
from src.connectors.kb_igel_connector import KbIgelConnector
|
|
16
|
+
from src.connectors.serviceNow_connector import ServiceNowConnector
|
|
17
|
+
from src.connectors.teamcity_connector import TeamCityConnector
|
|
18
|
+
from src.connectors.testRail_connector import TestRailConnector
|
|
19
|
+
from src.connectors.xray_connector import XrayConnector
|
|
20
|
+
from src.db.client import init_pool
|
|
21
|
+
from src.db.connector_sync import get_last_sync, update_sync_state
|
|
21
22
|
|
|
22
23
|
logger = logging.getLogger(__name__)
|
|
23
24
|
|
|
@@ -25,6 +26,7 @@ CONNECTORS = {
|
|
|
25
26
|
"jira": JiraConnector,
|
|
26
27
|
"confluence": ConfluenceConnector,
|
|
27
28
|
"bitbucket": BitbucketConnector,
|
|
29
|
+
"xray": XrayConnector,
|
|
28
30
|
"teamcity": TeamCityConnector,
|
|
29
31
|
"testrail": TestRailConnector,
|
|
30
32
|
"servicenow": ServiceNowConnector,
|
|
@@ -3,8 +3,8 @@ from __future__ import annotations
|
|
|
3
3
|
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
|
|
6
|
-
from
|
|
7
|
-
from
|
|
6
|
+
from src.config import cfg
|
|
7
|
+
from src.connectors.base import BaseConnector
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class TeamCityConnector(BaseConnector):
|
|
@@ -3,8 +3,8 @@ from __future__ import annotations
|
|
|
3
3
|
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
|
|
6
|
-
from
|
|
7
|
-
from
|
|
6
|
+
from src.config import cfg
|
|
7
|
+
from src.connectors.base import BaseConnector
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class TestRailConnector(BaseConnector):
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
"""Xray connector — Cloud (OAuth2 client credentials) + Server/DC (API token).
|
|
2
|
+
|
|
3
|
+
Supports:
|
|
4
|
+
- Xray Cloud: client_id + client_secret → JWT token via /api/v2/authenticate
|
|
5
|
+
- Xray Server/DC: XRAY_API_TOKEN or falls back to JIRA_API_TOKEN (Basic Auth)
|
|
6
|
+
"""
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import logging
|
|
10
|
+
import time
|
|
11
|
+
from datetime import datetime
|
|
12
|
+
from typing import Optional
|
|
13
|
+
|
|
14
|
+
import httpx
|
|
15
|
+
|
|
16
|
+
from src.config import cfg
|
|
17
|
+
from src.connectors.base import BaseConnector
|
|
18
|
+
|
|
19
|
+
logger = logging.getLogger(__name__)
|
|
20
|
+
|
|
21
|
+
_XRAY_CLOUD_AUTH_URL = "https://xray.cloud.getxray.app/api/v2/authenticate"
|
|
22
|
+
_XRAY_CLOUD_BASE_URL = "https://xray.cloud.getxray.app/api/v2"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class XrayConnector(BaseConnector):
|
|
26
|
+
"""Xray test management connector (Cloud + Server/DC)."""
|
|
27
|
+
|
|
28
|
+
name = "xray"
|
|
29
|
+
enabled = cfg.XRAY_ENABLED
|
|
30
|
+
|
|
31
|
+
def __init__(self) -> None:
|
|
32
|
+
super().__init__()
|
|
33
|
+
self._token: str | None = None
|
|
34
|
+
self._token_expiry: float = 0.0
|
|
35
|
+
self._is_cloud: bool = bool(
|
|
36
|
+
getattr(cfg, "XRAY_CLIENT_ID", "") and getattr(cfg, "XRAY_CLIENT_SECRET", "")
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
# ──────────────────────────────────────────────────────────────────
|
|
40
|
+
# Authentication
|
|
41
|
+
# ──────────────────────────────────────────────────────────────────
|
|
42
|
+
|
|
43
|
+
def _authenticate_cloud(self) -> str | None:
|
|
44
|
+
"""Fetch a Xray Cloud JWT token using client_id + client_secret."""
|
|
45
|
+
client_id = getattr(cfg, "XRAY_CLIENT_ID", "")
|
|
46
|
+
client_secret = getattr(cfg, "XRAY_CLIENT_SECRET", "")
|
|
47
|
+
auth_url = getattr(cfg, "XRAY_CLOUD_AUTH_URL", _XRAY_CLOUD_AUTH_URL)
|
|
48
|
+
|
|
49
|
+
if not client_id or not client_secret:
|
|
50
|
+
logger.error("XRAY_CLIENT_ID or XRAY_CLIENT_SECRET not set")
|
|
51
|
+
return None
|
|
52
|
+
|
|
53
|
+
try:
|
|
54
|
+
with httpx.Client(timeout=15.0) as client:
|
|
55
|
+
resp = client.post(
|
|
56
|
+
auth_url,
|
|
57
|
+
json={"client_id": client_id, "client_secret": client_secret},
|
|
58
|
+
headers={"Content-Type": "application/json"},
|
|
59
|
+
)
|
|
60
|
+
resp.raise_for_status()
|
|
61
|
+
# Xray returns a raw quoted JWT string
|
|
62
|
+
token = resp.text.strip().strip('"')
|
|
63
|
+
logger.info("Xray Cloud token obtained successfully")
|
|
64
|
+
# Xray Cloud JWT tokens are valid for 24 hours
|
|
65
|
+
self._token = token
|
|
66
|
+
self._token_expiry = time.time() + 23 * 3600
|
|
67
|
+
return token
|
|
68
|
+
except httpx.HTTPStatusError as e:
|
|
69
|
+
logger.error("Xray Cloud auth failed: HTTP %s — %s", e.response.status_code, e.response.text)
|
|
70
|
+
return None
|
|
71
|
+
except Exception as e:
|
|
72
|
+
logger.error("Xray Cloud auth error: %s", e)
|
|
73
|
+
return None
|
|
74
|
+
|
|
75
|
+
def _get_token(self) -> str | None:
|
|
76
|
+
"""Return a valid token, refreshing if expired."""
|
|
77
|
+
if self._is_cloud:
|
|
78
|
+
if not self._token or time.time() >= self._token_expiry:
|
|
79
|
+
self._authenticate_cloud()
|
|
80
|
+
return self._token
|
|
81
|
+
# Server/DC: use XRAY_API_TOKEN or JIRA_API_TOKEN
|
|
82
|
+
return getattr(cfg, "XRAY_API_TOKEN", "") or cfg.JIRA_API_TOKEN
|
|
83
|
+
|
|
84
|
+
def _get_headers(self) -> dict:
|
|
85
|
+
token = self._get_token()
|
|
86
|
+
if token:
|
|
87
|
+
return {"Authorization": f"Bearer {token}", "Content-Type": "application/json"}
|
|
88
|
+
return {"Content-Type": "application/json"}
|
|
89
|
+
|
|
90
|
+
def _base_url(self) -> str:
|
|
91
|
+
if self._is_cloud:
|
|
92
|
+
return getattr(cfg, "XRAY_CLOUD_BASE_URL", _XRAY_CLOUD_BASE_URL).rstrip("/")
|
|
93
|
+
# Server/DC uses Jira's REST namespace
|
|
94
|
+
return f"{cfg.JIRA_URL.rstrip('/')}/rest/raven/1.0/api"
|
|
95
|
+
|
|
96
|
+
def connect(self) -> bool:
|
|
97
|
+
if not self.enabled:
|
|
98
|
+
return False
|
|
99
|
+
token = self._get_token()
|
|
100
|
+
if not token:
|
|
101
|
+
logger.warning("Xray: no valid token available")
|
|
102
|
+
return False
|
|
103
|
+
return True
|
|
104
|
+
|
|
105
|
+
# ──────────────────────────────────────────────────────────────────
|
|
106
|
+
# Test Retrieval
|
|
107
|
+
# ──────────────────────────────────────────────────────────────────
|
|
108
|
+
|
|
109
|
+
def get_test(self, issue_key: str) -> Optional["src.models.test_requirement.TestRequirement"]:
|
|
110
|
+
"""Fetch Xray test issue and parse its steps into a TestRequirement."""
|
|
111
|
+
if not self.connect():
|
|
112
|
+
logger.warning("Xray not connected; cannot fetch test %s", issue_key)
|
|
113
|
+
return None
|
|
114
|
+
|
|
115
|
+
from src.models.test_requirement import TestRequirement, TestStep
|
|
116
|
+
|
|
117
|
+
try:
|
|
118
|
+
with httpx.Client(timeout=20.0, headers=self._get_headers()) as client:
|
|
119
|
+
if self._is_cloud:
|
|
120
|
+
# Xray Cloud: use GraphQL
|
|
121
|
+
return self._get_test_cloud(client, issue_key)
|
|
122
|
+
else:
|
|
123
|
+
# Server/DC: use Raven REST API
|
|
124
|
+
return self._get_test_server(client, issue_key)
|
|
125
|
+
except Exception as e:
|
|
126
|
+
logger.error("Failed to fetch Xray test %s: %s", issue_key, e)
|
|
127
|
+
return None
|
|
128
|
+
|
|
129
|
+
def _get_test_server(self, client: httpx.Client, issue_key: str):
|
|
130
|
+
"""Fetch test steps via Xray Server/DC REST API."""
|
|
131
|
+
from src.models.test_requirement import TestRequirement, TestStep
|
|
132
|
+
|
|
133
|
+
step_resp = client.get(f"{self._base_url()}/test/{issue_key}/step")
|
|
134
|
+
step_resp.raise_for_status()
|
|
135
|
+
steps_data = step_resp.json()
|
|
136
|
+
|
|
137
|
+
steps = []
|
|
138
|
+
for i, s in enumerate(steps_data, start=1):
|
|
139
|
+
steps.append(TestStep(
|
|
140
|
+
step_number=i,
|
|
141
|
+
action=s.get("action", {}).get("raw", "") if isinstance(s.get("action"), dict) else str(s.get("action", "")),
|
|
142
|
+
test_data=s.get("data", {}).get("raw", "") if isinstance(s.get("data"), dict) else str(s.get("data", "")),
|
|
143
|
+
expected_result=s.get("result", {}).get("raw", "") if isinstance(s.get("result"), dict) else str(s.get("result", "")),
|
|
144
|
+
))
|
|
145
|
+
|
|
146
|
+
return TestRequirement(
|
|
147
|
+
jira_key=issue_key,
|
|
148
|
+
summary=issue_key,
|
|
149
|
+
description="",
|
|
150
|
+
steps=steps,
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
def _get_test_cloud(self, client: httpx.Client, issue_key: str):
|
|
154
|
+
"""Fetch test steps via Xray Cloud GraphQL API."""
|
|
155
|
+
from src.models.test_requirement import TestRequirement, TestStep
|
|
156
|
+
|
|
157
|
+
query = """
|
|
158
|
+
query GetTest($issueId: String!) {
|
|
159
|
+
getTest(issueId: $issueId) {
|
|
160
|
+
issueId
|
|
161
|
+
testType { name }
|
|
162
|
+
steps {
|
|
163
|
+
id
|
|
164
|
+
action
|
|
165
|
+
data
|
|
166
|
+
result
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
"""
|
|
171
|
+
resp = client.post(
|
|
172
|
+
f"{self._base_url()}/graphql",
|
|
173
|
+
json={"query": query, "variables": {"issueId": issue_key}},
|
|
174
|
+
)
|
|
175
|
+
resp.raise_for_status()
|
|
176
|
+
data = resp.json()
|
|
177
|
+
test_data = (data.get("data") or {}).get("getTest") or {}
|
|
178
|
+
raw_steps = test_data.get("steps") or []
|
|
179
|
+
|
|
180
|
+
steps = [
|
|
181
|
+
TestStep(
|
|
182
|
+
step_number=i + 1,
|
|
183
|
+
action=s.get("action") or "",
|
|
184
|
+
test_data=s.get("data") or "",
|
|
185
|
+
expected_result=s.get("result") or "",
|
|
186
|
+
)
|
|
187
|
+
for i, s in enumerate(raw_steps)
|
|
188
|
+
]
|
|
189
|
+
|
|
190
|
+
return TestRequirement(
|
|
191
|
+
jira_key=issue_key,
|
|
192
|
+
summary=issue_key,
|
|
193
|
+
description="",
|
|
194
|
+
steps=steps,
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
# ──────────────────────────────────────────────────────────────────
|
|
198
|
+
# Test Execution Management
|
|
199
|
+
# ──────────────────────────────────────────────────────────────────
|
|
200
|
+
|
|
201
|
+
def create_test_execution(self, test_keys: list[str], summary: str = "AI-Generated Execution") -> str | None:
|
|
202
|
+
"""Create a new Xray Test Execution issue and return the execution key."""
|
|
203
|
+
if not self.connect():
|
|
204
|
+
return None
|
|
205
|
+
try:
|
|
206
|
+
with httpx.Client(timeout=20.0, headers=self._get_headers()) as client:
|
|
207
|
+
payload = {
|
|
208
|
+
"fields": {
|
|
209
|
+
"summary": summary,
|
|
210
|
+
"issuetype": {"name": "Test Execution"},
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
if not self._is_cloud:
|
|
214
|
+
resp = client.post(
|
|
215
|
+
f"{cfg.JIRA_URL.rstrip('/')}/rest/api/2/issue",
|
|
216
|
+
json=payload,
|
|
217
|
+
)
|
|
218
|
+
resp.raise_for_status()
|
|
219
|
+
exec_key = resp.json().get("key")
|
|
220
|
+
# Associate tests
|
|
221
|
+
if exec_key and test_keys:
|
|
222
|
+
client.post(
|
|
223
|
+
f"{self._base_url()}/testexec/{exec_key}/test",
|
|
224
|
+
json=test_keys,
|
|
225
|
+
)
|
|
226
|
+
return exec_key
|
|
227
|
+
else:
|
|
228
|
+
# Xray Cloud: create via GraphQL
|
|
229
|
+
mutation = """
|
|
230
|
+
mutation CreateTestExecution($summary: String!, $testKeys: [String!]!) {
|
|
231
|
+
createTestExecution(
|
|
232
|
+
summary: $summary
|
|
233
|
+
tests: $testKeys
|
|
234
|
+
) { issueId key }
|
|
235
|
+
}
|
|
236
|
+
"""
|
|
237
|
+
resp = client.post(
|
|
238
|
+
f"{self._base_url()}/graphql",
|
|
239
|
+
json={"query": mutation, "variables": {"summary": summary, "testKeys": test_keys}},
|
|
240
|
+
)
|
|
241
|
+
resp.raise_for_status()
|
|
242
|
+
result = (resp.json().get("data") or {}).get("createTestExecution") or {}
|
|
243
|
+
return result.get("key")
|
|
244
|
+
except Exception as e:
|
|
245
|
+
logger.error("Failed to create test execution: %s", e)
|
|
246
|
+
return None
|
|
247
|
+
|
|
248
|
+
def update_test_run(self, execution_key: str, test_key: str, status: str) -> bool:
|
|
249
|
+
"""Update a test run result. Status: PASS | FAIL | TODO | EXECUTING | ABORTED."""
|
|
250
|
+
if not self.connect():
|
|
251
|
+
return False
|
|
252
|
+
valid_statuses = {"PASS", "FAIL", "TODO", "EXECUTING", "ABORTED"}
|
|
253
|
+
if status.upper() not in valid_statuses:
|
|
254
|
+
logger.warning("Invalid Xray status: %s. Must be one of %s", status, valid_statuses)
|
|
255
|
+
return False
|
|
256
|
+
try:
|
|
257
|
+
with httpx.Client(timeout=20.0, headers=self._get_headers()) as client:
|
|
258
|
+
if not self._is_cloud:
|
|
259
|
+
resp = client.put(
|
|
260
|
+
f"{self._base_url()}/testrun",
|
|
261
|
+
json={
|
|
262
|
+
"testExecIssueKey": execution_key,
|
|
263
|
+
"testIssueKey": test_key,
|
|
264
|
+
"status": status.upper(),
|
|
265
|
+
},
|
|
266
|
+
)
|
|
267
|
+
resp.raise_for_status()
|
|
268
|
+
return True
|
|
269
|
+
else:
|
|
270
|
+
mutation = """
|
|
271
|
+
mutation UpdateTestRun($executionId: String!, $testKey: String!, $status: TestRunStatusType!) {
|
|
272
|
+
updateTestRunStatus(
|
|
273
|
+
testExecIssueId: $executionId
|
|
274
|
+
testIssueId: $testKey
|
|
275
|
+
status: $status
|
|
276
|
+
)
|
|
277
|
+
}
|
|
278
|
+
"""
|
|
279
|
+
resp = client.post(
|
|
280
|
+
f"{self._base_url()}/graphql",
|
|
281
|
+
json={
|
|
282
|
+
"query": mutation,
|
|
283
|
+
"variables": {
|
|
284
|
+
"executionId": execution_key,
|
|
285
|
+
"testKey": test_key,
|
|
286
|
+
"status": status.upper(),
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
)
|
|
290
|
+
resp.raise_for_status()
|
|
291
|
+
return True
|
|
292
|
+
except Exception as e:
|
|
293
|
+
logger.error("Failed to update test run %s/%s: %s", execution_key, test_key, e)
|
|
294
|
+
return False
|
|
295
|
+
|
|
296
|
+
def export_cucumber(self, test_keys: list[str]) -> str:
|
|
297
|
+
"""Export Xray tests as Cucumber feature file content."""
|
|
298
|
+
if not self.connect():
|
|
299
|
+
return ""
|
|
300
|
+
try:
|
|
301
|
+
keys_param = ";".join(test_keys)
|
|
302
|
+
with httpx.Client(timeout=30.0, headers=self._get_headers()) as client:
|
|
303
|
+
if not self._is_cloud:
|
|
304
|
+
resp = client.get(
|
|
305
|
+
f"{self._base_url()}/test/export/cucumber",
|
|
306
|
+
params={"keys": keys_param},
|
|
307
|
+
)
|
|
308
|
+
else:
|
|
309
|
+
resp = client.get(
|
|
310
|
+
f"{self._base_url()}/export/cucumber",
|
|
311
|
+
params={"keys": keys_param},
|
|
312
|
+
)
|
|
313
|
+
resp.raise_for_status()
|
|
314
|
+
return resp.text
|
|
315
|
+
except Exception as e:
|
|
316
|
+
logger.error("Failed to export cucumber features: %s", e)
|
|
317
|
+
return ""
|
|
318
|
+
|
|
319
|
+
# ──────────────────────────────────────────────────────────────────
|
|
320
|
+
# BaseConnector interface
|
|
321
|
+
# ──────────────────────────────────────────────────────────────────
|
|
322
|
+
|
|
323
|
+
def sync(self, since: datetime | None = None) -> list[dict]:
|
|
324
|
+
"""Not used for Xray — test data is fetched on-demand by jira_key."""
|
|
325
|
+
return []
|
|
326
|
+
|
|
327
|
+
def ingest_to_kg(self, items: list[dict]) -> int:
|
|
328
|
+
return 0
|
|
329
|
+
|
|
330
|
+
def ingest_to_rag(self, items: list[dict]) -> int:
|
|
331
|
+
return 0
|
|
332
|
+
|
|
333
|
+
def search(self, query: str, limit: int = 5, timeout: float | None = None) -> list[str]:
|
|
334
|
+
"""Search Xray tests by summary (delegates to Jira connector search)."""
|
|
335
|
+
from src.connectors.jira_connector import JiraConnector
|
|
336
|
+
jira = JiraConnector()
|
|
337
|
+
return jira.search(f'issuetype = Test AND text ~ "{query}"', limit=limit, timeout=timeout)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|