@riconext/hermes-repo 1.1.0 → 1.2.0
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/CHANGELOG.md +12 -0
- package/README.md +27 -18
- package/dist/cli.js +303 -219
- package/dist/cli.js.map +1 -1
- package/dist/templates/AGENTS.md.tpl +11 -5
- package/dist/templates/config.json.tpl +1 -1
- package/dist/templates/gitignore-block.txt +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4e1a9f7: 新增 capture 后自动 flush 调度配置。开启 `consolidate.autoFlush.enabled` 后,capture 成功写入时会根据待处理 session 数量、距离上次 flush 的时间和待处理内容字符数,在后台触发 `hermes-repo flush`。
|
|
8
|
+
|
|
9
|
+
## 1.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- cfa583b: 合并 llm 配置读取到通用配置模块,删除 readLlmConfig.ts 和 mergeLlmConfig.ts
|
|
14
|
+
|
|
3
15
|
## 1.1.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -76,8 +76,7 @@ hermes-repo 是挂在**你的 Git 项目**上的记忆层:不改变你平时
|
|
|
76
76
|
▼
|
|
77
77
|
在项目中创建/合并:
|
|
78
78
|
├── .memory/
|
|
79
|
-
│ ├── config.json # version, storage, assistants[], debug
|
|
80
|
-
│ ├── llm.json # [个人] 可选 LLM(gitignore,init 可生成示例)
|
|
79
|
+
│ ├── config.json # version, storage, assistants[], debug, llm
|
|
81
80
|
│ ├── captures/
|
|
82
81
|
│ │ ├── semantic/ # [个人] 语义记忆
|
|
83
82
|
│ │ ├── episodic/ # [个人] 情景记忆
|
|
@@ -114,7 +113,7 @@ Stop / stop hook → npx @riconext/hermes-repo capture
|
|
|
114
113
|
2. 读取会话 transcript(JSONL 等)
|
|
115
114
|
3. shouldCapture 质量过滤(过短/无信号 → exit 0 跳过)
|
|
116
115
|
4. 启发式写入 captures/<type>/capture-YYYY-MM-DD-NNN.md
|
|
117
|
-
5. 若
|
|
116
|
+
5. 若 config.json 中 llm 启用:入队 capture-llm 后台任务(detached)升级正文
|
|
118
117
|
6. 达阈值时 maybeScheduleConsolidate → 后台 flush(detached)
|
|
119
118
|
|
|
120
119
|
flush / runConsolidate(手动或 capture 后自动):
|
|
@@ -182,7 +181,7 @@ init 脚手架 → 日常编码(助手 + hooks)
|
|
|
182
181
|
|
|
183
182
|
```text
|
|
184
183
|
.memory/
|
|
185
|
-
├──
|
|
184
|
+
├── config.json # 个人:助手与 LLM 配置,含 apiKey,gitignore,勿提交
|
|
186
185
|
├── captures/ # 个人:semantic / episodic / procedural 原始捕获
|
|
187
186
|
├── topics/ # 团队:按主题整理后的约定
|
|
188
187
|
├── skills/ # 团队:可复用 SKILL.md
|
|
@@ -191,7 +190,6 @@ init 脚手架 → 日常编码(助手 + hooks)
|
|
|
191
190
|
├── refs/ # 个人:引用反馈(flush 时聚合)
|
|
192
191
|
├── promote/ # 个人:晋升 PR 草案(gitignore)
|
|
193
192
|
├── team/ # 团队:决策与冲突记录
|
|
194
|
-
└── config.json # 已启用助手、存储后端等
|
|
195
193
|
```
|
|
196
194
|
|
|
197
195
|
架构细节、hooks 契约与 MCP 远期方案见 [设计文档 · 整体架构](docs/hermes-repo-design.md#整体架构)。
|
|
@@ -257,22 +255,32 @@ hermes-repo 的 **hooks 路径不依赖 LLM**(捕获、注入始终快速返
|
|
|
257
255
|
npx @riconext/hermes-repo init
|
|
258
256
|
```
|
|
259
257
|
|
|
260
|
-
按提示填写 API 地址、模型名与密钥;会写入 `.memory/
|
|
258
|
+
按提示填写 API 地址、模型名与密钥;会写入 `.memory/config.json` 的 `llm` 字段。
|
|
261
259
|
|
|
262
260
|
**方式二:手动编辑**
|
|
263
261
|
|
|
264
|
-
|
|
262
|
+
编辑 `.memory/config.json`:
|
|
265
263
|
|
|
266
264
|
```json
|
|
267
265
|
{
|
|
268
|
-
"
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
266
|
+
"llm": {
|
|
267
|
+
"enabled": true,
|
|
268
|
+
"provider": "openai",
|
|
269
|
+
"baseUrl": "https://api.deepseek.com",
|
|
270
|
+
"model": "deepseek-v4-flash",
|
|
271
|
+
"apiKey": "你的密钥",
|
|
272
|
+
"timeoutMs": 60000,
|
|
273
|
+
"maxInputChars": 24000,
|
|
274
|
+
"mode": "async"
|
|
275
|
+
},
|
|
276
|
+
"consolidate": {
|
|
277
|
+
"autoFlush": {
|
|
278
|
+
"enabled": false,
|
|
279
|
+
"minPendingSessions": 3,
|
|
280
|
+
"minIntervalMinutes": 30,
|
|
281
|
+
"maxPendingChars": 20000
|
|
282
|
+
}
|
|
283
|
+
}
|
|
276
284
|
}
|
|
277
285
|
```
|
|
278
286
|
|
|
@@ -281,16 +289,17 @@ npx @riconext/hermes-repo init
|
|
|
281
289
|
| `enabled` | `true` 才启用;`false` 时与未配置等价 |
|
|
282
290
|
| `apiKey` / `baseUrl` / `model` | 三者缺一不可;须为 **OpenAI 兼容** `/chat/completions` 端点 |
|
|
283
291
|
| `provider` | 仅作标记(如 `"openai"`),实际以 `baseUrl` 指向的服务为准 |
|
|
284
|
-
| `mode` | 默认 `async`:hook 不等待;调试可用 `sync`
|
|
292
|
+
| `mode` | 默认 `async`:hook 不等待;调试可用 `sync` |
|
|
285
293
|
|
|
286
294
|
非 DeepSeek 时:保持 `enabled: true`,将 `baseUrl`、`model` 换成你所用网关提供的 OpenAI 兼容地址与模型名即可。
|
|
287
295
|
|
|
296
|
+
`consolidate.autoFlush.enabled` 默认关闭。开启后,capture 成功写入时会在后台按阈值触发 `flush`:pending/stale session 数达到 `minPendingSessions`、距离上次 flush 超过 `minIntervalMinutes`,或待处理内容达到 `maxPendingChars` 时触发。
|
|
297
|
+
|
|
288
298
|
**`init -y` 时**:会生成 `enabled: false` 的骨架;再次 `init` **不会覆盖**已有 `apiKey`,可安全补配。
|
|
289
299
|
|
|
290
300
|
### 安全说明
|
|
291
301
|
|
|
292
|
-
- `.memory/
|
|
293
|
-
- `config.json` 里**没有** API 密钥字段
|
|
302
|
+
- `.memory/config.json` 包含 `apiKey`,在 init 写入的 **gitignore 块中**,**不要提交到 Git**
|
|
294
303
|
- 团队共享记忆走 `topics/` / `MEMORY.md`,与个人 LLM 配置无关
|
|
295
304
|
|
|
296
305
|
### 验证与排障
|