lynkr 9.6.0 → 9.7.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 +36 -0
- package/bin/cli.js +2 -0
- package/bin/wrap.js +686 -0
- package/package.json +4 -3
- package/scripts/build-knn-index.js +1 -1
- package/scripts/convert-routellm.py +105 -0
- package/src/api/router.js +694 -21
- package/src/auth-mode.js +116 -0
- package/src/clients/databricks.js +416 -67
- package/src/clients/prompt-cache-injection.js +15 -0
- package/src/orchestrator/index.js +120 -60
- package/src/routing/index.js +23 -4
- package/src/routing/knn-router.js +9 -2
- package/src/routing/model-tiers.js +34 -0
package/README.md
CHANGED
|
@@ -24,6 +24,40 @@
|
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
27
|
+
## 🚀 New: Wrap Mode for AI Coding Tools
|
|
28
|
+
|
|
29
|
+
**Use Lynkr's routing with your AI coding assistant — maximize your subscription value:**
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g lynkr
|
|
33
|
+
|
|
34
|
+
# Claude Code Pro/Max
|
|
35
|
+
lynkr wrap claude
|
|
36
|
+
|
|
37
|
+
# GitHub Copilot
|
|
38
|
+
lynkr wrap copilot
|
|
39
|
+
|
|
40
|
+
# Aider
|
|
41
|
+
lynkr wrap aider
|
|
42
|
+
|
|
43
|
+
# Cursor
|
|
44
|
+
lynkr wrap cursor
|
|
45
|
+
|
|
46
|
+
# OpenAI Codex
|
|
47
|
+
lynkr wrap codex
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Wrapping gives you:**
|
|
51
|
+
- ✅ Tier routing (send simple tasks to free Ollama, complex to your subscription/API)
|
|
52
|
+
- ✅ TOON/RTK compression (87% token reduction on tool outputs)
|
|
53
|
+
- ✅ Semantic caching (171ms cache hits)
|
|
54
|
+
- ✅ **3-5x more usage from the same subscription limits**
|
|
55
|
+
- ✅ Works with OAuth (Claude, Copilot, Cursor) or API keys (Aider, Codex)
|
|
56
|
+
|
|
57
|
+
[Full wrap guide →](docs/wrap-guide.md)
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
27
61
|
## Quick Start (2 Minutes)
|
|
28
62
|
|
|
29
63
|
### 1. Install Lynkr
|
|
@@ -300,6 +334,8 @@ Lynkr analyzes each request and routes it to the appropriate tier. Simple questi
|
|
|
300
334
|
|
|
301
335
|
**Result:** 70-90% of requests use cheaper/faster models. Only hard problems hit expensive models.
|
|
302
336
|
|
|
337
|
+
Tier configuration is strictly authoritative — bandit exploration is constrained to the models you've listed in `TIER_*`, and multi-turn conversations score with a recency-weighted sliding window so context isn't lost on short follow-ups. See [`docs/intent-window-routing.md`](docs/intent-window-routing.md).
|
|
338
|
+
|
|
303
339
|
---
|
|
304
340
|
|
|
305
341
|
## Complete .env Examples
|
package/bin/cli.js
CHANGED
|
@@ -8,6 +8,7 @@ const pkg = require('../package.json');
|
|
|
8
8
|
const SUBCOMMANDS = {
|
|
9
9
|
usage: path.join(__dirname, "lynkr-usage.js"),
|
|
10
10
|
trajectory: path.join(__dirname, "lynkr-trajectory.js"),
|
|
11
|
+
wrap: path.join(__dirname, "wrap.js"),
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
const sub = process.argv[2];
|
|
@@ -30,6 +31,7 @@ ${pkg.description}
|
|
|
30
31
|
|
|
31
32
|
Usage:
|
|
32
33
|
lynkr [options] Start the proxy server (default)
|
|
34
|
+
lynkr wrap <target> [options] Wrap CLI tools through Lynkr proxy
|
|
33
35
|
lynkr usage [options] Show AI spend report and tier-routing savings
|
|
34
36
|
lynkr trajectory [options] Export agent trajectories as JSONL training data
|
|
35
37
|
|