@mcptoolshop/claude-synergy 1.0.1 → 1.1.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.md CHANGED
@@ -65,7 +65,7 @@ claude-synergy/
65
65
  │ └── plugins-{official,community,knowledge-work}/ # Plugin marketplaces
66
66
  ├── synergies/ # 12 curated cross-product workflows
67
67
  ├── src/ # TypeScript implementation
68
- ├── test/ # 382 tests (unit, integration, regression, smoke)
68
+ ├── test/ # 508 tests (unit, integration, regression, smoke)
69
69
  ├── data/claude-synergy.db # SQLite database (created by `hk init`)
70
70
  ├── schema.sql # Tier 2a tables (products, releases, changes, entities, FTS5, …)
71
71
  ├── schema-vec.sql # Tier 2b tables (chunks, chunks_vec, chunks_fts)
@@ -73,7 +73,7 @@ claude-synergy/
73
73
  └── URGENT_FINDINGS.md # 23 actionable items surfaced from the corpus
74
74
  ```
75
75
 
76
- **Live numbers (as of v1.0.0):** 44 products / 1,186 release files / 6,042 changes / 1,225 entities / 12 synergies / 382 tests.
76
+ **Live numbers (as of v1.1.0):** 44 products / 1,186 release files / 6,042 changes / 1,225 entities / 12 synergies / 508 tests / 11 MCP tools / 17 CLI commands.
77
77
 
78
78
  ---
79
79
 
@@ -84,13 +84,14 @@ claude-synergy/
84
84
  | **1 — bootstrap (markdown corpus)** | ✅ shipped | Study-swarm seeded 706 release files Jan→May 2026; extended to 1,186 by Tier 4d |
85
85
  | **2a — SQLite + FTS5 + CLI** | ✅ shipped | `hk` CLI; 15 subcommands; sub-300ms ingest |
86
86
  | **2b — sqlite-vec + Contextual Retrieval** | ✅ shipped | Provider-pluggable (none/structured/ollama/claude-haiku context × ollama/voyage embed × none/ollama-judge/voyage/cohere rerank) |
87
- | **3 — sync + MCP server** | ✅ shipped | `hk fetch / sync / seed-markers`; `claude-synergy-mcp` exposes 8 tools over stdio |
87
+ | **3 — sync + MCP server** | ✅ shipped | `hk fetch / sync / seed-markers`; `claude-synergy-mcp` exposes 11 tools over stdio (8 at original Tier-3 ship, 3 added in v1.1) |
88
88
  | **4a — extend beyond Anthropic** | ✅ shipped | +15 MCP SDKs, Cursor (RSS), Aider (HISTORY.md), Continue.dev, Cody Enterprise (RSS filtered) |
89
89
  | **4b — HTML-scrape fetcher** | ✅ shipped | GitHub Copilot + VS Code Chat (Windsurf needs Playwright — v0.7) |
90
90
  | **4c — turndown HTML→markdown ingest** | ✅ shipped | HTML bodies (Copilot/VS Code/Cursor) now produce per-bullet rows for FTS5 + entity extraction |
91
91
  | **4d — Playwright + MCP registry + YAML config** | ✅ shipped | Windsurf via Playwright; Smithery + official MCP Registry as Tier-4 catalogs; products consolidated into `products.yaml` |
92
+ | **5 — v1.1 windowed browsing + OpenAI embed** | ✅ shipped | `hk diff` / `hk breaking`, date bounds across all browsing commands, 3 new MCP tools (11 total), OpenAI embedding provider, configurable embedding dimension, `claude-code` auto-sync, generic `keep-a-changelog` parser |
92
93
 
93
- Roadmap for v0.8+: tracked in [URGENT_FINDINGS.md](URGENT_FINDINGS.md) and issues.
94
+ Roadmap beyond v1.1: tracked in [URGENT_FINDINGS.md](URGENT_FINDINGS.md) and issues.
94
95
 
95
96
  ---
96
97
 
@@ -114,7 +115,7 @@ For dev without building, use `npx tsx src/cli.ts ...` directly. **pnpm 10 quirk
114
115
 
115
116
  ---
116
117
 
117
- ## CLI surface — 15 commands
118
+ ## CLI surface — 17 commands
118
119
 
119
120
  ```
120
121
  # DB lifecycle
@@ -126,8 +127,12 @@ hk sync # combined fetch → ingest → embed (cron
126
127
  hk seed-markers # one-time setup after initial corpus
127
128
 
128
129
  # Search
129
- hk query "managed agents" # FTS5 keyword search
130
- hk hybrid "credential exfiltration" # FTS5 + vec hybrid via RRF (+ optional --rerank)
130
+ hk query "managed agents" # FTS5 keyword search (+ --until <date>)
131
+ hk hybrid "credential exfiltration" # FTS5 + vec hybrid via RRF (+ --rerank, --until)
132
+
133
+ # Windowed change browsing
134
+ hk diff [product] --since 7d # what changed in a window, grouped by product+version
135
+ hk breaking --since 30d # filter-browse of breaking changes (no search term)
131
136
 
132
137
  # Entity lookups
133
138
  hk env-var CLAUDE_CODE_WORKFLOWS # when introduced + history
@@ -136,7 +141,7 @@ hk model claude-opus-4-7 # model launch + mentions across products
136
141
  hk cve CVE-2025-66414 # CVE references in corpus
137
142
 
138
143
  # Browsing
139
- hk latest [--product X] [--limit N] # recent releases
144
+ hk latest [--product X] [--limit N] # recent releases (+ --since <date>)
140
145
  hk products # list all 44 with counts
141
146
  hk top env_var # most-mentioned by entity type
142
147
  # (env_var, slash_command, cli_option,
@@ -144,6 +149,8 @@ hk top env_var # most-mentioned by entity type
144
149
  # hook_event, setting_key)
