- Product: blastogene / 暴躁因子
- Domain: 智能体运维
- Maintained by: 503496348-ops product matrix
- Delivery posture: one-click setup, doctor diagnostics, smoke test, convergence gate, and clean-clone verification are part of the maintenance standard.
./install.sh
python3 scripts/doctor.py
python3 scripts/smoke.py
python3 scripts/product_convergence_gate.py --json
python3 -m pytest tests/ -qbash install.sh
python3 scripts/doctor.py
python3 scripts/smoke.pybash install.sh:自动执行 setup + smoke,适合第一次使用。python3 scripts/doctor.py:检查环境、入口文件和产品门禁,失败时给出修复建议。python3 scripts/smoke.py:执行产品收敛门禁和轻量核心冒烟验证。
社群运营管理工具 - 飞书群消息监控、数据分析、告警通知、Web看板
- 实时消息监控 - 飞书Webhook事件驱动,实时接收群消息
- SQLite存储 - 轻量级本地存储,无外部依赖
- 指标聚合 - 消息数量、活跃用户、响应时间、参与度分数
- 智能告警 - 消息突增/骤降、关键词触发、无人响应检测
- Web看板 - 可视化展示,只读API
cd ~/.hermes/skills/ops/blastogene
pip install -r requirements.txtpython scripts/init_db.pypython -m blastogene.config --create-default编辑配置文件 ~/.hermes/config/blastogene.yaml,添加要监控的群组ID。
python -m blastogene.collector --port 8080python -m blastogene.dashboard --port 8081飞书群事件 → Flask接收 → SQLite存储 → 聚合引擎 → 告警路由 → 通知发送
↓
Web看板(只读)
| 模块 | 职责 | 主存储 |
|---|---|---|
storage.py |
数据库操作、幂等去重 | SQLite |
collector.py |
飞书事件订阅、消息入库 | SQLite |
aggregator.py |
指标聚合、统计计算 | SQLite |
alerter.py |
告警规则、通知路由 | 配置文件 |
dashboard.py |
Web看板、只读API | 读SQLite |
config.py |
配置管理、Bitable配置读取 | 配置文件 |
GET /- 看板主页GET /api/chats- 获取群组列表GET /api/stats/<chat_id>- 获取群组统计GET /api/users/<chat_id>- 获取活跃用户GET /api/alerts/<chat_id>- 获取告警列表POST /api/alerts/<chat_id>/acknowledge- 确认告警GET /api/health- 健康检查
POST /webhook/event- 飞书事件回调GET /webhook/health- 健康检查GET /webhook/stats- 统计信息
默认规则:
| 规则ID | 类型 | 严重程度 | 描述 |
|---|---|---|---|
| default_spike | message_spike | warning | 消息量突增50% |
| default_drop | message_drop | warning | 消息量骤降50% |
| default_keyword | keyword_trigger | critical | 关键词触发(广告、刷单等) |
| default_no_response | no_response | warning | 问题等待回复超过1小时 |
- 配置管理入口(告警规则、监控目标)
- 低频人工录入(手动标记、备注)
- 聚合结果快照展示(日报、周报)
- 不作为原始消息主存储
- 不作为高频实时查询热路径
- 不作为复杂业务聚合引擎
database:
path: ~/.hermes/data/blastogene.db
cleanup_days: 90
monitoring:
groups:
- oc_xxxxxxxxxxxxxxxx
- oc_yyyyyyyyyyyyyyyy
check_interval: 300
alerts:
enabled: true
rules:
- rule_id: custom_rule
alert_type: message_spike
severity: warning
threshold: 2.0
check_period: daily
notify_chat: oc_zzzzzzzzzzzzzzzz
dashboard:
enabled: true
port: 8081
collector:
enabled: true
port: 8080
verify_token: your_token_herepython scripts/test_blastogene.pyfrom blastogene.alerter import AlertRule, AlertType, AlertSeverity
rule = AlertRule(
rule_id="custom_rule",
alert_type=AlertType.MESSAGE_SPIKE,
severity=AlertSeverity.WARNING,
threshold=2.0,
check_period="daily"
)
alert_manager.add_rule(rule)from blastogene.storage import MessageStore
from datetime import datetime, timedelta
store = MessageStore()
# 获取最近24小时的消息
messages = store.get_messages(
chat_id="oc_xxxxxxxxxxxxxxxx",
start_time=datetime.now() - timedelta(hours=24),
limit=1000
)- Phase 1仅支持飞书群消息监控
- 历史回补仅限"飞书当前可见窗口内"
- 统计口径标注"接入后累计"
- 不承诺恢复系统接入前全部历史数据
- Phase 1: 核心功能实现
- Phase 2: 增强分析功能
- 用户画像分析
- 话题聚类
- 情感分析
- Phase 3: 多平台支持
- Telegram群组
- Discord服务器
- Slack工作区
MIT License
AtomCollide
- 新增社群消息改写守卫:保护链接和关键术语,输出适合告警卡片的压缩文本。
- 交付物包含可导入模块与定向单元测试。
- 新增
scripts/product_convergence_gate.py:从远端干净 clone 后可运行python3 scripts/product_convergence_gate.py --json,检查 SKILL/README、入口文件、smoke 目标、测试与外部融合引用是否自洽。 - 新增
tests/test_product_convergence_gate.py:确保门禁在产品仓库中真实可执行,避免后续增强只停留在孤岛模块。
- 暴躁因子新增 Feishu Bridge Ingress:DM/group/topic/comment 准入、require mention、静默忽略与 invite-required 判定。
- 新增模块:
blastogene/feishu_ops_ingress.py - 来源模式:飞书/Lark 消息入口、本地 Claude/Codex 执行、会话 fingerprint、profile 隔离与安全门禁。
Adds product-neutral event card payload builders for runtime health and task-flow alerts, with HTTPS-only detail links.