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.
- package/.claude/commands/commit.md +37 -0
- package/.claude/hooks/post-edit-check.sh +41 -0
- package/.claude/settings.local.json.example +40 -0
- package/.claude/skills/atomic-commits/SKILL.md +53 -0
- package/.claude-plugin/plugin.json +13 -0
- package/.editorconfig +15 -0
- package/.github/workflows/auto-release.yml +59 -0
- package/.github/workflows/ci.yml +142 -0
- package/.github/workflows/release.yml +66 -0
- package/.github/workflows/update-marketplace.yml +96 -0
- package/.husky/pre-commit +47 -0
- package/.husky/pre-push +29 -0
- package/.versionrc.json +28 -0
- package/CHANGELOG.md +410 -0
- package/CLAUDE.md +109 -0
- package/LICENSE +21 -0
- package/NOTICE +47 -0
- package/README.md +1546 -0
- package/SECURITY.md +65 -0
- package/bun.lock +1758 -0
- package/commands/add-folder.md +48 -0
- package/commands/add-repo.md +50 -0
- package/commands/cancel.md +63 -0
- package/commands/check-status.md +78 -0
- package/commands/crawl.md +51 -0
- package/commands/index.md +48 -0
- package/commands/remove-store.md +52 -0
- package/commands/search.md +79 -0
- package/commands/search.sh +63 -0
- package/commands/stores.md +54 -0
- package/commands/suggest.md +82 -0
- package/dist/chunk-5QMHZUC4.js +3617 -0
- package/dist/chunk-5QMHZUC4.js.map +1 -0
- package/dist/chunk-BICFAWMN.js +656 -0
- package/dist/chunk-BICFAWMN.js.map +1 -0
- package/dist/chunk-J7J6LXOJ.js +958 -0
- package/dist/chunk-J7J6LXOJ.js.map +1 -0
- package/dist/chunk-L2YVNC63.js +59 -0
- package/dist/chunk-L2YVNC63.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1429 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/server.d.ts +15 -0
- package/dist/mcp/server.js +11 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/watch.service-YAIKKDCF.js +7 -0
- package/dist/watch.service-YAIKKDCF.js.map +1 -0
- package/dist/workers/background-worker-cli.d.ts +1 -0
- package/dist/workers/background-worker-cli.js +310 -0
- package/dist/workers/background-worker-cli.js.map +1 -0
- package/docs/plans/2024-12-17-ai-search-quality-implementation.md +752 -0
- package/docs/plans/2024-12-17-ai-search-quality-testing-design.md +201 -0
- package/docs/plans/2025-12-16-bluera-knowledge-cli.md +2951 -0
- package/docs/plans/2025-12-16-phase2-features.md +1518 -0
- package/docs/plans/2025-12-17-hil-implementation.md +926 -0
- package/docs/plans/2025-12-17-hil-quality-testing.md +224 -0
- package/docs/plans/2025-12-17-search-quality-phase1-implementation.md +1416 -0
- package/docs/plans/2025-12-17-search-quality-testing-v2-design.md +212 -0
- package/docs/plans/2025-12-28-ai-agent-optimization.md +1630 -0
- package/eslint-rules/require-skip-comment.js +81 -0
- package/eslint.config.js +61 -0
- package/hooks/check-dependencies.sh +110 -0
- package/hooks/format-search-results.py +132 -0
- package/hooks/hooks.json +27 -0
- package/hooks/job-status-hook.sh +51 -0
- package/knip.json +43 -0
- package/mcp.plugin.json +12 -0
- package/package.json +103 -0
- package/python/crawl_worker.py +275 -0
- package/python/requirements.txt +2 -0
- package/scripts/readme-version-updater.cjs +18 -0
- package/skills/advanced-workflows/SKILL.md +273 -0
- package/skills/atomic-commits/SKILL.md +77 -0
- package/skills/knowledge-search/SKILL.md +54 -0
- package/skills/search-optimization/SKILL.md +396 -0
- package/skills/store-lifecycle/SKILL.md +470 -0
- package/skills/when-to-query/SKILL.md +66 -0
- package/src/analysis/ast-parser.test.ts +423 -0
- package/src/analysis/ast-parser.ts +192 -0
- package/src/analysis/code-graph.test.ts +698 -0
- package/src/analysis/code-graph.ts +245 -0
- package/src/analysis/dependency-usage-analyzer.test.ts +799 -0
- package/src/analysis/dependency-usage-analyzer.ts +405 -0
- package/src/analysis/go-ast-parser.test.ts +531 -0
- package/src/analysis/go-ast-parser.ts +478 -0
- package/src/analysis/parser-factory.test.ts +132 -0
- package/src/analysis/parser-factory.ts +44 -0
- package/src/analysis/python-ast-parser.test.ts +210 -0
- package/src/analysis/python-ast-parser.ts +34 -0
- package/src/analysis/repo-url-resolver.test.ts +533 -0
- package/src/analysis/repo-url-resolver.ts +233 -0
- package/src/analysis/rust-ast-parser.test.ts +568 -0
- package/src/analysis/rust-ast-parser.ts +477 -0
- package/src/analysis/tree-sitter-parser.test.ts +297 -0
- package/src/analysis/tree-sitter-parser.ts +223 -0
- package/src/cli/commands/crawl.test.ts +942 -0
- package/src/cli/commands/crawl.ts +141 -0
- package/src/cli/commands/index-cmd.test.ts +722 -0
- package/src/cli/commands/index-cmd.ts +105 -0
- package/src/cli/commands/mcp.test.ts +218 -0
- package/src/cli/commands/mcp.ts +18 -0
- package/src/cli/commands/plugin-api.test.ts +313 -0
- package/src/cli/commands/plugin-api.ts +45 -0
- package/src/cli/commands/search.test.ts +911 -0
- package/src/cli/commands/search.ts +113 -0
- package/src/cli/commands/serve.test.ts +329 -0
- package/src/cli/commands/serve.ts +28 -0
- package/src/cli/commands/setup.test.ts +820 -0
- package/src/cli/commands/setup.ts +153 -0
- package/src/cli/commands/store.test.ts +1003 -0
- package/src/cli/commands/store.ts +167 -0
- package/src/cli/index.ts +7 -0
- package/src/cli/program.ts +59 -0
- package/src/crawl/article-converter.test.ts +604 -0
- package/src/crawl/article-converter.ts +98 -0
- package/src/crawl/bridge.test.ts +674 -0
- package/src/crawl/bridge.ts +236 -0
- package/src/crawl/claude-client.test.ts +663 -0
- package/src/crawl/claude-client.ts +234 -0
- package/src/crawl/intelligent-crawler.test.ts +931 -0
- package/src/crawl/intelligent-crawler.ts +428 -0
- package/src/crawl/markdown-utils.test.ts +703 -0
- package/src/crawl/markdown-utils.ts +228 -0
- package/src/crawl/schemas.ts +114 -0
- package/src/db/embeddings.test.ts +63 -0
- package/src/db/embeddings.ts +69 -0
- package/src/db/index.ts +2 -0
- package/src/db/lance.test.ts +390 -0
- package/src/db/lance.ts +164 -0
- package/src/defaults/repos.ts +67 -0
- package/src/index.ts +107 -0
- package/src/mcp/cache.test.ts +202 -0
- package/src/mcp/cache.ts +103 -0
- package/src/mcp/commands/index.ts +20 -0
- package/src/mcp/commands/job.commands.ts +54 -0
- package/src/mcp/commands/meta.commands.ts +54 -0
- package/src/mcp/commands/registry.ts +183 -0
- package/src/mcp/commands/store.commands.ts +75 -0
- package/src/mcp/handlers/execute.handler.test.ts +179 -0
- package/src/mcp/handlers/execute.handler.ts +24 -0
- package/src/mcp/handlers/index.ts +43 -0
- package/src/mcp/handlers/job.handler.test.ts +189 -0
- package/src/mcp/handlers/job.handler.ts +116 -0
- package/src/mcp/handlers/search.handler.test.ts +334 -0
- package/src/mcp/handlers/search.handler.ts +209 -0
- package/src/mcp/handlers/store.handler.test.ts +415 -0
- package/src/mcp/handlers/store.handler.ts +295 -0
- package/src/mcp/schemas/index.test.ts +315 -0
- package/src/mcp/schemas/index.ts +138 -0
- package/src/mcp/server.test.ts +36 -0
- package/src/mcp/server.ts +162 -0
- package/src/mcp/types.ts +41 -0
- package/src/plugin/commands.test.ts +789 -0
- package/src/plugin/commands.ts +257 -0
- package/src/plugin/dependency-analyzer.test.ts +380 -0
- package/src/plugin/dependency-analyzer.ts +147 -0
- package/src/plugin/git-clone.test.ts +332 -0
- package/src/plugin/git-clone.ts +57 -0
- package/src/server/app.test.ts +752 -0
- package/src/server/app.ts +119 -0
- package/src/server/index.test.ts +477 -0
- package/src/server/index.ts +1 -0
- package/src/services/chunking.service.test.ts +363 -0
- package/src/services/chunking.service.ts +350 -0
- package/src/services/code-graph.service.test.ts +304 -0
- package/src/services/code-graph.service.ts +302 -0
- package/src/services/code-unit.service.test.ts +596 -0
- package/src/services/code-unit.service.ts +115 -0
- package/src/services/config.service.test.ts +127 -0
- package/src/services/config.service.ts +69 -0
- package/src/services/index.service.test.ts +1002 -0
- package/src/services/index.service.ts +266 -0
- package/src/services/index.ts +75 -0
- package/src/services/job.service.test.ts +418 -0
- package/src/services/job.service.ts +246 -0
- package/src/services/project-root.service.test.ts +506 -0
- package/src/services/project-root.service.ts +112 -0
- package/src/services/search.service.test.ts +1105 -0
- package/src/services/search.service.ts +892 -0
- package/src/services/services.test.ts +38 -0
- package/src/services/snippet.service.test.ts +205 -0
- package/src/services/snippet.service.ts +166 -0
- package/src/services/store.service.test.ts +474 -0
- package/src/services/store.service.ts +225 -0
- package/src/services/watch.service.test.ts +553 -0
- package/src/services/watch.service.ts +71 -0
- package/src/types/brands.test.ts +45 -0
- package/src/types/brands.ts +32 -0
- package/src/types/config.ts +79 -0
- package/src/types/document.ts +30 -0
- package/src/types/index.ts +66 -0
- package/src/types/job.ts +46 -0
- package/src/types/progress.ts +9 -0
- package/src/types/result.test.ts +44 -0
- package/src/types/result.ts +41 -0
- package/src/types/search.ts +95 -0
- package/src/types/store.test.ts +69 -0
- package/src/types/store.ts +47 -0
- package/src/utils/type-guards.test.ts +346 -0
- package/src/utils/type-guards.ts +61 -0
- package/src/workers/background-worker-cli.ts +105 -0
- package/src/workers/background-worker.test.ts +178 -0
- package/src/workers/background-worker.ts +294 -0
- package/src/workers/spawn-worker.test.ts +128 -0
- package/src/workers/spawn-worker.ts +49 -0
- package/tests/analysis/ast-parser.test.ts +98 -0
- package/tests/analysis/code-graph.test.ts +60 -0
- package/tests/fixtures/README.md +114 -0
- package/tests/fixtures/code-snippets/api/error-handling.ts +267 -0
- package/tests/fixtures/code-snippets/api/rest-controller.ts +303 -0
- package/tests/fixtures/code-snippets/auth/jwt-auth.ts +213 -0
- package/tests/fixtures/code-snippets/auth/oauth-flow.ts +245 -0
- package/tests/fixtures/code-snippets/database/repository-pattern.ts +272 -0
- package/tests/fixtures/corpus/VERSION.md +25 -0
- package/tests/fixtures/corpus/articles/jwt-authentication.md +97 -0
- package/tests/fixtures/corpus/articles/react-hooks-patterns.md +127 -0
- package/tests/fixtures/corpus/articles/typescript-generics.md +111 -0
- package/tests/fixtures/corpus/documentation/express-middleware.md +71 -0
- package/tests/fixtures/corpus/documentation/express-routing.md +83 -0
- package/tests/fixtures/corpus/documentation/node-streams.md +78 -0
- package/tests/fixtures/corpus/oss-repos/express/History.md +3871 -0
- package/tests/fixtures/corpus/oss-repos/express/LICENSE +24 -0
- package/tests/fixtures/corpus/oss-repos/express/Readme.md +276 -0
- package/tests/fixtures/corpus/oss-repos/express/SECURITY.md +56 -0
- package/tests/fixtures/corpus/oss-repos/express/benchmarks/Makefile +17 -0
- package/tests/fixtures/corpus/oss-repos/express/benchmarks/README.md +34 -0
- package/tests/fixtures/corpus/oss-repos/express/benchmarks/middleware.js +20 -0
- package/tests/fixtures/corpus/oss-repos/express/benchmarks/run +18 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/README.md +29 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/auth/index.js +134 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/auth/views/foot.ejs +2 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/auth/views/head.ejs +20 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/auth/views/login.ejs +21 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/content-negotiation/db.js +9 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/content-negotiation/index.js +46 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/content-negotiation/users.js +19 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/cookie-sessions/index.js +25 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/cookies/index.js +53 -0
- 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
- package/tests/fixtures/corpus/oss-repos/express/examples/downloads/files/amazing.txt +1 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/downloads/files/notes/groceries.txt +3 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/downloads/index.js +40 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/ejs/index.js +57 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/ejs/public/stylesheets/style.css +4 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/ejs/views/footer.html +2 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/ejs/views/header.html +9 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/ejs/views/users.html +10 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/error/index.js +53 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/error-pages/index.js +103 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/error-pages/views/404.ejs +3 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/error-pages/views/500.ejs +8 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/error-pages/views/error_header.ejs +10 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/error-pages/views/footer.ejs +2 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/error-pages/views/index.ejs +20 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/hello-world/index.js +15 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/markdown/index.js +44 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/markdown/views/index.md +4 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/multi-router/controllers/api_v1.js +15 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/multi-router/controllers/api_v2.js +15 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/multi-router/index.js +18 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/main/index.js +5 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/pet/index.js +31 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/pet/views/edit.ejs +17 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/pet/views/show.ejs +15 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/user/index.js +41 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/user/views/edit.hbs +27 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/user/views/list.hbs +18 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/user/views/show.hbs +31 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/mvc/controllers/user-pet/index.js +22 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/mvc/db.js +16 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/mvc/index.js +95 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/mvc/lib/boot.js +83 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/mvc/public/style.css +14 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/mvc/views/404.ejs +13 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/mvc/views/5xx.ejs +13 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/online/index.js +61 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/params/index.js +74 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/resource/index.js +95 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/route-map/index.js +75 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/route-middleware/index.js +90 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/index.js +55 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/post.js +13 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/public/style.css +24 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/site.js +5 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/user.js +47 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/views/footer.ejs +2 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/views/header.ejs +9 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/views/index.ejs +10 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/views/posts/index.ejs +12 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/views/users/edit.ejs +23 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/views/users/index.ejs +14 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/route-separation/views/users/view.ejs +9 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/search/index.js +61 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/search/public/client.js +15 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/search/public/index.html +21 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/session/index.js +37 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/session/redis.js +39 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/static-files/index.js +43 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/static-files/public/css/style.css +3 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/static-files/public/hello.txt +1 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/static-files/public/js/app.js +1 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/vhost/index.js +53 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/view-constructor/github-view.js +53 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/view-constructor/index.js +48 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/view-locals/index.js +155 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/view-locals/user.js +36 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/view-locals/views/index.ejs +20 -0
- package/tests/fixtures/corpus/oss-repos/express/examples/web-service/index.js +117 -0
- package/tests/fixtures/corpus/oss-repos/express/index.js +11 -0
- package/tests/fixtures/corpus/oss-repos/express/lib/application.js +631 -0
- package/tests/fixtures/corpus/oss-repos/express/lib/express.js +81 -0
- package/tests/fixtures/corpus/oss-repos/express/lib/request.js +514 -0
- package/tests/fixtures/corpus/oss-repos/express/lib/response.js +1053 -0
- package/tests/fixtures/corpus/oss-repos/express/lib/utils.js +271 -0
- package/tests/fixtures/corpus/oss-repos/express/lib/view.js +205 -0
- package/tests/fixtures/corpus/oss-repos/express/package.json +99 -0
- package/tests/fixtures/corpus/oss-repos/express/test/Route.js +274 -0
- package/tests/fixtures/corpus/oss-repos/express/test/Router.js +636 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/auth.js +117 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/content-negotiation.js +49 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/cookie-sessions.js +38 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/cookies.js +71 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/downloads.js +47 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/ejs.js +17 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/error-pages.js +99 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/error.js +29 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/hello-world.js +21 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/markdown.js +21 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/multi-router.js +44 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/mvc.js +132 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/params.js +44 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/resource.js +68 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/route-map.js +45 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/route-separation.js +97 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/vhost.js +46 -0
- package/tests/fixtures/corpus/oss-repos/express/test/acceptance/web-service.js +105 -0
- package/tests/fixtures/corpus/oss-repos/express/test/app.all.js +38 -0
- package/tests/fixtures/corpus/oss-repos/express/test/app.engine.js +83 -0
- package/tests/fixtures/corpus/oss-repos/express/test/app.head.js +66 -0
- package/tests/fixtures/corpus/oss-repos/express/test/app.js +120 -0
- package/tests/fixtures/corpus/oss-repos/express/test/app.listen.js +55 -0
- package/tests/fixtures/corpus/oss-repos/express/test/app.locals.js +26 -0
- package/tests/fixtures/corpus/oss-repos/express/test/app.options.js +116 -0
- package/tests/fixtures/corpus/oss-repos/express/test/app.param.js +323 -0
- package/tests/fixtures/corpus/oss-repos/express/test/app.render.js +374 -0
- package/tests/fixtures/corpus/oss-repos/express/test/app.request.js +143 -0
- package/tests/fixtures/corpus/oss-repos/express/test/app.response.js +143 -0
- package/tests/fixtures/corpus/oss-repos/express/test/app.route.js +197 -0
- package/tests/fixtures/corpus/oss-repos/express/test/app.router.js +1217 -0
- package/tests/fixtures/corpus/oss-repos/express/test/app.routes.error.js +62 -0
- package/tests/fixtures/corpus/oss-repos/express/test/app.use.js +542 -0
- package/tests/fixtures/corpus/oss-repos/express/test/config.js +207 -0
- package/tests/fixtures/corpus/oss-repos/express/test/exports.js +82 -0
- package/tests/fixtures/corpus/oss-repos/express/test/express.json.js +755 -0
- package/tests/fixtures/corpus/oss-repos/express/test/express.raw.js +513 -0
- package/tests/fixtures/corpus/oss-repos/express/test/express.static.js +815 -0
- package/tests/fixtures/corpus/oss-repos/express/test/express.text.js +566 -0
- package/tests/fixtures/corpus/oss-repos/express/test/express.urlencoded.js +828 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/% of dogs.txt +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/.name +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/blog/index.html +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/blog/post/index.tmpl +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/broken.send +0 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/default_layout/name.tmpl +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/default_layout/user.tmpl +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/email.tmpl +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/empty.txt +0 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/local_layout/user.tmpl +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/name.tmpl +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/name.txt +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/nums.txt +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/pets/names.txt +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/snow /342/230/203/.gitkeep +0 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/todo.html +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/todo.txt +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/user.html +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/user.tmpl +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/users/index.html +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/fixtures/users/tobi.txt +1 -0
- package/tests/fixtures/corpus/oss-repos/express/test/middleware.basic.js +42 -0
- package/tests/fixtures/corpus/oss-repos/express/test/regression.js +20 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.accepts.js +125 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.acceptsCharsets.js +50 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.acceptsEncodings.js +39 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.acceptsLanguages.js +57 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.baseUrl.js +88 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.fresh.js +70 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.get.js +60 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.host.js +156 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.hostname.js +188 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.ip.js +113 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.ips.js +71 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.is.js +169 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.path.js +20 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.protocol.js +113 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.query.js +106 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.range.js +104 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.route.js +28 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.secure.js +101 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.signedCookies.js +37 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.stale.js +50 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.subdomains.js +173 -0
- package/tests/fixtures/corpus/oss-repos/express/test/req.xhr.js +42 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.append.js +116 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.attachment.js +79 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.clearCookie.js +62 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.cookie.js +295 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.download.js +487 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.format.js +248 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.get.js +21 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.json.js +186 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.jsonp.js +344 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.links.js +65 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.locals.js +40 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.location.js +316 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.redirect.js +214 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.render.js +367 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.send.js +569 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.sendFile.js +913 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.sendStatus.js +44 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.set.js +124 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.status.js +206 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.type.js +46 -0
- package/tests/fixtures/corpus/oss-repos/express/test/res.vary.js +90 -0
- package/tests/fixtures/corpus/oss-repos/express/test/support/env.js +3 -0
- package/tests/fixtures/corpus/oss-repos/express/test/support/tmpl.js +36 -0
- package/tests/fixtures/corpus/oss-repos/express/test/support/utils.js +86 -0
- package/tests/fixtures/corpus/oss-repos/express/test/utils.js +83 -0
- package/tests/fixtures/corpus/oss-repos/hono/.devcontainer/Dockerfile +11 -0
- package/tests/fixtures/corpus/oss-repos/hono/.devcontainer/devcontainer.json +21 -0
- package/tests/fixtures/corpus/oss-repos/hono/.devcontainer/docker-compose.yml +18 -0
- package/tests/fixtures/corpus/oss-repos/hono/.eslintignore +1 -0
- package/tests/fixtures/corpus/oss-repos/hono/.eslintrc.cjs +9 -0
- package/tests/fixtures/corpus/oss-repos/hono/.gitpod.yml +9 -0
- package/tests/fixtures/corpus/oss-repos/hono/.prettierrc +9 -0
- package/tests/fixtures/corpus/oss-repos/hono/.vitest.config/jsx-runtime-default.ts +15 -0
- package/tests/fixtures/corpus/oss-repos/hono/.vitest.config/jsx-runtime-dom.ts +15 -0
- package/tests/fixtures/corpus/oss-repos/hono/.vitest.config/setup-vitest.ts +47 -0
- package/tests/fixtures/corpus/oss-repos/hono/LICENSE +21 -0
- package/tests/fixtures/corpus/oss-repos/hono/README.md +91 -0
- package/tests/fixtures/corpus/oss-repos/hono/build.ts +80 -0
- package/tests/fixtures/corpus/oss-repos/hono/bun.lockb +0 -0
- package/tests/fixtures/corpus/oss-repos/hono/bunfig.toml +7 -0
- package/tests/fixtures/corpus/oss-repos/hono/codecov.yml +13 -0
- package/tests/fixtures/corpus/oss-repos/hono/docs/CODE_OF_CONDUCT.md +128 -0
- package/tests/fixtures/corpus/oss-repos/hono/docs/CONTRIBUTING.md +62 -0
- package/tests/fixtures/corpus/oss-repos/hono/docs/MIGRATION.md +295 -0
- package/tests/fixtures/corpus/oss-repos/hono/docs/images/hono-logo.png +0 -0
- package/tests/fixtures/corpus/oss-repos/hono/docs/images/hono-logo.pxm +0 -0
- package/tests/fixtures/corpus/oss-repos/hono/docs/images/hono-logo.svg +6 -0
- package/tests/fixtures/corpus/oss-repos/hono/docs/images/hono-title.png +0 -0
- package/tests/fixtures/corpus/oss-repos/hono/docs/images/hono-title.pxm +0 -0
- package/tests/fixtures/corpus/oss-repos/hono/jsr.json +119 -0
- package/tests/fixtures/corpus/oss-repos/hono/package.cjs.json +3 -0
- package/tests/fixtures/corpus/oss-repos/hono/package.json +650 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/aws-lambda/handler.ts +492 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/aws-lambda/index.ts +13 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/aws-lambda/types.ts +144 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/bun/conninfo.ts +28 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/bun/index.ts +9 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/bun/serve-static.ts +35 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/bun/server.ts +30 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/bun/ssg.ts +27 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/bun/websocket.ts +110 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-pages/handler.ts +120 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-pages/index.ts +7 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-workers/conninfo.ts +7 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-workers/index.ts +8 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-workers/serve-static-module.ts +12 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-workers/serve-static.ts +39 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-workers/utils.ts +50 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-workers/websocket.ts +50 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/deno/conninfo.ts +17 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/deno/deno.d.ts +28 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/deno/index.ts +9 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/deno/serve-static.ts +40 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/deno/ssg.ts +27 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/deno/websocket.ts +51 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/lambda-edge/conninfo.ts +15 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/lambda-edge/handler.ts +189 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/lambda-edge/index.ts +14 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/netlify/handler.ts +10 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/netlify/index.ts +6 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/netlify/mod.ts +1 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/service-worker/handler.ts +34 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/service-worker/index.ts +5 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/service-worker/types.ts +14 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/vercel/conninfo.ts +8 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/vercel/handler.ts +9 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/adapter/vercel/index.ts +7 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/client/client.ts +214 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/client/index.ts +14 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/client/types.ts +180 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/client/utils.ts +54 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/compose.ts +94 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/context.ts +914 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/accepts/accepts.ts +81 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/accepts/index.ts +6 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/adapter/index.ts +85 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/conninfo/index.ts +6 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/conninfo/types.ts +45 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/cookie/index.ts +130 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/css/common.ts +243 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/css/index.ts +220 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/dev/index.ts +79 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/factory/index.ts +246 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/html/index.ts +56 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/ssg/index.ts +13 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/ssg/middleware.ts +79 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/ssg/ssg.ts +388 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/ssg/utils.ts +71 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/streaming/index.ts +9 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/streaming/sse.ts +89 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/streaming/stream.ts +36 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/streaming/text.ts +15 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/testing/index.ts +26 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/helper/websocket/index.ts +57 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/hono-base.ts +523 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/hono.ts +34 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/http-exception.ts +78 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/index.ts +51 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/base.ts +419 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/children.ts +20 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/components.ts +195 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/constants.ts +5 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/context.ts +50 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/client.ts +89 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/components.ts +39 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/context.ts +52 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/css.ts +246 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/hooks/index.ts +91 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/index.ts +159 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/intrinsic-element/components.ts +398 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/jsx-dev-runtime.ts +22 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/jsx-runtime.ts +7 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/render.ts +772 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/server.ts +70 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/utils.ts +7 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/hooks/index.ts +426 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/index.ts +114 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/intrinsic-element/common.ts +11 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/intrinsic-element/components.ts +196 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/intrinsic-elements.ts +924 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/jsx-dev-runtime.ts +26 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/jsx-runtime.ts +18 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/streaming.ts +184 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/types.ts +41 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/jsx/utils.ts +36 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/basic-auth/index.ts +128 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/bearer-auth/index.ts +159 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/body-limit/index.ts +115 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/cache/index.ts +127 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/combine/index.ts +153 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/compress/index.ts +79 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/context-storage/index.ts +55 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/cors/index.ts +141 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/csrf/index.ts +90 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/etag/index.ts +88 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/ip-restriction/index.ts +178 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/jsx-renderer/index.ts +158 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/jwt/index.ts +8 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/jwt/jwt.ts +159 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/logger/index.ts +93 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/method-override/index.ts +146 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/powered-by/index.ts +13 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/pretty-json/index.ts +50 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/request-id/index.ts +8 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/request-id/request-id.ts +59 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/secure-headers/index.ts +8 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/secure-headers/permissions-policy.ts +86 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/secure-headers/secure-headers.ts +319 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/serve-static/index.ts +140 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/timeout/index.ts +58 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/timing/index.ts +7 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/timing/timing.ts +225 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/middleware/trailing-slash/index.ts +71 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/preset/quick.ts +24 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/preset/tiny.ts +20 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/request.ts +403 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/router/linear-router/index.ts +6 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/router/linear-router/router.ts +132 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/router/pattern-router/index.ts +6 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/router/pattern-router/router.ts +54 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/router/reg-exp-router/index.ts +6 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/router/reg-exp-router/node.ts +159 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/router/reg-exp-router/router.ts +274 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/router/reg-exp-router/trie.ts +74 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/router/smart-router/index.ts +6 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/router/smart-router/router.ts +69 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/router/trie-router/index.ts +6 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/router/trie-router/node.ts +205 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/router/trie-router/router.ts +28 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/router.ts +103 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/types.ts +2009 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/basic-auth.ts +26 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/body.ts +225 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/buffer.ts +65 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/color.ts +26 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/concurrent.ts +55 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/cookie.ts +230 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/crypto.ts +65 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/encode.ts +34 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/filepath.ts +56 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/handler.ts +15 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/html.ts +182 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/http-status.ts +69 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/ipaddr.ts +113 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/jwt/index.ts +7 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/jwt/jwa.ts +23 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/jwt/jws.ts +226 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/jwt/jwt.ts +114 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/jwt/types.ts +83 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/jwt/utf8.ts +7 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/mime.ts +142 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/stream.ts +96 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/types.ts +105 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/utils/url.ts +310 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/validator/index.ts +7 -0
- package/tests/fixtures/corpus/oss-repos/hono/src/validator/validator.ts +151 -0
- package/tests/fixtures/corpus/oss-repos/hono/tsconfig.build.json +23 -0
- package/tests/fixtures/corpus/oss-repos/hono/tsconfig.json +28 -0
- package/tests/fixtures/corpus/oss-repos/hono/vitest.config.ts +34 -0
- package/tests/fixtures/corpus/oss-repos/hono/yarn.lock +6232 -0
- package/tests/fixtures/documentation/api-reference.md +412 -0
- package/tests/fixtures/documentation/architecture.md +214 -0
- package/tests/fixtures/documentation/deployment-guide.md +420 -0
- package/tests/fixtures/github-readmes/express.md +133 -0
- package/tests/fixtures/github-readmes/nextjs.md +106 -0
- package/tests/fixtures/github-readmes/react.md +74 -0
- package/tests/fixtures/github-readmes/typescript.md +93 -0
- package/tests/fixtures/github-readmes/vite.md +79 -0
- package/tests/fixtures/queries/core.json +125 -0
- package/tests/fixtures/queries/extended.json +427 -0
- package/tests/fixtures/queries/generated/.gitkeep +0 -0
- package/tests/fixtures/test-server.ts +267 -0
- package/tests/helpers/performance-metrics.ts +387 -0
- package/tests/helpers/search-relevance.ts +381 -0
- package/tests/integration/cli-consistency.test.ts +299 -0
- package/tests/integration/cli.test.ts +69 -0
- package/tests/integration/e2e-workflow.test.ts +612 -0
- package/tests/integration/python-bridge.test.ts +183 -0
- package/tests/integration/search-quality.test.ts +718 -0
- package/tests/integration/stress.test.ts +326 -0
- package/tests/mcp/server.test.ts +15 -0
- package/tests/scripts/schemas/evaluation.json +44 -0
- package/tests/scripts/schemas/query-generation.json +21 -0
- package/tests/services/code-unit.service.test.ts +47 -0
- package/tests/services/search.progressive-context.test.ts +35 -0
- package/tsconfig.json +34 -0
- package/tsup.config.ts +15 -0
- package/turndown-plugin-gfm.d.ts +29 -0
- package/vitest.config.ts +79 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/mcp/server.ts","../src/mcp/schemas/index.ts","../src/mcp/cache.ts","../src/mcp/handlers/search.handler.ts","../src/mcp/handlers/index.ts","../src/mcp/commands/registry.ts","../src/mcp/commands/store.commands.ts","../src/mcp/handlers/store.handler.ts","../src/workers/spawn-worker.ts","../src/mcp/commands/job.commands.ts","../src/mcp/handlers/job.handler.ts","../src/mcp/commands/meta.commands.ts","../src/mcp/commands/index.ts","../src/mcp/handlers/execute.handler.ts"],"sourcesContent":["import { Server } from '@modelcontextprotocol/sdk/server/index.js';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport {\n CallToolRequestSchema,\n ListToolsRequestSchema,\n} from '@modelcontextprotocol/sdk/types.js';\nimport { createServices } from '../services/index.js';\nimport { tools } from './handlers/index.js';\nimport { handleExecute } from './handlers/execute.handler.js';\nimport { ExecuteArgsSchema } from './schemas/index.js';\nimport type { MCPServerOptions } from './types.js';\n\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport function createMCPServer(options: MCPServerOptions): Server {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const server = new Server(\n {\n name: 'bluera-knowledge',\n version: '1.0.0',\n },\n {\n capabilities: {\n tools: {},\n },\n }\n );\n\n // List available tools - consolidated from 10 tools to 3 for reduced context overhead\n server.setRequestHandler(ListToolsRequestSchema, () => {\n return Promise.resolve({\n tools: [\n // Native search tool with full schema (most used, benefits from detailed params)\n {\n name: 'search',\n description: 'Search all indexed knowledge stores with pattern detection and AI-optimized results. Returns structured code units with progressive context layers.',\n inputSchema: {\n type: 'object',\n properties: {\n query: {\n type: 'string',\n description: 'Search query (can include type signatures, constraints, or natural language)'\n },\n intent: {\n type: 'string',\n enum: ['find-pattern', 'find-implementation', 'find-usage', 'find-definition', 'find-documentation'],\n description: 'Search intent for better ranking'\n },\n detail: {\n type: 'string',\n enum: ['minimal', 'contextual', 'full'],\n default: 'minimal',\n description: 'Context detail level: minimal (summary only), contextual (+ imports/types), full (+ complete code)'\n },\n limit: {\n type: 'number',\n default: 10,\n description: 'Maximum number of results'\n },\n stores: {\n type: 'array',\n items: { type: 'string' },\n description: 'Specific store IDs to search (optional)'\n }\n },\n required: ['query']\n }\n },\n // Native get_full_context tool (frequently used after search)\n {\n name: 'get_full_context',\n description: 'Get complete code and context for a specific search result by ID. Use this after search to get full implementation details.',\n inputSchema: {\n type: 'object',\n properties: {\n resultId: {\n type: 'string',\n description: 'Result ID from previous search'\n }\n },\n required: ['resultId']\n }\n },\n // Meta-tool for store and job management (consolidates 8 tools into 1)\n {\n name: 'execute',\n description: 'Execute store/job management commands. Commands: stores, store:info, store:create, store:index, store:delete, jobs, job:status, job:cancel, help, commands',\n inputSchema: {\n type: 'object',\n properties: {\n command: {\n type: 'string',\n description: 'Command to execute (e.g., \"stores\", \"store:create\", \"jobs\", \"help\")'\n },\n args: {\n type: 'object',\n description: 'Command arguments (e.g., {store: \"mystore\"} for store:info)'\n }\n },\n required: ['command']\n }\n }\n ]\n });\n });\n\n // Handle tool calls\n server.setRequestHandler(CallToolRequestSchema, async (request) => {\n const { name, arguments: args } = request.params;\n\n // Create services once (needed by all handlers)\n const services = await createServices(\n options.config,\n options.dataDir,\n options.projectRoot\n );\n const context = { services, options };\n\n // Handle execute meta-tool\n if (name === 'execute') {\n const validated = ExecuteArgsSchema.parse(args ?? {});\n return handleExecute(validated, context);\n }\n\n // Find handler in registry for native tools (search, get_full_context)\n const tool = tools.find(t => t.name === name);\n if (tool === undefined) {\n throw new Error(`Unknown tool: ${name}`);\n }\n\n // Validate arguments with Zod\n const validated = tool.schema.parse(args ?? {});\n\n // Execute handler with context\n return tool.handler(validated, context);\n });\n\n return server;\n}\n\nexport async function runMCPServer(options: MCPServerOptions): Promise<void> {\n const server = createMCPServer(options);\n const transport = new StdioServerTransport();\n await server.connect(transport);\n\n console.error('Bluera Knowledge MCP server running on stdio');\n}\n\n// Run the server only when this file is executed directly (not imported by CLI)\n// Check if we're running as the mcp/server entry point vs being imported by index.js\nconst scriptPath = process.argv[1] ?? '';\nconst isMCPServerEntry = scriptPath.endsWith('mcp/server.js') || scriptPath.endsWith('mcp/server');\n\nif (isMCPServerEntry) {\n runMCPServer({\n dataDir: process.env['DATA_DIR'],\n config: process.env['CONFIG_PATH'],\n projectRoot: process.env['PROJECT_ROOT'] ?? process.env['PWD']\n }).catch((error: unknown) => {\n console.error('Failed to start MCP server:', error);\n process.exit(1);\n });\n}\n","import { z } from 'zod';\n\n/**\n * Validation schemas for all MCP tool inputs\n *\n * These schemas provide runtime type validation and better error messages\n * compared to manual type assertions.\n */\n\n// ============================================================================\n// Search Tool Schemas\n// ============================================================================\n\n/**\n * Schema for search tool arguments\n */\nexport const SearchArgsSchema = z.object({\n query: z.string().min(1, 'Query must be a non-empty string'),\n intent: z\n .enum(['find-pattern', 'find-implementation', 'find-usage', 'find-definition', 'find-documentation'])\n .optional(),\n detail: z.enum(['minimal', 'contextual', 'full']).default('minimal'),\n limit: z.number().int().positive().default(10),\n stores: z.array(z.string()).optional()\n});\n\nexport type SearchArgs = z.infer<typeof SearchArgsSchema>;\n\n/**\n * Schema for get_full_context tool arguments\n */\nexport const GetFullContextArgsSchema = z.object({\n resultId: z.string().min(1, 'Result ID must be a non-empty string')\n});\n\nexport type GetFullContextArgs = z.infer<typeof GetFullContextArgsSchema>;\n\n// ============================================================================\n// Store Tool Schemas\n// ============================================================================\n\n/**\n * Schema for list_stores tool arguments\n */\nexport const ListStoresArgsSchema = z.object({\n type: z.enum(['file', 'repo', 'web']).optional()\n});\n\nexport type ListStoresArgs = z.infer<typeof ListStoresArgsSchema>;\n\n/**\n * Schema for get_store_info tool arguments\n */\nexport const GetStoreInfoArgsSchema = z.object({\n store: z.string().min(1, 'Store name or ID must be a non-empty string')\n});\n\nexport type GetStoreInfoArgs = z.infer<typeof GetStoreInfoArgsSchema>;\n\n/**\n * Schema for create_store tool arguments\n */\nexport const CreateStoreArgsSchema = z.object({\n name: z.string().min(1, 'Store name must be a non-empty string'),\n type: z.enum(['file', 'repo']),\n source: z.string().min(1, 'Source path or URL must be a non-empty string'),\n branch: z.string().optional(),\n description: z.string().optional()\n});\n\nexport type CreateStoreArgs = z.infer<typeof CreateStoreArgsSchema>;\n\n/**\n * Schema for index_store tool arguments\n */\nexport const IndexStoreArgsSchema = z.object({\n store: z.string().min(1, 'Store name or ID must be a non-empty string')\n});\n\nexport type IndexStoreArgs = z.infer<typeof IndexStoreArgsSchema>;\n\n/**\n * Schema for delete_store tool arguments\n */\nexport const DeleteStoreArgsSchema = z.object({\n store: z.string().min(1, 'Store name or ID must be a non-empty string')\n});\n\nexport type DeleteStoreArgs = z.infer<typeof DeleteStoreArgsSchema>;\n\n// ============================================================================\n// Job Tool Schemas\n// ============================================================================\n\n/**\n * Schema for check_job_status tool arguments\n */\nexport const CheckJobStatusArgsSchema = z.object({\n jobId: z.string().min(1, 'Job ID must be a non-empty string')\n});\n\nexport type CheckJobStatusArgs = z.infer<typeof CheckJobStatusArgsSchema>;\n\n/**\n * Schema for list_jobs tool arguments\n */\nexport const ListJobsArgsSchema = z.object({\n activeOnly: z.boolean().optional(),\n status: z.enum(['pending', 'running', 'completed', 'failed', 'cancelled']).optional()\n});\n\nexport type ListJobsArgs = z.infer<typeof ListJobsArgsSchema>;\n\n/**\n * Schema for cancel_job tool arguments\n */\nexport const CancelJobArgsSchema = z.object({\n jobId: z.string().min(1, 'Job ID must be a non-empty string')\n});\n\nexport type CancelJobArgs = z.infer<typeof CancelJobArgsSchema>;\n\n// ============================================================================\n// Execute Meta-Tool Schema\n// ============================================================================\n\n/**\n * Schema for execute meta-tool arguments\n *\n * The execute tool consolidates store and job management commands\n * into a single tool, reducing context overhead.\n */\nexport const ExecuteArgsSchema = z.object({\n command: z.string().min(1, 'Command name is required'),\n args: z.record(z.string(), z.unknown()).optional()\n});\n\nexport type ExecuteArgs = z.infer<typeof ExecuteArgsSchema>;\n","/**\n * LRU (Least Recently Used) Cache implementation\n *\n * Maintains a cache with a maximum size, evicting the oldest (least recently used)\n * items when the capacity is exceeded. This prevents unbounded memory growth.\n *\n * Items are automatically moved to the end of the cache when accessed (via get),\n * making them the most recently used.\n */\nexport class LRUCache<K, V> {\n private readonly cache = new Map<K, V>();\n private readonly maxSize: number;\n\n /**\n * Create a new LRU cache\n *\n * @param maxSize - Maximum number of items to store (default: 1000)\n */\n constructor(maxSize: number = 1000) {\n this.maxSize = maxSize;\n }\n\n /**\n * Store a value in the cache\n *\n * If the key already exists, it will be moved to the end (most recent).\n * If the cache is at capacity, the oldest item will be evicted.\n *\n * @param key - The cache key\n * @param value - The value to store\n */\n set(key: K, value: V): void {\n // If key exists, delete it first to move it to the end\n if (this.cache.has(key)) {\n this.cache.delete(key);\n }\n\n // Add the new/updated entry\n this.cache.set(key, value);\n\n // Evict oldest entry if over capacity\n if (this.cache.size > this.maxSize) {\n const firstKey = this.cache.keys().next().value;\n if (firstKey !== undefined) {\n this.cache.delete(firstKey);\n }\n }\n }\n\n /**\n * Retrieve a value from the cache\n *\n * If the key exists, it will be moved to the end (most recent).\n *\n * @param key - The cache key\n * @returns The cached value, or undefined if not found\n */\n get(key: K): V | undefined {\n const value = this.cache.get(key);\n\n if (value !== undefined) {\n // Move to end (most recent) by deleting and re-adding\n this.cache.delete(key);\n this.cache.set(key, value);\n }\n\n return value;\n }\n\n /**\n * Check if a key exists in the cache\n *\n * @param key - The cache key\n * @returns True if the key exists\n */\n has(key: K): boolean {\n return this.cache.has(key);\n }\n\n /**\n * Remove a specific key from the cache\n *\n * @param key - The cache key\n * @returns True if the key was removed, false if it didn't exist\n */\n delete(key: K): boolean {\n return this.cache.delete(key);\n }\n\n /**\n * Clear all entries from the cache\n */\n clear(): void {\n this.cache.clear();\n }\n\n /**\n * Get the current number of items in the cache\n */\n get size(): number {\n return this.cache.size;\n }\n}\n","import type { ToolHandler, ToolResponse } from '../types.js';\nimport type { SearchArgs, GetFullContextArgs } from '../schemas/index.js';\nimport { SearchArgsSchema, GetFullContextArgsSchema } from '../schemas/index.js';\nimport type { SearchQuery, DocumentId, StoreId } from '../../types/index.js';\nimport { LRUCache } from '../cache.js';\nimport type { SearchResult } from '../../types/search.js';\n\n// Create result cache for get_full_context\n// Uses LRU cache to prevent memory leaks (max 1000 items)\nexport const resultCache = new LRUCache<DocumentId, SearchResult>(1000);\n\n/**\n * Handle search requests\n *\n * Searches across specified stores (or all stores if none specified) using\n * hybrid vector + FTS search. Results are cached for get_full_context retrieval.\n */\nexport const handleSearch: ToolHandler<SearchArgs> = async (\n args,\n context\n): Promise<ToolResponse> => {\n // Validate arguments with Zod\n const validated = SearchArgsSchema.parse(args);\n\n const { services } = context;\n\n // Get all stores if none specified, resolve store names to IDs\n const storeIds: StoreId[] = validated.stores !== undefined\n ? await Promise.all(validated.stores.map(async (s) => {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const store = await services.store.getByIdOrName(s as StoreId);\n if (!store) {\n throw new Error(`Store not found: ${s}`);\n }\n return store.id;\n }))\n : (await services.store.list()).map(s => s.id);\n\n // Initialize stores with error handling\n try {\n for (const storeId of storeIds) {\n await services.lance.initialize(storeId);\n }\n } catch (error) {\n throw new Error(\n `Failed to initialize vector stores: ${error instanceof Error ? error.message : String(error)}`\n );\n }\n\n // Perform search\n const searchQuery: SearchQuery = {\n query: validated.query,\n stores: storeIds,\n mode: 'hybrid',\n limit: validated.limit,\n detail: validated.detail\n };\n\n const results = await services.search.search(searchQuery);\n\n // Cache results for get_full_context (with LRU eviction)\n for (const result of results.results) {\n resultCache.set(result.id, result);\n }\n\n // Calculate estimated tokens\n const estimatedTokens = results.results.reduce((sum, r) => {\n let tokens = 100; // Base for summary\n if (r.context) tokens += 200;\n if (r.full) tokens += 800;\n return sum + tokens;\n }, 0);\n\n // Add repoRoot to results for cloned repos\n const enhancedResults = await Promise.all(results.results.map(async (r) => {\n const storeId = r.metadata.storeId;\n const store = await services.store.getByIdOrName(storeId);\n\n return {\n id: r.id,\n score: r.score,\n summary: {\n ...r.summary,\n storeName: store?.name,\n repoRoot: store !== undefined && store.type === 'repo' ? store.path : undefined\n },\n context: r.context,\n full: r.full\n };\n }));\n\n return {\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n results: enhancedResults,\n totalResults: results.totalResults,\n estimatedTokens,\n mode: results.mode,\n timeMs: results.timeMs\n }, null, 2)\n }\n ]\n };\n};\n\n/**\n * Handle get_full_context requests\n *\n * Retrieves full context for a previously cached search result.\n * If the result isn't already full, re-queries with full detail level.\n */\nexport const handleGetFullContext: ToolHandler<GetFullContextArgs> = async (\n args,\n context\n): Promise<ToolResponse> => {\n // Validate arguments with Zod\n const validated = GetFullContextArgsSchema.parse(args);\n\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const resultId = validated.resultId as DocumentId;\n\n // Check cache for result\n const cachedResult = resultCache.get(resultId);\n\n if (!cachedResult) {\n throw new Error(\n `Result not found in cache: ${resultId}. Run a search first to cache results.`\n );\n }\n\n // If result already has full context, return it\n if (cachedResult.full) {\n return {\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n id: cachedResult.id,\n score: cachedResult.score,\n summary: cachedResult.summary,\n context: cachedResult.context,\n full: cachedResult.full\n }, null, 2)\n }\n ]\n };\n }\n\n // Otherwise, re-query with full detail\n const { services } = context;\n const store = await services.store.getByIdOrName(cachedResult.metadata.storeId);\n\n if (!store) {\n throw new Error(`Store not found: ${cachedResult.metadata.storeId}`);\n }\n\n await services.lance.initialize(store.id);\n\n const searchQuery: SearchQuery = {\n query: cachedResult.content.substring(0, 100), // Use snippet of content as query\n stores: [store.id],\n mode: 'hybrid',\n limit: 1,\n detail: 'full'\n };\n\n const results = await services.search.search(searchQuery);\n\n // Find matching result by ID\n const fullResult = results.results.find(r => r.id === resultId);\n\n if (!fullResult) {\n // Return cached result even if we couldn't get full detail\n return {\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n id: cachedResult.id,\n score: cachedResult.score,\n summary: cachedResult.summary,\n context: cachedResult.context,\n warning: 'Could not retrieve full context, returning cached minimal result'\n }, null, 2)\n }\n ]\n };\n }\n\n // Update cache with full result\n resultCache.set(resultId, fullResult);\n\n return {\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n id: fullResult.id,\n score: fullResult.score,\n summary: fullResult.summary,\n context: fullResult.context,\n full: fullResult.full\n }, null, 2)\n }\n ]\n };\n};\n","import { z } from 'zod';\nimport type { ToolHandler } from '../types.js';\nimport {\n SearchArgsSchema,\n GetFullContextArgsSchema\n} from '../schemas/index.js';\nimport {\n handleSearch,\n handleGetFullContext\n} from './search.handler.js';\n\n/**\n * Tool definition with schema and handler\n */\nexport interface ToolDefinition {\n name: string;\n description: string;\n schema: z.ZodType;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n handler: ToolHandler<any>;\n}\n\n/**\n * Registry of native MCP tools\n *\n * Only search and get_full_context are native tools with full schemas.\n * Store and job management is consolidated into the execute meta-tool\n * (see commands/ directory and execute.handler.ts).\n */\nexport const tools: ToolDefinition[] = [\n {\n name: 'search',\n description: 'Search all indexed knowledge stores with pattern detection and AI-optimized results. Returns structured code units with progressive context layers.',\n schema: SearchArgsSchema,\n handler: handleSearch\n },\n {\n name: 'get_full_context',\n description: 'Get complete code and context for a specific search result by ID. Use this after search to get full implementation details.',\n schema: GetFullContextArgsSchema,\n handler: handleGetFullContext\n }\n];\n","import { z } from 'zod';\nimport type { HandlerContext, ToolResponse } from '../types.js';\n\n/**\n * Command definition for the execute meta-tool\n *\n * Each command has a name, description, optional args schema, and handler.\n * Commands are registered in the registry and invoked via execute(command, args).\n */\nexport interface CommandDefinition {\n /** Command name (e.g., 'stores', 'store:info', 'job:status') */\n name: string;\n /** Human-readable description shown in help output */\n description: string;\n /** Optional Zod schema for argument validation */\n argsSchema?: z.ZodType;\n /** Handler function that executes the command */\n handler: CommandHandler;\n}\n\n/**\n * Command handler function signature\n *\n * @param args - Validated command arguments (or empty object if no args)\n * @param context - Handler context with services and options\n * @returns Promise resolving to tool response\n */\nexport type CommandHandler = (\n args: Record<string, unknown>,\n context: HandlerContext\n) => Promise<ToolResponse>;\n\n/**\n * Command registry - singleton that holds all registered commands\n */\nclass CommandRegistry {\n private readonly commands = new Map<string, CommandDefinition>();\n\n /**\n * Register a command\n */\n register(command: CommandDefinition): void {\n if (this.commands.has(command.name)) {\n throw new Error(`Command already registered: ${command.name}`);\n }\n this.commands.set(command.name, command);\n }\n\n /**\n * Register multiple commands at once\n */\n registerAll(commands: CommandDefinition[]): void {\n for (const command of commands) {\n this.register(command);\n }\n }\n\n /**\n * Get a command by name\n */\n get(name: string): CommandDefinition | undefined {\n return this.commands.get(name);\n }\n\n /**\n * Check if a command exists\n */\n has(name: string): boolean {\n return this.commands.has(name);\n }\n\n /**\n * Get all registered commands\n */\n all(): CommandDefinition[] {\n return Array.from(this.commands.values());\n }\n\n /**\n * Get commands grouped by category (prefix before colon)\n */\n grouped(): Map<string, CommandDefinition[]> {\n const groups = new Map<string, CommandDefinition[]>();\n\n for (const cmd of this.commands.values()) {\n const colonIndex = cmd.name.indexOf(':');\n const category = colonIndex === -1 ? 'general' : cmd.name.slice(0, colonIndex);\n\n const existing = groups.get(category) ?? [];\n existing.push(cmd);\n groups.set(category, existing);\n }\n\n return groups;\n }\n}\n\n/** Global command registry instance */\nexport const commandRegistry = new CommandRegistry();\n\n/**\n * Execute a command by name\n *\n * @param commandName - The command to execute\n * @param args - Arguments to pass to the command\n * @param context - Handler context\n * @returns Promise resolving to tool response\n */\nexport async function executeCommand(\n commandName: string,\n args: Record<string, unknown>,\n context: HandlerContext\n): Promise<ToolResponse> {\n const command = commandRegistry.get(commandName);\n\n if (command === undefined) {\n throw new Error(\n `Unknown command: ${commandName}. Use execute(\"commands\") to list available commands.`\n );\n }\n\n // Validate args if schema provided (Zod parse returns unknown, safe to cast after validation)\n /* eslint-disable @typescript-eslint/consistent-type-assertions */\n const validatedArgs: Record<string, unknown> = command.argsSchema !== undefined\n ? (command.argsSchema.parse(args) as Record<string, unknown>)\n : args;\n /* eslint-enable @typescript-eslint/consistent-type-assertions */\n\n return command.handler(validatedArgs, context);\n}\n\n/**\n * Generate help text for a command or all commands\n */\nexport function generateHelp(commandName?: string): string {\n if (commandName !== undefined) {\n const command = commandRegistry.get(commandName);\n if (command === undefined) {\n throw new Error(`Unknown command: ${commandName}`);\n }\n\n const lines = [\n `Command: ${command.name}`,\n `Description: ${command.description}`,\n ''\n ];\n\n if (command.argsSchema !== undefined) {\n lines.push('Arguments:');\n // Extract schema shape for documentation\n const schema = command.argsSchema;\n if (schema instanceof z.ZodObject) {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const shape = schema.shape as Record<string, z.ZodType>;\n for (const [key, fieldSchema] of Object.entries(shape)) {\n const isOptional = fieldSchema.safeParse(undefined).success;\n const desc = fieldSchema.description ?? '';\n lines.push(` ${key}${isOptional ? ' (optional)' : ''}: ${desc}`);\n }\n }\n } else {\n lines.push('Arguments: none');\n }\n\n return lines.join('\\n');\n }\n\n // Generate help for all commands\n const groups = commandRegistry.grouped();\n const lines = ['Available commands:', ''];\n\n for (const [category, commands] of groups) {\n lines.push(`${category}:`);\n for (const cmd of commands) {\n lines.push(` ${cmd.name} - ${cmd.description}`);\n }\n lines.push('');\n }\n\n lines.push('Use execute(\"help\", {command: \"name\"}) for detailed command help.');\n\n return lines.join('\\n');\n}\n","import { z } from 'zod';\nimport type { CommandDefinition } from './registry.js';\nimport type {\n ListStoresArgs,\n GetStoreInfoArgs,\n CreateStoreArgs,\n IndexStoreArgs,\n DeleteStoreArgs\n} from '../schemas/index.js';\nimport {\n handleListStores,\n handleGetStoreInfo,\n handleCreateStore,\n handleIndexStore,\n handleDeleteStore\n} from '../handlers/store.handler.js';\n\n/**\n * Store management commands for the execute meta-tool\n *\n * These commands wrap the existing store handlers, providing\n * a unified interface through the execute command.\n *\n * Note: Type assertions are necessary here because CommandHandler uses\n * Record<string, unknown> for generic command args, while handlers expect\n * specific typed args. Zod validates at runtime before the cast.\n */\n/* eslint-disable @typescript-eslint/consistent-type-assertions */\nexport const storeCommands: CommandDefinition[] = [\n {\n name: 'stores',\n description: 'List all indexed knowledge stores',\n argsSchema: z.object({\n type: z.enum(['file', 'repo', 'web']).optional().describe('Filter by store type')\n }),\n handler: (args, context) => handleListStores(args as unknown as ListStoresArgs, context)\n },\n {\n name: 'store:info',\n description: 'Get detailed information about a specific store',\n argsSchema: z.object({\n store: z.string().min(1).describe('Store name or ID')\n }),\n handler: (args, context) => handleGetStoreInfo(args as unknown as GetStoreInfoArgs, context)\n },\n {\n name: 'store:create',\n description: 'Create a new knowledge store from git URL or local path',\n argsSchema: z.object({\n name: z.string().min(1).describe('Store name'),\n type: z.enum(['file', 'repo']).describe('Store type'),\n source: z.string().min(1).describe('Git URL or local path'),\n branch: z.string().optional().describe('Git branch (for repo type)'),\n description: z.string().optional().describe('Store description')\n }),\n handler: (args, context) => handleCreateStore(args as unknown as CreateStoreArgs, context)\n },\n {\n name: 'store:index',\n description: 'Re-index a knowledge store to update search data',\n argsSchema: z.object({\n store: z.string().min(1).describe('Store name or ID')\n }),\n handler: (args, context) => handleIndexStore(args as unknown as IndexStoreArgs, context)\n },\n {\n name: 'store:delete',\n description: 'Delete a knowledge store and all associated data',\n argsSchema: z.object({\n store: z.string().min(1).describe('Store name or ID')\n }),\n handler: (args, context) => handleDeleteStore(args as unknown as DeleteStoreArgs, context)\n }\n];\n/* eslint-enable @typescript-eslint/consistent-type-assertions */\n","import { rm } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport type { ToolHandler, ToolResponse } from '../types.js';\nimport type {\n ListStoresArgs,\n GetStoreInfoArgs,\n CreateStoreArgs,\n IndexStoreArgs,\n DeleteStoreArgs\n} from '../schemas/index.js';\nimport {\n ListStoresArgsSchema,\n GetStoreInfoArgsSchema,\n CreateStoreArgsSchema,\n IndexStoreArgsSchema,\n DeleteStoreArgsSchema\n} from '../schemas/index.js';\nimport { JobService } from '../../services/job.service.js';\nimport { spawnBackgroundWorker } from '../../workers/spawn-worker.js';\nimport { createStoreId } from '../../types/brands.js';\n\n/**\n * Handle list_stores requests\n *\n * Lists all knowledge stores with optional type filtering.\n */\nexport const handleListStores: ToolHandler<ListStoresArgs> = async (\n args,\n context\n): Promise<ToolResponse> => {\n // Validate arguments with Zod\n const validated = ListStoresArgsSchema.parse(args);\n\n const { services } = context;\n\n const stores = await services.store.list();\n const filtered = validated.type !== undefined\n ? stores.filter(s => s.type === validated.type)\n : stores;\n\n return {\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n stores: filtered.map(s => ({\n id: s.id,\n name: s.name,\n type: s.type,\n path: 'path' in s ? s.path : undefined,\n url: 'url' in s && s.url !== undefined ? s.url : undefined,\n description: s.description,\n createdAt: s.createdAt.toISOString()\n }))\n }, null, 2)\n }\n ]\n };\n};\n\n/**\n * Handle get_store_info requests\n *\n * Retrieves detailed information about a specific store.\n */\nexport const handleGetStoreInfo: ToolHandler<GetStoreInfoArgs> = async (\n args,\n context\n): Promise<ToolResponse> => {\n // Validate arguments with Zod\n const validated = GetStoreInfoArgsSchema.parse(args);\n\n const { services } = context;\n\n const store = await services.store.getByIdOrName(createStoreId(validated.store));\n\n if (store === undefined) {\n throw new Error(`Store not found: ${validated.store}`);\n }\n\n return {\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n id: store.id,\n name: store.name,\n type: store.type,\n path: 'path' in store ? store.path : undefined,\n url: 'url' in store && store.url !== undefined ? store.url : undefined,\n branch: 'branch' in store ? store.branch : undefined,\n description: store.description,\n status: store.status,\n createdAt: store.createdAt.toISOString(),\n updatedAt: store.updatedAt.toISOString()\n }, null, 2)\n }\n ]\n };\n};\n\n/**\n * Handle create_store requests\n *\n * Creates a new knowledge store and starts background indexing.\n * Returns store info and job ID for tracking progress.\n */\nexport const handleCreateStore: ToolHandler<CreateStoreArgs> = async (\n args,\n context\n): Promise<ToolResponse> => {\n // Validate arguments with Zod\n const validated = CreateStoreArgsSchema.parse(args);\n\n const { services, options } = context;\n\n // Determine if source is a URL or path\n const isUrl = validated.source.startsWith('http://') ||\n validated.source.startsWith('https://') ||\n validated.source.startsWith('git@');\n\n const result = await services.store.create({\n name: validated.name,\n type: validated.type,\n ...(isUrl ? { url: validated.source } : { path: validated.source }),\n ...(validated.branch !== undefined ? { branch: validated.branch } : {}),\n ...(validated.description !== undefined ? { description: validated.description } : {})\n });\n\n if (!result.success) {\n throw new Error(result.error.message);\n }\n\n // Create background job for indexing\n const jobService = new JobService(options.dataDir);\n const jobDetails: Record<string, unknown> = {\n storeName: result.data.name,\n storeId: result.data.id\n };\n if (isUrl) {\n jobDetails['url'] = validated.source;\n }\n if ('path' in result.data && result.data.path) {\n jobDetails['path'] = result.data.path;\n }\n const job = jobService.createJob({\n type: validated.type === 'repo' && isUrl ? 'clone' : 'index',\n details: jobDetails,\n message: `Indexing ${result.data.name}...`\n });\n\n // Spawn background worker (dataDir defaults to project-local .bluera if undefined)\n spawnBackgroundWorker(job.id, options.dataDir ?? '');\n\n return {\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n store: {\n id: result.data.id,\n name: result.data.name,\n type: result.data.type,\n path: 'path' in result.data ? result.data.path : undefined\n },\n job: {\n id: job.id,\n status: job.status,\n message: job.message\n },\n message: `Store created. Indexing started in background (Job ID: ${job.id})`\n }, null, 2)\n }\n ]\n };\n};\n\n/**\n * Handle index_store requests\n *\n * Re-indexes an existing store in the background.\n * Returns job ID for tracking progress.\n */\nexport const handleIndexStore: ToolHandler<IndexStoreArgs> = async (\n args,\n context\n): Promise<ToolResponse> => {\n // Validate arguments with Zod\n const validated = IndexStoreArgsSchema.parse(args);\n\n const { services, options } = context;\n\n const store = await services.store.getByIdOrName(createStoreId(validated.store));\n\n if (store === undefined) {\n throw new Error(`Store not found: ${validated.store}`);\n }\n\n // Create background job for indexing\n const jobService = new JobService(options.dataDir);\n const jobDetails: Record<string, unknown> = {\n storeName: store.name,\n storeId: store.id\n };\n if ('path' in store && store.path) {\n jobDetails['path'] = store.path;\n }\n const job = jobService.createJob({\n type: 'index',\n details: jobDetails,\n message: `Re-indexing ${store.name}...`\n });\n\n // Spawn background worker (dataDir defaults to project-local .bluera if undefined)\n spawnBackgroundWorker(job.id, options.dataDir ?? '');\n\n return {\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n store: {\n id: store.id,\n name: store.name\n },\n job: {\n id: job.id,\n status: job.status,\n message: job.message\n },\n message: `Indexing started in background (Job ID: ${job.id})`\n }, null, 2)\n }\n ]\n };\n};\n\n/**\n * Handle delete_store requests\n *\n * Deletes a store and all associated data:\n * - Removes from store registry\n * - Drops LanceDB table\n * - For repo stores with URL, removes cloned files\n */\nexport const handleDeleteStore: ToolHandler<DeleteStoreArgs> = async (\n args,\n context\n): Promise<ToolResponse> => {\n // Validate arguments with Zod\n const validated = DeleteStoreArgsSchema.parse(args);\n\n const { services, options } = context;\n\n const store = await services.store.getByIdOrName(createStoreId(validated.store));\n\n if (store === undefined) {\n throw new Error(`Store not found: ${validated.store}`);\n }\n\n // Delete LanceDB table\n await services.lance.deleteStore(store.id);\n\n // For repo stores cloned from URL, remove the cloned directory\n if (store.type === 'repo' && 'url' in store && store.url !== undefined) {\n if (options.dataDir === undefined) {\n throw new Error('dataDir is required to delete cloned repository files');\n }\n const repoPath = join(options.dataDir, 'repos', store.id);\n await rm(repoPath, { recursive: true, force: true });\n }\n\n // Delete from registry\n const result = await services.store.delete(store.id);\n if (!result.success) {\n throw new Error(result.error.message);\n }\n\n return {\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n deleted: true,\n store: {\n id: store.id,\n name: store.name,\n type: store.type\n },\n message: `Successfully deleted store: ${store.name}`\n }, null, 2)\n }\n ]\n };\n};\n","import { spawn } from 'child_process';\nimport { fileURLToPath } from 'url';\nimport path from 'path';\n\n/**\n * Spawn a background worker process to execute a job\n *\n * The worker runs detached from the parent process, allowing the\n * parent to exit while the worker continues running.\n *\n * @param jobId - The ID of the job to execute\n */\nexport function spawnBackgroundWorker(jobId: string, dataDir: string): void {\n // Determine the worker script path\n // In production, this will be the compiled dist file\n // In development, we need to use tsx to run TypeScript\n const __dirname = path.dirname(fileURLToPath(import.meta.url));\n\n // Check if we're running from dist (production) or src (development)\n const isProduction = __dirname.includes('/dist/');\n\n let command: string;\n let args: string[];\n\n if (isProduction) {\n // Production: Use Node.js directly with compiled file\n const workerScript = path.join(__dirname, 'background-worker-cli.js');\n command = process.execPath; // Use the same Node.js binary\n args = [workerScript, jobId];\n } else {\n // Development: Use tsx to run TypeScript directly\n const workerScript = path.join(__dirname, 'background-worker-cli.ts');\n command = 'npx';\n args = ['tsx', workerScript, jobId];\n }\n\n // Spawn the worker process\n const worker = spawn(command, args, {\n detached: true, // Detach from parent process\n stdio: 'ignore', // Don't pipe stdio (fully independent)\n env: {\n ...process.env, // Inherit environment variables\n BLUERA_DATA_DIR: dataDir // Pass dataDir to worker\n }\n });\n\n // Unref the worker so the parent can exit\n worker.unref();\n}\n","import { z } from 'zod';\nimport type { CommandDefinition } from './registry.js';\nimport type {\n CheckJobStatusArgs,\n ListJobsArgs,\n CancelJobArgs\n} from '../schemas/index.js';\nimport {\n handleCheckJobStatus,\n handleListJobs,\n handleCancelJob\n} from '../handlers/job.handler.js';\n\n/**\n * Job management commands for the execute meta-tool\n *\n * These commands wrap the existing job handlers, providing\n * a unified interface through the execute command.\n *\n * Note: Type assertions are necessary here because CommandHandler uses\n * Record<string, unknown> for generic command args, while handlers expect\n * specific typed args. Zod validates at runtime before the cast.\n */\n/* eslint-disable @typescript-eslint/consistent-type-assertions */\nexport const jobCommands: CommandDefinition[] = [\n {\n name: 'jobs',\n description: 'List all background jobs',\n argsSchema: z.object({\n activeOnly: z.boolean().optional().describe('Only show active jobs'),\n status: z.enum(['pending', 'running', 'completed', 'failed', 'cancelled'])\n .optional()\n .describe('Filter by job status')\n }),\n handler: (args, context) => handleListJobs(args as unknown as ListJobsArgs, context)\n },\n {\n name: 'job:status',\n description: 'Check the status of a specific background job',\n argsSchema: z.object({\n jobId: z.string().min(1).describe('Job ID to check')\n }),\n handler: (args, context) => handleCheckJobStatus(args as unknown as CheckJobStatusArgs, context)\n },\n {\n name: 'job:cancel',\n description: 'Cancel a running or pending background job',\n argsSchema: z.object({\n jobId: z.string().min(1).describe('Job ID to cancel')\n }),\n handler: (args, context) => handleCancelJob(args as unknown as CancelJobArgs, context)\n }\n];\n/* eslint-enable @typescript-eslint/consistent-type-assertions */\n","import type { ToolHandler, ToolResponse } from '../types.js';\nimport type {\n CheckJobStatusArgs,\n ListJobsArgs,\n CancelJobArgs\n} from '../schemas/index.js';\nimport {\n CheckJobStatusArgsSchema,\n ListJobsArgsSchema,\n CancelJobArgsSchema\n} from '../schemas/index.js';\nimport { JobService } from '../../services/job.service.js';\n\n/**\n * Handle check_job_status requests\n *\n * Retrieves the current status of a background job.\n */\nexport const handleCheckJobStatus: ToolHandler<CheckJobStatusArgs> = (\n args,\n context\n): Promise<ToolResponse> => {\n // Validate arguments with Zod\n const validated = CheckJobStatusArgsSchema.parse(args);\n\n const { options } = context;\n\n const jobService = new JobService(options.dataDir);\n const job = jobService.getJob(validated.jobId);\n\n if (!job) {\n throw new Error(`Job not found: ${validated.jobId}`);\n }\n\n return Promise.resolve({\n content: [\n {\n type: 'text',\n text: JSON.stringify(job, null, 2)\n }\n ]\n });\n};\n\n/**\n * Handle list_jobs requests\n *\n * Lists all jobs with optional filtering by status or active status.\n */\nexport const handleListJobs: ToolHandler<ListJobsArgs> = (\n args,\n context\n): Promise<ToolResponse> => {\n // Validate arguments with Zod\n const validated = ListJobsArgsSchema.parse(args);\n\n const { options } = context;\n\n const jobService = new JobService(options.dataDir);\n\n let jobs;\n if (validated.activeOnly === true) {\n jobs = jobService.listActiveJobs();\n } else if (validated.status !== undefined) {\n jobs = jobService.listJobs(validated.status);\n } else {\n jobs = jobService.listJobs();\n }\n\n return Promise.resolve({\n content: [\n {\n type: 'text',\n text: JSON.stringify({ jobs }, null, 2)\n }\n ]\n });\n};\n\n/**\n * Handle cancel_job requests\n *\n * Cancels a running or pending background job.\n * Kills the worker process if it exists.\n */\nexport const handleCancelJob: ToolHandler<CancelJobArgs> = (\n args,\n context\n): Promise<ToolResponse> => {\n // Validate arguments with Zod\n const validated = CancelJobArgsSchema.parse(args);\n\n const { options } = context;\n\n const jobService = new JobService(options.dataDir);\n const result = jobService.cancelJob(validated.jobId);\n\n if (!result.success) {\n throw new Error(result.error.message);\n }\n\n const job = jobService.getJob(validated.jobId);\n\n return Promise.resolve({\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n success: true,\n job,\n message: 'Job cancelled successfully'\n }, null, 2)\n }\n ]\n });\n};\n","import { z } from 'zod';\nimport type { CommandDefinition } from './registry.js';\nimport type { ToolResponse } from '../types.js';\nimport { commandRegistry, generateHelp } from './registry.js';\n\n/**\n * Meta commands for introspection and help\n *\n * These commands provide self-documentation for the execute tool,\n * allowing users to discover available commands and their usage.\n */\nexport const metaCommands: CommandDefinition[] = [\n {\n name: 'commands',\n description: 'List all available commands',\n handler: (): Promise<ToolResponse> => {\n const commands = commandRegistry.all();\n const commandList = commands.map(cmd => ({\n name: cmd.name,\n description: cmd.description\n }));\n\n return Promise.resolve({\n content: [\n {\n type: 'text' as const,\n text: JSON.stringify({ commands: commandList }, null, 2)\n }\n ]\n });\n }\n },\n {\n name: 'help',\n description: 'Show help for a specific command or list all commands',\n argsSchema: z.object({\n command: z.string().optional().describe('Command name to get help for')\n }),\n handler: (args: Record<string, unknown>): Promise<ToolResponse> => {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const commandName = args['command'] as string | undefined;\n const helpText = generateHelp(commandName);\n\n return Promise.resolve({\n content: [\n {\n type: 'text' as const,\n text: helpText\n }\n ]\n });\n }\n }\n];\n","/**\n * Command registration for the execute meta-tool\n *\n * This module registers all commands with the command registry.\n * Import this module to ensure all commands are available.\n */\n\nimport { commandRegistry } from './registry.js';\nimport { storeCommands } from './store.commands.js';\nimport { jobCommands } from './job.commands.js';\nimport { metaCommands } from './meta.commands.js';\n\n// Register all commands\ncommandRegistry.registerAll(storeCommands);\ncommandRegistry.registerAll(jobCommands);\ncommandRegistry.registerAll(metaCommands);\n\n// Re-export for convenience\nexport { commandRegistry, executeCommand, generateHelp } from './registry.js';\nexport type { CommandDefinition, CommandHandler } from './registry.js';\n","import type { ToolHandler, ToolResponse } from '../types.js';\nimport type { ExecuteArgs } from '../schemas/index.js';\nimport { ExecuteArgsSchema } from '../schemas/index.js';\n// Import commands module to register all commands\nimport '../commands/index.js';\nimport { executeCommand } from '../commands/index.js';\n\n/**\n * Handle execute requests\n *\n * This is the meta-tool handler that routes to registered commands.\n * It consolidates store and job management into a single tool surface.\n */\nexport const handleExecute: ToolHandler<ExecuteArgs> = async (\n args,\n context\n): Promise<ToolResponse> => {\n // Validate arguments with Zod\n const validated = ExecuteArgsSchema.parse(args);\n\n const commandArgs = validated.args ?? {};\n\n return executeCommand(validated.command, commandArgs, context);\n};\n"],"mappings":";;;;;;;AAAA,SAAS,cAAc;AACvB,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,SAAS;AAgBX,IAAM,mBAAmB,EAAE,OAAO;AAAA,EACvC,OAAO,EAAE,OAAO,EAAE,IAAI,GAAG,kCAAkC;AAAA,EAC3D,QAAQ,EACL,KAAK,CAAC,gBAAgB,uBAAuB,cAAc,mBAAmB,oBAAoB,CAAC,EACnG,SAAS;AAAA,EACZ,QAAQ,EAAE,KAAK,CAAC,WAAW,cAAc,MAAM,CAAC,EAAE,QAAQ,SAAS;AAAA,EACnE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE;AAAA,EAC7C,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS;AACvC,CAAC;AAOM,IAAM,2BAA2B,EAAE,OAAO;AAAA,EAC/C,UAAU,EAAE,OAAO,EAA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;","names":["z","lines","z","__dirname","z","z","z","z","z","validated"]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// src/services/watch.service.ts
|
|
2
|
+
import { watch } from "chokidar";
|
|
3
|
+
var WatchService = class {
|
|
4
|
+
watchers = /* @__PURE__ */ new Map();
|
|
5
|
+
indexService;
|
|
6
|
+
lanceStore;
|
|
7
|
+
constructor(indexService, lanceStore) {
|
|
8
|
+
this.indexService = indexService;
|
|
9
|
+
this.lanceStore = lanceStore;
|
|
10
|
+
}
|
|
11
|
+
async watch(store, debounceMs = 1e3, onReindex) {
|
|
12
|
+
if (this.watchers.has(store.id)) {
|
|
13
|
+
return Promise.resolve();
|
|
14
|
+
}
|
|
15
|
+
let timeout = null;
|
|
16
|
+
const watcher = watch(store.path, {
|
|
17
|
+
ignored: /(^|[/\\])\.(git|node_modules|dist|build)/,
|
|
18
|
+
persistent: true,
|
|
19
|
+
ignoreInitial: true
|
|
20
|
+
});
|
|
21
|
+
const reindexHandler = () => {
|
|
22
|
+
if (timeout) clearTimeout(timeout);
|
|
23
|
+
timeout = setTimeout(() => {
|
|
24
|
+
void (async () => {
|
|
25
|
+
try {
|
|
26
|
+
await this.lanceStore.initialize(store.id);
|
|
27
|
+
await this.indexService.indexStore(store);
|
|
28
|
+
onReindex?.();
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error("Error during reindexing:", error);
|
|
31
|
+
}
|
|
32
|
+
})();
|
|
33
|
+
}, debounceMs);
|
|
34
|
+
};
|
|
35
|
+
watcher.on("all", reindexHandler);
|
|
36
|
+
watcher.on("error", (error) => {
|
|
37
|
+
console.error("Watcher error:", error);
|
|
38
|
+
});
|
|
39
|
+
this.watchers.set(store.id, watcher);
|
|
40
|
+
return Promise.resolve();
|
|
41
|
+
}
|
|
42
|
+
async unwatch(storeId) {
|
|
43
|
+
const watcher = this.watchers.get(storeId);
|
|
44
|
+
if (watcher) {
|
|
45
|
+
await watcher.close();
|
|
46
|
+
this.watchers.delete(storeId);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async unwatchAll() {
|
|
50
|
+
for (const [id] of this.watchers) {
|
|
51
|
+
await this.unwatch(id);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export {
|
|
57
|
+
WatchService
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=chunk-L2YVNC63.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/services/watch.service.ts"],"sourcesContent":["import { watch, type FSWatcher } from 'chokidar';\nimport type { FileStore, RepoStore } from '../types/store.js';\nimport type { IndexService } from './index.service.js';\nimport type { LanceStore } from '../db/lance.js';\n\nexport class WatchService {\n private readonly watchers: Map<string, FSWatcher> = new Map();\n private readonly indexService: IndexService;\n private readonly lanceStore: LanceStore;\n\n constructor(indexService: IndexService, lanceStore: LanceStore) {\n this.indexService = indexService;\n this.lanceStore = lanceStore;\n }\n\n async watch(\n store: FileStore | RepoStore,\n debounceMs = 1000,\n onReindex?: () => void\n ): Promise<void> {\n if (this.watchers.has(store.id)) {\n return Promise.resolve(); // Already watching\n }\n\n let timeout: NodeJS.Timeout | null = null;\n\n const watcher = watch(store.path, {\n ignored: /(^|[/\\\\])\\.(git|node_modules|dist|build)/,\n persistent: true,\n ignoreInitial: true,\n });\n\n const reindexHandler = (): void => {\n if (timeout) clearTimeout(timeout);\n timeout = setTimeout(() => {\n void (async (): Promise<void> => {\n try {\n await this.lanceStore.initialize(store.id);\n await this.indexService.indexStore(store);\n onReindex?.();\n } catch (error) {\n console.error('Error during reindexing:', error);\n }\n })();\n }, debounceMs);\n };\n\n watcher.on('all', reindexHandler);\n\n watcher.on('error', (error) => {\n console.error('Watcher error:', error);\n });\n\n this.watchers.set(store.id, watcher);\n return Promise.resolve();\n }\n\n async unwatch(storeId: string): Promise<void> {\n const watcher = this.watchers.get(storeId);\n if (watcher) {\n await watcher.close();\n this.watchers.delete(storeId);\n }\n }\n\n async un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