145
150
  ```
146
151
 
152
+ **New in v1.1:** `hk diff` and `hk breaking` answer "what changed lately?" without needing a search term. Date bounds are uniform: every browsing command takes `--since` and `--until` in `YYYY-MM-DD` (or full ISO 8601), or a relative form (`7d`, `2w`, `3m`, `1y`).
153
+
147
154
  ---
148
155
 
149
156
  ## Example workflows
@@ -186,11 +193,35 @@ $ hk hybrid "credential exfiltration" --limit 3
186
193
 
187
194
  The query never says "env_scrub" — vec surfaces it by semantic similarity. Pure FTS5 misses it entirely.
188
195
 
196
+ **What changed in claude-code this week:**
197
+ ```
198
+ $ hk diff claude-code --since 7d
199
+ claude-code@2.1.147 2026-05-21 (3 changes)
200
+ [added] Added the `Workflow` tool for deterministic multi-agent orchestration.
201
+ [changed] Slash commands now lazy-load until first invocation.
202
+ [fixed] Race condition in MCP server discovery on Windows.
203
+
204
+ claude-code@2.1.146 2026-05-19 (1 change)
205
+ [fixed] Restored `--debug` flag accidentally removed in 2.1.144.
206
+ ```
207
+
208
+ **Browse breaking changes across the corpus:**
209
+ ```
210
+ $ hk breaking --since 30d --limit 5
211
+ 2026-05-15 claude-agent-sdk-python@0.2.82 Headless and SDK sessions now use Task tools by default.
212
+ 2026-05-14 claude-agent-sdk-typescript@0.3.142 Headless and SDK sessions now use Task tools by default.
213
+ 2026-05-08 anthropic-sdk-go@1.42.0 Removed deprecated `client.Beta()` namespace.
214
+ 2026-04-29 cursor@0.49.0 MCP server config moved from `cursor.json` to `.cursor/mcp.json`.
215
+ 2026-04-22 windsurf@1.10.0 Removed `cascade.run` JSON-RPC method.
216
+ ```
217
+
218
+ No search term needed — `hk breaking` is the answer to "did anything load-bearing change recently?"
219
+
189
220
  ---
190
221
 
191
222
  ## MCP server — give your agents access to this corpus
192
223
 
193
- `claude-synergy-mcp` exposes 8 tools over stdio. Wire into Claude Code (or any MCP host) via `~/.claude/.mcp.json` or your project's `.mcp.json`:
224
+ `claude-synergy-mcp` exposes 11 tools over stdio. Wire into Claude Code (or any MCP host) via `~/.claude/.mcp.json` or your project's `.mcp.json`:
194
225
 
195
226
  ```json
