compendium-mcp 0.1.3 → 0.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.
Files changed (2) hide show
  1. package/README.md +18 -6
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -80,6 +80,8 @@ Binary packaging details for maintainers: [npm/DISTRIBUTION.md](npm/DISTRIBUTION
80
80
  ## Community
81
81
 
82
82
  - [Contributing](CONTRIBUTING.md)
83
+ - [Changelog](CHANGELOG.md)
84
+ - [Architecture](docs/architecture.md)
83
85
  - [Code of Conduct](CODE_OF_CONDUCT.md)
84
86
  - [Security policy](SECURITY.md)
85
87
  - [Support](SUPPORT.md)
@@ -114,14 +116,15 @@ Single MCP tool: **`compendium`**. Choose the operation with `action`:
114
116
  | `cache_get` | Retrieve by key | `key` |
115
117
  | `cache_invalidate` | Drop one key or clear cache | `key?` |
116
118
  | `sanitize` | Redact secrets + neutralize IPI phrases | `text`, `sanitize?` |
117
- | `rerank` | BM25-rank candidates / chunks for a query | `query`, `items` or `text` or chunk `map`, `rerank?` |
119
+ | `rerank` | BM25 (+ optional loopback embeddings) rank candidates / chunks | `query`, `items` or `text` or chunk `map`, `rerank?` |
118
120
  | `brief` | Scan a workspace; pack a structured starter briefing + cache key | `query`, `brief?` (`root`, caps), optional `text` hint |
119
121
  | `catalog` | Short action (+ playbook) ads; prefer before guessing | _(none)_ |
120
122
  | `help` | Usage notes for one action (default **compressed**; `force: true` → full) | `id`, `force?` |
121
- | `playbooks` | List bundled token-hygiene playbook ads | _(none)_ |
122
- | `playbook` | Load one playbook body (sanitized) | `id` |
123
- | `pack` | Zip text/files into a size-capped archive (cache and/or base64) | `text` or `items`, `pack?` |
124
- | `unpack` | Unpack zip with caps chunks (**never runs scripts**) | `key` or base64 `text`, `pack?` |
123
+ | `playbooks` | List playbook ads | _(none)_ |
124
+ | `playbook` | Load one playbook body | `id` |
125
+ | `pack` | Zip text/files into a bounded archive | `text` or `items`, `pack?` |
126
+ | `unpack` | Unpack zip with size caps into chunks (never runs scripts) | `text` or `key`, `pack?` |
127
+ | `llm_status` | Probe configured local LLM (models; `force` = chat ping) | `force?` |
125
128
 
126
129
  ### Progressive disclosure (skills)
127
130
 
@@ -157,6 +160,8 @@ Response envelope: `{ "ok": true, "action": "filter", "result_json": "{...}" }`.
157
160
 
158
161
  ```
159
162
  assets/ # brand mark (SVG/PNG); baked into MCP icons via data URI
163
+ docs/ # architecture notes
164
+ examples/ # sample MCP tool-call JSON payloads
160
165
  src/
161
166
  main.rs # CLI: stdio | http
162
167
  lib.rs
@@ -172,7 +177,7 @@ src/
172
177
  smart.rs # summarize_smart + filter_relevant
173
178
  local_llm.rs # OpenAI-compatible local SLM client
174
179
  chunk.rs # chunk + resolve
175
- cache.rs # session key/value cache
180
+ cache.rs # session key/value cache (+ optional disk)
176
181
  catalog.rs # action ads + help (progressive disclosure)
177
182
  playbook.rs # bundled / dir playbooks
178
183
  pack.rs # zip pack/unpack with size caps
@@ -183,6 +188,8 @@ playbooks/ # embedded skill-md playbooks
183
188
  tests/
184
189
  integration.rs
185
190
  e2e_smoke.rs # spawns binary, MCP handshake, tools + resources
191
+ CHANGELOG.md
192
+ REPORT.md # design essay + Shipped/Next/Deferred roadmap
186
193
  ```
187
194
 
188
195
  ## Build
@@ -260,6 +267,9 @@ Point an MCP streamable-HTTP client at that URL (e.g. `StreamableHttpClientTrans
260
267
  | `COMPENDIUM_HTTP_BIND` | `127.0.0.1:8788` | Default HTTP listen address |
261
268
  | `COMPENDIUM_LOCAL_LLM_URL` | _(unset)_ | OpenAI-compatible base URL (e.g. `http://127.0.0.1:11434/v1` or `http://127.0.0.1:13305/api/v1`). Enables smart actions. |
262
269
  | `COMPENDIUM_LOCAL_LLM_MODEL` | `Qwen3-4B-GGUF` | Model id on that server (Ollama: e.g. `qwen:latest`) |
270
+ | `COMPENDIUM_LOCAL_EMBED_MODEL` | _(same as chat)_ | Embeddings model for hybrid `rerank` / `brief` (e.g. `nomic-embed-text`) |
271
+ | `COMPENDIUM_HYBRID_ALPHA` | `0.55` | BM25 weight in hybrid score (0–1); remainder is embedding cosine |
272
+ | `COMPENDIUM_AUDIT_PATH` | _(unset)_ | Append-only JSONL audit log (action metadata only; no payloads) |
263
273
  | `COMPENDIUM_LOCAL_LLM_API_KEY` | _(unset)_ | Optional bearer token for locked loopback servers |
264
274
  | `COMPENDIUM_LOCAL_LLM_TIMEOUT_SECS` | `120` | HTTP timeout (first model load can be slow) |
265
275
  | `COMPENDIUM_SIGNAL_MIN_CHARS` | `1000` | Bypass compress/summarize below this length (`0` disables) |
@@ -269,6 +279,8 @@ Point an MCP streamable-HTTP client at that URL (e.g. `StreamableHttpClientTrans
269
279
  | `COMPENDIUM_ARCHIVE_MAX_UNCOMPRESSED` | `4194304` | Max total uncompressed bytes for pack/unpack |
270
280
  | `COMPENDIUM_ARCHIVE_MAX_FILES` | `50` | Max files per archive |
271
281
  | `COMPENDIUM_SKILL_TTL_MS` | `300000` | Soft TTL (ms) on skill `resources/read` responses |
282
+ | `COMPENDIUM_CACHE_DIR` | _(unset)_ | Persist session cache (chunks/cache keys) across restarts; default size cap 64 MiB |
283
+ | `COMPENDIUM_CACHE_MAX_BYTES` | _(unset / 64MiB with dir)_ | Soft cap on total cached payload bytes |
272
284
  | `RUST_LOG` | `compendium=info` | Logs on **stderr** only |
273
285
 
274
286
  ## Example tool calls
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compendium-mcp",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
4
4
  "description": "MCP server that compresses, summarizes, and filters context to minimize LLM token usage",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -38,11 +38,11 @@
38
38
  "prepare": "node npm/scripts/link-bins.js"
39
39
  },
40
40
  "optionalDependencies": {
41
- "compendium-mcp-darwin-arm64": "0.1.3",
42
- "compendium-mcp-darwin-x64": "0.1.3",
43
- "compendium-mcp-linux-x64": "0.1.3",
44
- "compendium-mcp-linux-arm64": "0.1.3",
45
- "compendium-mcp-win32-x64": "0.1.3"
41
+ "compendium-mcp-darwin-arm64": "0.2.0",
42
+ "compendium-mcp-darwin-x64": "0.2.0",
43
+ "compendium-mcp-linux-x64": "0.2.0",
44
+ "compendium-mcp-linux-arm64": "0.2.0",
45
+ "compendium-mcp-win32-x64": "0.2.0"
46
46
  },
47
47
  "preferUnplugged": true
48
48
  }