feat(ai): automate agent integration truth and RAG canary
Some checks failed
CD Pipeline / deploy (push) Has been cancelled

This commit is contained in:
ogt
2026-07-17 02:00:35 +08:00
parent b51449b96c
commit 81b99f12b3
16 changed files with 1977 additions and 10 deletions

View File

@@ -1164,6 +1164,49 @@ def ai_automation_pixelrag_marketplace_candidate_knowledge_replay_api():
))
@system_public_bp.route(
'/api/ai-automation/internal-rag-candidate-canary',
methods=['GET'],
)
@login_required
def ai_automation_internal_rag_candidate_canary_api():
"""Read-only PixelRAG candidate canary readiness and latest runtime receipt."""
from services.internal_rag_candidate_canary_service import (
run_internal_rag_candidate_canary,
)
platforms = tuple(
str(item or '').strip()
for item in request.args.getlist('platform')
if str(item or '').strip()
)
max_age_hours = request.args.get('max_age_hours', 168, type=int)
limit = request.args.get('limit', 1, type=int)
threshold = request.args.get('similarity_threshold', 0.70, type=float)
return jsonify(run_internal_rag_candidate_canary(
platform=platforms,
max_age_hours=max(1, min(max_age_hours or 168, 720)),
limit=max(1, min(limit or 1, 5)),
similarity_threshold=max(0.0, min(threshold or 0.70, 1.0)),
execute=False,
write_receipt=False,
))
@system_public_bp.route('/api/ai-automation/agent-product-integration')
@login_required
def ai_automation_agent_product_integration_api():
"""Source/runtime/product closure truth for all four AI agents."""
from services.ai_agent_product_integration_service import (
build_ai_agent_product_integration_readback,
)
window_hours = request.args.get('window_hours', 168, type=int)
return jsonify(build_ai_agent_product_integration_readback(
window_hours=max(1, min(window_hours or 168, 24 * 31)),
))
@system_public_bp.route('/api/ai-automation/external-mcp-rag-integration')
@login_required
def ai_automation_external_mcp_rag_integration_api():