Your Name
2572ec46d2
feat(ws4): Hermes NL 自然語言介面 — 12-Agent Claude SDK 接入(ADR-094/095)
## hermes/ 套件(5 個新模組)
### display_names.py
- 12 agent 視覺識別表(emoji + hashtag + handle + short_name)
- format_response_header() 產生 Telegram 前綴
### agent_loader.py
- 解析 .claude/agents/*.md frontmatter → system prompt
- lru_cache 避免重複讀檔
### safety_hooks.py
- 移植 awoooi-guard.js 20 條 HARD BLOCK 規則(DENY_PATTERNS)
- 5 條 MUTATE_PATTERNS → 須走審批流
### nl_gateway.py
- Layer 1: 關鍵字正則路由(12 條規則,<10ms)
- Layer 3: DEFAULT_AGENT = "debugger"
- Claude Agent SDK query() 非同步串流,取 ResultMessage.result
- 安全降級:SDK error → 友好錯誤訊息
### telegram_webhook.py
- WS4 Hermes NL 接入(@tsenyangbot mention 或私訊觸發)
- HERMES_NL_ENABLED=False(feature flag 保護,預設關閉)
## telegram_gateway.py
- send_hermes_reply(text, chat_id, reply_to_message_id)
無 500 字截斷,支援 Agent 長回覆
## config.py
- HERMES_NL_ENABLED: bool = False
- TELEGRAM_BOT_USERNAME: str = "tsenyangbot"
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 02:10:06 +08:00
..
2026-03-26 16:06:20 +08:00
2026-04-25 02:10:06 +08:00
2026-04-22 01:27:39 +08:00
2026-04-25 02:10:06 +08:00
2026-04-25 02:10:06 +08:00
2026-04-05 01:00:31 +08:00
2026-03-22 18:57:44 +08:00
2026-04-24 15:41:35 +08:00
2026-04-07 16:00:12 +08:00
2026-04-10 13:03:25 +08:00
2026-04-12 15:14:44 +08:00
2026-03-29 15:27:49 +08:00
2026-04-11 20:45:53 +08:00
2026-04-16 22:23:49 +08:00
2026-03-22 18:57:44 +08:00
2026-04-15 15:34:04 +08:00