196
227
  {
@@ -211,28 +242,33 @@ Tools exposed:
211
242
 
212
243
  | Tool | Purpose |
213
244
  |---|---|
214
- | `search` | Hybrid FTS5 + vec; optional rerank. Default mode for natural-language queries. |
245
+ | `search` | Hybrid FTS5 + vec; optional rerank. Default mode for natural-language queries. (+ `until` date upper bound) |
215
246
  | `lookup_entity` | Exact entity history: env vars, slash commands, model IDs, CVEs, etc. |
216
- | `latest_releases` | Recent releases across products (or one) |
247
+ | `latest_releases` | Recent releases across products (or one). (+ `since` date lower bound) |
217
248
  | `get_release` | Full content of one release |
218
249
  | `list_products` | Enumeration with counts + latest version |
219
250
  | `top_entities` | Most-mentioned entities by type |
220
- | `list_synergies` | Curated cross-product workflows |
251
+ | `list_synergies` | Curated cross-product workflows. (+ optional `product` filter) |
221
252
  | `read_synergy` | Full text of one synergy file |
253
+ | `get_changes_since` | **New.** Changes in a time window, grouped by product+version. Inputs: `since` (required), `until?`, `product?`, `kind?`, `limit?`. |
254
+ | `search_breaking_changes` | **New.** Flat list of breaking changes — no search term needed. Inputs: `product?`, `since?`, `until?`, `limit?`. |
255
+ | `compare_versions` | **New.** All changes between two versions of one product. Inputs: `product`, `from_version`, `to_version`. |
256
+
257
+ The three new tools mirror `hk diff` / `hk breaking` and the version-comparison workflow that previously required scripting. See [handbook → MCP server](https://mcp-tool-shop-org.github.io/claude-synergy/handbook/mcp-server/) for full input schemas.
222
258
 
223
259
  ---
224
260
 
225
- ## Sources — 5 tiers, 6 fetcher strategies
261
+ ## Sources — 5 tiers, 7 fetcher strategies
226
262
 
227
263
  Full landscape in [SOURCES.md](SOURCES.md).
228
264
 
229
- - **Tier 1 (GitHub Releases)** — `gh api repos/<owner>/<repo>/releases` for 22 products including Anthropic SDKs (7 languages), Agent SDKs (2), ant CLI, claude-code-action, claude-code-security-review, and 15 MCP ecosystem SDKs
230
- - **Tier 2 (raw markdown)** — `anthropics/claude-code/CHANGELOG.md` + `Aider-AI/aider/HISTORY.md`
265
+ - **Tier 1 (GitHub Releases)** — `gh api repos/<owner>/<repo>/releases` for 23 products including Anthropic SDKs (7 languages), Agent SDKs (2), ant CLI, **claude-code** (now auto-synced via gh-releases as of v1.1 — previously manually seeded), claude-code-action, claude-code-security-review, and 15 MCP ecosystem SDKs
266
+ - **Tier 2 (raw markdown)** — `Aider-AI/aider/HISTORY.md`. The generic `keep-a-changelog` parser (v1.1+) is also available for any product whose source is a CHANGELOG.md in Keep-a-Changelog format — configure via one entry in `products.yaml`.
231
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` (filtered), `github.blog/changelog/label/copilot/`, `code.visualstudio.com/updates/v1_NNN`
232
268
  - **Tier 4 (catalog)** — `anthropics/skills`, `claude-plugins-{official,community}`, `knowledge-work-plugins`
233
269
  - **Tier 5 (advisory)** — `@ClaudeCodeLog` X account; marckrenn changelog mirror
234
270
 
235
- Fetch strategies: `gh-releases | rss | raw-changelog | html-scrape | catalog | playwright`. New product = one entry in `products.yaml`.
271
+ Fetch strategies: `gh-releases | rss | raw-changelog | keep-a-changelog | html-scrape | catalog | playwright`. New product = one entry in `products.yaml`.
236
272
 
237
273
  ---
238
274
 
@@ -255,7 +291,7 @@ Full index in [synergies/INDEX.md](synergies/INDEX.md).
255
291
  Vitest suite covers unit / integration / regression / smoke tiers. **[test-spec-3.md](test-spec-3.md) is the current authority** as of v0.7.0; [test-spec.md](test-spec.md) (v1) and [test-spec-2.md](test-spec-2.md) (v2) remain in the repo as historical record of the design lineage.
256
292
 
257
293
  ```bash
258
- pnpm test # unit + integration + regression (~16s, 382 tests)
294
+ pnpm test # unit + integration + regression (~18s, 508 tests)
259
295
  pnpm test:watch # interactive
260
296
  pnpm test:coverage # generate coverage/index.html (thresholds: 78/75/85/78)
261
297
  pnpm test:smoke # opt-in full-corpus smoke (RUN_SMOKE=1)
@@ -265,9 +301,9 @@ Layout:
265
301
 
266
302
  | Dir | What it covers |
267
303
  |-----|----------------|
268
- | `test/unit/` | per-module — extract, ingest, query, db, embed, hybrid, fetch + every provider + fetch-rss/changelog/html + fetch-mcp-registry + fetch-playwright + products-config |
269
- | `test/integration/` | end-to-end — pipeline, sync, MCP server (stdio JSON-RPC), CLI |
270
- | `test/regression/` | §8.1–§8.18 — each protects against a real bug fixed during development |
304
+ | `test/unit/` | per-module — extract, ingest, query (incl. `until` / browse / since / compare), db (incl. dim-config v3 migration), embed, hybrid, fetch + every provider (Ollama / Voyage / **OpenAI**) + fetch-rss/changelog (incl. **keep-a-changelog** parser)/html + fetch-mcp-registry + fetch-playwright + products-config + synergy ingest/query |
305
+ | `test/integration/` | end-to-end — pipeline, sync, MCP server (stdio JSON-RPC, 11 tools), CLI (incl. `hk diff`, `hk breaking`) |
306
+ | `test/regression/` | §8.1–§8.19 — each protects against a real bug fixed during development (§8.19: ghReleases early-exit pagination preserves in-window items) |
271
307
  | `test/smoke/` | opt-in full-corpus against real `products/` (1,143 files) |
272
308
  | `test/fixtures/` | 3 fake products + mock HTTP responses (RSS / GH / Voyage / Cohere / Ollama / Anthropic / Smithery / Official MCP Registry) |
273
309
  | `test/helpers/` | `temp-db.ts`, `fetch-mock.ts`, `mcp-client.ts`, `seed-corpus.ts`, `golden-vectors.ts`, `playwright-mock.ts`, `yaml-fixtures.ts` |
@@ -308,8 +344,22 @@ Sync is idempotent — safe to re-run after a partial failure. Already-fetched r
308
344
 
309
345
  `hk embed` calls an external embedding service:
310
346
 
311
- - **Ollama (default)** — ensure Ollama is running (`ollama serve`) and the embedding model is pulled (`ollama pull nomic-embed-text`).
312
- - **Voyage** — set `VOYAGE_API_KEY` in your environment. Check your API key at [dash.voyageai.com](https://dash.voyageai.com).
347
+ - **Ollama (default, 768-dim)** — ensure Ollama is running (`ollama serve`) and the embedding model is pulled (`ollama pull nomic-embed-text`).
348
+ - **Voyage (1024-dim)** — set `VOYAGE_API_KEY` in your environment. Check your API key at [dash.voyageai.com](https://dash.voyageai.com).
349
+ - **OpenAI (1536-dim default, configurable)** — set `OPENAI_API_KEY`. Default model is `text-embedding-3-small`; override with `OPENAI_EMBED_MODEL` (e.g. `text-embedding-3-large` for 3072-dim). Use via `hk hybrid --embed openai` or `hk embed --embed openai`.
350
+
351
+ **Embedding dimension mismatch on provider switch**
352
+
353
+ Each provider produces vectors of a fixed dimension (Ollama 768, Voyage 1024, OpenAI 1536 by default — OpenAI supports configurable dim within the model's native size). The DB stores the active dimension in `schema_meta.embedding_dim`. Switching providers across different dimensions while chunks exist raises `EMBEDDING_DIM_MISMATCH` (`AppError`) rather than silently corrupting the vector table. To switch:
354
+
355
+ ```bash
356
+ rm data/claude-synergy.db data/claude-synergy.db-wal data/claude-synergy.db-shm
357
+ hk init
358
+ hk ingest
359
+ hk embed --embed openai # new provider, new dim, fresh chunks_vec
360
+ ```
361
+
362
+ For OpenAI Matryoshka truncation (smaller-than-native dim), set `OPENAI_EMBED_MODEL` and pass the desired dim through `hk embed`'s provider construction — see the [handbook embedding section](https://mcp-tool-shop-org.github.io/claude-synergy/handbook/cli-reference/#embedding-providers-and-dimensions) for details.
313
363
 
314
364
  **Schema version mismatch / corrupted database**
315
365
 
package/README.pt-BR.md CHANGED
@@ -65,7 +65,7 @@ claude-synergy/
65
65
  │ └── plugins-{official,community,knowledge-work}/ # Plugin marketplaces
66
66
  ├── synergies/ # 12 curated cross-product workflows
67
67
  ├── src/ # TypeScript implementation
68
- ├── test/ # 382 tests (unit, integration, regression, smoke)
68
+ ├── test/ # 508 tests (unit, integration, regression, smoke)
69
69
  ├── data/claude-synergy.db # SQLite database (created by `hk init`)
70
70
  ├── schema.sql # Tier 2a tables (products, releases, changes, entities, FTS5, …)
71
71
  ├── schema-vec.sql # Tier 2b tables (chunks, chunks_vec, chunks_fts)
@@ -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 atualizados (a partir da versão 1.0.0):** 44 produtos / 1.186 arquivos de lançamento / 6.042 alterações / 1.225 entidades / 12 sinergias / 382 testes.
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.
77
77
 
78
78
  ---
79
79
 
@@ -84,11 +84,12 @@ claude-synergy/
84
84
  | **1 — corpus em Markdown (base)** | ✅ implementado | O "Study-swarm" indexou 706 arquivos de lançamento de janeiro a maio de 2026; expandido para 1.186 na etapa 4. |
85
85
  | **2a — SQLite + FTS5 + CLI** | ✅ implementado | CLI `hk`; 15 subcomandos; ingestão em menos de 300ms. |
86
86
  | **2b — sqlite-vec + Recuperação Contextual** | ✅ implementado | Fornecedor plugável (nenhum/estruturado/ollama/claude-haiku contexto × ollama/voyage embed × nenhum/ollama-judge/voyage/cohere rerank). |
87
- | **3 — sincronização + servidor MCP** | ✅ implementado | `hk fetch / sync / seed-markers`; o `claude-synergy-mcp` expõe 8 ferramentas via stdio. |
87
+ | **3 — sincronização + servidor MCP** | ✅ implementado | `hk fetch / sync / seed-markers`; `claude-synergy-mcp` expõe 11 ferramentas via stdio (8 na versão original Tier-3, 3 adicionadas na v1.1). |
88
88
  | **4a — expansão para além do Anthropic** | ✅ implementado | +15 SDKs MCP, Cursor (RSS), Aider (HISTORY.md), Continue.dev, Cody Enterprise (RSS filtrado). |
89
89
  | **4b — coletor de HTML** | ✅ implementado | GitHub Copilot + VS Code Chat (Windsurf precisa do Playwright — v0.7). |
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
+ | **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`. |
92
93
 
93
94
  Roteiro para a versão 0.8+: acompanhado em [URGENT_FINDINGS.md](URGENT_FINDINGS.md) e nas issues.
94
95
 
@@ -126,8 +127,12 @@ hk sync # combined fetch → ingest → embed (cron
126
127
  hk seed-markers # one-time setup after initial corpus
127
128
 
128
129
  # Search
129
- hk query "managed agents" # FTS5 keyword search
130
- hk hybrid "credential exfiltration" # FTS5 + vec hybrid via RRF (+ optional --rerank)
130
+ hk query "managed agents" # FTS5 keyword search (+ --until <date>)
131
+ hk hybrid "credential exfiltration" # FTS5 + vec hybrid via RRF (+ --rerank, --until)
132
+
133
+ # Windowed change browsing
134
+ hk diff [product] --since 7d # what changed in a window, grouped by product+version
135
+ hk breaking --since 30d # filter-browse of breaking changes (no search term)
131
136
 
132
137
  # Entity lookups
133
138
  hk env-var CLAUDE_CODE_WORKFLOWS # when introduced + history
@@ -136,7 +141,7 @@ hk model claude-opus-4-7 # model launch + mentions across products
136
141
  hk cve CVE-2025-66414 # CVE references in corpus
137
142
 
138
143
  # Browsing
139
- hk latest [--product X] [--limit N] # recent releases
144
+ hk latest [--product X] [--limit N] # recent releases (+ --since <date>)
140
145
  hk products # list all 44 with counts
141
146
  hk top env_var # most-mentioned by entity type
142
147
  # (env_var, slash_command, cli_option,
@@ -144,6 +149,8 @@ hk top env_var # most-mentioned by entity type
144
149
  # hook_event, setting_key)
145
150
  ```
146
151
 
152
+ **Novidades na v1.1:** `hk diff` e `hk breaking` respondem a "o que mudou recentemente?" sem a necessidade de um termo de pesquisa. Os limites de data são uniformes: todos os comandos de navegação aceitam `--since` e `--until` em formato `AAAA-MM-DD` (ou ISO 8601 completo), ou em formato relativo (`7d`, `2w`, `3m`, `1y`).
153
+
147
154
  ---
148
155
 
149
156
  ## Exemplos de fluxos de trabalho
@@ -186,6 +193,30 @@ $ hk hybrid "credential exfiltration" --limit 3
186
193
 
187
194
  A consulta nunca menciona "env_scrub" — o sistema o identifica por similaridade semântica. O sistema de busca tradicional (FTS5) não o encontra.
188
195
 
196
+ **O que mudou no claude-code esta semana:**
197
+ ```
198
+ $ hk diff claude-code --since 7d
199
+ claude-code@2.1.147 2026-05-21 (3 changes)
200
+ [added] Added the `Workflow` tool for deterministic multi-agent orchestration.
201
+ [changed] Slash commands now lazy-load until first invocation.
202
+ [fixed] Race condition in MCP server discovery on Windows.
203
+
204
+ claude-code@2.1.146 2026-05-19 (1 change)
205
+ [fixed] Restored `--debug` flag accidentally removed in 2.1.144.
206
+ ```
207
+
208
+ **Navegue pelas alterações significativas em todo o conjunto de dados:**
209
+ ```
210
+ $ hk breaking --since 30d --limit 5
211
+ 2026-05-15 claude-agent-sdk-python@0.2.82 Headless and SDK sessions now use Task tools by default.
212
+ 2026-05-14 claude-agent-sdk-typescript@0.3.142 Headless and SDK sessions now use Task tools by default.
213
+ 2026-05-08 anthropic-sdk-go@1.42.0 Removed deprecated `client.Beta()` namespace.
214
+ 2026-04-29 cursor@0.49.0 MCP server config moved from `cursor.json` to `.cursor/mcp.json`.
215
+ 2026-04-22 windsurf@1.10.0 Removed `cascade.run` JSON-RPC method.
216
+ ```
217
+
218
+ Não é necessário um termo de pesquisa — `hk breaking` é a resposta para "alguma alteração importante ocorreu recentemente?".
219
+
189
220
  ---
190
221
 
191
222
  ## Servidor MCP — forneça acesso a este corpus para seus agentes
@@ -211,14 +242,19 @@ Ferramentas disponíveis:
211
242
 
212
243
  | Ferramenta | Propósito |
213
244
  |---|---|
214
- | `search` | FTS5 + busca vetorial; reclassificação opcional. Modo padrão para consultas em linguagem natural. |
245
+ | `search` | FTS5 + vet híbrido; reclassificação opcional. Modo padrão para consultas em linguagem natural. (+ limite superior de data `until`) |
215
246
  | `lookup_entity` | Histórico completo de entidades: variáveis de ambiente, comandos, IDs de modelos, CVEs, etc. |
216
- | `latest_releases` | Lançamentos recentes em todos os produtos (ou em um). |
247
+ | `latest_releases` | Lançamentos recentes em todos os produtos (ou em um). (+ limite inferior de data `since`) |
217
248
  | `get_release` | Conteúdo completo de um lançamento. |
218
249
  | `list_products` | Enumeração com contagens + versão mais recente. |
219
250
  | `top_entities` | Entidades mais mencionadas por tipo. |
220
- | `list_synergies` | Fluxos de trabalho entre produtos, selecionados. |
251
+ | `list_synergies` | Fluxos de trabalho entre produtos. (+ filtro de produto opcional) |
221
252
  | `read_synergy` | Texto completo de um arquivo de sinergia. |
253
+ | `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
+ | `search_breaking_changes` | **Novo.** Lista simples de alterações significativas — não é necessário um termo de pesquisa. Entradas: `product?`, `since?`, `until?`, `limit?`. |
255
+ | `compare_versions` | **Novo.** Todas as alterações entre duas versões de um produto. Entradas: `product`, `from_version`, `to_version`. |
256
+
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.
222
258
 
223
259
  ---
224
260
 
@@ -226,11 +262,11 @@ Ferramentas disponíveis:
226
262
 
227
263
  Visão geral completa em [SOURCES.md](SOURCES.md).
228
264
 
229
- - **Nível 1 (Lançamentos do GitHub)** — `gh api repos/<owner>/<repo>/releases` para 22 produtos, incluindo SDKs da Anthropic (7 linguagens), SDKs de Agentes (2), ant CLI, claude-code-action, claude-code-security-review e 15 SDKs do ecossistema MCP.
230
- - **Nível 2 (markdown bruto)** — `anthropics/claude-code/CHANGELOG.md` + `Aider-AI/aider/HISTORY.md`
231
- - **Nível 3 (HTML / RSS)** — `platform.claude.com/docs/release-notes`, `support.claude.com/articles/12138966`, `cursor.com/changelog/rss.xml`, `sourcegraph.com/changelog/featured.rss` (filtrado), `github.blog/changelog/label/copilot/`, `code.visualstudio.com/updates/v1_NNN`
232
- - **Nível 4 (catálogo)** — `anthropics/skills`, `claude-plugins-{official,community}`, `knowledge-work-plugins`
233
- - **Nível 5 (consultoria)** — Conta X `@ClaudeCodeLog`; espelho de changelog do marckrenn.
265
+ - **Nível 1 (Lançamentos do GitHub)** — `gh api repos/<owner>/<repo>/releases` para 23 produtos, incluindo SDKs da Anthropic (7 linguagens), SDKs de Agentes (2), ant CLI, **claude-code** (agora sincronizado automaticamente via gh-releases a partir da v1.1 — anteriormente, a sincronização era manual), claude-code-action, claude-code-security-review e 15 SDKs do ecossistema MCP.
266
+ - **Nível 2 (markdown bruto)** — `Aider-AI/aider/HISTORY.md`. O analisador genérico `keep-a-changelog` (v1.1+) também está disponível para qualquer produto cujo código-fonte seja um arquivo CHANGELOG.md no formato Keep-a-Changelog — configure-o através de uma entrada em `products.yaml`.
267
+ - **Nível 3 (HTML / RSS)** — `platform.claude.com/docs/release-notes`, `support.claude.com/articles/12138966`, `cursor.com/changelog/rss.xml`, `sourcegraph.com/changelog/featured.rss` (filtrado), `github.blog/changelog/label/copilot/`, `code.visualstudio.com/updates/v1_NNN`.
268
+ - **Nível 4 (catálogo)** — `anthropics/skills`, `claude-plugins-{official,community}`, `knowledge-work-plugins`.
269
+ - **Nível 5 (aconselhamento)** — Conta X `@ClaudeCodeLog`; espelho de changelog de marckrenn.
234
270
 
235
271
  Estratégias de busca: `gh-releases | rss | raw-changelog | html-scrape | catalog | playwright`. Novo produto = uma entrada em `products.yaml`.
236
272
 
@@ -255,7 +291,7 @@ Estratégias de busca: `gh-releases | rss | raw-changelog | html-scrape | catalo
255
291
  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.
256
292
 
257
293
  ```bash
258
- pnpm test # unit + integration + regression (~16s, 382 tests)
294
+ pnpm test # unit + integration + regression (~18s, 508 tests)
259
295
  pnpm test:watch # interactive
260
296
  pnpm test:coverage # generate coverage/index.html (thresholds: 78/75/85/78)
261
297
  pnpm test:smoke # opt-in full-corpus smoke (RUN_SMOKE=1)
@@ -265,9 +301,9 @@ Estrutura:
265
301
 
266
302
  | Diretório | O que ele cobre |
267
303
  |-----|----------------|
268
- | `test/unit/` | por módulo — extração, ingestão, consulta, banco de dados, incorporação, busca híbrida, busca + todos os provedores + busca-rss/changelog/html + busca-mcp-registry + busca-playwright + configuração de produtos. |
269
- | `test/integration/` | teste de ponta a ponta — pipeline, sincronização, servidor MCP (stdio JSON-RPC), CLI. |
270
- | `test/regression/` | §8.1–§8.18 — cada um protege contra um erro real corrigido durante o desenvolvimento. |
304
+ | `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`). |
306
+ | `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). |
271
307
  | `test/smoke/` | Teste completo com um conjunto de dados simulado, representando os arquivos reais do diretório `products/` (1.143 arquivos). |
272
308
  | `test/fixtures/` | 3 produtos simulados + respostas HTTP simuladas (RSS / GH / Voyage / Cohere / Ollama / Anthropic / Smithery / Registro oficial do MCP). |
273
309
  | `test/helpers/` | `temp-db.ts`, `fetch-mock.ts`, `mcp-client.ts`, `seed-corpus.ts`, `golden-vectors.ts`, `playwright-mock.ts`, `yaml-fixtures.ts` |
@@ -308,8 +344,22 @@ A sincronização é idempotente — é seguro executá-la novamente após uma f
308
344
 
309
345
  `hk embed` chama um serviço de incorporação externo:
310
346
 
311
- - **Ollama (padrão)** — certifique-se de que o Ollama está em execução (`ollama serve`) e que o modelo de incorporação foi baixado (`ollama pull nomic-embed-text`).
312
- - **Voyage** — defina `VOYAGE_API_KEY` no seu ambiente. Verifique sua chave de API em [dash.voyageai.com](https://dash.voyageai.com).
347
+ - **Ollama (padrão, 768 dimensões)** — certifique-se de que o Ollama está em execução (`ollama serve`) e que o modelo de incorporação foi baixado (`ollama pull nomic-embed-text`).
348
+ - **Voyage (1024 dimensões)** — defina a variável de ambiente `VOYAGE_API_KEY`. Verifique sua chave de API em [dash.voyageai.com](https://dash.voyageai.com).
349
+ - **OpenAI (1536 dimensões por padrão, configurável)** — defina a variável `OPENAI_API_KEY`. O modelo padrão é `text-embedding-3-small`; você pode alterá-lo usando a variável `OPENAI_EMBED_MODEL` (por exemplo, `text-embedding-3-large` para 3072 dimensões). Use-o através de `hk hybrid --embed openai` ou `hk embed --embed openai`.
350
+
351
+ **Incompatibilidade de dimensões de incorporação ao alternar de provedor**
352
+
353
+ Cada provedor produz vetores de uma dimensão fixa (Ollama 768, Voyage 1024, OpenAI 1536 por padrão — o OpenAI suporta dimensões configuráveis dentro do tamanho nativo do modelo). O banco de dados armazena a dimensão ativa em `schema_meta.embedding_dim`. A alteração de provedores entre dimensões diferentes, enquanto existem fragmentos, gera um erro `EMBEDDING_DIM_MISMATCH` (um erro da aplicação) em vez de corromper silenciosamente a tabela de vetores. Para alterar:
354
+
355
+ ```bash
356
+ rm data/claude-synergy.db data/claude-synergy.db-wal data/claude-synergy.db-shm
357
+ hk init
358
+ hk ingest
359
+ hk embed --embed openai # new provider, new dim, fresh chunks_vec
360
+ ```
361
+
362
+ Para a truncagem Matryoshka do OpenAI (dimensão menor que a nativa), defina a variável `OPENAI_EMBED_MODEL` e passe a dimensão desejada através da construção do provedor no comando `hk embed` — consulte a [seção de incorporação do manual](https://mcp-tool-shop-org.github.io/claude-synergy/handbook/cli-reference/#embedding-providers-and-dimensions) para obter detalhes.
313
363
 
314
364
  **Incompatibilidade de versão do esquema / banco de dados corrompido**
315
365
 
package/README.zh.md CHANGED
@@ -65,7 +65,7 @@ claude-synergy/
65
65
  │ └── plugins-{official,community,knowledge-work}/ # Plugin marketplaces
66
66
  ├── synergies/ # 12 curated cross-product workflows
67
67
  ├── src/ # TypeScript implementation
68
- ├── test/ # 382 tests (unit, integration, regression, smoke)
68
+ ├── test/ # 508 tests (unit, integration, regression, smoke)
69
69
  ├── data/claude-synergy.db # SQLite database (created by `hk init`)
70
70
  ├── schema.sql # Tier 2a tables (products, releases, changes, entities, FTS5, …)
71
71
  ├── schema-vec.sql # Tier 2b tables (chunks, chunks_vec, chunks_fts)
@@ -73,7 +73,7 @@ claude-synergy/
73
73
  └── URGENT_FINDINGS.md # 23 actionable items surfaced from the corpus
74
74
  ```
75
75
 
76
- **实时数据(截至 v1.0.0 版本):** 44 个产品 / 1,186 个发布文件 / 6,042 次变更 / 1,225 个实体 / 12 个协同关系 / 382 个测试。
76
+ **实时数据 (截至 v1.1.0 版本):** 44 个产品 / 1,186 个发布文件 / 6,042 个变更 / 1,225 个实体 / 12 个协同功能 / 508 个测试 / 11 个 MCP 工具 / 17 个 CLI 命令。
77
77
 
78
78
  ---
79
79
 
@@ -84,11 +84,12 @@ 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` 通过标准输入/输出接口提供了 8 个工具。 |
87
+ | 3. 同步 + MCP 服务器。 | ✅ 已发货。 | `hk fetch / sync / seed-markers`;`claude-synergy-mcp` 通过标准输入 (stdio) 提供了 11 个工具 (最初的 Tier-3 版本有 8 个,v1.1 版本新增了 3 个)。 |
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
+ | **5 — v1.1 版本:窗口浏览 + OpenAI 嵌入** | ✅ 已发货。 | `hk diff` / `hk breaking`,所有浏览命令都支持日期范围;3 个新的 MCP 工具 (总共 11 个);OpenAI 嵌入提供程序;可配置的嵌入维度;`claude-code` 自动同步;通用的 `keep-a-changelog` 解析器。 |
92
93
 
93
94
  v0.8 及后续版本的开发计划,请参考 [URGENT_FINDINGS.md](URGENT_FINDINGS.md) 文件以及相关问题列表。
94
95
 
@@ -126,8 +127,12 @@ hk sync # combined fetch → ingest → embed (cron
126
127
  hk seed-markers # one-time setup after initial corpus
127
128
 
128
129
  # Search
129
- hk query "managed agents" # FTS5 keyword search
130
- hk hybrid "credential exfiltration" # FTS5 + vec hybrid via RRF (+ optional --rerank)
130
+ hk query "managed agents" # FTS5 keyword search (+ --until <date>)
131
+ hk hybrid "credential exfiltration" # FTS5 + vec hybrid via RRF (+ --rerank, --until)
132
+
133
+ # Windowed change browsing
134
+ hk diff [product] --since 7d # what changed in a window, grouped by product+version
135
+ hk breaking --since 30d # filter-browse of breaking changes (no search term)
131
136
 
132
137
  # Entity lookups
133
138
  hk env-var CLAUDE_CODE_WORKFLOWS # when introduced + history
@@ -136,7 +141,7 @@ hk model claude-opus-4-7 # model launch + mentions across products
136
141
  hk cve CVE-2025-66414 # CVE references in corpus
137
142
 
138
143
  # Browsing
139
- hk latest [--product X] [--limit N] # recent releases
144
+ hk latest [--product X] [--limit N] # recent releases (+ --since <date>)
140
145
  hk products # list all 44 with counts
141
146
  hk top env_var # most-mentioned by entity type
142
147
  # (env_var, slash_command, cli_option,
@@ -144,6 +149,8 @@ hk top env_var # most-mentioned by entity type
144
149
  # hook_event, setting_key)
145
150
  ```
146
151
 
152
+ **v1.1 版本的更新:** `hk diff` 和 `hk breaking` 命令可以在不指定搜索词的情况下回答“最近发生了哪些变化?”。日期范围统一:所有浏览命令都支持 `--since` 和 `--until` 参数,格式为 `YYYY-MM-DD` (或完整的 ISO 8601 格式),或者相对时间格式 (例如 `7d`、`2w`、`3m`、`1y`)。
153
+
147
154
  ---
148
155
 
149
156
  ## 示例工作流程
@@ -186,6 +193,30 @@ $ hk hybrid "credential exfiltration" --limit 3
186
193
 
187
194
  查询中永远不会出现 "env_scrub",vec 通过语义相似性将其呈现出来。 纯 FTS5 完全无法识别它。
188
195
 
196
+ **本周 claude-code 的变化:**
197
+ ```
198
+ $ hk diff claude-code --since 7d
199
+ claude-code@2.1.147 2026-05-21 (3 changes)
200
+ [added] Added the `Workflow` tool for deterministic multi-agent orchestration.
201
+ [changed] Slash commands now lazy-load until first invocation.
202
+ [fixed] Race condition in MCP server discovery on Windows.
203
+
204
+ claude-code@2.1.146 2026-05-19 (1 change)
205
+ [fixed] Restored `--debug` flag accidentally removed in 2.1.144.
206
+ ```
207
+
208
+ **浏览所有代码库中的重大变更:**
209
+ ```
210
+ $ hk breaking --since 30d --limit 5
211
+ 2026-05-15 claude-agent-sdk-python@0.2.82 Headless and SDK sessions now use Task tools by default.
212
+ 2026-05-14 claude-agent-sdk-typescript@0.3.142 Headless and SDK sessions now use Task tools by default.
213
+ 2026-05-08 anthropic-sdk-go@1.42.0 Removed deprecated `client.Beta()` namespace.
214
+ 2026-04-29 cursor@0.49.0 MCP server config moved from `cursor.json` to `.cursor/mcp.json`.
215
+ 2026-04-22 windsurf@1.10.0 Removed `cascade.run` JSON-RPC method.
216
+ ```
217
+
218
+ 无需搜索词 — `hk breaking` 命令可以回答“最近是否有任何关键部分发生了变化?”
219
+
189
220
  ---
190
221
 
191
222
  ## MCP 服务器 — 允许您的代理访问此语料库
@@ -211,14 +242,19 @@ $ hk hybrid "credential exfiltration" --limit 3
211
242
 
212
243
  | 工具 | 用途 |
213
244
  |---|---|
214
- | `search` | 混合 FTS5 + vec;可选的重新排序。 默认模式用于自然语言查询。 |
245
+ | `search` | 混合 FTS5 + vec;可选的重新排序。默认模式用于自然语言查询。(+ `until` 日期上限) |
215
246
  | `lookup_entity` | 精确的实体历史记录:环境变量、斜杠命令、模型 ID、CVE 等。 |
216
- | `latest_releases` | 产品(或单个产品)的最新发布版本 |
247
+ | `latest_releases` | 产品 (或单个产品) 的最新发布版本。(+ `since` 日期下限) |
217
248
  | `get_release` | 单个发布版本的完整内容 |
218
249
  | `list_products` | 带有计数和最新版本的枚举 |
219
250
  | `top_entities` | 按类型提及最多的实体 |
220
- | `list_synergies` | 精心策划的跨产品工作流程 |
251
+ | `list_synergies` | 精心设计的跨产品工作流程。(+ 可选的 `product` 过滤器) |
221
252
  | `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`。 |
256
+
257
+ 这三个新的工具模仿了 `hk diff` / `hk breaking` 命令,以及之前需要脚本才能实现的版本比较工作流程。有关完整的输入模式,请参阅 [手册 → MCP 服务器](https://mcp-tool-shop-org.github.io/claude-synergy/handbook/mcp-server/)。
222
258
 
223
259
  ---
224
260
 
@@ -226,11 +262,11 @@ $ hk hybrid "credential exfiltration" --limit 3
226
262
 
227
263
  完整的详细信息请参阅 [SOURCES.md](SOURCES.md)。
228
264
 
229
- - **第一层级 (GitHub 发布):** `gh api repos/<owner>/<repo>/releases`,涵盖 22 个产品,包括 Anthropic SDK7 种语言)、Agent SDK2 个)、ant CLI、claude-code-action、claude-code-security-review 以及 15 个 MCP 生态系统 SDK。
230
- - **第二层级 (原始 markdown):** `anthropics/claude-code/CHANGELOG.md` + `Aider-AI/aider/HISTORY.md`
231
- - **第三层级 (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`
232
- - **第四层级 (目录):** `anthropics/skills`、`claude-plugins-{official,community}`、`knowledge-work-plugins`
233
- - **第五层级 (建议):** `@ClaudeCodeLog` X 账号;marckrenn 变更日志镜像
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 的变更日志镜像。
234
270
 
235
271
  抓取策略:`gh-releases | rss | raw-changelog | html-scrape | catalog | playwright`。 增加一个新产品,就在 `products.yaml` 文件中增加一条记录。
236
272
 
@@ -255,7 +291,7 @@ $ hk hybrid "credential exfiltration" --limit 3
255
291
  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) 仍然保存在代码库中,作为设计演进的历史记录。
256
292
 
257
293
  ```bash
258
- pnpm test # unit + integration + regression (~16s, 382 tests)
294
+ pnpm test # unit + integration + regression (~18s, 508 tests)
259
295
  pnpm test:watch # interactive
260
296
  pnpm test:coverage # generate coverage/index.html (thresholds: 78/75/85/78)
261
297
  pnpm test:smoke # opt-in full-corpus smoke (RUN_SMOKE=1)
@@ -265,9 +301,9 @@ pnpm test:smoke # opt-in full-corpus smoke (RUN_SMOKE=1)
265
301
 
266
302
  | 目录 | 涵盖内容 |
267
303
  |-----|----------------|
268
- | `test/unit/` | 模块级别 提取、导入、查询、数据库、嵌入、混合、获取 + 所有提供商 + 获取 RSS/变更日志/HTML + 获取 MCP 注册表 + 获取 Playwright + 产品配置 |
269
- | `test/integration/` | 端到端 — 流水线、同步、MCP 服务器 (stdio JSON-RPC)、命令行界面 |
270
- | `test/regression/` | §8.1–§8.18每个部分都用于防止开发过程中出现的实际错误。 |
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 的早期退出分页保留了窗口内的项目)。 |
271
307
  | `test/smoke/` | 可选的完整语料库,用于测试 `products/` 目录下的文件 (1143 个文件)。 |
272
308
  | `test/fixtures/` | 3 个模拟产品 + 模拟 HTTP 响应 (RSS / GH / Voyage / Cohere / Ollama / Anthropic / Smithery / 官方 MCP 注册表) |
273
309
  | `test/helpers/` | `temp-db.ts`, `fetch-mock.ts`, `mcp-client.ts`, `seed-corpus.ts`, `golden-vectors.ts`, `playwright-mock.ts`, `yaml-fixtures.ts` |
@@ -308,8 +344,22 @@ CI:`.github/workflows/test.yml` 在代码提交和拉取请求时运行 `pnpm
308
344
 
309
345
  `hk embed` 命令会调用外部嵌入服务:
310
346
 
311
- - **Ollama (默认)** — 确保 Ollama 正在运行 (`ollama serve`),并且已下载嵌入模型 (`ollama pull nomic-embed-text`)。
312
- - **Voyage** — 在您的环境中设置 `VOYAGE_API_KEY`。 检查您的 API 密钥,请访问 [dash.voyageai.com](https://dash.voyageai.com)
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
+
351
+ **在切换提供商时,嵌入维度不匹配**
352
+
353
+ 每个提供商生成固定维度的向量(Ollama 默认 768 维,Voyage 默认 1024 维,OpenAI 默认 1536 维——OpenAI 支持在模型原生尺寸范围内配置维度)。数据库将当前使用的维度存储在 `schema_meta.embedding_dim` 中。在存在分块的情况下,在不同维度之间切换提供商,会引发 `EMBEDDING_DIM_MISMATCH` 错误(`AppError`),而不是静默地损坏向量表。要切换:
354
+
355
+ ```bash
356
+ rm data/claude-synergy.db data/claude-synergy.db-wal data/claude-synergy.db-shm
357
+ hk init
358
+ hk ingest
359
+ hk embed --embed openai # new provider, new dim, fresh chunks_vec
360
+ ```
361
+
362
+ 对于 OpenAI Matryoshka 截断(小于原生维度的嵌入),请设置 `OPENAI_EMBED_MODEL`,并通过 `hk embed` 的提供商配置传递所需的维度。有关详细信息,请参阅 [手册中的嵌入部分](https://mcp-tool-shop-org.github.io/claude-synergy/handbook/cli-reference/#embedding-providers-and-dimensions)。
313
363
 
314
364
  **模式版本不匹配/数据库损坏**
315
365