@yalehwang/archguard 0.1.31 → 0.1.33
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 +106 -19
- package/assets/grammars/benchmarks.md +101 -0
- package/assets/grammars/checksums.json +8 -0
- package/{node_modules/tree-sitter/LICENSE → assets/grammars/licenses/tree-sitter-cpp.LICENSE} +2 -2
- package/{node_modules/node-gyp-build/LICENSE → assets/grammars/licenses/tree-sitter-go.LICENSE} +5 -5
- package/assets/grammars/licenses/tree-sitter-java.LICENSE +21 -0
- package/assets/grammars/licenses/tree-sitter-kotlin.LICENSE +21 -0
- package/assets/grammars/licenses/tree-sitter-python.LICENSE +21 -0
- package/assets/grammars/licenses/tree-sitter.LICENSE +21 -0
- package/assets/grammars/provenance.json +66 -0
- package/assets/grammars/tree-sitter-cpp.wasm +0 -0
- package/assets/grammars/tree-sitter-go.wasm +0 -0
- package/assets/grammars/tree-sitter-java.wasm +0 -0
- package/assets/grammars/tree-sitter-kotlin.wasm +0 -0
- package/assets/grammars/tree-sitter-python.wasm +0 -0
- package/assets/grammars/tree-sitter.wasm +0 -0
- package/dist/analysis/fitness/rule-types.d.ts +1 -33
- package/dist/analysis/fitness/rule-types.d.ts.map +1 -1
- package/dist/analysis/gim/direction-hint.d.ts.map +1 -1
- package/dist/analysis/gim/direction-hint.js +15 -5
- package/dist/analysis/gim/direction-hint.js.map +1 -1
- package/dist/analysis/gim/gim-loss-evaluator.d.ts.map +1 -1
- package/dist/analysis/gim/gim-loss-evaluator.js +12 -6
- package/dist/analysis/gim/gim-loss-evaluator.js.map +1 -1
- package/dist/analysis/jl/adjacency-builder.d.ts +8 -0
- package/dist/analysis/jl/adjacency-builder.d.ts.map +1 -0
- package/dist/analysis/jl/adjacency-builder.js +65 -0
- package/dist/analysis/jl/adjacency-builder.js.map +1 -0
- package/dist/analysis/jl/cluster-boundary-analyzer.d.ts +13 -0
- package/dist/analysis/jl/cluster-boundary-analyzer.d.ts.map +1 -0
- package/dist/analysis/jl/cluster-boundary-analyzer.js +233 -0
- package/dist/analysis/jl/cluster-boundary-analyzer.js.map +1 -0
- package/dist/analysis/jl/drift-calculator.d.ts +6 -0
- package/dist/analysis/jl/drift-calculator.d.ts.map +1 -0
- package/dist/analysis/jl/drift-calculator.js +104 -0
- package/dist/analysis/jl/drift-calculator.js.map +1 -0
- package/dist/analysis/jl/drift-exit-code.d.ts +4 -0
- package/dist/analysis/jl/drift-exit-code.d.ts.map +1 -0
- package/dist/analysis/jl/drift-exit-code.js +9 -0
- package/dist/analysis/jl/drift-exit-code.js.map +1 -0
- package/dist/analysis/jl/entity-aligner.d.ts +6 -0
- package/dist/analysis/jl/entity-aligner.d.ts.map +1 -0
- package/dist/analysis/jl/entity-aligner.js +33 -0
- package/dist/analysis/jl/entity-aligner.js.map +1 -0
- package/dist/analysis/jl/history-writer.d.ts +7 -0
- package/dist/analysis/jl/history-writer.d.ts.map +1 -0
- package/dist/analysis/jl/history-writer.js +74 -0
- package/dist/analysis/jl/history-writer.js.map +1 -0
- package/dist/analysis/jl/intrinsic-dimension.d.ts +14 -0
- package/dist/analysis/jl/intrinsic-dimension.d.ts.map +1 -0
- package/dist/analysis/jl/intrinsic-dimension.js +80 -0
- package/dist/analysis/jl/intrinsic-dimension.js.map +1 -0
- package/dist/analysis/jl/jl-projector.d.ts +7 -0
- package/dist/analysis/jl/jl-projector.d.ts.map +1 -0
- package/dist/analysis/jl/jl-projector.js +52 -0
- package/dist/analysis/jl/jl-projector.js.map +1 -0
- package/dist/analysis/jl/kmeans.d.ts +11 -0
- package/dist/analysis/jl/kmeans.d.ts.map +1 -0
- package/dist/analysis/jl/kmeans.js +273 -0
- package/dist/analysis/jl/kmeans.js.map +1 -0
- package/dist/analysis/jl/types.d.ts +166 -0
- package/dist/analysis/jl/types.d.ts.map +1 -0
- package/dist/analysis/jl/types.js +19 -0
- package/dist/analysis/jl/types.js.map +1 -0
- package/dist/analysis/shape-smells/index.d.ts +5 -0
- package/dist/analysis/shape-smells/index.d.ts.map +1 -0
- package/dist/analysis/shape-smells/index.js +5 -0
- package/dist/analysis/shape-smells/index.js.map +1 -0
- package/dist/analysis/shape-smells/literal-dispersion.d.ts +9 -0
- package/dist/analysis/shape-smells/literal-dispersion.d.ts.map +1 -0
- package/dist/analysis/shape-smells/literal-dispersion.js +157 -0
- package/dist/analysis/shape-smells/literal-dispersion.js.map +1 -0
- package/dist/analysis/shape-smells/persistence.d.ts +5 -0
- package/dist/analysis/shape-smells/persistence.d.ts.map +1 -0
- package/dist/analysis/shape-smells/persistence.js +59 -0
- package/dist/analysis/shape-smells/persistence.js.map +1 -0
- package/dist/analysis/shape-smells/scope-filter.d.ts +7 -0
- package/dist/analysis/shape-smells/scope-filter.d.ts.map +1 -0
- package/dist/analysis/shape-smells/scope-filter.js +28 -0
- package/dist/analysis/shape-smells/scope-filter.js.map +1 -0
- package/dist/analysis/shape-smells/types.d.ts +40 -0
- package/dist/analysis/shape-smells/types.d.ts.map +1 -0
- package/dist/analysis/shape-smells/types.js +2 -0
- package/dist/analysis/shape-smells/types.js.map +1 -0
- package/dist/analysis/snapshot-store.js +2 -2
- package/dist/analysis/snapshot-store.js.map +1 -1
- package/dist/analysis/test-analyzer.d.ts.map +1 -1
- package/dist/analysis/test-analyzer.js +1 -1
- package/dist/analysis/test-analyzer.js.map +1 -1
- package/dist/cli/analyze/normalize-to-diagrams.d.ts.map +1 -1
- package/dist/cli/analyze/normalize-to-diagrams.js +35 -0
- package/dist/cli/analyze/normalize-to-diagrams.js.map +1 -1
- package/dist/cli/analyze/run-analysis.d.ts +6 -0
- package/dist/cli/analyze/run-analysis.d.ts.map +1 -1
- package/dist/cli/analyze/run-analysis.js +65 -43
- package/dist/cli/analyze/run-analysis.js.map +1 -1
- package/dist/cli/cache/cache-manager.js +2 -2
- package/dist/cli/cache/cache-manager.js.map +1 -1
- package/dist/cli/cognitive/ccb-assembler.js.map +1 -1
- package/dist/cli/commands/analyze.d.ts +17 -0
- package/dist/cli/commands/analyze.d.ts.map +1 -1
- package/dist/cli/commands/analyze.js +129 -2
- package/dist/cli/commands/analyze.js.map +1 -1
- package/dist/cli/commands/check.js.map +1 -1
- package/dist/cli/commands/diff.js +1 -1
- package/dist/cli/commands/diff.js.map +1 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/query.d.ts +3 -0
- package/dist/cli/commands/query.d.ts.map +1 -1
- package/dist/cli/commands/query.js +128 -0
- package/dist/cli/commands/query.js.map +1 -1
- package/dist/cli/config-loader.d.ts.map +1 -1
- package/dist/cli/config-loader.js +6 -1
- package/dist/cli/config-loader.js.map +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/mcp/analyze-tool.d.ts +2 -0
- package/dist/cli/mcp/analyze-tool.d.ts.map +1 -1
- package/dist/cli/mcp/analyze-tool.js +5 -0
- package/dist/cli/mcp/analyze-tool.js.map +1 -1
- package/dist/cli/mcp/mcp-server.d.ts +7 -2
- package/dist/cli/mcp/mcp-server.d.ts.map +1 -1
- package/dist/cli/mcp/mcp-server.js +43 -3
- package/dist/cli/mcp/mcp-server.js.map +1 -1
- package/dist/cli/mcp/tools/arch-health-tools.d.ts +16 -0
- package/dist/cli/mcp/tools/arch-health-tools.d.ts.map +1 -0
- package/dist/cli/mcp/tools/arch-health-tools.js +207 -0
- package/dist/cli/mcp/tools/arch-health-tools.js.map +1 -0
- package/dist/cli/mcp/tools/atlas-analytics-tools.d.ts.map +1 -1
- package/dist/cli/mcp/tools/atlas-analytics-tools.js +5 -4
- package/dist/cli/mcp/tools/atlas-analytics-tools.js.map +1 -1
- package/dist/cli/mcp/tools/gim-tools.d.ts.map +1 -1
- package/dist/cli/mcp/tools/gim-tools.js +5 -1
- package/dist/cli/mcp/tools/gim-tools.js.map +1 -1
- package/dist/cli/mcp/tools/git-history-analyze-tool.d.ts.map +1 -1
- package/dist/cli/mcp/tools/git-history-analyze-tool.js.map +1 -1
- package/dist/cli/mcp/tools/git-history-evidence-pack-tool.js.map +1 -1
- package/dist/cli/mcp/tools/git-history-tools.js.map +1 -1
- package/dist/cli/mcp/tools/metric-trend-tools.d.ts.map +1 -1
- package/dist/cli/mcp/tools/metric-trend-tools.js +2 -1
- package/dist/cli/mcp/tools/metric-trend-tools.js.map +1 -1
- package/dist/cli/mcp/tools/package-metrics-tools.d.ts.map +1 -1
- package/dist/cli/mcp/tools/package-metrics-tools.js +2 -1
- package/dist/cli/mcp/tools/package-metrics-tools.js.map +1 -1
- package/dist/cli/mcp/tools/shape-smell-tools.d.ts +3 -0
- package/dist/cli/mcp/tools/shape-smell-tools.d.ts.map +1 -0
- package/dist/cli/mcp/tools/shape-smell-tools.js +187 -0
- package/dist/cli/mcp/tools/shape-smell-tools.js.map +1 -0
- package/dist/cli/mcp/tools/test-analysis-tools.d.ts.map +1 -1
- package/dist/cli/mcp/tools/test-analysis-tools.js +4 -4
- package/dist/cli/mcp/tools/test-analysis-tools.js.map +1 -1
- package/dist/cli/processors/arch-json-provider-types.d.ts +5 -0
- package/dist/cli/processors/arch-json-provider-types.d.ts.map +1 -1
- package/dist/cli/processors/arch-json-provider.d.ts +5 -0
- package/dist/cli/processors/arch-json-provider.d.ts.map +1 -1
- package/dist/cli/processors/arch-json-provider.js +113 -55
- package/dist/cli/processors/arch-json-provider.js.map +1 -1
- package/dist/cli/processors/arch-json-utils.d.ts.map +1 -1
- package/dist/cli/processors/arch-json-utils.js +12 -3
- package/dist/cli/processors/arch-json-utils.js.map +1 -1
- package/dist/cli/processors/diagram-output-router.d.ts +1 -0
- package/dist/cli/processors/diagram-output-router.d.ts.map +1 -1
- package/dist/cli/processors/diagram-output-router.js +54 -66
- package/dist/cli/processors/diagram-output-router.js.map +1 -1
- package/dist/cli/processors/diagram-processor.d.ts +4 -0
- package/dist/cli/processors/diagram-processor.d.ts.map +1 -1
- package/dist/cli/processors/diagram-processor.js +2 -0
- package/dist/cli/processors/diagram-processor.js.map +1 -1
- package/dist/cli/processors/worker-pool-factory.d.ts +3 -0
- package/dist/cli/processors/worker-pool-factory.d.ts.map +1 -1
- package/dist/cli/processors/worker-pool-factory.js +9 -0
- package/dist/cli/processors/worker-pool-factory.js.map +1 -1
- package/dist/cli/query/engine-loader.d.ts.map +1 -1
- package/dist/cli/query/engine-loader.js +3 -3
- package/dist/cli/query/engine-loader.js.map +1 -1
- package/dist/cli/query/query-artifacts.js +2 -2
- package/dist/cli/query/query-artifacts.js.map +1 -1
- package/dist/cli/utils/cluster-archjson-loader.d.ts +3 -0
- package/dist/cli/utils/cluster-archjson-loader.d.ts.map +1 -0
- package/dist/cli/utils/cluster-archjson-loader.js +28 -0
- package/dist/cli/utils/cluster-archjson-loader.js.map +1 -0
- package/dist/cli/utils/drift-baseline.d.ts +27 -0
- package/dist/cli/utils/drift-baseline.d.ts.map +1 -0
- package/dist/cli/utils/drift-baseline.js +95 -0
- package/dist/cli/utils/drift-baseline.js.map +1 -0
- package/dist/cli/utils/drift-reporter.d.ts +3 -0
- package/dist/cli/utils/drift-reporter.d.ts.map +1 -0
- package/dist/cli/utils/drift-reporter.js +49 -0
- package/dist/cli/utils/drift-reporter.js.map +1 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +4 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/interfaces/language-plugin.d.ts +1 -0
- package/dist/core/interfaces/language-plugin.d.ts.map +1 -1
- package/dist/core/pack-registry/errors.d.ts +5 -0
- package/dist/core/pack-registry/errors.d.ts.map +1 -0
- package/dist/core/pack-registry/errors.js +9 -0
- package/dist/core/pack-registry/errors.js.map +1 -0
- package/dist/core/pack-registry/index.d.ts +7 -0
- package/dist/core/pack-registry/index.d.ts.map +1 -0
- package/dist/core/pack-registry/index.js +4 -0
- package/dist/core/pack-registry/index.js.map +1 -0
- package/dist/core/pack-registry/knowledge-pack-schema.d.ts +188 -0
- package/dist/core/pack-registry/knowledge-pack-schema.d.ts.map +1 -0
- package/dist/core/pack-registry/knowledge-pack-schema.js +108 -0
- package/dist/core/pack-registry/knowledge-pack-schema.js.map +1 -0
- package/dist/core/pack-registry/pack-registry.d.ts +15 -0
- package/dist/core/pack-registry/pack-registry.d.ts.map +1 -0
- package/dist/core/pack-registry/pack-registry.js +99 -0
- package/dist/core/pack-registry/pack-registry.js.map +1 -0
- package/dist/core/pack-registry/types.d.ts +87 -0
- package/dist/core/pack-registry/types.d.ts.map +1 -0
- package/dist/core/pack-registry/types.js +2 -0
- package/dist/core/pack-registry/types.js.map +1 -0
- package/dist/core/plugin-registry.d.ts +2 -0
- package/dist/core/plugin-registry.d.ts.map +1 -1
- package/dist/core/plugin-registry.js +15 -2
- package/dist/core/plugin-registry.js.map +1 -1
- package/dist/core/query/arch-index-builder.js.map +1 -1
- package/dist/core/rule-engine/ast-node.d.ts +6 -0
- package/dist/core/rule-engine/ast-node.d.ts.map +1 -0
- package/dist/core/rule-engine/ast-node.js +15 -0
- package/dist/core/rule-engine/ast-node.js.map +1 -0
- package/dist/core/rule-engine/index.d.ts +5 -0
- package/dist/core/rule-engine/index.d.ts.map +1 -0
- package/dist/core/rule-engine/index.js +4 -0
- package/dist/core/rule-engine/index.js.map +1 -0
- package/dist/core/rule-engine/rule-based-plugin.d.ts +22 -0
- package/dist/core/rule-engine/rule-based-plugin.d.ts.map +1 -0
- package/dist/core/rule-engine/rule-based-plugin.js +171 -0
- package/dist/core/rule-engine/rule-based-plugin.js.map +1 -0
- package/dist/core/rule-engine/rule-engine.d.ts +52 -0
- package/dist/core/rule-engine/rule-engine.d.ts.map +1 -0
- package/dist/core/rule-engine/rule-engine.js +655 -0
- package/dist/core/rule-engine/rule-engine.js.map +1 -0
- package/dist/mermaid/auto-repair.js +1 -1
- package/dist/mermaid/auto-repair.js.map +1 -1
- package/dist/mermaid/cpp-package-flowchart-generator.js.map +1 -1
- package/dist/mermaid/diagram-generator.d.ts.map +1 -1
- package/dist/mermaid/diagram-generator.js +17 -18
- package/dist/mermaid/diagram-generator.js.map +1 -1
- package/dist/mermaid/generator.d.ts.map +1 -1
- package/dist/mermaid/generator.js +19 -1
- package/dist/mermaid/generator.js.map +1 -1
- package/dist/mermaid/renderer.d.ts.map +1 -1
- package/dist/mermaid/renderer.js +1 -1
- package/dist/mermaid/renderer.js.map +1 -1
- package/dist/mermaid/test-coverage-renderer.d.ts.map +1 -1
- package/dist/mermaid/test-coverage-renderer.js +18 -12
- package/dist/mermaid/test-coverage-renderer.js.map +1 -1
- package/dist/mermaid/types.d.ts +25 -1
- package/dist/mermaid/types.d.ts.map +1 -1
- package/dist/mermaid/validation-pipeline.d.ts +4 -16
- package/dist/mermaid/validation-pipeline.d.ts.map +1 -1
- package/dist/mermaid/validation-pipeline.js.map +1 -1
- package/dist/parser/archjson-aggregator.js +2 -2
- package/dist/parser/archjson-aggregator.js.map +1 -1
- package/dist/parser/parallel-parser.d.ts +10 -0
- package/dist/parser/parallel-parser.d.ts.map +1 -1
- package/dist/parser/parallel-parser.js +76 -35
- package/dist/parser/parallel-parser.js.map +1 -1
- package/dist/parser/parse-worker-pool.d.ts +59 -0
- package/dist/parser/parse-worker-pool.d.ts.map +1 -0
- package/dist/parser/parse-worker-pool.js +170 -0
- package/dist/parser/parse-worker-pool.js.map +1 -0
- package/dist/parser/parse-worker.d.ts +2 -0
- package/dist/parser/parse-worker.d.ts.map +1 -0
- package/dist/parser/parse-worker.js +72 -0
- package/dist/parser/parse-worker.js.map +1 -0
- package/dist/parser/process-parse-worker-pools.d.ts +18 -0
- package/dist/parser/process-parse-worker-pools.d.ts.map +1 -0
- package/dist/parser/process-parse-worker-pools.js +31 -0
- package/dist/parser/process-parse-worker-pools.js.map +1 -0
- package/dist/parser/typescript-parser.d.ts.map +1 -1
- package/dist/parser/typescript-parser.js +3 -2
- package/dist/parser/typescript-parser.js.map +1 -1
- package/dist/plugins/cpp/builders/class-builder.d.ts +3 -2
- package/dist/plugins/cpp/builders/class-builder.d.ts.map +1 -1
- package/dist/plugins/cpp/builders/class-builder.js +19 -0
- package/dist/plugins/cpp/builders/class-builder.js.map +1 -1
- package/dist/plugins/cpp/index.d.ts +4 -1
- package/dist/plugins/cpp/index.d.ts.map +1 -1
- package/dist/plugins/cpp/index.js +11 -2
- package/dist/plugins/cpp/index.js.map +1 -1
- package/dist/plugins/cpp/mappers/class-capture-mapper.d.ts +14 -0
- package/dist/plugins/cpp/mappers/class-capture-mapper.d.ts.map +1 -0
- package/dist/plugins/cpp/mappers/class-capture-mapper.js +76 -0
- package/dist/plugins/cpp/mappers/class-capture-mapper.js.map +1 -0
- package/dist/plugins/cpp/mappers/enum-capture-mapper.d.ts +6 -0
- package/dist/plugins/cpp/mappers/enum-capture-mapper.d.ts.map +1 -0
- package/dist/plugins/cpp/mappers/enum-capture-mapper.js +31 -0
- package/dist/plugins/cpp/mappers/enum-capture-mapper.js.map +1 -0
- package/dist/plugins/cpp/mappers/field-capture-mapper.d.ts +12 -0
- package/dist/plugins/cpp/mappers/field-capture-mapper.d.ts.map +1 -0
- package/dist/plugins/cpp/mappers/field-capture-mapper.js +66 -0
- package/dist/plugins/cpp/mappers/field-capture-mapper.js.map +1 -0
- package/dist/plugins/cpp/mappers/function-capture-mapper.d.ts +6 -0
- package/dist/plugins/cpp/mappers/function-capture-mapper.d.ts.map +1 -0
- package/dist/plugins/cpp/mappers/function-capture-mapper.js +25 -0
- package/dist/plugins/cpp/mappers/function-capture-mapper.js.map +1 -0
- package/dist/plugins/cpp/mappers/include-capture-mapper.d.ts +5 -0
- package/dist/plugins/cpp/mappers/include-capture-mapper.d.ts.map +1 -0
- package/dist/plugins/cpp/mappers/include-capture-mapper.js +10 -0
- package/dist/plugins/cpp/mappers/include-capture-mapper.js.map +1 -0
- package/dist/plugins/cpp/queries/classes.scm +7 -0
- package/dist/plugins/cpp/queries/enums.scm +3 -0
- package/dist/plugins/cpp/queries/fields.scm +6 -0
- package/dist/plugins/cpp/queries/functions.scm +7 -0
- package/dist/plugins/cpp/queries/includes.scm +8 -0
- package/dist/plugins/cpp/tree-sitter-bridge.d.ts +8 -14
- package/dist/plugins/cpp/tree-sitter-bridge.d.ts.map +1 -1
- package/dist/plugins/cpp/tree-sitter-bridge.js +60 -238
- package/dist/plugins/cpp/tree-sitter-bridge.js.map +1 -1
- package/dist/plugins/golang/atlas/behavior-analyzer.d.ts.map +1 -1
- package/dist/plugins/golang/atlas/behavior-analyzer.js.map +1 -1
- package/dist/plugins/golang/atlas/builders/flow-graph-builder.js.map +1 -1
- package/dist/plugins/golang/atlas/builders/goroutine-topology-builder.js.map +1 -1
- package/dist/plugins/golang/atlas/go-mod-resolver.d.ts.map +1 -1
- package/dist/plugins/golang/atlas/go-mod-resolver.js +2 -1
- package/dist/plugins/golang/atlas/go-mod-resolver.js.map +1 -1
- package/dist/plugins/golang/atlas/renderers/capability-mermaid-template.d.ts.map +1 -1
- package/dist/plugins/golang/atlas/renderers/capability-mermaid-template.js.map +1 -1
- package/dist/plugins/golang/atlas/renderers/flow-mermaid-template.d.ts.map +1 -1
- package/dist/plugins/golang/atlas/renderers/flow-mermaid-template.js.map +1 -1
- package/dist/plugins/golang/atlas/renderers/goroutine-mermaid-template.d.ts.map +1 -1
- package/dist/plugins/golang/atlas/renderers/goroutine-mermaid-template.js.map +1 -1
- package/dist/plugins/golang/atlas/renderers/mermaid-templates.d.ts.map +1 -1
- package/dist/plugins/golang/atlas/renderers/mermaid-templates.js.map +1 -1
- package/dist/plugins/golang/builders/function-builder.d.ts +4 -4
- package/dist/plugins/golang/builders/function-builder.d.ts.map +1 -1
- package/dist/plugins/golang/builders/function-builder.js.map +1 -1
- package/dist/plugins/golang/builders/goroutine-builder.d.ts +2 -2
- package/dist/plugins/golang/builders/goroutine-builder.d.ts.map +1 -1
- package/dist/plugins/golang/builders/goroutine-builder.js.map +1 -1
- package/dist/plugins/golang/builders/interface-builder.d.ts +4 -4
- package/dist/plugins/golang/builders/interface-builder.d.ts.map +1 -1
- package/dist/plugins/golang/builders/interface-builder.js.map +1 -1
- package/dist/plugins/golang/builders/node-utils.d.ts +3 -3
- package/dist/plugins/golang/builders/node-utils.d.ts.map +1 -1
- package/dist/plugins/golang/builders/node-utils.js.map +1 -1
- package/dist/plugins/golang/builders/struct-builder.d.ts +2 -2
- package/dist/plugins/golang/builders/struct-builder.d.ts.map +1 -1
- package/dist/plugins/golang/builders/struct-builder.js.map +1 -1
- package/dist/plugins/golang/go-atlas-adapter.d.ts +3 -3
- package/dist/plugins/golang/go-atlas-adapter.d.ts.map +1 -1
- package/dist/plugins/golang/go-atlas-adapter.js +4 -4
- package/dist/plugins/golang/go-atlas-adapter.js.map +1 -1
- package/dist/plugins/golang/go-parse-coordinator.d.ts +10 -2
- package/dist/plugins/golang/go-parse-coordinator.d.ts.map +1 -1
- package/dist/plugins/golang/go-parse-coordinator.js +44 -6
- package/dist/plugins/golang/go-parse-coordinator.js.map +1 -1
- package/dist/plugins/golang/gopls-client.d.ts +32 -3
- package/dist/plugins/golang/gopls-client.d.ts.map +1 -1
- package/dist/plugins/golang/gopls-client.js +246 -40
- package/dist/plugins/golang/gopls-client.js.map +1 -1
- package/dist/plugins/golang/gopls-interface-resolver.d.ts +14 -1
- package/dist/plugins/golang/gopls-interface-resolver.d.ts.map +1 -1
- package/dist/plugins/golang/gopls-interface-resolver.js +42 -11
- package/dist/plugins/golang/gopls-interface-resolver.js.map +1 -1
- package/dist/plugins/golang/index.d.ts +3 -1
- package/dist/plugins/golang/index.d.ts.map +1 -1
- package/dist/plugins/golang/index.js +20 -3
- package/dist/plugins/golang/index.js.map +1 -1
- package/dist/plugins/golang/interface-matcher.d.ts.map +1 -1
- package/dist/plugins/golang/interface-matcher.js +32 -30
- package/dist/plugins/golang/interface-matcher.js.map +1 -1
- package/dist/plugins/golang/tree-sitter-bridge.d.ts +3 -2
- package/dist/plugins/golang/tree-sitter-bridge.d.ts.map +1 -1
- package/dist/plugins/golang/tree-sitter-bridge.js +25 -23
- package/dist/plugins/golang/tree-sitter-bridge.js.map +1 -1
- package/dist/plugins/golang/types.d.ts +4 -0
- package/dist/plugins/golang/types.d.ts.map +1 -1
- package/dist/plugins/java/dependency-extractor.d.ts.map +1 -1
- package/dist/plugins/java/dependency-extractor.js.map +1 -1
- package/dist/plugins/java/index.d.ts +4 -0
- package/dist/plugins/java/index.d.ts.map +1 -1
- package/dist/plugins/java/index.js +12 -1
- package/dist/plugins/java/index.js.map +1 -1
- package/dist/plugins/java/tree-sitter-bridge.d.ts +3 -2
- package/dist/plugins/java/tree-sitter-bridge.d.ts.map +1 -1
- package/dist/plugins/java/tree-sitter-bridge.js +33 -31
- package/dist/plugins/java/tree-sitter-bridge.js.map +1 -1
- package/dist/plugins/java/types.d.ts +1 -1
- package/dist/plugins/java/types.d.ts.map +1 -1
- package/dist/plugins/kotlin/builders/class-builder.d.ts +2 -1
- package/dist/plugins/kotlin/builders/class-builder.d.ts.map +1 -1
- package/dist/plugins/kotlin/builders/class-builder.js.map +1 -1
- package/dist/plugins/kotlin/builders/function-builder.d.ts +2 -1
- package/dist/plugins/kotlin/builders/function-builder.d.ts.map +1 -1
- package/dist/plugins/kotlin/builders/function-builder.js.map +1 -1
- package/dist/plugins/kotlin/index.d.ts +6 -3
- package/dist/plugins/kotlin/index.d.ts.map +1 -1
- package/dist/plugins/kotlin/index.js +12 -4
- package/dist/plugins/kotlin/index.js.map +1 -1
- package/dist/plugins/kotlin/tree-sitter-bridge.d.ts +3 -3
- package/dist/plugins/kotlin/tree-sitter-bridge.d.ts.map +1 -1
- package/dist/plugins/kotlin/tree-sitter-bridge.js +6 -7
- package/dist/plugins/kotlin/tree-sitter-bridge.js.map +1 -1
- package/dist/plugins/python/archjson-mapper.d.ts.map +1 -1
- package/dist/plugins/python/archjson-mapper.js.map +1 -1
- package/dist/plugins/python/index.d.ts +4 -0
- package/dist/plugins/python/index.d.ts.map +1 -1
- package/dist/plugins/python/index.js +12 -1
- package/dist/plugins/python/index.js.map +1 -1
- package/dist/plugins/python/tree-sitter-bridge.d.ts +3 -2
- package/dist/plugins/python/tree-sitter-bridge.d.ts.map +1 -1
- package/dist/plugins/python/tree-sitter-bridge.js +50 -48
- package/dist/plugins/python/tree-sitter-bridge.js.map +1 -1
- package/dist/plugins/shared/capture-mapper.d.ts +12 -0
- package/dist/plugins/shared/capture-mapper.d.ts.map +1 -0
- package/dist/plugins/shared/capture-mapper.js +33 -0
- package/dist/plugins/shared/capture-mapper.js.map +1 -0
- package/dist/plugins/shared/index.d.ts +4 -0
- package/dist/plugins/shared/index.d.ts.map +1 -0
- package/dist/plugins/shared/index.js +3 -0
- package/dist/plugins/shared/index.js.map +1 -0
- package/dist/plugins/shared/native-parser-backend.d.ts +34 -0
- package/dist/plugins/shared/native-parser-backend.d.ts.map +1 -0
- package/dist/plugins/shared/native-parser-backend.js +96 -0
- package/dist/plugins/shared/native-parser-backend.js.map +1 -0
- package/dist/plugins/shared/parser-backend.d.ts +13 -0
- package/dist/plugins/shared/parser-backend.d.ts.map +1 -0
- package/dist/plugins/shared/parser-backend.js +39 -0
- package/dist/plugins/shared/parser-backend.js.map +1 -0
- package/dist/plugins/shared/parser-runtime.d.ts +32 -0
- package/dist/plugins/shared/parser-runtime.d.ts.map +1 -0
- package/dist/plugins/shared/parser-runtime.js +156 -0
- package/dist/plugins/shared/parser-runtime.js.map +1 -0
- package/dist/plugins/shared/plugin-factory.d.ts +5 -0
- package/dist/plugins/shared/plugin-factory.d.ts.map +1 -0
- package/dist/plugins/shared/plugin-factory.js +27 -0
- package/dist/plugins/shared/plugin-factory.js.map +1 -0
- package/dist/plugins/shared/query-loader.d.ts +14 -0
- package/dist/plugins/shared/query-loader.d.ts.map +1 -0
- package/dist/plugins/shared/query-loader.js +47 -0
- package/dist/plugins/shared/query-loader.js.map +1 -0
- package/dist/plugins/shared/syntax-tree.d.ts +45 -0
- package/dist/plugins/shared/syntax-tree.d.ts.map +1 -0
- package/dist/plugins/shared/syntax-tree.js +2 -0
- package/dist/plugins/shared/syntax-tree.js.map +1 -0
- package/dist/plugins/shared/wasm-parser-backend.d.ts +18 -0
- package/dist/plugins/shared/wasm-parser-backend.d.ts.map +1 -0
- package/dist/plugins/shared/wasm-parser-backend.js +127 -0
- package/dist/plugins/shared/wasm-parser-backend.js.map +1 -0
- package/dist/plugins/typescript/builders/module-graph-builder.d.ts.map +1 -1
- package/dist/plugins/typescript/builders/module-graph-builder.js +2 -3
- package/dist/plugins/typescript/builders/module-graph-builder.js.map +1 -1
- package/dist/plugins/typescript/index.d.ts.map +1 -1
- package/dist/plugins/typescript/index.js +6 -6
- package/dist/plugins/typescript/index.js.map +1 -1
- package/dist/types/config-cli.d.ts +3 -0
- package/dist/types/config-cli.d.ts.map +1 -1
- package/dist/types/config-global.d.ts +7 -1
- package/dist/types/config-global.d.ts.map +1 -1
- package/dist/types/config.d.ts +1 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +1 -0
- package/dist/types/config.js.map +1 -1
- package/dist/types/fitness-rules.d.ts +34 -0
- package/dist/types/fitness-rules.d.ts.map +1 -0
- package/dist/types/fitness-rules.js +2 -0
- package/dist/types/fitness-rules.js.map +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/parser-runtime.d.ts +4 -0
- package/dist/types/parser-runtime.d.ts.map +1 -0
- package/dist/types/parser-runtime.js +5 -0
- package/dist/types/parser-runtime.js.map +1 -0
- package/dist/utils/error-message.d.ts +2 -0
- package/dist/utils/error-message.d.ts.map +1 -0
- package/dist/utils/error-message.js +8 -0
- package/dist/utils/error-message.js.map +1 -0
- package/package.json +34 -18
- package/node_modules/node-addon-api/LICENSE.md +0 -9
- package/node_modules/node-addon-api/README.md +0 -95
- package/node_modules/node-addon-api/common.gypi +0 -21
- package/node_modules/node-addon-api/except.gypi +0 -25
- package/node_modules/node-addon-api/index.js +0 -14
- package/node_modules/node-addon-api/napi-inl.deprecated.h +0 -186
- package/node_modules/node-addon-api/napi-inl.h +0 -7033
- package/node_modules/node-addon-api/napi.h +0 -3309
- package/node_modules/node-addon-api/node_addon_api.gyp +0 -42
- package/node_modules/node-addon-api/node_api.gyp +0 -9
- package/node_modules/node-addon-api/noexcept.gypi +0 -26
- package/node_modules/node-addon-api/nothing.c +0 -0
- package/node_modules/node-addon-api/package-support.json +0 -21
- package/node_modules/node-addon-api/package.json +0 -480
- package/node_modules/node-addon-api/tools/README.md +0 -73
- package/node_modules/node-addon-api/tools/check-napi.js +0 -99
- package/node_modules/node-addon-api/tools/clang-format.js +0 -71
- package/node_modules/node-addon-api/tools/conversion.js +0 -301
- package/node_modules/node-gyp-build/README.md +0 -58
- package/node_modules/node-gyp-build/SECURITY.md +0 -5
- package/node_modules/node-gyp-build/bin.js +0 -84
- package/node_modules/node-gyp-build/build-test.js +0 -19
- package/node_modules/node-gyp-build/index.js +0 -6
- package/node_modules/node-gyp-build/node-gyp-build.js +0 -207
- package/node_modules/node-gyp-build/optional.js +0 -7
- package/node_modules/node-gyp-build/package.json +0 -43
- package/node_modules/tree-sitter/README.md +0 -128
- package/node_modules/tree-sitter/binding.gyp +0 -80
- package/node_modules/tree-sitter/index.js +0 -916
- package/node_modules/tree-sitter/package.json +0 -76
- package/node_modules/tree-sitter/prebuilds/linux-x64/node.napi.glibc.node +0 -0
- package/node_modules/tree-sitter/src/addon_data.h +0 -47
- package/node_modules/tree-sitter/src/binding.cc +0 -35
- package/node_modules/tree-sitter/src/conversions.cc +0 -140
- package/node_modules/tree-sitter/src/conversions.h +0 -22
- package/node_modules/tree-sitter/src/language.cc +0 -106
- package/node_modules/tree-sitter/src/language.h +0 -17
- package/node_modules/tree-sitter/src/logger.cc +0 -70
- package/node_modules/tree-sitter/src/logger.h +0 -19
- package/node_modules/tree-sitter/src/lookaheaditerator.cc +0 -122
- package/node_modules/tree-sitter/src/lookaheaditerator.h +0 -33
- package/node_modules/tree-sitter/src/node.cc +0 -1088
- package/node_modules/tree-sitter/src/node.h +0 -30
- package/node_modules/tree-sitter/src/parser.cc +0 -306
- package/node_modules/tree-sitter/src/parser.h +0 -35
- package/node_modules/tree-sitter/src/query.cc +0 -397
- package/node_modules/tree-sitter/src/query.h +0 -40
- package/node_modules/tree-sitter/src/tree.cc +0 -316
- package/node_modules/tree-sitter/src/tree.h +0 -45
- package/node_modules/tree-sitter/src/tree_cursor.cc +0 -213
- package/node_modules/tree-sitter/src/tree_cursor.h +0 -52
- package/node_modules/tree-sitter/tree-sitter.d.ts +0 -1042
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/include/tree_sitter/api.h +0 -1478
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.c +0 -48
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.h +0 -41
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/array.h +0 -291
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/atomic.h +0 -68
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/clock.h +0 -146
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/error_costs.h +0 -11
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.c +0 -523
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.h +0 -36
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/host.h +0 -21
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.c +0 -293
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.h +0 -293
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/length.h +0 -52
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.c +0 -483
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.h +0 -54
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lib.c +0 -12
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/node.c +0 -875
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.c +0 -2293
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.h +0 -286
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/point.h +0 -48
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/portable/endian.h +0 -239
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/query.c +0 -4350
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reduce_action.h +0 -34
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reusable_node.h +0 -95
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.c +0 -911
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.h +0 -133
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.c +0 -1034
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.h +0 -399
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.c +0 -170
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.h +0 -31
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.c +0 -717
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.h +0 -48
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/ts_assert.h +0 -11
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ICU_SHA +0 -1
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/LICENSE +0 -414
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/README.md +0 -29
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ptypes.h +0 -1
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/umachine.h +0 -448
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/urename.h +0 -1
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf.h +0 -1
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf16.h +0 -733
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf8.h +0 -881
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode.h +0 -75
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib-symbols.txt +0 -24
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib.c +0 -113
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/wasm-stdlib.h +0 -1314
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.c +0 -1935
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.h +0 -31
- package/scripts/postinstall-tree-sitter.mjs +0 -28
package/README.md
CHANGED
|
@@ -38,30 +38,91 @@ npm install -g @yalehwang/archguard
|
|
|
38
38
|
|
|
39
39
|
### Using with Claude Code
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Install ArchGuard as a Claude Code plugin from the npm-source marketplace.
|
|
42
|
+
Claude Code runs `npm install` of the plugin package, which depends on an
|
|
43
|
+
exact `@yalehwang/archguard` version — the full runtime dependency closure
|
|
44
|
+
(ordinary JS dependencies, `web-tree-sitter`, bundled grammar WASM assets,
|
|
45
|
+
platform-selected optional packages) is resolved on your machine, with no
|
|
46
|
+
global `archguard` binary, vendored `node_modules`, or `NODE_PATH` involved:
|
|
42
47
|
|
|
43
48
|
```bash
|
|
44
|
-
claude
|
|
49
|
+
claude plugin marketplace add yaleh/archguard
|
|
50
|
+
claude plugin install archguard@archguard
|
|
45
51
|
```
|
|
46
52
|
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
Restart Claude Code afterwards so the plugin loads. The plugin bundles the
|
|
54
|
+
`archguard` MCP server (launched via `plugin/mcp-launcher.mjs`, which resolves
|
|
55
|
+
the ArchGuard CLI entry from the plugin's own npm dependency tree) plus the
|
|
56
|
+
`feature-developer` and `project-semantics-discovery` skills.
|
|
57
|
+
|
|
58
|
+
Alternatively, register the MCP server directly without the plugin (project
|
|
59
|
+
scope, requires a global `archguard` install):
|
|
49
60
|
|
|
50
61
|
```bash
|
|
51
|
-
|
|
62
|
+
claude mcp add --scope project archguard -- archguard mcp
|
|
52
63
|
```
|
|
53
64
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
65
|
+
For a local checkout, `scripts/install-claude-user-scope.sh` runs the same
|
|
66
|
+
npm-source marketplace flow against your checkout: it adds (or updates) the
|
|
67
|
+
`archguard` marketplace registration, installs (or updates) the
|
|
68
|
+
`archguard@archguard` plugin at user scope, and removes any legacy ArchGuard
|
|
69
|
+
entry that older installers left in the deprecated `~/.claude/mcp.json`. It
|
|
70
|
+
never installs a global `archguard` binary, never writes a registration into
|
|
71
|
+
`~/.claude/mcp.json`, and never installs or builds native Tree-sitter
|
|
72
|
+
packages. The script is idempotent — re-run it to upgrade after pulling a
|
|
73
|
+
new version:
|
|
57
74
|
|
|
58
|
-
|
|
59
|
-
scope
|
|
75
|
+
```bash
|
|
76
|
+
bash scripts/install-claude-user-scope.sh
|
|
77
|
+
# Register the GitHub marketplace source instead of the local checkout:
|
|
78
|
+
bash scripts/install-claude-user-scope.sh --marketplace-source yaleh/archguard
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Parser runtime selection (auto | native | wasm)
|
|
82
|
+
|
|
83
|
+
A normal install is the **deterministic WASM baseline**: `web-tree-sitter`
|
|
84
|
+
plus the bundled grammar WASM assets are always installed, and the native
|
|
85
|
+
`tree-sitter` runtime/grammar packages are never installed or built by
|
|
86
|
+
ArchGuard itself. This holds for the Claude plugin installer as well:
|
|
87
|
+
`scripts/install-claude-user-scope.sh` never installs, builds, or globally
|
|
88
|
+
mutates native Tree-sitter packages — the plugin closure it registers is the
|
|
89
|
+
WASM baseline. Per language, `ARCHGUARD_PARSER_RUNTIME` selects the
|
|
90
|
+
backend:
|
|
91
|
+
|
|
92
|
+
- `auto` (default) — probe the native `(runtime, grammar)` tuple with a health
|
|
93
|
+
check; use native only when the probe passes, otherwise fall back to WASM
|
|
94
|
+
and record the reason in diagnostics.
|
|
95
|
+
- `native` — require native; fail loudly with an actionable error if the
|
|
96
|
+
probe fails (never silently substitutes WASM).
|
|
97
|
+
- `wasm` — never touch native modules; portable and deterministic.
|
|
98
|
+
|
|
99
|
+
`ARCHGUARD_PARSER_RUNTIME` is the canonical setting. The former
|
|
100
|
+
`ARCHGUARD_PARSER_BACKEND` is a deprecated alias: it applies only when the
|
|
101
|
+
canonical variable is unset, and ArchGuard then prints a one-time stderr
|
|
102
|
+
warning. Every analysis surfaces a one-line effective-runtime summary —
|
|
103
|
+
language → backend chosen → source of choice → fallback reason — in
|
|
104
|
+
`--verbose` mode and always when a fallback occurs; MCP protocol output
|
|
105
|
+
stays clean (diagnostics route to stderr).
|
|
60
106
|
|
|
61
107
|
```bash
|
|
62
|
-
|
|
108
|
+
# Default (auto): per-language health-checked native-first selection with WASM fallback
|
|
109
|
+
ARCHGUARD_PARSER_RUNTIME=auto archguard analyze -s ./src --lang go
|
|
110
|
+
|
|
111
|
+
# Force the portable baseline (diagnostics, restricted CI)
|
|
112
|
+
ARCHGUARD_PARSER_RUNTIME=wasm archguard analyze -s ./src --lang go
|
|
113
|
+
|
|
114
|
+
# Require the native accelerator; fail if unavailable or ABI-incompatible
|
|
115
|
+
ARCHGUARD_PARSER_RUNTIME=native archguard analyze -s ./src --lang go
|
|
63
116
|
```
|
|
64
117
|
|
|
118
|
+
Native acceleration is opt-in and discovered only at runtime: install the
|
|
119
|
+
optional native packages (`tree-sitter` + the per-language grammar packages,
|
|
120
|
+
declared as optional peers) into ArchGuard's own package scope, or point
|
|
121
|
+
`ARCHGUARD_NATIVE_MODULE_ROOT=/path/to/root` at a trusted module root
|
|
122
|
+
containing them. The analyzed project's `node_modules` is never consulted.
|
|
123
|
+
See [Parser Runtime Selection](docs/user-guide/parser-runtime.md) for the
|
|
124
|
+
full policy.
|
|
125
|
+
|
|
65
126
|
Then ask Claude to analyze any project:
|
|
66
127
|
|
|
67
128
|
> Analyze the architecture of `/path/to/my-project` using archguard MCP.
|
|
@@ -96,21 +157,45 @@ Claude will call `archguard_analyze(includeTests: true)`, then sequence through
|
|
|
96
157
|
|
|
97
158
|
### Using with Codex
|
|
98
159
|
|
|
99
|
-
|
|
160
|
+
Codex does not read Claude plugin manifests, so its MCP configuration must
|
|
161
|
+
launch an ArchGuard installation that owns its own runtime dependency closure.
|
|
162
|
+
`scripts/install-codex-user-scope.sh` registers exactly one TOML-safe
|
|
163
|
+
`[mcp_servers.archguard]` table in the Codex user config
|
|
164
|
+
(`~/.codex/config.toml`, or `$CODEX_HOME/config.toml`) that invokes the
|
|
165
|
+
npm-installed `@yalehwang/archguard` CLI — never Claude's versioned plugin
|
|
166
|
+
cache and never the source checkout:
|
|
100
167
|
|
|
101
168
|
```bash
|
|
102
|
-
|
|
169
|
+
# Registers the global npm install (discovered via `npm root -g`):
|
|
170
|
+
bash scripts/install-codex-user-scope.sh
|
|
171
|
+
|
|
172
|
+
# Or point at a specific npm-installed ArchGuard root explicitly:
|
|
173
|
+
bash scripts/install-codex-user-scope.sh --archguard-root "$(npm root -g)"
|
|
103
174
|
```
|
|
104
175
|
|
|
105
|
-
|
|
176
|
+
The installer is idempotent (re-run it to refresh after an upgrade): it updates
|
|
177
|
+
the single archguard table in place, preserves all unrelated Codex
|
|
178
|
+
configuration, and forwards the parser-runtime policy as
|
|
179
|
+
`ARCHGUARD_PARSER_RUNTIME` (`--parser-runtime auto|native|wasm`, default
|
|
180
|
+
`auto`). It writes an entry of this shape:
|
|
106
181
|
|
|
107
182
|
```toml
|
|
108
183
|
[mcp_servers.archguard]
|
|
109
|
-
command = "
|
|
110
|
-
args = ["mcp"]
|
|
184
|
+
command = "node"
|
|
185
|
+
args = ["<npm-install>/@yalehwang/archguard/dist/cli/index.js", "mcp"]
|
|
186
|
+
env = { ARCHGUARD_PARSER_RUNTIME = "auto" }
|
|
187
|
+
startup_timeout_sec = 30
|
|
188
|
+
tool_timeout_sec = 120
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Alternatively, register manually (requires `archguard` on Codex's `PATH`):
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
codex mcp add archguard -- archguard mcp
|
|
111
195
|
```
|
|
112
196
|
|
|
113
|
-
Then prompt Codex in the same way
|
|
197
|
+
Then prompt Codex in the same way and verify in the Codex TUI with `/mcp` (or
|
|
198
|
+
`codex mcp list`). The same MCP tools are available.
|
|
114
199
|
|
|
115
200
|
### Analyzing an External Project
|
|
116
201
|
|
|
@@ -265,10 +350,12 @@ The MCP server exposes the query tools plus `archguard_analyze`, which refreshes
|
|
|
265
350
|
claude mcp add --scope project archguard -- archguard mcp
|
|
266
351
|
```
|
|
267
352
|
|
|
268
|
-
**Codex** —
|
|
353
|
+
**Codex** — register at user scope via the installer (launches the
|
|
354
|
+
npm-installed CLI), or manually via CLI / `~/.codex/config.toml`:
|
|
269
355
|
|
|
270
356
|
```bash
|
|
271
|
-
codex
|
|
357
|
+
bash scripts/install-codex-user-scope.sh # idempotent, TOML-safe
|
|
358
|
+
codex mcp add archguard -- archguard mcp # manual alternative
|
|
272
359
|
```
|
|
273
360
|
|
|
274
361
|
**Available MCP tools:**
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<!-- Generated by scripts/benchmark-parser-backends.mjs (npm run build first). -->
|
|
2
|
+
# Parser backend benchmark (native vs WASM)
|
|
3
|
+
|
|
4
|
+
- date: 2026-07-30
|
|
5
|
+
- node: v26.5.0
|
|
6
|
+
- platform: linux/x64
|
|
7
|
+
- iterations per fixture: 50 (after warm-up)
|
|
8
|
+
|
|
9
|
+
| language | parser-only native (ms) | parser-only wasm (ms) | ratio | pipeline native (ms) | pipeline wasm (ms) | ratio |
|
|
10
|
+
|---|---|---|---|---|---|---|
|
|
11
|
+
| go | 0.235 | 0.731 | 3.11x | 2.998 | 1.378 | 0.46x |
|
|
12
|
+
| java | 0.271 | 0.377 | 1.39x | 2.232 | 0.974 | 0.44x |
|
|
13
|
+
| python | 0.383 | 0.329 | 0.86x | 1.680 | 0.628 | 0.37x |
|
|
14
|
+
| cpp | 0.691 | 2.057 | 2.98x | 3.160 | 1.553 | 0.49x |
|
|
15
|
+
| kotlin | 0.560 | 1.848 | 3.30x | 5.585 | 1.902 | 0.34x |
|
|
16
|
+
| **mean** | 0.428 | 1.069 | **2.33x** | 3.131 | 1.287 | **0.42x** |
|
|
17
|
+
|
|
18
|
+
"pipeline" = plugin.parseCode() (tree-sitter parse + extractor + ArchJSON mapping),
|
|
19
|
+
the parse-dominated portion of an end-to-end ArchGuard analysis.
|
|
20
|
+
|
|
21
|
+
## TASK-40 after: process caches and parse-worker crossover
|
|
22
|
+
|
|
23
|
+
Measured 2026-07-30 on Node v26.5.0, linux/x64, 4 cores. The small/medium
|
|
24
|
+
runs were heavily contended by three concurrent task worktrees (1-minute load
|
|
25
|
+
9.40-9.97); the large run had load 2.47. Ratios, not absolute timings, are the
|
|
26
|
+
decision evidence.
|
|
27
|
+
|
|
28
|
+
| fixture size | iterations | parser-only native (mean ms) | parser-only WASM (mean ms) | ratio | full-analysis native (mean ms) | full-analysis WASM (mean ms) | ratio |
|
|
29
|
+
|---|---:|---:|---:|---:|---:|---:|---:|
|
|
30
|
+
| small (1x) | 20 | 0.677 | 0.589 | **1.09x** | 3.400 | 1.188 | **0.45x** |
|
|
31
|
+
| medium (10x) | 10 | 13.719 | 8.378 | **1.05x** | 38.818 | 14.469 | **0.42x** |
|
|
32
|
+
| large (50x) | 5 | 48.947 | 28.224 | **0.93x** | 157.095 | 54.580 | **0.41x** |
|
|
33
|
+
|
|
34
|
+
The committed worker threshold is **12 files** (`PARSE_WORKER_THRESHOLD`). Below
|
|
35
|
+
that, serial parsing avoids worker startup; above it, synchronous parsing runs
|
|
36
|
+
in a bounded pool (maximum configured concurrency). WASM runtime and grammar
|
|
37
|
+
promises are cached per asset directory for the process lifetime and parser
|
|
38
|
+
sessions are reused within their owning worker/plugin.
|
|
39
|
+
|
|
40
|
+
Decision: no exception to the 2.5x full-analysis ceiling is needed. Both measured
|
|
41
|
+
full-analysis ratios are below 1x on this host (and therefore within the stated
|
|
42
|
+
"never exceeds 2.5x" bound). The earlier uncontended baseline remains above for
|
|
43
|
+
comparison; the contended after run must not be read as an absolute speedup.
|
|
44
|
+
Memory/shutdown evidence is enforced by `wasm-memory.test.ts` and
|
|
45
|
+
`parser-pool.test.ts` (success/error termination and serial/parallel determinism).
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### TASK-40 audit remediation: real end-to-end path
|
|
49
|
+
|
|
50
|
+
Measured after production wiring on Node v26.5.0, linux/x64, 4 cores, 1-minute
|
|
51
|
+
load 2.44. Each end-to-end fixture is a 12-file project and includes file
|
|
52
|
+
discovery, runtime selection, threshold decision, process pool lifecycle,
|
|
53
|
+
analysis merge, and query persistence.
|
|
54
|
+
|
|
55
|
+
| scope | parser-only ratio | parse+extract ratio | end-to-end ratio |
|
|
56
|
+
|---|---:|---:|---:|
|
|
57
|
+
| five-language mean | **1.32x** | **0.54x** | **0.62x** |
|
|
58
|
+
|
|
59
|
+
Per-language end-to-end WASM/native ratios: Go 0.17x, Java 0.66x, Python
|
|
60
|
+
0.97x, C++ 0.64x, Kotlin 0.65x. No result exceeds the 2.5x ceiling. Absolute
|
|
61
|
+
means were 127.9 ms native and 86.5 ms WASM under the recorded load. The
|
|
62
|
+
benchmark uses `runAnalysis()` rather than treating `plugin.parseCode()` as a
|
|
63
|
+
complete analysis; the latter remains separately reported as parse+extract.
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### TASK-40 final audit: verified project-worker dispatch
|
|
67
|
+
|
|
68
|
+
Node v26.5.0, linux/x64, 4 cores; load average 3.30/1.58/1.36. The benchmark
|
|
69
|
+
now fails if `ProcessParseWorkerPools.dispatchCount` remains zero, proving each
|
|
70
|
+
native and WASM sample crossed the 12-file threshold and executed the language
|
|
71
|
+
plugin's complete `parseProject()` inside a real worker. Three measured runs per
|
|
72
|
+
parser-only fixture were used; each end-to-end runtime analyzed one 12-file
|
|
73
|
+
project.
|
|
74
|
+
|
|
75
|
+
| measure | native mean | WASM mean | WASM/native |
|
|
76
|
+
|---|---:|---:|---:|
|
|
77
|
+
| parser-only | 0.713 ms | 0.665 ms | **1.32x** (mean language ratio) |
|
|
78
|
+
| parse+extract | 3.586 ms | 1.476 ms | **0.50x** |
|
|
79
|
+
| end-to-end project | 2141.8 ms | 1858.0 ms | **0.74x** |
|
|
80
|
+
|
|
81
|
+
End-to-end per-language ratios: Go 0.17x, Java 0.77x, Python 0.95x, C++
|
|
82
|
+
1.05x, Kotlin 0.76x. No 2.5x exception is required. The higher absolute times
|
|
83
|
+
relative to the earlier audit run are worker startup and complete project
|
|
84
|
+
plugin initialization now honestly included rather than bypassed.
|
|
85
|
+
|
|
86
|
+
### TASK-40 targeted audit: alternating repeated E2E samples
|
|
87
|
+
|
|
88
|
+
Clean build, Node v26.5.0, linux/x64, 4 cores; load 3.53/2.23/1.74.
|
|
89
|
+
Each backend ran three complete 12-file analyses, alternating order by
|
|
90
|
+
iteration. The benchmark fails closed when worker dispatch is zero and compares
|
|
91
|
+
canonical structural output (version, language, source files, entities,
|
|
92
|
+
relations, modules) across native/WASM and all iterations.
|
|
93
|
+
|
|
94
|
+
| measure | native mean | WASM mean | ratio |
|
|
95
|
+
|---|---:|---:|---:|
|
|
96
|
+
| parser-only | 0.766 ms | 0.688 ms | **1.33x** mean language ratio |
|
|
97
|
+
| parse+extract | 3.818 ms | 1.735 ms | **0.54x** |
|
|
98
|
+
| E2E median of 3/backend | 781.1 ms | 774.1 ms | **1.00x** |
|
|
99
|
+
|
|
100
|
+
E2E ratios: Go 1.01x, Java 1.13x, Python 1.02x, C++ 0.89x, Kotlin
|
|
101
|
+
0.95x. All structural outputs were equivalent and no ratio exceeded 2.5x.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tree-sitter.wasm": "sha256:f38dcc4b43b818f9a0785bc1c6d5611a75ac4cdd428ff3f02757c34ca4e46d7f",
|
|
3
|
+
"tree-sitter-go.wasm": "sha256:9504573f352b20be7f2f1911754d710622aedc15afff16d5ed8fb5645681aee7",
|
|
4
|
+
"tree-sitter-java.wasm": "sha256:4fdeac4ca6ca089f06c6f7e562abcac1733cd465728cc7031ebb73c2019122c4",
|
|
5
|
+
"tree-sitter-python.wasm": "sha256:16108b50df4ee9a30168794252ab55e7c93bfc5765d7fa0aa3e335752c515f47",
|
|
6
|
+
"tree-sitter-cpp.wasm": "sha256:174eb0deb75b2ec7881bcacda9f995648d8e683956e5c2267e69ab6dc503fcbf",
|
|
7
|
+
"tree-sitter-kotlin.wasm": "sha256:7009d69453bc8735e438b2818a633efb21c88f99782769abba60dffedfab73f7"
|
|
8
|
+
}
|
package/{node_modules/tree-sitter/LICENSE → assets/grammars/licenses/tree-sitter-cpp.LICENSE}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2014
|
|
3
|
+
Copyright (c) 2014 Max Brunsfeld
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
21
|
+
SOFTWARE.
|
package/{node_modules/node-gyp-build/LICENSE → assets/grammars/licenses/tree-sitter-go.LICENSE}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2014 Max Brunsfeld
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
9
9
|
copies of the Software, and to permit persons to whom the Software is
|
|
10
10
|
furnished to do so, subject to the following conditions:
|
|
11
11
|
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
14
|
|
|
15
15
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
16
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
17
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017 Ayman Nadeem
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Amaan Qureshi <amaanq12@gmail.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016 Max Brunsfeld
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018-2024 Max Brunsfeld
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"generatedBy": "scripts/fetch-grammar-wasms.mjs",
|
|
3
|
+
"abi": "tree-sitter ABI 14/15 (web-tree-sitter 0.25.x)",
|
|
4
|
+
"sources": [
|
|
5
|
+
{
|
|
6
|
+
"asset": "tree-sitter.wasm",
|
|
7
|
+
"role": "runtime",
|
|
8
|
+
"package": "web-tree-sitter",
|
|
9
|
+
"version": "0.25.10",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"licenseFile": "licenses/tree-sitter.LICENSE",
|
|
12
|
+
"tarball": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.25.10.tgz",
|
|
13
|
+
"tarballIntegrity": "sha512-Y09sF44/13XvgVKgO2cNDw5rGk6s26MgoZPXLESvMXeefBf7i6/73eFurre0IsTW6E14Y0ArIzhUMmjoc7xyzA=="
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"asset": "tree-sitter-go.wasm",
|
|
17
|
+
"role": "grammar",
|
|
18
|
+
"package": "tree-sitter-go",
|
|
19
|
+
"version": "0.25.0",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"licenseFile": "licenses/tree-sitter-go.LICENSE",
|
|
22
|
+
"tarball": "https://registry.npmjs.org/tree-sitter-go/-/tree-sitter-go-0.25.0.tgz",
|
|
23
|
+
"tarballIntegrity": "sha512-APBc/Dq3xz/e35Xpkhb1blu5UgW+2E3RyGWawZSCNcbGwa7jhSQPS8KsUupuzBla8PCo8+lz9W/JDJjmfRa2tw=="
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"asset": "tree-sitter-java.wasm",
|
|
27
|
+
"role": "grammar",
|
|
28
|
+
"package": "tree-sitter-java",
|
|
29
|
+
"version": "0.23.5",
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"licenseFile": "licenses/tree-sitter-java.LICENSE",
|
|
32
|
+
"tarball": "https://registry.npmjs.org/tree-sitter-java/-/tree-sitter-java-0.23.5.tgz",
|
|
33
|
+
"tarballIntegrity": "sha512-Yju7oQ0Xx7GcUT01mUglPP+bYfvqjNCGdxqigTnew9nLGoII42PNVP3bHrYeMxswiCRM0yubWmN5qk+zsg0zMA=="
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"asset": "tree-sitter-python.wasm",
|
|
37
|
+
"role": "grammar",
|
|
38
|
+
"package": "tree-sitter-python",
|
|
39
|
+
"version": "0.25.0",
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"licenseFile": "licenses/tree-sitter-python.LICENSE",
|
|
42
|
+
"tarball": "https://registry.npmjs.org/tree-sitter-python/-/tree-sitter-python-0.25.0.tgz",
|
|
43
|
+
"tarballIntegrity": "sha512-eCmJx6zQa35GxaCtQD+wXHOhYqBxEL+bp71W/s3fcDMu06MrtzkVXR437dRrCrbrDbyLuUDJpAgycs7ncngLXw=="
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"asset": "tree-sitter-cpp.wasm",
|
|
47
|
+
"role": "grammar",
|
|
48
|
+
"package": "tree-sitter-cpp",
|
|
49
|
+
"version": "0.23.4",
|
|
50
|
+
"license": "MIT",
|
|
51
|
+
"licenseFile": "licenses/tree-sitter-cpp.LICENSE",
|
|
52
|
+
"tarball": "https://registry.npmjs.org/tree-sitter-cpp/-/tree-sitter-cpp-0.23.4.tgz",
|
|
53
|
+
"tarballIntegrity": "sha512-qR5qUDyhZ5jJ6V8/umiBxokRbe89bCGmcq/dk94wI4kN86qfdV8k0GHIUEKaqWgcu42wKal5E97LKpLeVW8sKw=="
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"asset": "tree-sitter-kotlin.wasm",
|
|
57
|
+
"role": "grammar",
|
|
58
|
+
"package": "@tree-sitter-grammars/tree-sitter-kotlin",
|
|
59
|
+
"version": "1.1.0",
|
|
60
|
+
"license": "MIT",
|
|
61
|
+
"licenseFile": "licenses/tree-sitter-kotlin.LICENSE",
|
|
62
|
+
"tarball": "https://registry.npmjs.org/@tree-sitter-grammars/tree-sitter-kotlin/-/tree-sitter-kotlin-1.1.0.tgz",
|
|
63
|
+
"tarballIntegrity": "sha512-vlVXaxEE8t2kpJgfZpa8XVvxcnKw9AYtRTgy7KWjsDmAsadk06RxAT80IXOgGQnmM9i/orQn1nD84gPNUHu6DQ=="
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,34 +1,2 @@
|
|
|
1
|
-
export type ComparisonOp
|
|
2
|
-
export interface MetricThresholdRule {
|
|
3
|
-
type?: 'metric';
|
|
4
|
-
metric: string;
|
|
5
|
-
op: ComparisonOp;
|
|
6
|
-
value: number;
|
|
7
|
-
message: string;
|
|
8
|
-
}
|
|
9
|
-
export interface DependencyConstraintRule {
|
|
10
|
-
type: 'no-dependency';
|
|
11
|
-
from: string;
|
|
12
|
-
to: string;
|
|
13
|
-
message: string;
|
|
14
|
-
}
|
|
15
|
-
export type GimLossType = 'feasibility' | 'consistency' | 'description-length' | 'generation-alignment';
|
|
16
|
-
export interface GimLossRule {
|
|
17
|
-
type: 'gim-loss';
|
|
18
|
-
loss: GimLossType;
|
|
19
|
-
op: ComparisonOp;
|
|
20
|
-
value: number;
|
|
21
|
-
message: string;
|
|
22
|
-
}
|
|
23
|
-
export type FitnessRule = MetricThresholdRule | DependencyConstraintRule | GimLossRule;
|
|
24
|
-
export interface FitnessConfig {
|
|
25
|
-
rules: FitnessRule[];
|
|
26
|
-
failOnViolation: boolean;
|
|
27
|
-
}
|
|
28
|
-
export interface RuleResult {
|
|
29
|
-
rule: FitnessRule;
|
|
30
|
-
passed: boolean;
|
|
31
|
-
actual?: number | string;
|
|
32
|
-
detail?: string;
|
|
33
|
-
}
|
|
1
|
+
export type { ComparisonOp, MetricThresholdRule, DependencyConstraintRule, GimLossType, GimLossRule, FitnessRule, FitnessConfig, RuleResult, } from '../../types/fitness-rules.js';
|
|
34
2
|
//# sourceMappingURL=rule-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-types.d.ts","sourceRoot":"","sources":["../../../src/analysis/fitness/rule-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rule-types.d.ts","sourceRoot":"","sources":["../../../src/analysis/fitness/rule-types.ts"],"names":[],"mappings":"AAQA,YAAY,EACV,YAAY,EACZ,mBAAmB,EACnB,wBAAwB,EACxB,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,EACb,UAAU,GACX,MAAM,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"direction-hint.d.ts","sourceRoot":"","sources":["../../../src/analysis/gim/direction-hint.ts"],"names":[],"m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M,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;CACxB;AA8CD,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,cAAc,EAAE,GAAG,aAAa,CA0D/E"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { diffSnapshots } from '../snapshot-diff.js';
|
|
2
|
-
const EXPANSION_ON_INCREASE = new Set([
|
|
2
|
+
const EXPANSION_ON_INCREASE = new Set([
|
|
3
|
+
'totalEntities',
|
|
4
|
+
'totalRelations',
|
|
5
|
+
'packageCount',
|
|
6
|
+
'sccCount',
|
|
7
|
+
'giniInDegree',
|
|
8
|
+
]);
|
|
3
9
|
const THRESHOLD_PCT = 5;
|
|
4
10
|
function signalDirection(metric, percentChange, delta) {
|
|
5
11
|
if (delta === null)
|
|
@@ -39,12 +45,16 @@ export function computeDirectionHint(snapshots) {
|
|
|
39
45
|
const newer = snapshots[0];
|
|
40
46
|
const older = snapshots[1];
|
|
41
47
|
const diff = diffSnapshots(older, newer);
|
|
42
|
-
const trackedMetrics = [
|
|
48
|
+
const trackedMetrics = [
|
|
49
|
+
'totalEntities',
|
|
50
|
+
'totalRelations',
|
|
51
|
+
'packageCount',
|
|
52
|
+
'sccCount',
|
|
53
|
+
'giniInDegree',
|
|
54
|
+
];
|
|
43
55
|
const signals = trackedMetrics.map((metric) => {
|
|
44
56
|
const entry = diff.entries.find((e) => e.metric === metric);
|
|
45
|
-
const dir = entry
|
|
46
|
-
? signalDirection(metric, entry.percentChange, entry.delta)
|
|
47
|
-
: 'neutral';
|
|
57
|
+
const dir = entry ? signalDirection(metric, entry.percentChange, entry.delta) : 'neutral';
|
|
48
58
|
return {
|
|
49
59
|
metric,
|
|
50
60
|
direction: dir,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"direction-hint.js","sourceRoot":"","sources":["../../../src/analysis/gim/direction-hint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAq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C;
|
|
1
|
+
{"version":3,"file":"gim-loss-evaluator.d.ts","sourceRoot":"","sources":["../../../src/analysis/gim/gim-loss-evaluator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,IAAI,CAAC;CACb;AAED,KAAK,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAyCpC,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,GAAG,UAAU,CAiBvF;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,CAgCnF"}
|
|
@@ -14,12 +14,18 @@ function resolveProxy(loss, vector) {
|
|
|
14
14
|
}
|
|
15
15
|
function compare(actual, op, threshold) {
|
|
16
16
|
switch (op) {
|
|
17
|
-
case '<':
|
|
18
|
-
|
|
19
|
-
case '
|
|
20
|
-
|
|
21
|
-
case '
|
|
22
|
-
|
|
17
|
+
case '<':
|
|
18
|
+
return actual < threshold;
|
|
19
|
+
case '<=':
|
|
20
|
+
return actual <= threshold;
|
|
21
|
+
case '>':
|
|
22
|
+
return actual > threshold;
|
|
23
|
+
case '>=':
|
|
24
|
+
return actual >= threshold;
|
|
25
|
+
case '==':
|
|
26
|
+
return actual === threshold;
|
|
27
|
+
case '!=':
|
|
28
|
+
return actual !== threshold;
|
|
23
29
|
}
|
|
24
30
|
}
|
|
25
31
|
const PROXY_LABELS = {
|