feat(upstream): snapshot a6f47abd, REST VedAstro path, and 116-technique truth layer

Advance the one-way import to git commit a6f47abd with consultation keypath golden, switch official VedAstro comparison to the REST Calculate bridge, and receive the 25 new registry entries behind research_only_blocked.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-09-03 17:35:26 +08:00
parent 01a4536333
commit 45d132588f
1184 changed files with 464058 additions and 70 deletions
+31
View File
@@ -16,6 +16,9 @@ BACKEND_PRIORITY = ["self_host", "official", "cache", "queue", "local_fallback"]
BOUNDARY_TEXT = "Users never call VedAstro directly; backend gateway owns cache, queue, and fallback."
ROOT = Path(__file__).resolve().parents[1]
OFFICIAL_ENDPOINT = "https://api.vedastro.org/api"
OFFICIAL_CALCULATE_ENDPOINT = "https://api.vedastro.org/api/Calculate"
REST_RATE_LIMIT_PER_MINUTE = 5
MCP_BRIDGE_ROLE = "protocol_probe_only"
def _bool_env(name: str) -> bool:
@@ -229,16 +232,42 @@ def run_gateway_job(job_id: str) -> dict[str, Any] | None:
return complete_gateway_job(job_id, result)
def probe_official_rest_health() -> dict[str, Any]:
"""Health of the default official path: REST ``/api/Calculate`` Status Pass."""
base = {
"transport": "rest",
"endpoint": OFFICIAL_CALCULATE_ENDPOINT,
"rate_limit_per_minute": REST_RATE_LIMIT_PER_MINUTE,
"mcp_bridge_role": MCP_BRIDGE_ROLE,
}
if os.environ.get("JYOTISH_SKIP_LOCAL_ENV", "").strip().lower() in {"1", "true", "yes", "on"}:
return {**base, "status": "not_probed", "reason": "jyotish_skip_local_env"}
if not _official_network_enabled():
return {**base, "status": "official_blocked", "reason": "network_disabled"}
try:
from scripts.vedastro_rest_bridge import probe_calculate_health
except ModuleNotFoundError: # pragma: no cover - script execution
from vedastro_rest_bridge import probe_calculate_health
result = probe_calculate_health()
return {**base, **result}
def gateway_status() -> dict[str, Any]:
from scripts.diagnose_vedastro_mode import build_report as build_vedastro_mode_report
readiness = build_vedastro_mode_report()
config = build_gateway_config()
rest_health = probe_official_rest_health()
return {
"scope": "vedastro_gateway",
"mode": config["mode"],
"backend_priority": BACKEND_PRIORITY,
"active_backend": _active_backend(config),
"official_transport": "rest",
"official_calculate_endpoint": OFFICIAL_CALCULATE_ENDPOINT,
"rate_limit_per_minute": REST_RATE_LIMIT_PER_MINUTE,
"mcp_bridge_role": MCP_BRIDGE_ROLE,
"official_calculate_health": rest_health,
"self_host_configured": config["self_host_endpoint_configured"],
"official_configured": config["official_endpoint_configured"],
"credential_configured": bool(os.environ.get("VEDASTRO_API_KEY", "").strip()),
@@ -251,6 +280,8 @@ def gateway_status() -> dict[str, Any]:
"readiness_blockers": list(readiness.get("readiness_blockers") or []),
"free_tier_possible_with_cache_queue": bool(readiness.get("free_tier_possible_with_cache_queue")),
"official_closure_plan": readiness.get("official_closure_plan") or {},
"official_transport": "rest",
"rate_limit_per_minute": REST_RATE_LIMIT_PER_MINUTE,
},
"direct_browser_access_allowed": False,
"frontend_secret_safe": True,