lakonai 1.2.1 → 1.2.2
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 +25 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,18 +7,26 @@
|
|
|
7
7
|
<h3 align="center">Speak less. Ship more.</h3>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
<strong>Cut LLM tokens by up to
|
|
10
|
+
<strong>Cut LLM tokens by up to 99.8% — without losing a single identifier.</strong><br/>
|
|
11
|
+
<sub>A 182k-line <code>git diff</code> went <strong>1,513,910 → 2,331 tokens</strong>. Measured, not rounded.</sub>
|
|
11
12
|
</p>
|
|
12
13
|
|
|
13
14
|
<p align="center"><em>Spartan replies for AI agents.</em></p>
|
|
14
15
|
|
|
15
16
|
<p align="center">
|
|
16
17
|
<a href="https://www.npmjs.com/package/lakonai"><img src="https://img.shields.io/npm/v/lakonai?color=0F0F0F&label=npm" alt="npm" /></a>
|
|
18
|
+
<a href="https://github.com/bargadev/lakonai"><img src="https://img.shields.io/badge/GitHub-bargadev%2Flakonai-0F0F0F?logo=github" alt="GitHub repo" /></a>
|
|
17
19
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-0F0F0F" alt="MIT" /></a>
|
|
18
20
|
<img src="https://img.shields.io/badge/node-%E2%89%A518-0F0F0F" alt="node ≥18" />
|
|
19
21
|
<img src="https://img.shields.io/badge/deps-0-0F0F0F" alt="zero dependencies" />
|
|
20
22
|
<img src="https://img.shields.io/badge/agents-6-0F0F0F" alt="6 AI agents" />
|
|
21
|
-
<img src="https://img.shields.io/badge/tests-
|
|
23
|
+
<img src="https://img.shields.io/badge/tests-751-0F0F0F" alt="751 tests" />
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<a href="https://github.com/bargadev/lakonai">
|
|
28
|
+
<img src="./docs/assets/before-after.svg" width="820" alt="lakonai: a 182k-line git diff main…HEAD went 1,513,910 → 2,331 tokens (−99.8%), structure and identifiers intact" />
|
|
29
|
+
</a>
|
|
22
30
|
</p>
|
|
23
31
|
|
|
24
32
|
<p align="center">
|
|
@@ -286,14 +294,14 @@ Input is measured and deterministic. Output is estimated by your local AI CLI (n
|
|
|
286
294
|
|
|
287
295
|
## Test suite
|
|
288
296
|
|
|
289
|
-
|
|
297
|
+
751 tests across 48 suites — all passing, no mocks on I/O boundaries.
|
|
290
298
|
|
|
291
299
|
| Type | Suites | Tests |
|
|
292
300
|
|------|--------|-------|
|
|
293
|
-
| Unit | 13 |
|
|
294
|
-
| Integration (module + real FS) |
|
|
295
|
-
| E2E / CLI (spawn + real process) |
|
|
296
|
-
| **Total** | **
|
|
301
|
+
| Unit | 13 | 170 |
|
|
302
|
+
| Integration (module + real FS) | 33 | 530 |
|
|
303
|
+
| E2E / CLI (spawn + real process) | 2 | 51 |
|
|
304
|
+
| **Total** | **48** | **751** |
|
|
297
305
|
|
|
298
306
|
Coverage: **95% statements · 89% branches · 97% functions**
|
|
299
307
|
|
|
@@ -311,12 +319,17 @@ Your AI agent isn't laconic. It opens with _"Sure! I'd be happy to help…"_, re
|
|
|
311
319
|
|
|
312
320
|
## Credits
|
|
313
321
|
|
|
314
|
-
|
|
322
|
+
lakonai is an original, zero-dependency tool written from scratch. Several of its
|
|
323
|
+
layers were **inspired by** prior art — none of it is vendored or forked, and the
|
|
324
|
+
compression engine, auto-learning, read-guard, overflow sandbox, and BM25 graph
|
|
325
|
+
query are lakonai's own:
|
|
315
326
|
|
|
316
|
-
- [**caveman**](https://github.com/juliusbrussee/caveman) (MIT) — terse rule, auto-clarity,
|
|
317
|
-
- [**graphify**](https://github.com/Bklieger/graphify) — AST knowledge graph
|
|
318
|
-
- [**rtk**](https://github.com/rtk-ai/rtk) —
|
|
327
|
+
- [**caveman**](https://github.com/juliusbrussee/caveman) (MIT) — inspired the terse-response rule, auto-clarity, and pixel skill mode
|
|
328
|
+
- [**graphify**](https://github.com/Bklieger/graphify) — inspired the AST knowledge graph and community detection; lakonai reimplements it in Node.js and drops the LLM at query time for zero-cost BM25
|
|
329
|
+
- [**rtk**](https://github.com/rtk-ai/rtk) — inspired the CLI-filtering approach; lakonai goes further with auto-learning and 30+ built-in filters
|
|
319
330
|
|
|
320
|
-
|
|
331
|
+
Where an idea carries a license (caveman is MIT), credit stays. Everything else —
|
|
332
|
+
the declarative filter engine, the hook dispatch, savings tracking, and the four
|
|
333
|
+
layers of compression — is built here.
|
|
321
334
|
|
|
322
335
|
MIT — see [LICENSE](LICENSE).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lakonai",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
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",
|