bluera-knowledge 0.9.21

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 (652) hide show
  1. package/.claude/commands/commit.md +37 -0
  2. package/.claude/hooks/post-edit-check.sh +41 -0
  3. package/.claude/settings.local.json.example +40 -0
  4. package/.claude/skills/atomic-commits/SKILL.md +53 -0
  5. package/.claude-plugin/plugin.json +13 -0
  6. package/.editorconfig +15 -0
  7. package/.github/workflows/auto-release.yml +59 -0
  8. package/.github/workflows/ci.yml +142 -0
  9. package/.github/workflows/release.yml +66 -0
  10. package/.github/workflows/update-marketplace.yml +96 -0
  11. package/.husky/pre-commit +47 -0
  12. package/.husky/pre-push +29 -0
  13. package/.versionrc.json +28 -0
  14. package/CHANGELOG.md +410 -0
  15. package/CLAUDE.md +109 -0
  16. package/LICENSE +21 -0
  17. package/NOTICE +47 -0
  18. package/README.md +1546 -0
  19. package/SECURITY.md +65 -0
  20. package/bun.lock +1758 -0
  21. package/commands/add-folder.md +48 -0
  22. package/commands/add-repo.md +50 -0
  23. package/commands/cancel.md +63 -0
  24. package/commands/check-status.md +78 -0
  25. package/commands/crawl.md +51 -0
  26. package/commands/index.md +48 -0
  27. package/commands/remove-store.md +52 -0
  28. package/commands/search.md +79 -0
  29. package/commands/search.sh +63 -0
  30. package/commands/stores.md +54 -0
  31. package/commands/suggest.md +82 -0
  32. package/dist/chunk-5QMHZUC4.js +3617 -0
  33. package/dist/chunk-5QMHZUC4.js.map +1 -0
  34. package/dist/chunk-BICFAWMN.js +656 -0
  35. package/dist/chunk-BICFAWMN.js.map +1 -0
  36. package/dist/chunk-J7J6LXOJ.js +958 -0
  37. package/dist/chunk-J7J6LXOJ.js.map +1 -0
  38. package/dist/chunk-L2YVNC63.js +59 -0
  39. package/dist/chunk-L2YVNC63.js.map +1 -0
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.js +1429 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/mcp/server.d.ts +15 -0
  44. package/dist/mcp/server.js +11 -0
  45. package/dist/mcp/server.js.map +1 -0
  46. package/dist/watch.service-YAIKKDCF.js +7 -0
  47. package/dist/watch.service-YAIKKDCF.js.map +1 -0
  48. package/dist/workers/background-worker-cli.d.ts +1 -0
  49. package/dist/workers/background-worker-cli.js +310 -0
  50. package/dist/workers/background-worker-cli.js.map +1 -0
  51. package/docs/plans/2024-12-17-ai-search-quality-implementation.md +752 -0
  52. package/docs/plans/2024-12-17-ai-search-quality-testing-design.md +201 -0
  53. package/docs/plans/2025-12-16-bluera-knowledge-cli.md +2951 -0
  54. package/docs/plans/2025-12-16-phase2-features.md +1518 -0
  55. package/docs/plans/2025-12-17-hil-implementation.md +926 -0
  56. package/docs/plans/2025-12-17-hil-quality-testing.md +224 -0
  57. package/docs/plans/2025-12-17-search-quality-phase1-implementation.md +1416 -0
  58. package/docs/plans/2025-12-17-search-quality-testing-v2-design.md +212 -0
  59. package/docs/plans/2025-12-28-ai-agent-optimization.md +1630 -0
  60. package/eslint-rules/require-skip-comment.js +81 -0
  61. package/eslint.config.js +61 -0
  62. package/hooks/check-dependencies.sh +110 -0
  63. package/hooks/format-search-results.py +132 -0
  64. package/hooks/hooks.json +27 -0
  65. package/hooks/job-status-hook.sh +51 -0
  66. package/knip.json +43 -0
  67. package/mcp.plugin.json +12 -0
  68. package/package.json +103 -0
  69. package/python/crawl_worker.py +275 -0
  70. package/python/requirements.txt +2 -0
  71. package/scripts/readme-version-updater.cjs +18 -0
  72. package/skills/advanced-workflows/SKILL.md +273 -0
  73. package/skills/atomic-commits/SKILL.md +77 -0
  74. package/skills/knowledge-search/SKILL.md +54 -0
  75. package/skills/search-optimization/SKILL.md +396 -0
  76. package/skills/store-lifecycle/SKILL.md +470 -0
  77. package/skills/when-to-query/SKILL.md +66 -0
  78. package/src/analysis/ast-parser.test.ts +423 -0
  79. package/src/analysis/ast-parser.ts +192 -0
  80. package/src/analysis/code-graph.test.ts +698 -0
  81. package/src/analysis/code-graph.ts +245 -0
  82. package/src/analysis/dependency-usage-analyzer.test.ts +799 -0
  83. package/src/analysis/dependency-usage-analyzer.ts +405 -0
  84. package/src/analysis/go-ast-parser.test.ts +531 -0
  85. package/src/analysis/go-ast-parser.ts +478 -0
  86. package/src/analysis/parser-factory.test.ts +132 -0
  87. package/src/analysis/parser-factory.ts +44 -0
  88. package/src/analysis/python-ast-parser.test.ts +210 -0
  89. package/src/analysis/python-ast-parser.ts +34 -0
  90. package/src/analysis/repo-url-resolver.test.ts +533 -0
  91. package/src/analysis/repo-url-resolver.ts +233 -0
  92. package/src/analysis/rust-ast-parser.test.ts +568 -0
  93. package/src/analysis/rust-ast-parser.ts +477 -0
  94. package/src/analysis/tree-sitter-parser.test.ts +297 -0
  95. package/src/analysis/tree-sitter-parser.ts +223 -0
  96. package/src/cli/commands/crawl.test.ts +942 -0
  97. package/src/cli/commands/crawl.ts +141 -0
  98. package/src/cli/commands/index-cmd.test.ts +722 -0
  99. package/src/cli/commands/index-cmd.ts +105 -0
  100. package/src/cli/commands/mcp.test.ts +218 -0
  101. package/src/cli/commands/mcp.ts +18 -0
  102. package/src/cli/commands/plugin-api.test.ts +313 -0
  103. package/src/cli/commands/plugin-api.ts +45 -0
  104. package/src/cli/commands/search.test.ts +911 -0
  105. package/src/cli/commands/search.ts +113 -0
  106. package/src/cli/commands/serve.test.ts +329 -0
  107. package/src/cli/commands/serve.ts +28 -0
  108. package/src/cli/commands/setup.test.ts +820 -0
  109. package/src/cli/commands/setup.ts +153 -0
  110. package/src/cli/commands/store.test.ts +1003 -0
  111. package/src/cli/commands/store.ts +167 -0
  112. package/src/cli/index.ts +7 -0
  113. package/src/cli/program.ts +59 -0
  114. package/src/crawl/article-converter.test.ts +604 -0
  115. package/src/crawl/article-converter.ts +98 -0
  116. package/src/crawl/bridge.test.ts +674 -0
  117. package/src/crawl/bridge.ts +236 -0
  118. package/src/crawl/claude-client.test.ts +663 -0
  119. package/src/crawl/claude-client.ts +234 -0
  120. package/src/crawl/intelligent-crawler.test.ts +931 -0
  121. package/src/crawl/intelligent-crawler.ts +428 -0
  122. package/src/crawl/markdown-utils.test.ts +703 -0
  123. package/src/crawl/markdown-utils.ts +228 -0
  124. package/src/crawl/schemas.ts +114 -0
  125. package/src/db/embeddings.test.ts +63 -0
  126. package/src/db/embeddings.ts +69 -0
  127. package/src/db/index.ts +2 -0
  128. package/src/db/lance.test.ts +390 -0
  129. package/src/db/lance.ts +164 -0
  130. package/src/defaults/repos.ts +67 -0
  131. package/src/index.ts +107 -0
  132. package/src/mcp/cache.test.ts +202 -0
  133. package/src/mcp/cache.ts +103 -0
  134. package/src/mcp/commands/index.ts +20 -0
  135. package/src/mcp/commands/job.commands.ts +54 -0
  136. package/src/mcp/commands/meta.commands.ts +54 -0
  137. package/src/mcp/commands/registry.ts +183 -0
  138. package/src/mcp/commands/store.commands.ts +75 -0
  139. package/src/mcp/handlers/execute.handler.test.ts +179 -0
  140. package/src/mcp/handlers/execute.handler.ts +24 -0
  141. package/src/mcp/handlers/index.ts +43 -0
  142. package/src/mcp/handlers/job.handler.test.ts +189 -0
  143. package/src/mcp/handlers/job.handler.ts +116 -0
  144. package/src/mcp/handlers/search.handler.test.ts +334 -0
  145. package/src/mcp/handlers/search.handler.ts +209 -0
  146. package/src/mcp/handlers/store.handler.test.ts +415 -0
  147. package/src/mcp/handlers/store.handler.ts +295 -0
  148. package/src/mcp/schemas/index.test.ts +315 -0
  149. package/src/mcp/schemas/index.ts +138 -0
  150. package/src/mcp/server.test.ts +36 -0
  151. package/src/mcp/server.ts +162 -0
  152. package/src/mcp/types.ts +41 -0
  153. package/src/plugin/commands.test.ts +789 -0
  154. package/src/plugin/commands.ts +257 -0
  155. package/src/plugin/dependency-analyzer.test.ts +380 -0
  156. package/src/plugin/dependency-analyzer.ts +147 -0
  157. package/src/plugin/git-clone.test.ts +332 -0
  158. package/src/plugin/git-clone.ts +57 -0
  159. package/src/server/app.test.ts +752 -0
  160. package/src/server/app.ts +119 -0
  161. package/src/server/index.test.ts +477 -0
  162. package/src/server/index.ts +1 -0
  163. package/src/services/chunking.service.test.ts +363 -0
  164. package/src/services/chunking.service.ts +350 -0
  165. package/src/services/code-graph.service.test.ts +304 -0
  166. package/src/services/code-graph.service.ts +302 -0
  167. package/src/services/code-unit.service.test.ts +596 -0
  168. package/src/services/code-unit.service.ts +115 -0
  169. package/src/services/config.service.test.ts +127 -0
  170. package/src/services/config.service.ts +69 -0
  171. package/src/services/index.service.test.ts +1002 -0
  172. package/src/services/index.service.ts +266 -0
  173. package/src/services/index.ts +75 -0
  174. package/src/services/job.service.test.ts +418 -0
  175. package/src/services/job.service.ts +246 -0
  176. package/src/services/project-root.service.test.ts +506 -0
  177. package/src/services/project-root.service.ts +112 -0
  178. package/src/services/search.service.test.ts +1105 -0
  179. package/src/services/search.service.ts +892 -0
  180. package/src/services/services.test.ts +38 -0
  181. package/src/services/snippet.service.test.ts +205 -0
  182. package/src/services/snippet.service.ts +166 -0
  183. package/src/services/store.service.test.ts +474 -0
  184. package/src/services/store.service.ts +225 -0
  185. package/src/services/watch.service.test.ts +553 -0
  186. package/src/services/watch.service.ts +71 -0
  187. package/src/types/brands.test.ts +45 -0
  188. package/src/types/brands.ts +32 -0
  189. package/src/types/config.ts +79 -0
  190. package/src/types/document.ts +30 -0
  191. package/src/types/index.ts +66 -0
  192. package/src/types/job.ts +46 -0
  193. package/src/types/progress.ts +9 -0
  194. package/src/types/result.test.ts +44 -0
  195. package/src/types/result.ts +41 -0
  196. package/src/types/search.ts +95 -0
  197. package/src/types/store.test.ts +69 -0
  198. package/src/types/store.ts +47 -0
  199. package/src/utils/type-guards.test.ts +346 -0
  200. package/src/utils/type-guards.ts +61 -0
  201. package/src/workers/background-worker-cli.ts +105 -0
  202. package/src/workers/background-worker.test.ts +178 -0
  203. package/src/workers/background-worker.ts +294 -0
  204. package/src/workers/spawn-worker.test.ts +128 -0
  205. package/src/workers/spawn-worker.ts +49 -0
  206. package/tests/analysis/ast-parser.test.ts +98 -0
  207. package/tests/analysis/code-graph.test.ts +60 -0
  208. package/tests/fixtures/README.md +114 -0
  209. package/tests/fixtures/code-snippets/api/error-handling.ts +267 -0
  210. package/tests/fixtures/code-snippets/api/rest-controller.ts +303 -0
  211. package/tests/fixtures/code-snippets/auth/jwt-auth.ts +213 -0
  212. package/tests/fixtures/code-snippets/auth/oauth-flow.ts +245 -0
  213. package/tests/fixtures/code-snippets/database/repository-pattern.ts +272 -0
  214. package/tests/fixtures/corpus/VERSION.md +25 -0
  215. package/tests/fixtures/corpus/articles/jwt-authentication.md +97 -0
  216. package/tests/fixtures/corpus/articles/react-hooks-patterns.md +127 -0
  217. package/tests/fixtures/corpus/articles/typescript-generics.md +111 -0
  218. package/tests/fixtures/corpus/documentation/express-middleware.md +71 -0
  219. package/tests/fixtures/corpus/documentation/express-routing.md +83 -0
  220. package/tests/fixtures/corpus/documentation/node-streams.md +78 -0
  221. package/tests/fixtures/corpus/oss-repos/express/History.md +3871 -0
  222. package/tests/fixtures/corpus/oss-repos/express/LICENSE +24 -0
  223. package/tests/fixtures/corpus/oss-repos/express/Readme.md +276 -0
  224. package/tests/fixtures/corpus/oss-repos/express/SECURITY.md +56 -0
  225. package/tests/fixtures/corpus/oss-repos/express/benchmarks/Makefile +17 -0
  226. package/tests/fixtures/corpus/oss-repos/express/benchmarks/README.md +34 -0
  227. package/tests/fixtures/corpus/oss-repos/express/benchmarks/middleware.js +20 -0
  228. package/tests/fixtures/corpus/oss-repos/express/benchmarks/run +18 -0
  229. package/tests/fixtures/corpus/oss-repos/express/examples/README.md +29 -0
  230. package/tests/fixtures/corpus/oss-repos/express/examples/auth/index.js +134 -0
  231. package/tests/fixtures/corpus/oss-repos/express/examples/auth/views/foot.ejs +2 -0
  232. package/tests/fixtures/corpus/oss-repos/express/examples/auth/views/head.ejs +20 -0
  233. package/tests/fixtures/corpus/oss-repos/express/examples/auth/views/login.ejs +21 -0
  234. package/tests/fixtures/corpus/oss-repos/express/examples/content-negotiation/db.js +9 -0
  235. package/tests/fixtures/corpus/oss-repos/express/examples/content-negotiation/index.js +46 -0
  236. package/tests/fixtures/corpus/oss-repos/express/examples/content-negotiation/users.js +19 -0
  237. package/tests/fixtures/corpus/oss-repos/express/examples/cookie-sessions/index.js +25 -0
  238. package/tests/fixtures/corpus/oss-repos/express/examples/cookies/index.js +53 -0
  239. package/tests/fixtures/corpus/oss-repos/express/examples/downloads/files/CCTV/345/244/247/350/265/233/344/270/212/346/265/267/345/210/206/350/265/233/345/214/272.txt +2 -0
  240. package/tests/fixtures/corpus/oss-repos/express/examples/downloads/files/amazing.txt +1 -0
  241. package/tests/fixtures/corpus/oss-repos/express/examples/downloads/files/notes/groceries.txt +3 -0
  242. package/tests/fixtures/corpus/oss-repos/express/examples/downloads/index.js +40 -0
  243. package/tests/fixtures/corpus/oss-repos/express/examples/ejs/index.js +57 -0
  244. package/tests/fixtures/corpus/oss-repos/express/examples/ejs/public/stylesheets/style.css +4 -0
  245. package/tests/fixtures/corpus/oss-repos/express/examples/ejs/views/footer.html +2 -0
  246. package/tests/fixtures/corpus/oss-repos/express/examples/ejs/views/header.html +9 -0
  247. package/tests/fixtures/corpus/oss-repos/express/examples/ejs/views/users.html +10 -0
  248. package/tests/fixtures/corpus/oss-repos/express/examples/error/index.js +53 -0
  249. package/tests/fixtures/corpus/oss-repos/express/examples/error-pages/index.js +103 -0
  250. package/tests/fixtures/corpus/oss-repos/express/examples/error-pages/views/404.ejs +3 -0
  251. package/tests/fixtures/corpus/oss-repos/express/examples/error-pages/views/500.ejs +8 -0
  252. package/tests/fixtures/corpus/oss-repos/express/examples/error-pages/views/error_header.ejs +10 -0
  253. package/tests/fixtures/corpus/oss-repos/express/examples/error-pages/views/footer.ejs +2 -0
  254. package/tests/fixtures/corpus/oss-repos/express/examples/error-pages/views/index.ejs +20 -0
  255. package/tests/fixtures/corpus/oss-repos/express/examples/hello-world/index.js +15 -0
  256. package/tests/fixtures/corpus/oss-repos/express/examples/markdown/index.js +44 -0
  257. package/tests/fixtures/corpus/oss-repos/express/examples/markdown/views/index.md +4 -0
  258. package/tests/fixtures/corpus/oss-repos/express/examples/multi-router/controllers/api_v1.js +15 -0
  259. package/tests/fixtures/corpus/oss-repos/express/examples/multi-router/controllers/api_v2.js +15 -0
  260. package/tests/fixtures/corpus/oss-repos/express/examples/multi-router/index.js +18 -0
  261. package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/main/index.js +5 -0
  262. package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/pet/index.js +31 -0
  263. package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/pet/views/edit.ejs +17 -0
  264. package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/pet/views/show.ejs +15 -0
  265. package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/user/index.js +41 -0
  266. package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/user/views/edit.hbs +27 -0
  267. package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/user/views/list.hbs +18 -0
  268. package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/user/views/show.hbs +31 -0
  269. package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/user-pet/index.js +22 -0
  270. package/tests/fixtures/corpus/oss-repos/express/examples/mvc/db.js +16 -0
  271. package/tests/fixtures/corpus/oss-repos/express/examples/mvc/index.js +95 -0
  272. package/tests/fixtures/corpus/oss-repos/express/examples/mvc/lib/boot.js +83 -0
  273. package/tests/fixtures/corpus/oss-repos/express/examples/mvc/public/style.css +14 -0
  274. package/tests/fixtures/corpus/oss-repos/express/examples/mvc/views/404.ejs +13 -0
  275. package/tests/fixtures/corpus/oss-repos/express/examples/mvc/views/5xx.ejs +13 -0
  276. package/tests/fixtures/corpus/oss-repos/express/examples/online/index.js +61 -0
  277. package/tests/fixtures/corpus/oss-repos/express/examples/params/index.js +74 -0
  278. package/tests/fixtures/corpus/oss-repos/express/examples/resource/index.js +95 -0
  279. package/tests/fixtures/corpus/oss-repos/express/examples/route-map/index.js +75 -0
  280. package/tests/fixtures/corpus/oss-repos/express/examples/route-middleware/index.js +90 -0
  281. package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/index.js +55 -0
  282. package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/post.js +13 -0
  283. package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/public/style.css +24 -0
  284. package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/site.js +5 -0
  285. package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/user.js +47 -0
  286. package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/views/footer.ejs +2 -0
  287. package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/views/header.ejs +9 -0
  288. package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/views/index.ejs +10 -0
  289. package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/views/posts/index.ejs +12 -0
  290. package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/views/users/edit.ejs +23 -0
  291. package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/views/users/index.ejs +14 -0
  292. package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/views/users/view.ejs +9 -0
  293. package/tests/fixtures/corpus/oss-repos/express/examples/search/index.js +61 -0
  294. package/tests/fixtures/corpus/oss-repos/express/examples/search/public/client.js +15 -0
  295. package/tests/fixtures/corpus/oss-repos/express/examples/search/public/index.html +21 -0
  296. package/tests/fixtures/corpus/oss-repos/express/examples/session/index.js +37 -0
  297. package/tests/fixtures/corpus/oss-repos/express/examples/session/redis.js +39 -0
  298. package/tests/fixtures/corpus/oss-repos/express/examples/static-files/index.js +43 -0
  299. package/tests/fixtures/corpus/oss-repos/express/examples/static-files/public/css/style.css +3 -0
  300. package/tests/fixtures/corpus/oss-repos/express/examples/static-files/public/hello.txt +1 -0
  301. package/tests/fixtures/corpus/oss-repos/express/examples/static-files/public/js/app.js +1 -0
  302. package/tests/fixtures/corpus/oss-repos/express/examples/vhost/index.js +53 -0
  303. package/tests/fixtures/corpus/oss-repos/express/examples/view-constructor/github-view.js +53 -0
  304. package/tests/fixtures/corpus/oss-repos/express/examples/view-constructor/index.js +48 -0
  305. package/tests/fixtures/corpus/oss-repos/express/examples/view-locals/index.js +155 -0
  306. package/tests/fixtures/corpus/oss-repos/express/examples/view-locals/user.js +36 -0
  307. package/tests/fixtures/corpus/oss-repos/express/examples/view-locals/views/index.ejs +20 -0
  308. package/tests/fixtures/corpus/oss-repos/express/examples/web-service/index.js +117 -0
  309. package/tests/fixtures/corpus/oss-repos/express/index.js +11 -0
  310. package/tests/fixtures/corpus/oss-repos/express/lib/application.js +631 -0
  311. package/tests/fixtures/corpus/oss-repos/express/lib/express.js +81 -0
  312. package/tests/fixtures/corpus/oss-repos/express/lib/request.js +514 -0
  313. package/tests/fixtures/corpus/oss-repos/express/lib/response.js +1053 -0
  314. package/tests/fixtures/corpus/oss-repos/express/lib/utils.js +271 -0
  315. package/tests/fixtures/corpus/oss-repos/express/lib/view.js +205 -0
  316. package/tests/fixtures/corpus/oss-repos/express/package.json +99 -0
  317. package/tests/fixtures/corpus/oss-repos/express/test/Route.js +274 -0
  318. package/tests/fixtures/corpus/oss-repos/express/test/Router.js +636 -0
  319. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/auth.js +117 -0
  320. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/content-negotiation.js +49 -0
  321. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/cookie-sessions.js +38 -0
  322. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/cookies.js +71 -0
  323. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/downloads.js +47 -0
  324. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/ejs.js +17 -0
  325. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/error-pages.js +99 -0
  326. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/error.js +29 -0
  327. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/hello-world.js +21 -0
  328. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/markdown.js +21 -0
  329. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/multi-router.js +44 -0
  330. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/mvc.js +132 -0
  331. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/params.js +44 -0
  332. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/resource.js +68 -0
  333. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/route-map.js +45 -0
  334. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/route-separation.js +97 -0
  335. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/vhost.js +46 -0
  336. package/tests/fixtures/corpus/oss-repos/express/test/acceptance/web-service.js +105 -0
  337. package/tests/fixtures/corpus/oss-repos/express/test/app.all.js +38 -0
  338. package/tests/fixtures/corpus/oss-repos/express/test/app.engine.js +83 -0
  339. package/tests/fixtures/corpus/oss-repos/express/test/app.head.js +66 -0
  340. package/tests/fixtures/corpus/oss-repos/express/test/app.js +120 -0
  341. package/tests/fixtures/corpus/oss-repos/express/test/app.listen.js +55 -0
  342. package/tests/fixtures/corpus/oss-repos/express/test/app.locals.js +26 -0
  343. package/tests/fixtures/corpus/oss-repos/express/test/app.options.js +116 -0
  344. package/tests/fixtures/corpus/oss-repos/express/test/app.param.js +323 -0
  345. package/tests/fixtures/corpus/oss-repos/express/test/app.render.js +374 -0
  346. package/tests/fixtures/corpus/oss-repos/express/test/app.request.js +143 -0
  347. package/tests/fixtures/corpus/oss-repos/express/test/app.response.js +143 -0
  348. package/tests/fixtures/corpus/oss-repos/express/test/app.route.js +197 -0
  349. package/tests/fixtures/corpus/oss-repos/express/test/app.router.js +1217 -0
  350. package/tests/fixtures/corpus/oss-repos/express/test/app.routes.error.js +62 -0
  351. package/tests/fixtures/corpus/oss-repos/express/test/app.use.js +542 -0
  352. package/tests/fixtures/corpus/oss-repos/express/test/config.js +207 -0
  353. package/tests/fixtures/corpus/oss-repos/express/test/exports.js +82 -0
  354. package/tests/fixtures/corpus/oss-repos/express/test/express.json.js +755 -0
  355. package/tests/fixtures/corpus/oss-repos/express/test/express.raw.js +513 -0
  356. package/tests/fixtures/corpus/oss-repos/express/test/express.static.js +815 -0
  357. package/tests/fixtures/corpus/oss-repos/express/test/express.text.js +566 -0
  358. package/tests/fixtures/corpus/oss-repos/express/test/express.urlencoded.js +828 -0
  359. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/% of dogs.txt +1 -0
  360. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/.name +1 -0
  361. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/blog/index.html +1 -0
  362. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/blog/post/index.tmpl +1 -0
  363. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/broken.send +0 -0
  364. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/default_layout/name.tmpl +1 -0
  365. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/default_layout/user.tmpl +1 -0
  366. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/email.tmpl +1 -0
  367. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/empty.txt +0 -0
  368. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/local_layout/user.tmpl +1 -0
  369. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/name.tmpl +1 -0
  370. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/name.txt +1 -0
  371. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/nums.txt +1 -0
  372. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/pets/names.txt +1 -0
  373. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/snow /342/230/203/.gitkeep +0 -0
  374. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/todo.html +1 -0
  375. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/todo.txt +1 -0
  376. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/user.html +1 -0
  377. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/user.tmpl +1 -0
  378. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/users/index.html +1 -0
  379. package/tests/fixtures/corpus/oss-repos/express/test/fixtures/users/tobi.txt +1 -0
  380. package/tests/fixtures/corpus/oss-repos/express/test/middleware.basic.js +42 -0
  381. package/tests/fixtures/corpus/oss-repos/express/test/regression.js +20 -0
  382. package/tests/fixtures/corpus/oss-repos/express/test/req.accepts.js +125 -0
  383. package/tests/fixtures/corpus/oss-repos/express/test/req.acceptsCharsets.js +50 -0
  384. package/tests/fixtures/corpus/oss-repos/express/test/req.acceptsEncodings.js +39 -0
  385. package/tests/fixtures/corpus/oss-repos/express/test/req.acceptsLanguages.js +57 -0
  386. package/tests/fixtures/corpus/oss-repos/express/test/req.baseUrl.js +88 -0
  387. package/tests/fixtures/corpus/oss-repos/express/test/req.fresh.js +70 -0
  388. package/tests/fixtures/corpus/oss-repos/express/test/req.get.js +60 -0
  389. package/tests/fixtures/corpus/oss-repos/express/test/req.host.js +156 -0
  390. package/tests/fixtures/corpus/oss-repos/express/test/req.hostname.js +188 -0
  391. package/tests/fixtures/corpus/oss-repos/express/test/req.ip.js +113 -0
  392. package/tests/fixtures/corpus/oss-repos/express/test/req.ips.js +71 -0
  393. package/tests/fixtures/corpus/oss-repos/express/test/req.is.js +169 -0
  394. package/tests/fixtures/corpus/oss-repos/express/test/req.path.js +20 -0
  395. package/tests/fixtures/corpus/oss-repos/express/test/req.protocol.js +113 -0
  396. package/tests/fixtures/corpus/oss-repos/express/test/req.query.js +106 -0
  397. package/tests/fixtures/corpus/oss-repos/express/test/req.range.js +104 -0
  398. package/tests/fixtures/corpus/oss-repos/express/test/req.route.js +28 -0
  399. package/tests/fixtures/corpus/oss-repos/express/test/req.secure.js +101 -0
  400. package/tests/fixtures/corpus/oss-repos/express/test/req.signedCookies.js +37 -0
  401. package/tests/fixtures/corpus/oss-repos/express/test/req.stale.js +50 -0
  402. package/tests/fixtures/corpus/oss-repos/express/test/req.subdomains.js +173 -0
  403. package/tests/fixtures/corpus/oss-repos/express/test/req.xhr.js +42 -0
  404. package/tests/fixtures/corpus/oss-repos/express/test/res.append.js +116 -0
  405. package/tests/fixtures/corpus/oss-repos/express/test/res.attachment.js +79 -0
  406. package/tests/fixtures/corpus/oss-repos/express/test/res.clearCookie.js +62 -0
  407. package/tests/fixtures/corpus/oss-repos/express/test/res.cookie.js +295 -0
  408. package/tests/fixtures/corpus/oss-repos/express/test/res.download.js +487 -0
  409. package/tests/fixtures/corpus/oss-repos/express/test/res.format.js +248 -0
  410. package/tests/fixtures/corpus/oss-repos/express/test/res.get.js +21 -0
  411. package/tests/fixtures/corpus/oss-repos/express/test/res.json.js +186 -0
  412. package/tests/fixtures/corpus/oss-repos/express/test/res.jsonp.js +344 -0
  413. package/tests/fixtures/corpus/oss-repos/express/test/res.links.js +65 -0
  414. package/tests/fixtures/corpus/oss-repos/express/test/res.locals.js +40 -0
  415. package/tests/fixtures/corpus/oss-repos/express/test/res.location.js +316 -0
  416. package/tests/fixtures/corpus/oss-repos/express/test/res.redirect.js +214 -0
  417. package/tests/fixtures/corpus/oss-repos/express/test/res.render.js +367 -0
  418. package/tests/fixtures/corpus/oss-repos/express/test/res.send.js +569 -0
  419. package/tests/fixtures/corpus/oss-repos/express/test/res.sendFile.js +913 -0
  420. package/tests/fixtures/corpus/oss-repos/express/test/res.sendStatus.js +44 -0
  421. package/tests/fixtures/corpus/oss-repos/express/test/res.set.js +124 -0
  422. package/tests/fixtures/corpus/oss-repos/express/test/res.status.js +206 -0
  423. package/tests/fixtures/corpus/oss-repos/express/test/res.type.js +46 -0
  424. package/tests/fixtures/corpus/oss-repos/express/test/res.vary.js +90 -0
  425. package/tests/fixtures/corpus/oss-repos/express/test/support/env.js +3 -0
  426. package/tests/fixtures/corpus/oss-repos/express/test/support/tmpl.js +36 -0
  427. package/tests/fixtures/corpus/oss-repos/express/test/support/utils.js +86 -0
  428. package/tests/fixtures/corpus/oss-repos/express/test/utils.js +83 -0
  429. package/tests/fixtures/corpus/oss-repos/hono/.devcontainer/Dockerfile +11 -0
  430. package/tests/fixtures/corpus/oss-repos/hono/.devcontainer/devcontainer.json +21 -0
  431. package/tests/fixtures/corpus/oss-repos/hono/.devcontainer/docker-compose.yml +18 -0
  432. package/tests/fixtures/corpus/oss-repos/hono/.eslintignore +1 -0
  433. package/tests/fixtures/corpus/oss-repos/hono/.eslintrc.cjs +9 -0
  434. package/tests/fixtures/corpus/oss-repos/hono/.gitpod.yml +9 -0
  435. package/tests/fixtures/corpus/oss-repos/hono/.prettierrc +9 -0
  436. package/tests/fixtures/corpus/oss-repos/hono/.vitest.config/jsx-runtime-default.ts +15 -0
  437. package/tests/fixtures/corpus/oss-repos/hono/.vitest.config/jsx-runtime-dom.ts +15 -0
  438. package/tests/fixtures/corpus/oss-repos/hono/.vitest.config/setup-vitest.ts +47 -0
  439. package/tests/fixtures/corpus/oss-repos/hono/LICENSE +21 -0
  440. package/tests/fixtures/corpus/oss-repos/hono/README.md +91 -0
  441. package/tests/fixtures/corpus/oss-repos/hono/build.ts +80 -0
  442. package/tests/fixtures/corpus/oss-repos/hono/bun.lockb +0 -0
  443. package/tests/fixtures/corpus/oss-repos/hono/bunfig.toml +7 -0
  444. package/tests/fixtures/corpus/oss-repos/hono/codecov.yml +13 -0
  445. package/tests/fixtures/corpus/oss-repos/hono/docs/CODE_OF_CONDUCT.md +128 -0
  446. package/tests/fixtures/corpus/oss-repos/hono/docs/CONTRIBUTING.md +62 -0
  447. package/tests/fixtures/corpus/oss-repos/hono/docs/MIGRATION.md +295 -0
  448. package/tests/fixtures/corpus/oss-repos/hono/docs/images/hono-logo.png +0 -0
  449. package/tests/fixtures/corpus/oss-repos/hono/docs/images/hono-logo.pxm +0 -0
  450. package/tests/fixtures/corpus/oss-repos/hono/docs/images/hono-logo.svg +6 -0
  451. package/tests/fixtures/corpus/oss-repos/hono/docs/images/hono-title.png +0 -0
  452. package/tests/fixtures/corpus/oss-repos/hono/docs/images/hono-title.pxm +0 -0
  453. package/tests/fixtures/corpus/oss-repos/hono/jsr.json +119 -0
  454. package/tests/fixtures/corpus/oss-repos/hono/package.cjs.json +3 -0
  455. package/tests/fixtures/corpus/oss-repos/hono/package.json +650 -0
  456. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/aws-lambda/handler.ts +492 -0
  457. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/aws-lambda/index.ts +13 -0
  458. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/aws-lambda/types.ts +144 -0
  459. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/bun/conninfo.ts +28 -0
  460. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/bun/index.ts +9 -0
  461. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/bun/serve-static.ts +35 -0
  462. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/bun/server.ts +30 -0
  463. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/bun/ssg.ts +27 -0
  464. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/bun/websocket.ts +110 -0
  465. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-pages/handler.ts +120 -0
  466. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-pages/index.ts +7 -0
  467. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-workers/conninfo.ts +7 -0
  468. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-workers/index.ts +8 -0
  469. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-workers/serve-static-module.ts +12 -0
  470. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-workers/serve-static.ts +39 -0
  471. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-workers/utils.ts +50 -0
  472. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-workers/websocket.ts +50 -0
  473. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/deno/conninfo.ts +17 -0
  474. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/deno/deno.d.ts +28 -0
  475. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/deno/index.ts +9 -0
  476. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/deno/serve-static.ts +40 -0
  477. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/deno/ssg.ts +27 -0
  478. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/deno/websocket.ts +51 -0
  479. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/lambda-edge/conninfo.ts +15 -0
  480. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/lambda-edge/handler.ts +189 -0
  481. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/lambda-edge/index.ts +14 -0
  482. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/netlify/handler.ts +10 -0
  483. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/netlify/index.ts +6 -0
  484. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/netlify/mod.ts +1 -0
  485. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/service-worker/handler.ts +34 -0
  486. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/service-worker/index.ts +5 -0
  487. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/service-worker/types.ts +14 -0
  488. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/vercel/conninfo.ts +8 -0
  489. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/vercel/handler.ts +9 -0
  490. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/vercel/index.ts +7 -0
  491. package/tests/fixtures/corpus/oss-repos/hono/src/client/client.ts +214 -0
  492. package/tests/fixtures/corpus/oss-repos/hono/src/client/index.ts +14 -0
  493. package/tests/fixtures/corpus/oss-repos/hono/src/client/types.ts +180 -0
  494. package/tests/fixtures/corpus/oss-repos/hono/src/client/utils.ts +54 -0
  495. package/tests/fixtures/corpus/oss-repos/hono/src/compose.ts +94 -0
  496. package/tests/fixtures/corpus/oss-repos/hono/src/context.ts +914 -0
  497. package/tests/fixtures/corpus/oss-repos/hono/src/helper/accepts/accepts.ts +81 -0
  498. package/tests/fixtures/corpus/oss-repos/hono/src/helper/accepts/index.ts +6 -0
  499. package/tests/fixtures/corpus/oss-repos/hono/src/helper/adapter/index.ts +85 -0
  500. package/tests/fixtures/corpus/oss-repos/hono/src/helper/conninfo/index.ts +6 -0
  501. package/tests/fixtures/corpus/oss-repos/hono/src/helper/conninfo/types.ts +45 -0
  502. package/tests/fixtures/corpus/oss-repos/hono/src/helper/cookie/index.ts +130 -0
  503. package/tests/fixtures/corpus/oss-repos/hono/src/helper/css/common.ts +243 -0
  504. package/tests/fixtures/corpus/oss-repos/hono/src/helper/css/index.ts +220 -0
  505. package/tests/fixtures/corpus/oss-repos/hono/src/helper/dev/index.ts +79 -0
  506. package/tests/fixtures/corpus/oss-repos/hono/src/helper/factory/index.ts +246 -0
  507. package/tests/fixtures/corpus/oss-repos/hono/src/helper/html/index.ts +56 -0
  508. package/tests/fixtures/corpus/oss-repos/hono/src/helper/ssg/index.ts +13 -0
  509. package/tests/fixtures/corpus/oss-repos/hono/src/helper/ssg/middleware.ts +79 -0
  510. package/tests/fixtures/corpus/oss-repos/hono/src/helper/ssg/ssg.ts +388 -0
  511. package/tests/fixtures/corpus/oss-repos/hono/src/helper/ssg/utils.ts +71 -0
  512. package/tests/fixtures/corpus/oss-repos/hono/src/helper/streaming/index.ts +9 -0
  513. package/tests/fixtures/corpus/oss-repos/hono/src/helper/streaming/sse.ts +89 -0
  514. package/tests/fixtures/corpus/oss-repos/hono/src/helper/streaming/stream.ts +36 -0
  515. package/tests/fixtures/corpus/oss-repos/hono/src/helper/streaming/text.ts +15 -0
  516. package/tests/fixtures/corpus/oss-repos/hono/src/helper/testing/index.ts +26 -0
  517. package/tests/fixtures/corpus/oss-repos/hono/src/helper/websocket/index.ts +57 -0
  518. package/tests/fixtures/corpus/oss-repos/hono/src/hono-base.ts +523 -0
  519. package/tests/fixtures/corpus/oss-repos/hono/src/hono.ts +34 -0
  520. package/tests/fixtures/corpus/oss-repos/hono/src/http-exception.ts +78 -0
  521. package/tests/fixtures/corpus/oss-repos/hono/src/index.ts +51 -0
  522. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/base.ts +419 -0
  523. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/children.ts +20 -0
  524. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/components.ts +195 -0
  525. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/constants.ts +5 -0
  526. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/context.ts +50 -0
  527. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/client.ts +89 -0
  528. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/components.ts +39 -0
  529. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/context.ts +52 -0
  530. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/css.ts +246 -0
  531. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/hooks/index.ts +91 -0
  532. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/index.ts +159 -0
  533. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/intrinsic-element/components.ts +398 -0
  534. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/jsx-dev-runtime.ts +22 -0
  535. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/jsx-runtime.ts +7 -0
  536. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/render.ts +772 -0
  537. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/server.ts +70 -0
  538. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/utils.ts +7 -0
  539. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/hooks/index.ts +426 -0
  540. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/index.ts +114 -0
  541. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/intrinsic-element/common.ts +11 -0
  542. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/intrinsic-element/components.ts +196 -0
  543. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/intrinsic-elements.ts +924 -0
  544. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/jsx-dev-runtime.ts +26 -0
  545. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/jsx-runtime.ts +18 -0
  546. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/streaming.ts +184 -0
  547. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/types.ts +41 -0
  548. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/utils.ts +36 -0
  549. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/basic-auth/index.ts +128 -0
  550. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/bearer-auth/index.ts +159 -0
  551. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/body-limit/index.ts +115 -0
  552. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/cache/index.ts +127 -0
  553. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/combine/index.ts +153 -0
  554. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/compress/index.ts +79 -0
  555. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/context-storage/index.ts +55 -0
  556. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/cors/index.ts +141 -0
  557. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/csrf/index.ts +90 -0
  558. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/etag/index.ts +88 -0
  559. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/ip-restriction/index.ts +178 -0
  560. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/jsx-renderer/index.ts +158 -0
  561. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/jwt/index.ts +8 -0
  562. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/jwt/jwt.ts +159 -0
  563. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/logger/index.ts +93 -0
  564. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/method-override/index.ts +146 -0
  565. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/powered-by/index.ts +13 -0
  566. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/pretty-json/index.ts +50 -0
  567. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/request-id/index.ts +8 -0
  568. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/request-id/request-id.ts +59 -0
  569. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/secure-headers/index.ts +8 -0
  570. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/secure-headers/permissions-policy.ts +86 -0
  571. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/secure-headers/secure-headers.ts +319 -0
  572. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/serve-static/index.ts +140 -0
  573. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/timeout/index.ts +58 -0
  574. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/timing/index.ts +7 -0
  575. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/timing/timing.ts +225 -0
  576. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/trailing-slash/index.ts +71 -0
  577. package/tests/fixtures/corpus/oss-repos/hono/src/preset/quick.ts +24 -0
  578. package/tests/fixtures/corpus/oss-repos/hono/src/preset/tiny.ts +20 -0
  579. package/tests/fixtures/corpus/oss-repos/hono/src/request.ts +403 -0
  580. package/tests/fixtures/corpus/oss-repos/hono/src/router/linear-router/index.ts +6 -0
  581. package/tests/fixtures/corpus/oss-repos/hono/src/router/linear-router/router.ts +132 -0
  582. package/tests/fixtures/corpus/oss-repos/hono/src/router/pattern-router/index.ts +6 -0
  583. package/tests/fixtures/corpus/oss-repos/hono/src/router/pattern-router/router.ts +54 -0
  584. package/tests/fixtures/corpus/oss-repos/hono/src/router/reg-exp-router/index.ts +6 -0
  585. package/tests/fixtures/corpus/oss-repos/hono/src/router/reg-exp-router/node.ts +159 -0
  586. package/tests/fixtures/corpus/oss-repos/hono/src/router/reg-exp-router/router.ts +274 -0
  587. package/tests/fixtures/corpus/oss-repos/hono/src/router/reg-exp-router/trie.ts +74 -0
  588. package/tests/fixtures/corpus/oss-repos/hono/src/router/smart-router/index.ts +6 -0
  589. package/tests/fixtures/corpus/oss-repos/hono/src/router/smart-router/router.ts +69 -0
  590. package/tests/fixtures/corpus/oss-repos/hono/src/router/trie-router/index.ts +6 -0
  591. package/tests/fixtures/corpus/oss-repos/hono/src/router/trie-router/node.ts +205 -0
  592. package/tests/fixtures/corpus/oss-repos/hono/src/router/trie-router/router.ts +28 -0
  593. package/tests/fixtures/corpus/oss-repos/hono/src/router.ts +103 -0
  594. package/tests/fixtures/corpus/oss-repos/hono/src/types.ts +2009 -0
  595. package/tests/fixtures/corpus/oss-repos/hono/src/utils/basic-auth.ts +26 -0
  596. package/tests/fixtures/corpus/oss-repos/hono/src/utils/body.ts +225 -0
  597. package/tests/fixtures/corpus/oss-repos/hono/src/utils/buffer.ts +65 -0
  598. package/tests/fixtures/corpus/oss-repos/hono/src/utils/color.ts +26 -0
  599. package/tests/fixtures/corpus/oss-repos/hono/src/utils/concurrent.ts +55 -0
  600. package/tests/fixtures/corpus/oss-repos/hono/src/utils/cookie.ts +230 -0
  601. package/tests/fixtures/corpus/oss-repos/hono/src/utils/crypto.ts +65 -0
  602. package/tests/fixtures/corpus/oss-repos/hono/src/utils/encode.ts +34 -0
  603. package/tests/fixtures/corpus/oss-repos/hono/src/utils/filepath.ts +56 -0
  604. package/tests/fixtures/corpus/oss-repos/hono/src/utils/handler.ts +15 -0
  605. package/tests/fixtures/corpus/oss-repos/hono/src/utils/html.ts +182 -0
  606. package/tests/fixtures/corpus/oss-repos/hono/src/utils/http-status.ts +69 -0
  607. package/tests/fixtures/corpus/oss-repos/hono/src/utils/ipaddr.ts +113 -0
  608. package/tests/fixtures/corpus/oss-repos/hono/src/utils/jwt/index.ts +7 -0
  609. package/tests/fixtures/corpus/oss-repos/hono/src/utils/jwt/jwa.ts +23 -0
  610. package/tests/fixtures/corpus/oss-repos/hono/src/utils/jwt/jws.ts +226 -0
  611. package/tests/fixtures/corpus/oss-repos/hono/src/utils/jwt/jwt.ts +114 -0
  612. package/tests/fixtures/corpus/oss-repos/hono/src/utils/jwt/types.ts +83 -0
  613. package/tests/fixtures/corpus/oss-repos/hono/src/utils/jwt/utf8.ts +7 -0
  614. package/tests/fixtures/corpus/oss-repos/hono/src/utils/mime.ts +142 -0
  615. package/tests/fixtures/corpus/oss-repos/hono/src/utils/stream.ts +96 -0
  616. package/tests/fixtures/corpus/oss-repos/hono/src/utils/types.ts +105 -0
  617. package/tests/fixtures/corpus/oss-repos/hono/src/utils/url.ts +310 -0
  618. package/tests/fixtures/corpus/oss-repos/hono/src/validator/index.ts +7 -0
  619. package/tests/fixtures/corpus/oss-repos/hono/src/validator/validator.ts +151 -0
  620. package/tests/fixtures/corpus/oss-repos/hono/tsconfig.build.json +23 -0
  621. package/tests/fixtures/corpus/oss-repos/hono/tsconfig.json +28 -0
  622. package/tests/fixtures/corpus/oss-repos/hono/vitest.config.ts +34 -0
  623. package/tests/fixtures/corpus/oss-repos/hono/yarn.lock +6232 -0
  624. package/tests/fixtures/documentation/api-reference.md +412 -0
  625. package/tests/fixtures/documentation/architecture.md +214 -0
  626. package/tests/fixtures/documentation/deployment-guide.md +420 -0
  627. package/tests/fixtures/github-readmes/express.md +133 -0
  628. package/tests/fixtures/github-readmes/nextjs.md +106 -0
  629. package/tests/fixtures/github-readmes/react.md +74 -0
  630. package/tests/fixtures/github-readmes/typescript.md +93 -0
  631. package/tests/fixtures/github-readmes/vite.md +79 -0
  632. package/tests/fixtures/queries/core.json +125 -0
  633. package/tests/fixtures/queries/extended.json +427 -0
  634. package/tests/fixtures/queries/generated/.gitkeep +0 -0
  635. package/tests/fixtures/test-server.ts +267 -0
  636. package/tests/helpers/performance-metrics.ts +387 -0
  637. package/tests/helpers/search-relevance.ts +381 -0
  638. package/tests/integration/cli-consistency.test.ts +299 -0
  639. package/tests/integration/cli.test.ts +69 -0
  640. package/tests/integration/e2e-workflow.test.ts +612 -0
  641. package/tests/integration/python-bridge.test.ts +183 -0
  642. package/tests/integration/search-quality.test.ts +718 -0
  643. package/tests/integration/stress.test.ts +326 -0
  644. package/tests/mcp/server.test.ts +15 -0
  645. package/tests/scripts/schemas/evaluation.json +44 -0
  646. package/tests/scripts/schemas/query-generation.json +21 -0
  647. package/tests/services/code-unit.service.test.ts +47 -0
  648. package/tests/services/search.progressive-context.test.ts +35 -0
  649. package/tsconfig.json +34 -0
  650. package/tsup.config.ts +15 -0
  651. package/turndown-plugin-gfm.d.ts +29 -0
  652. package/vitest.config.ts +79 -0
