@riconext/hermes-repo 1.1.0 → 1.1.1
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 +6 -0
- package/README.md +17 -18
- package/dist/cli.js +127 -152
- package/dist/cli.js.map +1 -1
- package/dist/templates/AGENTS.md.tpl +2 -6
- 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
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,24 @@ 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
276
|
}
|
|
277
277
|
```
|
|
278
278
|
|
|
@@ -281,7 +281,7 @@ npx @riconext/hermes-repo init
|
|
|
281
281
|
| `enabled` | `true` 才启用;`false` 时与未配置等价 |
|
|
282
282
|
| `apiKey` / `baseUrl` / `model` | 三者缺一不可;须为 **OpenAI 兼容** `/chat/completions` 端点 |
|
|
283
283
|
| `provider` | 仅作标记(如 `"openai"`),实际以 `baseUrl` 指向的服务为准 |
|
|
284
|
-
| `mode` | 默认 `async`:hook 不等待;调试可用 `sync`
|
|
284
|
+
| `mode` | 默认 `async`:hook 不等待;调试可用 `sync` |
|
|
285
285
|
|
|
286
286
|
非 DeepSeek 时:保持 `enabled: true`,将 `baseUrl`、`model` 换成你所用网关提供的 OpenAI 兼容地址与模型名即可。
|
|
287
287
|
|
|
@@ -289,8 +289,7 @@ npx @riconext/hermes-repo init
|
|
|
289
289
|
|
|
290
290
|
### 安全说明
|
|
291
291
|
|
|
292
|
-
- `.memory/
|
|
293
|
-
- `config.json` 里**没有** API 密钥字段
|
|
292
|
+
- `.memory/config.json` 包含 `apiKey`,在 init 写入的 **gitignore 块中**,**不要提交到 Git**
|
|
294
293
|
- 团队共享记忆走 `topics/` / `MEMORY.md`,与个人 LLM 配置无关
|
|
295
294
|
|
|
296
295
|
### 验证与排障
|