Files
xianyu-hunter-hermes-skill/skill/xianyu-hunter-monitor/references/hermes-main-control-refactor-2026-05.md
T

102 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Hermes 主控重构记录(2026-05
## 背景
BOSS 明确希望闲鱼采集项目由 Hermes 直接操作:登录检查、创建任务、分析结果、定时执行;Web UI 仅作为备用渠道。
## 当前本地项目定位
工作目录:
```bash
/Users/chick/.Hermes/workspace/research/xianyu-hunter
```
当前模式:
- Hermes 是主控入口。
- Web UI 仅备用查看。
- 项目不需要配置 AI API / API Key / 模型。
- 项目不会自动联系卖家、不会聊天、不会询价。
- 项目只负责:搜索采集、详情采集、本地保守预筛、持久化结果。
- 深度判断由 Hermes 根据 `data/tasks.json` 或报告完成。
## 新增/主要入口
统一 CLI
```bash
node tools/xianyu_ops.mjs <command>
```
命令:
```bash
node tools/xianyu_ops.mjs status --port 3000
node tools/xianyu_ops.mjs start --port 3000
node tools/xianyu_ops.mjs stop
node tools/xianyu_ops.mjs login
node tools/xianyu_ops.mjs create --name '<任务名>' --queries '<关键词1,关键词2>' --requirements '<需求>'
node tools/xianyu_ops.mjs run --name '<任务名>' --queries '<关键词1,关键词2>' --requirements '<需求>' --limit 30
node tools/xianyu_ops.mjs report --task <task_id> --limit 30
```
`run` 会:检查/启动服务 → 创建任务 → 等待完成 → 生成报告。
## 报告与定时
报告脚本:
```bash
node tools/hermes_report.mjs --task <task_id> --limit 30
```
报告输出:
```text
reports/<task_id>-hermes-report.md
```
定时任务提示模板:
```text
tools/cron_prompt_template.md
```
定时任务要显式声明:不联系卖家、不下单、不承诺交易;如遇登录/验证码,报告需要人工处理,不绕过验证。
## 已验证
已做语法检查:
```bash
node --check server.mjs
node --check lib/task.mjs
node --check lib/filter.mjs
node --check public/app.js
node --check tools/xianyu_ops.mjs
node --check tools/hermes_report.mjs
```
已验证服务可启动:
```bash
node tools/xianyu_ops.mjs start --port 3000
node tools/xianyu_ops.mjs status --port 3000
```
注意:真实闲鱼端到端采集仍取决于账号登录状态、验证码和 Goofish DOM 选择器是否仍有效。
## 未来会话触发语
用户说以下任意内容时,应加载 `xianyu-hunter-monitor`
- “帮我监测闲鱼 …”
- “蹲一下闲鱼 …”
- “分析最新闲鱼采集结果”
- “检查闲鱼登录状态”
- “启动闲鱼助手”
- “每 X 小时监测 …”
优先用 `tools/xianyu_ops.mjs`,不要让 BOSS 手动打开 Web 除非需要查看或排错。