diff --git a/apps/web/src/components/neural-command/NeuralPreFlight.tsx b/apps/web/src/components/neural-command/NeuralPreFlight.tsx index 02588270..44689269 100644 --- a/apps/web/src/components/neural-command/NeuralPreFlight.tsx +++ b/apps/web/src/components/neural-command/NeuralPreFlight.tsx @@ -4,10 +4,11 @@ * NeuralPreFlight - SSH_COMMAND 安全預審面板 * =========================================== * 顯示 8 項安全審查結果 + 通過狀態 + 功能開關 + * Sprint 3 指揮鏈可視化 + T1-T7 任務進度 */ import { useTranslations } from 'next-intl' -import { CheckCircle2, AlertTriangle, ShieldCheck, ToggleRight } from 'lucide-react' +import { CheckCircle2, AlertTriangle, ShieldCheck, ArrowRight, Shield, Database, Cpu, Key, Lock, GitBranch, Activity } from 'lucide-react' import { cn } from '@/lib/utils' import type { AutoRepairStats, PlaybookItem } from './types' @@ -159,6 +160,84 @@ export function NeuralPreFlight({ stats, playbooks }: Props) { + {/* ── Sprint 3 指揮鏈可視化 ── */} +
+

+ Sprint 3 SSH 指揮權鏈 — 神經嫁接架構 +

+ + {/* Chain nodes */} +
+ {[ + { icon: Shield, label: 'SSH Gateway', sub: 'Port 22 + 白名單', color: 'text-orange-500', bg: 'bg-orange-500/10', border: 'border-orange-500/30' }, + { icon: Key, label: 'URI 解析器', sub: 'openclaw:// ansible:// ssh://', color: 'text-blue-500', bg: 'bg-blue-500/10', border: 'border-blue-500/30' }, + { icon: Lock, label: 'Shell 防注入', sub: '; | && $() 阻斷', color: 'text-purple-500', bg: 'bg-purple-500/10', border: 'border-purple-500/30' }, + { icon: Cpu, label: 'Redis 冪等鎖', sub: 'repair_lock TTL 300s', color: 'text-green-500', bg: 'bg-green-500/10', border: 'border-green-500/30' }, + { icon: Database, label: 'Ansible Playbook DB', sub: '.188 控制節點 → .110', color: 'text-yellow-500', bg: 'bg-yellow-500/10', border: 'border-yellow-500/30' }, + ].map((node, i, arr) => { + const Icon = node.icon + return ( +
+
+ +

{node.label}

+

{node.sub}

+
+ {i < arr.length - 1 && ( + + )} +
+ ) + })} +
+ + {/* T1-T7 任務進度 */} +
+ {[ + { id: 'T1', label: 'URI 解析器', desc: 'Shell 防注入', done: true }, + { id: 'T2', label: 'known_hosts', desc: 'K8s Secret', done: true }, + { id: 'T3', label: '三條執行路徑', desc: 'HostRepairAgent', done: false }, + { id: 'T4', label: 'Redis 鎖', desc: '冪等保護', done: false }, + { id: 'T5', label: 'AuditLog', desc: 'Langfuse Trace', done: false }, + { id: 'T6', label: 'Service 整合', desc: '成功率回饋', done: false }, + { id: 'T7', label: 'Ansible 部署', desc: 'E2E 驗證', done: false }, + ].map(task => ( +
+

{task.id}

+

{task.label}

+

{task.desc}

+ {task.done &&

✓ 完成

} +
+ ))} +
+ + {/* Implementation metrics */} +
+ {[ + { label: '實作總速度', value: '28%', sub: 'T1-T2 完成', color: 'text-blue-500' }, + { label: '安全防禦等級', value: 'A', sub: '注入/known_hosts/鎖', color: 'text-green-500' }, + { label: '可觀測性', value: '計劃中', sub: 'T5 Langfuse+AuditLog', color: 'text-orange-500' }, + { label: '架構健康度', value: '優良', sub: 'URI scheme 設計', color: 'text-purple-500' }, + ].map(m => ( +
+
+

{m.value}

+

{m.label}

+

{m.sub}

+
+
+ ))} +
+
+ {/* ── Playbook count summary ── */}
{[