@mcptoolshop/claude-synergy 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/README.pt-BR.md CHANGED
@@ -73,7 +73,7 @@ claude-synergy/
73
73
  └── URGENT_FINDINGS.md # 23 actionable items surfaced from the corpus
74
74
  ```
75
75
 
76
- **Números atuais (versão v1.1.0):** 44 produtos / 1.186 arquivos de lançamento / 6.042 alterações / 1.225 entidades / 12 sinergias / 508 testes / 11 ferramentas MCP / 17 comandos de linha de comando.
76
+ **Números atualizados (versão 1.2.0):** 44 produtos / 1.171 arquivos de lançamento / 6.573 alterações / 1.260 entidades / 12 sinergias / 517 testes / 13 ferramentas MCP / 17 comandos de linha de comando. (O corpus foi atualizado via `sync_now` em 24 de maio de 2026.)
77
77
 
78
78
  ---
79
79
 
@@ -90,6 +90,7 @@ claude-synergy/
90
90
  | **4c — ingestão de HTML para Markdown (turndown)** | ✅ implementado | Corpos de HTML (Copilot/VS Code/Cursor) agora geram linhas individuais para o FTS5 e extração de entidades. |
91
91
  | **4d — Playwright + registro MCP + configuração YAML** | ✅ implementado | Windsurf via Playwright; Smithery + registro oficial MCP como catálogos da etapa 4; produtos consolidados em `products.yaml`. |
92
92
  | **5 — Navegação com janelas (v1.1) + incorporação da OpenAI** | ✅ implementado | `hk diff` / `hk breaking`, limites de data em todos os comandos de navegação, 3 novas ferramentas MCP (total de 11), provedor de incorporação da OpenAI, dimensão de incorporação configurável, sincronização automática do `claude-code`, analisador genérico `keep-a-changelog`. |
93
+ | **6 — v1.2 sync-from-MCP** | ✅ implementado | `sync_status` (frescor por produto, detecção de "obsoleto") e `sync_now` (busca sob demanda → ingestão → incorporação com visualização "dry_run" + bloqueio de concorrência em processo). Elimina a lacuna onde um agente poderia consultar o corpus, mas não atualizá-lo. **Corrige também:** um erro em que a exclusão de marcadores, ao usar `INSERT OR REPLACE INTO products`, causava uma exclusão em cascata na chave estrangeira `markers`, reiniciando silenciosamente o cursor "since" de cada produto a cada ingestão (regressão §8.20). |
93
94
 
94
95
  Roteiro para a versão 0.8+: acompanhado em [URGENT_FINDINGS.md](URGENT_FINDINGS.md) e nas issues.
95
96
 
@@ -253,8 +254,10 @@ Ferramentas disponíveis:
253
254
  | `get_changes_since` | **Novo.** Alterações em uma janela de tempo, agrupadas por produto+versão. Entradas: `since` (obrigatório), `until?`, `product?`, `kind?`, `limit?`. |
254
255
  | `search_breaking_changes` | **Novo.** Lista simples de alterações significativas — não é necessário um termo de pesquisa. Entradas: `product?`, `since?`, `until?`, `limit?`. |
255
256
  | `compare_versions` | **Novo.** Todas as alterações entre duas versões de um produto. Entradas: `product`, `from_version`, `to_version`. |
257
+ | `sync_status` | **v1.2.** Frescor da sincronização por produto: última data de busca, horas desde a última busca, número de lançamentos ingeridos. Entradas: `product?`, `stale_only?`, `stale_hours?`. Use ANTES de confiar em `latest_releases` para saber se o corpus está desatualizado. |
258
+ | `sync_now` | **v1.2.** Atualização sob demanda (espelha `hk sync`). Entradas: `product?`, `dry_run?`, `include_ingest?`, `include_embed?`, `timeout_ms?`. Rejeita com `InvalidParams` se outro `sync_now` já estiver em execução. NÃO faz commit no Git. |
256
259
 
257
- As três novas ferramentas espelham `hk diff` / `hk breaking` e o fluxo de trabalho de comparação de versões que anteriormente exigia scripts. Consulte [manual → servidor MCP](https://mcp-tool-shop-org.github.io/claude-synergy/handbook/mcp-server/) para obter os esquemas de entrada completos.
260
+ As ferramentas da versão 1.1 espelham `hk diff` / `hk breaking` e o fluxo de trabalho de comparação de versões que anteriormente exigia scripts. As ferramentas de sincronização da versão 1.2 eliminam a lacuna onde uma sessão poderia consultar o corpus, mas não atualizá-lo: `sync_status` informa sobre a obsolescência, `sync_now` executa o pipeline. Consulte [manual → servidor MCP](https://mcp-tool-shop-org.github.io/claude-synergy/handbook/mcp-server/) para os esquemas de entrada completos.
258
261
 
259
262
  ---
260
263
 
@@ -291,7 +294,7 @@ Estratégias de busca: `gh-releases | rss | raw-changelog | html-scrape | catalo
291
294
  O conjunto de testes Vitest cobre os níveis de unidade / integração / regressão / teste rápido. **[test-spec-3.md](test-spec-3.md) é a documentação atual** a partir da versão v0.7.0; [test-spec.md](test-spec.md) (v1) e [test-spec-2.md](test-spec-2.md) (v2) permanecem no repositório como registro histórico da linhagem do design.
