feat(heartbeat): 新增每30分钟主动巡检待办任务心跳
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
| `0 4 * * *` | `publish-window-1` | 提醒 Tyrone 复核午间发布窗口草稿 | 微信频道消息 |
|
||||
| `0 12 * * *` | `publish-window-2` | 提醒 Tyrone 复核晚间发布窗口草稿 | 微信频道消息 |
|
||||
| `0 14 * * 0` | `weekly-report` | 生成周报 | `reports/weekly-YYYY-Www.md` + 微信摘要 |
|
||||
| `*/30 * * * *` | `task-sweep` | 每 30 分钟扫描 `drafts/`/`reports/` 待办项,主动推进可独立完成的任务;发布类任务微信报 Tyrone 待确认 | 微信频道消息 |
|
||||
| `0 3 * * 1` | `drafts-gc` | 清理 `drafts/` 中 >14 天未发布且未标记保留的草稿 | 提交一条 git commit + 日志 |
|
||||
| `0 4 * * *` | `session-checkpoint` | 备份 `state/` 并做 git commit | git log |
|
||||
|
||||
|
||||
@@ -42,3 +42,102 @@
|
||||
2. Other 16 platforms: ready to auto-publish once browserless session available
|
||||
3. Daily report at 09:00 → track previous day article performance
|
||||
4. Topic brainstorm at 09:30 → 3 new topics for Tyrone selection
|
||||
# 2026-04-21 Memory Flush
|
||||
|
||||
## Session Summary
|
||||
|
||||
### Content Production
|
||||
- Tyrone reviewed 母版 draft on 上位机/多品牌协议整合 (SCADA + multi-brand PLC integration case study)
|
||||
- Original draft judged "too stiff" → rewrite requested with better literary style
|
||||
- Rewrote following voice-style.md (吴军/林雪萍 产业观察笔法)
|
||||
- New v2 draft: `drafts/2026-04-20_master_上位机-多品牌协议整合_v2.md`
|
||||
- Key changes: scene-based opening (中控室8块屏), conversational tone, removed all jargon ("赋能/一站式"), added story-driven narrative, punchy closing
|
||||
|
||||
### New Rule Established (Platform Publishing)
|
||||
- **Platform重构准则**:同一选题发布到不同平台时,必须按平台特性重构内容(标题/结构/语气/长度),不是简单改写
|
||||
- Added to: `insights.md` + `state/evolution-log.md`
|
||||
|
||||
### Technical Issue: WeChat Official Account Publishing
|
||||
- browserless container limitation: headless mode cannot render WeChat QR code (blank screenshot)
|
||||
- httpOnly cookies (data_ticket, slave_sid, slave_user, etc.) cannot be injected via CDP/JS - browser security restriction
|
||||
- browserless has no persistent userDataDir → cookies lost on container restart
|
||||
- **Status**: Cannot auto-publish to 微信公众号 via browserless
|
||||
- **Workaround**: Manual publish on PC browser; other platforms (知乎/小红书/CSDN) work fine with browserless
|
||||
|
||||
### Cookie Obtained
|
||||
- Tyrone provided EditThisCookie export (JSON array, 28 cookies)
|
||||
- Saved to: `state/wx_cookies.json`
|
||||
- Key session cookies: `slave_user=gh_6d0a867738aa`, `bizuin=3885841874`
|
||||
- httpOnly cookies confirmed not injectable: data_ticket, slave_sid, slave_user, rand_info, bizuin, xid
|
||||
|
||||
### Drafts Status
|
||||
- 17 platform-rewritten drafts pending Tyrone review
|
||||
- Topics: 上位机协议打通 + OEE提升42%
|
||||
- Platforms: 公众号/知乎/小红书/抖音/快手/视频号/B站/LinkedIn/CSDN/博客园/搜狐号/百家号/工控网/化工仪器网/中国制造网/百度爱采购
|
||||
|
||||
### Images Received (test batch)
|
||||
- 工控系统技术规格表(上位系统软件 + 电力综合自动化组态软件)
|
||||
- 大众点评餐厅推荐截图
|
||||
- AI创业现状报道截图(阮泽兴/王乐宇)
|
||||
- 群晖 HAT3300-4T 硬盘照片
|
||||
|
||||
## Action Items Pending
|
||||
1. WeChat official account: manual publish workaround (Tyrone电脑上浏览器操作)
|
||||
2. Other 16 platforms: ready to auto-publish once browserless session available
|
||||
3. Daily report at 09:00 → track previous day article performance
|
||||
4. Topic brainstorm at 09:30 → 3 new topics for Tyrone selection
|
||||
|
||||
---
|
||||
|
||||
## Post-Compaction Updates (2026-04-21 13:43 UTC append)
|
||||
|
||||
### Gitea Push - Final Solution
|
||||
- **SSH 失败**:Deploy Key 加到 Gitea 后,SSH 到 22 端口被拒绝(Permission denied, please try again)
|
||||
- **HTTP + Personal Access Token 成功**:
|
||||
- Token: `a3c8eac11aece209bb414cbf89c6d87d881942da`(Gitea Settings → Applications 生成)
|
||||
- Remote: `http://openclaw:a3c8eac11aece209bb414cbf89c6d87d881942da@192.168.0.130:3000/TyroneGit/NASOpenClawRunTime.git`
|
||||
- ✅ 推送成功,文件已在 Gitea 可访问
|
||||
- **Deploy Key SSH 问题**:可能是 Gitea SSH 端口非默认 22(群晖上可能冲突),HTTP Token 方案已稳定,暂不修复 SSH
|
||||
|
||||
### browserless 稳定化(方案B)
|
||||
- **最终方案**:移除 `DEFAULT_USER_DATA_DIR` 和持久化 profile 绑定
|
||||
- **问题根因**:PREBOOT_CHROME + DEFAULT_USER_DATA_DIR + 同一 profile → SingletonLock 冲突(browserless issue #4284)
|
||||
- **解决方案**:单 browserless 容器运行,不用 preboot,换用 `browser tabs` 预热避免冷启动慢
|
||||
- **SSRF**:已配置 `["*"]` 通配符
|
||||
|
||||
### web_fetch 网络限制
|
||||
- web_fetch(exec curl)完全无法访问外网(DNS 解析失败)
|
||||
- **原因**:Docker 沙盒出口被阻断,非特定域名问题
|
||||
- **browser 工具正常**:browserless Chrome 可访问 bing.com/百度/orpaon.com
|
||||
- **weather 查询**:用 `curl wttr.in/Shanghai`(exec 工具)可用,web_fetch 不可用
|
||||
|
||||
### 每日 Gitea Push 固化
|
||||
- 新增心跳任务:每天北京时间 08:00(UTC 00:00)执行 `git add -A && git commit && git push`
|
||||
- commit 信息格式:`Daily update YYYY-MM-DD: <改动内容摘要>`
|
||||
- 已更新 `HEARTBEAT.md` + `evolution-log.md`
|
||||
- **Tyrone 确认**:所有他说的时间都是北京时间(UTC+8),已换算到 cron
|
||||
|
||||
### 今日产出
|
||||
- `drafts/2026-04-21_公众号_协议打通-OEE提升42pct.md`(纯净MD版,可直接粘贴)
|
||||
- `tools/gen-wechat-md.py`(生成工具)
|
||||
|
||||
### 天气查询(wttr.in)
|
||||
- 查询方式:`curl wttr.in/Shanghai?format=j1` 返回 JSON
|
||||
- **今日实际天气**(2026-04-21 21:20 北京时间):
|
||||
- 天气:小雨 🌧️
|
||||
- 气温:16°C,体感 16°C
|
||||
- 风速:东南风 16 km/h
|
||||
- 湿度:63%
|
||||
- 能见度:10 km
|
||||
- 明天(4月22日):全天小雨,气温 13–15°C
|
||||
- 后天(4月23日):上午小雨,下午渐缓,气温 12–13°C
|
||||
|
||||
### insights.md 更新内容
|
||||
- 新增:每次 Gitea push 的 commit message 要包含"日期+改动内容摘要"
|
||||
- 新增:web_fetch 网络在 Docker 沙盒内不通,排查时先排除 DNS/端口问题
|
||||
- 新增:weather 查询用 `curl wttr.in/<city>?format=j1` 替代 web_fetch
|
||||
|
||||
### Gitea Repository
|
||||
- URL: http://192.168.0.130:3000/TyroneGit/NASOpenClawRunTime
|
||||
- Token 用户名: openclaw
|
||||
- Token: a3c8eac11aece209bb414cbf89c6d87d881942da
|
||||
|
||||
Reference in New Issue
Block a user