lynkr 7.2.5 → 8.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 (124) hide show
  1. package/README.md +3 -3
  2. package/config/model-tiers.json +89 -0
  3. package/install.sh +6 -1
  4. package/package.json +4 -2
  5. package/scripts/setup.js +0 -1
  6. package/src/agents/executor.js +14 -6
  7. package/src/api/middleware/session.js +15 -2
  8. package/src/api/openai-router.js +162 -37
  9. package/src/api/providers-handler.js +15 -1
  10. package/src/api/router.js +107 -2
  11. package/src/budget/index.js +4 -3
  12. package/src/clients/databricks.js +431 -234
  13. package/src/clients/gpt-utils.js +181 -0
  14. package/src/clients/ollama-utils.js +66 -140
  15. package/src/clients/routing.js +0 -1
  16. package/src/clients/standard-tools.js +99 -3
  17. package/src/config/index.js +133 -35
  18. package/src/context/toon.js +173 -0
  19. package/src/logger/index.js +23 -0
  20. package/src/orchestrator/index.js +688 -213
  21. package/src/routing/agentic-detector.js +320 -0
  22. package/src/routing/complexity-analyzer.js +202 -2
  23. package/src/routing/cost-optimizer.js +305 -0
  24. package/src/routing/index.js +168 -159
  25. package/src/routing/model-tiers.js +365 -0
  26. package/src/server.js +4 -14
  27. package/src/sessions/cleanup.js +3 -3
  28. package/src/sessions/record.js +10 -1
  29. package/src/sessions/store.js +7 -2
  30. package/src/tools/agent-task.js +48 -1
  31. package/src/tools/index.js +19 -2
  32. package/src/tools/lazy-loader.js +7 -0
  33. package/src/tools/tinyfish.js +358 -0
  34. package/src/tools/truncate.js +1 -0
  35. package/.github/FUNDING.yml +0 -15
  36. package/.github/workflows/README.md +0 -215
  37. package/.github/workflows/ci.yml +0 -69
  38. package/.github/workflows/index.yml +0 -62
  39. package/.github/workflows/web-tools-tests.yml +0 -56
  40. package/CITATIONS.bib +0 -6
  41. package/CLAWROUTER_ROUTING_PLAN.md +0 -910
  42. package/DEPLOYMENT.md +0 -1001
  43. package/LYNKR-TUI-PLAN.md +0 -984
  44. package/PERFORMANCE-REPORT.md +0 -866
  45. package/PLAN-per-client-model-routing.md +0 -252
  46. package/ROUTER_COMPARISON.md +0 -173
  47. package/TIER_ROUTING_PLAN.md +0 -771
  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 -197
  52. package/docs/google5be250e608e6da39.html +0 -1
  53. package/docs/index.html +0 -577
  54. package/docs/index.md +0 -577
  55. package/docs/robots.txt +0 -4
  56. package/docs/sitemap.xml +0 -44
  57. package/docs/style.css +0 -1223
  58. package/documentation/README.md +0 -100
  59. package/documentation/api.md +0 -806
  60. package/documentation/claude-code-cli.md +0 -672
  61. package/documentation/codex-cli.md +0 -397
  62. package/documentation/contributing.md +0 -571
  63. package/documentation/cursor-integration.md +0 -731
  64. package/documentation/docker.md +0 -867
  65. package/documentation/embeddings.md +0 -760
  66. package/documentation/faq.md +0 -659
  67. package/documentation/features.md +0 -396
  68. package/documentation/headroom.md +0 -519
  69. package/documentation/installation.md +0 -706
  70. package/documentation/memory-system.md +0 -476
  71. package/documentation/production.md +0 -601
  72. package/documentation/providers.md +0 -906
  73. package/documentation/testing.md +0 -629
  74. package/documentation/token-optimization.md +0 -323
  75. package/documentation/tools.md +0 -697
  76. package/documentation/troubleshooting.md +0 -893
  77. package/final-test.js +0 -33
  78. package/headroom-sidecar/config.py +0 -93
  79. package/headroom-sidecar/requirements.txt +0 -14
  80. package/headroom-sidecar/server.py +0 -451
  81. package/monitor-agents.sh +0 -31
  82. package/scripts/audit-log-reader.js +0 -399
  83. package/scripts/compact-dictionary.js +0 -204
  84. package/scripts/test-deduplication.js +0 -448
  85. package/src/db/database.sqlite +0 -0
  86. package/test/README.md +0 -212
  87. package/test/azure-openai-config.test.js +0 -204
  88. package/test/azure-openai-error-resilience.test.js +0 -238
  89. package/test/azure-openai-format-conversion.test.js +0 -354
  90. package/test/azure-openai-integration.test.js +0 -281
  91. package/test/azure-openai-routing.test.js +0 -177
  92. package/test/azure-openai-streaming.test.js +0 -171
  93. package/test/bedrock-integration.test.js +0 -471
  94. package/test/comprehensive-test-suite.js +0 -928
  95. package/test/config-validation.test.js +0 -207
  96. package/test/cursor-integration.test.js +0 -484
  97. package/test/format-conversion.test.js +0 -578
  98. package/test/hybrid-routing-integration.test.js +0 -254
  99. package/test/hybrid-routing-performance.test.js +0 -418
  100. package/test/llamacpp-integration.test.js +0 -863
  101. package/test/lmstudio-integration.test.js +0 -335
  102. package/test/memory/extractor.test.js +0 -398
  103. package/test/memory/retriever.test.js +0 -613
  104. package/test/memory/retriever.test.js.bak +0 -585
  105. package/test/memory/search.test.js +0 -537
  106. package/test/memory/search.test.js.bak +0 -389
  107. package/test/memory/store.test.js +0 -344
  108. package/test/memory/store.test.js.bak +0 -312
  109. package/test/memory/surprise.test.js +0 -300
  110. package/test/memory-performance.test.js +0 -472
  111. package/test/openai-integration.test.js +0 -686
  112. package/test/openrouter-error-resilience.test.js +0 -418
  113. package/test/passthrough-mode.test.js +0 -385
  114. package/test/performance-benchmark.js +0 -351
  115. package/test/performance-tests.js +0 -528
  116. package/test/routing.test.js +0 -219
  117. package/test/web-tools.test.js +0 -329
  118. package/test-agents-simple.js +0 -43
  119. package/test-cli-connection.sh +0 -33
  120. package/test-learning-unit.js +0 -126
  121. package/test-learning.js +0 -112
  122. package/test-parallel-agents.sh +0 -124
  123. package/test-parallel-direct.js +0 -155
  124. package/test-subagents.sh +0 -117
