feat(ai): add PixelRAG marketplace adapter preflight
Some checks failed
CD Pipeline / deploy (push) Has been cancelled

This commit is contained in:
ogt
2026-07-10 11:08:57 +08:00
parent 05296f20c5
commit cb2ce63609
10 changed files with 924 additions and 7 deletions

View File

@@ -942,6 +942,43 @@ def ai_automation_pixelrag_source_contract_replay_worker_api():
))
@system_public_bp.route('/api/ai-automation/pixelrag-marketplace-source-contract-adapter-preflight')
@login_required
def ai_automation_pixelrag_marketplace_source_contract_adapter_preflight_api():
"""Controlled PixelRAG marketplace source-contract adapter preflight readback."""
from services.pixelrag_marketplace_source_contract_adapter_preflight_service import (
run_pixelrag_marketplace_source_contract_adapter_preflight,
)
platforms = tuple(
str(item or '').strip()
for item in request.args.getlist('platform')
if str(item or '').strip()
)
execute = str(request.args.get('execute') or '').strip().lower() in {
'1',
'true',
'yes',
}
write_receipt = str(request.args.get('write_receipt') or '').strip().lower() in {
'1',
'true',
'yes',
}
max_age_hours = request.args.get('max_age_hours', 168, type=int)
limit = request.args.get('limit', 25, type=int)
return jsonify(run_pixelrag_marketplace_source_contract_adapter_preflight(
source_contract_replay_receipt_root=str(
request.args.get('source_contract_replay_receipt_root') or ''
).strip() or None,
platform=platforms,
max_age_hours=max(1, min(max_age_hours or 168, 720)),
limit=max(1, min(limit or 25, 250)),
execute=execute,
write_receipt=bool(execute and write_receipt),
))
@system_public_bp.route('/api/ai-automation/external-mcp-rag-integration')
@login_required
def ai_automation_external_mcp_rag_integration_api():