lakonai 0.10.0 → 0.11.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 +20 -1
- package/bin/lakonai.js +5 -0
- package/package.json +1 -1
- package/src/shrink.js +0 -0
package/README.md
CHANGED
|
@@ -200,6 +200,7 @@ saved: 85%
|
|
|
200
200
|
| `lakonai compress <file> [--llm] [--dry-run]` | Shrink a memory `.md` (offline heuristic, or `--llm` via your `claude` CLI) |
|
|
201
201
|
| `lakonai doctor` | Per-platform health: CLI on PATH, rule installed, hooks registered |
|
|
202
202
|
| `lakonai shell-init` / `shell-uninit` | Print an opt-in shell wrapper (auto-filter read-only cmds when `LAKON_SHELL=1`) |
|
|
203
|
+
| `lakonai shrink <mcp-server-cmd>` | MCP proxy: compress tool/prompt/resource descriptions before they hit context |
|
|
203
204
|
| `lakonai version` / `--version` / `-v` | Print the installed lakonai version |
|
|
204
205
|
|
|
205
206
|
---
|
|
@@ -251,6 +252,24 @@ prose tersely using **your existing `claude` CLI** (`claude --print` — no sepa
|
|
|
251
252
|
API key, no new dependency); `--dry-run` previews the savings. The original is
|
|
252
253
|
backed up to `<file>.bak`.
|
|
253
254
|
|
|
255
|
+
### Shrink MCP tool descriptions
|
|
256
|
+
|
|
257
|
+
If you use MCP servers, their tool/prompt/resource **descriptions** load into
|
|
258
|
+
context every session. Wrap a server with `lakonai shrink` to compress those
|
|
259
|
+
descriptions (offline, regex) while leaving requests and tool-call results
|
|
260
|
+
untouched:
|
|
261
|
+
|
|
262
|
+
```jsonc
|
|
263
|
+
{
|
|
264
|
+
"mcpServers": {
|
|
265
|
+
"fs": {
|
|
266
|
+
"command": "lakonai",
|
|
267
|
+
"args": ["shrink", "npx", "@modelcontextprotocol/server-filesystem", "/path"]
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
254
273
|
### Read tool guard (Claude Code)
|
|
255
274
|
|
|
256
275
|
The `Read` hook automatically:
|
|
@@ -400,7 +419,7 @@ npm run test:coverage:check # enforce the coverage threshold
|
|
|
400
419
|
node bin/lakonai.js --help
|
|
401
420
|
```
|
|
402
421
|
|
|
403
|
-
Suite: **
|
|
422
|
+
Suite: **301 tests**. Coverage gate: **100% lines / 100% branches / 100% functions / 100% statements**. Zero runtime dependencies. Node ≥ 18.
|
|
404
423
|
|
|
405
424
|
---
|
|
406
425
|
|
package/bin/lakonai.js
CHANGED
|
@@ -217,6 +217,11 @@ async function main() {
|
|
|
217
217
|
process.stdout.write(`Remove the block between\n ${MARK_BEGIN}\n ${MARK_END}\nfrom your shell profile (or unset LAKON_SHELL).\n`);
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
|
+
/* istanbul ignore next -- long-running stdio MCP proxy; logic tested via src/shrink */
|
|
221
|
+
if (first === 'shrink') {
|
|
222
|
+
require('../src/shrink').runProxy(rest);
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
220
225
|
|
|
221
226
|
runAndFilter(first, rest);
|
|
222
227
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lakonai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "lakonai — save AI context tokens. Filters & compresses CLI output (git, ls, grep, find, test runners, lint/build, docker/kubectl/aws) before it reaches Claude Code, Codex, Cursor, Windsurf, Cline or Gemini — and learns to filter new commands automatically the more you use it.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
package/src/shrink.js
ADDED
|
Binary file
|