lynkr 8.0.0 → 9.0.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.
Files changed (128) hide show
  1. package/.lynkr/telemetry.db +0 -0
  2. package/.lynkr/telemetry.db-shm +0 -0
  3. package/.lynkr/telemetry.db-wal +0 -0
  4. package/README.md +196 -322
  5. package/lynkr-skill.tar.gz +0 -0
  6. package/package.json +4 -3
  7. package/src/api/openai-router.js +64 -13
  8. package/src/api/providers-handler.js +171 -3
  9. package/src/api/router.js +9 -2
  10. package/src/clients/circuit-breaker.js +10 -247
  11. package/src/clients/codex-process.js +342 -0
  12. package/src/clients/codex-utils.js +143 -0
  13. package/src/clients/databricks.js +210 -63
  14. package/src/clients/resilience.js +540 -0
  15. package/src/clients/retry.js +22 -167
  16. package/src/clients/standard-tools.js +23 -0
  17. package/src/config/index.js +77 -0
  18. package/src/context/compression.js +42 -9
  19. package/src/context/distill.js +492 -0
  20. package/src/orchestrator/index.js +48 -8
  21. package/src/routing/complexity-analyzer.js +258 -5
  22. package/src/routing/index.js +12 -2
  23. package/src/routing/latency-tracker.js +148 -0
  24. package/src/routing/model-tiers.js +2 -0
  25. package/src/routing/quality-scorer.js +113 -0
  26. package/src/routing/telemetry.js +464 -0
  27. package/src/server.js +13 -12
  28. package/src/tools/code-graph.js +538 -0
  29. package/src/tools/code-mode.js +304 -0
  30. package/src/tools/index.js +4 -0
  31. package/src/tools/lazy-loader.js +18 -0
  32. package/src/tools/mcp-remote.js +7 -0
  33. package/src/tools/smart-selection.js +11 -0
  34. package/src/tools/tinyfish.js +358 -0
  35. package/src/tools/truncate.js +1 -0
  36. package/src/utils/payload.js +206 -0
  37. package/src/utils/perf-timer.js +80 -0
  38. package/.github/FUNDING.yml +0 -15
  39. package/.github/workflows/README.md +0 -215
  40. package/.github/workflows/ci.yml +0 -69
  41. package/.github/workflows/index.yml +0 -62
  42. package/.github/workflows/web-tools-tests.yml +0 -56
  43. package/CITATIONS.bib +0 -6
  44. package/DEPLOYMENT.md +0 -1001
  45. package/LYNKR-TUI-PLAN.md +0 -984
  46. package/PERFORMANCE-REPORT.md +0 -866
  47. package/PLAN-per-client-model-routing.md +0 -252
  48. package/docs/42642f749da6234f41b6b425c3bb07c9.txt +0 -1
  49. package/docs/BingSiteAuth.xml +0 -4
  50. package/docs/docs-style.css +0 -478
  51. package/docs/docs.html +0 -198
  52. package/docs/google5be250e608e6da39.html +0 -1
  53. package/docs/index.html +0 -577
  54. package/docs/index.md +0 -584
  55. package/docs/robots.txt +0 -4
  56. package/docs/sitemap.xml +0 -44
  57. package/docs/style.css +0 -1223
  58. package/docs/toon-integration-spec.md +0 -130
  59. package/documentation/README.md +0 -101
  60. package/documentation/api.md +0 -806
  61. package/documentation/claude-code-cli.md +0 -679
  62. package/documentation/codex-cli.md +0 -397
  63. package/documentation/contributing.md +0 -571
  64. package/documentation/cursor-integration.md +0 -734
  65. package/documentation/docker.md +0 -874
  66. package/documentation/embeddings.md +0 -762
  67. package/documentation/faq.md +0 -713
  68. package/documentation/features.md +0 -403
  69. package/documentation/headroom.md +0 -519
  70. package/documentation/installation.md +0 -758
  71. package/documentation/memory-system.md +0 -476
  72. package/documentation/production.md +0 -636
  73. package/documentation/providers.md +0 -1009
  74. package/documentation/routing.md +0 -476
  75. package/documentation/testing.md +0 -629
  76. package/documentation/token-optimization.md +0 -325
  77. package/documentation/tools.md +0 -697
  78. package/documentation/troubleshooting.md +0 -969
  79. package/final-test.js +0 -33
  80. package/headroom-sidecar/config.py +0 -93
  81. package/headroom-sidecar/requirements.txt +0 -14
  82. package/headroom-sidecar/server.py +0 -451
  83. package/monitor-agents.sh +0 -31
  84. package/scripts/audit-log-reader.js +0 -399
  85. package/scripts/compact-dictionary.js +0 -204
  86. package/scripts/test-deduplication.js +0 -448
  87. package/src/db/database.sqlite +0 -0
  88. package/te +0 -11622
  89. package/test/README.md +0 -212
  90. package/test/azure-openai-config.test.js +0 -213
  91. package/test/azure-openai-error-resilience.test.js +0 -238
  92. package/test/azure-openai-format-conversion.test.js +0 -354
  93. package/test/azure-openai-integration.test.js +0 -287
  94. package/test/azure-openai-routing.test.js +0 -175
  95. package/test/azure-openai-streaming.test.js +0 -171
  96. package/test/bedrock-integration.test.js +0 -457
  97. package/test/comprehensive-test-suite.js +0 -928
  98. package/test/config-validation.test.js +0 -207
  99. package/test/cursor-integration.test.js +0 -484
  100. package/test/format-conversion.test.js +0 -578
  101. package/test/hybrid-routing-integration.test.js +0 -269
  102. package/test/hybrid-routing-performance.test.js +0 -428
  103. package/test/llamacpp-integration.test.js +0 -882
  104. package/test/lmstudio-integration.test.js +0 -347
  105. package/test/memory/extractor.test.js +0 -398
  106. package/test/memory/retriever.test.js +0 -613
  107. package/test/memory/retriever.test.js.bak +0 -585
  108. package/test/memory/search.test.js +0 -537
  109. package/test/memory/search.test.js.bak +0 -389
  110. package/test/memory/store.test.js +0 -344
  111. package/test/memory/store.test.js.bak +0 -312
  112. package/test/memory/surprise.test.js +0 -300
  113. package/test/memory-performance.test.js +0 -472
  114. package/test/openai-integration.test.js +0 -683
  115. package/test/openrouter-error-resilience.test.js +0 -418
  116. package/test/passthrough-mode.test.js +0 -385
  117. package/test/performance-benchmark.js +0 -351
  118. package/test/performance-tests.js +0 -528
  119. package/test/routing.test.js +0 -225
  120. package/test/toon-compression.test.js +0 -131
  121. package/test/web-tools.test.js +0 -329
  122. package/test-agents-simple.js +0 -43
  123. package/test-cli-connection.sh +0 -33
  124. package/test-learning-unit.js +0 -126
  125. package/test-learning.js +0 -112
  126. package/test-parallel-agents.sh +0 -124
  127. package/test-parallel-direct.js +0 -155
  128. package/test-subagents.sh +0 -117
