@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - cfa583b: 合并 llm 配置读取到通用配置模块,删除 readLlmConfig.ts 和 mergeLlmConfig.ts
8
+
3
9
  ## 1.1.0
4
10
 
5
11
  ### 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. 若 llm.json 启用:入队 capture-llm 后台任务(detached)升级正文
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
- ├── llm.json # 个人:可选 LLM API(gitignore,勿提交)
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/llm.json`。
258
+ 按提示填写 API 地址、模型名与密钥;会写入 `.memory/config.json` 的 `llm` 字段。
261
259
 
262
260
  **方式二:手动编辑**
263
261
 
264
- `init` 会在 `.memory/templates/llm.json.example` 提供示例。复制或编辑 `.memory/llm.json`:
262
+ 编辑 `.memory/config.json`:
265
263
 
266
264
  ```json
267
265
  {
268
- "enabled": true,
269
- "provider": "openai",
270
- "baseUrl": "https://api.deepseek.com",
271
- "model": "deepseek-v4-flash",
272
- "apiKey": "你的密钥",
273
- "timeoutMs": 60000,
274
- "maxInputChars": 24000,
275
- "mode": "async"
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` 或环境变量 `HERMES_LLM_SYNC=1` |
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/llm.json` init 写入的 **gitignore 块中**,**不要提交到 Git**
293
- - `config.json` 里**没有** API 密钥字段
292
+ - `.memory/config.json` 包含 `apiKey`,在 init 写入的 **gitignore 块中**,**不要提交到 Git**
294
293
  - 团队共享记忆走 `topics/` / `MEMORY.md`,与个人 LLM 配置无关
295
294
 
296
295
  ### 验证与排障