lynkr 9.10.0 โ 9.12.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 +46 -11
- package/bin/lynkr-init.js +7 -0
- package/bin/statusline.js +80 -0
- package/bin/wrap.js +10 -6
- package/config/model-tiers.json +5 -5
- package/package.json +9 -4
- package/public/dashboard.html +354 -1
- package/src/api/openai-router.js +120 -2
- package/src/api/router.js +34 -0
- package/src/clients/databricks.js +148 -66
- package/src/clients/gpt-utils.js +8 -1
- package/src/clients/ollama-utils.js +19 -10
- package/src/clients/prompt-cache-injection.js +93 -30
- package/src/config/index.js +79 -0
- package/src/context/compression.js +27 -8
- package/src/context/distill.js +2 -1
- package/src/dashboard/api.js +82 -2
- package/src/dashboard/recommendations/cache-weakspots.js +88 -0
- package/src/dashboard/recommendations/deadweight.js +82 -0
- package/src/dashboard/recommendations/downsize.js +109 -0
- package/src/dashboard/recommendations/index.js +106 -0
- package/src/dashboard/recommendations/side-requests.js +68 -0
- package/src/dashboard/recommendations/wilson.js +24 -0
- package/src/dashboard/router.js +5 -0
- package/src/memory/distiller.js +350 -0
- package/src/memory/extractor.js +0 -8
- package/src/memory/format.js +17 -2
- package/src/memory/index.js +10 -0
- package/src/memory/retriever.js +7 -2
- package/src/memory/skills-cache.js +180 -0
- package/src/memory/tencentdb-launcher.js +459 -0
- package/src/memory/wiki.js +171 -0
- package/src/orchestrator/index.js +85 -2
- package/src/orchestrator/sse-transformer.js +9 -3
- package/src/prompts/system.js +20 -6
- package/src/routing/affinity-store.js +68 -1
- package/src/routing/agentic-detector.js +9 -1
- package/src/routing/cache-economics.js +123 -0
- package/src/routing/cache-switch-cost.js +194 -0
- package/src/routing/calibration.js +8 -1
- package/src/routing/complexity-analyzer.js +37 -10
- package/src/routing/context-compressor.js +170 -0
- package/src/routing/difficulty-classifier.js +115 -13
- package/src/routing/index.js +161 -53
- package/src/routing/model-registry.js +35 -10
- package/src/routing/session-affinity.js +60 -0
- package/src/routing/telemetry.js +343 -2
- package/src/routing/verifier.js +41 -2
- package/src/server.js +36 -3
- package/src/tools/code-graph.js +6 -4
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
**84% fewer tokens on JSON tool results. 53% fewer tokens on tool-heavy requests. Sub-300ms semantic cache hits. Zero code changes.**
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/lynkr)
|
|
8
|
-
[](https://github.com/Fast-Editor/Lynkr)
|
|
9
9
|
[](LICENSE)
|
|
10
10
|
[](https://nodejs.org)
|
|
11
11
|
[](https://deepwiki.com/Fast-Editor/Lynkr)
|
|
@@ -28,25 +28,26 @@
|
|
|
28
28
|
|
|
29
29
|
## ๐ New: Wrap Mode for AI Coding Tools
|
|
30
30
|
|
|
31
|
-
**Use Lynkr's routing with your AI coding assistant โ
|
|
31
|
+
**Use Lynkr's routing with your AI coding assistant โ BYO API keys, route by task complexity:**
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
34
|
npm install -g lynkr
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
# Claude Code
|
|
37
|
+
# Claude Code (with your own ANTHROPIC_API_KEY)
|
|
38
38
|
lynkr wrap claude
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
**Wrapping gives you:**
|
|
44
|
-
- โ
Tier routing (send simple tasks to free Ollama, complex to your
|
|
44
|
+
- โ
Tier routing (send simple tasks to free Ollama, complex to your configured API provider)
|
|
45
45
|
- โ
Sticky sessions: one routing decision per conversation via content fingerprinting, with automatic escalation when the task outgrows the model
|
|
46
46
|
- โ
TOON/RTK compression (84% token reduction on large JSON tool outputs)
|
|
47
47
|
- โ
Semantic caching (sub-300ms cache hits, 0 tokens billed)
|
|
48
|
-
- โ
|
|
49
|
-
|
|
48
|
+
- โ
Works with API keys (Claude, Aider, Codex, Copilot, Cursor)
|
|
49
|
+
|
|
50
|
+
> **Note on subscription (OAuth) logins:** Anthropic's Feb 2026 usage policy prohibits third-party tools from using OAuth tokens issued to Free/Pro/Max accounts. Wrap mode's tier routing, compression, and caching require an API key โ they do not apply to and are not compatible with Claude Pro/Max subscription auth. See [ToS Compliance](docs/wrap-guide.md#tos-compliance) for details.
|
|
50
51
|
|
|
51
52
|
[Full wrap guide โ](docs/wrap-guide.md)
|
|
52
53
|
|
|
@@ -68,7 +69,7 @@ The fastest path is the interactive wizard:
|
|
|
68
69
|
lynkr init
|
|
69
70
|
```
|
|
70
71
|
|
|
71
|
-
It asks four questions โ usage mode (
|
|
72
|
+
It asks four questions โ usage mode (BYO API keys, direct), tier picks for SIMPLE/MEDIUM/COMPLEX/REASONING across the 12 supported providers, credentials for what you chose, and a few routing-intelligence knobs โ then writes a fully-populated `.env` with sensible production defaults for everything else (caching, compression, policy budgets, MCP sandbox, rate limiting).
|
|
72
73
|
|
|
73
74
|
Useful flags:
|
|
74
75
|
|
|
@@ -326,12 +327,45 @@ the local telemetry store:
|
|
|
326
327
|
- **Routing accuracy** โ over-/under-provisioned request counts, a self-audit
|
|
327
328
|
of the tier router's decisions
|
|
328
329
|
- **Request logs** โ filterable by provider, tier, and errors, with latency,
|
|
329
|
-
tokens, and cost per request
|
|
330
|
+
tokens, and cost per request; every session id links to a drill-down
|
|
330
331
|
- **Provider health** โ configured providers, credential warnings, circuit
|
|
331
332
|
breaker states
|
|
333
|
+
- **Insights** โ analyzer findings ranked by *past overspend* (auditable
|
|
334
|
+
against spend already recorded, never projected savings): dead tool
|
|
335
|
+
schemas paying rent, harness side-traffic served on expensive tiers,
|
|
336
|
+
weak prompt-cache hit ratios, and Wilson-bounded tier-downsize verdicts.
|
|
337
|
+
Each finding ships its evidence rows, the fix, the caveat, and how the
|
|
338
|
+
figure was computed. "Not measured yet" is rendered distinctly from
|
|
339
|
+
zero โ an un-run scan is not an all-clear.
|
|
340
|
+
- **Explore** โ a Metric ร Dimension (ร Stack) pivot over routing telemetry
|
|
341
|
+
(spend/tokens/requests/sessions by provider, model, tier, request type,
|
|
342
|
+
dayโฆ) with preset views, period-over-period deltas, and CSV export
|
|
343
|
+
- **Session drill-down** โ per-model cost mix and an input-context-per-call
|
|
344
|
+
chart where distillation and cache behavior are directly visible
|
|
345
|
+
- **Cache receipts** โ projected switch/hold economics from cache-aware
|
|
346
|
+
routing next to the *measured* companion (dollars saved by cache reads
|
|
347
|
+
actually served)
|
|
348
|
+
|
|
349
|
+
JSON APIs behind it
|
|
350
|
+
(`/dashboard/api/overview|usage|routing|logs|recommendations|analytics|sessions/:id|statusline`)
|
|
351
|
+
if you want the raw numbers.
|
|
352
|
+
|
|
353
|
+
### Status line for Claude Code
|
|
354
|
+
|
|
355
|
+
One line after every turn โ routed tier, served model, today's spend, and
|
|
356
|
+
cache re-read share โ with zero token cost (out-of-band, never enters model
|
|
357
|
+
context). Add to `~/.claude/settings.json`:
|
|
358
|
+
|
|
359
|
+
```json
|
|
360
|
+
"statusLine": { "type": "command", "command": "lynkr-statusline" }
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
```
|
|
364
|
+
โ Opus 4.8 ยท MEDIUM โ minimax-m3:cloud (ollama) ยท today $0.06 ยท cache 67%
|
|
365
|
+
```
|
|
332
366
|
|
|
333
|
-
|
|
334
|
-
the
|
|
367
|
+
Always prints exactly one line and always exits 0 โ a down proxy can never
|
|
368
|
+
break the harness. Set `LYNKR_PORT` if Lynkr isn't on 8081.
|
|
335
369
|
|
|
336
370
|
### Cost tracking & model pricing
|
|
337
371
|
Per-request cost is computed from a model-pricing registry (LiteLLM โ models.dev,
|
|
@@ -551,7 +585,8 @@ With tier routing + token optimization: **additional 50-87% savings** on cloud p
|
|
|
551
585
|
| **TOON JSON compression** | โ
up to 87.6% | โ | โ | โ |
|
|
552
586
|
| **Upstream SSE streaming** | โ
native passthrough + cross-format transform | โ ๏ธ passthrough only | โ
| โ ๏ธ |
|
|
553
587
|
| **Semantic cache** | โ
171ms hits, 0 tokens | โ | โ | โ
Prompt cache only |
|
|
554
|
-
| **Savings & routing dashboard** | โ
spend, savings vs flagship, tier mix, routing accuracy, request logs | โ ๏ธ spend UI only | โ ๏ธ usage page | โ
observability suite (no routing accuracy) |
|
|
588
|
+
| **Savings & routing dashboard** | โ
spend, savings vs flagship, tier mix, routing accuracy, request logs, pivot explorer, session drill-down | โ ๏ธ spend UI only | โ ๏ธ usage page | โ
observability suite (no routing accuracy) |
|
|
589
|
+
| **Cost recommendations** | โ
evidence-backed findings (dead tool schemas, side-traffic, cache weak spots, Wilson-proven downsizes) ranked by past overspend | โ | โ | โ ๏ธ alerts, no findings |
|
|
555
590
|
| **Long-term memory** | โ
SQLite, per-session | โ | โ | โ |
|
|
556
591
|
| **MCP integration** | โ
| โ | โ | โ |
|
|
557
592
|
| **Self-hosted** | โ
Node.js only | โ
Python stack | โ SaaS | โ
Docker |
|
package/bin/lynkr-init.js
CHANGED
|
@@ -236,6 +236,13 @@ const BASELINE_ENV = {
|
|
|
236
236
|
HEADROOM_CCR: 'true',
|
|
237
237
|
HEADROOM_CCR_TTL: '300',
|
|
238
238
|
|
|
239
|
+
// โโ TencentDB-Agent-Memory sidecar (team memory hub) โโโโโโโโโโโโโโโโโโ
|
|
240
|
+
// Launches agentmemory/memory-core + memory-hub containers on
|
|
241
|
+
// `lynkr start` (Panel UI :8125). First start pulls two Docker Hub
|
|
242
|
+
// images; skips gracefully when Docker isn't running. See .env.example
|
|
243
|
+
// for all knobs.
|
|
244
|
+
TENCENTDB_MEMORY_ENABLED: 'true',
|
|
245
|
+
|
|
239
246
|
// โโ Memory + token tracking โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
240
247
|
MEMORY_ENABLED: 'true',
|
|
241
248
|
MEMORY_RETRIEVAL_LIMIT: '5',
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* lynkr statusline โ zero-token Claude Code status line.
|
|
4
|
+
*
|
|
5
|
+
* Wire into ~/.claude/settings.json:
|
|
6
|
+
* "statusLine": { "type": "command", "command": "lynkr-statusline" }
|
|
7
|
+
*
|
|
8
|
+
* Claude Code pipes session JSON on stdin after each turn. This command:
|
|
9
|
+
* - never enters model context (out-of-band โ an in-loop MCP integration
|
|
10
|
+
* was measured at +36% model-weighted tokens by TokenJam; don't do that)
|
|
11
|
+
* - makes ONE local HTTP call to the Lynkr dashboard API with a hard
|
|
12
|
+
* 250ms timeout
|
|
13
|
+
* - always exits 0 and always prints exactly one line, no matter what
|
|
14
|
+
* fails โ a broken status line must never break the harness.
|
|
15
|
+
*
|
|
16
|
+
* Output: โ <model> ยท <tier> โ <served model> (<provider>)[ ยท pin] ยท today $X ยท cache NN%
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
'use strict';
|
|
20
|
+
|
|
21
|
+
const PORT = Number(process.env.LYNKR_PORT) || Number(process.env.PORT) || 8081;
|
|
22
|
+
const TIMEOUT_MS = 250;
|
|
23
|
+
|
|
24
|
+
function readStdin(maxMs) {
|
|
25
|
+
return new Promise((resolve) => {
|
|
26
|
+
let data = '';
|
|
27
|
+
const timer = setTimeout(() => resolve(data), maxMs);
|
|
28
|
+
process.stdin.on('data', (c) => { data += c; });
|
|
29
|
+
process.stdin.on('end', () => { clearTimeout(timer); resolve(data); });
|
|
30
|
+
process.stdin.on('error', () => { clearTimeout(timer); resolve(data); });
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async function fetchStatus() {
|
|
35
|
+
const controller = new AbortController();
|
|
36
|
+
const timer = setTimeout(() => controller.abort(), TIMEOUT_MS);
|
|
37
|
+
try {
|
|
38
|
+
const res = await fetch(`http://127.0.0.1:${PORT}/dashboard/api/statusline`, {
|
|
39
|
+
signal: controller.signal,
|
|
40
|
+
});
|
|
41
|
+
if (!res.ok) return null;
|
|
42
|
+
return await res.json();
|
|
43
|
+
} catch {
|
|
44
|
+
return null;
|
|
45
|
+
} finally {
|
|
46
|
+
clearTimeout(timer);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async function main() {
|
|
51
|
+
const [stdinRaw, status] = await Promise.all([readStdin(150), fetchStatus()]);
|
|
52
|
+
|
|
53
|
+
let clientModel = null;
|
|
54
|
+
try {
|
|
55
|
+
const parsed = JSON.parse(stdinRaw);
|
|
56
|
+
clientModel = parsed?.model?.display_name || parsed?.model?.id || null;
|
|
57
|
+
} catch { /* stdin absent or non-JSON โ fine */ }
|
|
58
|
+
|
|
59
|
+
const parts = [];
|
|
60
|
+
if (clientModel) parts.push(clientModel);
|
|
61
|
+
|
|
62
|
+
if (status?.last) {
|
|
63
|
+
const served = `${status.last.tier || '?'} โ ${status.last.model || '?'} (${status.last.provider || '?'})`;
|
|
64
|
+
parts.push(served + (status.last.pinned ? ' ยท pin' : ''));
|
|
65
|
+
} else {
|
|
66
|
+
parts.push('lynkr: no traffic yet');
|
|
67
|
+
}
|
|
68
|
+
if (status && typeof status.todaySpendUsd === 'number') {
|
|
69
|
+
parts.push(`today $${status.todaySpendUsd.toFixed(2)}`);
|
|
70
|
+
}
|
|
71
|
+
if (status && typeof status.cacheReadPct === 'number') {
|
|
72
|
+
parts.push(`cache ${status.cacheReadPct}%`);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
process.stdout.write('โ ' + parts.join(' ยท ') + '\n');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
main()
|
|
79
|
+
.catch(() => { process.stdout.write('โ lynkr statusline unavailable\n'); })
|
|
80
|
+
.finally(() => process.exit(0));
|
package/bin/wrap.js
CHANGED
|
@@ -114,13 +114,16 @@ async function wrapClaude() {
|
|
|
114
114
|
|
|
115
115
|
let server;
|
|
116
116
|
try {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
//
|
|
117
|
+
// Override port BEFORE requiring the server: src/config reads
|
|
118
|
+
// process.env.PORT at module-load time, so setting it after the require
|
|
119
|
+
// is a no-op โ the server binds the .env port and --port silently fails
|
|
120
|
+
// (printed 8082, bound 8081).
|
|
120
121
|
if (port !== 8081) {
|
|
121
122
|
process.env.PORT = String(port);
|
|
122
123
|
}
|
|
123
124
|
|
|
125
|
+
const { start } = require('../src/server');
|
|
126
|
+
|
|
124
127
|
server = await start();
|
|
125
128
|
|
|
126
129
|
// Wait for server to be ready
|
|
@@ -381,13 +384,14 @@ async function wrapGeneric(opts) {
|
|
|
381
384
|
|
|
382
385
|
let server;
|
|
383
386
|
try {
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
// Override port if specified
|
|
387
|
+
// Set PORT before requiring the server โ src/config freezes
|
|
388
|
+
// process.env.PORT at module-load time (same fix as the claude path).
|
|
387
389
|
if (port !== 8081) {
|
|
388
390
|
process.env.PORT = String(port);
|
|
389
391
|
}
|
|
390
392
|
|
|
393
|
+
const { start } = require('../src/server');
|
|
394
|
+
|
|
391
395
|
server = await start();
|
|
392
396
|
|
|
393
397
|
// Wait for server to be ready
|
package/config/model-tiers.json
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"GLM-4-Flash"
|
|
54
54
|
],
|
|
55
55
|
"moonshot": [
|
|
56
|
-
"kimi-k2
|
|
56
|
+
"kimi-k2.6"
|
|
57
57
|
]
|
|
58
58
|
}
|
|
59
59
|
},
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"GLM-4.7"
|
|
109
109
|
],
|
|
110
110
|
"moonshot": [
|
|
111
|
-
"kimi-k2
|
|
111
|
+
"kimi-k2.6"
|
|
112
112
|
]
|
|
113
113
|
}
|
|
114
114
|
},
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"GLM-4.7"
|
|
158
158
|
],
|
|
159
159
|
"moonshot": [
|
|
160
|
-
"kimi-k2
|
|
160
|
+
"kimi-k2.6"
|
|
161
161
|
]
|
|
162
162
|
}
|
|
163
163
|
},
|
|
@@ -203,8 +203,8 @@
|
|
|
203
203
|
"deepseek-r1"
|
|
204
204
|
],
|
|
205
205
|
"moonshot": [
|
|
206
|
-
"kimi-
|
|
207
|
-
"kimi-k2
|
|
206
|
+
"kimi-k3",
|
|
207
|
+
"kimi-k2.6"
|
|
208
208
|
]
|
|
209
209
|
}
|
|
210
210
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lynkr",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.12.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"index.js",
|
|
6
6
|
"install.sh",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"main": "index.js",
|
|
26
26
|
"bin": {
|
|
27
27
|
"lynkr": "bin/cli.js",
|
|
28
|
-
"lynkr-setup": "scripts/setup.js"
|
|
28
|
+
"lynkr-setup": "scripts/setup.js",
|
|
29
|
+
"lynkr-statusline": "bin/statusline.js"
|
|
29
30
|
},
|
|
30
31
|
"scripts": {
|
|
31
32
|
"postinstall": "node scripts/check-native.js",
|
|
@@ -36,8 +37,8 @@
|
|
|
36
37
|
"dev": "nodemon index.js",
|
|
37
38
|
"lint": "eslint src index.js",
|
|
38
39
|
"test": "npm run test:unit && npm run test:performance",
|
|
39
|
-
"test:unit": "DATABRICKS_API_KEY=test-key DATABRICKS_API_BASE=http://test.com LOG_FILE_ENABLED=false node --test test/routing.test.js test/hybrid-routing-integration.test.js test/retry-logic.test.js test/sse-transformer.test.js test/passthrough-stream.test.js test/passthrough-mode.test.js test/openrouter-error-resilience.test.js test/format-conversion.test.js test/azure-openai-config.test.js test/azure-openai-format-conversion.test.js test/azure-openai-routing.test.js test/azure-openai-streaming.test.js test/azure-openai-error-resilience.test.js test/azure-openai-integration.test.js test/openai-integration.test.js test/toon-compression.test.js test/gcf-compression.test.js test/llamacpp-integration.test.js test/resilience.test.js test/telemetry-routing.test.js test/memory/store.test.js test/memory/surprise.test.js test/memory/extractor.test.js test/memory/search.test.js test/memory/retriever.test.js test/distill.test.js test/large-payload.test.js test/prompt-cache-injection.test.js test/risk-analyzer.test.js test/interaction-block.test.js test/preflight.test.js test/token-reduction.test.js test/session-affinity.test.js test/model-registry-cost.test.js test/output-format-guard.test.js test/tier-fallback.test.js test/wrap.test.js test/init.test.js test/tool-call-response-metadata.test.js test/degradation.test.js test/routing-telemetry-columns.test.js test/sticky-routing.test.js test/knn-ambiguous-escalate.test.js test/deescalator.test.js test/client-profiles.test.js test/strip-internal-fields.test.js test/complexity-tool-subtraction.test.js test/bandit.test.js test/routing-propensity.test.js test/reward-pipeline.test.js test/knn-cold-start.test.js test/calibration.test.js test/feedback-loop.test.js test/session-fingerprint.test.js test/side-request-guards.test.js test/verifier.test.js test/intent-score.test.js test/difficulty-classifier.test.js test/classifier-setup.test.js test/usage-stats.test.js test/loop-guard.test.js",
|
|
40
|
-
"test:memory": "DATABRICKS_API_KEY=test-key DATABRICKS_API_BASE=http://test.com node --test test/memory/store.test.js test/memory/surprise.test.js test/memory/extractor.test.js test/memory/search.test.js test/memory/retriever.test.js",
|
|
40
|
+
"test:unit": "DATABRICKS_API_KEY=test-key DATABRICKS_API_BASE=http://test.com LOG_FILE_ENABLED=false node --test test/routing.test.js test/hybrid-routing-integration.test.js test/retry-logic.test.js test/sse-transformer.test.js test/passthrough-stream.test.js test/passthrough-mode.test.js test/openrouter-error-resilience.test.js test/format-conversion.test.js test/azure-openai-config.test.js test/azure-openai-format-conversion.test.js test/azure-openai-routing.test.js test/azure-openai-streaming.test.js test/azure-openai-error-resilience.test.js test/azure-openai-integration.test.js test/openai-integration.test.js test/toon-compression.test.js test/gcf-compression.test.js test/llamacpp-integration.test.js test/resilience.test.js test/telemetry-routing.test.js test/memory/store.test.js test/memory/surprise.test.js test/memory/extractor.test.js test/memory/search.test.js test/memory/retriever.test.js test/memory/distiller.test.js test/memory/distiller-freeze.test.js test/memory/wiki.test.js test/memory/skills-cache.test.js test/memory/tencentdb-launcher.test.js test/distill.test.js test/large-payload.test.js test/prompt-cache-injection.test.js test/risk-analyzer.test.js test/interaction-block.test.js test/preflight.test.js test/token-reduction.test.js test/session-affinity.test.js test/cache-state.test.js test/cache-switch-cost.test.js test/lens-recommendations.test.js test/model-registry-cost.test.js test/output-format-guard.test.js test/tier-fallback.test.js test/wrap.test.js test/init.test.js test/tool-call-response-metadata.test.js test/degradation.test.js test/routing-telemetry-columns.test.js test/sticky-routing.test.js test/knn-ambiguous-escalate.test.js test/deescalator.test.js test/client-profiles.test.js test/strip-internal-fields.test.js test/complexity-tool-subtraction.test.js test/bandit.test.js test/routing-propensity.test.js test/reward-pipeline.test.js test/knn-cold-start.test.js test/calibration.test.js test/feedback-loop.test.js test/session-fingerprint.test.js test/side-request-guards.test.js test/verifier.test.js test/intent-score.test.js test/difficulty-classifier.test.js test/classifier-setup.test.js test/usage-stats.test.js test/loop-guard.test.js test/moonshot-model-mapping.test.js",
|
|
41
|
+
"test:memory": "DATABRICKS_API_KEY=test-key DATABRICKS_API_BASE=http://test.com node --test test/memory/store.test.js test/memory/surprise.test.js test/memory/extractor.test.js test/memory/search.test.js test/memory/retriever.test.js test/memory/distiller.test.js test/memory/distiller-freeze.test.js test/memory/wiki.test.js test/memory/skills-cache.test.js test/memory/tencentdb-launcher.test.js",
|
|
41
42
|
"test:new-features": "DATABRICKS_API_KEY=test-key DATABRICKS_API_BASE=http://test.com node --test test/passthrough-mode.test.js test/openrouter-error-resilience.test.js test/format-conversion.test.js",
|
|
42
43
|
"test:performance": "DATABRICKS_API_KEY=test-key DATABRICKS_API_BASE=http://test.com node test/hybrid-routing-performance.test.js && DATABRICKS_API_KEY=test-key DATABRICKS_API_BASE=http://test.com node test/performance-tests.js",
|
|
43
44
|
"test:benchmark": "DATABRICKS_API_KEY=test-key DATABRICKS_API_BASE=http://test.com node test/performance-benchmark.js",
|
|
@@ -92,6 +93,7 @@
|
|
|
92
93
|
"@babel/parser": "^7.29.0",
|
|
93
94
|
"@babel/traverse": "^7.29.0",
|
|
94
95
|
"@blackwell-systems/gcf": "2.4.0",
|
|
96
|
+
"@tencentdb-agent-memory/memory-tencentdb": "^1.0.1",
|
|
95
97
|
"@toon-format/toon": "^2.1.0",
|
|
96
98
|
"cockatiel": "^3.2.1",
|
|
97
99
|
"compression": "^1.7.4",
|
|
@@ -123,5 +125,8 @@
|
|
|
123
125
|
"eslint": "^8.57.0",
|
|
124
126
|
"nodemon": "^3.1.0",
|
|
125
127
|
"pino-pretty": "^10.2.0"
|
|
128
|
+
},
|
|
129
|
+
"allowScripts": {
|
|
130
|
+
"@tencentdb-agent-memory/memory-tencentdb@1.0.1": true
|
|
126
131
|
}
|
|
127
132
|
}
|