Files
Jyotisha/scripts/consultation_workflow_service.py
T
jesse-uxandGrok (agent loop) c7350bcafb 把星盘接口的计算和 HTTP 拆成两个类,离线入口不再伪造请求对象。
方法体未改。定向测试 383 通过;1 条校正回归在基线上同样失败,断言未改。快速门和全量 pytest 未跑。

Co-Authored-By: Grok (agent loop)
2026-10-16 10:24:42 +08:00

33 lines
1.1 KiB
Python

#!/usr/bin/env python3
"""Shared consultation workflow boundary for API and MCP callers."""
from __future__ import annotations
import sys
from pathlib import Path
from typing import Any
ROOT = Path(__file__).resolve().parents[1]
SCRIPTS_DIR = ROOT / "scripts"
for path in (ROOT, SCRIPTS_DIR):
if str(path) not in sys.path:
sys.path.insert(0, str(path))
def execute_consultation_workflow(body: dict[str, Any], *, surface: str = "api") -> dict[str, Any]:
from jyotish_api_server import JyotishComputeService, execute_consultation_workflow as _execute
handler = JyotishComputeService()
return _execute(handler, body=body, surface=surface)
def build_runtime_evidence_helpers(chart: dict[str, Any]) -> dict[str, Any]:
from offline_compute_mixins import VedastroEvidenceMixin
helper = VedastroEvidenceMixin()
return {
"vedastro_official": helper._high_rigor_vedastro_official_summary(chart),
"vedastro_archive_manifest": helper._compute_vedastro_gateway_archives(),
"interpretation_coverage": helper._interpretation_source_runtime_coverage(chart),
}