feat(ai): Phase 22 OpenClaw + Nemotron 協作架構 (ADR-044)
All checks were successful
E2E Health Check / e2e-health (push) Successful in 17s

統帥批准實作「仲裁-執行分工」架構:
- OpenClaw = 仲裁者 (Why + Risk Level)
- Nemotron = 執行者 (How + kubectl Command)

新增功能:
- config.py: ENABLE_NEMOTRON_COLLABORATION Feature Flag
- openclaw.py: generate_incident_proposal_with_tools()
- openclaw.py: _call_nemotron_tools() Nemotron 呼叫
- telegram_gateway.py: TelegramMessage Nemotron 欄位
- telegram_gateway.py: format_with_nemotron() 雙區塊格式
- decision_manager.py: 整合協作方法
- proposal_service.py: 整合協作方法

觸發條件:
- LOW 風險 → 僅 OpenClaw
- MEDIUM/HIGH/CRITICAL → OpenClaw + Nemotron 雙軌

首席架構師審查: 83/100 條件通過

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-03-31 18:52:53 +08:00
parent e7e3fc8e00
commit dd526684ab
9 changed files with 1080 additions and 9 deletions

View File

@@ -66,6 +66,30 @@ class Settings(BaseSettings):
description="Phase 16: True=lewooogo packages, False=內嵌版本",
)
# ==========================================================================
# Phase 22: OpenClaw + Nemotron 協作 (ADR-044)
# 2026-03-31 Claude Code: 統帥批准實作
#
# 功能:
# - ENABLE_NEMOTRON_COLLABORATION: 啟用 OpenClaw + Nemotron 雙軌協作
# - NEMOTRON_TIMEOUT_SECONDS: Nemotron API 呼叫超時
# - NEMOTRON_ASYNC_UPDATE: 異步更新模式 (先推 OpenClaw後更新 Nemotron)
#
# 回滾指令: kubectl set env deployment/awoooi-api ENABLE_NEMOTRON_COLLABORATION=false
# ==========================================================================
ENABLE_NEMOTRON_COLLABORATION: bool = Field(
default=True,
description="Phase 22: True=啟用 OpenClaw+Nemotron 協作, False=僅 OpenClaw",
)
NEMOTRON_TIMEOUT_SECONDS: int = Field(
default=45,
description="Phase 22: Nemotron API 呼叫超時 (秒)",
)
NEMOTRON_ASYNC_UPDATE: bool = Field(
default=True,
description="Phase 22: True=異步更新 (先推 OpenClaw), False=同步等待",
)
# ==========================================================================
# CORS - 嚴格白名單 (無 UAT, 無 wildcard)
# ==========================================================================