package/README.md ADDED
@@ -0,0 +1,1546 @@
1
+ # 🧠 Bluera Knowledge
2
+
3
+ [![CI](https://github.com/blueraai/bluera-knowledge/actions/workflows/ci.yml/badge.svg)](https://github.com/blueraai/bluera-knowledge/actions/workflows/ci.yml)
4
+ ![Version](https://img.shields.io/badge/version-0.9.21-blue)
5
+ ![License](https://img.shields.io/badge/license-MIT-green)
6
+ ![Node](https://img.shields.io/badge/node-%3E%3D20-brightgreen)
7
+ ![Python](https://img.shields.io/badge/python-%3E%3D3.8-blue)
8
+
9
+ > πŸš€ **Build a local knowledge base for your AI coding agentβ€”dependency source code, crawled docs, and your own files, all instantly searchable.**
10
+
11
+ **Use it as:**
12
+ - πŸ”Œ **Claude Code Plugin** β€” Slash commands + MCP tools + Skills for optimal Claude Code integration
13
+ - πŸ“¦ **npm Package** β€” Standalone CLI for any editor, CI/CD, or automation
14
+
15
+ Bluera Knowledge gives AI coding agents instant local access to authoritative context:
16
+
17
+ - **Dependency source code** β€” Clone and search the repos of dependencies you actually use
18
+ - **Documentation** β€” Crawl, index, and search any docs site
19
+ - **Your files** β€” Index and search local folders for project-specific knowledge
20
+
21
+ All searchable in milliseconds, no rate limits, fully offline.
22
+
23
+ ## πŸ“‘ Table of Contents
24
+
25
+ <details>
26
+ <summary>Click to expand</summary>
27
+
28
+ - [Installation](#-installation)
29
+ - [Why Bluera Knowledge?](#-why-bluera-knowledge)
30
+ - [Token Efficiency](#-token-efficiency)
31
+ - [Quick Start](#-quick-start)
32
+ - [Features](#-features)
33
+ - [How It Works](#-how-it-works)
34
+ - [User Interface](#-user-interface)
35
+ - [Background Jobs](#-background-jobs)
36
+ - [Commands](#-commands)
37
+ - [Crawler Architecture](#-crawler-architecture)
38
+ - [Use Cases](#-use-cases)
39
+ - [Dependencies](#-dependencies)
40
+ - [Troubleshooting](#-troubleshooting)
41
+ - [MCP Integration](#-mcp-integration)
42
+ - [CLI Tool](#️-cli-tool)
43
+ - [Skills for Claude Code](#-skills-for-claude-code)
44
+ - [Data Storage](#-data-storage)
45
+ - [Development](#-development)
46
+ - [Setup](#-setup)
47
+ - [Claude Code Settings](#️-claude-code-settings-recommended)
48
+ - [Commands / Scripts](#-commands)
49
+ - [Releasing](#-releasing)
50
+ - [Testing](#-testing-locally)
51
+ - [Technologies](#-technologies)
52
+ - [Contributing](#-contributing)
53
+ - [License](#-license)
54
+
55
+ </details>
56
+
57
+ ---
58
+
59
+ ## πŸ“¦ Installation
60
+
61
+ ### As Claude Code Plugin
62
+
63
+ ```bash
64
+ # Add the Bluera marketplace (one-time setup)
65
+ /plugin marketplace add blueraai/bluera-marketplace
66
+
67
+ # Install the plugin (or use /plugin to browse the UI)
68
+ /plugin install bluera-knowledge@bluera
69
+ ```
70
+
71
+ > [!NOTE]
72
+ > **First launch may appear to hang** while the plugin installs Python dependencies (crawl4ai). This is normalβ€”subsequent launches are instant.
73
+
74
+ ### As npm Package
75
+
76
+ ```bash
77
+ # Global install (CLI available everywhere)
78
+ npm install -g bluera-knowledge
79
+
80
+ # Or project install
81
+ npm install --save-dev bluera-knowledge
82
+ ```
83
+
84
+ > [!TIP]
85
+ > Both installation methods provide the same core functionality. The plugin adds slash commands and Skills; the npm package provides a standalone CLI.
86
+
87
+ ---
88
+
89
+ ## ✨ Why Bluera Knowledge?
90
+
91
+ When you ask Claude Code "how do I handle errors in Express middleware?", it can:
92
+
93
+ 1. **Guess from training data** β€” might be outdated or wrong
94
+ 2. **Search the web** β€” slow, rate-limited, often returns blog posts instead of source
95
+ 3. **Read your local knowledge base** β€” authoritative, complete, instant βœ…
96
+
97
+ Bluera Knowledge enables option 3 by building a searchable knowledge base from **three types of sources**:
98
+
99
+ | Source Type | What It Does | Example |
100
+ |------------|--------------|---------|
101
+ | **πŸ“¦ Dependency Source Code** | Clone & search library repos you actually use | Express, React, Lodash |
102
+ | **🌐 Documentation Sites** | Crawl & index any docs site | Next.js docs, FastAPI guides |
103
+ | **πŸ“ Local Files** | Index project-specific content | Your docs, standards, API specs |
104
+
105
+ **The result:** Your AI agent has local, instant access to authoritative information with zero rate limits:
106
+
107
+ | Capability | Without | With Bluera Knowledge |
108
+ |------------|---------|----------------------|
109
+ | Response time | 2-5 seconds (web) | ~100ms (local) |
110
+ | Accuracy | Uncertain | Authoritative (source code + docs) |
111
+ | Completeness | Partial docs | Full implementation + tests + your content |
112
+ | Rate limits | Yes | None |
113
+
114
+ ---
115
+
116
+ ## πŸ’° Token Efficiency
117
+
118
+ Beyond speed and accuracy, Bluera Knowledge can **significantly reduce token consumption** for code-related queriesβ€”typically saving 60-75% compared to web search approaches.
119
+
120
+ ### πŸ“Š How It Works
121
+
122
+ **Without Bluera Knowledge:**
123
+ - Web searches return 5-10 results (~500-2,000 tokens each)
124
+ - Total per search: **3,000-10,000 tokens**
125
+ - Often need multiple searches to find the right answer
126
+ - Lower signal-to-noise ratio (blog posts mixed with actual docs)
127
+
128
+ **With Bluera Knowledge:**
129
+ - Semantic search returns top 10 relevant code chunks (~200-400 tokens each)
130
+ - Structured metadata (file paths, imports, purpose)
131
+ - Total per search: **1,500-3,000 tokens**
132
+ - Higher relevance due to vector search (fewer follow-up queries needed)
133
+
134
+ ### 🎯 Real-World Examples
135
+
136
+ #### Example 1: Library Implementation Question
137
+
138
+ **Question:** "How does Express handle middleware errors?"
139
+
140
+ | Approach | Token Cost | Result |
141
+ |----------|-----------|--------|
142
+ | **Web Search** | ~8,000 tokens<br/>(3 searches: general query β†’ refined query β†’ source code) | Blog posts + Stack Overflow + eventual guess |
143
+ | **Bluera Knowledge** | ~2,000 tokens<br/>(1 semantic search) | Actual Express source code, authoritative |
144
+ | **Savings** | **75% fewer tokens** βœ… | Higher accuracy |
145
+
146
+ #### Example 2: Dependency Exploration
147
+
148
+ **Question:** "How does LanceDB's vector search work?"
149
+
150
+ | Approach | Token Cost | Result |
151
+ |----------|-----------|--------|
152
+ | **Web Search** | ~9,500 tokens<br/>(General docs β†’ API docs β†’ fetch specific page) | Documentation, might miss implementation details |
153
+ | **Bluera Knowledge** | ~1,500 tokens<br/>(Search returns source + tests + examples) | Source code from Python + Rust implementation |
154
+ | **Savings** | **84% fewer tokens** βœ… | Complete picture |
155
+
156
+ #### Example 3: Version-Specific Behavior
157
+
158
+ **Question:** "What changed in React 18's useEffect cleanup?"
159
+
160
+ | Approach | Token Cost | Result |
161
+ |----------|-----------|--------|
162
+ | **Training Data** | 0 tokens (but might be outdated) | Uncertain if accurate for React 18 |
163
+ | **Web Search** | ~5,000 tokens<br/>(Search changelog β†’ blog posts β†’ docs) | Mix of React 17 and 18 info |
164
+ | **Bluera Knowledge** | ~2,000 tokens<br/>(Search indexed React 18 source) | Exact React 18 implementation |
165
+ | **Savings** | **60% fewer tokens** βœ… | Version-accurate |
166
+
167
+ ### βš–οΈ When BK Uses More Tokens
168
+
169
+ Bluera Knowledge isn't always the most token-efficient choice:
170
+
171
+ | Scenario | Best Approach | Why |
172
+ |----------|---------------|-----|
173
+ | **Simple concept questions**<br/>("What is a JavaScript closure?") | Training data | Claude already knows this (0 tokens) |
174
+ | **Current events**<br/>("Latest Next.js 15 release notes") | Web search | BK only has what you've indexed |
175
+ | **General advice**<br/>("How to structure a React app?") | Training data | Opinion-based, not code-specific |
176
+
177
+ ### πŸ“ˆ Summary: Token Savings by Query Type
178
+
179
+ | Query Type | Typical Token Savings | When to Use BK |
180
+ |------------|----------------------|----------------|
181
+ | **Library internals** | 60-75% | βœ… Always |
182
+ | **Version-specific behavior** | 50-70% | βœ… Always |
183
+ | **"How does X work internally?"** | 70-85% | βœ… Always |
184
+ | **API usage examples** | 40-60% | βœ… Recommended |
185
+ | **General concepts** | -100% (uses more) | ❌ Skip BK |
186
+ | **Current events** | -100% (uses more) | ❌ Skip BK |
187
+
188
+ ### πŸ’‘ Best Practice
189
+
190
+ Let Claude Code decide when to use Bluera Knowledge:
191
+ - For **library-specific, version-specific, or implementation questions** β†’ BK saves tokens and increases accuracy
192
+ - For **general programming concepts** β†’ Training data is more efficient
193
+ - For **current events** β†’ Web search is necessary
194
+
195
+ The plugin's Skills teach Claude Code these patterns, so it automatically uses the most efficient approach for each question.
196
+
197
+ ---
198
+
199
+ ## πŸš€ Quick Start
200
+
201
+ ### Using Claude Code Plugin
202
+
203
+ - [ ] **πŸ“¦ Add a library**: `/bluera-knowledge:add-repo https://github.com/lodash/lodash`
204
+ - [ ] **πŸ“ Index your docs**: `/bluera-knowledge:add-folder ./docs --name=project-docs`
205
+ - [ ] **πŸ” Test search**: `/bluera-knowledge:search "deep clone object"`
206
+ - [ ] **πŸ“‹ View stores**: `/bluera-knowledge:stores`
207
+
208
+ > [!TIP]
209
+ > Not sure which libraries to index? Use `/bluera-knowledge:suggest` to analyze your project's dependencies.
210
+
211
+ ### Using CLI (npm package)
212
+
213
+ ```bash
214
+ # Add a library
215
+ bluera-knowledge store create lodash --type repo --source https://github.com/lodash/lodash
216
+
217
+ # Index your docs
218
+ bluera-knowledge store create project-docs --type file --source ./docs
219
+
220
+ # Test search
221
+ bluera-knowledge search "deep clone object"
222
+
223
+ # View stores
224
+ bluera-knowledge store list
225
+ ```
226
+
227
+ ---
228
+
229
+ ## ✨ Features
230
+
231
+ ### 🎯 Core Features
232
+
233
+ - **πŸ”¬ Smart Dependency Analysis** - Automatically scans your project to identify which libraries are most heavily used by counting import statements across all source files
234
+ - **πŸ“Š Usage-Based Suggestions** - Ranks dependencies by actual usage frequency, showing you the top 5 most-imported packages with import counts and file counts
235
+ - **πŸ” Automatic Repository Discovery** - Queries package registries (NPM, PyPI, crates.io, Go modules) to automatically find GitHub repository URLs
236
+ - **πŸ“¦ Git Repository Indexing** - Clones and indexes dependency source code for both semantic search and direct file access
237
+ - **πŸ“ Local Folder Indexing** - Indexes any local content - documentation, standards, reference materials, or custom content
238
+ - **🌐 Web Crawling** - Crawl and index web pages using `crawl4ai` - convert documentation sites to searchable markdown
239
+
240
+ ### πŸ” Search Modes
241
+
242
+ - **🧠 Vector Search** - AI-powered semantic search with relevance ranking
243
+ - **πŸ“‚ File Access** - Direct Grep/Glob operations on cloned source files
244
+
245
+ ### πŸ—ΊοΈ Code Graph Analysis
246
+
247
+ - **πŸ“Š Code Graph Analysis** - During indexing, builds a graph of code relationships (calls, imports, extends) to provide usage context in search results - shows how many callers/callees each function has
248
+ - **🌐 Multi-Language Support** - Full AST parsing for JavaScript, TypeScript, Python, Rust, and Go; indexes code in any language
249
+ - **πŸ”Œ MCP Integration** - Exposes all functionality as Model Context Protocol tools for AI coding agents
250
+
251
+ ### 🌍 Language-Specific Features
252
+
253
+ While bluera-knowledge indexes and searches code in any language, certain advanced features are language-specific:
254
+
255
+ | Language | Code Graph | Call Analysis | Import Tracking | Method Tracking |
256
+ |----------|------------|---------------|-----------------|-----------------|
257
+ | **TypeScript/JavaScript** | βœ… Full Support | βœ… Functions & Methods | βœ… Full | βœ… Class Methods |
258
+ | **Python** | βœ… Full Support | βœ… Functions & Methods | βœ… Full | βœ… Class Methods |
259
+ | **Rust** | βœ… Full Support | βœ… Functions & Methods | βœ… Full | βœ… Struct/Trait Methods |
260
+ | **Go** | βœ… Full Support | βœ… Functions & Methods | βœ… Full | βœ… Struct/Interface Methods |
261
+ | **Other Languages** | ⚠️ Basic Support | ❌ | ❌ | ❌ |
262
+
263
+ > [!NOTE]
264
+ > Code graph features enhance search results by showing usage context (e.g., "this function is called by 15 other functions"), but all languages benefit from vector search and full-text search capabilities.
265
+
266
+ ---
267
+
268
+ ## 🎯 How It Works
269
+
270
+ The plugin provides AI agents with **four complementary search capabilities**:
271
+
272
+ ### πŸ” 1. Semantic Vector Search
273
+ **AI-powered search across all indexed content**
274
+
275
+ - Searches by meaning and intent, not just keywords
276
+ - Uses embeddings to find conceptually similar content
277
+ - Ideal for discovering patterns and related concepts
278
+
279
+ ### πŸ“ 2. Full-Text Search (FTS)
280
+ **Fast keyword and pattern matching**
281
+
282
+ - Traditional text search with exact matching
283
+ - Supports regex patterns and boolean operators
284
+ - Best for finding specific terms or identifiers
285
+
286
+ ### ⚑ 3. Hybrid Mode (Recommended)
287
+ **Combines vector and FTS search**
288
+
289
+ - Merges results from both search modes with weighted ranking
290
+ - Balances semantic understanding with exact matching
291
+ - Provides best overall results for most queries
292
+
293
+ ### πŸ“‚ 4. Direct File Access
294
+ **Traditional file operations on cloned sources**
295
+
296
+ - Provides file paths to cloned repositories
297
+ - Enables Grep, Glob, and Read operations on source files
298
+ - Supports precise pattern matching and code navigation
299
+ - Full access to complete file trees
300
+
301
+ <details>
302
+ <summary>πŸ’‘ <b>How Commands Work</b></summary>
303
+
304
+ When you use `/bluera-knowledge:` commands, here's what happens:
305
+
306
+ 1. **You issue a command** - Type `/bluera-knowledge:stores` or similar in Claude Code
307
+ 2. **Claude Code receives instructions** - The command provides step-by-step instructions for Claude Code
308
+ 3. **Claude Code executes MCP tools** - Behind the scenes, Claude Code uses `mcp__bluera-knowledge__*` tools
309
+ 4. **Results are formatted** - Claude Code formats and displays the output directly to you
310
+
311
+ **Example Flow:**
312
+ ```
313
+ You: /bluera-knowledge:stores
314
+ ↓
315
+ Command file instructs Claude Code to use execute("stores")
316
+ ↓
317
+ MCP tool queries LanceDB for store metadata
318
+ ↓
319
+ Claude Code formats results as a table
320
+ ↓
321
+ You see: Beautiful table of all your knowledge stores
322
+ ```
323
+
324
+ This architecture means commands provide a clean user interface while MCP tools handle the backend operations.
325
+ </details>
326
+
327
+ ---
328
+
329
+ ## 🎨 User Interface
330
+
331
+ ### πŸ‘€ User Commands
332
+ **You manage knowledge stores through `/bluera-knowledge:` commands:**
333
+
334
+ - πŸ”¬ Analyze your project to find important dependencies
335
+ - πŸ“¦ Add Git repositories (dependency source code)
336
+ - πŸ“ Add local folders (documentation, standards, etc.)
337
+ - 🌐 Crawl web pages and documentation
338
+ - πŸ” Search across all indexed content
339
+ - πŸ”„ Manage and re-index stores
340
+
341
+ ### πŸ€– MCP Tools
342
+ **AI agents access knowledge through Model Context Protocol (3 tools for minimal context overhead):**
343
+
344
+ | Tool | Purpose |
345
+ |------|---------|
346
+ | `search` | πŸ” Semantic vector search across all stores |
347
+ | `get_full_context` | πŸ“– Retrieve complete code context for a search result |
348
+ | `execute` | ⚑ Meta-tool for store/job management commands |
349
+
350
+ The `execute` tool consolidates store and job management into a single tool with subcommands:
351
+ - **Store commands**: `stores`, `store:info`, `store:create`, `store:index`, `store:delete`
352
+ - **Job commands**: `jobs`, `job:status`, `job:cancel`
353
+ - **Help**: `help`, `commands`
354
+
355
+ ---
356
+
357
+ ## βš™οΈ Background Jobs
358
+
359
+ > [!TIP]
360
+ > Long-running operations (git clone, indexing) run in the background, allowing you to continue working while they complete.
361
+
362
+ ### πŸ”„ How It Works
363
+
364
+ When you add a repository or index content:
365
+
366
+ 1. **⚑ Instant Response** - Operation starts immediately and returns a job ID
367
+ 2. **πŸ”„ Background Processing** - Indexing runs in a separate process
368
+ 3. **πŸ“Š Progress Updates** - Check status anytime with `/bluera-knowledge:check-status`
369
+ 4. **πŸ”” Auto-Notifications** - Active jobs appear automatically in context
370
+
371
+ ### πŸ“ Example Workflow
372
+
373
+ ```bash
374
+ # Add a large repository (returns immediately with job ID)
375
+ /bluera-knowledge:add-repo https://github.com/facebook/react
376
+
377
+ # Output:
378
+ # βœ“ Created store: react (a1b2c3d4...)
379
+ # πŸ”„ Indexing started in background
380
+ # Job ID: job_abc123def456
381
+ #
382
+ # Check status with: /bluera-knowledge:check-status job_abc123def456
383
+
384
+ # Check progress anytime
385
+ /bluera-knowledge:check-status job_abc123def456
386
+
387
+ # Output:
388
+ # Job Status: job_abc123def456
389
+ # Status: running
390
+ # Progress: β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 45%
391
+ # Message: Indexed 562/1,247 files
392
+
393
+ # View all active jobs
394
+ /bluera-knowledge:check-status
395
+
396
+ # Cancel if needed
397
+ /bluera-knowledge:cancel job_abc123def456
398
+ ```
399
+
400
+ ### πŸš€ Performance
401
+
402
+ Background jobs include significant performance optimizations:
403
+
404
+ - **⚑ Parallel Embedding** - Processes 32 chunks simultaneously (~30x faster than sequential)
405
+ - **πŸ”“ Non-Blocking** - Continue working while indexing completes
406
+ - **πŸ“Š Progress Tracking** - Real-time updates on files processed and progress percentage
407
+ - **🧹 Auto-Cleanup** - Completed jobs are cleaned up after 24 hours
408
+
409
+ ---
410
+
411
+ ## πŸ“– Quick Reference
412
+
413
+ | Command | Purpose | Arguments |
414
+ |---------|---------|-----------|
415
+ | πŸ”¬ `/bluera-knowledge:suggest` | Analyze project dependencies | None |
416
+ | πŸ“¦ `/bluera-knowledge:add-repo` | Clone and index Git repository | `<url> [--name=<name>] [--branch=<branch>]` |
417
+ | πŸ“ `/bluera-knowledge:add-folder` | Index local folder | `<path> --name=<name>` |
418
+ | πŸ” `/bluera-knowledge:search` | Search knowledge stores | `"<query>" [--stores=<names>] [--limit=<N>]` |
419
+ | πŸ“‹ `/bluera-knowledge:stores` | List all stores | None |
420
+ | πŸ”„ `/bluera-knowledge:index` | Re-index a store | `<store-name-or-id>` |
421
+ | πŸ—‘οΈ `/bluera-knowledge:remove-store` | Delete a store and all data | `<store-name-or-id>` |
422
+ | 🌐 `/bluera-knowledge:crawl` | Crawl web pages | `<url> <store-name> [--crawl "<instruction>"]` |
423
+
424
+ ---
425
+
426
+ ## πŸ’» Commands
427
+
428
+ ### πŸ”¬ `/bluera-knowledge:suggest`
429
+
430
+ **Analyze your project to suggest libraries worth indexing as knowledge stores**
431
+
432
+ ```bash
433
+ /bluera-knowledge:suggest
434
+ ```
435
+
436
+ Scans source files, counts import statements, and suggests the top 5 most-used dependencies with their repository URLs.
437
+
438
+ **Supported languages:**
439
+ | Language | Manifest File | Registry |
440
+ |----------|---------------|----------|
441
+ | JavaScript/TypeScript | `package.json` | NPM |
442
+ | Python | `requirements.txt`, `pyproject.toml` | PyPI |
443
+ | Rust | `Cargo.toml` | crates.io |
444
+ | Go | `go.mod` | Go modules |
445
+
446
+ <details>
447
+ <summary><b>πŸ“Š Expected Output</b></summary>
448
+
449
+ ```
450
+ ## Dependency Analysis
451
+
452
+ Scanned 342 source files and found 24 dependencies.
453
+
454
+ ### Top Dependencies by Usage
455
+
456
+ 1. **react** (156 imports across 87 files)
457
+ Repository: https://github.com/facebook/react
458
+
459
+ Add with:
460
+ /bluera-knowledge:add-repo https://github.com/facebook/react --name=react
461
+
462
+ 2. **vitest** (40 imports across 40 files)
463
+ Repository: https://github.com/vitest-dev/vitest
464
+
465
+ Add with:
466
+ /bluera-knowledge:add-repo https://github.com/vitest-dev/vitest --name=vitest
467
+
468
+ 3. **lodash** (28 imports across 15 files)
469
+ Repository: https://github.com/lodash/lodash
470
+
471
+ Add with:
472
+ /bluera-knowledge:add-repo https://github.com/lodash/lodash --name=lodash
473
+
474
+ ---
475
+
476
+ Already indexed: typescript, express
477
+ ```
478
+ </details>
479
+
480
+ ---
481
+
482
+ ### πŸ“¦ `/bluera-knowledge:add-repo`
483
+
484
+ **Clone and index a Git repository**
485
+
486
+ ```bash
487
+ /bluera-knowledge:add-repo <url> [--name=<name>] [--branch=<branch>]
488
+ ```
489
+
490
+ **Examples:**
491
+ ```bash
492
+ /bluera-knowledge:add-repo https://github.com/lodash/lodash
493
+ /bluera-knowledge:add-repo https://github.com/facebook/react --branch=main --name=react
494
+ ```
495
+
496
+ <details>
497
+ <summary><b>βœ… Expected Output</b></summary>
498
+
499
+ ```
500
+ βœ“ Cloning https://github.com/facebook/react...
501
+ βœ“ Created store: react (a1b2c3d4...)
502
+ Location: ~/.local/share/bluera-knowledge/stores/a1b2c3d4.../
503
+
504
+ βœ“ Indexing...
505
+ βœ“ Indexed 1,247 files
506
+
507
+ Store is ready for searching!
508
+ ```
509
+ </details>
510
+
511
+ ---
512
+
513
+ ### πŸ“ `/bluera-knowledge:add-folder`
514
+
515
+ **Index a local folder**
516
+
517
+ ```bash
518
+ /bluera-knowledge:add-folder <path> --name=<name>
519
+ ```
520
+
521
+ **πŸ“š Use cases:**
522
+ - πŸ“– Project documentation
523
+ - πŸ“ Coding standards
524
+ - 🎨 Design documents
525
+ - πŸ”Œ API specifications
526
+ - πŸ“š Reference materials
527
+ - πŸ“„ Any other content
528
+
529
+ **Examples:**
530
+ ```bash
531
+ /bluera-knowledge:add-folder ./docs --name=project-docs
532
+ /bluera-knowledge:add-folder ./architecture --name=design-docs
533
+ ```
534
+
535
+ <details>
536
+ <summary><b>βœ… Expected Output</b></summary>
537
+
538
+ ```
539
+ βœ“ Adding folder: ~/my-project/docs...
540
+ βœ“ Created store: project-docs (e5f6g7h8...)
541
+ Location: ~/.local/share/bluera-knowledge/stores/e5f6g7h8.../
542
+
543
+ βœ“ Indexing...
544
+ βœ“ Indexed 342 files
545
+
546
+ Store is ready for searching!
547
+ ```
548
+ </details>
549
+
550
+ ---
551
+
552
+ ### πŸ” `/bluera-knowledge:search`
553
+
554
+ **Search across indexed knowledge stores**
555
+
556
+ ```bash
557
+ /bluera-knowledge:search "<query>" [--stores=<names>] [--limit=<number>]
558
+ ```
559
+
560
+ **Examples:**
561
+ ```bash
562
+ # Search all stores
563
+ /bluera-knowledge:search "how to invalidate queries"
564
+
565
+ # Search specific store
566
+ /bluera-knowledge:search "useState implementation" --stores=react
567
+
568
+ # Search multiple stores (comma-separated)
569
+ /bluera-knowledge:search "deep clone" --stores=react,lodash
570
+
571
+ # Limit results
572
+ /bluera-knowledge:search "testing patterns" --limit=5
573
+ ```
574
+
575
+ <details>
576
+ <summary><b>πŸ“Š Expected Output</b></summary>
577
+
578
+ ```
579
+ ## Search Results: "button component" (hybrid search)
580
+
581
+ **1. [Score: 0.95] [Vector+FTS]**
582
+ Store: react
583
+ File: πŸ“„ src/components/Button.tsx
584
+ Purpose: β†’ Reusable button component with variants
585
+ Top Terms: πŸ”‘ (in this chunk): button, variant, size, color, onClick
586
+ Imports: πŸ“¦ (in this chunk): React, clsx
587
+
588
+ **2. [Score: 0.87] [Vector]**
589
+ Store: react
590
+ File: πŸ“„ src/hooks/useButton.ts
591
+ Purpose: β†’ Custom hook for button state management
592
+ Top Terms: πŸ”‘ (in this chunk): hook, state, pressed, disabled
593
+ Imports: πŸ“¦ (in this chunk): useState, useCallback
594
+
595
+ **3. [Score: 0.81] [Vector+FTS]**
596
+ Store: react
597
+ File: πŸ“„ src/components/IconButton.tsx
598
+ Purpose: β†’ Button component with icon support
599
+ Top Terms: πŸ”‘ (in this chunk): icon, button, aria-label, accessible
600
+
601
+ ---
602
+ **Found 3 results in 45ms**
603
+
604
+ πŸ’‘ **Next Steps:**
605
+ - Read file: `Read src/components/Button.tsx`
606
+ - Get full code: `mcp__bluera-knowledge__get_full_context("result-id")`
607
+ - Refine search: Use keywords above
608
+ ```
609
+ </details>
610
+
611
+ ---
612
+
613
+ ### πŸ“‹ `/bluera-knowledge:stores`
614
+
615
+ **List all indexed knowledge stores**
616
+
617
+ ```bash
618
+ /bluera-knowledge:stores
619
+ ```
620
+
621
+ Shows store name, type, ID, and source location in a clean table format.
622
+
623
+ <details>
624
+ <summary><b>πŸ“Š Expected Output</b></summary>
625
+
626
+ ```
627
+ | Name | Type | ID | Source |
628
+ |------|------|----|--------------------|
629
+ | react | repo | 459747c7 | https://github.com/facebook/react |
630
+ | crawl4ai | repo | b5a72a94 | https://github.com/unclecode/crawl4ai.git |
631
+ | project-docs | file | 70f6309b | ~/repos/my-project/docs |
632
+ | claude-docs | web | 9cc62018 | https://code.claude.com/docs |
633
+
634
+ **Total**: 4 stores
635
+ ```
636
+ </details>
637
+
638
+ ---
639
+
640
+ ### πŸ”„ `/bluera-knowledge:index`
641
+
642
+ **Re-index an existing store to update the search index**
643
+
644
+ ```bash
645
+ /bluera-knowledge:index <store-name-or-id>
646
+ ```
647
+
648
+ **πŸ”„ When to re-index:**
649
+ - The source repository has been updated (for repo stores)
650
+ - Files have been added or modified (for file stores)
651
+ - Search results seem out of date
652
+
653
+ **Example:**
654
+ ```bash
655
+ /bluera-knowledge:index react
656
+ ```
657
+
658
+ <details>
659
+ <summary><b>βœ… Expected Output</b></summary>
660
+
661
+ ```
662
+ βœ“ Indexing store: react...
663
+ βœ“ Indexed 1,247 documents in 3,421ms
664
+
665
+ Store search index is up to date!
666
+ ```
667
+ </details>
668
+
669
+ ---
670
+
671
+ ### πŸ—‘οΈ `/bluera-knowledge:remove-store`
672
+
673
+ **Delete a knowledge store and all associated data**
674
+
675
+ ```bash
676
+ /bluera-knowledge:remove-store <store-name-or-id>
677
+ ```
678
+
679
+ **πŸ—‘οΈ What gets deleted:**
680
+ - Store registry entry
681
+ - LanceDB search index (vector embeddings)
682
+ - Cloned repository files (for repo stores created from URLs)
683
+
684
+ **Example:**
685
+ ```bash
686
+ /bluera-knowledge:remove-store react
687
+ ```
688
+
689
+ <details>
690
+ <summary><b>βœ… Expected Output</b></summary>
691
+
692
+ ```
693
+ Store "react" deleted successfully.
694
+
695
+ Removed:
696
+ - Store registry entry
697
+ - LanceDB search index
698
+ - Cloned repository files
699
+ ```
700
+ </details>
701
+
702
+ ---
703
+
704
+ ### 🌐 `/bluera-knowledge:crawl`
705
+
706
+ **Crawl web pages with natural language control**
707
+
708
+ ```bash
709
+ /bluera-knowledge:crawl <url> <store-name> [options]
710
+ ```
711
+
712
+ **Options:**
713
+ - `--crawl "<instruction>"` - Natural language instruction for which pages to crawl
714
+ - `--extract "<instruction>"` - Natural language instruction for what content to extract
715
+ - `--simple` - Use simple BFS mode instead of intelligent crawling
716
+ - `--max-pages <n>` - Maximum pages to crawl (default: 50)
717
+ - `--headless` - Use headless browser for JavaScript-rendered sites (Next.js, React, Vue)
718
+
719
+ **βš™οΈ Requirements:**
720
+ - 🐍 Python 3 with `crawl4ai` package installed
721
+ - πŸ“¦ A web store must be created first
722
+
723
+ **Examples:**
724
+ ```bash
725
+ # Basic crawl
726
+ /bluera-knowledge:crawl https://docs.example.com/guide my-docs
727
+
728
+ # Intelligent crawl with custom strategy
729
+ /bluera-knowledge:crawl https://react.dev react-docs --crawl "all API reference pages"
730
+
731
+ # Extract specific content from pages
732
+ /bluera-knowledge:crawl https://example.com/pricing pricing --extract "pricing tiers and features"
733
+
734
+ # Combine crawl strategy + extraction
735
+ /bluera-knowledge:crawl https://docs.python.org python-docs \
736
+ --crawl "standard library modules" \
737
+ --extract "function signatures and examples"
738
+
739
+ # JavaScript-rendered sites (Next.js, React, etc.)
740
+ /bluera-knowledge:crawl https://nextjs.org/docs nextjs-docs --headless --max-pages 30
741
+
742
+ # Simple BFS mode (no AI guidance)
743
+ /bluera-knowledge:crawl https://example.com/docs docs --simple --max-pages 100
744
+ ```
745
+
746
+ The crawler converts pages to markdown and indexes them for semantic search.
747
+
748
+ ---
749
+
750
+ ## πŸ•·οΈ Crawler Architecture
751
+
752
+ The crawler supports two modes: **standard mode** for static sites (fast) and **headless mode** for JavaScript-rendered sites (powerful).
753
+
754
+ ### ⚑ Standard Mode (Static Sites)
755
+
756
+ For static HTML sites, the crawler uses axios for fast HTTP requests:
757
+
758
+ ```mermaid
759
+ sequenceDiagram
760
+ participant User
761
+ participant CLI
762
+ participant IntelligentCrawler
763
+ participant Axios
764
+ participant Claude
765
+
766
+ User->>CLI: crawl URL --crawl "instruction"
767
+ CLI->>IntelligentCrawler: crawl(url, options)
768
+ IntelligentCrawler->>Axios: fetchHtml(url)
769
+ Axios-->>IntelligentCrawler: Static HTML
770
+ IntelligentCrawler->>Claude: determineCrawlUrls(html, instruction)
771
+ Claude-->>IntelligentCrawler: [urls to crawl]
772
+ loop For each URL
773
+ IntelligentCrawler->>Axios: fetchHtml(url)
774
+ Axios-->>IntelligentCrawler: HTML
775
+ IntelligentCrawler->>IntelligentCrawler: Convert to markdown & index
776
+ end
777
+ ```
778
+
779
+ ### 🎭 Headless Mode (JavaScript-Rendered Sites)
780
+
781
+ For JavaScript-rendered sites (Next.js, React, Vue), use `--headless` to render content with Playwright:
782
+
783
+ ```mermaid
784
+ sequenceDiagram
785
+ participant User
786
+ participant CLI
787
+ participant IntelligentCrawler
788
+ participant PythonBridge
789
+ participant crawl4ai
790
+ participant Playwright
791
+ participant Claude
792
+
793
+ User->>CLI: crawl URL --crawl "instruction" --headless
794
+ CLI->>IntelligentCrawler: crawl(url, {useHeadless: true})
795
+ IntelligentCrawler->>PythonBridge: fetchHeadless(url)
796
+ PythonBridge->>crawl4ai: AsyncWebCrawler.arun(url)
797
+ crawl4ai->>Playwright: Launch browser & render JS
798
+ Playwright-->>crawl4ai: Rendered HTML
799
+ crawl4ai-->>PythonBridge: {html, markdown, links}
800
+ PythonBridge-->>IntelligentCrawler: Rendered HTML
801
+ IntelligentCrawler->>Claude: determineCrawlUrls(html, instruction)
802
+ Note over Claude: Natural language instruction<br/>STILL FULLY ACTIVE
803
+ Claude-->>IntelligentCrawler: [urls to crawl]
804
+ loop For each URL
805
+ IntelligentCrawler->>PythonBridge: fetchHeadless(url)
806
+ PythonBridge->>crawl4ai: Render JS
807
+ crawl4ai-->>PythonBridge: HTML
808
+ PythonBridge-->>IntelligentCrawler: HTML
809
+ IntelligentCrawler->>IntelligentCrawler: Convert to markdown & index
810
+ end
811
+ ```
812
+
813
+ ### πŸ”‘ Key Points
814
+
815
+ - **🧠 Intelligent crawling preserved** - Claude Code CLI analyzes pages and selects URLs based on natural language instructions in both modes
816
+ - **🎭 crawl4ai role** - ONLY renders JavaScript to get HTML - doesn't replace Claude's intelligent URL selection
817
+ - **⚑ Hybrid approach** - Fast axios for static sites, Playwright for JS-rendered sites
818
+ - **πŸ”„ Automatic fallback** - If headless fetch fails, automatically falls back to axios
819
+
820
+ ### πŸ€– Intelligent Mode vs Simple Mode
821
+
822
+ The crawler operates in two modes depending on Claude Code CLI availability:
823
+
824
+ | Mode | Requires Claude CLI | Behavior |
825
+ |------|---------------------|----------|
826
+ | **Intelligent** | βœ… Yes | Claude analyzes pages and selects URLs based on natural language instructions |
827
+ | **Simple (BFS)** | ❌ No | Breadth-first crawl up to max depth (2 levels) |
828
+
829
+ **Automatic detection:**
830
+ - When Claude Code CLI is available: Full intelligent mode with `--crawl` and `--extract` instructions
831
+ - When Claude Code CLI is unavailable: Automatically uses simple BFS mode
832
+ - Clear messaging: "Claude CLI not found, using simple crawl mode"
833
+
834
+ > [!NOTE]
835
+ > Install Claude Code to unlock `--crawl` (AI-guided URL selection) and `--extract` (AI content extraction). Without it, web crawling still works but uses simple BFS mode.
836
+
837
+ ---
838
+
839
+ ## πŸ”§ Troubleshooting
840
+
841
+ <details>
842
+ <summary><b>❌ Command not found or not recognized</b></summary>
843
+
844
+ Ensure the plugin is installed and enabled:
845
+
846
+ ```bash
847
+ /plugin list
848
+ /plugin enable bluera-knowledge
849
+ ```
850
+
851
+ If the plugin isn't listed, install it:
852
+
853
+ ```bash
854
+ /plugin marketplace add blueraai/bluera-marketplace
855
+ /plugin install bluera-knowledge@bluera
856
+ ```
857
+ </details>
858
+
859
+ <details>
860
+ <summary><b>🌐 Web crawling fails</b></summary>
861
+
862
+ Check Python dependencies:
863
+
864
+ ```bash
865
+ python3 --version # Should be 3.8+
866
+ pip install crawl4ai
867
+ ```
868
+
869
+ The plugin attempts to auto-install `crawl4ai` on first use, but manual installation may be needed in some environments.
870
+ </details>
871
+
872
+ <details>
873
+ <summary><b>πŸ” Search returns no results</b></summary>
874
+
875
+ 1. Verify store exists: `/bluera-knowledge:stores`
876
+ 2. Check store is indexed: `/bluera-knowledge:index <store-name>`
877
+ 3. Try broader search terms
878
+ 4. Verify you're searching the correct store with `--stores=<name>`
879
+ </details>
880
+
881
+ <details>
882
+ <summary><b>❓ "Store not found" error</b></summary>
883
+
884
+ List all stores to see available names and IDs:
885
+
886
+ ```bash
887
+ /bluera-knowledge:stores
888
+ ```
889
+
890
+ Use the exact store name or ID shown in the table.
891
+ </details>
892
+
893
+ <details>
894
+ <summary><b>⏱️ Indexing is slow or fails</b></summary>
895
+
896
+ Large repositories (10,000+ files) take longer to index. If indexing fails:
897
+
898
+ 1. Check available disk space
899
+ 2. Ensure the source repository/folder is accessible
900
+ 3. For repo stores, verify git is installed: `git --version`
901
+ 4. Check for network connectivity (for repo stores)
902
+ </details>
903
+
904
+ <details>
905
+ <summary><b>πŸ€– "Claude CLI not found" during crawl</b></summary>
906
+
907
+ This means intelligent crawling is unavailable. The crawler will automatically use simple BFS mode instead.
908
+
909
+ To enable intelligent crawling with `--crawl` and `--extract`:
910
+ 1. Install Claude Code: https://claude.com/code
911
+ 2. Ensure `claude` command is in PATH: `which claude`
912
+
913
+ Simple mode still crawls effectivelyβ€”it just doesn't use AI to select which pages to crawl or extract specific content.
914
+ </details>
915
+
916
+ ---
917
+
918
+ ## 🎯 Use Cases
919
+
920
+ ### πŸ“¦ Dependency Source Code
921
+
922
+ Provide AI agents with canonical dependency implementation details:
923
+
924
+ ```bash
925
+ /bluera-knowledge:suggest
926
+ /bluera-knowledge:add-repo https://github.com/expressjs/express
927
+
928
+ # AI agents can now:
929
+ # - Semantic search: "middleware error handling"
930
+ # - Direct access: Grep/Glob through the cloned express repo
931
+ ```
932
+
933
+ ### πŸ“š Project Documentation
934
+
935
+ Make project-specific documentation available:
936
+
937
+ ```bash
938
+ /bluera-knowledge:add-folder ./docs --name=project-docs
939
+ /bluera-knowledge:add-folder ./architecture --name=architecture
940
+
941
+ # AI agents can search across all documentation or access specific files
942
+ ```
943
+
944
+ ### πŸ“ Coding Standards
945
+
946
+ Provide definitive coding standards and best practices:
947
+
948
+ ```bash
949
+ /bluera-knowledge:add-folder ./company-standards --name=standards
950
+ /bluera-knowledge:add-folder ./api-specs --name=api-docs
951
+
952
+ # AI agents reference actual company standards, not generic advice
953
+ ```
954
+
955
+ ### πŸ”€ Mixed Sources
956
+
957
+ Combine canonical library code with project-specific patterns:
958
+
959
+ ```bash
960
+ /bluera-knowledge:add-repo https://github.com/facebook/react --name=react
961
+ /bluera-knowledge:add-folder ./docs/react-patterns --name=react-patterns
962
+
963
+ # Search across both dependency source and team patterns
964
+ ```
965
+
966
+ ---
967
+
968
+ ## πŸ’­ What Claude Code Says About Bluera Knowledge
969
+
970
+ > ### *As an AI coding assistant, here's what I've discovered using this plugin*
971
+ >
972
+ > ---
973
+ >
974
+ > #### ⚑ The Immediate Impact
975
+ >
976
+ > **The difference is immediate.** When a user asks "how does React's useEffect cleanup work?", I can search the actual React source code indexed locally instead of relying on my training data or making web requests. The results include the real implementation, related functions, and usage patternsβ€”all in ~100ms.
977
+ >
978
+ > **Code graph analysis changes the game.** The plugin doesn't just index filesβ€”it builds a relationship graph showing which functions call what, import dependencies, and class hierarchies. When I search for a function, I see how many places call it and what it calls. This context makes my suggestions dramatically more accurate.
979
+ >
980
+ > ---
981
+ >
982
+ > #### πŸ”€ Multi-Modal Search Power
983
+ >
984
+ > I can combine three search approaches in a single workflow:
985
+ >
986
+ > | Mode | Use Case | Example |
987
+ > |------|----------|---------|
988
+ > | 🧠 **Semantic** | Conceptual queries | "authentication flow with JWT validation" |
989
+ > | πŸ“‚ **Direct Access** | Pattern matching | Grep for specific identifiers in cloned repos |
990
+ > | πŸ“ **Full-Text** | Exact matches | Find precise function names or imports |
991
+ >
992
+ > This flexibility means I can start broad (semantic) and narrow down (exact file access) seamlessly.
993
+ >
994
+ > ---
995
+ >
996
+ > #### πŸ•·οΈ Intelligent Crawling
997
+ >
998
+ > **The `--crawl` instruction isn't marketing**β€”it actually uses Claude Code CLI to analyze each page and intelligently select which links to follow. I can tell it "crawl all API reference pages but skip blog posts" and it understands the intent.
999
+ >
1000
+ > For JavaScript-rendered sites (Next.js, React docs), the `--headless` mode renders pages with Playwright while I still control the crawl strategy with natural language.
1001
+ >
1002
+ > ---
1003
+ >
1004
+ > #### ✨ What Makes It Valuable
1005
+ >
1006
+ > | Benefit | Impact |
1007
+ > |---------|--------|
1008
+ > | βœ… **No guessing** | I read actual source code, not blog interpretations |
1009
+ > | πŸ”Œ **Offline first** | Works without internet, zero rate limits |
1010
+ > | 🎯 **Project-specific** | Index your team's standards, not generic advice |
1011
+ > | ⚑ **Speed** | Sub-100ms searches vs 2-5 second web lookups |
1012
+ > | πŸ“š **Completeness** | Tests, implementation details, edge casesβ€”all indexed |
1013
+ >
1014
+ > ---
1015
+ >
1016
+ > #### 🌟 When It Shines Most
1017
+ >
1018
+ > 1. **Deep library questions** - "how does this internal method handle edge cases?"
1019
+ > 2. **Version-specific answers** - your indexed version is what you're actually using
1020
+ > 3. **Private codebases** - your docs, your standards, your patterns
1021
+ > 4. **Complex workflows** - combining semantic search + direct file access + code graph
1022
+ >
1023
+ > ---
1024
+ >
1025
+ > The plugin essentially gives me a **photographic memory** of your dependencies and documentation.
1026
+ >
1027
+ > Instead of *"I think based on training data"*, I can say *"I searched the indexed React v18.2.0 source and found this in `ReactFiberWorkLoop.js:1247`"*.
1028
+ >
1029
+ > **That's the difference between helpful and authoritative.**
1030
+
1031
+ ---
1032
+
1033
+ ## πŸ”§ Dependencies
1034
+
1035
+ The plugin automatically checks for and attempts to install Python dependencies on first use:
1036
+
1037
+ **Required:**
1038
+ - **🐍 Python 3.8+** - Required for web crawling functionality
1039
+ - **πŸ•·οΈ crawl4ai** - Required for web crawling (auto-installed via SessionStart hook, includes playwright)
1040
+ - **🎭 Playwright browser binaries** - Required for `--headless` mode on JavaScript-rendered sites (**manual install required**)
1041
+
1042
+ **What the SessionStart hook installs:**
1043
+ - βœ… crawl4ai Python package (includes playwright as dependency)
1044
+ - ❌ Playwright browser binaries (you must run `playwright install` manually)
1045
+
1046
+ If auto-installation of crawl4ai fails, install manually:
1047
+
1048
+ ```bash
1049
+ pip install crawl4ai
1050
+ playwright install # Required for --headless mode (Next.js, React, Vue sites)
1051
+ ```
1052
+
1053
+ > [!WARNING]
1054
+ > The plugin will work without crawl4ai/playwright, but web crawling features (`/bluera-knowledge:crawl`) will be unavailable. For JavaScript-rendered sites (Next.js, React, Vue), use the `--headless` flag which requires playwright browser binaries.
1055
+
1056
+ **Update Plugin:**
1057
+ ```bash
1058
+ /plugin update bluera-knowledge
1059
+ ```
1060
+
1061
+ ---
1062
+
1063
+ ## πŸ”Œ MCP Integration
1064
+
1065
+ The plugin includes a Model Context Protocol server that exposes search tools. This is configured in `mcp.plugin.json`:
1066
+
1067
+ > [!IMPORTANT]
1068
+ > **Commands vs MCP Tools**: You interact with the plugin using `/bluera-knowledge:` slash commands. Behind the scenes, these commands instruct Claude Code to use MCP tools (`mcp__bluera-knowledge__*`) which handle the actual operations. Commands provide the user interface, while MCP tools are the backend that AI agents use to access your knowledge stores.
1069
+
1070
+ ```json
1071
+ {
1072
+ "mcpServers": {
1073
+ "bluera-knowledge": {
1074
+ "command": "node",
1075
+ "args": ["${CLAUDE_PLUGIN_ROOT}/dist/mcp/server.js"],
1076
+ "env": {
1077
+ "DATA_DIR": ".bluera/bluera-knowledge/data",
1078
+ "CONFIG_PATH": ".bluera/bluera-knowledge/config.json"
1079
+ }
1080
+ }
1081
+ }
1082
+ }
1083
+ ```
1084
+
1085
+ ### πŸ› οΈ Available MCP Tools
1086
+
1087
+ The plugin exposes 3 MCP tools optimized for minimal context overhead:
1088
+
1089
+ #### `search`
1090
+ πŸ” Semantic vector search across all indexed stores or a specific subset. Returns structured code units with relevance ranking.
1091
+
1092
+ **Parameters:**
1093
+ - `query` - Search query (natural language, patterns, or type signatures)
1094
+ - `intent` - Search intent: find-pattern, find-implementation, find-usage, find-definition, find-documentation
1095
+ - `detail` - Context level: minimal, contextual, or full
1096
+ - `limit` - Maximum results (default: 10)
1097
+ - `stores` - Array of specific store IDs to search (optional, searches all stores if not specified)
1098
+
1099
+ #### `get_full_context`
1100
+ πŸ“– Retrieve complete code and context for a specific search result by ID.
1101
+
1102
+ **Parameters:**
1103
+ - `resultId` - The result ID from a previous search
1104
+
1105
+ #### `execute`
1106
+ ⚑ Meta-tool for store and job management. Consolidates 8 operations into one tool with subcommands.
1107
+
1108
+ **Parameters:**
1109
+ - `command` - Command to execute (see below)
1110
+ - `args` - Command-specific arguments (optional)
1111
+
1112
+ **Available commands:**
1113
+ | Command | Args | Description |
1114
+ |---------|------|-------------|
1115
+ | `stores` | `type?` | List all knowledge stores |
1116
+ | `store:info` | `store` | Get detailed store information including file path |
1117
+ | `store:create` | `name`, `type`, `source`, `branch?`, `description?` | Create a new store |
1118
+ | `store:index` | `store` | Re-index an existing store |
1119
+ | `store:delete` | `store` | Delete a store and all data |
1120
+ | `jobs` | `activeOnly?`, `status?` | List background jobs |
1121
+ | `job:status` | `jobId` | Check specific job status |
1122
+ | `job:cancel` | `jobId` | Cancel a running job |
1123
+ | `help` | `command?` | Show help for commands |
1124
+ | `commands` | - | List all available commands |
1125
+
1126
+ ---
1127
+
1128
+ ## πŸ–₯️ CLI Tool
1129
+
1130
+ While Bluera Knowledge works seamlessly as a Claude Code plugin, it's also available as a standalone CLI tool for use outside Claude Code.
1131
+
1132
+ > [!NOTE]
1133
+ > When using CLI without Claude Code installed, web crawling uses simple BFS mode. Install Claude Code to unlock `--crawl` (AI-guided URL selection) and `--extract` (AI content extraction) instructions.
1134
+
1135
+ ### Installation
1136
+
1137
+ Install globally via npm:
1138
+
1139
+ ```bash
1140
+ npm install -g bluera-knowledge
1141
+ ```
1142
+
1143
+ Or use in a project:
1144
+
1145
+ ```bash
1146
+ npm install --save-dev bluera-knowledge
1147
+ ```
1148
+
1149
+ ### Usage
1150
+
1151
+ #### Create a Store
1152
+
1153
+ ```bash
1154
+ # Add a Git repository
1155
+ bluera-knowledge store create react --type repo --source https://github.com/facebook/react
1156
+
1157
+ # Add a local folder
1158
+ bluera-knowledge store create my-docs --type file --source ./docs
1159
+
1160
+ # Add a web crawl
1161
+ bluera-knowledge store create fastapi-docs --type web --source https://fastapi.tiangolo.com
1162
+ ```
1163
+
1164
+ #### Index a Store
1165
+
1166
+ ```bash
1167
+ bluera-knowledge index react
1168
+ ```
1169
+
1170
+ #### Search
1171
+
1172
+ ```bash
1173
+ # Search across all stores
1174
+ bluera-knowledge search "how does useEffect work"
1175
+
1176
+ # Search specific stores
1177
+ bluera-knowledge search "routing" --stores react,vue
1178
+
1179
+ # Get more results with full content
1180
+ bluera-knowledge search "middleware" --limit 20 --include-content
1181
+ ```
1182
+
1183
+ #### List Stores
1184
+
1185
+ ```bash
1186
+ bluera-knowledge store list
1187
+ bluera-knowledge store list --type repo # Filter by type
1188
+ ```
1189
+
1190
+ #### Store Info
1191
+
1192
+ ```bash
1193
+ bluera-knowledge store info react
1194
+ ```
1195
+
1196
+ #### Delete a Store
1197
+
1198
+ ```bash
1199
+ bluera-knowledge store delete old-store
1200
+ ```
1201
+
1202
+ ### Global Options
1203
+
1204
+ ```bash
1205
+ --config <path> # Custom config file
1206
+ --data-dir <path> # Custom data directory
1207
+ --format <format> # Output format: json | table | plain
1208
+ --quiet # Suppress non-essential output
1209
+ --verbose # Enable verbose logging
1210
+ ```
1211
+
1212
+ ### When to Use CLI vs Plugin
1213
+
1214
+ **Use CLI when:**
1215
+ - Using an editor other than Claude Code (VSCode, Cursor, etc.)
1216
+ - Integrating into CI/CD pipelines
1217
+ - Scripting or automation
1218
+ - Pre-indexing dependencies for teams
1219
+
1220
+ **Use Plugin when:**
1221
+ - Working within Claude Code
1222
+ - Want slash commands (`/bluera-knowledge:search`)
1223
+ - Need Claude to automatically query your knowledge base
1224
+ - Want Skills to guide optimal usage
1225
+
1226
+ Both interfaces use the same underlying services, so you can switch between them seamlessly.
1227
+
1228
+ ---
1229
+
1230
+ ## πŸŽ“ Skills for Claude Code
1231
+
1232
+ > [!NOTE]
1233
+ > Skills are a Claude Code-specific feature. They're automatically loaded when using the plugin but aren't available when using the npm package directly.
1234
+
1235
+ Bluera Knowledge includes built-in Skills that teach Claude Code how to use the plugin effectively. Skills provide procedural knowledge that complements the MCP tools.
1236
+
1237
+ ### πŸ“š Available Skills
1238
+
1239
+ #### `knowledge-search`
1240
+ Teaches the two approaches for accessing dependency sources:
1241
+ - Vector search via MCP/slash commands for discovery
1242
+ - Direct Grep/Read access to cloned repos for precision
1243
+
1244
+ **When to use:** Understanding how to query indexed libraries
1245
+
1246
+ #### `when-to-query`
1247
+ Decision guide for when to query BK stores vs using Grep/Read on current project.
1248
+
1249
+ **When to use:** Deciding whether a question is about libraries or your project code
1250
+
1251
+ #### `advanced-workflows`
1252
+ Multi-tool orchestration patterns for complex operations.
1253
+
1254
+ **When to use:** Progressive library exploration, adding libraries, handling large results
1255
+
1256
+ #### `search-optimization`
1257
+ Guide on search parameters and progressive detail strategies.
1258
+
1259
+ **When to use:** Optimizing search results, choosing the right intent and detail level
1260
+
1261
+ #### `store-lifecycle`
1262
+ Best practices for creating, indexing, and managing stores.
1263
+
1264
+ **When to use:** Adding new stores, understanding when to use repo/folder/crawl
1265
+
1266
+ ### πŸ”„ MCP + Skills Working Together
1267
+
1268
+ Skills teach **how** to use the MCP tools effectively:
1269
+ - MCP provides the **capabilities** (search, get_full_context, execute commands)
1270
+ - Skills provide **procedural knowledge** (when to use which tool, best practices, workflows)
1271
+
1272
+ This hybrid approach reduces unnecessary tool calls and context usage while maintaining universal MCP compatibility.
1273
+
1274
+ **Example:**
1275
+ - MCP tool: `search(query, intent, detail, limit, stores)`
1276
+ - Skill teaches: Which `intent` for your question type, when to use `detail='minimal'` vs `'full'`, how to narrow with `stores`
1277
+
1278
+ Result: Fewer tool calls, more accurate results, less context consumed.
1279
+
1280
+ ---
1281
+
1282
+ ## πŸ’Ύ Data Storage
1283
+
1284
+ Knowledge stores are stored in your project root:
1285
+
1286
+ ```
1287
+ <project-root>/.bluera/bluera-knowledge/
1288
+ β”œβ”€β”€ data/
1289
+ β”‚ β”œβ”€β”€ repos/<store-id>/ # Cloned Git repositories
1290
+ β”‚ β”œβ”€β”€ documents_*.lance/ # Vector indices (Lance DB)
1291
+ β”‚ └── stores.json # Store registry
1292
+ └── config.json # Configuration
1293
+ ```
1294
+
1295
+ > [!CAUTION]
1296
+ > **Important**: Add `.bluera/` to your `.gitignore` to avoid committing large repositories and vector indices to version control.
1297
+
1298
+ ---
1299
+
1300
+ ## πŸ› οΈ Development
1301
+
1302
+ ### πŸš€ Setup
1303
+
1304
+ ```bash
1305
+ git clone https://github.com/blueraai/bluera-knowledge.git
1306
+ cd bluera-knowledge
1307
+ bun install
1308
+ bun run build
1309
+ bun test
1310
+ ```
1311
+
1312
+ > **Note:** This project uses [Bun](https://bun.sh) for development. Install it via `curl -fsSL https://bun.sh/install | bash`
1313
+
1314
+ ### βš™οΈ Claude Code Settings (Recommended)
1315
+
1316
+ For the best development experience with Claude Code, copy the example settings file:
1317
+
1318
+ ```bash
1319
+ cp .claude/settings.local.json.example .claude/settings.local.json
1320
+ ```
1321
+
1322
+ **This provides:**
1323
+ - βœ… **Smart validation** - Automatically runs lint/typecheck after editing code (file-type aware)
1324
+ - βœ… **No permission prompts** - Pre-approves common commands (lint, typecheck, precommit)
1325
+ - βœ… **Desktop notifications** - macOS notifications when Claude needs your input
1326
+ - βœ… **Plugin auto-enabled** - Automatically enables the bluera-knowledge plugin
1327
+ - βœ… **Faster workflow** - Catch issues immediately without manual validation
1328
+
1329
+ The validation is intelligent - it only runs checks for TypeScript/JavaScript files, skipping docs/config to save time.
1330
+
1331
+ > **Note:** The `.claude/settings.local.json` file is gitignored (local to your machine). The example file is checked in for reference.
1332
+
1333
+ ### πŸ”Œ MCP Server
1334
+
1335
+ **`mcp.plugin.json`** (Plugin distribution)
1336
+ - Located at plugin root, referenced from `plugin.json`
1337
+ - Uses `${CLAUDE_PLUGIN_ROOT}` and points to compiled `dist/mcp/server.js`
1338
+ - Only loaded when directory is loaded as a plugin (no project/plugin conflict)
1339
+ - Committed to git and distributed with the plugin
1340
+
1341
+ **For local development/dogfooding:**
1342
+
1343
+ To enable live development without rebuilding, add a user-level MCP server config to `~/.claude.json`:
1344
+
1345
+ ```json
1346
+ {
1347
+ "mcpServers": {
1348
+ "bluera-knowledge-dev": {
1349
+ "command": "npx",
1350
+ "args": ["tsx", "/Users/yourname/repos/bluera-knowledge/src/mcp/server.ts"],
1351
+ "env": {
1352
+ "PWD": "${PWD}",
1353
+ "DATA_DIR": "${PWD}/.bluera/bluera-knowledge/data",
1354
+ "CONFIG_PATH": "${PWD}/.bluera/bluera-knowledge/config.json"
1355
+ }
1356
+ }
1357
+ }
1358
+ }
1359
+ ```
1360
+
1361
+ Replace the path with your actual repo location. This creates a separate `bluera-knowledge-dev` MCP server that:
1362
+ - Runs the source TypeScript directly via `tsx`
1363
+ - Updates immediately when you modify MCP server code
1364
+ - Doesn't interfere with the production plugin version
1365
+
1366
+ ### πŸ“œ Commands
1367
+
1368
+ | Command | Description | When to Use |
1369
+ |---------|-------------|-------------|
1370
+ | `bun run build` | πŸ—οΈ Compile TypeScript to dist/ | Before testing CLI, after code changes |
1371
+ | `bun run dev` | πŸ‘€ Watch mode compilation | During active development |
1372
+ | `bun start` | ▢️ Run the CLI | Execute CLI commands directly |
1373
+ | `bun test` | πŸ§ͺ Run tests in watch mode | During TDD/active development |
1374
+ | `bun run test:run` | βœ… Run tests once | Quick verification |
1375
+ | `bun run test:coverage` | πŸ“Š Run tests with coverage | Before committing, CI checks |
1376
+ | `bun run lint` | πŸ” Run ESLint | Check code style issues |
1377
+ | `bun run typecheck` | πŸ”’ Run TypeScript type checking | Verify type safety |
1378
+ | `bun run precommit` | ✨ Smart validation (file-type aware) | Runs only relevant checks based on changed files |
1379
+ | `bun run prepush` | πŸ“Š Smart coverage (skips for docs/config) | Runs coverage only when src/tests changed |
1380
+ | `bun run lint:quiet` | πŸ”‡ ESLint (minimal output) | Used by git hooks |
1381
+ | `bun run typecheck:quiet` | πŸ”‡ Type check (minimal output) | Used by git hooks |
1382
+ | `bun run test:changed:quiet` | πŸ”‡ Test changed files (minimal output) | Used by git hooks |
1383
+ | `bun run test:coverage:quiet` | πŸ”‡ Coverage (minimal output) | Used by git hooks |
1384
+ | `bun run build:quiet` | πŸ”‡ Build (minimal output) | Used by git hooks |
1385
+
1386
+ ### πŸ”„ Automatic Build & Dist Commit
1387
+
1388
+ The `dist/` directory **must be committed** because Claude Code plugins are installed by copying filesβ€”there's no build step during installation.
1389
+
1390
+ **Good news: This is fully automatic!**
1391
+
1392
+ 1. **On every commit**, the pre-commit hook intelligently validates based on file types
1393
+ 2. **If source/config changed**, it runs build and automatically stages `dist/` via `git add dist/`
1394
+ 3. **You never need to manually build or stage dist** β€” just commit your source changes
1395
+
1396
+ **For live rebuilding during development:**
1397
+
1398
+ ```bash
1399
+ bun run dev # Watches for changes and rebuilds instantly
1400
+ ```
1401
+
1402
+ This is useful when testing CLI commands locally, but not required for committing β€” the hook handles everything.
1403
+
1404
+ | `bun run version:patch` | πŸ”’ Bump patch version (0.0.x) + generate CHANGELOG | Bug fixes, minor updates |
1405
+ | `bun run version:minor` | πŸ”’ Bump minor version (0.x.0) + generate CHANGELOG | New features, backwards compatible |
1406
+ | `bun run version:major` | πŸ”’ Bump major version (x.0.0) + generate CHANGELOG | Breaking changes |
1407
+
1408
+ ### πŸš€ Releasing
1409
+
1410
+ ```bash
1411
+ # Bump version, commit, tag, and push (triggers GitHub Actions release)
1412
+ bun run release:patch # Bug fixes (0.0.x)
1413
+ bun run release:minor # New features (0.x.0)
1414
+ bun run release:major # Breaking changes (x.0.0)
1415
+ ```
1416
+
1417
+ **Workflow (Fully Automated):**
1418
+
1419
+ 1. Make changes and commit
1420
+ 2. Bump version: `bun run version:patch` (updates package.json, plugin.json, README, CHANGELOG)
1421
+ 3. Commit version bump: `git commit -am "chore: bump version to X.Y.Z"`
1422
+ 4. Push to main: `git push`
1423
+ 5. **GitHub Actions automatically:**
1424
+ - βœ… Runs CI (lint, typecheck, tests, build)
1425
+ - βœ… Creates release tag when CI passes
1426
+ - βœ… Creates GitHub release
1427
+ - βœ… Updates marketplace
1428
+
1429
+ > πŸ’‘ **That's it!** No manual tagging needed. Just push to `main` and the release happens automatically when CI passes.
1430
+
1431
+ ### πŸ§ͺ Testing Locally
1432
+
1433
+ **Option 1: Development MCP Server (Recommended)**
1434
+
1435
+ Use the local development MCP server (see "MCP Server" section above) which runs your source code directly via `tsx`:
1436
+
1437
+ 1. Set up dev MCP server in `~/.claude.json` (see MCP Server section)
1438
+ 2. Test your changes - MCP server updates automatically as you edit code
1439
+
1440
+ **Option 2: Test Plugin from Working Directory**
1441
+
1442
+ Load the plugin directly from your development directory:
1443
+
1444
+ ```bash
1445
+ cd /path/to/bluera-knowledge
1446
+ claude --plugin-dir .
1447
+ ```
1448
+
1449
+ The MCP config in `mcp.plugin.json` is only loaded when the directory is loaded as a plugin (via `--plugin-dir` or marketplace install), so there's no conflict with project-level MCP config.
1450
+
1451
+ **Option 3: CLI Tool Testing**
1452
+
1453
+ ```bash
1454
+ # Build and link
1455
+ cd /path/to/bluera-knowledge
1456
+ bun run build
1457
+ bun link
1458
+
1459
+ # Now 'bluera-knowledge' command is available globally
1460
+ cd ~/your-project
1461
+ bluera-knowledge search "test query" my-store
1462
+ ```
1463
+
1464
+ **For testing as an installed plugin:**
1465
+ This requires publishing a new version to the marketplace.
1466
+
1467
+ ### πŸ“‚ Project Structure
1468
+
1469
+ ```
1470
+ .claude-plugin/
1471
+ └── plugin.json # Plugin metadata (references mcp.plugin.json)
1472
+
1473
+ mcp.plugin.json # MCP server configuration (plugin-scoped)
1474
+ commands/ # Slash commands (auto-discovered)
1475
+ skills/ # Agent Skills (auto-discovered)
1476
+ β”œβ”€β”€ knowledge-search/ # How to access dependency sources
1477
+ β”‚ └── SKILL.md
1478
+ β”œβ”€β”€ when-to-query/ # When to query BK vs project files
1479
+ β”‚ └── SKILL.md
1480
+ β”œβ”€β”€ advanced-workflows/ # Multi-tool orchestration patterns
1481
+ β”‚ └── SKILL.md
1482
+ β”œβ”€β”€ search-optimization/ # Search parameter optimization
1483
+ β”‚ └── SKILL.md
1484
+ └── store-lifecycle/ # Store management best practices
1485
+ └── SKILL.md
1486
+ dist/ # Built MCP server (committed for distribution)
1487
+
1488
+ src/
1489
+ β”œβ”€β”€ analysis/ # Dependency analysis & URL resolution
1490
+ β”œβ”€β”€ crawl/ # Web crawling with Python bridge
1491
+ β”œβ”€β”€ services/ # Index, store, and search services
1492
+ β”œβ”€β”€ mcp/ # MCP server source
1493
+ └── cli/ # CLI entry point
1494
+
1495
+ tests/
1496
+ β”œβ”€β”€ integration/ # Integration tests
1497
+ └── fixtures/ # Test infrastructure
1498
+ ```
1499
+
1500
+ ---
1501
+
1502
+ ## πŸ”¬ Technologies
1503
+
1504
+ - **πŸ”Œ Claude Code Plugin System** with MCP server
1505
+ - **βœ… Runtime Validation** - [Zod](https://github.com/colinhacks/zod) schemas for Python-TypeScript boundary
1506
+ - **🌳 AST Parsing** - [@babel/parser](https://github.com/babel/babel) for JS/TS, Python AST module, [tree-sitter](https://github.com/tree-sitter/tree-sitter) for Rust and Go
1507
+ - **πŸ—ΊοΈ Code Graph** - Static analysis of function calls, imports, and class relationships
1508
+ - **🧠 Semantic Search** - AI-powered vector embeddings with [LanceDB](https://github.com/lancedb/lancedb)
1509
+ - **πŸ“¦ Git Operations** - Native git clone
1510
+ - **πŸ’» CLI** - [Commander.js](https://github.com/tj/commander.js)
1511
+ - **πŸ•·οΈ Web Crawling** - [crawl4ai](https://github.com/unclecode/crawl4ai) with [Playwright](https://github.com/microsoft/playwright) (headless browser)
1512
+
1513
+ ---
1514
+
1515
+ ## 🀝 Contributing
1516
+
1517
+ Contributions welcome! Please:
1518
+
1519
+ 1. 🍴 Fork the repository
1520
+ 2. 🌿 Create a feature branch
1521
+ 3. βœ… Add tests
1522
+ 4. πŸ“¬ Submit a pull request
1523
+
1524
+ ---
1525
+
1526
+ ## πŸ“„ License
1527
+
1528
+ MIT - See [LICENSE](./LICENSE) for details.
1529
+
1530
+ ## πŸ™ Acknowledgments
1531
+
1532
+ This project includes software developed by third parties. See [NOTICE](./NOTICE) for full attribution.
1533
+
1534
+ Key dependencies:
1535
+ - **[Crawl4AI](https://github.com/unclecode/crawl4ai)** - Web crawling (Apache-2.0). *This product includes software developed by UncleCode ([@unclecode](https://x.com/unclecode)) as part of the Crawl4AI project.*
1536
+ - **[LanceDB](https://github.com/lancedb/lancedb)** - Vector database (Apache-2.0)
1537
+ - **[Hugging Face Transformers](https://github.com/huggingface/transformers.js)** - Embeddings (Apache-2.0)
1538
+ - **[Playwright](https://github.com/microsoft/playwright)** - Browser automation (Apache-2.0)
1539
+
1540
+ ---
1541
+
1542
+ ## πŸ’¬ Support
1543
+
1544
+ - **πŸ› Issues**: [GitHub Issues](https://github.com/blueraai/bluera-knowledge/issues)
1545
+ - **πŸ“š Documentation**: [Claude Code Plugins](https://code.claude.com/docs/en/plugins)
1546
+ - **πŸ“ Changelog**: [CHANGELOG.md](./CHANGELOG.md)