diff --git a/config.py b/config.py
index ffc4fe0..1cb0b63 100644
--- a/config.py
+++ b/config.py
@@ -402,7 +402,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '')
# ==========================================
# 系統版本與路徑
# ==========================================
-SYSTEM_VERSION = "V10.675"
+SYSTEM_VERSION = "V10.676"
LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log')
public_url = PUBLIC_URL # 用於模板顯示
diff --git a/docs/AI_INTELLIGENCE_MODULE_SOT.md b/docs/AI_INTELLIGENCE_MODULE_SOT.md
index 3691885..16589b1 100644
--- a/docs/AI_INTELLIGENCE_MODULE_SOT.md
+++ b/docs/AI_INTELLIGENCE_MODULE_SOT.md
@@ -752,3 +752,4 @@ POSTGRES_HOST=momo-db
| 2026-06-25 | 待確認候選 API 不可回傳 raw matcher code | V10.673 起 `match_reasons` 相容欄位也改回白話理由,避免前台或檢視 payload 時再次看到 `variant_selection_review`、`focused_exact_identity_*` 等工程代碼。 |
| 2026-06-25 | 共用成長流程列手機版不可溢出畫面 | V10.674 起全站 `momo-growth-rail` 在手機寬度改為換行呈現,避免「評估 / 分析 / 建議 / 解法 / 治理」流程 chip 超出視覺邊界。 |
| 2026-06-25 | 匯入、缺貨、設定與通知模板頁不可外露 SQL / 資料表 / 模板代碼 | V10.675 起匯入 job API 對前台回傳白話處置訊息,保留 raw error 於 DB/log;自動匯入失敗通知不再顯示 `psycopg2`、`daily_sales_snapshot`、`snapshot_date` 等內部字串;缺貨首頁、系統設定與通知模板列表改用營運語言,並補上逾時匯入任務重置與取消 API。 |
+| 2026-06-25 | 觀測台入口與通知預覽不可用工程主語干擾營運判讀 | V10.676 起觀測台導覽統一使用「AI 分工矩陣」,通知模板列表會把 K8s/Pod/資料庫/CI Pipeline 等內部詞轉成服務健康、資料連線與部署流程;主機健康事件與自癒劇本改顯示任務/問題/處置提醒,不直接露 `unknown_task`、`scheduler_task_failure`、`CODE_FIX` 等 raw code。 |
diff --git a/routes/admin_observability_routes.py b/routes/admin_observability_routes.py
index 7a5df8d..3ac54da 100644
--- a/routes/admin_observability_routes.py
+++ b/routes/admin_observability_routes.py
@@ -988,7 +988,7 @@ def agent_orchestration_dashboard():
recommendations.append({
'severity': 'high', 'agent': ag['label'],
'finding': f"錯誤率 {ag['error_rate']:.1f}%({ag['errors']}/{ag['calls']})",
- 'suggestion': '觸發程式碼審查流程找回歸問題(ai_calls 觀測台一鍵)',
+ 'suggestion': '觸發程式碼審查流程找回歸問題(可由 AI 流量控制台執行)',
})
# 規則 3:MCP 編排率 < 5% 但 calls 多 → 建議擴大 MCP 使用
if mcp_calls_table_exists and ag['mcp_rate'] < 5 and ag['calls'] > 50:
diff --git a/templates/admin/host_health.html b/templates/admin/host_health.html
index 55acc49..5fefeb3 100644
--- a/templates/admin/host_health.html
+++ b/templates/admin/host_health.html
@@ -157,11 +157,11 @@
-
{% if recent_incidents %}
時間 任務 錯誤 等級 狀態 訊息 {% for i in recent_incidents %}{{ i.created_at }} {{ i.task_name }}{{ i.error_type }} {{ i.severity }} {{ i.status }} {{ i.error_message }} {% endfor %}
{% else %}
尚無事件紀錄
{% endif %}
+
{% if recent_incidents %}{% set task_labels = {'unknown_task': '待確認任務', 'ElephantAlphaAutonomousEngine': 'AI 自癒監控', 'run_icaim_analysis_task': '市場分析任務'} %}{% set error_labels = {'ollama_unhealthy': 'AI 模型主機不穩', 'scheduler_task_failure': '排程任務異常', 'crawler_timeout': '資料擷取逾時', 'python_exception': '程式例外'} %}
時間 任務 問題 等級 狀態 處置提醒 {% for i in recent_incidents %}{% set incident_msg = i.error_message or '' %}{{ i.created_at }} {{ task_labels.get(i.task_name, '系統任務') }} {{ error_labels.get(i.error_type, '系統異常') }} {{ i.severity }} {{ i.status }} {% if 'Ollama' in incident_msg %}AI 模型主機暫時不穩,已進入自癒監控。{% elif 'not defined' in incident_msg or 'Traceback' in incident_msg %}資料流程發生程式例外,需由修復流程處理。{% elif 'scheduler_task_failure' in incident_msg %}排程任務異常,需確認下次執行是否恢復。{% else %}{{ incident_msg|replace('_', ' ')|truncate(90) }}{% endif %} {% endfor %}
{% else %}
尚無事件紀錄
{% endif %}
{% if recent_heals %}
時間 動作 結果 耗時 細節 {% for h in recent_heals %}{{ h.created_at }} {{ h.action_type or '—' }} {% if h.result == 'success' %}成功 {% elif h.result == 'failed' %}失敗 {% else %}{{ h.result }} {% endif %} {{ h.duration_ms }} ms {{ h.action_detail }} {% endfor %}
{% else %}
尚無自癒紀錄
{% endif %}
- {% if playbook_ranking %}
名稱 成功率 狀態 切換 {% for p in playbook_ranking %}{{ p.name }} {{ p.error_type }} · {{ p.action_type }}{% if (p.success + p.fail) > 0 %}{{ "%.0f"|format(p.success_rate) }}% {% else %}— {% endif %} {% if p.is_active %}啟用 {% else %}停用 {% endif %} 切換 {% endfor %}
{% else %}
尚無劇本資料
{% endif %}
+ {% if playbook_ranking %}{% set playbook_error_labels = {'python_exception': '程式例外', 'scheduler_task_failure': '排程異常', 'ollama_unhealthy': 'AI 模型主機不穩'} %}{% set playbook_action_labels = {'CODE_FIX': '程式修復', 'SERVICE_RESTART': '服務重啟', 'ALERT_ONLY': '告警追蹤'} %}
名稱 成功率 狀態 切換 {% for p in playbook_ranking %}{{ p.name }} {{ playbook_error_labels.get(p.error_type, '系統異常') }} · {{ playbook_action_labels.get(p.action_type, '自癒處理') }} {% if (p.success + p.fail) > 0 %}{{ "%.0f"|format(p.success_rate) }}% {% else %}— {% endif %} {% if p.is_active %}啟用 {% else %}停用 {% endif %} 切換 {% endfor %}
{% else %}
尚無劇本資料
{% endif %}
{% if backup_history %}
時間 狀態 MB {% for b in backup_history %}{{ b.created_at }} {% if b.status == 'success' %}成功 {% else %}{{ b.status }} {% endif %} {{ b.size_mb }} {% endfor %}
{% else %}
過去 7 日無備份紀錄
{% endif %}
diff --git a/templates/admin/observability_overview.html b/templates/admin/observability_overview.html
index 489c00f..738a510 100644
--- a/templates/admin/observability_overview.html
+++ b/templates/admin/observability_overview.html
@@ -590,7 +590,7 @@
03 戰情指揮
戰情室
diff --git a/templates/components/_ewoooc_shell.html b/templates/components/_ewoooc_shell.html
index a4e2249..4348a20 100644
--- a/templates/components/_ewoooc_shell.html
+++ b/templates/components/_ewoooc_shell.html
@@ -142,7 +142,7 @@
觀測台總覽 01
- Agent 編排矩陣 02
+ AI 分工矩陣 02
商業面 × AI 03
diff --git a/templates/components/_navbar.html b/templates/components/_navbar.html
index 30c4bfe..6ac35bd 100755
--- a/templates/components/_navbar.html
+++ b/templates/components/_navbar.html
@@ -258,7 +258,7 @@
- Agent 編排矩陣
+ AI 分工矩陣
diff --git a/templates/notification_templates.html b/templates/notification_templates.html
index 3751407..52b77b3 100644
--- a/templates/notification_templates.html
+++ b/templates/notification_templates.html
@@ -378,8 +378,16 @@ function publicTemplateText(text) {
return output
.replace(/CI\/CD Pipeline SUCCESS/g, '部署流程成功')
.replace(/CI\/CD Pipeline FAILED/g, '部署流程失敗')
+ .replace(/K8s Pod/g, '服務健康')
+ .replace(/Pod 重啟/g, '服務重啟')
.replace(/Pipeline/g, '部署流程')
- .replace(/Commit/g, '更新內容');
+ .replace(/Commit/g, '更新內容')
+ .replace(/備份資料庫/g, '建立營運資料備份')
+ .replace(/資料庫狀態/g, '資料連線狀態')
+ .replace(/資料庫大小/g, '資料容量')
+ .replace(/資料庫:/g, '資料連線:')
+ .replace(/資料庫:/g, '資料連線:')
+ .replace(/資料庫/g, '資料連線');
}
document.addEventListener('DOMContentLoaded', function() {
@@ -438,6 +446,7 @@ function renderTemplates() {
tbody.innerHTML = filtered.map(t => {
const catName = categories.find(c => c.code === t.category)?.name || t.category;
+ const displayName = publicTemplateText(t.name || '未命名通知');
const preview = publicTemplateText(`${t.emoji_prefix || ''} ${t.title || ''}\n${t.body || ''}`).substring(0, 96);
const channelLabel = t.channel === 'telegram' ? 'Telegram' : t.channel === 'line' ? 'LINE' : '雙渠道';
return `
@@ -447,7 +456,7 @@ function renderTemplates() {
${t.is_active ? '啟用' : '停用'}
- ${escapeHtml(t.name || '未命名通知')}
+ ${escapeHtml(displayName)}
${catName}
${channelLabel}
${escapeHtml(preview)}...