292
295
 
293
296
  ```bash
294
- pnpm test # unit + integration + regression (~18s, 508 tests)
297
+ pnpm test # unit + integration + regression (~36s, 517 tests)
295
298
  pnpm test:watch # interactive
296
299
  pnpm test:coverage # generate coverage/index.html (thresholds: 78/75/85/78)
297
300
  pnpm test:smoke # opt-in full-corpus smoke (RUN_SMOKE=1)
@@ -302,7 +305,7 @@ Estrutura:
302
305
  | Diretório | O que ele cobre |
303
306
  |-----|----------------|
304
307
  | `test/unit/` | por módulo — extração, ingestão, consulta (incl. `until` / navegação / desde / comparação), banco de dados (incl. migração da configuração de dimensão v3), incorporação, híbrido, busca + todos os provedores (Ollama / Voyage / **OpenAI**) + busca-rss/changelog (incl. analisador **keep-a-changelog**)/html + busca-mcp-registry + busca-playwright + configuração de produtos + ingestão/consulta de sinergia. |
305
- | `test/integration/` | de ponta a ponta — pipeline, sincronização, servidor MCP (JSON-RPC stdio, 11 ferramentas), CLI (incl. `hk diff`, `hk breaking`). |
308
+ | `test/integration/` | fim a fim — pipeline, sincronização, servidor MCP (JSON-RPC padrão, 13 ferramentas, incluindo `sync_status` / `sync_now`), linha de comando (incluindo `hk diff`, `hk breaking`). |
306
309
  | `test/regression/` | §8.1–§8.19 — cada um protege contra um bug real corrigido durante o desenvolvimento (§8.19: ghReleases preserva os itens dentro da janela durante a paginação inicial). |
307
310
  | `test/smoke/` | Teste completo com um conjunto de dados simulado, representando os arquivos reais do diretório `products/` (1.143 arquivos). |
308
311
  | `test/fixtures/` | 3 produtos simulados + respostas HTTP simuladas (RSS / GH / Voyage / Cohere / Ollama / Anthropic / Smithery / Registro oficial do MCP). |
package/README.zh.md CHANGED
@@ -73,7 +73,7 @@ claude-synergy/
73
73
  └── URGENT_FINDINGS.md # 23 actionable items surfaced from the corpus
74
74
  ```
75
75
 
76
- **实时数据 (截至 v1.1.0 版本):** 44 个产品 / 1,186 个发布文件 / 6,042 个变更 / 1,225 个实体 / 12 个协同功能 / 508 个测试 / 11 个 MCP 工具 / 17 个 CLI 命令。
76
+ **实时数据 (截至 v1.2.0 版本):** 44 个产品 / 1,171 个发布文件 / 6,573 个变更 / 1,260 个实体 / 12 个协同功能 / 517 个测试 / 13 个 MCP 工具 / 17 个 CLI 命令。 (语料库已于 2026-05-24 通过 `sync_now` 命令刷新。)
77
77
 
