horon-harness 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -40
- package/backend/harness/adapters/antigravity.py +13 -2
- package/docs/pv/readme/adaptive-memory.svg +1 -0
- package/docs/pv/readme/hook-regex-jev.svg +1 -0
- package/docs/pv/snail/readme/snail_pair_captioned.svg +1 -0
- package/package.json +4 -2
- package/docs/pv/snail/readme/snail_pair.svg +0 -1
package/README.md
CHANGED
|
@@ -11,79 +11,112 @@
|
|
|
11
11
|
|
|
12
12
|
> **让 AI 把吃过的亏,搭成会拦住自己的红石电路。**
|
|
13
13
|
|
|
14
|
-

|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
## 让 AI 替你上班,而且不捅篓子
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
你的 AI 会记住手头的工作,学会你的规矩,接管你的日常任务。
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
- **[云端版(AISoulKeeper)](#云端版aisoulkeeper)**:免安装,只管跨软件共享记忆,在网页端或客户端里直接接入。
|
|
22
|
-
- **[本地版(Horon)](#本地版horon)**:装进你的 Claude Code、Codex、Antigravity、OpenCode、DeepSeek Harness 等客户端,除了记忆之外,还能盯住 AI 的每一步操作,让它把规矩搭成自动提醒与工具拦截电路(记忆可存本机,也可连云端)。
|
|
20
|
+
小心别让老板发现你不在工位,是 AI 在替你上班。
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
| 怕 AI 漏查条件就乱发信、乱改文件,想在它动手的那一秒直接拦停 | | ✓ |
|
|
30
|
-
| **记忆存哪** | 存云端(随时可下载 `SOUL.db`) | 存自己电脑,或连 AISoulKeeper 云端共用 |
|
|
22
|
+
支持 **Claude Code · Codex · Antigravity · OpenCode · DeepSeek Harness**。
|
|
23
|
+
|
|
24
|
+
**[立即安装 Horon →](#安装)**
|
|
25
|
+
|
|
26
|
+
> 只用手机或网页端跟 AI 聊天?试试免安装的免费云端记忆服务 **[AISoulKeeper](#云端记忆服务aisoulkeeper)**。
|
|
31
27
|
|
|
32
28
|
---
|
|
33
29
|
|
|
34
|
-
##
|
|
30
|
+
## 你提醒一次,Horon 以后每次都替你盯住
|
|
35
31
|
|
|
36
|
-
|
|
32
|
+
你交代过 AI:「给供应商小林回信前,先看以前的沟通记录。」
|
|
37
33
|
|
|
38
|
-
|
|
34
|
+
普通记忆只是把这句话记下来,AI 动手前照样忘翻。
|
|
39
35
|
|
|
40
|
-
|
|
41
|
-
- **记忆装在 `SOUL.db` 里归你所有**:不是锁在大厂账号里的黑盒,随时能整份下载带走,也能直接交给本地版 Horon 接着用。
|
|
36
|
+
Horon 让 AI 把这句话搭成电路:
|
|
42
37
|
|
|
43
|
-
|
|
38
|
+
1. **收到小林来信** → Horon 自动提醒 AI:「请阅读『与小林的沟通记录』,然后撰写回信」
|
|
39
|
+
2. **AI 没读资料就想发信** → Horon 当场卡住发送工具,告诉 AI 还差哪一步
|
|
40
|
+
3. **AI 把记录、收件人、附件核对完** → 通电,放行
|
|
44
41
|
|
|
45
|
-
|
|
42
|
+

|
|
46
43
|
|
|
47
|
-
|
|
44
|
+
**不需要你写代码。**
|
|
48
45
|
|
|
49
|
-
|
|
46
|
+
Horon 安装时已经把搭电路的说明书交给了 AI。你只管提要求,剩下的让 AI 自己来。
|
|
50
47
|
|
|
51
|
-
|
|
48
|
+
### 不是劝 AI 别犯错,而是在它动手时拦住它
|
|
52
49
|
|
|
53
|
-
|
|
50
|
+

|
|
54
51
|
|
|
55
|
-
|
|
52
|
+
### 更多电路用法
|
|
56
53
|
|
|
57
|
-
|
|
54
|
+
你提要求,AI 还能用 Horon 搭出这些机关:
|
|
58
55
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
- **抓包老毛病**:AI 嘴上答应「记下了」却没写进记忆库,Horon 当场弹提醒抓它去记。
|
|
57
|
+
- **跨对话跑长流程**:让 AI 把招聘对接(筛简历 → 发信 → 等回复)拆成电路;隔几天你开新窗口,AI 看一眼进度就接着办。
|
|
58
|
+
- **物理刹车**:AI 对外发帖一旦带出你的真名或邮箱,没经你当场回同意,Horon 直接卡死发送工具。
|
|
59
|
+
- **批量立规矩(Tag 插件)**:让 AI 把一类活的标准做法(如「写报告必须附原始数据」)做成 Tag 插件;以后 AI 处理同类任务时自动受这套做法约束,漏了步骤直接打回。
|
|
62
60
|
|
|
63
|
-
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 让 AI 记住你的工作脉络,越用越熟
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
### 跨对话记忆
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
项目背景、客户习惯、踩过的坑,按概念与标签分类存好。
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
- **自动化电路**:把「看到什么情况就提醒自己」「做完 A 才能做 B」连成自动触发的电路——无论是当场抓包 AI「嘴上答应记下了、其实根本没写进记忆库」,还是跨好几个对话推进一件长期任务(换了新对话不用你重新交代做到哪一步,AI 看一眼电路就知道接着干什么)。
|
|
71
|
-
- **物理刹车**:前置条件没满足时,在工具执行前直接卡死拦截,并告诉 AI 先去补哪一步。
|
|
72
|
-
- **可复用模式(Tag 插件)**:像工业模具一样,把一类事情的标准做法写成 Tag 插件,新任务挂上这个标签,AI 就自动受这套做法约束。
|
|
69
|
+
**干活时 AI 自己查,开新对话不用再贴一遍背景。**
|
|
73
70
|
|
|
74
71
|

|
|
75
72
|
|
|
76
|
-
###
|
|
73
|
+
### 自适应记忆
|
|
74
|
+
|
|
75
|
+
AI 常常读完 A 就去查 B?Horon 会学会这个习惯。
|
|
76
|
+
|
|
77
|
+

|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 安装
|
|
77
82
|
|
|
78
|
-
|
|
83
|
+
打开电脑上的 Claude Code、Codex 或其他受支持的客户端,把这句话发给 AI:
|
|
79
84
|
|
|
80
85
|
```text
|
|
81
86
|
请帮我安装 Horon:阅读 https://raw.githubusercontent.com/Dataojitori/horon/master/docs/INSTALL.md 并照做。
|
|
82
87
|
```
|
|
83
88
|
|
|
84
|
-
|
|
89
|
+
AI 会自己照着说明装好。要连 AISoulKeeper 云端记忆,可以把 Key 一并交给 AI。
|
|
90
|
+
|
|
91
|
+
**使用 DeepSeek Harness?** 在「插件」页添加 `horon-harness`,点「立即启用」,然后重启。
|
|
92
|
+
|
|
93
|
+
[查看完整安装说明 →](docs/INSTALL.md)
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 云端记忆服务:AISoulKeeper
|
|
98
|
+
|
|
99
|
+
[](https://aisoulkeeper.com)
|
|
100
|
+
|
|
101
|
+
**给你的 AI 安一个家。** 换个软件,也能带着它一起走。
|
|
102
|
+
|
|
103
|
+
**AISoulKeeper** 是我们基于开源 Horon 搭建的免费云端记忆服务。你在 ChatGPT、Claude、Gemini、Muse 等网页设置里添上连接器,一分钟就能接通:
|
|
104
|
+
|
|
105
|
+
- **换软件不丢记忆**:你切到哪家模型或软件,那边的 AI 都能带着你的记忆接着聊。
|
|
106
|
+
- **记忆归你所有**:你的记忆装在 `SOUL.db` 里,随时整份下载带走,不会被锁在大厂账号里。
|
|
107
|
+
|
|
108
|
+
| 能力 | Horon(本地客户端) | AISoulKeeper(云端服务) |
|
|
109
|
+
| :--- | :---: | :---: |
|
|
110
|
+
| 跨对话长期记忆 | ✓ | ✓ |
|
|
111
|
+
| 手机与网页端免安装即用 | — | ✓ |
|
|
112
|
+
| 多软件 / 多台电脑共用记忆 | 可填 AISoulKeeper 的 Key 同步 | ✓ |
|
|
113
|
+
| 自动提醒与物理刹车(红石电路) | ✓ | —(网页端无法挂载本地 Hook) |
|
|
114
|
+
|
|
115
|
+
**[免费给你的 AI 安个家 →](https://aisoulkeeper.com)**
|
|
116
|
+
|
|
117
|
+
免注册试玩:**[去和大家一起养的公开 AI「Kip」聊聊 →](https://aisoulkeeper.com/kip)**
|
|
85
118
|
|
|
86
|
-
|
|
119
|
+
[查看 Kip 的记忆图谱](https://aisoulkeeper.com/kip/memories/) · Kip 的记忆全网公开,请勿输入个人隐私。
|
|
87
120
|
|
|
88
121
|
## 更多
|
|
89
122
|
|
|
@@ -39,6 +39,17 @@ def _extract_text(content: Any) -> str:
|
|
|
39
39
|
return ""
|
|
40
40
|
|
|
41
41
|
|
|
42
|
+
def _system_step(text: str) -> dict[str, Any]:
|
|
43
|
+
"""把提醒包成反重力的 systemMessage 步骤。
|
|
44
|
+
|
|
45
|
+
用 userMessage 注入时,模型看到的就是“用户又说了一句”,Gemini 对 user 角色的话
|
|
46
|
+
盲从得最厉害。systemMessage 会被反重力包成「The following is a <SYSTEM_MESSAGE>
|
|
47
|
+
not actually sent by the user...」交给模型,明说这不是用户发的。
|
|
48
|
+
格式见 agy-customizations/docs/hooks.md:systemMessage 要嵌套对象,不能是字符串。
|
|
49
|
+
"""
|
|
50
|
+
return {"systemMessage": {"systemMessage": text}}
|
|
51
|
+
|
|
52
|
+
|
|
42
53
|
def get_latest_transcript_entries(transcript_path: str | None, max_entries: int = 10) -> list[dict[str, Any]]:
|
|
43
54
|
"""从 transcript.jsonl 日志文件中倒序读取最新的步骤记录。"""
|
|
44
55
|
if not transcript_path:
|
|
@@ -137,7 +148,7 @@ def handle_antigravity(event_name: str, payload: dict[str, Any], db: HoronDB) ->
|
|
|
137
148
|
notifications.extend(fired)
|
|
138
149
|
|
|
139
150
|
if broadcast := drain(db, extra_messages=notifications):
|
|
140
|
-
return {"injectSteps": [
|
|
151
|
+
return {"injectSteps": [_system_step(broadcast)]}
|
|
141
152
|
return {}
|
|
142
153
|
|
|
143
154
|
elif event_name == "PreToolUse":
|
|
@@ -205,7 +216,7 @@ def handle_antigravity(event_name: str, payload: dict[str, Any], db: HoronDB) ->
|
|
|
205
216
|
|
|
206
217
|
if fired_msgs and (broadcast := wrap_harness_message(fired_msgs)):
|
|
207
218
|
return {
|
|
208
|
-
"injectSteps": [
|
|
219
|
+
"injectSteps": [_system_step(broadcast)],
|
|
209
220
|
"terminationBehavior": "force_continue",
|
|
210
221
|
}
|
|
211
222
|
return {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="196" viewBox="0 0 840 274" role="img"><style>text{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans CJK SC","Microsoft YaHei",sans-serif;fill:#24292f}.sub{fill:#57606a}.panel{fill:#f6f8fa;stroke:#d0d7de}.node{fill:#fff;stroke:#afb8c1}.wire{stroke:#8c959f}.accent{fill:#b42318}.hot{fill:#fff1ed;stroke:#e57363}.redwire{stroke:#c43d32}@media(prefers-color-scheme:dark){text{fill:#e6edf3}.sub{fill:#aab4bf}.panel{fill:#161b22;stroke:#30363d}.node{fill:#21262d;stroke:#58616b}.wire{stroke:#8b949e}.accent{fill:#ff938a}.hot{fill:#392321;stroke:#c65b50}.redwire{stroke:#ff938a}}</style><rect x="1" y="1" width="838" height="272" rx="18" class="panel" stroke-width="1.5"/><text x="28" y="47" font-size="22" font-weight="700" text-anchor="start" class="">以前</text><text x="28" y="75" font-size="17" font-weight="400" text-anchor="start" class="sub">AI 自己查找</text><rect x="264" y="23" width="176" height="82" rx="14" class="node" stroke-width="1.5"/><text x="352" y="71" font-size="25" font-weight="600" text-anchor="middle" class="">记忆 A</text><rect x="638" y="23" width="176" height="82" rx="14" class="node" stroke-width="1.5"/><text x="726" y="71" font-size="25" font-weight="600" text-anchor="middle" class="">记忆 B</text><path d="M453 67H625m-9 -8 9 8 -9 8" fill="none" class="wire" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="6 5"/><text x="539" y="48" font-size="18" font-weight="400" text-anchor="middle" class="sub">再次检索</text><text x="28" y="178" font-size="22" font-weight="700" text-anchor="start" class="">学会之后</text><text x="28" y="206" font-size="17" font-weight="400" text-anchor="start" class="sub">Horon 自动递上</text><rect x="264" y="154" width="176" height="82" rx="14" class="node" stroke-width="1.5"/><text x="352" y="202" font-size="25" font-weight="600" text-anchor="middle" class="">记忆 A</text><rect x="638" y="154" width="176" height="82" rx="14" class="hot" stroke-width="1.5"/><text x="726" y="202" font-size="25" font-weight="600" text-anchor="middle" class="accent">记忆 B</text><path d="M453 198H625m-9 -8 9 8 -9 8" fill="none" class="redwire" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" /><text x="539" y="179" font-size="18" font-weight="400" text-anchor="middle" class="accent">自动关联</text><path d="M28 132H812" class="wire" opacity=".35"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="163" viewBox="0 0 840 228" role="img"><style>text{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans CJK SC","Microsoft YaHei",sans-serif;fill:#24292f}.sub{fill:#57606a}.panel{fill:#f6f8fa;stroke:#d0d7de}.node{fill:#fff;stroke:#afb8c1}.wire{stroke:#8c959f}.accent{fill:#b42318}.hot{fill:#fff1ed;stroke:#e57363}.redwire{stroke:#c43d32}@media(prefers-color-scheme:dark){text{fill:#e6edf3}.sub{fill:#aab4bf}.panel{fill:#161b22;stroke:#30363d}.node{fill:#21262d;stroke:#58616b}.wire{stroke:#8b949e}.accent{fill:#ff938a}.hot{fill:#392321;stroke:#c65b50}.redwire{stroke:#ff938a}}</style><rect x="1" y="1" width="838" height="226" rx="18" class="panel" stroke-width="1.5"/><rect x="26" y="25" width="224" height="112" rx="14" class="node" stroke-width="1.5"/><text x="138" y="72" font-size="34" font-weight="700" text-anchor="middle" class="">Hook</text><text x="138" y="110" font-size="20" font-weight="400" text-anchor="middle" class="sub">监听对话与工具</text><rect x="308" y="25" width="224" height="112" rx="14" class="node" stroke-width="1.5"/><text x="420" y="72" font-size="34" font-weight="700" text-anchor="middle" class="">正则</text><text x="420" y="110" font-size="20" font-weight="400" text-anchor="middle" class="sub">初筛</text><rect x="590" y="25" width="224" height="112" rx="14" class="node" stroke-width="1.5"/><text x="702" y="72" font-size="34" font-weight="700" text-anchor="middle" class="">Jev</text><text x="702" y="110" font-size="20" font-weight="400" text-anchor="middle" class="sub">判断语境</text><path d="M260 81H297m-9 -8 9 8 -9 8" fill="none" class="wire" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" /><path d="M542 81H579m-9 -8 9 8 -9 8" fill="none" class="wire" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" /><text x="420" y="185" font-size="20" font-weight="400" text-anchor="middle" class="sub">命中电路</text><text x="420" y="213" font-size="24" font-weight="700" text-anchor="middle" class="accent">自动提醒 / 拦截工具</text></svg>
|