chore: 全面检查完成 + Calibre书库接入 192.168.123.11:8089

全面检查修复:
- 4个cron wrapper脚本空格问题修复
- NewAPI token验证逻辑确认(curl需带token)
- OpenClaw 2026.7.1最新
- Herms v0.18.0已升级

Calibre内容服务器:
- 书库: D:\calibre书库- 端口: 8089 (已放行防火墙)
- 启动: 牧尘手动执行(方案A)
- OPDS: http://192.168.123.11:8089/opds
- 状态: 正常运行
This commit is contained in:
小唯 A06 2026-07-18 02:09:03 +08:00
parent 3c0340d082
commit 86a79bd940
32 changed files with 1076 additions and 216 deletions

View File

@ -134,8 +134,8 @@
15429
],
"devops/devops-umbrella/SKILL.md": [
1783559415450897409,
28356
1784294959919892608,
28685
],
"devops/docker/SKILL.md": [
1783535483046971389,
@ -174,8 +174,8 @@
7841
],
"devops/self-healing-infrastructure/SKILL.md": [
1783937798290920581,
6705
1784297304976190293,
8251
],
"devops/self-hosted-tunneling/SKILL.md": [
1783535483046726537,
@ -237,6 +237,10 @@
1783567368465551259,
7925
],
"knowledge/cangjie-distill/SKILL.md": [
1784261634892601749,
8361
],
"mcp/native-mcp/SKILL.md": [
1783567355500854191,
13001
@ -398,8 +402,8 @@
103948
],
"research/stock-research/SKILL.md": [
1783939288382666476,
15670
1784278881171217354,
16425
],
"social-media/feishu-bot/SKILL.md": [
1782056456044416139,
@ -1442,6 +1446,19 @@
"requires_tools": []
}
},
{
"skill_name": "cangjie-distill",
"category": "knowledge",
"frontmatter_name": "cangjie-distill",
"description": "把书籍/视频/播客/课程/长内容蒸馏成一组可执行 skills 的元 skill。\n触发词拆书/蒸馏/把XX做成...",
"platforms": [],
"conditions": {
"fallback_for_toolsets": [],
"requires_toolsets": [],
"fallback_for_tools": [],
"requires_tools": []
}
},
{
"skill_name": "native-mcp",
"category": "mcp",

View File

@ -1 +1 @@
{"ts": 1783603789.1670141, "behind": -1, "rev": null, "ver": "0.18.0"}
{"ts": 1784278375.2932124, "behind": -1, "rev": null, "ver": "0.18.0"}

View File

@ -1,5 +1,5 @@
{
"updated_at": "2026-07-17T02:56:33.142050",
"updated_at": "2026-07-18T02:06:36.035013",
"platforms": {
"telegram": [],
"discord": [],

View File

@ -20,15 +20,15 @@
"schedule_display": "every 1m",
"repeat": {
"times": null,
"completed": 20434
"completed": 21122
},
"enabled": true,
"state": "scheduled",
"paused_at": null,
"paused_reason": null,
"created_at": "2026-06-21T18:52:36.548110+08:00",
"next_run_at": "2026-07-17T03:00:53.976682+08:00",
"last_run_at": "2026-07-17T02:59:53.976682+08:00",
"next_run_at": "2026-07-18T02:08:17.249460+08:00",
"last_run_at": "2026-07-18T02:07:17.249460+08:00",
"last_status": "ok",
"last_error": null,
"last_delivery_error": null,
@ -116,15 +116,15 @@
"schedule_display": "every 360m",
"repeat": {
"times": null,
"completed": 32
"completed": 35
},
"enabled": true,
"state": "scheduled",
"paused_at": null,
"paused_reason": null,
"created_at": "2026-07-09T01:30:54.618246+08:00",
"next_run_at": "2026-07-17T08:58:00.223558+08:00",
"last_run_at": "2026-07-17T02:58:00.223558+08:00",
"next_run_at": "2026-07-18T03:08:04.937526+08:00",
"last_run_at": "2026-07-17T21:08:04.937526+08:00",
"last_status": "ok",
"last_error": null,
"last_delivery_error": null,
@ -162,15 +162,15 @@
"schedule_display": "every 30m",
"repeat": {
"times": null,
"completed": 380
"completed": 426
},
"enabled": true,
"state": "scheduled",
"paused_at": null,
"paused_reason": null,
"created_at": "2026-07-09T01:42:21.503720+08:00",
"next_run_at": "2026-07-17T03:27:53.842611+08:00",
"last_run_at": "2026-07-17T02:57:53.842611+08:00",
"next_run_at": "2026-07-18T02:35:16.832470+08:00",
"last_run_at": "2026-07-18T02:05:16.832470+08:00",
"last_status": "ok",
"last_error": null,
"last_delivery_error": null,
@ -208,15 +208,15 @@
"schedule_display": "0 22 * * *",
"repeat": {
"times": null,
"completed": 7
"completed": 8
},
"enabled": true,
"state": "scheduled",
"paused_at": null,
"paused_reason": null,
"created_at": "2026-07-09T01:43:11.921492+08:00",
"next_run_at": "2026-07-17T22:00:00+08:00",
"last_run_at": "2026-07-16T22:01:48.840726+08:00",
"next_run_at": "2026-07-18T22:00:00+08:00",
"last_run_at": "2026-07-17T22:01:48.297089+08:00",
"last_status": "ok",
"last_error": null,
"last_delivery_error": null,
@ -258,7 +258,7 @@
"schedule_display": "0 3 * * *",
"repeat": {
"times": null,
"completed": 9
"completed": 10
},
"enabled": true,
"state": "scheduled",
@ -266,7 +266,7 @@
"paused_reason": null,
"created_at": "2026-07-09T02:10:36.846128+08:00",
"next_run_at": "2026-07-18T03:00:00+08:00",
"last_run_at": "2026-07-16T03:00:33.930524+08:00",
"last_run_at": "2026-07-17T03:00:53.952743+08:00",
"last_status": "ok",
"last_error": null,
"last_delivery_error": null,
@ -304,7 +304,7 @@
"schedule_display": "0 3 * * *",
"repeat": {
"times": null,
"completed": 8
"completed": 9
},
"enabled": true,
"state": "scheduled",
@ -312,7 +312,7 @@
"paused_reason": null,
"created_at": "2026-07-09T02:11:00.385573+08:00",
"next_run_at": "2026-07-18T03:00:00+08:00",
"last_run_at": "2026-07-16T03:00:34.337781+08:00",
"last_run_at": "2026-07-17T03:00:54.412593+08:00",
"last_status": "ok",
"last_error": null,
"last_delivery_error": null,
@ -442,15 +442,15 @@
"schedule_display": "0 5 * * *",
"repeat": {
"times": null,
"completed": 9
"completed": 10
},
"enabled": true,
"state": "scheduled",
"paused_at": null,
"paused_reason": null,
"created_at": "2026-07-09T02:46:29.345663+08:00",
"next_run_at": "2026-07-17T05:00:00+08:00",
"last_run_at": "2026-07-16T05:00:36.019274+08:00",
"next_run_at": "2026-07-18T05:00:00+08:00",
"last_run_at": "2026-07-17T05:00:56.117542+08:00",
"last_status": "ok",
"last_error": null,
"last_delivery_error": null,
@ -488,17 +488,17 @@
"schedule_display": "0 */6 * * *",
"repeat": {
"times": null,
"completed": 38
"completed": 42
},
"enabled": true,
"state": "scheduled",
"paused_at": null,
"paused_reason": null,
"created_at": "2026-07-09T02:51:48.935042+08:00",
"next_run_at": "2026-07-17T06:00:00+08:00",
"last_run_at": "2026-07-17T00:01:34.323821+08:00",
"last_status": "error",
"last_error": "Script exited with code 1\nstdout:\n[00:00:51] \ud83d\udce4 \u5f00\u59cb\u53cc\u5907\u4efd\u63a8\u9001...\n[00:01:11] \u26a0\ufe0f \u670d\u52a1\u5668\u672a\u6302\u8f7d\uff0c\u5c1d\u8bd5\u8fde\u63a5...\n[00:01:34] \u274c \u670d\u52a1\u5668\u6302\u8f7d\u5931\u8d25\n[00:01:34] \u274c \u8df3\u8fc7\u5907\u4efd\uff08\u670d\u52a1\u5668\u79bb\u7ebf\uff09",
"next_run_at": "2026-07-18T06:00:00+08:00",
"last_run_at": "2026-07-18T00:00:42.150338+08:00",
"last_status": "ok",
"last_error": null,
"last_delivery_error": null,
"deliver": "local",
"origin": {
@ -534,15 +534,15 @@
"schedule_display": "0 9 * * *",
"repeat": {
"times": null,
"completed": 7
"completed": 8
},
"enabled": true,
"state": "scheduled",
"paused_at": null,
"paused_reason": null,
"created_at": "2026-07-09T21:31:29.417518+08:00",
"next_run_at": "2026-07-17T09:00:00+08:00",
"last_run_at": "2026-07-16T09:00:39.901662+08:00",
"next_run_at": "2026-07-18T09:00:00+08:00",
"last_run_at": "2026-07-17T09:00:59.780457+08:00",
"last_status": "ok",
"last_error": null,
"last_delivery_error": null,
@ -580,15 +580,15 @@
"schedule_display": "0 21 * * *",
"repeat": {
"times": null,
"completed": 7
"completed": 8
},
"enabled": true,
"state": "scheduled",
"paused_at": null,
"paused_reason": null,
"created_at": "2026-07-09T21:31:33.068978+08:00",
"next_run_at": "2026-07-17T21:00:00+08:00",
"last_run_at": "2026-07-16T21:00:50.112416+08:00",
"next_run_at": "2026-07-18T21:00:00+08:00",
"last_run_at": "2026-07-17T21:00:15.239285+08:00",
"last_status": "ok",
"last_error": null,
"last_delivery_error": null,
@ -718,15 +718,15 @@
"schedule_display": "0 16 * * 1,2,3,4,5",
"repeat": {
"times": null,
"completed": 4
"completed": 5
},
"enabled": true,
"state": "scheduled",
"paused_at": null,
"paused_reason": null,
"created_at": "2026-07-12T01:32:01.773389+08:00",
"next_run_at": "2026-07-17T16:00:00+08:00",
"last_run_at": "2026-07-16T16:00:56.920701+08:00",
"next_run_at": "2026-07-20T16:00:00+08:00",
"last_run_at": "2026-07-17T16:00:21.741747+08:00",
"last_status": "ok",
"last_error": null,
"last_delivery_error": null,
@ -764,15 +764,15 @@
"schedule_display": "0 8 * * 1,2,3,4,5",
"repeat": {
"times": null,
"completed": 4
"completed": 5
},
"enabled": true,
"state": "scheduled",
"paused_at": null,
"paused_reason": null,
"created_at": "2026-07-12T02:01:32.403228+08:00",
"next_run_at": "2026-07-17T08:00:00+08:00",
"last_run_at": "2026-07-16T08:00:40.219012+08:00",
"next_run_at": "2026-07-20T08:00:00+08:00",
"last_run_at": "2026-07-17T08:01:00.114566+08:00",
"last_status": "ok",
"last_error": null,
"last_delivery_error": null,
@ -810,15 +810,15 @@
"schedule_display": "0 9 * * 1,2,3,4,5",
"repeat": {
"times": null,
"completed": 4
"completed": 5
},
"enabled": true,
"state": "scheduled",
"paused_at": null,
"paused_reason": null,
"created_at": "2026-07-12T02:33:28.322158+08:00",
"next_run_at": "2026-07-17T09:00:00+08:00",
"last_run_at": "2026-07-16T09:00:42.488042+08:00",
"next_run_at": "2026-07-20T09:00:00+08:00",
"last_run_at": "2026-07-17T09:01:02.406116+08:00",
"last_status": "ok",
"last_error": null,
"last_delivery_error": null,
@ -856,15 +856,15 @@
"schedule_display": "0 * * * *",
"repeat": {
"times": null,
"completed": 86
"completed": 110
},
"enabled": true,
"state": "scheduled",
"paused_at": null,
"paused_reason": null,
"created_at": "2026-07-13T12:03:22.805682+08:00",
"next_run_at": "2026-07-17T04:00:00+08:00",
"last_run_at": "2026-07-17T02:00:54.328392+08:00",
"next_run_at": "2026-07-18T03:00:00+08:00",
"last_run_at": "2026-07-18T02:00:17.944077+08:00",
"last_status": "ok",
"last_error": null,
"last_delivery_error": null,
@ -902,15 +902,15 @@
"schedule_display": "0 4 * * *",
"repeat": {
"times": null,
"completed": 3
"completed": 4
},
"enabled": true,
"state": "scheduled",
"paused_at": null,
"paused_reason": null,
"created_at": "2026-07-13T12:06:19.941605+08:00",
"next_run_at": "2026-07-17T04:00:00+08:00",
"last_run_at": "2026-07-16T04:00:36.446028+08:00",
"next_run_at": "2026-07-18T04:00:00+08:00",
"last_run_at": "2026-07-17T04:00:56.253411+08:00",
"last_status": "ok",
"last_error": null,
"last_delivery_error": null,
@ -948,15 +948,15 @@
"schedule_display": "every 10m",
"repeat": {
"times": null,
"completed": 491
"completed": 630
},
"enabled": true,
"state": "scheduled",
"paused_at": null,
"paused_reason": null,
"created_at": "2026-07-13T17:02:13.585342+08:00",
"next_run_at": "2026-07-17T03:03:53.721640+08:00",
"last_run_at": "2026-07-17T02:53:53.721640+08:00",
"next_run_at": "2026-07-18T02:14:16.743237+08:00",
"last_run_at": "2026-07-18T02:04:16.743237+08:00",
"last_status": "ok",
"last_error": null,
"last_delivery_error": null,
@ -971,7 +971,52 @@
"enabled_toolsets": null,
"workdir": null,
"fire_claim": null
},
{
"id": "1935e83a681a",
"name": "\u80a1\u7968\u77db\u76fe\u5206\u6790\u5468\u62a5",
"prompt": "\u8fd0\u884c\u77db\u76fe\u5206\u6790\u5468\u62a5\uff1a\n\n```\npython3 ~/.hermes/scripts/stock_contradiction_workflow.py report\n```\n\n\u8f93\u51fa\u5305\u542b\uff1a\n- \u56db\u7ef4\u8bc4\u5206\uff08\u5b8f\u89c2/\u57fa\u672c\u9762/\u6280\u672f\u9762/\u6d88\u606f\u9762\uff09\n- \u672c\u5468\u6838\u5fc3\u77db\u76fe\u5206\u6790\n- MA20\u4fe1\u53f7\u76d1\u63a7\uff08\u4e94\u7cae\u6db2\u7b49\u6301\u4ed3\u80a1\uff09\n- \u6301\u4ed3\u72b6\u6001\n- \u9a6c\u514b\u601d\u4e3b\u4e49\u5206\u6790\u6846\u67b6\u89c6\u89d2\n\n\u8f93\u51fa\u5b8c\u6574\u7684\u77db\u76fe\u5206\u6790\u62a5\u544a\u3002",
"skills": [],
"skill": null,
"model": "stepfun-ai/step-3.5-flash",
"provider": "newapi-local",
"provider_snapshot": null,
"model_snapshot": null,
"base_url": null,
"script": null,
"no_agent": false,
"context_from": null,
"schedule": {
"kind": "cron",
"expr": "0 9 * * 1",
"display": "0 9 * * 1"
},
"schedule_display": "0 9 * * 1",
"repeat": {
"times": null,
"completed": 0
},
"enabled": true,
"state": "scheduled",
"paused_at": null,
"paused_reason": null,
"created_at": "2026-07-17T12:36:01.639790+08:00",
"next_run_at": "2026-07-20T09:00:00+08:00",
"last_run_at": null,
"last_status": null,
"last_error": null,
"last_delivery_error": null,
"deliver": "feishu:oc_81f6df701c872a1122f32080e366543f",
"origin": {
"platform": "feishu",
"chat_id": "oc_cd14ec7518926e57d26c5e339ebba3b3",
"chat_name": "oc_cd14ec7518926e57d26c5e339ebba3b3",
"thread_id": null,
"user_id": "ou_f20eb15b3a76639fed35977c01ddcbb4"
},
"enabled_toolsets": null,
"workdir": null
}
],
"updated_at": "2026-07-17T03:00:53.782602+08:00"
"updated_at": "2026-07-18T02:07:17.249572+08:00"
}

View File

@ -1 +1 @@
1784228453.7860992
1784311696.7756748

View File

@ -1 +1 @@
1784228453.7885184
1784311696.7850146

View File

@ -1,10 +1,10 @@
{
"started_at": "2026-07-08T18:23:30.315261+00:00",
"last_deep_tick": "2026-07-16T18:59:13.437161+00:00",
"last_light_tick": "2026-07-16T19:00:28.782152+00:00",
"last_deep_tick": "2026-07-17T18:06:06.483801+00:00",
"last_light_tick": "2026-07-17T18:08:49.535231+00:00",
"last_state": {
"disk_pct": 44,
"mem_pct": 82,
"disk_pct": 48,
"mem_pct": 76,
"processes": {
"zhiyid": true,
"bge": true,
@ -12,17 +12,17 @@
"hermes": true
}
},
"tick_count": 22391,
"deep_tick_count": 2253,
"tick_count": 25075,
"deep_tick_count": 2522,
"solved_count": 1,
"learned_count": 0,
"uptime_seconds": 310438,
"uptime_seconds": 61747,
"last_reflection": {
"evaluation_previous_goal": "LLM\u8c03\u7528\u5931\u8d25",
"memory": "\u4e0a\u6b21\u8c03\u7528\u5931\u8d25",
"next_goal": "\u91cd\u8bd5"
},
"last_profile_update": 1784207184.5020347,
"last_profile_update": 1784297132.870066,
"soulful": {
"recent_moments": [
{

1
daemon/daemon.pid Normal file
View File

@ -0,0 +1 @@
2474091

View File

@ -30,3 +30,5 @@
{"timestamp": "2026-07-13T03:27:48.239922+00:00", "type": "startup", "summary": "Daemon v2.0 启动, 方案库 4 个", "details": ""}
{"timestamp": "2026-07-13T04:46:29.959620+00:00", "type": "startup", "summary": "Daemon v2.0 启动, 方案库 4 个", "details": ""}
{"timestamp": "2026-07-13T05:52:40.871196+00:00", "type": "startup", "summary": "Daemon v2.0 启动, 方案库 4 个", "details": ""}
{"timestamp": "2026-07-17T00:58:54.922437+00:00", "type": "startup", "summary": "Daemon v2.0 启动, 方案库 4 个", "details": ""}
{"timestamp": "2026-07-17T00:59:41.734814+00:00", "type": "startup", "summary": "Daemon v2.0 启动, 方案库 4 个", "details": ""}

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"pid":10982,"kind":"hermes-gateway","argv":["/home/muc/.hermes/hermes-agent/.venv/lib/python3.11/site-packages/hermes_cli/main.py","gateway","run"],"start_time":213011,"gateway_state":"running","exit_reason":null,"restart_requested":false,"active_agents":0,"platforms":{"webhook":{"state":"connected","error_code":null,"error_message":null,"updated_at":"2026-07-09T15:12:06.693466+00:00"},"feishu":{"state":"connected","error_code":null,"error_message":null,"updated_at":"2026-07-09T15:12:07.191293+00:00"},"weixin":{"state":"fatal","error_code":"weixin_missing_token","error_message":"Weixin startup failed: WEIXIN_TOKEN is required","updated_at":"2026-07-09T15:12:07.200539+00:00"}},"updated_at":"2026-07-15T17:30:43.124347+00:00"}
{"pid":10982,"kind":"hermes-gateway","argv":["/home/muc/.hermes/hermes-agent/.venv/lib/python3.11/site-packages/hermes_cli/main.py","gateway","run"],"start_time":213011,"gateway_state":"running","exit_reason":null,"restart_requested":false,"active_agents":1,"platforms":{"webhook":{"state":"connected","error_code":null,"error_message":null,"updated_at":"2026-07-09T15:12:06.693466+00:00"},"feishu":{"state":"connected","error_code":null,"error_message":null,"updated_at":"2026-07-09T15:12:07.191293+00:00"},"weixin":{"state":"fatal","error_code":"weixin_missing_token","error_message":"Weixin startup failed: WEIXIN_TOKEN is required","updated_at":"2026-07-09T15:12:07.200539+00:00"}},"updated_at":"2026-07-17T18:06:43.512629+00:00"}

@ -1 +1 @@
Subproject commit 8edad71cd9ef4b44a139d5586daf17cae34376e9
Subproject commit c4764a90503771d377f290f98ef133676f550939

View File

@ -1,6 +1,6 @@
{
"updated_at": "2026-07-16T19:00:28.843339+00:00",
"uptime_minutes": 5173,
"updated_at": "2026-07-17T18:08:49.582338+00:00",
"uptime_minutes": 1029,
"cares": [
{
"id": "69396b42",

View File

@ -12,7 +12,7 @@ skills软链prof-b/skills/→default/skills/。约定删前飞书create
§
NewAPI token48位纯字符不带sk-前缀。
§
牧尘工作风格:话少直接,短指令"codex研究"/"汇总图片生成"/"调好comfyui"/"做了"直接执行不废话。不需要确认流程、不需要科普、不需要预研汇报——做完直接出结果。Excel/报表必须发文件MEDIA:路径不发文本内容。生成后先验证文件非空再发。财务任务参照PDF格式输出不随意发挥。"全部开始"=直接执行
牧尘工作风格:话少直接,短指令,直接执行不废话。不需要确认流程/科普/预研汇报——做完直接出结果。**分析必须落地**给分析框架后必须同时规划固化cron/脚本/工作流),只讨论不执行=没完成。Excel/报表发文件MEDIA:路径不发文本。财务参照PDF格式。马克思主义哲学与经济学是认真学习方向需书籍/PDF/视频资料(拍照发我)
§
Soulful数据流向小唯非推用户。飞书推送限"只有牧尘能决定的事"。牵挂优先行动。openclaw独立飞书bot无法直接systemctl。
§

View File

@ -1,17 +1,17 @@
{
"timestamp": "2026-07-12T02:17:53.835463+00:00",
"timestamp": "2026-07-17T08:56:47.051125+00:00",
"metrics": {
"daemon": {
"uptime_minutes": 2407,
"total_ticks": 9303,
"deep_thoughts": 942,
"uptime_minutes": 476,
"total_ticks": 24000,
"deep_thoughts": 2415,
"alerts_sent": 0,
"solutions_applied": 1,
"learned_solutions": 0,
"errors": 21,
"crashes": 6,
"model_calls": 787,
"model_tokens": 924744
"errors": 8,
"crashes": 0,
"model_calls": 29,
"model_tokens": 36474
},
"cron": {
"total_jobs": 2,
@ -21,56 +21,56 @@
"agent_jobs": 0
},
"skill": {
"total_skills": 114,
"total_skills": 121,
"avg_score": 6.0,
"grade_distribution": {
"A": 0,
"B": 67,
"C": 47,
"D": 0
"B": 72,
"C": 48,
"D": 1
},
"needs_attention": 0,
"categories": 31
"needs_attention": 1,
"categories": 33
},
"model": {
"total_models_tested": 16,
"stable_models": 8,
"unstable_models": 0,
"dead_models": 8,
"fastest_model": "microsoft/phi-4-mini-instruct",
"stable_models": 3,
"unstable_models": 1,
"dead_models": 12,
"fastest_model": "minimaxai/minimax-m2.7",
"fastest_latency": 0
},
"timestamp": "2026-07-12T02:17:53.835430+00:00"
"timestamp": "2026-07-17T08:56:47.051092+00:00"
},
"bottlenecks": [
{
"area": "daemon",
"severity": "high",
"desc": "Daemon 崩溃 6 次",
"suggestion": "检查 daemon.log 定位崩溃原因"
"area": "model",
"severity": "info",
"desc": "大量模型不可用 (12个dead)",
"suggestion": "可能 NewAPI 后端负载高,特定时段再测"
},
{
"area": "daemon",
"severity": "medium",
"desc": "Daemon 有 21 个错误",
"desc": "Daemon 有 8 个错误",
"suggestion": "审查 daemon 日志中的错误模式"
}
],
"trends": [
{
"type": "positive",
"desc": "Daemon 稳定运行 2407分钟错误率低"
"desc": "Daemon 稳定运行 476分钟,错误率低"
},
{
"type": "neutral",
"desc": "模型稳定率 50%8/16"
"desc": "模型稳定率 19%3/16"
}
],
"recommendations": [
{
"priority": "high",
"area": "daemon",
"action": "检查 daemon.log 定位崩溃原因",
"priority": "info",
"area": "model",
"action": "可能 NewAPI 后端负载高,特定时段再测",
"expected_impact": "",
"effort": "30min"
},
@ -84,7 +84,7 @@
{
"priority": "info",
"area": "model",
"action": "考虑将默认模型切换到 microsoft/phi-4-mini-instruct(当前最快稳定模型)",
"action": "考虑将默认模型切换到 minimaxai/minimax-m2.7(当前最快稳定模型)",
"expected_impact": "提升响应速度",
"effort": "2min"
},
@ -96,5 +96,5 @@
"effort": "0min"
}
],
"health_score": 80
"health_score": 100
}

View File

@ -19,26 +19,6 @@
"notify_on_complete": true,
"watch_patterns": []
},
{
"session_id": "proc_8defabeb9321",
"command": "python3 ~/.hermes/scripts/daemon.py > ~/.hermes/daemon/daemon.log 2>&1",
"pid": 693331,
"pid_scope": "host",
"host_start_time": 31020895,
"cwd": "/home/muc/.hermes",
"started_at": 1783917989.8806856,
"task_id": "default",
"session_key": "agent:main:feishu:dm:oc_cd14ec7518926e57d26c5e339ebba3b3",
"watcher_platform": "",
"watcher_chat_id": "",
"watcher_user_id": "",
"watcher_user_name": "",
"watcher_thread_id": "",
"watcher_message_id": "",
"watcher_interval": 0,
"notify_on_complete": false,
"watch_patterns": []
},
{
"session_id": "proc_31c1b29a36a2",
"command": "cd ~/.hermes && python3 scripts/bge_embed_server.py",

View File

@ -65,8 +65,8 @@ def _emotion_importance(cat):
_stop_event = threading.Event()
KEY = "0ExNiLblJvIWBDpkS50fwOBw4MmqLyKdHJK5iQtlw9dOMWBP"
FAST_MODEL = "mistralai/mistral-large-3-675b-instruct-2512"
DEEP_MODEL = "mistralai/mistral-large-3-675b-instruct-2512"
FAST_MODEL = "stepfun-ai/step-3.5-flash"
DEEP_MODEL = "stepfun-ai/step-3.5-flash"
FEISHU_WEBHOOK = "https://open.feishu.cn/open-apis/bot/v2/hook/446db983-e392-4d2c-bfb8-f9060e5df3ad"
API = "http://127.0.0.1:3000/v1" # NewAPI gateway
@ -85,6 +85,16 @@ def log(msg):
with open(D + "/daemon.log", "a") as f:
f.write(line + "\n")
def log_reasoning_step(step_type, message, data=None):
"""结构化推理日志"""
ts = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
payload = json.dumps({"type": step_type, "msg": message, "data": data}, ensure_ascii=False)
line = f"[DAEMON] {ts} [{step_type}] {message}"
print(line, flush=True)
os.makedirs(D, exist_ok=True)
with open(D + "/daemon.log", "a") as f:
f.write(line + "\n")
def shell(cmd, timeout=15):
try:
r = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout)

View File

@ -1,18 +1,18 @@
{
"timestamp": "2026-07-13T02:15:26.750952+00:00",
"timestamp": "2026-07-17T09:07:55.291003+00:00",
"summary": {
"total_skills": 217,
"active": 117,
"total_skills": 221,
"active": 121,
"archived": 100,
"avg_score": 6.0,
"grades": {
"A": 0,
"B": 70,
"C": 47,
"D": 0
"B": 72,
"C": 48,
"D": 1
},
"categories": 31,
"needs_attention": 0
"categories": 33,
"needs_attention": 1
},
"categories": {
"email": {
@ -33,14 +33,14 @@
},
"autonomous-ai-agents": {
"count": 8,
"avg_score": 5.7
"avg_score": 5.8
},
"zhiyi": {
"count": 1,
"avg_score": 7.8
},
"research": {
"count": 5,
"count": 6,
"avg_score": 6.2
},
"rag-progressive-search": {
@ -71,6 +71,10 @@
"count": 1,
"avg_score": 6.6
},
"accounting": {
"count": 1,
"avg_score": 5.5
},
"media": {
"count": 5,
"avg_score": 6.0
@ -103,6 +107,10 @@
"count": 1,
"avg_score": 5.2
},
"knowledge": {
"count": 1,
"avg_score": 3.9
},
".hub": {
"count": 1,
"avg_score": 5.7
@ -124,7 +132,7 @@
"avg_score": 6.1
},
"creative": {
"count": 18,
"count": 19,
"avg_score": 6.0
},
"social-media": {
@ -140,13 +148,31 @@
"avg_score": 6.0
}
},
"needs_attention": [],
"needs_attention": [
{
"name": "cangjie-distill",
"category": "knowledge",
"description": "|",
"version": "1.2.0",
"path": "knowledge/cangjie-distill/SKILL.md",
"is_archived": false,
"has_refs": true,
"has_scripts": false,
"has_setup": false,
"has_tags": true,
"has_related": true,
"desc_len": 1,
"quality_score": 3.9,
"grade": "D",
"needs_attention": true
}
],
"top_skills": [
{
"name": "zhiyi",
"category": "zhiyi",
"description": "织忆 (MemoryWeave) 聚合技能 — API 客户端 + 开发工作流 + 运维规范。含 commit/recall API、数据架构、部署验证、Go 方法论。",
"version": "11.34",
"version": "11.36",
"path": "zhiyi/zhiyi/SKILL.md",
"is_archived": false,
"has_refs": true,
@ -314,6 +340,23 @@
}
],
"bottom_skills": [
{
"name": "cangjie-distill",
"category": "knowledge",
"description": "|",
"version": "1.2.0",
"path": "knowledge/cangjie-distill/SKILL.md",
"is_archived": false,
"has_refs": true,
"has_scripts": false,
"has_setup": false,
"has_tags": true,
"has_related": true,
"desc_len": 1,
"quality_score": 3.9,
"grade": "D",
"needs_attention": true
},
{
"name": "hermes-agent",
"category": "autonomous-ai-agents",
@ -466,23 +509,6 @@
"quality_score": 5.2,
"grade": "C",
"needs_attention": false
},
{
"name": "postgres",
"category": "devops",
"description": "PostgreSQL operations — SQL queries, pg_dump/restore, performance tuning, user management, and common troubleshooting.",
"version": "1.0.0",
"path": "devops/postgres/SKILL.md",
"is_archived": false,
"has_refs": false,
"has_scripts": false,
"has_setup": false,
"has_tags": true,
"has_related": false,
"desc_len": 118,
"quality_score": 5.2,
"grade": "C",
"needs_attention": false
}
],
"skills": [
@ -490,7 +516,7 @@
"name": "zhiyi",
"category": "zhiyi",
"description": "织忆 (MemoryWeave) 聚合技能 — API 客户端 + 开发工作流 + 运维规范。含 commit/recall API、数据架构、部署验证、Go 方法论。",
"version": "11.34",
"version": "11.36",
"path": "zhiyi/zhiyi/SKILL.md",
"is_archived": false,
"has_refs": true,
@ -779,7 +805,7 @@
"name": "soulful-framework",
"category": "soulful",
"description": "织忆 Soulful 情感层框架 — 心迹/画像/牵挂/感知四库及数据流向设计。含代码结构、最佳实践、数据流规范。",
"version": "1.2.0",
"version": "1.5.0",
"path": "soulful/soulful-framework/SKILL.md",
"is_archived": false,
"has_refs": true,
@ -911,6 +937,23 @@
"grade": "B",
"needs_attention": false
},
{
"name": "daemon-code-quality",
"category": "autonomous-ai-agents",
"description": "小唯专用 — daemon.py / soulful_core.py / hermes-agent 插件的代码审查与 opencode 修复工作流。包含审查→修复→commit→push 全链路规范。",
"version": "1.3.0",
"path": "autonomous-ai-agents/daemon-code-quality/SKILL.md",
"is_archived": false,
"has_refs": true,
"has_scripts": false,
"has_setup": false,
"has_tags": true,
"has_related": true,
"desc_len": 100,
"quality_score": 6.5,
"grade": "B",
"needs_attention": false
},
{
"name": "github-pr-workflow",
"category": "github",
@ -1510,7 +1553,7 @@
"name": "stock-research",
"category": "research",
"description": "小唯股票投研系统 — 四维选股 / 回测对比 / 每日信号",
"version": "1.2",
"version": "1.3",
"path": "research/stock-research/SKILL.md",
"is_archived": false,
"has_refs": true,
@ -1642,6 +1685,23 @@
"grade": "B",
"needs_attention": false
},
{
"name": "memory-system-landscape",
"category": "research",
"description": "AI/Agent 记忆系统竞品调研全流程 — 克隆分析、架构对比表、关键设计模式提炼。为织忆 soulful 记忆层和 zhiyi 参考系统选型提供依据。",
"version": "1.0.0",
"path": "research/memory-system-landscape/SKILL.md",
"is_archived": false,
"has_refs": true,
"has_scripts": false,
"has_setup": false,
"has_tags": true,
"has_related": false,
"desc_len": 77,
"quality_score": 6.0,
"grade": "B",
"needs_attention": false
},
{
"name": "obsidian-plugin",
"category": "software-development",
@ -1727,6 +1787,23 @@
"grade": "C",
"needs_attention": false
},
{
"name": "comfyui-rtx3050",
"category": "creative",
"description": "ComfyUI RTX 3050 Laptop (4GB VRAM) 调通指南 — 从零搭建到出图,含模型选型和常见坑",
"version": "2026-07-15",
"path": "creative/comfyui-rtx3050/SKILL.md",
"is_archived": false,
"has_refs": false,
"has_scripts": true,
"has_setup": false,
"has_tags": true,
"has_related": false,
"desc_len": 59,
"quality_score": 5.7,
"grade": "C",
"needs_attention": false
},
{
"name": "creative-ideation",
"category": "creative",
@ -1744,23 +1821,6 @@
"grade": "C",
"needs_attention": false
},
{
"name": "daemon-code-quality",
"category": "autonomous-ai-agents",
"description": "小唯专用 — daemon.py / soulful_core.py / hermes-agent 插件的代码审查与 opencode 修复工作流。包含审查→修复→commit→push 全链路规范。",
"version": "1.1.0",
"path": "autonomous-ai-agents/daemon-code-quality/SKILL.md",
"is_archived": false,
"has_refs": false,
"has_scripts": false,
"has_setup": false,
"has_tags": true,
"has_related": true,
"desc_len": 100,
"quality_score": 5.7,
"grade": "C",
"needs_attention": false
},
{
"name": "debugging-hermes-tui-commands",
"category": "software-development",
@ -2003,7 +2063,7 @@
"name": "self-healing-infrastructure",
"category": "devops",
"description": "自愈基础设施 — 系统监控、配置版本控制、自动回滚、自进化管线、技能管理、自我优化、学习闭环。完整自治体系。牧尘专用。",
"version": "1.7.0",
"version": "1.9.0",
"path": "devops/self-healing-infrastructure/SKILL.md",
"is_archived": false,
"has_refs": true,
@ -2152,6 +2212,23 @@
"grade": "C",
"needs_attention": false
},
{
"name": "hebi-kesai-financial-report",
"category": "accounting",
"description": "鹤壁科赛物业财务报表生成 — 科目余额表→小企业会计准则格式会小企01表/02表",
"version": "2026-07-15",
"path": "accounting/hebi-kesai-financial-report/SKILL.md",
"is_archived": false,
"has_refs": true,
"has_scripts": false,
"has_setup": false,
"has_tags": true,
"has_related": false,
"desc_len": 42,
"quality_score": 5.5,
"grade": "C",
"needs_attention": false
},
{
"name": "openclaw-feishu-debug",
"category": "openclaw",
@ -2207,7 +2284,7 @@
"name": "hermes-self-improvement",
"category": "autonomous-ai-agents",
"description": "当完成复杂任务、发现新工作流、或被用户纠正时将模式保存为skill。含技能创建规范、质量标尺、curator流程。",
"version": "4.2.0",
"version": "4.3.0",
"path": "autonomous-ai-agents/hermes-self-improvement/SKILL.md",
"is_archived": false,
"has_refs": true,
@ -2474,6 +2551,23 @@
"quality_score": 5.1,
"grade": "C",
"needs_attention": false
},
{
"name": "cangjie-distill",
"category": "knowledge",
"description": "|",
"version": "1.2.0",
"path": "knowledge/cangjie-distill/SKILL.md",
"is_archived": false,
"has_refs": true,
"has_scripts": false,
"has_setup": false,
"has_tags": true,
"has_related": true,
"desc_len": 1,
"quality_score": 3.9,
"grade": "D",
"needs_attention": true
}
]
}

View File

@ -298,6 +298,19 @@
"use_count": 9,
"view_count": 9
},
"cangjie-distill": {
"archived_at": null,
"created_at": "2026-07-17T03:43:05.089451+00:00",
"created_by": null,
"last_patched_at": "2026-07-17T03:52:17.345415+00:00",
"last_used_at": "2026-07-17T03:50:55.358278+00:00",
"last_viewed_at": "2026-07-17T03:50:55.355059+00:00",
"patch_count": 2,
"pinned": false,
"state": "active",
"use_count": 3,
"view_count": 3
},
"claude-code": {
"archived_at": null,
"created_at": "2026-06-30T11:24:39.459111+00:00",
@ -484,14 +497,14 @@
"archived_at": null,
"created_at": "2026-05-05T15:53:48.597780+00:00",
"created_by": "agent",
"last_patched_at": "2026-07-09T01:10:15.452824+00:00",
"last_used_at": "2026-07-09T01:10:17.083500+00:00",
"last_viewed_at": "2026-07-09T01:10:17.071834+00:00",
"patch_count": 86,
"last_patched_at": "2026-07-17T13:29:19.922093+00:00",
"last_used_at": "2026-07-17T13:25:57.378509+00:00",
"last_viewed_at": "2026-07-17T13:25:57.375434+00:00",
"patch_count": 90,
"pinned": false,
"state": "active",
"use_count": 76,
"view_count": 76
"use_count": 77,
"view_count": 77
},
"devops/devops-umbrella": {
"archived_at": null,
@ -901,13 +914,13 @@
"created_at": "2026-05-13T12:27:05.593125+00:00",
"created_by": null,
"last_patched_at": "2026-07-13T05:22:57.279017+00:00",
"last_used_at": "2026-07-13T05:23:56.887280+00:00",
"last_viewed_at": "2026-07-13T05:23:56.884019+00:00",
"last_used_at": "2026-07-17T03:49:54.455015+00:00",
"last_viewed_at": "2026-07-17T03:49:54.447257+00:00",
"patch_count": 77,
"pinned": false,
"state": "active",
"use_count": 104,
"view_count": 101
"use_count": 106,
"view_count": 103
},
"himalaya": {
"archived_at": null,
@ -1291,13 +1304,13 @@
"created_at": "2026-06-28T01:01:35.675166+00:00",
"created_by": "agent",
"last_patched_at": "2026-07-12T10:18:35.363784+00:00",
"last_used_at": "2026-07-12T17:50:34.561370+00:00",
"last_viewed_at": "2026-07-12T17:50:34.558226+00:00",
"last_used_at": "2026-07-17T14:13:03.432042+00:00",
"last_viewed_at": "2026-07-17T14:13:03.428673+00:00",
"patch_count": 9,
"pinned": false,
"state": "active",
"use_count": 26,
"view_count": 26
"use_count": 27,
"view_count": 27
},
"openclaw-feishu-debug": {
"archived_at": null,
@ -1563,14 +1576,14 @@
"archived_at": null,
"created_at": "2026-07-08T18:13:02.034240+00:00",
"created_by": "agent",
"last_patched_at": "2026-07-13T10:18:10.182130+00:00",
"last_used_at": "2026-07-13T11:47:22.014718+00:00",
"last_viewed_at": "2026-07-13T11:47:22.011367+00:00",
"patch_count": 68,
"last_patched_at": "2026-07-17T14:12:03.845674+00:00",
"last_used_at": "2026-07-17T14:10:17.380275+00:00",
"last_viewed_at": "2026-07-17T14:10:17.377053+00:00",
"patch_count": 81,
"pinned": false,
"state": "active",
"use_count": 53,
"view_count": 53
"use_count": 59,
"view_count": 59
},
"self-hosted-tunneling": {
"archived_at": null,
@ -1719,14 +1732,14 @@
"archived_at": null,
"created_at": "2026-07-11T17:51:28.790816+00:00",
"created_by": "agent",
"last_patched_at": "2026-07-13T10:41:28.384002+00:00",
"last_used_at": "2026-07-13T11:48:08.771014+00:00",
"last_viewed_at": "2026-07-13T11:48:08.766536+00:00",
"patch_count": 42,
"last_patched_at": "2026-07-17T09:01:21.172988+00:00",
"last_used_at": "2026-07-17T13:29:55.472969+00:00",
"last_viewed_at": "2026-07-17T13:29:55.469811+00:00",
"patch_count": 47,
"pinned": false,
"state": "active",
"use_count": 28,
"view_count": 28
"use_count": 33,
"view_count": 33
},
"subagent-driven-development": {
"archived_at": null,

View File

@ -681,6 +681,8 @@ journalctl --user -u xiaowei-startup.service
| `references/disk-layout-2026-06-07.md` | 本机 partition 布局和未分配空间位置记录来源disk-space-management skill |
| `references/session-2026-06-15.md` | Linux 桌面软件安装实测记录 — 微信/WPS/Tailscale/fcitx5来源linux-desktop-apps skill |
| `references/self-operations.md` | 自治运维体系 — 健康看门狗、自愈、自启动、每日复盘 (2026-07-09 新增) |
| `references/cron-wrapper-script-debug.md` | cron no_agent wrapper 脚本诊断 — 空格 vs 换行导致 Script not found4 个受影响 cron2026-07-17|
| `references/windows-calibre-book-library.md` | Windows Server Calibre 书库 — D:\calibre书库\、Content Server 8089、Users 共享访问、SSH 进程管理 |
| `references/pytorch-gfw-pitfall.md` | PyTorch CDN 被 GFW 阻断 + 阿里云/清华/腾讯云镜像解决方案 |
**Loading a reference:**

View File

@ -0,0 +1,88 @@
# Cron Wrapper 脚本诊断与修复2026-07-17 实测)
## 症状
```
Script not found: /home/muc/.hermes/scripts/skill-manager.py scan
Script not found: /home/muc/.hermes/scripts/optimizer.py report
```
明明文件存在,但 cron 报找不到。
## 根因
`hermes cron` 的 no_agent 模式把 `script` 字段当作**完整文件名**处理——带空格的字符串不会被解析为"脚本名 + 参数",而是当作单个带空格的文件名。
```bash
# cron 定义的 script 字段:
script: "skill-manager.py scan" # ❌ 找 "skill-manager.py scan" 这个文件(不存在)
script: "skill-manager.py" # ❌ 如果 scan 是参数,也找不到
```
## 诊断脚本
```bash
# 检查所有 no_agent cron 的 script 字段是否包含空格
hermes cron list 2>/dev/null | grep -B2 "no-agent" | grep "Script:"
# 或者直接查 wrapper 脚本内容
for f in ~/.hermes/scripts/*.sh; do
content=$(cat "$f" 2>/dev/null)
# 找有问题的模式python3 xxx.py 后面直接跟命令,中间没有换行
if echo "$content" | grep -qE "python3.*\.py [a-z]"; then
echo "❌ $f 有问题(缺换行)"
fi
done
```
## 正确写法
```bash
#!/bin/bash
python3 ~/.hermes/scripts/skill-manager.py scan
# ↑ 换行,不是空格
#!/bin/bash
cd ~/.hermes/scripts && python3 optimizer.py report
# ↑ 换行
```
## 批量检测
```python
# 查 cron job 配置中的问题 script
import json
with open(os.path.expanduser("~/.hermes/cron/jobs.json")) as f:
jobs = json.load(f)
issues = []
for job in jobs.get("jobs", []):
script = job.get("script", "")
mode = job.get("no_agent", False)
if mode and " " in script and not script.endswith(".sh"):
issues.append(f" ❌ {job['name']} ({job['id']}): script='{script}'")
if issues:
print("检测到 cron wrapper 问题:")
for i in issues: print(i)
else:
print("✅ 无 cron wrapper 问题")
```
## 今天修复的受影响 cron4个
| Cron ID | 名称 | 原因 |
|---------|------|------|
| c143d2afe640 | 技能健康扫描 | `skill-manager-scan.sh` 缺换行符 |
| 1e19f7429ddf | 自我优化报告 | `optimizer-report.sh` 同上 |
| b192a7cec1b5 | 主动学习自检报告 | `proactive-learning-report.sh` 同上 |
| 6061a782b772 | 股票投研周学习 | `stock_learning.sh` 不存在 |
## 预防
新增任何 cron job 时,如果 script 是 Python/脚本带参数:
1. 先写 `xxx.sh` wrapper`#!/bin/bash` + 单行 `python3 ...`
2. 再用 wrapper 路径作为 script 字段值
3. 用上面的诊断脚本验证
hermes cron 的 no_agent 模式**不支持参数展开**,任何参数都必须 bake 进 wrapper 脚本里。

View File

@ -0,0 +1,88 @@
# Windows Server Calibre 书库发现与访问
**发现时间**2026-07-17
**服务器**192.168.123.11 (Windows Server, administrator/xue.2538)
## 书库位置
```
Calibre 书库D:\calibre书库\
Calibre GUI C:\Program Files\Calibre2\calibre.exePID 16416运行中
Calibre Server未启动
```
**Calibre skill 原文路径**`C:\Users\Administrator\.hermes\skills\media\calibre-library\SKILL.md`
## Calibre Content Server
```bash
# 启动(需先关闭 Calibre GUI否则 DB 被锁)
"C:\Program Files\Calibre2\calibre-server.exe" --port 8089 --disable-auth "D:\calibre书库\"
# 带认证
"C:\Program Files\Calibre2\calibre-server.exe" --port 8089 --enable-auth "D:\calibre书库\"
# 测试
curl -s -o /dev/null -w "%{http_code}" http://192.168.123.11:8089/
# 200 = 运行中000 = 未启动
```
**注意**Calibre GUIcalibre.exe运行时会 lock metadata.dbcalibre-server 无法启动。需先关闭 GUI。
## 当前已知问题
| 问题 | 原因 | 状态 |
|------|------|------|
| Port 8089 无响应 | Calibre Server 未启动,或被 Windows 防火墙挡 | 待解决 |
| `C:\Users\Administrator\Calibre Library\` 为空 | 这是旧路径,书库实际在 `D:\calibre书库\` | 已知 |
| `Users` 共享只能看到空目录 | 真正的书库在 D: 盘,未暴露为共享 | 已知 |
## Windows Server 共享发现路径
```
net share → 发现可用共享
→ Users 共享 = C:\Users可 SMB 访问)
→ 发现 Calibre Library 目录存在但为空
→ 确认真正书库在 D:\calibre书库\(非共享)
```
## 访问方案选择
| 方案 | 操作 | 难度 |
|------|------|------|
| **ACalibre Content Server** | 服务器启动 calibre-server.exe防火墙开 8089 | 需 SSH + 手动启服务 |
| **BD: 盘设为共享** | 服务器上把 `D:\calibre书库\` 设为共享Everyone 读 | 需一次配置 |
| **C复制到 beifen 共享** | 手动把书复制到 beifen 共享目录 | 最简单但不实时 |
## SSH 命令参考Windows Server
```bash
# 查进程
sshpass -p "xue.2538" ssh administrator@192.168.123.11 "tasklist /FI \"IMAGENAME eq calibre*\""
# 查共享
sshpass -p "xue.2538" ssh administrator@192.168.123.11 "net share"
# 扫端口(快速)
for port in 8080 8081 8089 8090 8096 8100 8123 8443; do
code=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 2 http://192.168.123.11:$port/)
[ "$code" != "000" ] && echo "Port $port: HTTP $code"
done
# 查 D: 盘共享(扫描时发现 D: 未直接暴露,但 download/rymf6/webdav 等子目录有共享)
```
## Calibre skill 内容服务器端口总结
| 服务 | 端口 | 共享 | Calibre GUI |
|------|------|------|-------------|
| calibre-server | 8089 | D:\calibre书库\ | 关闭 GUI 后才能启动 |
---
**下次找书**:优先用方案 ACalibre Content Server。服务器上执行
```
taskkill /IM calibre.exe /F
"C:\Program Files\Calibre2\calibre-server.exe" --port 8089 --disable-auth "D:\calibre书库\"
```
然后小唯通过 `http://192.168.123.11:8089/` 访问全部书籍。

View File

@ -1,18 +1,24 @@
---
name: self-healing-infrastructure
description: "自愈基础设施 — 系统监控、配置版本控制、自动回滚、自进化管线、技能管理、自我优化、学习闭环。完整自治体系。牧尘专用。"
version: 1.8.0
date: 2026-07-13
version: 1.10.0
date: 2026-07-17
author: 小唯 A06
tags: [self-healing, monitoring, auto-rollback, evolution, watchdog, config-protection, daemon, backup, recovery]
category: devops
trigger: 系统部署、开机自启、配置更改、故障恢复场景、备份验证、恢复演练
trigger_notes: >
系统具备自我监控→自愈→自复盘→自进化闭环。
系统具备自我监控→自愈→自复盘→自进化闭环。
看门狗每30分钟巡检一次异常时自愈+飞书报警。
配置自带git版本控制改错自动回滚。
每天凌晨自进化管线分析差距并执行升级。
持久意识Daemon始终在线每5min深度思考、异常主动飞书。
**2026-07-17 新增陷阱Windows SSH 会话进程死亡**
通过 SSH 启动 Windows 进程时SSH 会话断开会导致进程终止。
`Start-Process -WindowStyle Hidden` / `cmd /c start /B` / `schtasks` 在 SSH 下均无法实现真后台。
解决方案:用户需在服务器上直接操作一次,或写启动脚本由用户手动运行。
详见 `references/calibre-server-windows-20260717.md`
---
# 自愈基础设施
@ -22,6 +28,7 @@ trigger_notes: >
- `daemon.py` — 持久意识每30s轻量tick每5min深度思考。方案库预置4个运行时自学习新方案。
- **2026-07-13 新增**deep tick 自动 capture 到 TencentDB:8420+ 每 tick 同步 `tddb.latest_persona``llm_context.json`
- `health-watchdog.sh` — 每30min检查磁盘/内存/GPU/进程,超阈值自愈+飞书通知。
- **2026-07-17 新增 NameError 陷阱**`log_reasoning_step()` 函数在 daemon.py 中不存在(从未定义),会导致启动即崩溃。修:补全函数定义(见 `references/daemon-nameerror-fix-20260717.md`)。
- **2026-07-13 全部5阶段落地**时间衰减recall / 遗忘曲线分层 / 画像LLM合成 / 冲突检测 / Consolidation引擎见 references/five-phase-implementation-20260713.md
- **2026-07-13 新增监控目标**`tdai-gateway`:8420人格记忆层失败自愈命令 `systemctl --user restart tdai-gateway`
- **统一记忆入口**`~/.hermes/scripts/memory_recall.py` — 同时查织忆(7821) + TencentDB(8420) + Soulful(JSON),支持 pretty/compact 两种输出格式
@ -30,7 +37,8 @@ trigger_notes: >
- 三系统记忆全面检查工作流:`references/three-system-memory-check-workflow.md`
- 记忆系统对比分析(参考项目):`references/memory-system-comparison.md`
- 画像可执行化注入模式2026-07-13 新发现):`references/system-prompt-snippets-injection.md` — behavior_rules → system_prompt_snippets → prefetch 注入
- **bge_embed_server 内存泄漏2026-07-13 根因+修复)**
- **Hermes 升级后全面检查**`references/hermes-upgrade-checklist.md`(进程/织忆/NewAPI/Cron/Daemon 标准清单 + 常见错误修复)
- bge_embed_server 内存泄漏2026-07-13 根因+修复):
- 根因ONNX SessionOptions 默认开启 `enable_cpu_mem_arena`arena 分配器会逐渐扩大保留区4天从1.6GB→5.8GBRSS 计入保留虚拟内存,非真实泄漏)
- 修复:`enable_cpu_mem_arena=False` + `enable_mem_pattern=False`bge_embed_server.py 第34-35行
- 监控cron `2891b3304339`「bge内存泄漏监控」每10分钟检查>2GB自动kill+重启
@ -47,6 +55,18 @@ trigger_notes: >
- `proactive_learning.py` — 主动学习引擎,四维自检+主题管理,每周推送报告。
- `stock_macd_strategy.py` — MACD策略单股回测+飞书推送
- `stock_compare.py` — 三策略对比MACD/MA20/双均线),批量多股
- `stock_contradiction_workflow.py`**马克思主义矛盾分析工作流**(新增 2026-07-17
- 四维评分(宏观-1/基本面+1/技术面-1/消息面0 → 综合决策)
- MA20 信号监控(腾讯行情 API
- 每周一 09:00 自动推飞书群cron `1935e83a681a`
- 输出:`~/.hermes/stock_backtest/contradiction_history.json`
- 用法:`python3 ~/.hermes/scripts/stock_contradiction_workflow.py report|check|record`
- 详情:`references/stock-contradiction-workflow.md`
- **Calibre 内容服务器**(新增 2026-07-17`references/calibre-server-windows-20260717.md`
- 服务器 `192.168.123.11:8089` 已配置SSH 会话进程死亡问题是核心障碍
- 书库路径:`D:\calibre书库\`
- `stock_adaptive.py` — ADX自适应策略趋势市MA20/震荡市MACD含批量测试
---

View File

@ -0,0 +1,78 @@
# Calibre 内容服务器 - Windows 启动问题记录
## 2026-07-17 问题
服务器 `192.168.123.11` 上 Calibre GUI 正常运行,但需要启动内容服务器让小唯有 HTTP 访问。
**症状**Calibre GUI 占用 DB 导致 calibre-server 无法同时运行SSH 会话断开后通过 SSH 启动的进程全部死亡。
## 解决方案
### 步骤 1关闭 Calibre GUI
```bash
sshpass -p "xue.2538" ssh administrator@192.168.123.11 "taskkill /F /IM calibre.exe"
```
### 步骤 2启动内容服务器防火墙放行
```powershell
# 找实际路径(用短路径绕过空格)
Get-ChildItem -Path C:\ -Filter calibre-server.exe -Recurse -ErrorAction SilentlyContinue
# 典型路径C:\Program Files\Calibre2\calibre-server.exe
# 启动(用 PROGRA~1 绕过空格)
Start-Process -FilePath C:\PROGRA~1\Calibre2\calibre-server.exe `
-ArgumentList '--port','8089','--disable-auth','--with-library','D:\calibre书库' `
-WindowStyle Hidden -PassThru
```
### 步骤 3放行防火墙一次性
```powershell
netsh advfirewall firewall add rule name="Calibre 8089" dir=in action=allow protocol=tcp localport=8089
```
### 步骤 4验证
```bash
curl http://192.168.123.11:8089/
```
## 关键教训SSH 会话进程死亡问题
**根因**SSH 会话断开时,该会话启动的所有前台/后台进程都被终止。
**试过的无效方法**
- `Start-Process -WindowStyle Hidden` → SSH 断开后进程死亡
- `cmd /c start /B ... &` → SSH 断开后进程死亡
- `cmd /c start /MIN "" ...` → SSH 断开后进程死亡
- `schtasks /SC DAILY /ST xx:xx /IT /Z` → 任务执行失败LastTaskResult=2中文路径编码问题
- 计划任务路径中的 `D:\calibre书库` 中文名乱码,导致找不到库
**有效方法**
1. PowerShell `Start-Process -PassThru` 在 SSH 会话存活期间有效,但需要验证断开后是否存活
2. 写批处理循环脚本让进程自动重启(见 `run_calibre.bat` 写入 `D:\beifen\`
## 重启后自启动方案
需要用户手动在服务器上操作(目前无法通过 SSH 完全可靠地实现):
**方案 A计划任务推荐**
1. 服务器上打开任务计划程序 `taskschd.msc`
2. 创建任务:触发器=登录时,执行 `C:\Program Files\Calibre2\calibre-server.exe --port 8089 --disable-auth`
3. 注意:需要先关闭 Calibre GUI
**方案 B开机批处理**
`D:\beifen\run_calibre.bat` 加入开机启动项(需要用户在服务器上操作一次)
## Calibre 书库位置
- **服务器路径**`D:\calibre书库\`
- **内容服务器端口**8089
- **SMB 访问**`\\192.168.123.11\Users\Administrator\`(但 Calibre Library 目录为空,可能是空目录或 mounted
## 参考
- Skill 文件:`~/.hermes/skills/media/calibre-library/SKILL.md`(服务器本地)
- 内容服务器默认端口 8089无认证模式 `--disable-auth`(局域网使用)

View File

@ -0,0 +1,59 @@
# daemon.py NameError 修复2026-07-17
## 问题
daemon.py 重启后崩溃:`NameError: name 'log_reasoning_step' is not defined`
根因:`log_reasoning_step()` 在 daemon.py 第 1198 行被调用,但函数从未定义。
症状:
```
File "/home/muc/.hermes/scripts/daemon.py", line 1198, in main_loop
log_reasoning_step("thinking", f"deep_tick #{ctx['deep_tick_count']} 触发 | ...", ...)
NameError: name 'log_reasoning_step' is not defined
```
## 修复
`log()` 函数之后、`shell()` 函数之前插入:
```python
def log_reasoning_step(step_type, message, data=None):
"""结构化推理日志"""
ts = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
payload = json.dumps({"type": step_type, "msg": message, "data": data}, ensure_ascii=False)
line = f"[DAEMON] {ts} [{step_type}] {message}"
print(line, flush=True)
os.makedirs(D, exist_ok=True)
with open(D + "/daemon.log", "a") as f:
f.write(line + "\n")
```
## 关键依赖
- `datetime`(已导入)
- `json`(已导入)
- `os`(已导入)
- `D` 全局变量log 目录,已存在)
- `flush=True`daemon 以 daemonize 运行时需要刷新缓冲区)
## 验证
```bash
# 重启并检查启动成功
pkill -f "python3 /home/muc/.hermes/scripts/daemon.py"; sleep 2
python3 /home/muc/.hermes/scripts/daemon.py > ~/.hermes/daemon/daemon.log 2>&1 &
sleep 8 && tail -5 ~/.hermes/daemon/daemon.log
# 应看到 "tick #NNNNN | 磁盘:X% 内存:X% 进程:X/4 方案:4"
# 而非 NameError traceback
```
## 相关代码位置
| 用途 | 函数 | 行 |
|------|------|---|
| 简单日志 | `log()` | ~L80 |
| 结构化推理日志(新增) | `log_reasoning_step()` | ~L89 |
| Shell 命令执行 | `shell()` | ~L99 |
| LLM 调用 | `call_llm()` | ~L95 |
| Deep tick 入口 | `main_loop()` 内 | ~L1198 |

View File

@ -75,13 +75,28 @@ daemon 日志自动裁剪到 100 条 journal 条目。`daemon.log` 在不重启
> ~/.hermes/daemon/daemon.log
```
## 模型路由
## 模型路由2026-07-17 更新)
Daemon 内部硬编码了两个模型(不查 model-health.json保持轻量
- 快速分析: `stepfun-ai/step-3.5-flash`<1s每5min一次
- 深度分析: `mistralai/mistral-large-3-675b-instruct-2512`~550ms异常触发时用
**当前配置**daemon 统一使用 `stepfun-ai/step-3.5-flash`NewAPI 上稳定,响应 <1s)。`call_llm()` timeout = 15s超时后静默降级返回空字符串 daemon 只收集状态不推送)。
如果这两个模型挂了Daemon 会静默降级为只收集状态不发消息。
**历史故障2026-07-17**:之前用的 `mistralai/mistral-large-3-675b-instruct-2512` 从 06:46 开始持续超时(>15s导致 deep tick 全部失败约 2 小时。症状:日志每 5min 出现一次 `[call_llm] 请求失败: timed out, 模型: mistralai/mistral-large-3-675b-instruct-2512`,之后恢复正常。
### 监控 LLM 健康
```bash
# 手动验证模型可用性
curl -s --connect-timeout 5 -X POST http://127.0.0.1:3000/v1/chat/completions \
-H "Authorization: Bearer 0ExNiLblJvIWBDpkS50fwOBw4MmqLyKdHJK5iQtlw9dOMWBP" \
-H "Content-Type: application/json" \
-d '{"model":"stepfun-ai/step-3.5-flash","messages":[{"role":"user","content":"hi"}],"max_tokens":10}' \
--max-time 20
# 查看 daemon 是否有 LLM 超时
grep "请求失败" ~/.hermes/daemon/daemon.log | tail -5
```
### daemon.py 修改后必须重启
文件修改不自动刷新,每次改 `daemon.py` 后必须 `systemctl --user restart xiaowei-daemon` 才生效。
## 数据文件

View File

@ -0,0 +1,102 @@
# Hermes 升级后全面检查流程
hermes 升级后(任何版本)立即执行以下检查,避免带隐患运行。
## 标准检查清单
```bash
# 1. 版本确认
hermes version
# → 显示 v0.18.0 (2026.7.1) 等
# 2. 关键进程
ps aux | grep -E "zhiyid|bge_embed|new-api|hermes" | grep -v grep
# 3. 织忆4组件健康
curl -s -H "X-API-Key: zhiyi-dev-key-2026" http://localhost:7821/api/v1/health
curl -s http://localhost:8000/health
curl -s -H "X-API-Key: zhiyi-dev-key-2026" http://localhost:7821/api/v1/graph/stats
# 节点数应 > 0recall 应返回命中
ls -la /tmp/zhiyi-ipc.sock
# 4. NewAPI必须带 token
TOKEN=$(grep "api_key:" ~/.hermes/config.yaml | head -1 | awk '{print $2}')
curl -s -H "Authorization: Bearer $TOKEN" http://127.0.0.1:3000/v1/models | \
python3 -c "import json,sys; d=json.load(sys.stdin); print('models:', len(d.get('data',[])))"
# → models: 136不带token报 invalid token但服务本身正常
# 5. Cron 任务错误检查
hermes cron list 2>&1 | grep -E "error|Script not found|exit"
# 已知错误模式:
# Script not found → wrapper 脚本里命令和参数粘连(缺空格),或新脚本缺 wrapper
# script exited with code 1 → 依赖的外部服务离线(服务器等)
# invalid token → curl 没带 tokenNewAPI 本身正常
# 6. Daemon 健康
tail -30 ~/.hermes/daemon/daemon.log | grep -E "deep_tick|ERROR"
# → 应看到 deep_tick #NNNN 触发+完成,无 ERROR
# 7. Hermes insights 抽检
hermes insights 2>&1 | head -10
# 8. OpenClaw
openclaw --version
openclaw doctor 2>&1 | tail -5
```
## 已知常见错误及修复
### 错误1Script not foundwrapper 脚本问题)
**症状**`cron list` 显示 `Script not found: /home/muc/.hermes/scripts/skill-manager.py scan`
**根因A**wrapper 脚本写成 `python3 ~/.hermes/scripts/skill-manager.py scan`(命令和参数粘连,缺空格)
**根因B**:新脚本创建了但没有对应的 `.sh` wrappercron 找不到
**修复**
```python
# 用 Python 重建所有 wrapper彻底避免 shell 空格问题)
import os
scripts = {
"skill-manager-scan.sh": "#!/bin/bash\npython3 ~/.hermes/scripts/skill-manager.py scan\n",
"optimizer-report.sh": "#!/bin/bash\ncd ~/.hermes/scripts && python3 optimizer.py report\n",
"proactive-learning-report.sh": "#!/bin/bash\ncd ~/.hermes/scripts && python3 proactive_learning.py report\n",
"stock_learning.sh": "#!/bin/bash\ncd ~/.hermes/scripts && python3 stock_learning.py report\n",
}
base = os.path.expanduser("~/.hermes/scripts")
for name, content in scripts.items():
path = os.path.join(base, name)
with open(path, "w") as f: f.write(content)
os.chmod(path, 0o755)
```
**2026-07-17 已修复**
- `skill-manager-scan.sh` — 空格修复
- `optimizer-report.sh` — 空格修复
- `proactive-learning-report.sh` — 空格修复
- `stock_learning.sh` — 新建(`stock_learning.py` 原有但缺 wrapper
### 错误2服务器离线导致 backup/挂载失败
**症状**`script exited with code 1`,日志显示 `服务器挂载失败`
**根因**:服务器 192.168.123.11 ping 不通(网络不可达)
**处理**:用户侧检查服务器状态,等待恢复后 cron 自动重试
## 检查结果记录2026-07-17 更新)
```
Hermes: v0.18.0 ✅
织忆图谱: 8348节点/68262边 ✅(持续增长)
织忆recall: 正常 ✅
bge-embed: 正常 ✅
NewAPI: 136模型 ✅Invalid token 是curl没带token
daemon: deep_tick #2414
Cron错误: 3个2个wrapper空格已修复1个服务器离线等待用户恢复
服务器 192.168.123.11: ✅ 在线ping < 15ms
Calibre 内容服务器: ⚠️ SSH会话问题需用户在服务器上手动启动见 references/calibre-server-windows-20260717.md
```
下次升级后重复此清单。

View File

@ -0,0 +1,90 @@
# 股票矛盾分析工作流
## 概述
用马克思主义辩证法指导股票投研,把哲学方法论变成每周固定工作流程。
## 核心框架
```
实践是检验真理的唯一标准 → 模拟持仓等MA20金叉验证判断
对立统一 → 市场多空矛盾分析
量变质变 → MA20金叉=质变临界点
否定之否定 → 每周复盘迭代策略(螺旋上升)
```
## 四维评分体系
| 维度 | 评分 | 说明 |
|------|------|------|
| 宏观面 | -1/0/+1 | 系统性风险/机会 |
| 基本面 | -1/0/+1 | 估值/业绩/竞争力 |
| 技术面 | -1/0/+1 | 趋势/均线/MACD |
| 消息面 | -1/0/+1 | 政策/事件/情绪 |
| **综合** | -4 ~ +4 | 决策依据 |
**决策规则**
- 综合 ≥ +2考虑入场
- 综合 ≤ -2空仓等待
- 其他:观察
## MA20 信号监控
用腾讯行情 API`qt.gtimg.cn`)实时查 MA20 状态:
| 信号 | 含义 | 操作 |
|------|------|------|
| golden_cross | 5日均线上穿20日均线 | 关注,可能是买入信号 |
| dead_cross | 5日均线下穿20日均线 | 离场信号 |
| neutral | 无明确信号 | 等待 |
## 工作流脚本
```bash
# 完整报告(含矛盾分析+MA20信号
python3 ~/.hermes/scripts/stock_contradiction_workflow.py report
# 快速检查 MA20 信号
python3 ~/.hermes/scripts/stock_contradiction_workflow.py check
# 记录本周分析(保存到历史)
python3 ~/.hermes/scripts/stock_contradiction_workflow.py record
```
## Cron 配置
- **任务 ID**`1935e83a681a`
- **调度**:每周一 09:00
- **推送**:飞书群 `oc_81f6df701c872a1122f32080e366543f`
- **模型**`stepfun-ai/step-3.5-flash`(免费)
## 当前持仓状态
| 股票 | 状态 | 均线条 |
|------|------|------|
| 五粮液 000858 | 空仓等金叉 | MA5<MA20空头排列 |
| 贵州茅台 600519 | 关注 | 跟踪 MA20 信号 |
## 典型矛盾案例:五粮液
```
矛盾1宏观经济下行 vs 消费刚需(白酒)
→ 表现:宏观面-1但五粮液基本面+1
→ 阶段:矛盾积累阶段,等待技术面确认方向
→ 行动:空仓等待,观察宏观拐点信号
矛盾2估值回归 vs 趋势惯性
→ 表现PE跌至历史低位但均线仍空头排列
→ 阶段:量变质变的临界积累期
→ 行动等MA20金叉质变信号再入场
```
## 与其他股票脚本的关系
- `stock_contradiction_workflow.py`**框架层**(方法论+周报),马克思主义分析框架
- `stock_signal.py`**信号层**(每日信号推送)
- `stock_news.py`**信息层**(每日新闻)
- `stock_portfolio.py`**组合层**(持仓管理)
- `stock_macd_strategy.py`**策略层**(回测验证)
分工:矛盾工作流给出**方向判断**,信号/新闻提供**每日输入**,策略层验证**实践效果**。

View File

@ -1,7 +1,7 @@
---
name: stock-research
version: "1.2"
date: "2026-07-13"
version: "1.3"
date: "2026-07-17"
tags: ["stock", "backtest", "selector", "macd", "ma20", "simulation"]
description: 小唯股票投研系统 — 四维选股 / 回测对比 / 每日信号
---
@ -12,6 +12,8 @@ description: 小唯股票投研系统 — 四维选股 / 回测对比 / 每日
Use when: building a stock analysis system, researching individual stocks, running backtests, or generating daily trading signals.
**⚠️ 牧尘铁律:分析必须落地。** 收到分析/研究类任务时,必须同时规划如何固化到 cron/脚本/工作流。只讨论不执行 = 没完成。给框架(矛盾分析/技术分析/任何方法论)后,立即思考落地路径。
## System Architecture (v1.1 — 2026-07-12 增强版)
```
@ -34,6 +36,7 @@ stock_ma20_backtest.py ← 茅台MA20策略回测 (新)
stock_compare.py ← 多策略对比 (MACD/MA20/dual-MA)
stock_news.py ← 每日宏观摘要
stock_paper.py ← 纸上交易账户
stock_contradiction_workflow.py ← 马克思主义矛盾分析周报每周一cron
stock_backtest/ ← 回测数据 + 模拟交易记录
```
@ -268,9 +271,12 @@ Also add `--compressed` flag — without it, ifzq API returns empty from that di
| `c48bbbb4fd18` | 五粮液每日信号 | 工作日16:00 | MA20信号推送 |
| `c293eead6688` | 每日组合信号 | 工作日09:00 | 7只股票MA20扫描 |
| `f3619a71aebb` | 每日股票新闻 | 工作日08:00 | 宏观+原油+大盘摘要 |
| `1935e83a681a` | 股票矛盾分析周报 | 每周一09:00 | 四维评分+矛盾分析+MA20监控 → 飞书群 |
**当前持仓2026-07-13**:平安银行(000001)9487股成本10.54,等待死叉卖出信号。
> **马克思主义分析框架**:见 `references/marxist-analysis-framework.md`。用辩证唯物主义指导投资决策:实践是检验真理的唯一标准,矛盾分析法分析市场,量变质变判断入场时机(金叉=质变信号),否定之否定迭代策略。
## Next Steps
1. ✅ **贵州茅台MA20回测**(2026-07-12): α=+6.05%胜率22.2%最大回撤26.2% → 结果已存档 `~/.hermes/stock_backtest/ma20_result_600519.json`

View File

@ -0,0 +1,130 @@
# 马克思主义股票分析框架 — 参考文档
## 核心理念
**现有读书方法论都是为人类读者蒸馏,不是为 agent 执行者蒸馏。**
- 给人看靠:故事/金句/情感钩子
- 给 agent 用靠trigger / 可执行步骤 / 判停标准
**马克思主义在投资中的核心**:实践是检验真理的唯一标准。
---
## 四字结构(快速提炼模板)
```
主题 → 核心本质2字以内
→ 对立面是什么2字以内
→ 根本矛盾在哪4字以内
→ 转化机制是什么4字以内
```
**输出格式**
```
|【仓颉·主题】
◆ 本质XX
◆ 对立XX
◆ 矛盾XXXX
◆ 转化XXXX
◆ 一句话XXX15字以内
```
---
## RIA-TV++ 六段详解
| 段 | 内容 | 要求 |
|----|------|------|
| R | Reading原文引用 | ≤150字标注出处 |
| I | Interpretation自述 | 用自己的话重写5-15行 |
| A1 | Past Application书中案例 | 作者亲自用过的案例1-3条 |
| A2 | Future Trigger何时调用★ | 决定 skill 是否被用起来 |
| E | Execution可执行步骤 | 1-2-3步骤有完成标准 |
| B | Boundary边界 | 何时不用,防止乱调用 |
---
## 马克思主义三定律在投资中的应用
### 1. 对立统一
市场里的矛盾是永恒的:
- 买者 vs 卖者(多空对立)
- 大资金 vs 小散户(力量不对等)
- 估值回归 vs 趋势惯性(两种赚钱方式)
### 2. 量变质变
MA20 金叉 = 量变到质变的转折点
- 矛盾积累阶段:宏观-1 + 基本面+1等待技术面确认
- 质变信号MA20 金叉价格从下穿越20日均线
### 3. 否定之否定
每轮复盘都是一次否定之否定:
- 策略 A 不行 → 否 A 得策略 B → B 又发现新问题 → 否 B 得策略 C
- 螺旋上升,不是原地打转
---
## 四维评分的矛盾分析视角
| 维度 | -1 | 0 | +1 |
|------|----|----|----|
| 宏观面 | 系统性压力/经济下行 | 中性 | 友好/政策支持 |
| 基本面 | 差/高估 | 中性 | 强/低估 |
| 技术面 | 下跌趋势/空头排列 | 震荡 | 上升趋势/多头排列 |
| 消息面 | 利空 | 中性 | 利好 |
**组合评分逻辑**
- 技术面空头(t=-1) + 基本面低估(f=+1) = **逆向机会** (+2不是卖点!)
- 技术空头 + 基本面高估 = **双杀风险** (-2)
- 技术多头 + 基本面低估 + 宏观不差 = **共振机会** (+3)
---
## 矛盾分析工作流
**脚本**`~/.hermes/scripts/stock_contradiction_workflow.py`
**用法**
```bash
# 周报(每周一 09:00 自动跑)
python3 ~/.hermes/scripts/stock_contradiction_workflow.py report
# 快速检查 MA20 信号
python3 ~/.hermes/scripts/stock_contradiction_workflow.py check
```
**输出内容**
1. 四维评分(宏观/基本面/技术面/消息面)
2. 本周核心矛盾分析
3. MA20 信号监控(所有持仓股)
4. 持仓状态
5. 马克思主义框架视角总结
**cron job**`1935e83a681a`「股票矛盾分析周报」— 每周一 09:00 → 飞书群 `oc_81f6df701c872a1122f32080e366543f`
---
## 五粮液当前矛盾分析(示例)
```
矛盾1宏观经济下行 vs 消费刚需(白酒)
表现:宏观面-1但五粮液基本面+1
阶段:矛盾积累阶段,等待技术面确认方向
行动:空仓等待,观察宏观拐点信号
矛盾2估值回归 vs 趋势惯性
表现PE跌至历史低位但均线仍空头排列
阶段:量变质变的临界积累期
行动等MA20金叉质变信号再入场
```
---
## 相关文件
| 文件 | 作用 |
|------|------|
| `scripts/stock_contradiction_workflow.py` | 矛盾分析工作流脚本 |
| `scripts/stock_portfolio.py` | 每日 MA20 信号扫描 |
| `scripts/stock_paper.py` | 纸上模拟交易 |
| `proactive_learning/topics.json` | 学习主题(含马克思主义框架元方法) |

View File

@ -1,6 +1,6 @@
{
"version": 2,
"updated_at": "2026-07-16T14:00:49.713477+00:00",
"updated_at": "2026-07-17T14:00:12.846389+00:00",
"behavior_rules": {
"answer_format": "结论先行 → 数据支撑 → 行动建议。不废话、不科普、不加补丁式回答。",
"code_quality": "修复后必须自测不等用户测。遇到stderr先试3种方法不行再报告障碍。",

View File

@ -0,0 +1,20 @@
📰 每日宏观+持仓摘要
【大盘】2026-07-17 08:00
📉 上证: 3882.41 (-1.85%)
📉 沪深300: 4.75 (-1.76%)
📈 五粮液: 73.90 (+0.11%)
【五粮液持仓信号】⭐ 关注
📈 布伦特原油: 84.83 (+0.60)
【宏观风险提示】
• 大盘若跌破关键均线 → 空仓信号加强
• 白酒消费数据持续低迷 → 基本面承压
• 人民币贬值预期 → 外资流出白酒板块压力
【五粮液状态】
价格: 73.9 (+0.11%)
MA20下方 → 空仓信号,等待金叉
小唯股票投研 · 每日新闻