78
78
  ---
79
79
 
@@ -84,12 +84,13 @@ claude-synergy/
84
84
  | 1. -- bootstrap (Markdown 文档) | ✅ 已发货。 | “Study-swarm”项目在2026年1月至5月期间发布了706个文件,随后,在第四阶段的扩展中,该数量增加到1186个。 |
85
85
  | 2a - SQLite + FTS5 + 命令行界面。 | ✅ 已发货。 | `hk` 命令行工具;包含 15 个子命令;数据摄取速度低于 300 毫秒。 |
86
86
  | 2b — sqlite-vec + 上下文检索 | ✅ 已发货。 | 提供商接口(无/结构化/ollama/claude-haiku 上下文 × ollama/voyage 嵌入 × 无/ollama-judge/voyage/cohere 重新排序)。 |
87
- | 3. 同步 + MCP 服务器。 | ✅ 已发货。 | `hk fetch / sync / seed-markers`;`claude-synergy-mcp` 通过标准输入 (stdio) 提供了 11 个工具 (最初的 Tier-3 版本有 8 个,v1.1 版本新增了 3 个)。 |
87
+ | 3. 同步 + MCP 服务器。 | ✅ 已发货。 | `hk fetch / sync / seed-markers`; `claude-synergy-mcp` 通过标准输入/输出接口提供了 13 个工具 (最初的 Tier-3 版本有 8 个,v1.1 版本新增 3 个,v1.2 版本新增 2 个)。 |
88
88
  | 4a — 扩展范围,超越 Anthropic 的范畴。 | ✅ 已发货。 | +15 个 MCP SDK,Cursor (RSS),Aider (HISTORY.md),Continue.dev,Cody Enterprise (已过滤的 RSS)。 |
89
89
  | 4b — HTML 网页抓取工具。 | ✅ 已发货。 | GitHub Copilot + VS Code 聊天功能 (Windsurf 需要 Playwright — v0.7) |
90
90
  | 4c - 将HTML内容转换为Markdown格式并导入。 | ✅ 已发货。 | HTML 代码块(在 Copilot、VS Code 或 Cursor 中)现在针对 FTS5 和实体提取功能,会生成每条要点对应的一行数据。 |
91
91
  | 4d — playwright + MCP 注册 + YAML 配置文件。 | ✅ 已发货。 | 使用 Playwright 进行网页抓取;Smithery + 官方 MCP 注册信息作为第四级目录;产品信息已整合到 `products.yaml` 文件中。 |
92
92
  | **5 — v1.1 版本:窗口浏览 + OpenAI 嵌入** | ✅ 已发货。 | `hk diff` / `hk breaking`,所有浏览命令都支持日期范围;3 个新的 MCP 工具 (总共 11 个);OpenAI 嵌入提供程序;可配置的嵌入维度;`claude-code` 自动同步;通用的 `keep-a-changelog` 解析器。 |
93
+ | **6 — v1.2 版本:从 MCP 同步** | ✅ 已发货。 | `sync_status` (报告每个产品的更新状态,检测是否过时) 和 `sync_now` (按需获取 → 导入 → 嵌入,并提供 `dry_run` 预览 + 进程内并发锁定)。 解决了调用方可以查询语料库,但无法刷新的问题。 **此外,还修复了:** 标记清除错误,即 `INSERT OR REPLACE INTO products` 会级联删除 `markers` 上的外键,从而在每次导入时静默地重置每个产品的 `since` 游标 (回归 §8.20)。 |
93
94
 
94
95
  v0.8 及后续版本的开发计划,请参考 [URGENT_FINDINGS.md](URGENT_FINDINGS.md) 文件以及相关问题列表。
95
96
 
@@ -149,7 +150,7 @@ hk top env_var # most-mentioned by entity type
149
150
  # hook_event, setting_key)
