aspectcode 0.2.2 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.d.ts +15 -47
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +18 -17
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +14 -24
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +5 -60
- package/dist/config.js.map +1 -1
- package/dist/kbBuilder.d.ts +14 -0
- package/dist/kbBuilder.d.ts.map +1 -0
- package/dist/kbBuilder.js +106 -0
- package/dist/kbBuilder.js.map +1 -0
- package/dist/main.d.ts +4 -5
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +45 -124
- package/dist/main.js.map +1 -1
- package/dist/optimize.d.ts +14 -0
- package/dist/optimize.d.ts.map +1 -0
- package/dist/optimize.js +131 -0
- package/dist/optimize.js.map +1 -0
- package/dist/pipeline.d.ts +15 -0
- package/dist/pipeline.d.ts.map +1 -0
- package/dist/pipeline.js +212 -0
- package/dist/pipeline.js.map +1 -0
- package/dist/toolIngestion.d.ts +15 -0
- package/dist/toolIngestion.d.ts.map +1 -0
- package/dist/toolIngestion.js +47 -0
- package/dist/toolIngestion.js.map +1 -0
- package/dist/writer.d.ts +17 -0
- package/dist/writer.d.ts.map +1 -0
- package/dist/writer.js +26 -0
- package/dist/writer.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/analyzer.d.ts +34 -0
- package/node_modules/@aspectcode/core/dist/analysis/analyzer.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/analyzer.js +240 -0
- package/node_modules/@aspectcode/core/dist/analysis/analyzer.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/dependencyAdapters.d.ts +32 -0
- package/node_modules/@aspectcode/core/dist/analysis/dependencyAdapters.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/dependencyAdapters.js +133 -0
- package/node_modules/@aspectcode/core/dist/analysis/dependencyAdapters.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/importParsers.d.ts +30 -0
- package/node_modules/@aspectcode/core/dist/analysis/importParsers.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/importParsers.js +92 -0
- package/node_modules/@aspectcode/core/dist/analysis/importParsers.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/index.d.ts +9 -0
- package/node_modules/@aspectcode/core/dist/analysis/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/index.js +9 -0
- package/node_modules/@aspectcode/core/dist/analysis/index.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/moduleResolver.d.ts +34 -0
- package/node_modules/@aspectcode/core/dist/analysis/moduleResolver.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/moduleResolver.js +240 -0
- package/node_modules/@aspectcode/core/dist/analysis/moduleResolver.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/repo.d.ts +33 -0
- package/node_modules/@aspectcode/core/dist/analysis/repo.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/analysis/repo.js +246 -0
- package/node_modules/@aspectcode/core/dist/analysis/repo.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/classifiers.d.ts +24 -0
- package/node_modules/@aspectcode/core/dist/classifiers.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/classifiers.js +119 -0
- package/node_modules/@aspectcode/core/dist/classifiers.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/fs/exclusions.d.ts +26 -0
- package/node_modules/@aspectcode/core/dist/fs/exclusions.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/fs/exclusions.js +130 -0
- package/node_modules/@aspectcode/core/dist/fs/exclusions.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/fs/fingerprint.d.ts +42 -0
- package/node_modules/@aspectcode/core/dist/fs/fingerprint.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/fs/fingerprint.js +125 -0
- package/node_modules/@aspectcode/core/dist/fs/fingerprint.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/fs/index.d.ts +9 -0
- package/node_modules/@aspectcode/core/dist/fs/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/fs/index.js +26 -0
- package/node_modules/@aspectcode/core/dist/fs/index.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/fs/walker.d.ts +23 -0
- package/node_modules/@aspectcode/core/dist/fs/walker.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/fs/walker.js +94 -0
- package/node_modules/@aspectcode/core/dist/fs/walker.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/host.d.ts +38 -0
- package/node_modules/@aspectcode/core/dist/host.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/host.js +110 -0
- package/node_modules/@aspectcode/core/dist/host.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/index.d.ts +23 -0
- package/node_modules/@aspectcode/core/dist/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/index.js +59 -0
- package/node_modules/@aspectcode/core/dist/index.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/model.d.ts +90 -0
- package/node_modules/@aspectcode/core/dist/model.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/model.js +9 -0
- package/node_modules/@aspectcode/core/dist/model.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/csharpExtractors.d.ts +17 -0
- package/node_modules/@aspectcode/core/dist/parsers/csharpExtractors.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/csharpExtractors.js +225 -0
- package/node_modules/@aspectcode/core/dist/parsers/csharpExtractors.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/grammarLoader.d.ts +30 -0
- package/node_modules/@aspectcode/core/dist/parsers/grammarLoader.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/grammarLoader.js +71 -0
- package/node_modules/@aspectcode/core/dist/parsers/grammarLoader.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/index.d.ts +13 -0
- package/node_modules/@aspectcode/core/dist/parsers/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/index.js +32 -0
- package/node_modules/@aspectcode/core/dist/parsers/index.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/javaExtractors.d.ts +17 -0
- package/node_modules/@aspectcode/core/dist/parsers/javaExtractors.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/javaExtractors.js +182 -0
- package/node_modules/@aspectcode/core/dist/parsers/javaExtractors.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/languages.d.ts +44 -0
- package/node_modules/@aspectcode/core/dist/parsers/languages.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/languages.js +64 -0
- package/node_modules/@aspectcode/core/dist/parsers/languages.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/pythonExtractors.d.ts +18 -0
- package/node_modules/@aspectcode/core/dist/parsers/pythonExtractors.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/pythonExtractors.js +139 -0
- package/node_modules/@aspectcode/core/dist/parsers/pythonExtractors.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/tsJsExtractors.d.ts +22 -0
- package/node_modules/@aspectcode/core/dist/parsers/tsJsExtractors.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/tsJsExtractors.js +240 -0
- package/node_modules/@aspectcode/core/dist/parsers/tsJsExtractors.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/utils.d.ts +7 -0
- package/node_modules/@aspectcode/core/dist/parsers/utils.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/parsers/utils.js +11 -0
- package/node_modules/@aspectcode/core/dist/parsers/utils.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/paths.d.ts +27 -0
- package/node_modules/@aspectcode/core/dist/paths.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/paths.js +45 -0
- package/node_modules/@aspectcode/core/dist/paths.js.map +1 -0
- package/node_modules/@aspectcode/core/dist/stats.d.ts +41 -0
- package/node_modules/@aspectcode/core/dist/stats.d.ts.map +1 -0
- package/node_modules/@aspectcode/core/dist/stats.js +88 -0
- package/node_modules/@aspectcode/core/dist/stats.js.map +1 -0
- package/node_modules/@aspectcode/core/package.json +41 -0
- package/node_modules/@aspectcode/core/parsers/c_sharp.wasm +0 -0
- package/node_modules/@aspectcode/core/parsers/java.wasm +0 -0
- package/node_modules/@aspectcode/core/parsers/javascript.wasm +0 -0
- package/node_modules/@aspectcode/core/parsers/python.wasm +0 -0
- package/node_modules/@aspectcode/core/parsers/tree-sitter.wasm +0 -0
- package/node_modules/@aspectcode/core/parsers/tsx.wasm +0 -0
- package/node_modules/@aspectcode/core/parsers/typescript.wasm +0 -0
- package/node_modules/@aspectcode/emitters/dist/emitter.d.ts +72 -0
- package/node_modules/@aspectcode/emitters/dist/emitter.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/emitter.js +10 -0
- package/node_modules/@aspectcode/emitters/dist/emitter.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/host.d.ts +31 -0
- package/node_modules/@aspectcode/emitters/dist/host.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/host.js +86 -0
- package/node_modules/@aspectcode/emitters/dist/host.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/index.d.ts +27 -0
- package/node_modules/@aspectcode/emitters/dist/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/index.js +116 -0
- package/node_modules/@aspectcode/emitters/dist/index.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/content.d.ts +15 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/content.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/content.js +289 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/content.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/detection.d.ts +13 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/detection.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/detection.js +55 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/detection.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/formats.d.ts +17 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/formats.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/formats.js +23 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/formats.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/index.d.ts +5 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/index.js +12 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/index.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/instructionsEmitter.d.ts +9 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/instructionsEmitter.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/instructionsEmitter.js +30 -0
- package/node_modules/@aspectcode/emitters/dist/instructions/instructionsEmitter.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/analyzers.d.ts +64 -0
- package/node_modules/@aspectcode/emitters/dist/kb/analyzers.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/analyzers.js +504 -0
- package/node_modules/@aspectcode/emitters/dist/kb/analyzers.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/architectureEmitter.d.ts +24 -0
- package/node_modules/@aspectcode/emitters/dist/kb/architectureEmitter.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/architectureEmitter.js +238 -0
- package/node_modules/@aspectcode/emitters/dist/kb/architectureEmitter.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/classifiers.d.ts +8 -0
- package/node_modules/@aspectcode/emitters/dist/kb/classifiers.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/classifiers.js +14 -0
- package/node_modules/@aspectcode/emitters/dist/kb/classifiers.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/constants.d.ts +35 -0
- package/node_modules/@aspectcode/emitters/dist/kb/constants.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/constants.js +38 -0
- package/node_modules/@aspectcode/emitters/dist/kb/constants.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/contextEmitter.d.ts +20 -0
- package/node_modules/@aspectcode/emitters/dist/kb/contextEmitter.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/contextEmitter.js +155 -0
- package/node_modules/@aspectcode/emitters/dist/kb/contextEmitter.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/conventions.d.ts +52 -0
- package/node_modules/@aspectcode/emitters/dist/kb/conventions.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/conventions.js +391 -0
- package/node_modules/@aspectcode/emitters/dist/kb/conventions.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/depData.d.ts +18 -0
- package/node_modules/@aspectcode/emitters/dist/kb/depData.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/depData.js +31 -0
- package/node_modules/@aspectcode/emitters/dist/kb/depData.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/detectors.d.ts +18 -0
- package/node_modules/@aspectcode/emitters/dist/kb/detectors.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/detectors.js +317 -0
- package/node_modules/@aspectcode/emitters/dist/kb/detectors.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/entryPoints.d.ts +33 -0
- package/node_modules/@aspectcode/emitters/dist/kb/entryPoints.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/entryPoints.js +323 -0
- package/node_modules/@aspectcode/emitters/dist/kb/entryPoints.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/helpers.d.ts +27 -0
- package/node_modules/@aspectcode/emitters/dist/kb/helpers.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/helpers.js +63 -0
- package/node_modules/@aspectcode/emitters/dist/kb/helpers.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/index.d.ts +27 -0
- package/node_modules/@aspectcode/emitters/dist/kb/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/index.js +72 -0
- package/node_modules/@aspectcode/emitters/dist/kb/index.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/kbEmitter.d.ts +21 -0
- package/node_modules/@aspectcode/emitters/dist/kb/kbEmitter.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/kbEmitter.js +125 -0
- package/node_modules/@aspectcode/emitters/dist/kb/kbEmitter.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/mapEmitter.d.ts +26 -0
- package/node_modules/@aspectcode/emitters/dist/kb/mapEmitter.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/mapEmitter.js +255 -0
- package/node_modules/@aspectcode/emitters/dist/kb/mapEmitter.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/policy.d.ts +12 -0
- package/node_modules/@aspectcode/emitters/dist/kb/policy.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/policy.js +29 -0
- package/node_modules/@aspectcode/emitters/dist/kb/policy.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/symbols.d.ts +43 -0
- package/node_modules/@aspectcode/emitters/dist/kb/symbols.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/kb/symbols.js +343 -0
- package/node_modules/@aspectcode/emitters/dist/kb/symbols.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/manifest.d.ts +37 -0
- package/node_modules/@aspectcode/emitters/dist/manifest.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/manifest.js +50 -0
- package/node_modules/@aspectcode/emitters/dist/manifest.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/report.d.ts +22 -0
- package/node_modules/@aspectcode/emitters/dist/report.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/report.js +3 -0
- package/node_modules/@aspectcode/emitters/dist/report.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/stableJson.d.ts +14 -0
- package/node_modules/@aspectcode/emitters/dist/stableJson.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/stableJson.js +40 -0
- package/node_modules/@aspectcode/emitters/dist/stableJson.js.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/transaction.d.ts +29 -0
- package/node_modules/@aspectcode/emitters/dist/transaction.d.ts.map +1 -0
- package/node_modules/@aspectcode/emitters/dist/transaction.js +104 -0
- package/node_modules/@aspectcode/emitters/dist/transaction.js.map +1 -0
- package/node_modules/@aspectcode/emitters/package.json +39 -0
- package/node_modules/@aspectcode/optimizer/dist/agent.d.ts +18 -0
- package/node_modules/@aspectcode/optimizer/dist/agent.d.ts.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/agent.js +123 -0
- package/node_modules/@aspectcode/optimizer/dist/agent.js.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/index.d.ts +15 -0
- package/node_modules/@aspectcode/optimizer/dist/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/index.js +31 -0
- package/node_modules/@aspectcode/optimizer/dist/index.js.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/prompts.d.ts +39 -0
- package/node_modules/@aspectcode/optimizer/dist/prompts.d.ts.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/prompts.js +156 -0
- package/node_modules/@aspectcode/optimizer/dist/prompts.js.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.d.ts +20 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.d.ts.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.js +126 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.js.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/index.d.ts +28 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/index.d.ts.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/index.js +142 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/index.js.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/openai.d.ts +19 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/openai.d.ts.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/openai.js +98 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/openai.js.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/retry.d.ts +19 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/retry.d.ts.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/retry.js +87 -0
- package/node_modules/@aspectcode/optimizer/dist/providers/retry.js.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/types.d.ts +93 -0
- package/node_modules/@aspectcode/optimizer/dist/types.d.ts.map +1 -0
- package/node_modules/@aspectcode/optimizer/dist/types.js +20 -0
- package/node_modules/@aspectcode/optimizer/dist/types.js.map +1 -0
- package/node_modules/@aspectcode/optimizer/package.json +41 -0
- package/node_modules/dotenv/CHANGELOG.md +520 -0
- package/node_modules/dotenv/LICENSE +23 -0
- package/node_modules/dotenv/README-es.md +411 -0
- package/node_modules/dotenv/README.md +645 -0
- package/node_modules/dotenv/SECURITY.md +1 -0
- package/node_modules/dotenv/config.d.ts +1 -0
- package/node_modules/dotenv/config.js +9 -0
- package/node_modules/dotenv/lib/cli-options.js +17 -0
- package/node_modules/dotenv/lib/env-options.js +28 -0
- package/node_modules/dotenv/lib/main.d.ts +162 -0
- package/node_modules/dotenv/lib/main.js +386 -0
- package/node_modules/dotenv/package.json +62 -0
- package/package.json +16 -4
- package/dist/commands/deps.d.ts +0 -11
- package/dist/commands/deps.d.ts.map +0 -1
- package/dist/commands/deps.js +0 -197
- package/dist/commands/deps.js.map +0 -1
- package/dist/commands/generate.d.ts +0 -8
- package/dist/commands/generate.d.ts.map +0 -1
- package/dist/commands/generate.js +0 -162
- package/dist/commands/generate.js.map +0 -1
- package/dist/commands/settings.d.ts +0 -9
- package/dist/commands/settings.d.ts.map +0 -1
- package/dist/commands/settings.js +0 -165
- package/dist/commands/settings.js.map +0 -1
- package/dist/commands/watch.d.ts +0 -6
- package/dist/commands/watch.d.ts.map +0 -1
- package/dist/commands/watch.js +0 -180
- package/dist/commands/watch.js.map +0 -1
- package/dist/connections.d.ts +0 -24
- package/dist/connections.d.ts.map +0 -1
- package/dist/connections.js +0 -89
- package/dist/connections.js.map +0 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repository-level analysis — the top-level pipeline that builds an
|
|
3
|
+
* AnalysisModel from a set of workspace files.
|
|
4
|
+
*
|
|
5
|
+
* Extracted from index.ts to keep the barrel file lean.
|
|
6
|
+
*/
|
|
7
|
+
import type { AnalysisModel } from '../model';
|
|
8
|
+
import { type CoreHost } from '../host';
|
|
9
|
+
import type { LoadedGrammars } from '../parsers/grammarLoader';
|
|
10
|
+
/**
|
|
11
|
+
* Analyze a set of files and produce a serializable AnalysisModel.
|
|
12
|
+
*
|
|
13
|
+
* When `grammars` are provided, uses tree-sitter extractors for
|
|
14
|
+
* precise import/symbol extraction; otherwise falls back to regex.
|
|
15
|
+
*
|
|
16
|
+
* @param rootDir Absolute path to the workspace root
|
|
17
|
+
* @param files Map of relative-path → file content
|
|
18
|
+
* @param grammars Optional pre-loaded tree-sitter grammars
|
|
19
|
+
*/
|
|
20
|
+
export declare function analyzeRepo(rootDir: string, files: Map<string, string>, grammars?: LoadedGrammars): AnalysisModel;
|
|
21
|
+
/**
|
|
22
|
+
* Analyze repository files and enrich the model with dependency links and hubs.
|
|
23
|
+
*
|
|
24
|
+
* Loads tree-sitter grammars (when available) for precise extraction
|
|
25
|
+
* and pre-seeds the dependency adapter layer to avoid double-loading.
|
|
26
|
+
*
|
|
27
|
+
* @param rootDir Absolute path to the workspace root
|
|
28
|
+
* @param relativeFiles Map of relative-path → file content
|
|
29
|
+
* @param absoluteFiles Map of absolute-path → file content (for dependency analysis)
|
|
30
|
+
* @param host Optional CoreHost for file I/O and WASM paths
|
|
31
|
+
*/
|
|
32
|
+
export declare function analyzeRepoWithDependencies(rootDir: string, relativeFiles: Map<string, string>, absoluteFiles: Map<string, string>, host?: CoreHost): Promise<AnalysisModel>;
|
|
33
|
+
//# sourceMappingURL=repo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo.d.ts","sourceRoot":"","sources":["../../src/analysis/repo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,aAAa,EAA8C,MAAM,UAAU,CAAC;AAI1F,OAAO,EAA8B,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AA8C/D;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC1B,QAAQ,CAAC,EAAE,cAAc,GACxB,aAAa,CAgEf;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,IAAI,CAAC,EAAE,QAAQ,GACd,OAAO,CAAC,aAAa,CAAC,CA8CxB"}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Repository-level analysis — the top-level pipeline that builds an
|
|
4
|
+
* AnalysisModel from a set of workspace files.
|
|
5
|
+
*
|
|
6
|
+
* Extracted from index.ts to keep the barrel file lean.
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.analyzeRepo = analyzeRepo;
|
|
43
|
+
exports.analyzeRepoWithDependencies = analyzeRepoWithDependencies;
|
|
44
|
+
const path = __importStar(require("path"));
|
|
45
|
+
const paths_1 = require("../paths");
|
|
46
|
+
const stats_1 = require("../stats");
|
|
47
|
+
const index_1 = require("./index");
|
|
48
|
+
const host_1 = require("../host");
|
|
49
|
+
const languages_1 = require("../parsers/languages");
|
|
50
|
+
const grammarLoader_1 = require("../parsers/grammarLoader");
|
|
51
|
+
const pythonExtractors_1 = require("../parsers/pythonExtractors");
|
|
52
|
+
const tsJsExtractors_1 = require("../parsers/tsJsExtractors");
|
|
53
|
+
const javaExtractors_1 = require("../parsers/javaExtractors");
|
|
54
|
+
const csharpExtractors_1 = require("../parsers/csharpExtractors");
|
|
55
|
+
const dependencyAdapters_1 = require("./dependencyAdapters");
|
|
56
|
+
// ── Language dispatch tables ─────────────────────────────────
|
|
57
|
+
/** Map file extension → grammar language id (built from LANGUAGE_SPECS SSOT). */
|
|
58
|
+
const extToLanguageId = new Map();
|
|
59
|
+
for (const spec of languages_1.LANGUAGE_SPECS) {
|
|
60
|
+
for (const ext of spec.extensions) {
|
|
61
|
+
extToLanguageId.set(ext, spec.id);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/** Collapse grammar ids to model-level display names (tsx → typescript). */
|
|
65
|
+
const LANGUAGE_DISPLAY = {
|
|
66
|
+
tsx: 'typescript',
|
|
67
|
+
};
|
|
68
|
+
const IMPORT_EXTRACTORS = {
|
|
69
|
+
python: pythonExtractors_1.extractPythonImports,
|
|
70
|
+
typescript: tsJsExtractors_1.extractTSJSImports,
|
|
71
|
+
tsx: tsJsExtractors_1.extractTSJSImports,
|
|
72
|
+
javascript: tsJsExtractors_1.extractTSJSImports,
|
|
73
|
+
java: javaExtractors_1.extractJavaImports,
|
|
74
|
+
csharp: csharpExtractors_1.extractCSharpImports,
|
|
75
|
+
};
|
|
76
|
+
const SYMBOL_EXTRACTORS = {
|
|
77
|
+
python: pythonExtractors_1.extractPythonSymbols,
|
|
78
|
+
typescript: tsJsExtractors_1.extractTSJSSymbols,
|
|
79
|
+
tsx: tsJsExtractors_1.extractTSJSSymbols,
|
|
80
|
+
javascript: tsJsExtractors_1.extractTSJSSymbols,
|
|
81
|
+
java: javaExtractors_1.extractJavaSymbols,
|
|
82
|
+
csharp: csharpExtractors_1.extractCSharpSymbols,
|
|
83
|
+
};
|
|
84
|
+
// ── analyzeRepo ──────────────────────────────────────────────
|
|
85
|
+
/**
|
|
86
|
+
* Analyze a set of files and produce a serializable AnalysisModel.
|
|
87
|
+
*
|
|
88
|
+
* When `grammars` are provided, uses tree-sitter extractors for
|
|
89
|
+
* precise import/symbol extraction; otherwise falls back to regex.
|
|
90
|
+
*
|
|
91
|
+
* @param rootDir Absolute path to the workspace root
|
|
92
|
+
* @param files Map of relative-path → file content
|
|
93
|
+
* @param grammars Optional pre-loaded tree-sitter grammars
|
|
94
|
+
*/
|
|
95
|
+
function analyzeRepo(rootDir, files, grammars) {
|
|
96
|
+
const analyzedFiles = [];
|
|
97
|
+
const allSymbols = [];
|
|
98
|
+
for (const [relativePath, content] of files) {
|
|
99
|
+
const ext = path.extname(relativePath).toLowerCase();
|
|
100
|
+
const langId = extToLanguageId.get(ext);
|
|
101
|
+
const language = langId ? (LANGUAGE_DISPLAY[langId] ?? langId) : 'unknown';
|
|
102
|
+
const lineCount = content.split('\n').length;
|
|
103
|
+
const posixPath = (0, paths_1.toPosix)(relativePath);
|
|
104
|
+
let exports;
|
|
105
|
+
let imports;
|
|
106
|
+
let symbols;
|
|
107
|
+
const grammar = langId && grammars ? grammars[langId] : undefined;
|
|
108
|
+
if (grammar) {
|
|
109
|
+
// ── Tree-sitter extraction path ──
|
|
110
|
+
const extractImports = IMPORT_EXTRACTORS[langId];
|
|
111
|
+
const extractSymbols = SYMBOL_EXTRACTORS[langId];
|
|
112
|
+
if (extractImports) {
|
|
113
|
+
try {
|
|
114
|
+
imports = [...new Set(extractImports(grammar, content))];
|
|
115
|
+
}
|
|
116
|
+
catch {
|
|
117
|
+
imports = extractImportModulesRegex(content, language);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
imports = extractImportModulesRegex(content, language);
|
|
122
|
+
}
|
|
123
|
+
if (extractSymbols) {
|
|
124
|
+
try {
|
|
125
|
+
symbols = extractSymbols(grammar, content);
|
|
126
|
+
exports = symbols.filter((s) => s.exported).map((s) => s.name);
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
exports = extractExportNamesRegex(content, language);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
exports = extractExportNamesRegex(content, language);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
// ── Regex fallback path ──
|
|
138
|
+
exports = extractExportNamesRegex(content, language);
|
|
139
|
+
imports = extractImportModulesRegex(content, language);
|
|
140
|
+
}
|
|
141
|
+
analyzedFiles.push({ relativePath: posixPath, language, lineCount, exports, imports });
|
|
142
|
+
if (symbols && symbols.length > 0) {
|
|
143
|
+
allSymbols.push({ file: posixPath, symbols });
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
schemaVersion: '0.1',
|
|
148
|
+
generatedAt: new Date().toISOString(),
|
|
149
|
+
repo: { root: rootDir },
|
|
150
|
+
files: analyzedFiles,
|
|
151
|
+
symbols: allSymbols,
|
|
152
|
+
graph: { nodes: [], edges: [] },
|
|
153
|
+
metrics: { hubs: [] },
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Analyze repository files and enrich the model with dependency links and hubs.
|
|
158
|
+
*
|
|
159
|
+
* Loads tree-sitter grammars (when available) for precise extraction
|
|
160
|
+
* and pre-seeds the dependency adapter layer to avoid double-loading.
|
|
161
|
+
*
|
|
162
|
+
* @param rootDir Absolute path to the workspace root
|
|
163
|
+
* @param relativeFiles Map of relative-path → file content
|
|
164
|
+
* @param absoluteFiles Map of absolute-path → file content (for dependency analysis)
|
|
165
|
+
* @param host Optional CoreHost for file I/O and WASM paths
|
|
166
|
+
*/
|
|
167
|
+
async function analyzeRepoWithDependencies(rootDir, relativeFiles, absoluteFiles, host) {
|
|
168
|
+
const resolvedHost = host ?? (0, host_1.createNodeHostForWorkspace)(rootDir);
|
|
169
|
+
// Load grammars once for both analyzeRepo() and DependencyAnalyzer
|
|
170
|
+
let grammars = {};
|
|
171
|
+
if (resolvedHost?.wasmPaths?.treeSitter && Object.keys(resolvedHost.wasmPaths.grammars ?? {}).length > 0) {
|
|
172
|
+
try {
|
|
173
|
+
const loaded = await (0, grammarLoader_1.loadGrammars)(resolvedHost);
|
|
174
|
+
grammars = loaded.grammars;
|
|
175
|
+
}
|
|
176
|
+
catch {
|
|
177
|
+
// Fall back to regex extraction
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
const model = analyzeRepo(rootDir, relativeFiles, grammars);
|
|
181
|
+
if (absoluteFiles.size === 0) {
|
|
182
|
+
return model;
|
|
183
|
+
}
|
|
184
|
+
// Pre-seed adapters so DependencyAnalyzer skips redundant grammar loading
|
|
185
|
+
(0, dependencyAdapters_1.setDependencyAdapterGrammars)(grammars);
|
|
186
|
+
const analyzer = new index_1.DependencyAnalyzer();
|
|
187
|
+
analyzer.setFileContentsCache(absoluteFiles);
|
|
188
|
+
const absolutePaths = Array.from(absoluteFiles.keys());
|
|
189
|
+
const absoluteEdges = await analyzer.analyzeDependencies(absolutePaths, resolvedHost);
|
|
190
|
+
const toRel = (p) => (0, paths_1.toPosix)(path.relative(rootDir, p));
|
|
191
|
+
const edges = absoluteEdges.map((edge) => ({
|
|
192
|
+
...edge,
|
|
193
|
+
source: toRel(edge.source),
|
|
194
|
+
target: toRel(edge.target),
|
|
195
|
+
}));
|
|
196
|
+
model.graph = {
|
|
197
|
+
nodes: model.files.map((f) => ({
|
|
198
|
+
id: f.relativePath,
|
|
199
|
+
path: f.relativePath,
|
|
200
|
+
language: f.language,
|
|
201
|
+
})),
|
|
202
|
+
edges,
|
|
203
|
+
};
|
|
204
|
+
model.metrics = { hubs: (0, stats_1.deriveHubs)(edges) };
|
|
205
|
+
return model;
|
|
206
|
+
}
|
|
207
|
+
// ── Internal helpers ─────────────────────────────────────────
|
|
208
|
+
/** Regex-based export extraction — fallback when grammars unavailable. */
|
|
209
|
+
function extractExportNamesRegex(content, language) {
|
|
210
|
+
const names = [];
|
|
211
|
+
if (language === 'typescript' || language === 'javascript') {
|
|
212
|
+
const re = /export\s+(?:default\s+)?(?:function|class|const|let|var|type|interface|enum)\s+(\w+)/g;
|
|
213
|
+
let m;
|
|
214
|
+
while ((m = re.exec(content)) !== null) {
|
|
215
|
+
names.push(m[1]);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
else if (language === 'python') {
|
|
219
|
+
const re = /^(?:def|class)\s+(\w+)/gm;
|
|
220
|
+
let m;
|
|
221
|
+
while ((m = re.exec(content)) !== null) {
|
|
222
|
+
names.push(m[1]);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return names;
|
|
226
|
+
}
|
|
227
|
+
/** Regex-based import extraction — fallback when grammars unavailable. */
|
|
228
|
+
function extractImportModulesRegex(content, language) {
|
|
229
|
+
const modules = [];
|
|
230
|
+
if (language === 'typescript' || language === 'javascript') {
|
|
231
|
+
const re = /from\s+['"]([^'"]+)['"]/g;
|
|
232
|
+
let m;
|
|
233
|
+
while ((m = re.exec(content)) !== null) {
|
|
234
|
+
modules.push(m[1]);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
else if (language === 'python') {
|
|
238
|
+
const re = /^(?:import|from)\s+([\w.]+)/gm;
|
|
239
|
+
let m;
|
|
240
|
+
while ((m = re.exec(content)) !== null) {
|
|
241
|
+
modules.push(m[1]);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return [...new Set(modules)];
|
|
245
|
+
}
|
|
246
|
+
//# sourceMappingURL=repo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo.js","sourceRoot":"","sources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AAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACvC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,0EAA0E;AAC1E,SAAS,yBAAyB,CAAC,OAAe,EAAE,QAAgB;IAClE,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,IAAI,QAAQ,KAAK,YAAY,IAAI,QAAQ,KAAK,YAAY,EAAE,CAAC;QAC3D,MAAM,EAAE,GAAG,0BAA0B,CAAC;QACtC,IAAI,CAAyB,CAAC;QAC9B,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;SAAM,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACjC,MAAM,EAAE,GAAG,+BAA+B,CAAC;QAC3C,IAAI,CAAyB,CAAC;QAC9B,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File classifiers — categorize files as app / test / third-party.
|
|
3
|
+
*
|
|
4
|
+
* Used by KB emitters and the CLI to focus on project code and filter out
|
|
5
|
+
* virtual-env, node_modules, build artifacts, and test files.
|
|
6
|
+
*
|
|
7
|
+
* All functions are pure (no I/O, no vscode).
|
|
8
|
+
*/
|
|
9
|
+
export type FileKind = 'app' | 'test' | 'third_party';
|
|
10
|
+
/**
|
|
11
|
+
* Classify a file as app code, test code, or third-party/environment.
|
|
12
|
+
*/
|
|
13
|
+
export declare function classifyFile(absPathOrRel: string, workspaceRoot: string): FileKind;
|
|
14
|
+
/**
|
|
15
|
+
* Check if a file is "structural app code" — runtime/domain modules,
|
|
16
|
+
* not migrations, hooks, or generated tooling.
|
|
17
|
+
*/
|
|
18
|
+
export declare function isStructuralAppFile(file: string, workspaceRoot: string): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Check if a file is a config/tooling file (not runtime code).
|
|
21
|
+
* Used to filter configs from feature clusters and categorize entry points.
|
|
22
|
+
*/
|
|
23
|
+
export declare function isConfigOrToolingFile(filePath: string): boolean;
|
|
24
|
+
//# sourceMappingURL=classifiers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classifiers.d.ts","sourceRoot":"","sources":["../src/classifiers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,aAAa,CAAC;AAoBtD;;GAEG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,QAAQ,CA+BlF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CA2BhF;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CA+B/D"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* File classifiers — categorize files as app / test / third-party.
|
|
4
|
+
*
|
|
5
|
+
* Used by KB emitters and the CLI to focus on project code and filter out
|
|
6
|
+
* virtual-env, node_modules, build artifacts, and test files.
|
|
7
|
+
*
|
|
8
|
+
* All functions are pure (no I/O, no vscode).
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.classifyFile = classifyFile;
|
|
12
|
+
exports.isStructuralAppFile = isStructuralAppFile;
|
|
13
|
+
exports.isConfigOrToolingFile = isConfigOrToolingFile;
|
|
14
|
+
const paths_1 = require("./paths");
|
|
15
|
+
// ── Third-party patterns ─────────────────────────────────────
|
|
16
|
+
const THIRD_PARTY_PATTERNS = [
|
|
17
|
+
'/.venv/', '/venv/', '/env/', '/.tox/', '/site-packages/',
|
|
18
|
+
'/node_modules/', '/__pycache__/', '/.pytest_cache/', '/.mypy_cache/',
|
|
19
|
+
'/dist/', '/build/', '/.next/', '/.turbo/', '/coverage/',
|
|
20
|
+
'/.cache/', '/dist-packages/', '/.git/', '/.hg/',
|
|
21
|
+
];
|
|
22
|
+
const THIRD_PARTY_PREFIXES = [
|
|
23
|
+
'.venv/', 'venv/', 'env/', '.tox/', 'site-packages/',
|
|
24
|
+
'node_modules/', '__pycache__/', '.pytest_cache/', '.mypy_cache/',
|
|
25
|
+
'dist/', 'build/', '.next/', '.turbo/', 'coverage/',
|
|
26
|
+
'.cache/', 'dist-packages/', '.git/', '.hg/',
|
|
27
|
+
];
|
|
28
|
+
// ── Public API ───────────────────────────────────────────────
|
|
29
|
+
/**
|
|
30
|
+
* Classify a file as app code, test code, or third-party/environment.
|
|
31
|
+
*/
|
|
32
|
+
function classifyFile(absPathOrRel, workspaceRoot) {
|
|
33
|
+
const rel = (0, paths_1.makeRelativePath)(absPathOrRel, workspaceRoot).toLowerCase();
|
|
34
|
+
if (THIRD_PARTY_PATTERNS.some((p) => rel.includes(p)) ||
|
|
35
|
+
THIRD_PARTY_PREFIXES.some((p) => rel.startsWith(p))) {
|
|
36
|
+
return 'third_party';
|
|
37
|
+
}
|
|
38
|
+
const parts = rel.split('/');
|
|
39
|
+
const filename = parts[parts.length - 1] || '';
|
|
40
|
+
if (parts.some((p) => p === 'test' || p === 'tests' || p === 'spec' || p === '__tests__') ||
|
|
41
|
+
filename.startsWith('test_') ||
|
|
42
|
+
filename.endsWith('_test.py') ||
|
|
43
|
+
filename.endsWith('.test.ts') ||
|
|
44
|
+
filename.endsWith('.test.tsx') ||
|
|
45
|
+
filename.endsWith('.test.js') ||
|
|
46
|
+
filename.endsWith('.test.jsx') ||
|
|
47
|
+
filename.endsWith('.spec.ts') ||
|
|
48
|
+
filename.endsWith('.spec.tsx') ||
|
|
49
|
+
filename.endsWith('.spec.js') ||
|
|
50
|
+
filename.endsWith('.spec.jsx') ||
|
|
51
|
+
filename.includes('.spec.') ||
|
|
52
|
+
filename.includes('.test.')) {
|
|
53
|
+
return 'test';
|
|
54
|
+
}
|
|
55
|
+
return 'app';
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Check if a file is "structural app code" — runtime/domain modules,
|
|
59
|
+
* not migrations, hooks, or generated tooling.
|
|
60
|
+
*/
|
|
61
|
+
function isStructuralAppFile(file, workspaceRoot) {
|
|
62
|
+
if (classifyFile(file, workspaceRoot) !== 'app')
|
|
63
|
+
return false;
|
|
64
|
+
const rel = (0, paths_1.makeRelativePath)(file, workspaceRoot).toLowerCase();
|
|
65
|
+
if (rel.includes('/alembic/') || rel.includes('/migrations/'))
|
|
66
|
+
return false;
|
|
67
|
+
if (rel.includes('/hooks/'))
|
|
68
|
+
return false;
|
|
69
|
+
const basename = (0, paths_1.toPosix)(rel).split('/').pop() || '';
|
|
70
|
+
if (basename === 'playwright.config.ts' ||
|
|
71
|
+
basename === 'openapi-ts.config.ts' ||
|
|
72
|
+
basename === 'vite.config.ts' ||
|
|
73
|
+
basename === 'vitest.config.ts' ||
|
|
74
|
+
basename === 'jest.config.ts' ||
|
|
75
|
+
basename === 'jest.config.js' ||
|
|
76
|
+
basename.endsWith('.gen.ts') ||
|
|
77
|
+
basename.endsWith('.gen.js') ||
|
|
78
|
+
basename.endsWith('.gen.tsx') ||
|
|
79
|
+
basename.endsWith('.gen.jsx') ||
|
|
80
|
+
basename.endsWith('sdk.gen.ts') ||
|
|
81
|
+
basename.endsWith('types.gen.ts')) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Check if a file is a config/tooling file (not runtime code).
|
|
88
|
+
* Used to filter configs from feature clusters and categorize entry points.
|
|
89
|
+
*/
|
|
90
|
+
function isConfigOrToolingFile(filePath) {
|
|
91
|
+
const pathLower = filePath.toLowerCase();
|
|
92
|
+
const parts = (0, paths_1.toPosix)(filePath).split('/');
|
|
93
|
+
const fullBasename = parts[parts.length - 1] || '';
|
|
94
|
+
const dotIdx = fullBasename.lastIndexOf('.');
|
|
95
|
+
const baseName = (dotIdx > 0 ? fullBasename.substring(0, dotIdx) : fullBasename).toLowerCase();
|
|
96
|
+
return (pathLower.includes('config') ||
|
|
97
|
+
pathLower.includes('.config') ||
|
|
98
|
+
baseName.includes('jest') ||
|
|
99
|
+
baseName.includes('webpack') ||
|
|
100
|
+
baseName.includes('vite') ||
|
|
101
|
+
baseName.includes('tailwind') ||
|
|
102
|
+
baseName.includes('eslint') ||
|
|
103
|
+
baseName.includes('prettier') ||
|
|
104
|
+
baseName.includes('tsconfig') ||
|
|
105
|
+
baseName.includes('babel') ||
|
|
106
|
+
baseName.includes('postcss') ||
|
|
107
|
+
baseName.includes('rollup') ||
|
|
108
|
+
baseName.startsWith('next.') ||
|
|
109
|
+
baseName.startsWith('vitest.') ||
|
|
110
|
+
baseName === 'package' ||
|
|
111
|
+
baseName === 'package-lock' ||
|
|
112
|
+
baseName === 'tsconfig' ||
|
|
113
|
+
baseName === 'jsconfig' ||
|
|
114
|
+
pathLower.endsWith('.config.js') ||
|
|
115
|
+
pathLower.endsWith('.config.ts') ||
|
|
116
|
+
pathLower.endsWith('.config.mjs') ||
|
|
117
|
+
pathLower.endsWith('.config.cjs'));
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=classifiers.js.map
|
|
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AW,EAAE,CAAC;IAE/F,OAAO,CACL,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAC5B,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC7B,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;QACzB,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC5B,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;QACzB,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC7B,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAC3B,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC7B,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC7B,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;QAC1B,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC5B,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAC3B,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC;QAC5B,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC;QAC9B,QAAQ,KAAK,SAAS;QACtB,QAAQ,KAAK,cAAc;QAC3B,QAAQ,KAAK,UAAU;QACvB,QAAQ,KAAK,UAAU;QACvB,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC;QAChC,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC;QAChC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC;QACjC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,CAClC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default directory exclusion lists for file discovery.
|
|
3
|
+
*
|
|
4
|
+
* These lists are the single source of truth — both the extension's
|
|
5
|
+
* FileDiscoveryService and DirectoryExclusion import from here instead
|
|
6
|
+
* of maintaining duplicate arrays.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PACKAGE_MANAGER_DIRS: readonly string[];
|
|
9
|
+
export declare const BUILD_OUTPUT_DIRS: readonly string[];
|
|
10
|
+
export declare const VENV_DIRS: readonly string[];
|
|
11
|
+
export declare const CACHE_DIRS: readonly string[];
|
|
12
|
+
export declare const VCS_IDE_DIRS: readonly string[];
|
|
13
|
+
export declare const TEST_OUTPUT_DIRS: readonly string[];
|
|
14
|
+
export declare const GENERATED_DIRS: readonly string[];
|
|
15
|
+
/** Marker files that indicate a venv directory (even if name is unusual) */
|
|
16
|
+
export declare const VENV_MARKERS: readonly string[];
|
|
17
|
+
/** Marker files that indicate a build output directory */
|
|
18
|
+
export declare const BUILD_OUTPUT_MARKERS: readonly string[];
|
|
19
|
+
/** All default directory exclusions, merged and deduplicated. */
|
|
20
|
+
export declare const DEFAULT_EXCLUSIONS: readonly string[];
|
|
21
|
+
/**
|
|
22
|
+
* File extensions that the analysis engine processes.
|
|
23
|
+
* Must include the leading dot.
|
|
24
|
+
*/
|
|
25
|
+
export declare const SUPPORTED_EXTENSIONS: readonly string[];
|
|
26
|
+
//# sourceMappingURL=exclusions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exclusions.d.ts","sourceRoot":"","sources":["../../src/fs/exclusions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAUjD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAgB9C,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,SAAS,MAAM,EAUtC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAWvC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAOzC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAM7C,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAM3C,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAGzC,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAGjD,CAAC;AAIF,iEAAiE;AACjE,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAQ/C,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAkBjD,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Default directory exclusion lists for file discovery.
|
|
4
|
+
*
|
|
5
|
+
* These lists are the single source of truth — both the extension's
|
|
6
|
+
* FileDiscoveryService and DirectoryExclusion import from here instead
|
|
7
|
+
* of maintaining duplicate arrays.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SUPPORTED_EXTENSIONS = exports.DEFAULT_EXCLUSIONS = exports.BUILD_OUTPUT_MARKERS = exports.VENV_MARKERS = exports.GENERATED_DIRS = exports.TEST_OUTPUT_DIRS = exports.VCS_IDE_DIRS = exports.CACHE_DIRS = exports.VENV_DIRS = exports.BUILD_OUTPUT_DIRS = exports.PACKAGE_MANAGER_DIRS = void 0;
|
|
11
|
+
// ── Exclusion categories ─────────────────────────────────────
|
|
12
|
+
exports.PACKAGE_MANAGER_DIRS = [
|
|
13
|
+
'node_modules',
|
|
14
|
+
'bower_components',
|
|
15
|
+
'jspm_packages',
|
|
16
|
+
'vendor',
|
|
17
|
+
'packages',
|
|
18
|
+
'site-packages',
|
|
19
|
+
'dist-packages',
|
|
20
|
+
'eggs',
|
|
21
|
+
'.eggs',
|
|
22
|
+
];
|
|
23
|
+
exports.BUILD_OUTPUT_DIRS = [
|
|
24
|
+
'dist',
|
|
25
|
+
'build',
|
|
26
|
+
'out',
|
|
27
|
+
'output',
|
|
28
|
+
'target',
|
|
29
|
+
'bin',
|
|
30
|
+
'obj',
|
|
31
|
+
'lib',
|
|
32
|
+
'.next',
|
|
33
|
+
'.nuxt',
|
|
34
|
+
'.output',
|
|
35
|
+
'.turbo',
|
|
36
|
+
'.parcel-cache',
|
|
37
|
+
'.webpack',
|
|
38
|
+
'.rollup.cache',
|
|
39
|
+
];
|
|
40
|
+
exports.VENV_DIRS = [
|
|
41
|
+
'venv',
|
|
42
|
+
'.venv',
|
|
43
|
+
'env',
|
|
44
|
+
'.env',
|
|
45
|
+
'virtualenv',
|
|
46
|
+
'.virtualenv',
|
|
47
|
+
'.tox',
|
|
48
|
+
'.nox',
|
|
49
|
+
'.conda',
|
|
50
|
+
];
|
|
51
|
+
exports.CACHE_DIRS = [
|
|
52
|
+
'__pycache__',
|
|
53
|
+
'.cache',
|
|
54
|
+
'.pytest_cache',
|
|
55
|
+
'.mypy_cache',
|
|
56
|
+
'.ruff_cache',
|
|
57
|
+
'.hypothesis',
|
|
58
|
+
'coverage',
|
|
59
|
+
'htmlcov',
|
|
60
|
+
'.nyc_output',
|
|
61
|
+
'.coverage',
|
|
62
|
+
];
|
|
63
|
+
exports.VCS_IDE_DIRS = [
|
|
64
|
+
'.git',
|
|
65
|
+
'.hg',
|
|
66
|
+
'.svn',
|
|
67
|
+
'.idea',
|
|
68
|
+
'.vs',
|
|
69
|
+
'.vscode',
|
|
70
|
+
];
|
|
71
|
+
exports.TEST_OUTPUT_DIRS = [
|
|
72
|
+
'e2e',
|
|
73
|
+
'playwright-report',
|
|
74
|
+
'test-results',
|
|
75
|
+
'cypress',
|
|
76
|
+
'.playwright',
|
|
77
|
+
];
|
|
78
|
+
exports.GENERATED_DIRS = [
|
|
79
|
+
'generated',
|
|
80
|
+
'__generated__',
|
|
81
|
+
'.serverless',
|
|
82
|
+
'.terraform',
|
|
83
|
+
'.pulumi',
|
|
84
|
+
];
|
|
85
|
+
/** Marker files that indicate a venv directory (even if name is unusual) */
|
|
86
|
+
exports.VENV_MARKERS = [
|
|
87
|
+
'pyvenv.cfg',
|
|
88
|
+
'pip-selfcheck.json',
|
|
89
|
+
];
|
|
90
|
+
/** Marker files that indicate a build output directory */
|
|
91
|
+
exports.BUILD_OUTPUT_MARKERS = [
|
|
92
|
+
'.tsbuildinfo',
|
|
93
|
+
'.buildinfo',
|
|
94
|
+
];
|
|
95
|
+
// ── Merged defaults ──────────────────────────────────────────
|
|
96
|
+
/** All default directory exclusions, merged and deduplicated. */
|
|
97
|
+
exports.DEFAULT_EXCLUSIONS = [
|
|
98
|
+
...exports.PACKAGE_MANAGER_DIRS,
|
|
99
|
+
...exports.BUILD_OUTPUT_DIRS,
|
|
100
|
+
...exports.VENV_DIRS,
|
|
101
|
+
...exports.CACHE_DIRS,
|
|
102
|
+
...exports.VCS_IDE_DIRS,
|
|
103
|
+
...exports.TEST_OUTPUT_DIRS,
|
|
104
|
+
...exports.GENERATED_DIRS,
|
|
105
|
+
];
|
|
106
|
+
// ── Supported file extensions ────────────────────────────────
|
|
107
|
+
/**
|
|
108
|
+
* File extensions that the analysis engine processes.
|
|
109
|
+
* Must include the leading dot.
|
|
110
|
+
*/
|
|
111
|
+
exports.SUPPORTED_EXTENSIONS = [
|
|
112
|
+
'.py',
|
|
113
|
+
'.ts',
|
|
114
|
+
'.tsx',
|
|
115
|
+
'.js',
|
|
116
|
+
'.jsx',
|
|
117
|
+
'.mjs',
|
|
118
|
+
'.cjs',
|
|
119
|
+
'.java',
|
|
120
|
+
'.cpp',
|
|
121
|
+
'.c',
|
|
122
|
+
'.hpp',
|
|
123
|
+
'.h',
|
|
124
|
+
'.cs',
|
|
125
|
+
'.go',
|
|
126
|
+
'.rs',
|
|
127
|
+
'.rb',
|
|
128
|
+
'.php',
|
|
129
|
+
];
|
|
130
|
+
//# sourceMappingURL=exclusions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exclusions.js","sourceRoot":"","sources":["../../src/fs/exclusions.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,gEAAgE;AAEnD,QAAA,oBAAoB,GAAsB;IACrD,cAAc;IACd,kBAAkB;I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B,CAAC;AAEF,gEAAgE;AAEhE;;;GAGG;AACU,QAAA,oBAAoB,GAAsB;IACrD,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,IAAI;IACJ,MAAM;IACN,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;CACP,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace fingerprint — shared staleness detection for KB artifacts.
|
|
3
|
+
*
|
|
4
|
+
* Computes a SHA-256 hash from file paths, sizes, and modification times.
|
|
5
|
+
* Used by both the CLI watch command and the VS Code extension to determine
|
|
6
|
+
* whether the KB needs regeneration.
|
|
7
|
+
*/
|
|
8
|
+
/** Stored fingerprint data, persisted to `.aspect/.fingerprint.json`. */
|
|
9
|
+
export interface FingerprintData {
|
|
10
|
+
/** SHA-256 hash of all tracked file metadata. */
|
|
11
|
+
hash: string;
|
|
12
|
+
/** Generator version that produced the last KB. */
|
|
13
|
+
version: string;
|
|
14
|
+
/** ISO-8601 timestamp of last generation. */
|
|
15
|
+
generatedAt: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Compute a fingerprint hash from a list of file paths.
|
|
19
|
+
* Uses `path:mtime:size` for each file, sorted for determinism.
|
|
20
|
+
*/
|
|
21
|
+
export declare function computeFingerprint(filePaths: string[]): string;
|
|
22
|
+
/**
|
|
23
|
+
* Read the stored fingerprint from `.aspect/.fingerprint.json`.
|
|
24
|
+
* Returns `null` if the file doesn't exist or is invalid.
|
|
25
|
+
*/
|
|
26
|
+
export declare function readFingerprint(aspectDir: string): FingerprintData | null;
|
|
27
|
+
/**
|
|
28
|
+
* Write a fingerprint to `.aspect/.fingerprint.json`.
|
|
29
|
+
* Creates the `.aspect/` directory if it doesn't exist.
|
|
30
|
+
*/
|
|
31
|
+
export declare function writeFingerprint(aspectDir: string, hash: string, version: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* Check whether the KB is stale by comparing the current file fingerprint
|
|
34
|
+
* against the stored one.
|
|
35
|
+
*
|
|
36
|
+
* Returns `true` if:
|
|
37
|
+
* - No stored fingerprint exists
|
|
38
|
+
* - The hash doesn't match
|
|
39
|
+
* - The version doesn't match (generator was updated)
|
|
40
|
+
*/
|
|
41
|
+
export declare function isKbStale(aspectDir: string, currentFilePaths: string[], currentVersion: string): boolean;
|
|
42
|
+
//# sourceMappingURL=fingerprint.d.ts.map
|