package/test-subagents.sh DELETED
@@ -1,117 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Test Subagent System
4
- # This script tests the live subagent functionality
5
-
6
- set -e
7
-
8
- echo "🚀 Testing Subagent System"
9
- echo "================================"
10
- echo ""
11
-
12
- # Load test environment (filter out comments)
13
- export $(grep -v '^#' .env.test | grep -v '^$' | xargs)
14
-
15
- # Start server in background
16
- echo "1. Starting server..."
17
- node index.js > /tmp/subagent-test.log 2>&1 &
18
- SERVER_PID=$!
19
- echo " Server PID: $SERVER_PID"
20
-
21
- # Wait for server to start
22
- echo "2. Waiting for server to be ready..."
23
- for i in {1..30}; do
24
- if curl -s http://localhost:8080/health > /dev/null 2>&1; then
25
- echo " ✅ Server is ready!"
26
- break
27
- fi
28
- sleep 1
29
- if [ $i -eq 30 ]; then
30
- echo " ❌ Server failed to start"
31
- kill $SERVER_PID 2>/dev/null || true
32
- exit 1
33
- fi
34
- done
35
-
36
- echo ""
37
- echo "3. Testing agent endpoints..."
38
-
39
- # Test 1: List available agents
40
- echo " 📋 GET /v1/agents - List available agents"
41
- curl -s http://localhost:8080/v1/agents | jq -r '.agents[] | " - \(.name): \(.description[:60])..."' 2>/dev/null || echo " (Install jq for pretty output)"
42
-
43
- echo ""
44
- echo " 📊 GET /v1/agents/stats - Agent statistics"
45
- curl -s http://localhost:8080/v1/agents/stats | jq . 2>/dev/null || curl -s http://localhost:8080/v1/agents/stats
46
-
47
- echo ""
48
- echo "4. Testing Task tool with real request..."
49
-
50
- # Create test request that uses Task tool (NO tools array - server provides tools)
51
- cat > /tmp/test-task-request.json << 'EOFR'
52
- {
53
- "model": "claude-3-5-sonnet-20241022",
54
- "max_tokens": 4096,
55
- "messages": [
56
- {
57
- "role": "user",
58
- "content": "Use the Task tool to search for all files in the src/agents directory."
59
- }
60
- ]
61
- }
62
- EOFR
63
-
64
- echo " 📤 Sending request to /v1/messages..."
65
- RESPONSE=$(curl -s -X POST http://localhost:8080/v1/messages \
66
- -H "Content-Type: application/json" \
67
- -H "x-session-id: test-session-$(date +%s)" \
68
- -d @/tmp/test-task-request.json)
69
-
70
- echo ""
71
- echo " 📥 Response received!"
72
-
73
- # Check response type
74
- if echo "$RESPONSE" | grep -q "tool_use"; then
75
- echo " ⚠️ WARNING: Server returned tool_use (passthrough mode)"
76
- echo " 🔧 Tool calls in response:"
77
- echo "$RESPONSE" | jq -r '.content[] | select(.type=="tool_use") | " - \(.name): \(.input.prompt[:80])..."' 2>/dev/null || echo " (Install jq to see tool calls)"
78
- elif echo "$RESPONSE" | grep -q "content"; then
79
- echo " ✅ Server executed tools and returned final response!"
80
- echo ""
81
- echo " 📄 Response content (first 200 chars):"
82
- echo "$RESPONSE" | jq -r '.content[0].text[:200]' 2>/dev/null || echo " (Install jq to see content)"
83
- fi
84
-
85
- # Check agent stats again
86
- echo ""
87
- echo "5. Checking agent execution stats..."
88
- sleep 2
89
- curl -s http://localhost:8080/v1/agents/stats | jq . 2>/dev/null || curl -s http://localhost:8080/v1/agents/stats
90
-
91
- # Check for transcripts
92
- echo ""
93
- echo "6. Checking for agent transcripts..."
94
- TRANSCRIPT_COUNT=$(ls -1 data/agent-transcripts/*.jsonl 2>/dev/null | wc -l || echo "0")
95
- echo " Found $TRANSCRIPT_COUNT transcript file(s)"
96
-
97
- if [ "$TRANSCRIPT_COUNT" -gt 0 ]; then
98
- echo " Latest transcript:"
99
- LATEST=$(ls -t data/agent-transcripts/*.jsonl 2>/dev/null | head -1)
100
- echo " File: $LATEST"
101
- echo " First few lines:"
102
- head -3 "$LATEST" | jq -r '"\(.type): \(.timestamp)"' 2>/dev/null || head -3 "$LATEST"
103
- fi
104
-
105
- echo ""
106
- echo "7. Checking server logs for agent activity..."
107
- echo " Last 20 lines from server log:"
108
- tail -20 /tmp/subagent-test.log | grep -E "agent|Task tool|subagent" --color=always || echo " (No agent activity in logs)"
109
-
110
- echo ""
111
- echo "================================"
112
- echo "✅ Test complete!"
113
- echo ""
114
- echo "Server is still running (PID: $SERVER_PID)"
115
- echo "To view full logs: tail -f /tmp/subagent-test.log"
116
- echo "To stop server: kill $SERVER_PID"
117
- echo ""