150
151
  ```
151
152
 
152
- **v1.1 版本的更新:** `hk diff` 和 `hk breaking` 命令可以在不指定搜索词的情况下回答“最近发生了哪些变化?”。日期范围统一:所有浏览命令都支持 `--since` 和 `--until` 参数,格式为 `YYYY-MM-DD` (或完整的 ISO 8601 格式),或者相对时间格式 (例如 `7d`、`2w`、`3m`、`1y`)。
153
+ **v1.1 版本的更新:** `hk diff` 和 `hk breaking` 命令无需搜索词即可回答“最近发生了什么变化?”。 日期范围统一:所有浏览命令都支持 `--since` 和 `--until` 参数,格式为 `YYYY-MM-DD` (或完整的 ISO 8601 格式),或相对格式 (例如 `7d`、`2w`、`3m`、`1y`)。
153
154
 
154
155
  ---
155
156
 
@@ -205,7 +206,7 @@ claude-code@2.1.146 2026-05-19 (1 change)
205
206
  [fixed] Restored `--debug` flag accidentally removed in 2.1.144.
206
207
  ```
207
208
 
208
- **浏览所有代码库中的重大变更:**
209
+ **浏览整个语料库中的重大变更:**
209
210
  ```
210
211
  $ hk breaking --since 30d --limit 5
211
212
  2026-05-15 claude-agent-sdk-python@0.2.82 Headless and SDK sessions now use Task tools by default.
@@ -242,19 +243,21 @@ $ hk breaking --since 30d --limit 5
242
243
 
243
244
  | 工具 | 用途 |
244
245
  |---|---|
245
- | `search` | 混合 FTS5 + vec;可选的重新排序。默认模式用于自然语言查询。(+ `until` 日期上限) |
246
+ | `search` | 混合 FTS5 + vec;可选的重新排序。 默认模式用于自然语言查询。 (+ `until` 日期上限) |
246
247
  | `lookup_entity` | 精确的实体历史记录:环境变量、斜杠命令、模型 ID、CVE 等。 |
247
- | `latest_releases` | 产品 (或单个产品) 的最新发布版本。(+ `since` 日期下限) |
248
+ | `latest_releases` | 最近的产品发布 (或单个产品) (+ `since` 日期下限) |
248
249
  | `get_release` | 单个发布版本的完整内容 |
249
250
  | `list_products` | 带有计数和最新版本的枚举 |
250
251
  | `top_entities` | 按类型提及最多的实体 |
251
- | `list_synergies` | 精心设计的跨产品工作流程。(+ 可选的 `product` 过滤器) |
252
+ | `list_synergies` | 精心设计的跨产品工作流程。 (+ 可选的产品筛选器) |
252
253
  | `read_synergy` | 单个协同文件(synergy file)的完整文本 |
253
- | `get_changes_since` | **新增。** 按时间窗口分组的产品 + 版本变更。输入:`since` (必需)、`until?`、`product?`、`kind?`、`limit?`。 |
254
- | `search_breaking_changes` | **新增。** 包含所有重大变更的列表,无需搜索词。输入:`product?`、`since?`、`until?`、`limit?`。 |
255
- | `compare_versions` | **新增。** 一个产品的所有版本之间的变更。输入:`product`、`from_version`、`to_version`。 |
254
+ | `get_changes_since` | **新增。** 按时间窗口分组的产品 + 版本变更。 输入:`since` (必需)、`until?`、`product?`、`kind?`、`limit?`。 |
255
+ | `search_breaking_changes` | **新增。** 平铺列表,显示所有重大变更 — 无需搜索词。 输入:`product?`、`since?`、`until?`、`limit?`。 |
256
+ | `compare_versions` | **v1.1 版本。** 显示一个产品在两个版本之间的所有变更。 输入:`product`、`from_version`、`to_version`。 |
257
+ | `sync_status` | **v1.2 版本。** 报告每个产品的更新状态 — 上次获取的时间戳、自上次获取以来的小时数、已导入的发布文件数量。 输入:`product?`、`stale_only?`、`stale_hours?`。 在信任 `latest_releases` 之前,请使用此功能检查语料库是否已过时。 |
258
+ | `sync_now` | **v1.2 版本。** 按需刷新 (类似于 `hk sync`)。 输入:`product?`、`dry_run?`、`include_ingest?`、`include_embed?`、`timeout_ms?`。 如果另一个 `sync_now` 命令正在运行,则会返回 `InvalidParams` 错误。 不会将更改提交到 Git 仓库。 |
256
259
 
257
- 这三个新的工具模仿了 `hk diff` / `hk breaking` 命令,以及之前需要脚本才能实现的版本比较工作流程。有关完整的输入模式,请参阅 [手册 → MCP 服务器](https://mcp-tool-shop-org.github.io/claude-synergy/handbook/mcp-server/)。
260
+ v1.1 版本的工具模仿了 `hk diff` / `hk breaking` 命令,以及以前需要脚本才能实现的版本比较工作流程。 v1.2 版本的同步工具解决了调用方可以查询语料库,但无法刷新的问题 — `sync_status` 报告过时状态,`sync_now` 运行流水线。 详细的输入参数请参见 [手册 → MCP 服务器](https://mcp-tool-shop-org.github.io/claude-synergy/handbook/mcp-server/)。
258
261
 
259
262
  ---
260
263
 
@@ -262,11 +265,11 @@ $ hk breaking --since 30d --limit 5
262
265
 
263
266
  完整的详细信息请参阅 [SOURCES.md](SOURCES.md)。
264
267
 
265
- - **Tier 1 (GitHub 发布):** `gh api repos/<owner>/<repo>/releases`,涵盖 23 个产品,包括 Anthropic SDK (7 种语言)、Agent SDK (2 个)、ant CLI、**claude-code** (现在通过 gh-releases 自动同步,v1.1 版本之前是手动同步)、claude-code-action、claude-code-security-review,以及 15 个 MCP 生态系统 SDK。
266
- - **Tier 2 (原始 Markdown):** `Aider-AI/aider/HISTORY.md`。通用的 `keep-a-changelog` 解析器 (v1.1 版本及更高版本) 也适用于任何其源代码为 `CHANGELOG.md` 且符合 Keep-a-Changelog 格式的产品,可以通过 `products.yaml` 文件中的一个条目进行配置。
267
- - **Tier 3 (HTML / RSS):** `platform.claude.com/docs/release-notes`、`support.claude.com/articles/12138966`、`cursor.com/changelog/rss.xml`、`sourcegraph.com/changelog/featured.rss` (已过滤)、`github.blog/changelog/label/copilot/`、`code.visualstudio.com/updates/v1_NNN`。
268
- - **Tier 4 (目录):** `anthropics/skills`、`claude-plugins-{official,community}`、`knowledge-work-plugins`。
269
- - **Tier 5 (建议):** `@ClaudeCodeLog` X 账号;marckrenn 的变更日志镜像。
268
+ - **第一层级 (GitHub 发布)** `gh api repos/<owner>/<repo>/releases`,适用于 23 个产品,包括 Anthropic SDK7 种语言)、Agent SDK2 个)、ant CLI、**claude-code**(现在通过 gh-releases 自动同步,从 v1.1 开始,之前是手动更新)、claude-code-action、claude-code-security-review,以及 15 个 MCP 生态系统 SDK。
269
+ - **第二层级 (原始 Markdown)** `Aider-AI/aider/HISTORY.md`。通用的 `keep-a-changelog` 解析器(v1.1+)也适用于任何其源代码为 CHANGELOG.md 且符合 Keep-a-Changelog 格式的产品,可以通过 `products.yaml` 文件中的一个条目进行配置。
270
+ - **第三层级 (HTML / RSS)** `platform.claude.com/docs/release-notes`、`support.claude.com/articles/12138966`、`cursor.com/changelog/rss.xml`、`sourcegraph.com/changelog/featured.rss`(已过滤)、`github.blog/changelog/label/copilot/`、`code.visualstudio.com/updates/v1_NNN`。
271
+ - **第四层级 (目录)** `anthropics/skills`、`claude-plugins-{official,community}`、`knowledge-work-plugins`。
272
+ - **第五层级 (建议)** `@ClaudeCodeLog` X 账号;marckrenn 的变更日志镜像。
270
273
 
271
274
  抓取策略:`gh-releases | rss | raw-changelog | html-scrape | catalog | playwright`。 增加一个新产品,就在 `products.yaml` 文件中增加一条记录。
272
275
 
@@ -291,7 +294,7 @@ $ hk breaking --since 30d --limit 5
291
294
  Vitest 测试套件覆盖单元测试、集成测试、回归测试和初步测试。 **[test-spec-3.md](test-spec-3.md) 是当前版本 (v0.7.0) 的权威文档**;[test-spec.md](test-spec.md) (v1) 和 [test-spec-2.md](test-spec-2.md) (v2) 仍然保存在代码库中,作为设计演进的历史记录。
292
295
 
293
296
  ```bash
