iluozhiqiang/hermes-aimaxia/hermes-async-worker
Claude Code and agent skill by iluozhiqiang/hermes-aimaxia
- community
Checking that the SKILL.md file is still in the repository.
Hermes 异步任务 Worker v2 - processing.json 统一状态管理,非阻塞交互
Install
npx vskill@latest install iluozhiqiang/hermes-aimaxia/hermes-async-workerSKILL.md
The same SKILL.md was published earlier as iluozhiqiang/hermes-aimaxia/hermes-async-worker.
Hermes 异步 Worker v2
核心思路
Hermes 只负责「聊天+安排工作」,Worker 负责「执行任务」。
所有 terminal 执行全部交给 Worker,Hermes 永远不被阻塞。
架构图
统一状态文件:processing.json
所有状态合并在一个文件,不再有 pending.json / answer.json / result_*.json
位置:/opt/data/tools/worker/processing.json
状态流转
交互字段
pending:{question: "...", options: ["A", "B"]}— 需要用户决策时填answer:"A"— 用户回答后填result:{returncode, stdout, stderr}— 完成后填
文件结构
注意:scheduler.py 和 task_queue/ 已废弃,v2 不再使用。
任务提交
Worker 管理
Worker 挂了不自动重启,询问用户是否要重启。
通知机制
Poller (poller.py) 检查 processing.json,发现 completed 或 pending_interactive 的任务输出通知。
--once模式:单次检查(cron 每分钟调用)- 循环模式:运行55秒后退出,cron 自动重启
已通知的 task_id 记录在 notified.json,避免重复通知。
Cron 配置
Hermes cronjob Worker 轮询通知,每分钟运行一次,检查 processing.json 并汇报。
交互流程示例(飞书 quote reply)
- 用户发消息
message_id: abc123 - Hermes 提交任务到 processing.json
- Worker 需要决策 →
status: pending_interactive,pending: {question, options} - Hermes 检测到 → reply 到飞书 abc123 消息(quote reply)
- 用户在 abc123 下回复 → Hermes 写
answer字段 - Worker 继续执行 →
status: completed - Hermes 通知结果 → 从 processing.json 删除任务
待实现功能
- 飞书卡片交互:pending 时发飞书 Card Message 带按钮,用户点击后按钮消失、显示选择
- 调研结论(2026-04-12):feishu.py 已有完整基础设施
- 卡片点击事件:
_handle_card_action_event()(line 1915)通过P2CardActionTrigger回调接收 - 卡片更新 API:
_update_approval_card()(line 1480)使用飞书message.update接口替换卡片内容 - 按钮值携带:
"value": {"hermes_action": "...", "approval_id": "..."}用于路由到不同处理逻辑 - 已有路径(approval):
hermes_action分支(line 1937-1978)→ 解析 choice →_update_approval_card()→ 按钮消失 ✅ - 待改造路径(generic):非
hermes_action分支(line 1980-2008)→ 只发 synthetic COMMAND → 不更新卡片 ❌ - 实现方案:在 generic 路径也加
message.update,从event.context.open_message_id获取卡片 message_id,构建无按钮的新卡片替换 - 注意:card action event 里没有直接暴露 message_id,需要从
event.context或event.open_message_id获取(需确认字段名) - Worker 自动启动:Hermes 启动时自动起 Worker
- 任务结果直接发回飞书:Poller 检测到完成后通过飞书 API 发消息
架构规则(用户确认)
- 并行执行:多任务同时跑,互不阻塞
- 3秒轮询间隔(poller.py 默认)
- 不自动重启 Worker:挂了问用户
- message_id 关联:飞书 quote reply 机制
- 所有文件在 /opt/data/ 下:便于 Git 管理
- 默认用 Python 脚本:Cloud Code 只用于复杂推理任务
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/software-development/hermes-async-worker/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/iluozhiqiang/hermes-aimaxia/hermes-async-worker)