diff --git a/SKILL.md b/SKILL.md index f5eca688..7bf6e20c 100644 --- a/SKILL.md +++ b/SKILL.md @@ -1,6 +1,6 @@ --- name: jyotish-vedic-astrology -version: 6.0.21 +version: 6.0.24 description: 印度占星(Jyotish)专业解盘与推运系统。核心能力:PDF星盘输入→严谨解盘→精确推运应期输出。触发词:印度占星、吠陀占星、Jyotish、解盘、推运、星盘分析、Dasha、Transit、Nakshatra、Yoga、出生时间矫正、PDF星盘、读取PDF、分析PDF星盘、现代解读、误判纠错、Varga分盘、综合分析、过境分析、合盘、婚姻匹配、年运盘、Prashna、Argala、Jaimini、Shadbala、Ashtakavarga、HTML报告、深度解盘。 --- @@ -10,7 +10,7 @@ description: 印度占星(Jyotish)专业解盘与推运系统。核心能力 > **严格路由**:`references/strict-workflow-router.md`(⭐涉及事业/婚恋/财务/应期/技法验证时必须优先读取) > **覆盖矩阵**:`references/technique-capability-matrix.md`(⭐判断技法 covered/partial/missing 时必须参考) > **机器注册表**:`references/technique_registry.json` + `scripts/audit_capabilities.py`(⭐用于自动审计与CI门禁) -> **版本**:v6.0.23-full-reading-regression | **详细变更**:`CHANGELOG.md` +> **版本**:v6.0.24-mcp-server | **详细变更**:`CHANGELOG.md` --- diff --git a/mcp_server.py b/mcp_server.py index 1b3c0709..b4a894ed 100644 --- a/mcp_server.py +++ b/mcp_server.py @@ -531,6 +531,7 @@ def strict_workflow( tz: float, age: int, transit_date: str, + node_mode: str = "mean", ) -> Dict[str, Any]: """ Strict workflow router: routes question to the correct analysis path. @@ -552,34 +553,46 @@ def strict_workflow( tz: Timezone offset from UTC age: Current age transit_date: Transit date for prediction (YYYY-MM-DD) + node_mode: 'mean' or 'true' Returns: JSON with routed analysis and confidence level """ - engine = os.path.join(SCRIPT_DIR, "scripts", "jyotish_engine.py") - prompt = ( - f"Question: {question}\n" - f"Birth: {year}-{month:02d}-{day:02d} {hour:02d}:{minute:02d} " - f"lat={lat} lon={lon} tz={tz}\n" - f"Age: {age}, Transit: {transit_date}\n" - f"Please route this question to the correct strict workflow " - f"and run the appropriate techniques only." - ) - cmd = [sys.executable, engine, "strict-workflow", - "--prompt", prompt, - "--year", str(year), "--month", str(month), "--day", str(day), - "--hour", str(hour), "--minute", str(minute), - "--lat", str(lat), "--lon", str(lon), "--tz", str(tz), - "--age", str(age), "--transit-date", transit_date] - result = subprocess.run( - cmd, capture_output=True, text=True, timeout=120, cwd=SCRIPT_DIR - ) - if result.returncode != 0: - return {"error": True, "stderr": result.stderr} - try: - return json.loads(result.stdout) - except json.JSONDecodeError: - return {"raw_output": result.stdout} + q = question.lower() + if any(k in q for k in ("career", "job", "work", "promotion", "business", "profession", "事业", "工作", "升职", "生意")): + route = "career" + focus_techniques = ["D10", "Dasha", "Shadbala", "Transit", "Narayana Dasha"] + elif any(k in q for k in ("marriage", "relationship", "love", "spouse", "partner", "divorce", "婚恋", "婚姻", "感情", "配偶", "恋爱")): + route = "relationship" + focus_techniques = ["D9", "UL Upapada", "Dasha", "Nakshatra", "Vivah Saham"] + elif any(k in q for k in ("money", "wealth", "finance", "investment", "property", "income", "财务", "财富", "投资", "房产", "收入")): + route = "finance" + focus_techniques = ["D2", "D11", "Dasha", "Shadbala", "Ashtakavarga"] + elif any(k in q for k in ("when", "timing", "event", "prediction", "future", "应期", "预测", "何时", "将来")): + route = "timing" + focus_techniques = ["Dasha", "Transit", "Double Transit", "Gochara"] + else: + route = "general" + focus_techniques = ["D1", "D9", "Dasha", "Yoga", "Shadbala", "Ashtakavarga"] + + result = _run_engine("full-reading", { + "year": year, "month": month, "day": day, + "hour": hour, "minute": minute, + "lat": lat, "lon": lon, "tz": tz, + "age": age, "transit_date": transit_date, + "node_mode": node_mode, + }) + + if isinstance(result, dict) and "error" not in result: + result["routing"] = { + "question_type": route, + "focus_techniques": focus_techniques, + "note": ( + f"Routed to '{route}' path. Focus on the listed techniques " + f"for higher-confidence answers. Full reading included for context." + ), + } + return result # ============================================================================