294
- pnpm test # unit + integration + regression (~18s, 508 tests)
297
+ pnpm test # unit + integration + regression (~36s, 517 tests)
295
298
  pnpm test:watch # interactive
296
299
  pnpm test:coverage # generate coverage/index.html (thresholds: 78/75/85/78)
297
300
  pnpm test:smoke # opt-in full-corpus smoke (RUN_SMOKE=1)
@@ -301,9 +304,9 @@ pnpm test:smoke # opt-in full-corpus smoke (RUN_SMOKE=1)
301
304
 
302
305
  | 目录 | 涵盖内容 |
303
306
  |-----|----------------|
304
- | `test/unit/` | 每个模块:提取、导入、查询 (包括 `until` / 浏览 / since / 比较)、数据库 (包括 dim-config v3 迁移)、嵌入、混合、导入 + 所有提供程序 (Ollama / Voyage / **OpenAI**) + 导入 RSS/变更日志 (包括 **keep-a-changelog** 解析器)/HTML + 导入 MCP 注册表 + 导入 Playwright + 产品配置 + 协同功能导入/查询。 |
305
- | `test/integration/` | 端到端:流水线、同步、MCP 服务器 (stdio JSON-RPC,11 个工具)、CLI (包括 `hk diff`、`hk breaking`)。 |
306
- | `test/regression/` | §8.1–§8.19 — 每个部分都旨在防止开发过程中出现的实际错误 (§8.19:ghReleases 的早期退出分页保留了窗口内的项目)。 |
307
+ | `test/unit/` | 每个模块:提取、导入、查询(包括 `until` / 浏览 / 自...以来 / 比较)、数据库(包括 dim-config v3 迁移)、嵌入、混合、获取 + 所有提供商(Ollama / Voyage / **OpenAI**)+ 获取 RSS/变更日志(包括 **keep-a-changelog** 解析器)/ HTML + 获取 MCP 注册表 + 获取 Playwright + 产品配置 + 集成导入/查询。 |
308
+ | `test/integration/` | 端到端:流水线、同步、MCP 服务器(stdio JSON-RPC,13 个工具,包括 `sync_status` / `sync_now`)、命令行工具(包括 `hk diff`、`hk breaking`)。 |
309
+ | `test/regression/` | §8.1–§8.19:每个部分都用于防止开发过程中出现的实际错误(§8.19:ghReleases 的早期退出分页功能会保留窗口内的项目)。 |
307
310
  | `test/smoke/` | 可选的完整语料库,用于测试 `products/` 目录下的文件 (1143 个文件)。 |
