codesift-mcp 0.2.18 → 0.4.0
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/README.md +143 -20
- package/dist/cache/hono-cache.d.ts +50 -0
- package/dist/cache/hono-cache.d.ts.map +1 -0
- package/dist/cache/hono-cache.js +132 -0
- package/dist/cache/hono-cache.js.map +1 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +17 -2
- package/dist/cli/setup.js.map +1 -1
- package/dist/formatters-shortening.d.ts +13 -0
- package/dist/formatters-shortening.d.ts.map +1 -1
- package/dist/formatters-shortening.js +131 -0
- package/dist/formatters-shortening.js.map +1 -1
- package/dist/formatters.d.ts +38 -0
- package/dist/formatters.d.ts.map +1 -1
- package/dist/formatters.js +498 -0
- package/dist/formatters.js.map +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/instructions.d.ts.map +1 -1
- package/dist/instructions.js +27 -26
- package/dist/instructions.js.map +1 -1
- package/dist/lsp/lsp-servers.d.ts.map +1 -1
- package/dist/lsp/lsp-servers.js +5 -0
- package/dist/lsp/lsp-servers.js.map +1 -1
- package/dist/lsp/lsp-tools.d.ts.map +1 -1
- package/dist/lsp/lsp-tools.js +1 -0
- package/dist/lsp/lsp-tools.js.map +1 -1
- package/dist/parser/astro-template.d.ts +47 -0
- package/dist/parser/astro-template.d.ts.map +1 -0
- package/dist/parser/astro-template.js +171 -0
- package/dist/parser/astro-template.js.map +1 -0
- package/dist/parser/extractors/_shared.d.ts +4 -0
- package/dist/parser/extractors/_shared.d.ts.map +1 -1
- package/dist/parser/extractors/_shared.js +8 -0
- package/dist/parser/extractors/_shared.js.map +1 -1
- package/dist/parser/extractors/astro.d.ts +4 -5
- package/dist/parser/extractors/astro.d.ts.map +1 -1
- package/dist/parser/extractors/astro.js +102 -26
- package/dist/parser/extractors/astro.js.map +1 -1
- package/dist/parser/extractors/gradle-kts.d.ts +4 -0
- package/dist/parser/extractors/gradle-kts.d.ts.map +1 -0
- package/dist/parser/extractors/gradle-kts.js +246 -0
- package/dist/parser/extractors/gradle-kts.js.map +1 -0
- package/dist/parser/extractors/hono-inline-analyzer.d.ts +34 -0
- package/dist/parser/extractors/hono-inline-analyzer.d.ts.map +1 -0
- package/dist/parser/extractors/hono-inline-analyzer.js +465 -0
- package/dist/parser/extractors/hono-inline-analyzer.js.map +1 -0
- package/dist/parser/extractors/hono-model.d.ts +196 -0
- package/dist/parser/extractors/hono-model.d.ts.map +1 -0
- package/dist/parser/extractors/hono-model.js +10 -0
- package/dist/parser/extractors/hono-model.js.map +1 -0
- package/dist/parser/extractors/hono.d.ts +118 -0
- package/dist/parser/extractors/hono.d.ts.map +1 -0
- package/dist/parser/extractors/hono.js +1527 -0
- package/dist/parser/extractors/hono.js.map +1 -0
- package/dist/parser/extractors/kotlin.d.ts +4 -0
- package/dist/parser/extractors/kotlin.d.ts.map +1 -0
- package/dist/parser/extractors/kotlin.js +521 -0
- package/dist/parser/extractors/kotlin.js.map +1 -0
- package/dist/parser/extractors/php.d.ts +22 -0
- package/dist/parser/extractors/php.d.ts.map +1 -0
- package/dist/parser/extractors/php.js +326 -0
- package/dist/parser/extractors/php.js.map +1 -0
- package/dist/parser/extractors/python.d.ts.map +1 -1
- package/dist/parser/extractors/python.js +234 -11
- package/dist/parser/extractors/python.js.map +1 -1
- package/dist/parser/extractors/sql.d.ts +33 -0
- package/dist/parser/extractors/sql.d.ts.map +1 -0
- package/dist/parser/extractors/sql.js +506 -0
- package/dist/parser/extractors/sql.js.map +1 -0
- package/dist/parser/extractors/typescript.d.ts.map +1 -1
- package/dist/parser/extractors/typescript.js +166 -3
- package/dist/parser/extractors/typescript.js.map +1 -1
- package/dist/parser/languages/tree-sitter-javascript.wasm +0 -0
- package/dist/parser/languages/tree-sitter-kotlin.wasm +0 -0
- package/dist/parser/languages/tree-sitter-php.wasm +0 -0
- package/dist/parser/languages/tree-sitter-php_only.wasm +0 -0
- package/dist/parser/languages/tree-sitter-python.wasm +0 -0
- package/dist/parser/parser-manager.d.ts +32 -0
- package/dist/parser/parser-manager.d.ts.map +1 -1
- package/dist/parser/parser-manager.js +82 -3
- package/dist/parser/parser-manager.js.map +1 -1
- package/dist/parser/symbol-extractor.d.ts.map +1 -1
- package/dist/parser/symbol-extractor.js +16 -0
- package/dist/parser/symbol-extractor.js.map +1 -1
- package/dist/register-tools.d.ts +37 -1
- package/dist/register-tools.d.ts.map +1 -1
- package/dist/register-tools.js +2657 -191
- package/dist/register-tools.js.map +1 -1
- package/dist/search/reranker.js +1 -1
- package/dist/search/reranker.js.map +1 -1
- package/dist/server-helpers.d.ts.map +1 -1
- package/dist/server-helpers.js +11 -0
- package/dist/server-helpers.js.map +1 -1
- package/dist/server.js +28 -1
- package/dist/server.js.map +1 -1
- package/dist/storage/index-store.d.ts +15 -1
- package/dist/storage/index-store.d.ts.map +1 -1
- package/dist/storage/index-store.js +27 -1
- package/dist/storage/index-store.js.map +1 -1
- package/dist/storage/session-state.d.ts +1 -1
- package/dist/storage/session-state.d.ts.map +1 -1
- package/dist/storage/session-state.js +6 -4
- package/dist/storage/session-state.js.map +1 -1
- package/dist/tools/agent-config-tools.d.ts +24 -0
- package/dist/tools/agent-config-tools.d.ts.map +1 -0
- package/dist/tools/agent-config-tools.js +119 -0
- package/dist/tools/agent-config-tools.js.map +1 -0
- package/dist/tools/architecture-tools.d.ts +23 -0
- package/dist/tools/architecture-tools.d.ts.map +1 -0
- package/dist/tools/architecture-tools.js +140 -0
- package/dist/tools/architecture-tools.js.map +1 -0
- package/dist/tools/astro-config.d.ts +33 -0
- package/dist/tools/astro-config.d.ts.map +1 -0
- package/dist/tools/astro-config.js +260 -0
- package/dist/tools/astro-config.js.map +1 -0
- package/dist/tools/astro-islands.d.ts +61 -0
- package/dist/tools/astro-islands.d.ts.map +1 -0
- package/dist/tools/astro-islands.js +240 -0
- package/dist/tools/astro-islands.js.map +1 -0
- package/dist/tools/astro-routes.d.ts +49 -0
- package/dist/tools/astro-routes.d.ts.map +1 -0
- package/dist/tools/astro-routes.js +119 -0
- package/dist/tools/astro-routes.js.map +1 -0
- package/dist/tools/audit-tools.d.ts +38 -0
- package/dist/tools/audit-tools.d.ts.map +1 -0
- package/dist/tools/audit-tools.js +248 -0
- package/dist/tools/audit-tools.js.map +1 -0
- package/dist/tools/celery-tools.d.ts +38 -0
- package/dist/tools/celery-tools.d.ts.map +1 -0
- package/dist/tools/celery-tools.js +154 -0
- package/dist/tools/celery-tools.js.map +1 -0
- package/dist/tools/clone-tools.js +1 -1
- package/dist/tools/clone-tools.js.map +1 -1
- package/dist/tools/complexity-tools.d.ts +4 -0
- package/dist/tools/complexity-tools.d.ts.map +1 -1
- package/dist/tools/complexity-tools.js +78 -4
- package/dist/tools/complexity-tools.js.map +1 -1
- package/dist/tools/compose-tools.d.ts +60 -0
- package/dist/tools/compose-tools.d.ts.map +1 -0
- package/dist/tools/compose-tools.js +203 -0
- package/dist/tools/compose-tools.js.map +1 -0
- package/dist/tools/coupling-tools.d.ts +50 -0
- package/dist/tools/coupling-tools.d.ts.map +1 -0
- package/dist/tools/coupling-tools.js +262 -0
- package/dist/tools/coupling-tools.js.map +1 -0
- package/dist/tools/dependency-audit-tools.d.ts +65 -0
- package/dist/tools/dependency-audit-tools.d.ts.map +1 -0
- package/dist/tools/dependency-audit-tools.js +553 -0
- package/dist/tools/dependency-audit-tools.js.map +1 -0
- package/dist/tools/django-settings.d.ts +22 -0
- package/dist/tools/django-settings.d.ts.map +1 -0
- package/dist/tools/django-settings.js +301 -0
- package/dist/tools/django-settings.js.map +1 -0
- package/dist/tools/frequency-tools.js +1 -1
- package/dist/tools/frequency-tools.js.map +1 -1
- package/dist/tools/graph-tools.d.ts +8 -2
- package/dist/tools/graph-tools.d.ts.map +1 -1
- package/dist/tools/graph-tools.js +44 -3
- package/dist/tools/graph-tools.js.map +1 -1
- package/dist/tools/hilt-tools.d.ts +55 -0
- package/dist/tools/hilt-tools.d.ts.map +1 -0
- package/dist/tools/hilt-tools.js +258 -0
- package/dist/tools/hilt-tools.js.map +1 -0
- package/dist/tools/hono-analyze-app.d.ts +48 -0
- package/dist/tools/hono-analyze-app.d.ts.map +1 -0
- package/dist/tools/hono-analyze-app.js +102 -0
- package/dist/tools/hono-analyze-app.js.map +1 -0
- package/dist/tools/hono-api-contract.d.ts +22 -0
- package/dist/tools/hono-api-contract.d.ts.map +1 -0
- package/dist/tools/hono-api-contract.js +80 -0
- package/dist/tools/hono-api-contract.js.map +1 -0
- package/dist/tools/hono-conditional-middleware.d.ts +27 -0
- package/dist/tools/hono-conditional-middleware.d.ts.map +1 -0
- package/dist/tools/hono-conditional-middleware.js +62 -0
- package/dist/tools/hono-conditional-middleware.js.map +1 -0
- package/dist/tools/hono-context-flow.d.ts +24 -0
- package/dist/tools/hono-context-flow.d.ts.map +1 -0
- package/dist/tools/hono-context-flow.js +78 -0
- package/dist/tools/hono-context-flow.js.map +1 -0
- package/dist/tools/hono-dead-routes.d.ts +26 -0
- package/dist/tools/hono-dead-routes.d.ts.map +1 -0
- package/dist/tools/hono-dead-routes.js +109 -0
- package/dist/tools/hono-dead-routes.js.map +1 -0
- package/dist/tools/hono-env-regression.d.ts +29 -0
- package/dist/tools/hono-env-regression.d.ts.map +1 -0
- package/dist/tools/hono-env-regression.js +157 -0
- package/dist/tools/hono-env-regression.js.map +1 -0
- package/dist/tools/hono-inline-analyze.d.ts +31 -0
- package/dist/tools/hono-inline-analyze.d.ts.map +1 -0
- package/dist/tools/hono-inline-analyze.js +67 -0
- package/dist/tools/hono-inline-analyze.js.map +1 -0
- package/dist/tools/hono-middleware-chain.d.ts +22 -0
- package/dist/tools/hono-middleware-chain.d.ts.map +1 -0
- package/dist/tools/hono-middleware-chain.js +84 -0
- package/dist/tools/hono-middleware-chain.js.map +1 -0
- package/dist/tools/hono-modules.d.ts +22 -0
- package/dist/tools/hono-modules.d.ts.map +1 -0
- package/dist/tools/hono-modules.js +126 -0
- package/dist/tools/hono-modules.js.map +1 -0
- package/dist/tools/hono-response-types.d.ts +37 -0
- package/dist/tools/hono-response-types.d.ts.map +1 -0
- package/dist/tools/hono-response-types.js +84 -0
- package/dist/tools/hono-response-types.js.map +1 -0
- package/dist/tools/hono-rpc-types.d.ts +21 -0
- package/dist/tools/hono-rpc-types.d.ts.map +1 -0
- package/dist/tools/hono-rpc-types.js +57 -0
- package/dist/tools/hono-rpc-types.js.map +1 -0
- package/dist/tools/hono-security.d.ts +21 -0
- package/dist/tools/hono-security.d.ts.map +1 -0
- package/dist/tools/hono-security.js +98 -0
- package/dist/tools/hono-security.js.map +1 -0
- package/dist/tools/hono-visualize.d.ts +13 -0
- package/dist/tools/hono-visualize.d.ts.map +1 -0
- package/dist/tools/hono-visualize.js +72 -0
- package/dist/tools/hono-visualize.js.map +1 -0
- package/dist/tools/hotspot-tools.d.ts.map +1 -1
- package/dist/tools/hotspot-tools.js +9 -7
- package/dist/tools/hotspot-tools.js.map +1 -1
- package/dist/tools/index-tools.d.ts +17 -0
- package/dist/tools/index-tools.d.ts.map +1 -1
- package/dist/tools/index-tools.js +210 -10
- package/dist/tools/index-tools.js.map +1 -1
- package/dist/tools/kotlin-tools.d.ts +142 -0
- package/dist/tools/kotlin-tools.d.ts.map +1 -0
- package/dist/tools/kotlin-tools.js +572 -0
- package/dist/tools/kotlin-tools.js.map +1 -0
- package/dist/tools/legacy-hono-conventions.d.ts +14 -0
- package/dist/tools/legacy-hono-conventions.d.ts.map +1 -0
- package/dist/tools/legacy-hono-conventions.js +152 -0
- package/dist/tools/legacy-hono-conventions.js.map +1 -0
- package/dist/tools/migration-lint-tools.d.ts +26 -0
- package/dist/tools/migration-lint-tools.d.ts.map +1 -0
- package/dist/tools/migration-lint-tools.js +247 -0
- package/dist/tools/migration-lint-tools.js.map +1 -0
- package/dist/tools/model-tools.d.ts +30 -0
- package/dist/tools/model-tools.d.ts.map +1 -0
- package/dist/tools/model-tools.js +145 -0
- package/dist/tools/model-tools.js.map +1 -0
- package/dist/tools/nest-ext-tools.d.ts +92 -0
- package/dist/tools/nest-ext-tools.d.ts.map +1 -0
- package/dist/tools/nest-ext-tools.js +359 -0
- package/dist/tools/nest-ext-tools.js.map +1 -0
- package/dist/tools/nest-tools.d.ts +171 -0
- package/dist/tools/nest-tools.d.ts.map +1 -0
- package/dist/tools/nest-tools.js +1042 -0
- package/dist/tools/nest-tools.js.map +1 -0
- package/dist/tools/nextjs-api-contract-readers.d.ts +14 -0
- package/dist/tools/nextjs-api-contract-readers.d.ts.map +1 -0
- package/dist/tools/nextjs-api-contract-readers.js +204 -0
- package/dist/tools/nextjs-api-contract-readers.js.map +1 -0
- package/dist/tools/nextjs-api-contract-tools.d.ts +57 -0
- package/dist/tools/nextjs-api-contract-tools.d.ts.map +1 -0
- package/dist/tools/nextjs-api-contract-tools.js +144 -0
- package/dist/tools/nextjs-api-contract-tools.js.map +1 -0
- package/dist/tools/nextjs-boundary-tools.d.ts +39 -0
- package/dist/tools/nextjs-boundary-tools.d.ts.map +1 -0
- package/dist/tools/nextjs-boundary-tools.js +152 -0
- package/dist/tools/nextjs-boundary-tools.js.map +1 -0
- package/dist/tools/nextjs-component-tools.d.ts +121 -0
- package/dist/tools/nextjs-component-tools.d.ts.map +1 -0
- package/dist/tools/nextjs-component-tools.js +460 -0
- package/dist/tools/nextjs-component-tools.js.map +1 -0
- package/dist/tools/nextjs-data-flow-tools.d.ts +42 -0
- package/dist/tools/nextjs-data-flow-tools.d.ts.map +1 -0
- package/dist/tools/nextjs-data-flow-tools.js +158 -0
- package/dist/tools/nextjs-data-flow-tools.js.map +1 -0
- package/dist/tools/nextjs-framework-audit-tools.d.ts +37 -0
- package/dist/tools/nextjs-framework-audit-tools.d.ts.map +1 -0
- package/dist/tools/nextjs-framework-audit-tools.js +211 -0
- package/dist/tools/nextjs-framework-audit-tools.js.map +1 -0
- package/dist/tools/nextjs-link-tools.d.ts +41 -0
- package/dist/tools/nextjs-link-tools.d.ts.map +1 -0
- package/dist/tools/nextjs-link-tools.js +157 -0
- package/dist/tools/nextjs-link-tools.js.map +1 -0
- package/dist/tools/nextjs-metadata-tools.d.ts +74 -0
- package/dist/tools/nextjs-metadata-tools.d.ts.map +1 -0
- package/dist/tools/nextjs-metadata-tools.js +252 -0
- package/dist/tools/nextjs-metadata-tools.js.map +1 -0
- package/dist/tools/nextjs-middleware-coverage-tools.d.ts +41 -0
- package/dist/tools/nextjs-middleware-coverage-tools.d.ts.map +1 -0
- package/dist/tools/nextjs-middleware-coverage-tools.js +88 -0
- package/dist/tools/nextjs-middleware-coverage-tools.js.map +1 -0
- package/dist/tools/nextjs-route-tools.d.ts +100 -0
- package/dist/tools/nextjs-route-tools.d.ts.map +1 -0
- package/dist/tools/nextjs-route-tools.js +493 -0
- package/dist/tools/nextjs-route-tools.js.map +1 -0
- package/dist/tools/nextjs-security-readers.d.ts +22 -0
- package/dist/tools/nextjs-security-readers.d.ts.map +1 -0
- package/dist/tools/nextjs-security-readers.js +318 -0
- package/dist/tools/nextjs-security-readers.js.map +1 -0
- package/dist/tools/nextjs-security-scoring.d.ts +15 -0
- package/dist/tools/nextjs-security-scoring.d.ts.map +1 -0
- package/dist/tools/nextjs-security-scoring.js +65 -0
- package/dist/tools/nextjs-security-scoring.js.map +1 -0
- package/dist/tools/nextjs-security-tools.d.ts +75 -0
- package/dist/tools/nextjs-security-tools.d.ts.map +1 -0
- package/dist/tools/nextjs-security-tools.js +153 -0
- package/dist/tools/nextjs-security-tools.js.map +1 -0
- package/dist/tools/nextjs-tools.d.ts +15 -0
- package/dist/tools/nextjs-tools.d.ts.map +1 -0
- package/dist/tools/nextjs-tools.js +15 -0
- package/dist/tools/nextjs-tools.js.map +1 -0
- package/dist/tools/outline-tools.d.ts.map +1 -1
- package/dist/tools/outline-tools.js +20 -0
- package/dist/tools/outline-tools.js.map +1 -1
- package/dist/tools/pattern-tools.d.ts +8 -0
- package/dist/tools/pattern-tools.d.ts.map +1 -1
- package/dist/tools/pattern-tools.js +561 -3
- package/dist/tools/pattern-tools.js.map +1 -1
- package/dist/tools/perf-tools.d.ts +32 -0
- package/dist/tools/perf-tools.d.ts.map +1 -0
- package/dist/tools/perf-tools.js +227 -0
- package/dist/tools/perf-tools.js.map +1 -0
- package/dist/tools/php-tools.d.ts +176 -0
- package/dist/tools/php-tools.d.ts.map +1 -0
- package/dist/tools/php-tools.js +543 -0
- package/dist/tools/php-tools.js.map +1 -0
- package/dist/tools/prisma-schema-tools.d.ts +44 -0
- package/dist/tools/prisma-schema-tools.d.ts.map +1 -0
- package/dist/tools/prisma-schema-tools.js +358 -0
- package/dist/tools/prisma-schema-tools.js.map +1 -0
- package/dist/tools/project-tools.d.ts +115 -6
- package/dist/tools/project-tools.d.ts.map +1 -1
- package/dist/tools/project-tools.js +594 -217
- package/dist/tools/project-tools.js.map +1 -1
- package/dist/tools/pyproject-tools.d.ts +23 -0
- package/dist/tools/pyproject-tools.d.ts.map +1 -0
- package/dist/tools/pyproject-tools.js +133 -0
- package/dist/tools/pyproject-tools.js.map +1 -0
- package/dist/tools/pytest-tools.d.ts +20 -0
- package/dist/tools/pytest-tools.d.ts.map +1 -0
- package/dist/tools/pytest-tools.js +106 -0
- package/dist/tools/pytest-tools.js.map +1 -0
- package/dist/tools/python-callers.d.ts +28 -0
- package/dist/tools/python-callers.d.ts.map +1 -0
- package/dist/tools/python-callers.js +110 -0
- package/dist/tools/python-callers.js.map +1 -0
- package/dist/tools/python-circular-imports.d.ts +19 -0
- package/dist/tools/python-circular-imports.d.ts.map +1 -0
- package/dist/tools/python-circular-imports.js +126 -0
- package/dist/tools/python-circular-imports.js.map +1 -0
- package/dist/tools/python-deps-analyzer.d.ts +46 -0
- package/dist/tools/python-deps-analyzer.d.ts.map +1 -0
- package/dist/tools/python-deps-analyzer.js +227 -0
- package/dist/tools/python-deps-analyzer.js.map +1 -0
- package/dist/tools/query-tools.d.ts +23 -0
- package/dist/tools/query-tools.d.ts.map +1 -0
- package/dist/tools/query-tools.js +256 -0
- package/dist/tools/query-tools.js.map +1 -0
- package/dist/tools/react-tools.d.ts +218 -0
- package/dist/tools/react-tools.d.ts.map +1 -0
- package/dist/tools/react-tools.js +714 -0
- package/dist/tools/react-tools.js.map +1 -0
- package/dist/tools/report-tools.js +47 -0
- package/dist/tools/report-tools.js.map +1 -1
- package/dist/tools/review-diff-tools.d.ts +2 -6
- package/dist/tools/review-diff-tools.d.ts.map +1 -1
- package/dist/tools/review-diff-tools.js +51 -66
- package/dist/tools/review-diff-tools.js.map +1 -1
- package/dist/tools/room-tools.d.ts +36 -0
- package/dist/tools/room-tools.d.ts.map +1 -0
- package/dist/tools/room-tools.js +147 -0
- package/dist/tools/room-tools.js.map +1 -0
- package/dist/tools/route-tools.d.ts +27 -1
- package/dist/tools/route-tools.d.ts.map +1 -1
- package/dist/tools/route-tools.js +744 -18
- package/dist/tools/route-tools.js.map +1 -1
- package/dist/tools/ruff-tools.d.ts +32 -0
- package/dist/tools/ruff-tools.d.ts.map +1 -0
- package/dist/tools/ruff-tools.js +114 -0
- package/dist/tools/ruff-tools.js.map +1 -0
- package/dist/tools/search-ranker.d.ts.map +1 -1
- package/dist/tools/search-ranker.js +7 -0
- package/dist/tools/search-ranker.js.map +1 -1
- package/dist/tools/serialization-tools.d.ts +24 -0
- package/dist/tools/serialization-tools.d.ts.map +1 -0
- package/dist/tools/serialization-tools.js +156 -0
- package/dist/tools/serialization-tools.js.map +1 -0
- package/dist/tools/sql-tools.d.ts +234 -0
- package/dist/tools/sql-tools.d.ts.map +1 -0
- package/dist/tools/sql-tools.js +1037 -0
- package/dist/tools/sql-tools.js.map +1 -0
- package/dist/tools/status-tools.d.ts +10 -0
- package/dist/tools/status-tools.d.ts.map +1 -0
- package/dist/tools/status-tools.js +32 -0
- package/dist/tools/status-tools.js.map +1 -0
- package/dist/tools/symbol-tools.d.ts +19 -0
- package/dist/tools/symbol-tools.d.ts.map +1 -1
- package/dist/tools/symbol-tools.js +78 -4
- package/dist/tools/symbol-tools.js.map +1 -1
- package/dist/tools/test-impact-tools.d.ts +29 -0
- package/dist/tools/test-impact-tools.d.ts.map +1 -0
- package/dist/tools/test-impact-tools.js +156 -0
- package/dist/tools/test-impact-tools.js.map +1 -0
- package/dist/tools/typecheck-tools.d.ts +39 -0
- package/dist/tools/typecheck-tools.d.ts.map +1 -0
- package/dist/tools/typecheck-tools.js +191 -0
- package/dist/tools/typecheck-tools.js.map +1 -0
- package/dist/tools/wiring-tools.d.ts +19 -0
- package/dist/tools/wiring-tools.d.ts.map +1 -0
- package/dist/tools/wiring-tools.js +147 -0
- package/dist/tools/wiring-tools.js.map +1 -0
- package/dist/types.d.ts +9 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/framework-detect.d.ts +18 -2
- package/dist/utils/framework-detect.d.ts.map +1 -1
- package/dist/utils/framework-detect.js +150 -3
- package/dist/utils/framework-detect.js.map +1 -1
- package/dist/utils/import-graph.d.ts +36 -0
- package/dist/utils/import-graph.d.ts.map +1 -1
- package/dist/utils/import-graph.js +212 -9
- package/dist/utils/import-graph.js.map +1 -1
- package/dist/utils/language-detect.d.ts +21 -0
- package/dist/utils/language-detect.d.ts.map +1 -0
- package/dist/utils/language-detect.js +183 -0
- package/dist/utils/language-detect.js.map +1 -0
- package/dist/utils/nextjs-ast-readers.d.ts +44 -0
- package/dist/utils/nextjs-ast-readers.d.ts.map +1 -0
- package/dist/utils/nextjs-ast-readers.js +341 -0
- package/dist/utils/nextjs-ast-readers.js.map +1 -0
- package/dist/utils/nextjs-audit-cache.d.ts +51 -0
- package/dist/utils/nextjs-audit-cache.d.ts.map +1 -0
- package/dist/utils/nextjs-audit-cache.js +116 -0
- package/dist/utils/nextjs-audit-cache.js.map +1 -0
- package/dist/utils/nextjs-metadata-readers.d.ts +65 -0
- package/dist/utils/nextjs-metadata-readers.d.ts.map +1 -0
- package/dist/utils/nextjs-metadata-readers.js +447 -0
- package/dist/utils/nextjs-metadata-readers.js.map +1 -0
- package/dist/utils/nextjs.d.ts +42 -0
- package/dist/utils/nextjs.d.ts.map +1 -0
- package/dist/utils/nextjs.js +284 -0
- package/dist/utils/nextjs.js.map +1 -0
- package/dist/utils/python-import-resolver.d.ts +42 -0
- package/dist/utils/python-import-resolver.d.ts.map +1 -0
- package/dist/utils/python-import-resolver.js +101 -0
- package/dist/utils/python-import-resolver.js.map +1 -0
- package/dist/utils/python-imports.d.ts +28 -0
- package/dist/utils/python-imports.d.ts.map +1 -0
- package/dist/utils/python-imports.js +117 -0
- package/dist/utils/python-imports.js.map +1 -0
- package/dist/utils/react-alias.d.ts +15 -0
- package/dist/utils/react-alias.d.ts.map +1 -0
- package/dist/utils/react-alias.js +31 -0
- package/dist/utils/react-alias.js.map +1 -0
- package/dist/utils/test-file.d.ts.map +1 -1
- package/dist/utils/test-file.js +7 -0
- package/dist/utils/test-file.js.map +1 -1
- package/dist/utils/walk.d.ts +22 -0
- package/dist/utils/walk.d.ts.map +1 -1
- package/dist/utils/walk.js +70 -2
- package/dist/utils/walk.js.map +1 -1
- package/package.json +3 -2
- package/rules/codesift.md +34 -5
- package/rules/codesift.mdc +34 -5
- package/rules/codex.md +34 -5
- package/rules/gemini.md +34 -5
- package/src/parser/languages/tree-sitter-javascript.wasm +0 -0
- package/src/parser/languages/tree-sitter-kotlin.wasm +0 -0
- package/src/parser/languages/tree-sitter-php.wasm +0 -0
- package/src/parser/languages/tree-sitter-php_only.wasm +0 -0
- package/src/parser/languages/tree-sitter-python.wasm +0 -0
|
@@ -0,0 +1,572 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kotlin-specific analysis tools.
|
|
3
|
+
*
|
|
4
|
+
* find_extension_functions — discover all extension functions for a receiver type
|
|
5
|
+
* analyze_sealed_hierarchy — find subtypes and missing when() branches
|
|
6
|
+
* trace_suspend_chain — suspend call chain + dispatcher + blocking anti-patterns
|
|
7
|
+
* analyze_kmp_declarations — match expect/actual across KMP source sets
|
|
8
|
+
*/
|
|
9
|
+
import { getCodeIndex } from "./index-tools.js";
|
|
10
|
+
/**
|
|
11
|
+
* Find all extension functions defined for a given receiver type.
|
|
12
|
+
* Scans Kotlin symbol signatures for the `ReceiverType.` prefix pattern.
|
|
13
|
+
*/
|
|
14
|
+
export async function findExtensionFunctions(repo, receiverType, options) {
|
|
15
|
+
const index = await getCodeIndex(repo);
|
|
16
|
+
if (!index) {
|
|
17
|
+
throw new Error(`Repository "${repo}" not found. Index it first with index_folder.`);
|
|
18
|
+
}
|
|
19
|
+
const pattern = `${receiverType}.`;
|
|
20
|
+
const extensions = [];
|
|
21
|
+
for (const sym of index.symbols) {
|
|
22
|
+
if (sym.kind !== "function")
|
|
23
|
+
continue;
|
|
24
|
+
if (!sym.signature)
|
|
25
|
+
continue;
|
|
26
|
+
if (options?.file_pattern && !sym.file.includes(options.file_pattern))
|
|
27
|
+
continue;
|
|
28
|
+
// Match receiver type in signature — look for "ReceiverType." prefix
|
|
29
|
+
// Signatures look like: "String.(param: Int): Boolean" or "suspend List<T>.(x: T): T"
|
|
30
|
+
// Strip leading "suspend " for matching
|
|
31
|
+
const sig = sym.signature.replace(/^suspend\s+/, "");
|
|
32
|
+
// Check for exact type match or generic match (e.g., "List<T>." matches "List")
|
|
33
|
+
if (sig.startsWith(pattern) || sig.startsWith(`${receiverType}<`)) {
|
|
34
|
+
extensions.push({
|
|
35
|
+
name: sym.name,
|
|
36
|
+
file: sym.file,
|
|
37
|
+
start_line: sym.start_line,
|
|
38
|
+
...(sym.signature ? { signature: sym.signature } : {}),
|
|
39
|
+
...(sym.docstring ? { docstring: sym.docstring } : {}),
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// Sort by file then line for stable output
|
|
44
|
+
extensions.sort((a, b) => a.file.localeCompare(b.file) || a.start_line - b.start_line);
|
|
45
|
+
return {
|
|
46
|
+
receiver_type: receiverType,
|
|
47
|
+
extensions,
|
|
48
|
+
total: extensions.length,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Analyze a sealed class/interface hierarchy.
|
|
53
|
+
* Finds all subtypes and checks when() blocks for exhaustiveness.
|
|
54
|
+
*/
|
|
55
|
+
export async function analyzeSealedHierarchy(repo, sealedClassName) {
|
|
56
|
+
const index = await getCodeIndex(repo);
|
|
57
|
+
if (!index) {
|
|
58
|
+
throw new Error(`Repository "${repo}" not found. Index it first with index_folder.`);
|
|
59
|
+
}
|
|
60
|
+
// Find the sealed class/interface
|
|
61
|
+
const sealedSym = index.symbols.find((s) => s.name === sealedClassName &&
|
|
62
|
+
(s.kind === "class" || s.kind === "interface") &&
|
|
63
|
+
s.source?.includes("sealed"));
|
|
64
|
+
if (!sealedSym) {
|
|
65
|
+
throw new Error(`Sealed class/interface "${sealedClassName}" not found. Ensure the file is indexed.`);
|
|
66
|
+
}
|
|
67
|
+
// Find subtypes — classes whose source contains `: SealedName` or `: SealedName()`
|
|
68
|
+
// as a delegation specifier (supertype)
|
|
69
|
+
const subtypePattern = new RegExp(`:\\s*(?:[\\w<>,\\s]+,\\s*)?${sealedClassName}\\s*[({,)]|:\\s*${sealedClassName}\\s*$`);
|
|
70
|
+
const subtypes = [];
|
|
71
|
+
for (const sym of index.symbols) {
|
|
72
|
+
if (sym.kind !== "class" && sym.kind !== "interface")
|
|
73
|
+
continue;
|
|
74
|
+
if (sym.name === sealedClassName)
|
|
75
|
+
continue;
|
|
76
|
+
if (!sym.source)
|
|
77
|
+
continue;
|
|
78
|
+
if (subtypePattern.test(sym.source)) {
|
|
79
|
+
subtypes.push({
|
|
80
|
+
name: sym.name,
|
|
81
|
+
file: sym.file,
|
|
82
|
+
start_line: sym.start_line,
|
|
83
|
+
kind: sym.kind,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
const subtypeNames = new Set(subtypes.map((s) => s.name));
|
|
88
|
+
// Find when() blocks that reference the sealed class
|
|
89
|
+
// Search for `when (expr)` patterns in Kotlin files where expr involves the sealed type
|
|
90
|
+
const whenBlocks = [];
|
|
91
|
+
const { readFile } = await import("node:fs/promises");
|
|
92
|
+
const { join } = await import("node:path");
|
|
93
|
+
const kotlinFiles = index.files.filter((f) => /\.kts?$/.test(f.path));
|
|
94
|
+
for (const file of kotlinFiles) {
|
|
95
|
+
let source;
|
|
96
|
+
try {
|
|
97
|
+
source = await readFile(join(index.root, file.path), "utf-8");
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
// Find when blocks — look for `when (` or `when {` patterns
|
|
103
|
+
const whenPattern = /\bwhen\s*\([^)]*\)\s*\{/g;
|
|
104
|
+
let match;
|
|
105
|
+
while ((match = whenPattern.exec(source)) !== null) {
|
|
106
|
+
// Check if this when block references any of the subtypes
|
|
107
|
+
// Extract the block content (approximate — find matching closing brace)
|
|
108
|
+
const blockStart = match.index + match[0].length;
|
|
109
|
+
let depth = 1;
|
|
110
|
+
let blockEnd = blockStart;
|
|
111
|
+
for (let i = blockStart; i < source.length && depth > 0; i++) {
|
|
112
|
+
if (source[i] === "{")
|
|
113
|
+
depth++;
|
|
114
|
+
else if (source[i] === "}")
|
|
115
|
+
depth--;
|
|
116
|
+
blockEnd = i;
|
|
117
|
+
}
|
|
118
|
+
const blockContent = source.slice(match.index, blockEnd + 1);
|
|
119
|
+
// Check if this when block references our sealed class subtypes
|
|
120
|
+
const branchesFound = [];
|
|
121
|
+
for (const subName of subtypeNames) {
|
|
122
|
+
// Match: `is SubName ->` or `SubName ->` or `is SubName,`
|
|
123
|
+
const branchRe = new RegExp(`\\b(?:is\\s+)?${subName}\\b`);
|
|
124
|
+
if (branchRe.test(blockContent)) {
|
|
125
|
+
branchesFound.push(subName);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
// Only report when blocks that reference at least one subtype
|
|
129
|
+
if (branchesFound.length === 0)
|
|
130
|
+
continue;
|
|
131
|
+
const branchesMissing = [...subtypeNames].filter((n) => !branchesFound.includes(n));
|
|
132
|
+
const lineNum = source.slice(0, match.index).split("\n").length;
|
|
133
|
+
whenBlocks.push({
|
|
134
|
+
file: file.path,
|
|
135
|
+
line: lineNum,
|
|
136
|
+
branches_found: branchesFound.sort(),
|
|
137
|
+
branches_missing: branchesMissing.sort(),
|
|
138
|
+
is_exhaustive: branchesMissing.length === 0,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
sealed_class: {
|
|
144
|
+
name: sealedSym.name,
|
|
145
|
+
file: sealedSym.file,
|
|
146
|
+
start_line: sealedSym.start_line,
|
|
147
|
+
kind: sealedSym.kind,
|
|
148
|
+
},
|
|
149
|
+
subtypes,
|
|
150
|
+
when_blocks: whenBlocks,
|
|
151
|
+
total_subtypes: subtypes.length,
|
|
152
|
+
total_when_blocks: whenBlocks.length,
|
|
153
|
+
all_exhaustive: whenBlocks.length > 0 && whenBlocks.every((w) => w.is_exhaustive),
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Normalize a dispatcher expression captured from `withContext(<arg>)` into
|
|
158
|
+
* one of the canonical bucket names: "IO", "Main", "Default", "Unconfined",
|
|
159
|
+
* or a raw string for unrecognized custom dispatchers.
|
|
160
|
+
*
|
|
161
|
+
* Handles three real-world forms, matching the most common Android Kotlin
|
|
162
|
+
* patterns:
|
|
163
|
+
*
|
|
164
|
+
* Dispatchers.IO → "IO" (static, kotlinx.coroutines canonical)
|
|
165
|
+
* dispatchers.io → "IO" (DI-injected provider, Google-recommended)
|
|
166
|
+
* ioDispatcher → "IO" (injected by parameter convention)
|
|
167
|
+
* mainDispatcher → "Main"
|
|
168
|
+
* defaultDispatcher → "Default"
|
|
169
|
+
*
|
|
170
|
+
* Returns null for expressions that don't look like a dispatcher at all
|
|
171
|
+
* (e.g. `coroutineContext` or a plain variable that isn't dispatcher-named),
|
|
172
|
+
* so they don't clutter the transitions report with false positives.
|
|
173
|
+
*/
|
|
174
|
+
function classifyDispatcherExpression(expr) {
|
|
175
|
+
// 1. Static Dispatchers.X (any case on the suffix — canonical is PascalCase)
|
|
176
|
+
const staticMatch = /^Dispatchers\.(\w+)$/.exec(expr);
|
|
177
|
+
if (staticMatch)
|
|
178
|
+
return canonicalizeDispatcherName(staticMatch[1]);
|
|
179
|
+
// 2. Injected provider field — `<identifier>.<bucket>` where identifier is
|
|
180
|
+
// lowercase (e.g. dispatchers.io, coroutineDispatchers.main). We only
|
|
181
|
+
// accept recognized bucket suffixes so plain `foo.bar` isn't misreported.
|
|
182
|
+
const fieldMatch = /^[a-z]\w*\.(io|main|default|unconfined)$/i.exec(expr);
|
|
183
|
+
if (fieldMatch)
|
|
184
|
+
return canonicalizeDispatcherName(fieldMatch[1]);
|
|
185
|
+
// 3. Naming convention — `<bucket>Dispatcher` as a bare parameter.
|
|
186
|
+
const conventionMatch = /^(io|main|default|unconfined)Dispatcher$/i.exec(expr);
|
|
187
|
+
if (conventionMatch)
|
|
188
|
+
return canonicalizeDispatcherName(conventionMatch[1]);
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
function canonicalizeDispatcherName(raw) {
|
|
192
|
+
const lower = raw.toLowerCase();
|
|
193
|
+
if (lower === "io")
|
|
194
|
+
return "IO";
|
|
195
|
+
if (lower === "main" || lower === "mainimmediate")
|
|
196
|
+
return "Main";
|
|
197
|
+
if (lower === "default")
|
|
198
|
+
return "Default";
|
|
199
|
+
if (lower === "unconfined")
|
|
200
|
+
return "Unconfined";
|
|
201
|
+
// Preserve the original capitalization for anything we don't recognize.
|
|
202
|
+
return raw;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Determines whether a symbol is a suspend function. Checks the signature
|
|
206
|
+
* prefix first (populated by the Kotlin extractor for extension funcs) then
|
|
207
|
+
* falls back to scanning the source head for the `suspend` modifier keyword.
|
|
208
|
+
*/
|
|
209
|
+
function isSuspendFunction(sym) {
|
|
210
|
+
if (sym.kind !== "function" && sym.kind !== "method")
|
|
211
|
+
return false;
|
|
212
|
+
if (sym.signature?.startsWith("suspend"))
|
|
213
|
+
return true;
|
|
214
|
+
const head = sym.source?.slice(0, 200);
|
|
215
|
+
if (!head)
|
|
216
|
+
return false;
|
|
217
|
+
return /\bsuspend\s+fun\b/.test(head);
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Scan a suspend function's source for common Kotlin coroutine anti-patterns.
|
|
221
|
+
* Returns an array of warnings (one per finding) plus the dispatcher
|
|
222
|
+
* transitions observed in the same pass.
|
|
223
|
+
*/
|
|
224
|
+
function analyzeSuspendBody(sym) {
|
|
225
|
+
const warnings = [];
|
|
226
|
+
const transitions = [];
|
|
227
|
+
const source = sym.source ?? "";
|
|
228
|
+
const fnName = sym.name;
|
|
229
|
+
// Dispatcher transitions. We match any `withContext(<arg>)` and then
|
|
230
|
+
// classify the argument into one of Kotlin's canonical dispatcher buckets.
|
|
231
|
+
// This covers three real-world patterns:
|
|
232
|
+
//
|
|
233
|
+
// 1. Static: withContext(Dispatchers.IO)
|
|
234
|
+
// 2. DI provider: withContext(dispatchers.io) — injected CoroutineDispatchers
|
|
235
|
+
// 3. Convention: withContext(ioDispatcher) / withContext(mainDispatcher)
|
|
236
|
+
//
|
|
237
|
+
// Pattern 2/3 are the Google-recommended testable forms and appear in most
|
|
238
|
+
// production Android Kotlin code. Restricting to `Dispatchers.X` would miss
|
|
239
|
+
// the majority of real-world usage.
|
|
240
|
+
const dispatcherRe = /withContext\s*\(\s*([A-Za-z_][\w.]*)\s*[,)]/g;
|
|
241
|
+
let m;
|
|
242
|
+
while ((m = dispatcherRe.exec(source)) !== null) {
|
|
243
|
+
const arg = m[1];
|
|
244
|
+
const kind = classifyDispatcherExpression(arg);
|
|
245
|
+
if (!kind)
|
|
246
|
+
continue; // Not a recognizable dispatcher expression.
|
|
247
|
+
const lineOffset = source.slice(0, m.index).split("\n").length - 1;
|
|
248
|
+
transitions.push({
|
|
249
|
+
function: fnName,
|
|
250
|
+
dispatcher: kind,
|
|
251
|
+
line: sym.start_line + lineOffset,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
// Anti-pattern 1: runBlocking inside a suspend function.
|
|
255
|
+
const runBlockingMatch = /\brunBlocking\s*[\{(]/.exec(source);
|
|
256
|
+
if (runBlockingMatch) {
|
|
257
|
+
const lineOffset = source.slice(0, runBlockingMatch.index).split("\n").length - 1;
|
|
258
|
+
warnings.push({
|
|
259
|
+
function: fnName,
|
|
260
|
+
file: sym.file,
|
|
261
|
+
line: sym.start_line + lineOffset,
|
|
262
|
+
message: "runBlocking inside a suspend function — deadlock risk on caller's dispatcher",
|
|
263
|
+
severity: "critical",
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
// Anti-pattern 2: Thread.sleep() blocks the coroutine thread.
|
|
267
|
+
const threadSleepMatch = /\bThread\.sleep\s*\(/.exec(source);
|
|
268
|
+
if (threadSleepMatch) {
|
|
269
|
+
const lineOffset = source.slice(0, threadSleepMatch.index).split("\n").length - 1;
|
|
270
|
+
warnings.push({
|
|
271
|
+
function: fnName,
|
|
272
|
+
file: sym.file,
|
|
273
|
+
line: sym.start_line + lineOffset,
|
|
274
|
+
message: "Thread.sleep() in suspend function — blocks dispatcher thread, use delay() instead",
|
|
275
|
+
severity: "critical",
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
// Anti-pattern 3: while(true) loop without ensureActive()/isActive check
|
|
279
|
+
// means the coroutine can't be cancelled.
|
|
280
|
+
const whileTrueMatch = /\bwhile\s*\(\s*true\s*\)\s*\{([\s\S]*?)\}/.exec(source);
|
|
281
|
+
if (whileTrueMatch) {
|
|
282
|
+
const body = whileTrueMatch[1] ?? "";
|
|
283
|
+
const hasCancellationCheck = /\bensureActive\s*\(/.test(body) ||
|
|
284
|
+
/\bisActive\b/.test(body) ||
|
|
285
|
+
/\bcoroutineContext\.isActive\b/.test(body);
|
|
286
|
+
if (!hasCancellationCheck) {
|
|
287
|
+
const lineOffset = source.slice(0, whileTrueMatch.index).split("\n").length - 1;
|
|
288
|
+
warnings.push({
|
|
289
|
+
function: fnName,
|
|
290
|
+
file: sym.file,
|
|
291
|
+
line: sym.start_line + lineOffset,
|
|
292
|
+
message: "while(true) loop without ensureActive()/isActive — loop is not cancellable, coroutine will leak",
|
|
293
|
+
severity: "warning",
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return { warnings, transitions };
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Trace the suspend function call chain starting from `functionName`. Walks
|
|
301
|
+
* out up to `depth` levels through callees (identified by text scan of the
|
|
302
|
+
* source), filtering to suspend-only nodes. Emits dispatcher transitions and
|
|
303
|
+
* coroutine anti-pattern warnings for each visited function.
|
|
304
|
+
*
|
|
305
|
+
* Walk strategy: we look up each callee name in the symbol index. When a
|
|
306
|
+
* function body contains `otherFn(`, we recurse into the symbol named
|
|
307
|
+
* `otherFn` if it exists and is a suspend function. This is intentionally
|
|
308
|
+
* lexical (not call-graph) — accurate enough for typical coroutine code and
|
|
309
|
+
* avoids a full graph build.
|
|
310
|
+
*/
|
|
311
|
+
export async function traceSuspendChain(repo, functionName, options) {
|
|
312
|
+
const index = await getCodeIndex(repo);
|
|
313
|
+
if (!index) {
|
|
314
|
+
throw new Error(`Repository "${repo}" not found. Index it first with index_folder.`);
|
|
315
|
+
}
|
|
316
|
+
const maxDepth = options?.depth ?? 3;
|
|
317
|
+
const root = index.symbols.find((s) => s.name === functionName && (s.kind === "function" || s.kind === "method"));
|
|
318
|
+
if (!root) {
|
|
319
|
+
throw new Error(`Suspend function "${functionName}" not found.`);
|
|
320
|
+
}
|
|
321
|
+
if (!isSuspendFunction(root)) {
|
|
322
|
+
throw new Error(`"${functionName}" is not a suspend function.`);
|
|
323
|
+
}
|
|
324
|
+
// Pre-index suspend functions by name for O(1) callee lookup.
|
|
325
|
+
const suspendByName = new Map();
|
|
326
|
+
for (const sym of index.symbols) {
|
|
327
|
+
if (isSuspendFunction(sym))
|
|
328
|
+
suspendByName.set(sym.name, sym);
|
|
329
|
+
}
|
|
330
|
+
const chain = [];
|
|
331
|
+
const visited = new Set();
|
|
332
|
+
const allWarnings = [];
|
|
333
|
+
const allTransitions = [];
|
|
334
|
+
function walk(sym, level) {
|
|
335
|
+
if (visited.has(sym.id) || level > maxDepth)
|
|
336
|
+
return;
|
|
337
|
+
visited.add(sym.id);
|
|
338
|
+
chain.push(sym.name);
|
|
339
|
+
const { warnings, transitions } = analyzeSuspendBody(sym);
|
|
340
|
+
allWarnings.push(...warnings);
|
|
341
|
+
allTransitions.push(...transitions);
|
|
342
|
+
if (level === maxDepth)
|
|
343
|
+
return;
|
|
344
|
+
// Lexical callee discovery: find identifiers followed by ( in the body
|
|
345
|
+
// and follow them if they map to a known suspend function.
|
|
346
|
+
const source = sym.source ?? "";
|
|
347
|
+
const callRe = /\b([a-z]\w*)\s*\(/g;
|
|
348
|
+
const calleesSeen = new Set();
|
|
349
|
+
let m;
|
|
350
|
+
while ((m = callRe.exec(source)) !== null) {
|
|
351
|
+
const name = m[1];
|
|
352
|
+
if (name === sym.name || calleesSeen.has(name))
|
|
353
|
+
continue;
|
|
354
|
+
calleesSeen.add(name);
|
|
355
|
+
const callee = suspendByName.get(name);
|
|
356
|
+
if (callee && callee.id !== sym.id)
|
|
357
|
+
walk(callee, level + 1);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
walk(root, 0);
|
|
361
|
+
return {
|
|
362
|
+
root: root.name,
|
|
363
|
+
chain,
|
|
364
|
+
dispatcher_transitions: allTransitions,
|
|
365
|
+
warnings: allWarnings,
|
|
366
|
+
depth: maxDepth,
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Parse the source set segment from a KMP-layout file path. Returns the
|
|
371
|
+
* source set name (e.g. "commonMain", "androidMain") or null when the file
|
|
372
|
+
* isn't under a recognized `src/<name>Main/kotlin/` layout.
|
|
373
|
+
*/
|
|
374
|
+
function parseSourceSet(filePath) {
|
|
375
|
+
const match = /src\/(\w+Main)\/kotlin\//.exec(filePath);
|
|
376
|
+
return match?.[1] ?? null;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Analyze KMP expect/actual declarations across source sets. Groups symbols
|
|
380
|
+
* tagged with `meta.kmp_modifier` by simple name, splits them into expects
|
|
381
|
+
* and actuals, and reports three verdicts per declaration:
|
|
382
|
+
*
|
|
383
|
+
* - matched: commonMain expect + at least one platform actual
|
|
384
|
+
* - missing_actuals: commonMain expect but one or more platform source
|
|
385
|
+
* sets (discovered from the index files list) have no
|
|
386
|
+
* corresponding `actual`
|
|
387
|
+
* - orphan_actuals: actual without any commonMain expect
|
|
388
|
+
*/
|
|
389
|
+
export async function analyzeKmpDeclarations(repo) {
|
|
390
|
+
const index = await getCodeIndex(repo);
|
|
391
|
+
if (!index) {
|
|
392
|
+
throw new Error(`Repository "${repo}" not found. Index it first with index_folder.`);
|
|
393
|
+
}
|
|
394
|
+
// Discover all source sets present in the repo (from file paths) so we can
|
|
395
|
+
// compute missing_actuals against the ones that actually exist. Fallback
|
|
396
|
+
// list covers the common KMP targets when source sets can't be detected
|
|
397
|
+
// from the files array.
|
|
398
|
+
const sourceSetsInRepo = new Set();
|
|
399
|
+
for (const file of index.files) {
|
|
400
|
+
const sourceSet = parseSourceSet(file.path);
|
|
401
|
+
if (sourceSet)
|
|
402
|
+
sourceSetsInRepo.add(sourceSet);
|
|
403
|
+
}
|
|
404
|
+
// Drop commonMain from the "platforms to check" list — commonMain holds
|
|
405
|
+
// expects, not actuals.
|
|
406
|
+
const platformSourceSets = [...sourceSetsInRepo].filter((s) => s !== "commonMain");
|
|
407
|
+
const groups = new Map();
|
|
408
|
+
for (const sym of index.symbols) {
|
|
409
|
+
const kmp = sym.meta?.["kmp_modifier"];
|
|
410
|
+
if (kmp !== "expect" && kmp !== "actual")
|
|
411
|
+
continue;
|
|
412
|
+
const sourceSet = parseSourceSet(sym.file);
|
|
413
|
+
if (!sourceSet)
|
|
414
|
+
continue;
|
|
415
|
+
const key = `${sym.kind}::${sym.name}`;
|
|
416
|
+
let group = groups.get(key);
|
|
417
|
+
if (!group) {
|
|
418
|
+
group = { expects: [], actuals: [] };
|
|
419
|
+
groups.set(key, group);
|
|
420
|
+
}
|
|
421
|
+
if (kmp === "expect") {
|
|
422
|
+
group.expects.push({ sym, sourceSet });
|
|
423
|
+
}
|
|
424
|
+
else {
|
|
425
|
+
group.actuals.push({ sym, sourceSet });
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
const matched = [];
|
|
429
|
+
const missingActuals = [];
|
|
430
|
+
const orphanActuals = [];
|
|
431
|
+
let fullyMatched = 0;
|
|
432
|
+
for (const group of groups.values()) {
|
|
433
|
+
if (group.expects.length === 0) {
|
|
434
|
+
// All entries are actuals with no expect → orphans.
|
|
435
|
+
for (const { sym, sourceSet } of group.actuals) {
|
|
436
|
+
orphanActuals.push({
|
|
437
|
+
name: sym.name,
|
|
438
|
+
kind: sym.kind,
|
|
439
|
+
source_set: sourceSet,
|
|
440
|
+
file: sym.file,
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
continue;
|
|
444
|
+
}
|
|
445
|
+
// A group has an expect. Walk each expect (usually just one from
|
|
446
|
+
// commonMain) and check actuals.
|
|
447
|
+
for (const expectEntry of group.expects) {
|
|
448
|
+
const actualSets = group.actuals.map((a) => a.sourceSet);
|
|
449
|
+
const missingFrom = platformSourceSets.filter((s) => !actualSets.includes(s));
|
|
450
|
+
if (missingFrom.length === 0 && actualSets.length > 0) {
|
|
451
|
+
fullyMatched++;
|
|
452
|
+
}
|
|
453
|
+
if (actualSets.length > 0) {
|
|
454
|
+
matched.push({
|
|
455
|
+
name: expectEntry.sym.name,
|
|
456
|
+
kind: expectEntry.sym.kind,
|
|
457
|
+
expect_source_set: expectEntry.sourceSet,
|
|
458
|
+
actual_source_sets: actualSets,
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
if (missingFrom.length > 0) {
|
|
462
|
+
missingActuals.push({
|
|
463
|
+
name: expectEntry.sym.name,
|
|
464
|
+
kind: expectEntry.sym.kind,
|
|
465
|
+
source_set: expectEntry.sourceSet,
|
|
466
|
+
missing_from: missingFrom,
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
return {
|
|
472
|
+
total_expects: [...groups.values()].reduce((n, g) => n + g.expects.length, 0),
|
|
473
|
+
fully_matched: fullyMatched,
|
|
474
|
+
source_sets_detected: [...sourceSetsInRepo].sort(),
|
|
475
|
+
matched,
|
|
476
|
+
missing_actuals: missingActuals,
|
|
477
|
+
orphan_actuals: orphanActuals,
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Known Kotlin Flow operators — used to detect and classify operator chains.
|
|
482
|
+
* Categorized into transform, filter, combine, terminal, and lifecycle
|
|
483
|
+
* so downstream tools can reason about the chain semantics.
|
|
484
|
+
*/
|
|
485
|
+
const FLOW_OPERATORS = new Set([
|
|
486
|
+
// transform
|
|
487
|
+
"map", "mapNotNull", "mapLatest", "transform", "transformLatest",
|
|
488
|
+
"flatMapConcat", "flatMapMerge", "flatMapLatest",
|
|
489
|
+
// filter
|
|
490
|
+
"filter", "filterNotNull", "filterNot", "filterIsInstance",
|
|
491
|
+
"distinctUntilChanged", "distinctUntilChangedBy", "debounce", "sample",
|
|
492
|
+
"take", "takeWhile", "drop", "dropWhile",
|
|
493
|
+
// combine / merge
|
|
494
|
+
"combine", "zip", "merge", "onStart", "onEmpty",
|
|
495
|
+
// lifecycle / side-effect
|
|
496
|
+
"onEach", "onCompletion", "catch", "retry", "retryWhen",
|
|
497
|
+
"flowOn", "buffer", "conflate", "cancellable",
|
|
498
|
+
// terminal
|
|
499
|
+
"collect", "collectLatest", "first", "firstOrNull", "single",
|
|
500
|
+
"singleOrNull", "toList", "toSet", "fold", "reduce", "count",
|
|
501
|
+
// conversion
|
|
502
|
+
"stateIn", "shareIn", "asLiveData", "asFlow",
|
|
503
|
+
]);
|
|
504
|
+
const FLOW_TERMINAL_OPS = new Set([
|
|
505
|
+
"collect", "collectLatest", "first", "firstOrNull", "single",
|
|
506
|
+
"singleOrNull", "toList", "toSet", "fold", "reduce", "count",
|
|
507
|
+
]);
|
|
508
|
+
/**
|
|
509
|
+
* Trace a Kotlin Flow operator chain from a function or property. Scans the
|
|
510
|
+
* symbol source for `.operator(` calls matching known Flow operators, reports
|
|
511
|
+
* the ordered chain, and flags common issues:
|
|
512
|
+
*
|
|
513
|
+
* - `.collect` without `.catch` — unhandled exception in flow
|
|
514
|
+
* - `.stateIn(initialValue=...)` without a scope parameter — missing
|
|
515
|
+
* lifecycle binding (requires `viewModelScope` or `lifecycleScope`)
|
|
516
|
+
*
|
|
517
|
+
* The function name can be either a function returning Flow<T> or a property
|
|
518
|
+
* initialized with a Flow chain.
|
|
519
|
+
*/
|
|
520
|
+
export async function traceFlowChain(repo, symbolName) {
|
|
521
|
+
const index = await getCodeIndex(repo);
|
|
522
|
+
if (!index) {
|
|
523
|
+
throw new Error(`Repository "${repo}" not found. Index it first with index_folder.`);
|
|
524
|
+
}
|
|
525
|
+
const sym = index.symbols.find((s) => s.name === symbolName);
|
|
526
|
+
if (!sym) {
|
|
527
|
+
throw new Error(`Symbol "${symbolName}" not found.`);
|
|
528
|
+
}
|
|
529
|
+
const source = sym.source ?? "";
|
|
530
|
+
// Detect Flow operators — `.operatorName(` or `.operatorName {`
|
|
531
|
+
const operatorRe = /\.(\w+)\s*[({]/g;
|
|
532
|
+
const operators = [];
|
|
533
|
+
let m;
|
|
534
|
+
while ((m = operatorRe.exec(source)) !== null) {
|
|
535
|
+
const op = m[1];
|
|
536
|
+
if (FLOW_OPERATORS.has(op))
|
|
537
|
+
operators.push(op);
|
|
538
|
+
}
|
|
539
|
+
if (operators.length === 0) {
|
|
540
|
+
throw new Error(`"${symbolName}" has no Flow operator chain detected.`);
|
|
541
|
+
}
|
|
542
|
+
const hasTerminal = operators.some((op) => FLOW_TERMINAL_OPS.has(op));
|
|
543
|
+
const hasCatch = operators.includes("catch");
|
|
544
|
+
const hasCollect = operators.includes("collect") || operators.includes("collectLatest");
|
|
545
|
+
const hasStateIn = operators.includes("stateIn");
|
|
546
|
+
const warnings = [];
|
|
547
|
+
// Warn 1: collect without catch — unhandled exception in the flow.
|
|
548
|
+
if (hasCollect && !hasCatch) {
|
|
549
|
+
warnings.push(`.collect without .catch — exceptions in the upstream flow propagate to the collector and crash the coroutine`);
|
|
550
|
+
}
|
|
551
|
+
// Warn 2: stateIn without scope (approximate: check if "scope" or
|
|
552
|
+
// "viewModelScope" or "lifecycleScope" appears near stateIn).
|
|
553
|
+
if (hasStateIn) {
|
|
554
|
+
const stateInIdx = source.indexOf(".stateIn(");
|
|
555
|
+
if (stateInIdx !== -1) {
|
|
556
|
+
const stateInContext = source.slice(stateInIdx, stateInIdx + 200);
|
|
557
|
+
if (!/\bscope\b|\bviewModelScope\b|\blifecycleScope\b|\bcoroutineScope\b/i.test(stateInContext)) {
|
|
558
|
+
warnings.push(`.stateIn without a lifecycle scope parameter — the StateFlow will never complete, causing a memory leak unless bound to viewModelScope/lifecycleScope`);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
return {
|
|
563
|
+
root: sym.name,
|
|
564
|
+
file: sym.file,
|
|
565
|
+
start_line: sym.start_line,
|
|
566
|
+
operators,
|
|
567
|
+
operator_count: operators.length,
|
|
568
|
+
has_terminal: hasTerminal,
|
|
569
|
+
warnings,
|
|
570
|
+
};
|
|
571
|
+
}
|
|
572
|
+
//# sourceMappingURL=kotlin-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kotlin-tools.js","sourceRoot":"","sources":["../../src/tools/kotlin-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAmBhD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,IAAY,EACZ,YAAoB,EACpB,OAAmC;IAEnC,MAAM,KAAK,GAAG,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QAC1B,SAAS;QACT,cAAc,EAAE,SAAS,CAAC,MAAM;QAChC,YAAY,EAAE,WAAW;QACzB,QAAQ;KACT,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legacy regex-based Hono convention extractor.
|
|
3
|
+
* Preserved as a kill-switch fallback (CODESIFT_LEGACY_HONO=1) during
|
|
4
|
+
* the migration to the tree-sitter AST extractor.
|
|
5
|
+
*
|
|
6
|
+
* This file is a verbatim copy of the original regex functions from
|
|
7
|
+
* project-tools.ts as of 2026-04-10 (pre-AST migration).
|
|
8
|
+
*
|
|
9
|
+
* DO NOT MODIFY — this is the frozen legacy implementation.
|
|
10
|
+
* Delete after 2-week migration window per spec rollback strategy.
|
|
11
|
+
*/
|
|
12
|
+
import type { Conventions } from "./project-tools.js";
|
|
13
|
+
export declare function legacyExtractHonoConventions(source: string, filePath: string): Conventions;
|
|
14
|
+
//# sourceMappingURL=legacy-hono-conventions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-hono-conventions.d.ts","sourceRoot":"","sources":["../../src/tools/legacy-hono-conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAoD,MAAM,oBAAoB,CAAC;AA4DxG,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,WAAW,CAyE1F"}
|