lynkr 9.2.3 → 9.3.1
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 -6
- package/package.json +1 -1
- package/src/config/index.js +5 -5
- package/src/orchestrator/index.js +3 -3
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ OLLAMA_MODEL=qwen2.5-coder:latest
|
|
|
51
51
|
# Server
|
|
52
52
|
PORT=8081
|
|
53
53
|
|
|
54
|
-
#
|
|
54
|
+
# Optional: Limits (remove for unlimited)
|
|
55
55
|
POLICY_MAX_STEPS=50
|
|
56
56
|
POLICY_MAX_TOOL_CALLS=100
|
|
57
57
|
|
|
@@ -75,7 +75,7 @@ FALLBACK_ENABLED=false
|
|
|
75
75
|
# Server
|
|
76
76
|
PORT=8081
|
|
77
77
|
|
|
78
|
-
#
|
|
78
|
+
# Optional: Limits (remove for unlimited)
|
|
79
79
|
POLICY_MAX_STEPS=50
|
|
80
80
|
POLICY_MAX_TOOL_CALLS=100
|
|
81
81
|
|
|
@@ -97,7 +97,7 @@ FALLBACK_ENABLED=false
|
|
|
97
97
|
# Server
|
|
98
98
|
PORT=8081
|
|
99
99
|
|
|
100
|
-
#
|
|
100
|
+
# Optional: Limits (remove for unlimited)
|
|
101
101
|
POLICY_MAX_STEPS=50
|
|
102
102
|
POLICY_MAX_TOOL_CALLS=100
|
|
103
103
|
```
|
|
@@ -115,7 +115,7 @@ FALLBACK_ENABLED=false
|
|
|
115
115
|
# Server
|
|
116
116
|
PORT=8081
|
|
117
117
|
|
|
118
|
-
#
|
|
118
|
+
# Optional: Limits (remove for unlimited)
|
|
119
119
|
POLICY_MAX_STEPS=50
|
|
120
120
|
POLICY_MAX_TOOL_CALLS=100
|
|
121
121
|
```
|
|
@@ -212,7 +212,7 @@ TIER_MEDIUM=ollama:qwen2.5:7b
|
|
|
212
212
|
TIER_COMPLEX=ollama:deepseek-r1:14b
|
|
213
213
|
TIER_REASONING=ollama:deepseek-r1:14b
|
|
214
214
|
|
|
215
|
-
#
|
|
215
|
+
# Optional: Limits (remove for unlimited) for long conversations
|
|
216
216
|
POLICY_MAX_STEPS=50
|
|
217
217
|
POLICY_MAX_TOOL_CALLS=100
|
|
218
218
|
```
|
|
@@ -449,8 +449,9 @@ LOAD_SHEDDING_ENABLED=true
|
|
|
449
449
|
| **"Route not found: HEAD /"** | Ignore - harmless health check from Claude Code |
|
|
450
450
|
| **"Hallucinated tool calls"** | Normal - Lynkr automatically filters invalid tools |
|
|
451
451
|
| **"Safe Command DSL blocked"** | Add `POLICY_SAFE_COMMANDS_ENABLED=false` to `.env` |
|
|
452
|
+
| **"spawn graphify ENOENT"** | Install graphify: `npm install -g @safishamsi/graphify` or set `CODE_GRAPH_ENABLED=false` |
|
|
452
453
|
| **Slow first request (20+ sec)** | Ollama loading model into memory. Add `OLLAMA_KEEP_ALIVE=30m` in Ollama config |
|
|
453
|
-
| **No response after N turns** |
|
|
454
|
+
| **No response after N turns** | Remove `POLICY_MAX_STEPS` and `POLICY_MAX_TOOL_CALLS` from `.env` (unlimited by default in v9.3.0+) |
|
|
454
455
|
|
|
455
456
|
---
|
|
456
457
|
|
|
@@ -482,6 +483,35 @@ LOAD_SHEDDING_HEAP_THRESHOLD=0.85
|
|
|
482
483
|
curl -X POST http://localhost:8081/v1/admin/reload
|
|
483
484
|
```
|
|
484
485
|
|
|
486
|
+
### Code Intelligence (Optional - Graphify)
|
|
487
|
+
|
|
488
|
+
**Graphify** provides AST-based code analysis for smarter routing decisions.
|
|
489
|
+
|
|
490
|
+
**Installation:**
|
|
491
|
+
```bash
|
|
492
|
+
# Option 1: npm (if available)
|
|
493
|
+
npm install -g @safishamsi/graphify
|
|
494
|
+
|
|
495
|
+
# Option 2: Build from source (Rust required)
|
|
496
|
+
git clone https://github.com/safishamsi/graphify
|
|
497
|
+
cd graphify
|
|
498
|
+
cargo build --release
|
|
499
|
+
sudo cp target/release/graphify /usr/local/bin/
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
**Enable in `.env`:**
|
|
503
|
+
```bash
|
|
504
|
+
CODE_GRAPH_ENABLED=true
|
|
505
|
+
CODE_GRAPH_WORKSPACE=/path/to/your/project # Optional, defaults to cwd
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
**Features:**
|
|
509
|
+
- AST-based complexity scoring
|
|
510
|
+
- Structural code analysis (19 languages supported)
|
|
511
|
+
- Enhanced routing decisions based on code structure
|
|
512
|
+
|
|
513
|
+
**Note:** Graphify is completely optional. If not installed, Lynkr falls back to simpler complexity analysis.
|
|
514
|
+
|
|
485
515
|
---
|
|
486
516
|
|
|
487
517
|
## Installation Methods
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lynkr",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.1",
|
|
4
4
|
"description": "Self-hosted Claude Code & Cursor proxy with Databricks,AWS BedRock,Azure adapters, openrouter, Ollama,llamacpp,LM Studio, workspace tooling, and MCP integration.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
package/src/config/index.js
CHANGED
|
@@ -405,8 +405,8 @@ const tinyfishTimeoutMs = parseInt(process.env.TINYFISH_TIMEOUT_MS ?? "120000",
|
|
|
405
405
|
const tinyfishProxyEnabled = process.env.TINYFISH_PROXY_ENABLED === "true";
|
|
406
406
|
const tinyfishProxyCountry = process.env.TINYFISH_PROXY_COUNTRY?.trim() || "US";
|
|
407
407
|
|
|
408
|
-
const policyMaxSteps = Number.parseInt(process.env.POLICY_MAX_STEPS
|
|
409
|
-
const policyMaxToolCalls = Number.parseInt(process.env.POLICY_MAX_TOOL_CALLS
|
|
408
|
+
const policyMaxSteps = process.env.POLICY_MAX_STEPS ? Number.parseInt(process.env.POLICY_MAX_STEPS, 10) : null; // null = no limit
|
|
409
|
+
const policyMaxToolCalls = process.env.POLICY_MAX_TOOL_CALLS ? Number.parseInt(process.env.POLICY_MAX_TOOL_CALLS, 10) : null; // null = no limit
|
|
410
410
|
const policyToolLoopThreshold = Number.parseInt(process.env.POLICY_TOOL_LOOP_THRESHOLD ?? "10", 10);
|
|
411
411
|
const policyDisallowedTools =
|
|
412
412
|
process.env.POLICY_DISALLOWED_TOOLS?.split(",")
|
|
@@ -686,9 +686,9 @@ var config = {
|
|
|
686
686
|
proxyCountry: tinyfishProxyCountry,
|
|
687
687
|
},
|
|
688
688
|
policy: {
|
|
689
|
-
maxStepsPerTurn:
|
|
690
|
-
maxToolCallsPerTurn:
|
|
691
|
-
maxToolCallsPerRequest:
|
|
689
|
+
maxStepsPerTurn: policyMaxSteps, // null = no limit
|
|
690
|
+
maxToolCallsPerTurn: policyMaxToolCalls, // null = no limit
|
|
691
|
+
maxToolCallsPerRequest: policyMaxToolCalls, // null = no limit (orchestrator uses this name)
|
|
692
692
|
toolLoopThreshold: Number.isNaN(policyToolLoopThreshold) ? 10 : policyToolLoopThreshold, // Max tool results before force-terminating
|
|
693
693
|
disallowedTools: policyDisallowedTools,
|
|
694
694
|
git: {
|
|
@@ -2605,7 +2605,7 @@ IMPORTANT TOOL USAGE RULES:
|
|
|
2605
2605
|
}, "Completed parallel Task execution");
|
|
2606
2606
|
|
|
2607
2607
|
// Check if we've exceeded the max tool calls limit after parallel execution
|
|
2608
|
-
if (toolCallsExecuted > settings.maxToolCallsPerRequest) {
|
|
2608
|
+
if (settings.maxToolCallsPerRequest && toolCallsExecuted > settings.maxToolCallsPerRequest) {
|
|
2609
2609
|
logger.error(
|
|
2610
2610
|
{
|
|
2611
2611
|
sessionId: session?.id ?? null,
|
|
@@ -2724,7 +2724,7 @@ IMPORTANT TOOL USAGE RULES:
|
|
|
2724
2724
|
toolCallsExecuted += 1;
|
|
2725
2725
|
|
|
2726
2726
|
// Check if we've exceeded the max tool calls limit
|
|
2727
|
-
if (toolCallsExecuted > settings.maxToolCallsPerRequest) {
|
|
2727
|
+
if (settings.maxToolCallsPerRequest && toolCallsExecuted > settings.maxToolCallsPerRequest) {
|
|
2728
2728
|
logger.error(
|
|
2729
2729
|
{
|
|
2730
2730
|
sessionId: session?.id ?? null,
|
|
@@ -3498,7 +3498,7 @@ IMPORTANT TOOL USAGE RULES:
|
|
|
3498
3498
|
toolCallsExecuted += 1;
|
|
3499
3499
|
|
|
3500
3500
|
// Check if we've exceeded the max tool calls limit
|
|
3501
|
-
if (toolCallsExecuted > settings.maxToolCallsPerRequest) {
|
|
3501
|
+
if (settings.maxToolCallsPerRequest && toolCallsExecuted > settings.maxToolCallsPerRequest) {
|
|
3502
3502
|
logger.error(
|
|
3503
3503
|
{
|
|
3504
3504
|
sessionId: session?.id ?? null,
|