308
311
  | `test/fixtures/` | 3 个模拟产品 + 模拟 HTTP 响应 (RSS / GH / Voyage / Cohere / Ollama / Anthropic / Smithery / 官方 MCP 注册表) |
309
312
  | `test/helpers/` | `temp-db.ts`, `fetch-mock.ts`, `mcp-client.ts`, `seed-corpus.ts`, `golden-vectors.ts`, `playwright-mock.ts`, `yaml-fixtures.ts` |
@@ -344,13 +347,13 @@ CI:`.github/workflows/test.yml` 在代码提交和拉取请求时运行 `pnpm
344
347
 
345
348
  `hk embed` 命令会调用外部嵌入服务:
346
349
 
347
- - **Ollama (默认,768维)** — 确保 Ollama 正在运行 (`ollama serve`),并且已下载嵌入模型 (`ollama pull nomic-embed-text`)。
348
- - **Voyage (1024维)** — 在您的环境中设置 `VOYAGE_API_KEY`。您可以在 [dash.voyageai.com](https://dash.voyageai.com) 上查看您的 API 密钥。
349
- - **OpenAI (默认 1536 维,可配置)** — 设置 `OPENAI_API_KEY`。默认模型是 `text-embedding-3-small`;可以使用 `OPENAI_EMBED_MODEL` 覆盖该设置(例如,使用 `text-embedding-3-large`,其维度为 3072)。通过 `hk hybrid --embed openai` 或 `hk embed --embed openai` 使用。
350
+ - **Ollama (默认,768 维)** — 确保 Ollama 正在运行 (`ollama serve`),并且已下载嵌入模型 (`ollama pull nomic-embed-text`)。
351
+ - **Voyage (1024 维)** — 在您的环境中设置 `VOYAGE_API_KEY`。 检查您的 API 密钥,请访问 [dash.voyageai.com](https://dash.voyageai.com)
352
+ - **OpenAI (默认 1536 维,可配置)** — 设置 `OPENAI_API_KEY`。 默认模型是 `text-embedding-3-small`;可以使用 `OPENAI_EMBED_MODEL` 进行覆盖(例如,使用 `text-embedding-3-large`,维度为 3072)。 使用方法:`hk hybrid --embed openai` 或 `hk embed --embed openai`。
350
353
 
351
- **在切换提供商时,嵌入维度不匹配**
354
+ **切换提供商时出现嵌入维度不匹配**
352
355
 
353
- 每个提供商生成固定维度的向量(Ollama 默认 768 维,Voyage 默认 1024 维,OpenAI 默认 1536 维——OpenAI 支持在模型原生尺寸范围内配置维度)。数据库将当前使用的维度存储在 `schema_meta.embedding_dim` 中。在存在分块的情况下,在不同维度之间切换提供商,会引发 `EMBEDDING_DIM_MISMATCH` 错误(`AppError`),而不是静默地损坏向量表。要切换:
356
+ 每个提供商都会生成固定维度的向量(Ollama 768Voyage 1024OpenAI 默认值为 1536OpenAI 支持在模型原生尺寸范围内配置维度)。 数据库在 `schema_meta.embedding_dim` 中存储当前使用的维度。 在存在分块的情况下,在不同维度之间切换提供商,会引发 `EMBEDDING_DIM_MISMATCH` 错误(`AppError`),而不是静默地损坏向量表。 要切换:
354
357
 
355
358
  ```bash
356
359
  rm data/claude-synergy.db data/claude-synergy.db-wal data/claude-synergy.db-shm
@@ -359,7 +362,7 @@ hk ingest
359
362
  hk embed --embed openai # new provider, new dim, fresh chunks_vec
360
363
  ```
361
364
 
362
- 对于 OpenAI Matryoshka 截断(小于原生维度的嵌入),请设置 `OPENAI_EMBED_MODEL`,并通过 `hk embed` 的提供商配置传递所需的维度。有关详细信息,请参阅 [手册中的嵌入部分](https://mcp-tool-shop-org.github.io/claude-synergy/handbook/cli-reference/#embedding-providers-and-dimensions)。
365
+ 对于 OpenAI Matryoshka 截断(小于原生维度的嵌入),请设置 `OPENAI_EMBED_MODEL`,并通过 `hk embed` 的提供商配置传递所需的维度。 详情请参阅 [手册中的嵌入部分](https://mcp-tool-shop-org.github.io/claude-synergy/handbook/cli-reference/#embedding-providers-and-dimensions)。
363
366
 
364
367
  **模式版本不匹配/数据库损坏**
365
368