@mcptoolshop/claude-synergy 0.0.0 → 1.0.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 ADDED
@@ -0,0 +1,132 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.1] - 2026-05-22
9
+
10
+ ### Changed
11
+ - README: center badges directly under logo. Uses inline `<img>` tags inside `<p align="center">` instead of markdown badge syntax — markdown badges with surrounding blank lines render as a separate paragraph on GitHub and npm, breaking center alignment.
12
+
13
+ ## [1.0.0] - 2026-05-22
14
+
15
+ ### Added
16
+ - Structured error shape (`AppError` class) with `code`, `message`, `hint`, `cause?`, `retryable?` across all CLI commands.
17
+ - Logging levels: `--verbose`, `--debug` flags + `HK_LOG_LEVEL` env var (silent/normal/verbose/debug). Secrets never logged at any level.
18
+ - Exit code 3 for partial success (fetch/sync where some products fail but others succeed).
19
+ - Dependabot config for automated npm + GitHub Actions dependency updates.
20
+ - Dependency audit step (`pnpm audit`) in CI test workflow.
21
+ - CHANGELOG.md included in npm tarball.
22
+
23
+ ### Changed
24
+ - Version promoted from 0.7.2 to 1.0.0 — first stable release.
25
+ - All CLI error paths use `formatError()` with structured output; `--json` mode returns error shape as JSON.
26
+ - Legacy `HK_DEBUG=1` env var mapped to `--debug` log level for backward compatibility.
27
+
28
+ ## [0.7.2] - 2026-05-22
29
+
30
+ ### Security
31
+ - Path-traversal sanitization on all file-write paths (products/, data/).
32
+ - Command-injection guards on CLI subcommands that shell out.
33
+ - Input validation hardening across fetch + ingest pipeline.
34
+ - YAML-escape sanitization for user-supplied strings entering products.yaml.
35
+
36
+ ### Added
37
+ - Pagination support for GitHub Releases fetcher (handles repos with 100+ releases).
38
+ - Provider timeout guards — all external HTTP calls now enforce per-request timeouts.
39
+ - `publishConfig` added to package.json for scoped npm publishing.
40
+ - LICENSE file (MIT) added to repo root.
41
+ - 3 new tests covering ghReleases pagination edge cases.
42
+ - `fetchWithRetry` utility — timeout, retry, and exponential backoff for all external HTTP calls.
43
+ - Signal handling (`SIGINT`/`SIGTERM`) for graceful shutdown in long-running commands.
44
+ - Schema versioning with automatic migration detection on `hk init`.
45
+ - Embed cost tracking — estimated token/cost metrics logged after `hk embed`.
46
+ - Progress callbacks for ingest and embed pipelines (stderr progress when TTY attached).
47
+ - `--json` flag on `hk query`, `hk latest`, `hk products` for machine-readable output.
48
+ - Empty-state guidance — helpful messages when DB is empty or query returns zero results.
49
+ - CONTRIBUTING.md — guide for adding products, running tests, and submitting PRs.
50
+ - Troubleshooting section in README (database locks, sqlite-vec load, fetch errors, schema mismatch).
51
+ - 88 new tests covering proactive health, behavioral humanization, visual polish, and feature pass (suite total: 382).
52
+ - `exports` field in package.json for programmatic import resolution.
53
+ - `prepublishOnly` build guard — prevents shipping empty `dist/`.
54
+ - `fetchWithRetry` test suite (25 tests: retry, backoff, timeout, Retry-After, AbortSignal, GitHub rate-limit enrichment).
55
+ - `--json` output mode integration tests (5 tests: query, latest, products, top, env-var).
56
+ - Embed budget guard tests (10 tests: maxRequests, maxTokens, signal cancellation, partial-commit consistency).
57
+
58
+ ### Changed
59
+ - Coverage thresholds adjusted to 77/75/85/77 (statements/branches/functions/lines) to reflect post-refactor baseline.
60
+ - Test count 294 to 382 (88 new tests across 4 swarm stages + feature pass).
61
+ - README badge row: replaced static shields.io test badge with dynamic CI status badge; added npm version badge.
62
+ - README test counts and live numbers updated to reflect v0.7.2 baseline.
63
+ - npm tarball reduced from 1.1 MB to 62 KB by excluding docs/logo.png from `files` field.
64
+ - Build scripts now use `--external playwright` to avoid bundling native Chromium bindings.
65
+
66
+ ## [0.7.1] - 2026-05-21
67
+
68
+ ### Added
69
+ - Tests catch up to Phase 4d code: 52 new unit tests covering `products-config`, `fetch-mcp-registry`, and `fetch-playwright`. Suite now at 291 tests, all passing.
70
+
71
+ ### Fixed
72
+ - CI: pinned pnpm to v10 in `test.yml` and `sync.yml`. `pnpm@latest` resolves to v11, which enforces a 24-hour `minimumReleaseAge` that blocked five consecutive release CI runs.
73
+
74
+ ## [0.7.0] - 2026-05-21
75
+
76
+ ### Added
77
+ - **Phase 4d** — full feature pass for v0.7 line:
78
+ - README refresh — numbers, fetch strategies, and roadmap aligned with shipped reality.
79
+ - YAML-driven products config — `TARGETS` and `PRODUCT_META` consolidated into `products.yaml`. Adding a product is now a one-entry YAML edit.
80
+ - MCP registry catalogs — Smithery and the official MCP Registry now fetched as Tier 4 catalog sources.
81
+ - Playwright fetcher — Windsurf changelog (CSR-only) now reachable via headless browser. Closes the v0.6 CSR-fallback gap.
82
+
83
+ ## [0.6.1] - 2026-05-21
84
+
85
+ ### Added
86
+ - Test suite caught up to Phase 4b/4c shipped code: 239 tests, all passing. Coverage ~85%.
87
+
88
+ ### Fixed
89
+ - continue-cli release bodies now filtered to exclude raw git-commit dumps (cuts ~15k of 21k noisy changes).
90
+
91
+ ## [0.6.0] - 2026-05-21
92
+
93
+ ### Added
94
+ - **Phase 4c — continue-cli commit-dump filter**: detect-and-skip pattern for release bodies that are pure git-log dumps. Cleans the corpus without losing actual changelog entries.
95
+ - 12th synergy file curated.
96
+
97
+ ### Changed
98
+ - Total change count dropped from 21,210 → 5,957 — the noise that was inflating Tier-4a counts is gone.
99
+
100
+ ## [0.5.1] - 2026-05-21
101
+
102
+ ### Added
103
+ - **Phase 4c — turndown HTML→markdown ingest**: HTML bodies (GitHub Copilot, VS Code Chat, Cursor) are now converted to markdown before per-bullet parsing, so FTS5 + entity extraction works end-to-end on HTML sources.
104
+
105
+ ## [0.5.0] - 2026-05-21
106
+
107
+ ### Added
108
+ - **Tier 4b — HTML-scrape fetcher** for products without a Releases API:
109
+ - GitHub Copilot via `github.blog/changelog/label/copilot/`
110
+ - VS Code Chat via `code.visualstudio.com/updates/v1_NNN`
111
+ - Windsurf via CSR fallback (full Playwright fetch deferred to v0.7)
112
+ - Total: 34 products / 1,101 release files.
113
+
114
+ ## [0.4.0] - 2026-05-21
115
+
116
+ ### Added
117
+ - **Initial public release** through Tier 4a. Highlights:
118
+ - 33 products covered: Anthropic SDKs (7 languages), Agent SDKs (2), `ant` CLI, claude-code-action, claude-code-security-review, 15 MCP ecosystem SDKs, plus Cursor (RSS), Aider (raw `HISTORY.md`), Continue.dev, Cody Enterprise (filtered RSS).
119
+ - 1,057 release files / ~19,618 changes / 12 synergies.
120
+ - Fetcher strategies: `gh-releases`, `rss`, `raw-changelog`.
121
+ - SQLite + FTS5 corpus, sqlite-vec semantic search with Contextual Retrieval, `claude-synergy-mcp` MCP server exposing 8 tools over stdio.
122
+
123
+ [1.0.1]: https://github.com/mcp-tool-shop-org/claude-synergy/releases/tag/v1.0.1
124
+ [1.0.0]: https://github.com/mcp-tool-shop-org/claude-synergy/releases/tag/v1.0.0
125
+ [0.7.2]: https://github.com/mcp-tool-shop-org/claude-synergy/releases/tag/v0.7.2
126
+ [0.7.1]: https://github.com/mcp-tool-shop-org/claude-synergy/releases/tag/v0.7.1
127
+ [0.7.0]: https://github.com/mcp-tool-shop-org/claude-synergy/releases/tag/v0.7.0
128
+ [0.6.1]: https://github.com/mcp-tool-shop-org/claude-synergy/releases/tag/v0.6.1
129
+ [0.6.0]: https://github.com/mcp-tool-shop-org/claude-synergy/releases/tag/v0.6.0
130
+ [0.5.1]: https://github.com/mcp-tool-shop-org/claude-synergy/releases/tag/v0.5.1
131
+ [0.5.0]: https://github.com/mcp-tool-shop-org/claude-synergy/releases/tag/v0.5.0
132
+ [0.4.0]: https://github.com/mcp-tool-shop-org/claude-synergy/releases/tag/v0.4.0
@@ -0,0 +1,101 @@
1
+ # Contributing to Claude Synergy
2
+
3
+ Thanks for your interest in contributing. This guide covers adding new products, running tests, and submitting PRs.
4
+
5
+ ## Prerequisites
6
+
7
+ - **Node >= 22** (`node -v` to check)
8
+ - **pnpm >= 10** (`pnpm -v` to check)
9
+ - **gh CLI** (optional, for testing `gh-releases` fetcher locally)
10
+
11
+ ## Adding a new product
12
+
13
+ 1. Open `products.yaml` at the repo root.
14
+ 2. Append an entry under `products:`. The minimum required fields are:
15
+
16
+ ```yaml
17
+ - name: my-new-tool # slug: lowercase alphanumeric + hyphens only
18
+ display_name: My New Tool # human-readable name (shown in CLI output)
19
+ tier: 1 # source tier (1-5, see below)
20
+ source_url: https://github.com/org/repo # canonical URL for the source
21
+ fetch_strategy: gh-releases # must match the fetch.type below
22
+ fetch:
23
+ type: gh-releases
24
+ repo: org/repo # owner/repo for GitHub Releases API
25
+ ```
26
+
27
+ 3. Pick the right fetch strategy for your source:
28
+
29
+ | Strategy | When to use | Required `fetch:` fields |
30
+ |---|---|---|
31
+ | `gh-releases` | Repo publishes GitHub Releases | `repo` (owner/repo). Optional: `multi_package: true` for monorepos with scoped tags. |
32
+ | `rss` | Source has an RSS feed | `url` (feed URL). Optional: `title_filter` (regex to filter entries). |
33
+ | `raw-changelog` | Source is a raw CHANGELOG/HISTORY.md file | `url` (raw file URL), `parser` (currently only `aider-history`). |
34
+ | `html-scrape` | Source is a blog/changelog page | `parser` (`github-copilot-blog`, `vscode-updates`). |
35
+ | `playwright` | Source is client-rendered (no SSR) | No extra fields. Currently hardcoded to Windsurf. |
36
+ | `catalog` | Source is an MCP registry | `catalog_type` (`official-mcp-registry` or `smithery`). Optional: `max_entries`. |
37
+
38
+ 4. Test your entry:
39
+
40
+ ```bash
41
+ pnpm build
42
+ hk init
43
+ hk fetch --product my-new-tool
44
+ hk ingest
45
+ hk products # should list your product with release count
46
+ hk query "some keyword" # verify releases appear in search
47
+ ```
48
+
49
+ ## Tier semantics
50
+
51
+ | Tier | Meaning | Examples |
52
+ |------|---------|---------|
53
+ | 1 | Structured API (GitHub Releases) — highest fidelity | SDKs, MCP ecosystem |
54
+ | 2 | Raw markdown changelog | claude-code, aider |
55
+ | 3 | HTML/RSS scrape | Cursor, Copilot, Cody |
56
+ | 4 | Catalog snapshot (not versioned releases) | Skills, plugins, MCP registries |
57
+ | 5 | Advisory / manual | X accounts, community mirrors |
58
+
59
+ ## Running tests
60
+
61
+ ```bash
62
+ pnpm test # unit + integration + regression (~13s, ~294 tests)
63
+ pnpm test:watch # interactive mode (re-runs on file change)
64
+ pnpm test:coverage # generates coverage/index.html (thresholds: 78/75/85/78)
65
+ pnpm test:smoke # opt-in full-corpus smoke test (set RUN_SMOKE=1)
66
+ ```
67
+
68
+ Tests use real SQLite temp files (not `:memory:`) and mock all HTTP calls. No network access, no API keys needed.
69
+
70
+ ## Adding a new fetcher strategy
71
+
72
+ 1. Create `src/fetch-<name>.ts` with the parsing/fetching logic.
73
+ 2. Wire it into `src/fetch.ts` — add a case in the `fetchOne` switch statement.
74
+ 3. Add the type to `FetchType` in `src/products-config.ts`.
75
+ 4. Add test fixtures in `test/fixtures/` and unit tests in `test/unit/`.
76
+
77
+ ## PR guidelines
78
+
79
+ - **Tests required** — `pnpm test` must pass. New code should have unit tests.
80
+ - **No network in tests** — mock HTTP calls via `vi.spyOn(global, 'fetch')`. See existing tests for patterns.
81
+ - **No source file edits without tests** — if you touch `src/*.ts`, add or update a test in `test/`.
82
+ - **products.yaml only for new products** — adding a product needs no code change if an existing strategy fits.
83
+ - **Keep commits focused** — one logical change per PR.
84
+
85
+ ## Local development
86
+
87
+ ```bash
88
+ git clone https://github.com/mcp-tool-shop-org/claude-synergy
89
+ cd claude-synergy
90
+ pnpm install
91
+ pnpm build # compiles to dist/
92
+
93
+ # Run CLI without building (dev mode):
94
+ npx tsx src/cli.ts init
95
+ npx tsx src/cli.ts query "some term"
96
+
97
+ # Run MCP server (dev mode):
98
+ npx tsx src/mcp-server.ts
99
+ ```
100
+
101
+ **pnpm 10 quirk:** `pnpm dev` swallows CLI flags after `--`. Use `npx tsx src/cli.ts ...` directly during development.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 mcp-tool-shop
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.es.md ADDED
@@ -0,0 +1,342 @@
1
+ <p align="center">
2
+ <a href="README.ja.md">日本語</a> | <a href="README.zh.md">中文</a> | <a href="README.md">English</a> | <a href="README.fr.md">Français</a> | <a href="README.hi.md">हिन्दी</a> | <a href="README.it.md">Italiano</a> | <a href="README.pt-BR.md">Português (BR)</a>
3
+ </p>
4
+
5
+ <p align="center"><img src="https://raw.githubusercontent.com/mcp-tool-shop-org/brand/main/logos/claude-synergy/readme.png" alt="Claude Synergy" width="400"></p>
6
+
7
+ <p align="center">
8
+ <a href="https://github.com/mcp-tool-shop-org/claude-synergy/actions/workflows/test.yml"><img src="https://github.com/mcp-tool-shop-org/claude-synergy/actions/workflows/test.yml/badge.svg" alt="tests"></a>
9
+ <a href="https://www.npmjs.com/package/@mcptoolshop/claude-synergy"><img src="https://img.shields.io/npm/v/@mcptoolshop/claude-synergy" alt="npm"></a>
10
+ <a href="#license"><img src="https://img.shields.io/badge/license-MIT-blue" alt="license"></a>
11
+ <a href="https://mcp-tool-shop-org.github.io/claude-synergy/"><img src="https://img.shields.io/badge/landing%20page-live-brightgreen" alt="landing page"></a>
12
+ </p>
13
+
14
+ Un espejo local y consultable de todos los registros de cambios de Anthropic y de las herramientas de desarrollo de IA relacionadas, además de una capa de **"Synergy"** (sinergia) que describe los flujos de trabajo entre productos, para que el agente LLM dentro del sistema sepa lo que el sistema puede hacer.
15
+
16
+ ```bash
17
+ $ hk query redact
18
+ 2026-05-11 anthropic-cli@1.7.1 [changed] redact api-key headers in debug logs
19
+ 2026-05-11 anthropic-sdk-java@2.31.0 [changed] redact api-key headers in debug logs
20
+ 2026-05-11 anthropic-sdk-go@1.42.0 [changed] redact api-key headers in debug logs
21
+ 2026-05-07 anthropic-sdk-typescript@0.95.1 [changed] redact api-key headers in debug logs
22
+
23
+ 4 results
24
+ ```
25
+
26
+
27
+ **Una única consulta FTS (búsqueda de texto completo) revela una corrección de seguridad coordinada entre diferentes SDKs que ningún registro de cambios individual identificó como una vulnerabilidad (CVE).** Esa es la demostración clave: los patrones emergen cuando todos los registros de cambios están uno al lado del otro.
28
+
29
+ Repositorio: [github.com/mcp-tool-shop-org/claude-synergy](https://github.com/mcp-tool-shop-org/claude-synergy)
30
+
31
+ ---
32
+
33
+ ## El problema
34
+
35
+ Claude Code CLI se actualiza casi a diario. La API de Claude se actualiza con la misma frecuencia. Los SDKs se actualizan con cada nueva versión de la CLI. Claude Design, Cowork, Chat y Mobile se integran a través del Centro de Ayuda unificado. El ecosistema MCP implementa aproximadamente 200-300 nuevos servidores por semana. Además, existen 7 plataformas principales de herramientas de desarrollo de IA (Cursor, Aider, Continue, Copilot, Cody, Windsurf), cada una con sus propios registros de cambios y sus propios ciclos de lanzamiento.
36
+
37
+ El agente LLM dentro de cualquiera de estos sistemas tiene un punto de corte de entrenamiento fijo. La brecha se amplía cada día. Aparecen funciones de las que el agente no es consciente. Se corrigen errores que el agente aún intenta solucionar. Se agregan variables de entorno y banderas que el agente nunca sugiere. Los flujos de trabajo entre productos que combinan múltiples plataformas permanecen sin descubrir.
38
+
39
+ **Este repositorio cierra esa brecha.** La sección de "Synergy" lo convierte en un producto en lugar de un simple espejo.
40
+
41
+ ---
42
+
43
+ ## ¿Qué hay aquí?
44
+
45
+ ```
46
+ claude-synergy/
47
+ ├── products/ # 44 product directories (1,186 release files)
48
+ │ ├── claude-code/ # Anthropic CLI — 117 releases
49
+ │ ├── claude-agent-sdk-{python,typescript}/ # Agent SDKs
50
+ │ ├── anthropic-sdk-{python,typescript,go,java,csharp,ruby,php}/ # 7 language SDKs
51
+ │ ├── claude-api/ # Platform release notes
52
+ │ ├── anthropic-apps/ # Design / Cowork / Chat / Mobile (Help Center feed)
53
+ │ ├── claude-code-action/ # GitHub Action
54
+ │ ├── anthropic-cli/ # `ant` CLI
55
+ │ ├── mcp-{python,typescript,go,java,csharp,kotlin,ruby,swift,rust,php}-sdk/
56
+ │ ├── mcp-{spec,inspector,registry,mcpb,conformance}/
57
+ │ ├── cursor/ # RSS feed
58
+ │ ├── aider/ # raw HISTORY.md
59
+ │ ├── continue-{dev,cli}/ # GH releases
60
+ │ ├── cody-enterprise/ # filtered Sourcegraph RSS
61
+ │ ├── github-copilot/ # HTML scrape (github.blog)
62
+ │ ├── vscode-copilot-chat/ # HTML scrape (code.visualstudio.com)
63
+ │ ├── windsurf/ # Playwright fetcher (CSR-only changelog)
64
+ │ ├── skills/ # Anthropic Skills catalog
65
+ │ └── plugins-{official,community,knowledge-work}/ # Plugin marketplaces
66
+ ├── synergies/ # 12 curated cross-product workflows
67
+ ├── src/ # TypeScript implementation
68
+ ├── test/ # 382 tests (unit, integration, regression, smoke)
69
+ ├── data/claude-synergy.db # SQLite database (created by `hk init`)
70
+ ├── schema.sql # Tier 2a tables (products, releases, changes, entities, FTS5, …)
71
+ ├── schema-vec.sql # Tier 2b tables (chunks, chunks_vec, chunks_fts)
72
+ ├── SOURCES.md # 5-tier source landscape with fetch strategies
73
+ └── URGENT_FINDINGS.md # 23 actionable items surfaced from the corpus
74
+ ```
75
+
76
+ **Estadísticas actualizadas (versión 1.0.0):** 44 productos / 1.186 archivos de lanzamiento / 6.042 cambios / 1.225 entidades / 12 sinergias / 382 pruebas.
77
+
78
+ ---
79
+
80
+ ## Estado: todas las etapas implementadas
81
+
82
+ | Etapa | Estado | ¿Qué hay? |
83
+ |------|--------|--------------|
84
+ | **1 — corpus de Markdown (inicialización)** | ✅ implementado | Study-swarm recopiló 706 archivos de lanzamiento de enero a mayo de 2026; se ampliaron a 1186 en la etapa 4. |
85
+ | **2a — SQLite + FTS5 + CLI** | ✅ implementado | CLI `hk`; 15 subcomandos; ingestión en menos de 300 ms. |
86
+ | **2b — sqlite-vec + Recuperación contextual** | ✅ implementado | Proveedor adaptable (ninguno/estructurado/ollama/contexto de Claude-haiku × incrustaciones de ollama/viaje × ninguno/ollama-judge/viaje/cohere para reordenar). |
87
+ | **3 — sincronización + servidor MCP** | ✅ implementado | `hk fetch / sync / seed-markers`; `claude-synergy-mcp` expone 8 herramientas a través de stdio. |
88
+ | **4a — extender más allá de Anthropic** | ✅ implementado | +15 SDKs de MCP, Cursor (RSS), Aider (HISTORY.md), Continue.dev, Cody Enterprise (RSS filtrado). |
89
+ | **4b — rastreador de HTML** | ✅ implementado | GitHub Copilot + VS Code Chat (Windsurf necesita Playwright — v0.7). |
90
+ | **4c — ingestión de HTML a Markdown con turndown** | ✅ implementado | Los cuerpos de HTML (Copilot/VS Code/Cursor) ahora generan filas individuales para FTS5 + extracción de entidades. |
91
+ | **4d — Playwright + registro de MCP + configuración YAML** | ✅ implementado | Windsurf a través de Playwright; Smithery + registro oficial de MCP como catálogos de la etapa 4; productos consolidados en `products.yaml`. |
92
+
93
+ Hoja de ruta para la versión 0.8+: se encuentra en [URGENT_FINDINGS.md](URGENT_FINDINGS.md) y en los problemas.
94
+
95
+ ---
96
+
97
+ ## Seguridad y modelo de datos
98
+
99
+ Esta herramienta se ejecuta localmente. **Datos utilizados:** una base de datos SQLite derivada y archivos de lanzamiento en formato Markdown, todos recreables. **Red:** solo conexiones HTTPS salientes cuando se ejecuta `hk fetch`/`hk sync` (API de GitHub, fuentes RSS, páginas de registro de cambios, registros de MCP) o `hk embed` con un proveedor remoto (Voyage, Cohere). **Credenciales:** lee las variables de entorno `GITHUB_TOKEN`, `VOYAGE_API_KEY`, `COHERE_API_KEY`, `ANTHROPIC_API_KEY`; nunca se registran ni se almacenan en el disco. **No se recopilan datos de telemetría.** Consulte [SECURITY.md](SECURITY.md) para obtener información sobre la política de informes.
100
+
101
+ ---
102
+
103
+ ## Instalación
104
+
105
+ ```bash
106
+ git clone https://github.com/mcp-tool-shop-org/claude-synergy
107
+ cd claude-synergy
108
+ pnpm install
109
+ pnpm build # produces dist/cli.js + dist/mcp-server.js
110
+ npm link # makes `hk` and `claude-synergy-mcp` available globally
111
+ ```
112
+
113
+ Para desarrollo sin compilación, use `npx tsx src/cli.ts ...` directamente. **Una peculiaridad de pnpm 10:** `pnpm dev` ignora las banderas de la CLI después de `--`; use `npx tsx` para el desarrollo.
114
+
115
+ ---
116
+
117
+ ## Interfaz de la CLI: 15 comandos
118
+
119
+ ```
120
+ # DB lifecycle
121
+ hk init # create DB with schema
122
+ hk ingest # parse products/*/releases/*.md → DB (idempotent)
123
+ hk embed # generate chunks + embeddings (sqlite-vec)
124
+ hk fetch [--product X] # incremental pull from sources
125
+ hk sync # combined fetch → ingest → embed (cron-friendly)
126
+ hk seed-markers # one-time setup after initial corpus
127
+
128
+ # Search
129
+ hk query "managed agents" # FTS5 keyword search
130
+ hk hybrid "credential exfiltration" # FTS5 + vec hybrid via RRF (+ optional --rerank)
131
+
132
+ # Entity lookups
133
+ hk env-var CLAUDE_CODE_WORKFLOWS # when introduced + history
134
+ hk command code-review # slash command + rename history
135
+ hk model claude-opus-4-7 # model launch + mentions across products
136
+ hk cve CVE-2025-66414 # CVE references in corpus
137
+
138
+ # Browsing
139
+ hk latest [--product X] [--limit N] # recent releases
140
+ hk products # list all 44 with counts
141
+ hk top env_var # most-mentioned by entity type
142
+ # (env_var, slash_command, cli_option,
143
+ # model_id, beta_header, cve, ghsa,
144
+ # hook_event, setting_key)
145
+ ```
146
+
147
+ ---
148
+
149
+ ## Ejemplos de flujos de trabajo
150
+
151
+ **Encontrar cuándo se introdujo una variable de entorno de Claude Code:**
152
+ ```
153
+ $ hk env-var CLAUDE_CODE_WORKFLOWS
154
+ env var CLAUDE_CODE_WORKFLOWS — 1 mention:
155
+
156
+ 2026-05-21 claude-code@2.1.147 [added]
157
+ Added the `Workflow` tool for deterministic multi-agent orchestration.
158
+ It is off by default — set `CLAUDE_CODE_WORKFLOWS=1` to enable
159
+ ```
160
+
161
+ **Rastrear cambios importantes entre diferentes SDK:**
162
+ ```
163
+ $ hk query TodoWrite --limit 5
164
+ 2026-05-15 claude-agent-sdk-python@0.2.82 [breaking] Headless and SDK sessions now use Task tools...
165
+ 2026-05-14 claude-agent-sdk-typescript@0.3.142 [breaking] Headless and SDK sessions now use Task tools...
166
+ 2026-05-08 claude-agent-sdk-typescript@0.2.136 [deprecated] Deprecated TodoWrite tool...
167
+ ```
168
+
169
+ **Planificar una migración de modelo:**
170
+ ```
171
+ $ hk model claude-opus-4-20250514
172
+ model id claude-opus-4-20250514 — 2 mentions:
173
+
174
+ 2026-04-14 anthropic-sdk-python@0.94.0 [deprecated]
175
+ Deprecation of the Claude Sonnet 4 model and the Claude Opus 4 model,
176
+ with retirement on the Claude API scheduled for June 15, 2026...
177
+ ```
178
+
179
+ **Búsqueda semántica en todo el corpus:**
180
+ ```
181
+ $ hk hybrid "credential exfiltration" --limit 3
182
+ 2026-03-25 claude-code@2.1.83 [added] vec#5 rrf=0.0154
183
+ Added `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1` to strip Anthropic and
184
+ cloud provider credentials from subprocess environments...
185
+ ```
186
+
187
+ La consulta nunca dice "env_scrub"; el sistema lo muestra por similitud semántica. FTS5 puro no lo encuentra en absoluto.
188
+
189
+ ---
190
+
191
+ ## Servidor MCP: proporcione a sus agentes acceso a este corpus
192
+
193
+ `claude-synergy-mcp` expone 8 herramientas a través de stdio. Conéctese a Claude Code (o cualquier host MCP) a través de `~/.claude/.mcp.json` o el archivo `.mcp.json` de su proyecto:
194
+
195
+ ```json
196
+ {
197
+ "mcpServers": {
198
+ "claude-synergy": {
199
+ "command": "claude-synergy-mcp",
200
+ "env": {
201
+ "CLAUDE_SYNERGY_DB": "/path/to/claude-synergy/data/claude-synergy.db"
202
+ }
203
+ }
204
+ }
205
+ }
206
+ ```
207
+
208
+ Para el archivo `.vscode/mcp.json` de GitHub Copilot, utilice el envoltorio `servers` en lugar de `mcpServers` (consulte [synergy 12](synergies/12-mcp-config-format-gotcha.md)).
209
+
210
+ Herramientas disponibles:
211
+
212
+ | Herramienta | Propósito |
213
+ |---|---|
214
+ | `search` | FTS5 + vec híbrido; reordenamiento opcional. Modo predeterminado para consultas en lenguaje natural. |
215
+ | `lookup_entity` | Historial exacto de entidades: variables de entorno, comandos, ID de modelos, CVE, etc. |
216
+ | `latest_releases` | Lanzamientos recientes en todos los productos (o en uno). |
217
+ | `get_release` | Contenido completo de un lanzamiento. |
218
+ | `list_products` | Enumeración con conteos + última versión. |
219
+ | `top_entities` | Entidades más mencionadas por tipo. |
220
+ | `list_synergies` | Flujos de trabajo entre productos, seleccionados. |
221
+ | `read_synergy` | Texto completo de un archivo de sinergia. |
222
+
223
+ ---
224
+
225
+ ## Fuentes: 5 niveles, 6 estrategias de recuperación
226
+
227
+ Panorama general en [SOURCES.md](SOURCES.md).
228
+
229
+ - **Nivel 1 (Lanzamientos de GitHub)** — `gh api repos/<owner>/<repo>/releases` para 22 productos, incluidos los SDK de Anthropic (7 idiomas), los SDK de Agentes (2), la CLI de ant, claude-code-action, claude-code-security-review y 15 SDK del ecosistema MCP.
230
+ - **Nivel 2 (Markdown sin formato)** — `anthropics/claude-code/CHANGELOG.md` + `Aider-AI/aider/HISTORY.md`
231
+ - **Nivel 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
+ - **Nivel 4 (Catálogo)** — `anthropics/skills`, `claude-plugins-{official,community}`, `knowledge-work-plugins`
233
+ - **Nivel 5 (Asesoramiento)** — Cuenta de X `@ClaudeCodeLog`; espejo de changelog de marckrenn.
234
+
235
+ Estrategias de recuperación: `gh-releases | rss | raw-changelog | html-scrape | catalog | playwright`. Nuevo producto = una entrada en `products.yaml`.
236
+
237
+ ---
238
+
239
+ ## Sinergias: lo que se desbloquea
240
+
241
+ 12 flujos de trabajo entre productos, seleccionados. Cada uno describe un patrón de composición, el desencadenante que lo convierte en la respuesta correcta y la evidencia del changelog que lo habilita. Ejemplos:
242
+
243
+ - **08 — Universal SKILL.md format** (Code + Cursor + Codex): un autor de habilidad, tres agentes lo leen.
244
+ - **09 — MCP across seven surfaces** (Code + Cursor + Continue + Copilot + Windsurf + Cody + API): un binario, todos los agentes.
245
+ - **10 — Anthropic BYOK across surfaces**: una clave de API habilita a Claude en 7 editores con facturación unificada.
246
+ - **11 — Claude Code orchestrates Aider**: traslada las ediciones pesadas a un modelo económico mientras Claude planifica.
247
+ - **12 — MCP config format gotcha**: Copilot usa `servers`; todos los demás usan `mcpServers`.
248
+
249
+ Índice completo en [synergies/INDEX.md](synergies/INDEX.md).
250
+
251
+ ---
252
+
253
+ ## Pruebas
254
+
255
+ El conjunto de pruebas Vitest cubre los niveles de unidad / integración / regresión / pruebas básicas. **[test-spec-3.md](test-spec-3.md) es la autoridad actual** a partir de la versión v0.7.0; [test-spec.md](test-spec.md) (v1) y [test-spec-2.md](test-spec-2.md) (v2) permanecen en el repositorio como registro histórico de la línea de diseño.
256
+
257
+ ```bash
258
+ pnpm test # unit + integration + regression (~16s, 382 tests)
259
+ pnpm test:watch # interactive
260
+ pnpm test:coverage # generate coverage/index.html (thresholds: 78/75/85/78)
261
+ pnpm test:smoke # opt-in full-corpus smoke (RUN_SMOKE=1)
262
+ ```
263
+
264
+ Estructura:
265
+
266
+ | Directorio | Lo que cubre |
267
+ |-----|----------------|
268
+ | `test/unit/` | por módulo: extracción, ingestión, consulta, base de datos, incrustación, híbrido, recuperación + cada proveedor + recuperación de RSS/changelog/HTML + recuperación del registro MCP + recuperación de Playwright + configuración de productos. |
269
+ | `test/integration/` | de extremo a extremo: canalización, sincronización, servidor MCP (JSON-RPC de stdio), CLI. |
270
+ | `test/regression/` | §8.1–§8.18: Cada uno protege contra un error real corregido durante el desarrollo. |
271
+ | `test/smoke/` | Prueba completa con todo el corpus contra productos reales (1143 archivos). |
272
+ | `test/fixtures/` | 3 productos falsos + respuestas HTTP simuladas (RSS / GH / Voyage / Cohere / Ollama / Anthropic / Smithery / Registro oficial de MCP). |
273
+ | `test/helpers/` | `temp-db.ts`, `fetch-mock.ts`, `mcp-client.ts`, `seed-corpus.ts`, `golden-vectors.ts`, `playwright-mock.ts`, `yaml-fixtures.ts` |
274
+
275
+ **Por defecto, no hay conexión de red** — el proveedor HTTP se simula mediante `vi.spyOn(global, 'fetch')`. Se utiliza SQLite real en archivos temporales (no `:memory:`) porque la semántica de carga de la extensión `sqlite-vec` varía según la versión, y el almacenamiento en disco es la ruta canónica. Playwright se carga mediante importación dinámica y se simula mediante `vi.doMock('playwright', ...)` para que las pruebas se ejecuten sin instalar un navegador real.
276
+
277
+ CI: `.github/workflows/test.yml` ejecuta `pnpm test:coverage` al realizar un push o una solicitud de extracción.
278
+
279
+ ---
280
+
281
+ ## Solución de problemas
282
+
283
+ **"Base de datos bloqueada" o errores de WAL**
284
+
285
+ Otro proceso de `hk` (o un servidor MCP obsoleto) mantiene la base de datos SQLite abierta. Cierre otros procesos de `hk` y luego intente de nuevo. Si el problema persiste, verifique si hay archivos `-wal` o `-shm` junto a `data/claude-synergy.db`: estos son archivos normales en modo WAL y se eliminarán cuando se cierre la última conexión. No los elimine mientras otro proceso tenga la base de datos abierta.
286
+
287
+ **"No se encontró la extensión sqlite-vec" / falló la carga de sqlite-vec"**
288
+
289
+ La extensión nativa `sqlite-vec` no se pudo cargar. Causas comunes:
290
+
291
+ 1. **Versión de Node demasiado antigua** — `claude-synergy` requiere Node 22+. Verifique con `node -v`.
292
+ 2. **Módulo nativo que necesita ser reconstruido** — ejecute `npm rebuild better-sqlite3` (o `pnpm rebuild better-sqlite3`).
293
+ 3. **Incompatibilidad de plataforma** — en Windows/ARM, `better-sqlite3` necesita un conjunto de herramientas de compilación de C++. Instale [windows-build-tools](https://github.com/nicedoc/windows-build-tools) o Visual Studio Build Tools con "Desarrollo de escritorio con C++".
294
+
295
+ Nota: `sqlite-vec` es opcional. La búsqueda de palabras clave FTS5 (`hk query`) funciona sin ella. Solo `hk embed` y `hk hybrid` requieren la extensión vectorial.
296
+
297
+ **"Error de sincronización para el producto X" / errores de fetch"**
298
+
299
+ `hk fetch` y `hk sync` llaman a API externas. Causas comunes:
300
+
301
+ - **Límite de velocidad de GitHub** — la estrategia `gh-releases` llama a `gh api`, que utiliza su `GITHUB_TOKEN`. Las solicitudes no autenticadas tienen un límite de 60 solicitudes/hora; autentíquese con `gh auth login` o configure `GITHUB_TOKEN` en su entorno.
302
+ - **Red / proxy** — los extractores de RSS y HTML utilizan `fetch()`. Verifique la conectividad y cualquier configuración de proxy corporativa (`HTTPS_PROXY`).
303
+ - **Producto desconocido** — `hk fetch --product foo` solo funciona para los productos que se enumeran en `products.yaml`. Ejecute `hk products` para ver todos los nombres disponibles.
304
+
305
+ La sincronización es idempotente: es seguro volver a ejecutarla después de un fallo parcial. Las versiones ya descargadas se omiten.
306
+
307
+ **"El proveedor de incrustación no responde"**
308
+
309
+ `hk embed` llama a un servicio de incrustación externo:
310
+
311
+ - **Ollama (predeterminado)** — asegúrese de que Ollama se está ejecutando (`ollama serve`) y que el modelo de incrustación se ha descargado (`ollama pull nomic-embed-text`).
312
+ - **Voyage** — configure `VOYAGE_API_KEY` en su entorno. Verifique su clave de API en [dash.voyageai.com](https://dash.voyageai.com).
313
+
314
+ **Incompatibilidad de versión de esquema / base de datos corrupta**
315
+
316
+ Si la base de datos se creó con una versión de esquema anterior y la migración falla, o si los datos parecen incorrectos después de un fallo:
317
+
318
+ ```bash
319
+ rm data/claude-synergy.db data/claude-synergy.db-wal data/claude-synergy.db-shm
320
+ hk init
321
+ hk ingest
322
+ hk embed --context structured --embedding ollama # optional, for vector search
323
+ ```
324
+
325
+ Esto es seguro: la base de datos es una caché derivada. Todos los datos de origen se encuentran en los archivos `products/*/releases/*.md`.
326
+
327
+ ---
328
+
329
+ ## Archivos relacionados
330
+
331
+ - [CONTRIBUTING.md](CONTRIBUTING.md) — Cómo agregar productos, ejecutar pruebas y enviar solicitudes de extracción (PR).
332
+ - [URGENT_FINDINGS.md](URGENT_FINDINGS.md) — 23 elementos que requieren atención inmediata (vulnerabilidades de seguridad, obsolescencia de modelos, cambios importantes, problemas de configuración).
333
+ - [SOURCES.md](SOURCES.md) — Panorama de fuentes de 5 niveles con estrategias de obtención.
334
+ - [synergies/INDEX.md](synergies/INDEX.md) — 12 flujos de trabajo seleccionados que involucran varios productos.
335
+ - [schema.sql](schema.sql) + [schema-vec.sql](schema-vec.sql) — Esquemas de SQLite y sqlite-vec.
336
+ - [test-spec-3.md](test-spec-3.md) (actual) + [test-spec-2.md](test-spec-2.md), [test-spec.md](test-spec.md) (histórico) — Especificaciones del conjunto de pruebas.
337
+
338
+ ---
339
+
340
+ ## Licencia
341
+
342
+ MIT. Creado por <a href="https://mcp-tool-shop.github.io/">MCP Tool Shop</a>.