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
@@ -1,215 +0,0 @@
1
- # GitHub Actions Workflows
2
-
3
- This directory contains GitHub Actions workflows for automated testing and CI/CD.
4
-
5
- ## Available Workflows
6
-
7
- ### 1. CI Tests (`ci.yml`)
8
-
9
- **Purpose:** Run comprehensive test suite on every push and pull request
10
-
11
- **Triggers:**
12
- - Push to `main` or `develop` branches
13
- - Pull requests to `main` or `develop` branches
14
-
15
- **What it does:**
16
- - Tests on Node.js 20.x and 22.x
17
- - Runs linter (`npm run lint`)
18
- - Runs unit tests (`npm run test:unit`)
19
- - Runs performance tests (`npm run test:performance`)
20
- - Uses npm cache for faster builds
21
-
22
- **Environment Variables:**
23
- - `DATABRICKS_API_KEY=test-key` (mock value for tests)
24
- - `DATABRICKS_API_BASE=http://test.com` (mock value for tests)
25
-
26
- **Status:** Runs on every push/PR, fails if unit tests fail
27
-
28
- ---
29
-
30
- ### 2. Web Tools Tests (`web-tools-tests.yml`)
31
-
32
- **Purpose:** Run web search tool tests when related files change
33
-
34
- **Triggers:**
35
- - Changes to web tools source files:
36
- - `src/tools/web.js`
37
- - `src/tools/web-client.js`
38
- - `src/clients/retry.js`
39
- - `src/config/index.js`
40
- - `test/web-tools.test.js`
41
-
42
- **What it does:**
43
- - Runs only the web tools test suite
44
- - Generates test summary in GitHub Actions UI
45
- - Faster feedback for web tools changes
46
-
47
- **Test Coverage:**
48
- - HTML extraction (9 tests)
49
- - HTTP keep-alive agent (2 tests)
50
- - Retry logic with exponential backoff (2 tests)
51
- - Configuration management (3 tests)
52
- - Error handling (1 test)
53
- - Performance validation (1 test)
54
- - Body preview configuration (1 test)
55
-
56
- **Total:** 19 tests
57
-
58
- ---
59
-
60
- ### 3. NPM Publish (`npm-publish.yml`)
61
-
62
- **Purpose:** Automatically publish package to npm registry
63
-
64
- **Triggers:**
65
- - Git tags starting with `v` (e.g., `v0.1.5`)
66
- - GitHub Releases created
67
-
68
- **What it does:**
69
- - Runs full test suite before publishing
70
- - Checks if version already exists on npm
71
- - Publishes package to npm registry (if tests pass)
72
- - Prevents duplicate publishes
73
- - Creates publish summary
74
-
75
- **Requirements:**
76
- - `NPM_TOKEN` secret must be configured
77
- - Tests must pass
78
- - Version must be new
79
-
80
- **Status:** Only publishes on successful builds
81
-
82
- ---
83
-
84
- ### 4. Version Bump (`version-bump.yml`)
85
-
86
- **Purpose:** Manual workflow to bump version and create releases
87
-
88
- **Triggers:**
89
- - Manual workflow dispatch (button in Actions tab)
90
-
91
- **What it does:**
92
- - Prompts for version type (patch/minor/major)
93
- - Runs tests before version bump
94
- - Updates package.json version
95
- - Creates git commit and tag
96
- - Pushes changes to repository
97
- - Creates GitHub Release with changelog
98
- - Triggers npm-publish workflow automatically
99
-
100
- **Options:**
101
- - `patch` - Bug fixes (0.1.4 → 0.1.5)
102
- - `minor` - New features (0.1.4 → 0.2.0)
103
- - `major` - Breaking changes (0.1.4 → 1.0.0)
104
-
105
- ---
106
-
107
- ### 5. IndexNow Notification (`index.yml`)
108
-
109
- **Purpose:** Notify search engines when documentation is updated
110
-
111
- **Triggers:**
112
- - Push to `main` branch
113
- - Changes in `docs/**` directory
114
-
115
- **What it does:**
116
- - Notifies Bing IndexNow about updated documentation
117
- - Helps with SEO and documentation discoverability
118
-
119
- ---
120
-
121
- ## Adding Status Badges
122
-
123
- Add these badges to your README.md:
124
-
125
- ```markdown
126
- ![CI Tests](https://github.com/vishalveerareddy123/Lynkr/actions/workflows/ci.yml/badge.svg)
127
- ![Web Tools Tests](https://github.com/vishalveerareddy123/Lynkr/actions/workflows/web-tools-tests.yml/badge.svg)
128
- ![npm version](https://img.shields.io/npm/v/lynkr.svg)
129
- ![npm downloads](https://img.shields.io/npm/dt/lynkr.svg)
130
- ```
131
-
132
- ## Running Tests Locally
133
-
134
- Before pushing, run tests locally:
135
-
136
- ```bash
137
- # Run all unit tests
138
- npm run test:unit
139
-
140
- # Run only web tools tests
141
- DATABRICKS_API_KEY=test-key DATABRICKS_API_BASE=http://test.com \
142
- node --test test/web-tools.test.js
143
-
144
- # Run quick tests (routing only)
145
- npm run test:quick
146
-
147
- # Run all tests including performance
148
- npm test
149
- ```
150
-
151
- ## Workflow Configuration
152
-
153
- ### Required Secrets
154
-
155
- **For npm publishing workflows:**
156
- - `NPM_TOKEN` - Your npm automation token (required to publish)
157
- - Get from: https://www.npmjs.com/settings/YOUR_USERNAME/tokens
158
- - Type: "Automation" token
159
- - Add to: Settings → Secrets → Actions → New repository secret
160
-
161
- **For test workflows:**
162
- - No secrets required (uses mock credentials)
163
-
164
- **For IndexNow workflow:**
165
- - `INDEX_NOW` - Your IndexNow API key (optional, only for docs)
166
-
167
- ### Matrix Strategy
168
-
169
- The CI workflow uses a matrix strategy to test on multiple Node.js versions:
170
- - Node.js 20.x (LTS)
171
- - Node.js 22.x (Current)
172
-
173
- This ensures compatibility across different Node versions.
174
-
175
- ## Troubleshooting
176
-
177
- ### Tests fail locally but pass in CI
178
- - Check Node.js version (`node --version`)
179
- - Ensure `npm ci` is used (not `npm install`)
180
- - Check for platform-specific issues (macOS vs Linux)
181
-
182
- ### Tests pass locally but fail in CI
183
- - Environment variables might be missing
184
- - Dependencies might need updating
185
- - Check GitHub Actions logs for details
186
-
187
- ### Workflow doesn't trigger
188
- - Verify file paths in `on.push.paths`
189
- - Check branch names match
190
- - Ensure workflow file is in `.github/workflows/`
191
-
192
- ## Modifying Workflows
193
-
194
- When making changes:
195
-
196
- 1. Test YAML syntax (use a YAML validator)
197
- 2. Test locally first with same commands
198
- 3. Create a PR to test in CI before merging
199
- 4. Check GitHub Actions tab for results
200
-
201
- ## Performance Considerations
202
-
203
- - **npm cache:** Workflows cache `node_modules` for faster builds
204
- - **Parallel jobs:** Tests run on multiple Node versions in parallel
205
- - **Path filtering:** Web tools workflow only runs when relevant files change
206
- - **continue-on-error:** Performance tests won't fail the build
207
-
208
- ## Future Improvements
209
-
210
- Potential additions:
211
- - Code coverage reporting
212
- - Docker container testing
213
- - E2E integration tests
214
- - Deploy previews for PRs
215
- - Automated dependency updates (Dependabot)
@@ -1,69 +0,0 @@
1
- name: CI Tests
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- - develop
8
- pull_request:
9
- branches:
10
- - main
11
- - develop
12
-
13
- jobs:
14
- test:
15
- name: Run Tests
16
- runs-on: ubuntu-latest
17
-
18
- strategy:
19
- matrix:
20
- node-version: [20.x, 22.x, 23.x, 24.x]
21
-
22
- steps:
23
- - name: Checkout code
24
- uses: actions/checkout@v4
25
-
26
- - name: Setup Node.js ${{ matrix.node-version }}
27
- uses: actions/setup-node@v4
28
- with:
29
- node-version: ${{ matrix.node-version }}
30
- cache: 'npm'
31
-
32
- - name: Install dependencies (C++20 for native addons)
33
- env:
34
- CXXFLAGS: "-std=gnu++20"
35
- npm_config_build_from_source: true
36
- run: npm ci
37
-
38
- - name: Run linter
39
- run: npm run lint
40
- continue-on-error: true
41
-
42
- - name: Run unit tests
43
- run: npm run test:unit
44
- env:
45
- DATABRICKS_API_KEY: test-key
46
- DATABRICKS_API_BASE: http://test.com
47
-
48
- - name: Run performance tests
49
- run: npm run test:performance
50
- env:
51
- DATABRICKS_API_KEY: test-key
52
- DATABRICKS_API_BASE: http://test.com
53
- continue-on-error: true
54
-
55
- test-summary:
56
- name: Test Summary
57
- runs-on: ubuntu-latest
58
- needs: test
59
- if: always()
60
-
61
- steps:
62
- - name: Check test results
63
- run: |
64
- echo "Tests completed"
65
- if [ "${{ needs.test.result }}" == "failure" ]; then
66
- echo "Tests failed!"
67
- exit 1
68
- fi
69
- echo "All tests passed!"
@@ -1,62 +0,0 @@
1
- name: Notify IndexNow on Docs Update
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- paths:
8
- - 'docs/**'
9
-
10
- jobs:
11
- notify-indexnow:
12
- runs-on: ubuntu-latest
13
-
14
- steps:
15
- - name: Checkout repository
16
- uses: actions/checkout@v4
17
-
18
- - name: Notify IndexNow
19
- env:
20
- INDEXNOW_KEY: ${{ secrets.INDEX_NOW }}
21
- run: |
22
- echo "Notifying IndexNow about updated docs..."
23
-
24
- # Host
25
- HOST="vishalveerareddy123.github.io"
26
-
27
- # Secret key pulled from GitHub
28
- KEY="$INDEXNOW_KEY"
29
-
30
- # Public key location URL
31
- KEY_LOCATION="https://$HOST/Lynkr/${KEY}.txt"
32
-
33
- # Prepare JSON payload
34
- URLS_JSON=$(cat <<EOF
35
- {
36
- "host": "$HOST",
37
- "key": "$KEY",
38
- "keyLocation": "$KEY_LOCATION",
39
- "urlList": [
40
- "https://$HOST/Lynkr/",
41
- "https://$HOST/Lynkr/sitemap.xml"
42
- ]
43
- }
44
- EOF
45
- )
46
-
47
- echo "Payload:"
48
- echo "$URLS_JSON"
49
-
50
- HTTP_CODE=$(curl -s -o /tmp/indexnow_response.txt -w "%{http_code}" \
51
- -X POST "https://www.bing.com/indexnow" \
52
- -H "Content-Type: application/json; charset=utf-8" \
53
- -d "$URLS_JSON")
54
-
55
- echo "IndexNow response HTTP code: $HTTP_CODE"
56
- echo "IndexNow response body:"
57
- cat /tmp/indexnow_response.txt
58
-
59
- if [ "$HTTP_CODE" -ge 400 ]; then
60
- echo "IndexNow request failed"
61
- exit 1
62
- fi
@@ -1,56 +0,0 @@
1
- name: Web Tools Tests
2
-
3
- on:
4
- push:
5
- paths:
6
- - 'src/tools/web.js'
7
- - 'src/tools/web-client.js'
8
- - 'src/clients/retry.js'
9
- - 'src/config/index.js'
10
- - 'test/web-tools.test.js'
11
- - '.github/workflows/web-tools-tests.yml'
12
- pull_request:
13
- paths:
14
- - 'src/tools/web.js'
15
- - 'src/tools/web-client.js'
16
- - 'src/clients/retry.js'
17
- - 'src/config/index.js'
18
- - 'test/web-tools.test.js'
19
-
20
- jobs:
21
- web-tools-test:
22
- name: Web Tools Test Suite
23
- runs-on: ubuntu-latest
24
-
25
- steps:
26
- - name: Checkout code
27
- uses: actions/checkout@v4
28
-
29
- - name: Setup Node.js
30
- uses: actions/setup-node@v4
31
- with:
32
- node-version: '20.x'
33
- cache: 'npm'
34
-
35
- - name: Install dependencies
36
- run: npm ci
37
-
38
- - name: Run web tools tests
39
- run: |
40
- DATABRICKS_API_KEY=test-key DATABRICKS_API_BASE=http://test.com \
41
- node --test test/web-tools.test.js
42
-
43
- - name: Test results summary
44
- if: always()
45
- run: |
46
- echo "## Web Tools Test Results" >> $GITHUB_STEP_SUMMARY
47
- echo "✅ All web tools tests passed!" >> $GITHUB_STEP_SUMMARY
48
- echo "" >> $GITHUB_STEP_SUMMARY
49
- echo "### Coverage:" >> $GITHUB_STEP_SUMMARY
50
- echo "- HTML extraction (9 tests)" >> $GITHUB_STEP_SUMMARY
51
- echo "- HTTP keep-alive agent (2 tests)" >> $GITHUB_STEP_SUMMARY
52
- echo "- Retry logic with exponential backoff (2 tests)" >> $GITHUB_STEP_SUMMARY
53
- echo "- Configuration management (3 tests)" >> $GITHUB_STEP_SUMMARY
54
- echo "- Error handling (1 test)" >> $GITHUB_STEP_SUMMARY
55
- echo "- Performance validation (1 test)" >> $GITHUB_STEP_SUMMARY
56
- echo "- Body preview configuration (1 test)" >> $GITHUB_STEP_SUMMARY
package/CITATIONS.bib DELETED
@@ -1,6 +0,0 @@
1
- @article{zhang2024ace,
2
- title={Agentic Context Engineering},
3
- author={Zhang et al.},
4
- journal={arXiv:2510.04618},
5
- year={2024}
6
- }