@@ -1 +0,0 @@
1
- 42642f749da6234f41b6b425c3bb07c9
@@ -1,4 +0,0 @@
1
- <?xml version="1.0"?>
2
- <users>
3
- <user>124252D20CDCDAB4459245ACF3CFE165</user>
4
- </users>
@@ -1,478 +0,0 @@
1
- /* Documentation Theme - Matches Landing Page */
2
- @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');
3
-
4
- :root {
5
- --background: #09090b;
6
- --background-secondary: #0c0c0f;
7
- --background-tertiary: #111114;
8
- --card: rgba(17, 17, 20, 0.8);
9
- --foreground: #fafafa;
10
- --foreground-secondary: #a1a1aa;
11
- --foreground-muted: #71717a;
12
- --primary: #8b5cf6;
13
- --primary-hover: #a78bfa;
14
- --secondary: #6366f1;
15
- --accent: #3b82f6;
16
- --green: #22c55e;
17
- --orange: #f97316;
18
- --red: #ef4444;
19
- --border: rgba(255, 255, 255, 0.08);
20
- --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
21
- }
22
-
23
- * {
24
- margin: 0;
25
- padding: 0;
26
- box-sizing: border-box;
27
- }
28
-
29
- html {
30
- scroll-behavior: smooth;
31
- }
32
-
33
- body {
34
- font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
35
- background: var(--background);
36
- color: var(--foreground);
37
- line-height: 1.7;
38
- min-height: 100vh;
39
- }
40
-
41
- /* Navigation */
42
- .doc-nav {
43
- position: fixed;
44
- top: 0;
45
- left: 0;
46
- right: 0;
47
- z-index: 100;
48
- padding: 16px 24px;
49
- background: rgba(9, 9, 11, 0.85);
50
- backdrop-filter: blur(20px);
51
- border-bottom: 1px solid var(--border);
52
- display: flex;
53
- justify-content: space-between;
54
- align-items: center;
55
- }
56
-
57
- .doc-nav-left {
58
- display: flex;
59
- align-items: center;
60
- gap: 24px;
61
- }
62
-
63
- .doc-nav-logo {
64
- display: flex;
65
- align-items: center;
66
- gap: 10px;
67
- text-decoration: none;
68
- color: var(--foreground);
69
- font-weight: 700;
70
- font-size: 20px;
71
- }
72
-
73
- .doc-nav-logo-icon {
74
- width: 36px;
75
- height: 36px;
76
- background: var(--gradient-primary);
77
- border-radius: 8px;
78
- display: flex;
79
- align-items: center;
80
- justify-content: center;
81
- font-size: 18px;
82
- font-weight: 800;
83
- color: white;
84
- }
85
-
86
- .doc-nav-back {
87
- color: var(--foreground-secondary);
88
- text-decoration: none;
89
- font-size: 14px;
90
- display: flex;
91
- align-items: center;
92
- gap: 6px;
93
- transition: color 0.2s;
94
- }
95
-
96
- .doc-nav-back:hover {
97
- color: var(--foreground);
98
- }
99
-
100
- .doc-nav-links {
101
- display: flex;
102
- gap: 20px;
103
- }
104
-
105
- .doc-nav-links a {
106
- color: var(--foreground-secondary);
107
- text-decoration: none;
108
- font-size: 14px;
109
- font-weight: 500;
110
- transition: color 0.2s;
111
- }
112
-
113
- .doc-nav-links a:hover {
114
- color: var(--primary);
115
- }
116
-
117
- /* Layout */
118
- .doc-layout {
119
- display: flex;
120
- padding-top: 70px;
121
- min-height: 100vh;
122
- }
123
-
124
- /* Sidebar */
125
- .doc-sidebar {
126
- width: 280px;
127
- padding: 24px;
128
- border-right: 1px solid var(--border);
129
- position: fixed;
130
- top: 70px;
131
- bottom: 0;
132
- overflow-y: auto;
133
- background: var(--background);
134
- }
135
-
136
- .doc-sidebar-section {
137
- margin-bottom: 28px;
138
- }
139
-
140
- .doc-sidebar-title {
141
- font-size: 11px;
142
- font-weight: 700;
143
- text-transform: uppercase;
144
- letter-spacing: 1px;
145
- color: var(--foreground-muted);
146
- margin-bottom: 12px;
147
- }
148
-
149
- .doc-sidebar-links {
150
- list-style: none;
151
- }
152
-
153
- .doc-sidebar-links a {
154
- display: block;
155
- padding: 8px 12px;
156
- color: var(--foreground-secondary);
157
- text-decoration: none;
158
- font-size: 14px;
159
- border-radius: 6px;
160
- transition: all 0.15s;
161
- margin-bottom: 2px;
162
- }
163
-
164
- .doc-sidebar-links a:hover {
165
- color: var(--foreground);
166
- background: rgba(139, 92, 246, 0.1);
167
- }
168
-
169
- .doc-sidebar-links a.active {
170
- color: var(--primary);
171
- background: rgba(139, 92, 246, 0.15);
172
- font-weight: 500;
173
- }
174
-
175
- /* Main Content */
176
- .doc-content {
177
- flex: 1;
178
- margin-left: 280px;
179
- padding: 48px 64px;
180
- max-width: 900px;
181
- }
182
-
183
- /* Typography */
184
- .doc-content h1 {
185
- font-size: 36px;
186
- font-weight: 800;
187
- letter-spacing: -1px;
188
- margin-bottom: 16px;
189
- color: var(--foreground);
190
- line-height: 1.2;
191
- }
192
-
193
- .doc-content h2 {
194
- font-size: 26px;
195
- font-weight: 700;
196
- margin-top: 48px;
197
- margin-bottom: 16px;
198
- padding-bottom: 12px;
199
- border-bottom: 1px solid var(--border);
200
- color: var(--foreground);
201
- }
202
-
203
- .doc-content h3 {
204
- font-size: 20px;
205
- font-weight: 600;
206
- margin-top: 32px;
207
- margin-bottom: 12px;
208
- color: var(--foreground);
209
- }
210
-
211
- .doc-content h4 {
212
- font-size: 16px;
213
- font-weight: 600;
214
- margin-top: 24px;
215
- margin-bottom: 8px;
216
- color: var(--foreground);
217
- }
218
-
219
- .doc-content p {
220
- margin-bottom: 16px;
221
- color: var(--foreground-secondary);
222
- }
223
-
224
- .doc-content a {
225
- color: var(--primary);
226
- text-decoration: none;
227
- transition: color 0.15s;
228
- }
229
-
230
- .doc-content a:hover {
231
- color: var(--primary-hover);
232
- text-decoration: underline;
233
- }
234
-
235
- .doc-content strong {
236
- color: var(--foreground);
237
- font-weight: 600;
238
- }
239
-
240
- .doc-content em {
241
- color: var(--foreground-secondary);
242
- font-style: italic;
243
- }
244
-
245
- /* Lists */
246
- .doc-content ul,
247
- .doc-content ol {
248
- margin-bottom: 16px;
249
- padding-left: 24px;
250
- color: var(--foreground-secondary);
251
- }
252
-
253
- .doc-content li {
254
- margin-bottom: 8px;
255
- }
256
-
257
- .doc-content li::marker {
258
- color: var(--primary);
259
- }
260
-
261
- /* Code */
262
- .doc-content code {
263
- font-family: 'JetBrains Mono', monospace;
264
- font-size: 0.9em;
265
- background: var(--background-tertiary);
266
- padding: 2px 6px;
267
- border-radius: 4px;
268
- color: var(--primary);
269
- }
270
-
271
- .doc-content pre {
272
- background: var(--background-secondary);
273
- border: 1px solid var(--border);
274
- border-radius: 12px;
275
- padding: 20px;
276
- overflow-x: auto;
277
- margin: 20px 0;
278
- }
279
-
280
- .doc-content pre code {
281
- background: none;
282
- padding: 0;
283
- color: var(--foreground);
284
- font-size: 14px;
285
- line-height: 1.6;
286
- }
287
-
288
- /* Tables */
289
- .doc-content table {
290
- width: 100%;
291
- border-collapse: collapse;
292
- margin: 24px 0;
293
- font-size: 14px;
294
- }
295
-
296
- .doc-content th {
297
- background: var(--background-tertiary);
298
- padding: 12px 16px;
299
- text-align: left;
300
- font-weight: 600;
301
- color: var(--foreground);
302
- border: 1px solid var(--border);
303
- }
304
-
305
- .doc-content td {
306
- padding: 12px 16px;
307
- border: 1px solid var(--border);
308
- color: var(--foreground-secondary);
309
- }
310
-
311
- .doc-content tr:hover td {
312
- background: rgba(139, 92, 246, 0.05);
313
- }
314
-
315
- /* Blockquotes */
316
- .doc-content blockquote {
317
- border-left: 4px solid var(--primary);
318
- padding: 16px 20px;
319
- margin: 20px 0;
320
- background: rgba(139, 92, 246, 0.08);
321
- border-radius: 0 8px 8px 0;
322
- }
323
-
324
- .doc-content blockquote p {
325
- margin: 0;
326
- color: var(--foreground-secondary);
327
- }
328
-
329
- /* Horizontal Rule */
330
- .doc-content hr {
331
- border: none;
332
- height: 1px;
333
- background: var(--border);
334
- margin: 40px 0;
335
- }
336
-
337
- /* Images */
338
- .doc-content img {
339
- max-width: 100%;
340
- border-radius: 8px;
341
- margin: 20px 0;
342
- }
343
-
344
- /* Alerts/Callouts */
345
- .doc-alert {
346
- padding: 16px 20px;
347
- border-radius: 8px;
348
- margin: 20px 0;
349
- display: flex;
350
- gap: 12px;
351
- align-items: flex-start;
352
- }
353
-
354
- .doc-alert-info {
355
- background: rgba(59, 130, 246, 0.1);
356
- border: 1px solid rgba(59, 130, 246, 0.2);
357
- }
358
-
359
- .doc-alert-warning {
360
- background: rgba(249, 115, 22, 0.1);
361
- border: 1px solid rgba(249, 115, 22, 0.2);
362
- }
363
-
364
- .doc-alert-success {
365
- background: rgba(34, 197, 94, 0.1);
366
- border: 1px solid rgba(34, 197, 94, 0.2);
367
- }
368
-
369
- /* Loading */
370
- .doc-loading {
371
- display: flex;
372
- justify-content: center;
373
- align-items: center;
374
- min-height: 400px;
375
- color: var(--foreground-muted);
376
- }
377
-
378
- /* Footer */
379
- .doc-footer {
380
- margin-top: 64px;
381
- padding-top: 32px;
382
- border-top: 1px solid var(--border);
383
- display: flex;
384
- justify-content: space-between;
385
- align-items: center;
386
- }
387
-
388
- .doc-footer-nav {
389
- display: flex;
390
- gap: 24px;
391
- }
392
-
393
- .doc-footer-nav a {
394
- color: var(--foreground-secondary);
395
- text-decoration: none;
396
- font-size: 14px;
397
- display: flex;
398
- align-items: center;
399
- gap: 8px;
400
- padding: 12px 20px;
401
- background: var(--card);
402
- border-radius: 8px;
403
- border: 1px solid var(--border);
404
- transition: all 0.2s;
405
- }
406
-
407
- .doc-footer-nav a:hover {
408
- border-color: var(--primary);
409
- color: var(--foreground);
410
- }
411
-
412
- .doc-edit-link {
413
- color: var(--foreground-muted);
414
- text-decoration: none;
415
- font-size: 13px;
416
- display: flex;
417
- align-items: center;
418
- gap: 6px;
419
- }
420
-
421
- .doc-edit-link:hover {
422
- color: var(--primary);
423
- }
424
-
425
- /* Responsive */
426
- @media (max-width: 1024px) {
427
- .doc-sidebar {
428
- display: none;
429
- }
430
-
431
- .doc-content {
432
- margin-left: 0;
433
- padding: 32px 24px;
434
- }
435
- }
436
-
437
- @media (max-width: 768px) {
438
- .doc-nav-links {
439
- display: none;
440
- }
441
-
442
- .doc-content h1 {
443
- font-size: 28px;
444
- }
445
-
446
- .doc-content h2 {
447
- font-size: 22px;
448
- }
449
-
450
- .doc-footer {
451
- flex-direction: column;
452
- gap: 16px;
453
- }
454
- }
455
-
456
- /* Scrollbar */
457
- ::-webkit-scrollbar {
458
- width: 8px;
459
- height: 8px;
460
- }
461
-
462
- ::-webkit-scrollbar-track {
463
- background: var(--background);
464
- }
465
-
466
- ::-webkit-scrollbar-thumb {
467
- background: var(--foreground-muted);
468
- border-radius: 4px;
469
- }
470
-
471
- ::-webkit-scrollbar-thumb:hover {
472
- background: var(--foreground-secondary);
473
- }
474
-
475
- /* Selection */
476
- ::selection {
477
- background: rgba(139, 92, 246, 0.3);
478
- }
package/docs/docs.html DELETED
@@ -1,197 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Documentation - Lynkr</title>
7
- <meta name="description" content="Lynkr documentation - Installation, configuration, and guides for the universal LLM proxy.">
8
- <link rel="stylesheet" href="docs-style.css">
9
- <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' rx='20' fill='%238b5cf6'/><text x='50' y='70' font-size='60' font-weight='bold' text-anchor='middle' fill='white'>L</text></svg>">
10
- <!-- Marked.js for Markdown rendering -->
11
- <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
12
- </head>
13
- <body>
14
-
15
- <!-- Navigation -->
16
- <nav class="doc-nav">
17
- <div class="doc-nav-left">
18
- <a href="index.html" class="doc-nav-logo">
19
- <div class="doc-nav-logo-icon">L</div>
20
- <span>Lynkr</span>
21
- </a>
22
- <a href="index.html" class="doc-nav-back">
23
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
24
- <path d="M19 12H5M12 19l-7-7 7-7"/>
25
- </svg>
26
- Back to Home
27
- </a>
28
- </div>
29
- <div class="doc-nav-links">
30
- <a href="https://github.com/vishalveerareddy123/Lynkr">GitHub</a>
31
- <a href="https://www.npmjs.com/package/lynkr">NPM</a>
32
- <a href="https://deepwiki.com/vishalveerareddy123/Lynkr">DeepWiki</a>
33
- </div>
34
- </nav>
35
-
36
- <!-- Layout -->
37
- <div class="doc-layout">
38
- <!-- Sidebar -->
39
- <aside class="doc-sidebar">
40
- <div class="doc-sidebar-section">
41
- <div class="doc-sidebar-title">Getting Started</div>
42
- <ul class="doc-sidebar-links">
43
- <li><a href="?doc=installation" data-doc="installation">Installation</a></li>
44
- <li><a href="?doc=providers" data-doc="providers">Provider Configuration</a></li>
45
- <li><a href="?doc=claude-code-cli" data-doc="claude-code-cli">Claude Code CLI</a></li>
46
- <li><a href="?doc=cursor-integration" data-doc="cursor-integration">Cursor Integration</a></li>
47
- </ul>
48
- </div>
49
-
50
- <div class="doc-sidebar-section">
51
- <div class="doc-sidebar-title">Features</div>
52
- <ul class="doc-sidebar-links">
53
- <li><a href="?doc=features" data-doc="features">Core Features</a></li>
54
- <li><a href="?doc=token-optimization" data-doc="token-optimization">Token Optimization</a></li>
55
- <li><a href="?doc=memory-system" data-doc="memory-system">Memory System</a></li>
56
- <li><a href="?doc=headroom" data-doc="headroom">Headroom Compression</a></li>
57
- <li><a href="?doc=embeddings" data-doc="embeddings">Embeddings</a></li>
58
- <li><a href="?doc=tools" data-doc="tools">Tools & MCP</a></li>
59
- </ul>
60
- </div>
61
-
62
- <div class="doc-sidebar-section">
63
- <div class="doc-sidebar-title">Deployment</div>
64
- <ul class="doc-sidebar-links">
65
- <li><a href="?doc=docker" data-doc="docker">Docker</a></li>
66
- <li><a href="?doc=production" data-doc="production">Production Guide</a></li>
67
- <li><a href="?doc=api" data-doc="api">API Reference</a></li>
68
- </ul>
69
- </div>
70
-
71
- <div class="doc-sidebar-section">
72
- <div class="doc-sidebar-title">Help</div>
73
- <ul class="doc-sidebar-links">
74
- <li><a href="?doc=troubleshooting" data-doc="troubleshooting">Troubleshooting</a></li>
75
- <li><a href="?doc=faq" data-doc="faq">FAQ</a></li>
76
- <li><a href="?doc=contributing" data-doc="contributing">Contributing</a></li>
77
- <li><a href="?doc=testing" data-doc="testing">Testing</a></li>
78
- </ul>
79
- </div>
80
- </aside>
81
-
82
- <!-- Main Content -->
83
- <main class="doc-content" id="doc-content">
84
- <div class="doc-loading">Loading documentation...</div>
85
- </main>
86
- </div>
87
-
88
- <script>
89
- // Documentation loader
90
- const docContent = document.getElementById('doc-content');
91
- const sidebarLinks = document.querySelectorAll('.doc-sidebar-links a');
92
-
93
- // Get doc from URL parameter
94
- function getDocFromURL() {
95
- const params = new URLSearchParams(window.location.search);
96
- return params.get('doc') || 'installation';
97
- }
98
-
99
- // Load markdown file
100
- async function loadDoc(docName) {
101
- docContent.innerHTML = '<div class="doc-loading">Loading...</div>';
102
-
103
- try {
104
- // Try to fetch from documentation folder on GitHub raw
105
- const response = await fetch(`https://raw.githubusercontent.com/vishalveerareddy123/Lynkr/main/documentation/${docName}.md`);
106
-
107
- if (!response.ok) {
108
- throw new Error('Document not found');
109
- }
110
-
111
- const markdown = await response.text();
112
-
113
- // Configure marked
114
- marked.setOptions({
115
- gfm: true,
116
- breaks: true,
117
- highlight: function(code, lang) {
118
- return code;
119
- }
120
- });
121
-
122
- // Render markdown
123
- const html = marked.parse(markdown);
124
-
125
- // Add content with footer
126
- docContent.innerHTML = `
127
- ${html}
128
- <div class="doc-footer">
129
- <div class="doc-footer-nav">
130
- <!-- Navigation buttons could be added here -->
131
- </div>
132
- <a href="https://github.com/vishalveerareddy123/Lynkr/edit/main/documentation/${docName}.md" class="doc-edit-link" target="_blank">
133
- <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
134
- <path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/>
135
- <path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/>
136
- </svg>
137
- Edit this page on GitHub
138
- </a>
139
- </div>
140
- `;
141
-
142
- // Update page title
143
- const h1 = docContent.querySelector('h1');
144
- if (h1) {
145
- document.title = `${h1.textContent} - Lynkr Docs`;
146
- }
147
-
148
- // Update active sidebar link
149
- sidebarLinks.forEach(link => {
150
- link.classList.remove('active');
151
- if (link.dataset.doc === docName) {
152
- link.classList.add('active');
153
- }
154
- });
155
-
156
- } catch (error) {
157
- docContent.innerHTML = `
158
- <h1>Documentation</h1>
159
- <p>Welcome to the Lynkr documentation. Select a topic from the sidebar to get started.</p>
160
- <h2>Quick Links</h2>
161
- <ul>
162
- <li><a href="?doc=installation">Installation Guide</a></li>
163
- <li><a href="?doc=providers">Provider Configuration</a></li>
164
- <li><a href="?doc=claude-code-cli">Claude Code CLI Setup</a></li>
165
- <li><a href="?doc=cursor-integration">Cursor IDE Integration</a></li>
166
- </ul>
167
- <h2>Need Help?</h2>
168
- <ul>
169
- <li><a href="?doc=troubleshooting">Troubleshooting Guide</a></li>
170
- <li><a href="?doc=faq">Frequently Asked Questions</a></li>
171
- <li><a href="https://github.com/vishalveerareddy123/Lynkr/discussions">GitHub Discussions</a></li>
172
- </ul>
173
- `;
174
- }
175
- }
176
-
177
- // Handle sidebar clicks
178
- sidebarLinks.forEach(link => {
179
- link.addEventListener('click', (e) => {
180
- e.preventDefault();
181
- const docName = link.dataset.doc;
182
- history.pushState({}, '', `?doc=${docName}`);
183
- loadDoc(docName);
184
- });
185
- });
186
-
187
- // Handle browser back/forward
188
- window.addEventListener('popstate', () => {
189
- loadDoc(getDocFromURL());
190
- });
191
-
192
- // Initial load
193
- loadDoc(getDocFromURL());
194
- </script>
195
-
196
- </body>
197
- </html>
@@ -1 +0,0 @@
1
- google-site-verification: google5be250e608e6da39.html