init: sxbh.ltd 官网初始提交

- nginx 安全加固 (CSP, HSTS, 缓存策略)
- 共享 style.css
- 138个页面全部接入

Co-authored-by: Hermes AI <agent@hermes>
This commit is contained in:
Hermes CI Fix
2026-07-11 17:29:24 +08:00
co-authored by Hermes AI
commit e1a9b25afa
177 changed files with 21447 additions and 0 deletions
+159
View File
@@ -0,0 +1,159 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>博海科技 · 指挥中心</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #0d1117; color: #c9d1d9; font-size: 14px; }
.header { background: linear-gradient(135deg, #161b22 0%, #0d1117 100%); padding: 20px 24px; border-bottom: 1px solid #30363d; }
.header h1 { font-size: 20px; color: #f0f6fc; }
.header .sub { color: #8b949e; font-size: 12px; margin-top: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; padding: 16px 24px; }
.card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 16px; }
.card h3 { font-size: 13px; color: #8b949e; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.profile-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #21262d; }
.profile-row:last-child { border: none; }
.profile-name { color: #58a6ff; font-weight: 500; }
.port { color: #484f58; font-size: 11px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-ok { background: #3fb950; }
.status-warn { background: #d29922; }
.status-err { background: #f85149; }
.num { font-size: 24px; font-weight: 700; color: #f0f6fc; font-variant-numeric: tabular-nums; }
.num-label { font-size: 11px; color: #8b949e; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.links a { color: #58a6ff; text-decoration: none; font-size: 12px; padding: 4px 10px; background: #21262d; border-radius: 4px; }
.links a:hover { background: #30363d; }
.cron-item { display: flex; justify-content: space-between; padding: 4px 0; font-size: 12px; border-bottom: 1px solid #21262d; }
.cron-time { color: #484f58; }
.cron-name { color: #c9d1d9; }
.cron-ok { color: #3fb950; }
.cron-err { color: #f85149; }
.fullwidth { grid-column: 1 / -1; }
.two-col { grid-column: span 2; }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } .two-col { grid-column: 1; } }
</style>
<link rel="stylesheet" href="/style.css">
</head>
<body>
<div class="header">
<h1>🛸 博海科技 · 指挥中心</h1>
<div class="sub">Hermes Agent 系统状态 · GAP 1-7 · <span id="datetime"></span></div>
</div>
<div class="grid">
<!-- 系统概览 -->
<div class="card fullwidth">
<h3>📊 系统概览</h3>
<div style="display:flex; gap: 32px; flex-wrap:wrap;">
<div><div class="num" id="total-sessions">-</div><div class="num-label">今日会话</div></div>
<div><div class="num" id="total-crons">10</div><div class="num-label">定时任务</div></div>
<div><div class="num" id="total-articles">20</div><div class="num-label">知识文章</div></div>
<div><div class="num" id="total-chunks">101</div><div class="num-label">知识文本块</div></div>
<div><div class="num" id="profiles-ok">8</div><div class="num-label">Profile</div></div>
<div><div class="num" id="skills-count">11</div><div class="num-label">技能</div></div>
</div>
</div>
<!-- Profile 状态 -->
<div class="card">
<h3>🤖 8个Profile</h3>
<div id="profile-list">
<div class="profile-row"><span class="profile-name">🧠 研学</span><span class="port">:8652</span></div>
<div class="profile-row"><span class="profile-name">⚙️ 运维</span><span class="port">:8649</span></div>
<div class="profile-row"><span class="profile-name">📋 项目</span><span class="port">:8650</span></div>
<div class="profile-row"><span class="profile-name">💰 财务</span><span class="port">:8651</span></div>
<div class="profile-row"><span class="profile-name">📄 商务</span><span class="port">:8647</span></div>
<div class="profile-row"><span class="profile-name">🎨 创作</span><span class="port">:8642</span></div>
<div class="profile-row"><span class="profile-name">📋 行政</span><span class="port">:8646</span></div>
<div class="profile-row"><span class="profile-name">👤 员工</span><span class="port">(转交)</span></div>
</div>
</div>
<!-- 快速入口 -->
<div class="card">
<h3>🔗 快速入口</h3>
<div class="links">
<a href="https://monitor.sxbh.ltd" target="_blank">📈 Grafana</a>
<a href="https://hermes.sxbh.ltd" target="_blank">🏠 Dashboard</a>
<a href="https://ai.sxbh.ltd" target="_blank">📝 文章站</a>
<a href="https://git.sxbh.ltd" target="_blank">📦 Gitea</a>
<a href="https://wiki.sxbh.ltd" target="_blank">📖 Wiki</a>
<a href="https://ai.sxbh.ltd/knowledge-index.json" target="_blank">📋 知识索引</a>
</div>
<div style="margin-top:12px;font-size:12px;color:#8b949e;">
监控栈: Prometheus · Grafana · Loki · Alertmanager
</div>
</div>
<!-- 定时任务 -->
<div class="card two-col">
<h3>⏰ 定时任务 (10个)</h3>
<div>
<div class="cron-item"><span><span class="cron-ok"></span> 梦境模式-夜间复盘</span><span class="cron-time">03:00 每2日</span></div>
<div class="cron-item"><span><span class="cron-ok"></span> 依赖安全审计</span><span class="cron-time">06:00 每日</span></div>
<div class="cron-item"><span><span class="cron-ok"></span> Camoufox健康检查</span><span class="cron-time">07:00 每日</span></div>
<div class="cron-item"><span><span class="cron-ok"></span> 系统健康日报</span><span class="cron-time">08:00 每日</span></div>
<div class="cron-item"><span><span class="cron-ok"></span> 竞品仓库侦察</span><span class="cron-time">08:00 每日</span></div>
<div class="cron-item"><span><span class="cron-ok"></span> 内容运营日报</span><span class="cron-time">09:30 每日</span></div>
<div class="cron-item"><span><span class="cron-ok"></span> 财务日报</span><span class="cron-time">10:00 每日</span></div>
<div class="cron-item"><span><span class="cron-ok"></span> 跨Profile日报</span><span class="cron-time">12:00 每日</span></div>
<div class="cron-item"><span><span class="cron-ok"></span> 审计日志推送</span><span class="cron-time">每15分钟</span></div>
<div class="cron-item"><span><span class="cron-ok"></span> 项目进展周报</span><span class="cron-time">周一 09:00</span></div>
</div>
</div>
<!-- GAP 状态 -->
<div class="card">
<h3>🛡️ GAP 状态</h3>
<div>
<div class="profile-row"><span>GAP-1 沙箱</span><span class="cron-ok">✅ 运行中</span></div>
<div class="profile-row"><span>GAP-2 评测</span><span class="cron-ok">✅ 22面板</span></div>
<div class="profile-row"><span>GAP-3 审计</span><span class="cron-ok">✅ 350次</span></div>
<div class="profile-row"><span>GAP-4 调度</span><span class="cron-ok">✅ 8 Profile</span></div>
<div class="profile-row"><span>GAP-5 定时</span><span class="cron-ok">✅ 10任务</span></div>
<div class="profile-row"><span>GAP-6 Kanban</span><span class="cron-ok">✅ 已修复</span></div>
<div class="profile-row"><span>GAP-7 工作台</span><span class="cron-ok">✅ 当前页面</span></div>
</div>
</div>
<!-- 知识库 -->
<div class="card">
<h3>📚 知识库</h3>
<div class="num" id="kb-status">20篇 / 101块</div>
<div class="num-label" style="margin-top:4px;">ChromaDB · BM25 · 中文Embedding</div>
<div class="links" style="margin-top:12px;">
<a href="https://ai.sxbh.ltd/knowledge-index.json" target="_blank">📋 知识索引</a>
</div>
</div>
</div>
<script>
document.getElementById('datetime').textContent = new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' });
// 从 metrics exporter 拉数据
fetch('http://hermes.sxbh.ltd:9877/metrics')
.then(r => r.text())
.then(data => {
const lines = data.split('\n');
let sessions = 0;
let profiles_ok = 0;
for (const line of lines) {
if (line.startsWith('hermes_daily_sessions{')) {
const match = line.match(/hermes_daily_sessions\{[^}]+\} (\d+)/);
if (match) sessions += parseInt(match[1]);
}
if (line.startsWith('hermes_db_availability{')) {
const match = line.match(/hermes_db_availability\{[^}]+\} (\d+)/);
if (match && match[1] === '1') profiles_ok++;
}
}
document.getElementById('total-sessions').textContent = sessions;
document.getElementById('profiles-ok').textContent = profiles_ok;
})
.catch(() => { document.getElementById('total-sessions').textContent = '⚠️'; });
</script>
</body>
</html>