gitnexus 1.6.10-rc.21 → 1.6.10-rc.211
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 +212 -22
- package/dist/_shared/graph/types.d.ts +27 -8
- package/dist/_shared/graph/types.d.ts.map +1 -1
- package/dist/_shared/index.d.ts +4 -3
- package/dist/_shared/index.d.ts.map +1 -1
- package/dist/_shared/index.js +1 -1
- package/dist/_shared/index.js.map +1 -1
- package/dist/_shared/integrations/circuit-breaker.d.ts.map +1 -1
- package/dist/_shared/integrations/circuit-breaker.js.map +1 -1
- package/dist/_shared/integrations/resilient-fetch.d.ts +19 -1
- package/dist/_shared/integrations/resilient-fetch.d.ts.map +1 -1
- package/dist/_shared/integrations/resilient-fetch.js +23 -10
- package/dist/_shared/integrations/resilient-fetch.js.map +1 -1
- package/dist/_shared/language-detection.d.ts.map +1 -1
- package/dist/_shared/lbug/schema-constants.d.ts +2 -2
- package/dist/_shared/lbug/schema-constants.d.ts.map +1 -1
- package/dist/_shared/lbug/schema-constants.js +3 -0
- package/dist/_shared/lbug/schema-constants.js.map +1 -1
- package/dist/_shared/scope-resolution/callable-flow-site.d.ts +110 -0
- package/dist/_shared/scope-resolution/callable-flow-site.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/callable-flow-site.js +11 -0
- package/dist/_shared/scope-resolution/callable-flow-site.js.map +1 -0
- package/dist/_shared/scope-resolution/evidence-weights.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/finalize-algorithm.d.ts +6 -1
- package/dist/_shared/scope-resolution/finalize-algorithm.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/finalize-algorithm.js +316 -37
- package/dist/_shared/scope-resolution/finalize-algorithm.js.map +1 -1
- package/dist/_shared/scope-resolution/parsed-file.d.ts +7 -0
- package/dist/_shared/scope-resolution/parsed-file.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/reference-site.d.ts +124 -1
- package/dist/_shared/scope-resolution/reference-site.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/registries/field-registry.js.map +1 -1
- package/dist/_shared/scope-resolution/registries/lookup-core.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/registries/lookup-core.js +58 -2
- package/dist/_shared/scope-resolution/registries/lookup-core.js.map +1 -1
- package/dist/_shared/scope-resolution/registries/method-registry.js.map +1 -1
- package/dist/_shared/scope-resolution/scope-tree.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/scope-tree.js.map +1 -1
- package/dist/_shared/scope-resolution/symbol-definition.d.ts +47 -0
- package/dist/_shared/scope-resolution/symbol-definition.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/types.d.ts +297 -5
- package/dist/_shared/scope-resolution/types.d.ts.map +1 -1
- package/dist/cli/ai-context.d.ts +10 -2
- package/dist/cli/ai-context.js +128 -61
- package/dist/cli/analyze-config.d.ts +1 -1
- package/dist/cli/analyze-options.d.ts +131 -0
- package/dist/cli/analyze-options.js +1 -0
- package/dist/cli/analyze.d.ts +25 -114
- package/dist/cli/analyze.js +194 -36
- package/dist/cli/cli-message.d.ts +1 -1
- package/dist/cli/detect-changes-format.js +19 -2
- package/dist/cli/doctor.d.ts +23 -0
- package/dist/cli/doctor.js +72 -9
- package/dist/cli/editor-targets.js +6 -0
- package/dist/cli/eval-server.d.ts +23 -1
- package/dist/cli/eval-server.js +128 -9
- package/dist/cli/format-symbol.d.ts +15 -0
- package/dist/cli/format-symbol.js +17 -0
- package/dist/cli/generated-skill.d.ts +17 -0
- package/dist/cli/generated-skill.js +1 -0
- package/dist/cli/group.js +23 -2
- package/dist/cli/help-i18n.js +3 -0
- package/dist/cli/i18n/en.d.ts +17 -8
- package/dist/cli/i18n/en.js +19 -8
- package/dist/cli/i18n/resources.d.ts +26 -8
- package/dist/cli/i18n/zh-CN.d.ts +9 -0
- package/dist/cli/i18n/zh-CN.js +17 -8
- package/dist/cli/index.js +16 -9
- package/dist/cli/lazy-action.d.ts +7 -0
- package/dist/cli/lazy-action.js +27 -0
- package/dist/cli/mcp.js +6 -3
- package/dist/cli/resolve-invocation.d.ts +7 -3
- package/dist/cli/resolve-invocation.js +7 -3
- package/dist/cli/setup.d.ts +8 -0
- package/dist/cli/setup.js +30 -7
- package/dist/cli/skill-gen.d.ts +1 -6
- package/dist/cli/skill-gen.js +88 -18
- package/dist/cli/standard-skills.d.ts +76 -0
- package/dist/cli/standard-skills.js +45 -0
- package/dist/cli/status.d.ts +4 -1
- package/dist/cli/status.js +57 -4
- package/dist/cli/tool.d.ts +1 -0
- package/dist/cli/tool.js +75 -7
- package/dist/cli/uninstall.js +7 -2
- package/dist/cli/wiki.d.ts +1 -0
- package/dist/cli/wiki.js +59 -10
- package/dist/config/ignore-service.d.ts +2 -0
- package/dist/config/ignore-service.js +31 -4
- package/dist/core/analysis-features.d.ts +21 -0
- package/dist/core/analysis-features.js +59 -0
- package/dist/core/analyzer-identity.d.ts +154 -0
- package/dist/core/analyzer-identity.js +2158 -0
- package/dist/core/augmentation/engine.js +95 -76
- package/dist/core/embedding-checkpoint.d.ts +143 -0
- package/dist/core/embedding-checkpoint.js +221 -0
- package/dist/core/embedding-count.d.ts +61 -0
- package/dist/core/embedding-count.js +69 -0
- package/dist/core/embeddings/ast-utils.js +9 -1
- package/dist/core/embeddings/embedder.d.ts +3 -2
- package/dist/core/embeddings/embedder.js +8 -5
- package/dist/core/embeddings/embedding-identity.d.ts +11 -0
- package/dist/core/embeddings/embedding-identity.js +24 -0
- package/dist/core/embeddings/embedding-pipeline.d.ts +24 -1
- package/dist/core/embeddings/embedding-pipeline.js +341 -19
- package/dist/core/embeddings/http-client.d.ts +10 -2
- package/dist/core/embeddings/http-client.js +282 -47
- package/dist/core/embeddings/node-module-compat.d.ts +4 -2
- package/dist/core/embeddings/node-module-compat.js +4 -2
- package/dist/core/embeddings/onnxruntime-common-resolver.js +5 -5
- package/dist/core/embeddings/onnxruntime-node-resolver.js +2 -2
- package/dist/core/embeddings/runtime-install.js +1 -1
- package/dist/core/git-staleness.js +1 -1
- package/dist/core/graph/graph.js +3 -0
- package/dist/core/graph/import-cycles.d.ts +194 -3
- package/dist/core/graph/import-cycles.js +522 -73
- package/dist/core/graph/types.d.ts +18 -0
- package/dist/core/group/bridge-db.js +5 -27
- package/dist/core/group/cross-impact.d.ts +21 -0
- package/dist/core/group/cross-impact.js +128 -15
- package/dist/core/group/cross-trace.js +27 -16
- package/dist/core/group/extractors/http-patterns/java.js +91 -14
- package/dist/core/group/extractors/http-patterns/node.js +19 -0
- package/dist/core/group/extractors/http-patterns/types.d.ts +8 -0
- package/dist/core/group/extractors/http-route-extractor.d.ts +1 -0
- package/dist/core/group/extractors/http-route-extractor.js +122 -48
- package/dist/core/group/extractors/include-extractor.js +20 -2
- package/dist/core/group/extractors/manifest-extractor.d.ts +1 -1
- package/dist/core/group/extractors/manifest-extractor.js +7 -7
- package/dist/core/group/service.js +10 -1
- package/dist/core/group/storage.js +2 -33
- package/dist/core/group/types.d.ts +18 -0
- package/dist/core/incremental/subgraph-extract.d.ts +9 -6
- package/dist/core/incremental/subgraph-extract.js +33 -10
- package/dist/core/index-freshness.d.ts +80 -0
- package/dist/core/index-freshness.js +120 -0
- package/dist/core/ingestion/call-processor.d.ts +13 -1
- package/dist/core/ingestion/call-processor.js +110 -3
- package/dist/core/ingestion/cfg/callee-cell-format.d.ts +42 -0
- package/dist/core/ingestion/cfg/callee-cell-format.js +42 -0
- package/dist/core/ingestion/cfg/emit.d.ts +8 -23
- package/dist/core/ingestion/cfg/emit.js +9 -23
- package/dist/core/ingestion/class-extractors/configs/go.js +10 -5
- package/dist/core/ingestion/class-extractors/configs/jvm.js +29 -0
- package/dist/core/ingestion/cluster-enricher.js +8 -4
- package/dist/core/ingestion/cobol/cobol-preprocessor.js +1 -1
- package/dist/core/ingestion/community-processor.d.ts +21 -3
- package/dist/core/ingestion/community-processor.js +88 -83
- package/dist/core/ingestion/di-extractors/index.d.ts +22 -34
- package/dist/core/ingestion/di-extractors/index.js +17 -18
- package/dist/core/ingestion/di-extractors/spring.d.ts +27 -5
- package/dist/core/ingestion/di-extractors/spring.js +87 -3
- package/dist/core/ingestion/di-extractors/types.d.ts +60 -0
- package/dist/core/ingestion/di-extractors/types.js +15 -0
- package/dist/core/ingestion/emit-references.js +4 -0
- package/dist/core/ingestion/filesystem-walker.js +16 -12
- package/dist/core/ingestion/finalize-orchestrator.js +1 -0
- package/dist/core/ingestion/frameworks/spring/analysis-features.d.ts +9 -0
- package/dist/core/ingestion/frameworks/spring/analysis-features.js +41 -0
- package/dist/core/ingestion/frameworks/spring/annotation-arguments.d.ts +13 -0
- package/dist/core/ingestion/frameworks/spring/annotation-arguments.js +227 -0
- package/dist/core/ingestion/frameworks/spring/aop-candidates.d.ts +15 -0
- package/dist/core/ingestion/frameworks/spring/aop-candidates.js +85 -0
- package/dist/core/ingestion/frameworks/spring/aop.d.ts +118 -0
- package/dist/core/ingestion/frameworks/spring/aop.js +476 -0
- package/dist/core/ingestion/frameworks/spring/auto-configuration.d.ts +8 -0
- package/dist/core/ingestion/frameworks/spring/auto-configuration.js +16 -0
- package/dist/core/ingestion/frameworks/spring/bean-candidates.d.ts +30 -0
- package/dist/core/ingestion/frameworks/spring/bean-candidates.js +182 -0
- package/dist/core/ingestion/frameworks/spring/bean-catalog.d.ts +12 -0
- package/dist/core/ingestion/frameworks/spring/bean-catalog.js +27 -0
- package/dist/core/ingestion/frameworks/spring/bean-factories.d.ts +33 -0
- package/dist/core/ingestion/frameworks/spring/bean-factories.js +65 -0
- package/dist/core/ingestion/frameworks/spring/conditionals.d.ts +25 -0
- package/dist/core/ingestion/frameworks/spring/conditionals.js +319 -0
- package/dist/core/ingestion/frameworks/spring/config-bindings.d.ts +24 -0
- package/dist/core/ingestion/frameworks/spring/config-bindings.js +115 -0
- package/dist/core/ingestion/frameworks/spring/di-metadata.d.ts +48 -0
- package/dist/core/ingestion/frameworks/spring/di-metadata.js +379 -0
- package/dist/core/ingestion/frameworks/spring/non-http-handlers.d.ts +28 -0
- package/dist/core/ingestion/frameworks/spring/non-http-handlers.js +152 -0
- package/dist/core/ingestion/frameworks/spring/resource-injection.d.ts +5 -0
- package/dist/core/ingestion/frameworks/spring/resource-injection.js +91 -0
- package/dist/core/ingestion/import-resolvers/configs/csharp.js +5 -1
- package/dist/core/ingestion/import-resolvers/configs/swift.js +13 -0
- package/dist/core/ingestion/import-resolvers/csharp.d.ts +9 -1
- package/dist/core/ingestion/import-resolvers/csharp.js +234 -27
- package/dist/core/ingestion/import-resolvers/go.d.ts +11 -1
- package/dist/core/ingestion/import-resolvers/go.js +44 -17
- package/dist/core/ingestion/import-resolvers/jvm.d.ts +2 -2
- package/dist/core/ingestion/import-resolvers/node-workspace-packages.d.ts +90 -0
- package/dist/core/ingestion/import-resolvers/node-workspace-packages.js +428 -0
- package/dist/core/ingestion/import-resolvers/package-dir-index.d.ts +124 -0
- package/dist/core/ingestion/import-resolvers/package-dir-index.js +223 -0
- package/dist/core/ingestion/import-resolvers/pass-cache.d.ts +50 -0
- package/dist/core/ingestion/import-resolvers/pass-cache.js +60 -0
- package/dist/core/ingestion/import-resolvers/per-file-set.d.ts +71 -0
- package/dist/core/ingestion/import-resolvers/per-file-set.js +11 -0
- package/dist/core/ingestion/import-resolvers/php.d.ts +1 -1
- package/dist/core/ingestion/import-resolvers/php.js +27 -8
- package/dist/core/ingestion/import-resolvers/python-file-index.d.ts +201 -0
- package/dist/core/ingestion/import-resolvers/python-file-index.js +302 -0
- package/dist/core/ingestion/import-resolvers/python.js +25 -6
- package/dist/core/ingestion/import-resolvers/ruby.d.ts +1 -1
- package/dist/core/ingestion/import-resolvers/rust.d.ts +2 -2
- package/dist/core/ingestion/import-resolvers/standard.d.ts +1 -1
- package/dist/core/ingestion/import-resolvers/types.d.ts +1 -12
- package/dist/core/ingestion/import-resolvers/utils.d.ts +65 -6
- package/dist/core/ingestion/import-resolvers/utils.js +215 -36
- package/dist/core/ingestion/import-resolvers/workspace-file-index.d.ts +72 -0
- package/dist/core/ingestion/import-resolvers/workspace-file-index.js +58 -0
- package/dist/core/ingestion/language-config.d.ts +20 -1
- package/dist/core/ingestion/language-config.js +18 -23
- package/dist/core/ingestion/language-provider.d.ts +133 -7
- package/dist/core/ingestion/languages/c/captures.js +63 -0
- package/dist/core/ingestion/languages/c/import-target.js +12 -16
- package/dist/core/ingestion/languages/c/query.js +17 -0
- package/dist/core/ingestion/languages/c/scope-resolver.js +26 -19
- package/dist/core/ingestion/languages/c/static-linkage.js +12 -16
- package/dist/core/ingestion/languages/c-cpp.js +13 -0
- package/dist/core/ingestion/languages/cobol/captures.js +93 -0
- package/dist/core/ingestion/languages/cobol/scope-resolver.js +34 -20
- package/dist/core/ingestion/languages/cobol.js +13 -0
- package/dist/core/ingestion/languages/cpp/adl.d.ts +2 -2
- package/dist/core/ingestion/languages/cpp/adl.js +67 -44
- package/dist/core/ingestion/languages/cpp/captures.js +222 -3
- package/dist/core/ingestion/languages/cpp/file-local-linkage.js +11 -15
- package/dist/core/ingestion/languages/cpp/inline-namespaces.d.ts +28 -8
- package/dist/core/ingestion/languages/cpp/inline-namespaces.js +242 -68
- package/dist/core/ingestion/languages/cpp/interpret.d.ts +2 -0
- package/dist/core/ingestion/languages/cpp/interpret.js +126 -6
- package/dist/core/ingestion/languages/cpp/query.js +106 -0
- package/dist/core/ingestion/languages/cpp/scope-resolver.js +62 -20
- package/dist/core/ingestion/languages/csharp/accessor-unwrap.d.ts +2 -15
- package/dist/core/ingestion/languages/csharp/accessor-unwrap.js +18 -10
- package/dist/core/ingestion/languages/csharp/captures.js +44 -0
- package/dist/core/ingestion/languages/csharp/import-target.js +46 -72
- package/dist/core/ingestion/languages/csharp/namespace-siblings.js +5 -1
- package/dist/core/ingestion/languages/csharp/query.js +25 -5
- package/dist/core/ingestion/languages/csharp/scope-resolver.js +75 -2
- package/dist/core/ingestion/languages/dart/captures.d.ts +10 -0
- package/dist/core/ingestion/languages/dart/captures.js +686 -16
- package/dist/core/ingestion/languages/dart/extension-type-preprocess.d.ts +7 -0
- package/dist/core/ingestion/languages/dart/extension-type-preprocess.js +30 -0
- package/dist/core/ingestion/languages/dart/import-target.js +32 -9
- package/dist/core/ingestion/languages/dart/index.d.ts +1 -1
- package/dist/core/ingestion/languages/dart/index.js +1 -1
- package/dist/core/ingestion/languages/dart/query.js +98 -1
- package/dist/core/ingestion/languages/dart/scope-resolver.js +14 -3
- package/dist/core/ingestion/languages/dart/simple-hooks.js +9 -0
- package/dist/core/ingestion/languages/dart.js +8 -1
- package/dist/core/ingestion/languages/go/captures.js +142 -3
- package/dist/core/ingestion/languages/go/generic-type-parameters.d.ts +31 -0
- package/dist/core/ingestion/languages/go/generic-type-parameters.js +140 -0
- package/dist/core/ingestion/languages/go/import-target.d.ts +3 -10
- package/dist/core/ingestion/languages/go/import-target.js +34 -30
- package/dist/core/ingestion/languages/go/index.d.ts +1 -1
- package/dist/core/ingestion/languages/go/interface-impls.d.ts +9 -1
- package/dist/core/ingestion/languages/go/interface-impls.js +693 -87
- package/dist/core/ingestion/languages/go/interpret.d.ts +2 -0
- package/dist/core/ingestion/languages/go/interpret.js +22 -8
- package/dist/core/ingestion/languages/go/method-owners.js +31 -12
- package/dist/core/ingestion/languages/go/package-clause.d.ts +46 -0
- package/dist/core/ingestion/languages/go/package-clause.js +75 -0
- package/dist/core/ingestion/languages/go/package-siblings.js +7 -11
- package/dist/core/ingestion/languages/go/query.js +56 -3
- package/dist/core/ingestion/languages/go/scope-resolver.js +39 -0
- package/dist/core/ingestion/languages/go.js +9 -0
- package/dist/core/ingestion/languages/java/analysis-features.d.ts +7 -0
- package/dist/core/ingestion/languages/java/analysis-features.js +25 -0
- package/dist/core/ingestion/languages/java/capture-side-channel.d.ts +38 -0
- package/dist/core/ingestion/languages/java/capture-side-channel.js +124 -0
- package/dist/core/ingestion/languages/java/captures.d.ts +4 -3
- package/dist/core/ingestion/languages/java/captures.js +321 -49
- package/dist/core/ingestion/languages/java/import-target.d.ts +49 -9
- package/dist/core/ingestion/languages/java/import-target.js +68 -88
- package/dist/core/ingestion/languages/java/interpret.js +3 -2
- package/dist/core/ingestion/languages/java/module-resolution.d.ts +62 -0
- package/dist/core/ingestion/languages/java/module-resolution.js +142 -0
- package/dist/core/ingestion/languages/java/package-facts.d.ts +5 -0
- package/dist/core/ingestion/languages/java/package-facts.js +9 -0
- package/dist/core/ingestion/languages/java/package-siblings.d.ts +3 -16
- package/dist/core/ingestion/languages/java/package-siblings.js +8 -147
- package/dist/core/ingestion/languages/java/query.js +39 -3
- package/dist/core/ingestion/languages/java/record-components.d.ts +14 -0
- package/dist/core/ingestion/languages/java/record-components.js +185 -0
- package/dist/core/ingestion/languages/java/scope-resolver.js +35 -2
- package/dist/core/ingestion/languages/java/spring-aop.d.ts +12 -0
- package/dist/core/ingestion/languages/java/spring-aop.js +49 -0
- package/dist/core/ingestion/languages/java/spring-bean-metadata.d.ts +2 -0
- package/dist/core/ingestion/languages/java/spring-bean-metadata.js +8 -0
- package/dist/core/ingestion/languages/java/spring-conditionals.d.ts +11 -0
- package/dist/core/ingestion/languages/java/spring-conditionals.js +48 -0
- package/dist/core/ingestion/languages/java/spring-config-bindings.d.ts +23 -0
- package/dist/core/ingestion/languages/java/spring-config-bindings.js +215 -0
- package/dist/core/ingestion/languages/java/spring-di.d.ts +20 -0
- package/dist/core/ingestion/languages/java/spring-di.js +160 -0
- package/dist/core/ingestion/languages/java/spring-non-http-handlers.d.ts +7 -0
- package/dist/core/ingestion/languages/java/spring-non-http-handlers.js +32 -0
- package/dist/core/ingestion/languages/java.js +76 -3
- package/dist/core/ingestion/languages/javascript/captures.d.ts +6 -1
- package/dist/core/ingestion/languages/javascript/captures.js +278 -4
- package/dist/core/ingestion/languages/javascript/import-target.d.ts +17 -21
- package/dist/core/ingestion/languages/javascript/import-target.js +24 -41
- package/dist/core/ingestion/languages/javascript/index.d.ts +54 -5
- package/dist/core/ingestion/languages/javascript/index.js +54 -5
- package/dist/core/ingestion/languages/javascript/query.d.ts +1 -0
- package/dist/core/ingestion/languages/javascript/query.js +232 -5
- package/dist/core/ingestion/languages/javascript/scope-resolver.js +12 -0
- package/dist/core/ingestion/languages/javascript/simple-hooks.js +2 -1
- package/dist/core/ingestion/languages/jvm/package-facts.d.ts +35 -0
- package/dist/core/ingestion/languages/jvm/package-facts.js +40 -0
- package/dist/core/ingestion/languages/jvm/package-siblings.d.ts +14 -0
- package/dist/core/ingestion/languages/jvm/package-siblings.js +197 -0
- package/dist/core/ingestion/languages/kotlin/capture-side-channel.d.ts +40 -3
- package/dist/core/ingestion/languages/kotlin/capture-side-channel.js +111 -8
- package/dist/core/ingestion/languages/kotlin/captures.js +112 -0
- package/dist/core/ingestion/languages/kotlin/import-target.d.ts +8 -1
- package/dist/core/ingestion/languages/kotlin/import-target.js +20 -123
- package/dist/core/ingestion/languages/kotlin/index.d.ts +1 -0
- package/dist/core/ingestion/languages/kotlin/index.js +1 -0
- package/dist/core/ingestion/languages/kotlin/module-resolution.d.ts +22 -0
- package/dist/core/ingestion/languages/kotlin/module-resolution.js +108 -0
- package/dist/core/ingestion/languages/kotlin/package-facts.d.ts +5 -0
- package/dist/core/ingestion/languages/kotlin/package-facts.js +9 -0
- package/dist/core/ingestion/languages/kotlin/package-siblings.d.ts +4 -0
- package/dist/core/ingestion/languages/kotlin/package-siblings.js +8 -0
- package/dist/core/ingestion/languages/kotlin/query.js +47 -2
- package/dist/core/ingestion/languages/kotlin/scope-resolver.js +36 -3
- package/dist/core/ingestion/languages/kotlin/spring-aop.d.ts +12 -0
- package/dist/core/ingestion/languages/kotlin/spring-aop.js +64 -0
- package/dist/core/ingestion/languages/kotlin/spring-bean-metadata.d.ts +2 -0
- package/dist/core/ingestion/languages/kotlin/spring-bean-metadata.js +8 -0
- package/dist/core/ingestion/languages/kotlin/spring-conditionals.d.ts +12 -0
- package/dist/core/ingestion/languages/kotlin/spring-conditionals.js +49 -0
- package/dist/core/ingestion/languages/kotlin/spring-di.d.ts +20 -0
- package/dist/core/ingestion/languages/kotlin/spring-di.js +299 -0
- package/dist/core/ingestion/languages/kotlin/spring-non-http-handlers.d.ts +10 -0
- package/dist/core/ingestion/languages/kotlin/spring-non-http-handlers.js +41 -0
- package/dist/core/ingestion/languages/kotlin.js +5 -6
- package/dist/core/ingestion/languages/php/captures.d.ts +5 -0
- package/dist/core/ingestion/languages/php/captures.js +359 -51
- package/dist/core/ingestion/languages/php/import-decomposer.js +12 -0
- package/dist/core/ingestion/languages/php/import-target.d.ts +2 -1
- package/dist/core/ingestion/languages/php/import-target.js +229 -7
- package/dist/core/ingestion/languages/php/interpret.js +10 -0
- package/dist/core/ingestion/languages/php/query.js +31 -0
- package/dist/core/ingestion/languages/php/scope-resolver.js +1 -1
- package/dist/core/ingestion/languages/python/arity-metadata.d.ts +1 -0
- package/dist/core/ingestion/languages/python/arity-metadata.js +1 -0
- package/dist/core/ingestion/languages/python/captures.d.ts +3 -4
- package/dist/core/ingestion/languages/python/captures.js +53 -5
- package/dist/core/ingestion/languages/python/import-decomposer.js +22 -1
- package/dist/core/ingestion/languages/python/import-target.d.ts +42 -1
- package/dist/core/ingestion/languages/python/import-target.js +277 -91
- package/dist/core/ingestion/languages/python/index.d.ts +1 -1
- package/dist/core/ingestion/languages/python/index.js +1 -1
- package/dist/core/ingestion/languages/python/interpret.d.ts +52 -0
- package/dist/core/ingestion/languages/python/interpret.js +249 -3
- package/dist/core/ingestion/languages/python/query.js +9 -0
- package/dist/core/ingestion/languages/python/receiver-binding.d.ts +17 -2
- package/dist/core/ingestion/languages/python/receiver-binding.js +192 -2
- package/dist/core/ingestion/languages/python/scope-resolver.js +27 -4
- package/dist/core/ingestion/languages/python/simple-hooks.d.ts +5 -5
- package/dist/core/ingestion/languages/python/simple-hooks.js +9 -5
- package/dist/core/ingestion/languages/ruby/captures.js +200 -0
- package/dist/core/ingestion/languages/ruby/import-target.js +7 -5
- package/dist/core/ingestion/languages/ruby/query.js +93 -0
- package/dist/core/ingestion/languages/ruby/scope-resolver.js +2 -0
- package/dist/core/ingestion/languages/ruby/simple-hooks.d.ts +1 -1
- package/dist/core/ingestion/languages/ruby/simple-hooks.js +22 -1
- package/dist/core/ingestion/languages/rust/captures.js +52 -1
- package/dist/core/ingestion/languages/rust/interpret.js +18 -0
- package/dist/core/ingestion/languages/rust/method-owners.js +11 -1
- package/dist/core/ingestion/languages/rust/module-path.d.ts +126 -0
- package/dist/core/ingestion/languages/rust/module-path.js +214 -0
- package/dist/core/ingestion/languages/rust/qualified-call.d.ts +41 -0
- package/dist/core/ingestion/languages/rust/qualified-call.js +481 -0
- package/dist/core/ingestion/languages/rust/query.js +48 -6
- package/dist/core/ingestion/languages/rust/range-binding.d.ts +1 -11
- package/dist/core/ingestion/languages/rust/range-binding.js +149 -63
- package/dist/core/ingestion/languages/rust/scope-resolver.js +21 -2
- package/dist/core/ingestion/languages/rust.js +17 -0
- package/dist/core/ingestion/languages/swift/captures.js +99 -3
- package/dist/core/ingestion/languages/swift/conditional-directive-preprocess.d.ts +48 -0
- package/dist/core/ingestion/languages/swift/conditional-directive-preprocess.js +253 -0
- package/dist/core/ingestion/languages/swift/import-target.js +4 -9
- package/dist/core/ingestion/languages/swift/query.js +17 -0
- package/dist/core/ingestion/languages/swift/receiver-binding.d.ts +8 -0
- package/dist/core/ingestion/languages/swift/receiver-binding.js +6 -2
- package/dist/core/ingestion/languages/swift.js +2 -0
- package/dist/core/ingestion/languages/typescript/captures.d.ts +90 -1
- package/dist/core/ingestion/languages/typescript/captures.js +288 -5
- package/dist/core/ingestion/languages/typescript/cjs-export-assignment.d.ts +134 -0
- package/dist/core/ingestion/languages/typescript/cjs-export-assignment.js +523 -0
- package/dist/core/ingestion/languages/typescript/cjs-module-exports.d.ts +54 -0
- package/dist/core/ingestion/languages/typescript/cjs-module-exports.js +191 -0
- package/dist/core/ingestion/languages/typescript/file-candidates.d.ts +29 -0
- package/dist/core/ingestion/languages/typescript/file-candidates.js +70 -0
- package/dist/core/ingestion/languages/typescript/import-decomposer.d.ts +28 -1
- package/dist/core/ingestion/languages/typescript/import-decomposer.js +125 -10
- package/dist/core/ingestion/languages/typescript/import-target.d.ts +25 -37
- package/dist/core/ingestion/languages/typescript/import-target.js +24 -26
- package/dist/core/ingestion/languages/typescript/interpret.d.ts +21 -1
- package/dist/core/ingestion/languages/typescript/interpret.js +45 -5
- package/dist/core/ingestion/languages/typescript/module-resolution.d.ts +48 -0
- package/dist/core/ingestion/languages/typescript/module-resolution.js +171 -0
- package/dist/core/ingestion/languages/typescript/nuxt-auto-imports.js +2 -1
- package/dist/core/ingestion/languages/typescript/query.d.ts +1 -0
- package/dist/core/ingestion/languages/typescript/query.js +340 -14
- package/dist/core/ingestion/languages/typescript/receiver-binding.d.ts +17 -0
- package/dist/core/ingestion/languages/typescript/receiver-binding.js +27 -0
- package/dist/core/ingestion/languages/typescript/scope-resolver.js +27 -40
- package/dist/core/ingestion/languages/typescript/simple-hooks.d.ts +0 -10
- package/dist/core/ingestion/languages/typescript/simple-hooks.js +22 -22
- package/dist/core/ingestion/languages/typescript/tsconfig.d.ts +59 -0
- package/dist/core/ingestion/languages/typescript/tsconfig.js +291 -0
- package/dist/core/ingestion/languages/typescript.js +87 -1
- package/dist/core/ingestion/languages/vue/import-target.d.ts +6 -22
- package/dist/core/ingestion/languages/vue/import-target.js +11 -47
- package/dist/core/ingestion/languages/vue/scope-resolver.js +4 -2
- package/dist/core/ingestion/local-symbol-pruner.js +11 -11
- package/dist/core/ingestion/method-extractors/configs/csharp.js +1 -0
- package/dist/core/ingestion/method-extractors/generic.js +1 -0
- package/dist/core/ingestion/method-types.d.ts +16 -0
- package/dist/core/ingestion/parsing-processor.js +32 -1
- package/dist/core/ingestion/pipeline-phases/di.d.ts +8 -33
- package/dist/core/ingestion/pipeline-phases/di.js +275 -157
- package/dist/core/ingestion/pipeline-phases/index.d.ts +3 -0
- package/dist/core/ingestion/pipeline-phases/index.js +3 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +15 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +158 -3
- package/dist/core/ingestion/pipeline-phases/parse.js +5 -0
- package/dist/core/ingestion/pipeline-phases/processes.d.ts +11 -2
- package/dist/core/ingestion/pipeline-phases/processes.js +102 -7
- package/dist/core/ingestion/pipeline-phases/routes.js +56 -10
- package/dist/core/ingestion/pipeline-phases/spring-aop.d.ts +34 -0
- package/dist/core/ingestion/pipeline-phases/spring-aop.js +439 -0
- package/dist/core/ingestion/pipeline-phases/spring-auto-configuration.d.ts +34 -0
- package/dist/core/ingestion/pipeline-phases/spring-auto-configuration.js +255 -0
- package/dist/core/ingestion/pipeline-phases/spring-config.d.ts +37 -0
- package/dist/core/ingestion/pipeline-phases/spring-config.js +433 -0
- package/dist/core/ingestion/pipeline-phases/types.d.ts +7 -0
- package/dist/core/ingestion/pipeline.d.ts +27 -3
- package/dist/core/ingestion/pipeline.js +62 -12
- package/dist/core/ingestion/process-processor.d.ts +109 -2
- package/dist/core/ingestion/process-processor.js +464 -52
- package/dist/core/ingestion/resolve-references.d.ts +6 -1
- package/dist/core/ingestion/resolve-references.js +78 -6
- package/dist/core/ingestion/route-extractors/data-route-table.d.ts +25 -0
- package/dist/core/ingestion/route-extractors/data-route-table.js +864 -0
- package/dist/core/ingestion/route-extractors/dispatch-guard.d.ts +96 -0
- package/dist/core/ingestion/route-extractors/dispatch-guard.js +1184 -0
- package/dist/core/ingestion/route-extractors/spring-shared.d.ts +11 -0
- package/dist/core/ingestion/route-extractors/spring-shared.js +89 -0
- package/dist/core/ingestion/route-extractors/spring.js +109 -24
- package/dist/core/ingestion/scope-extractor-bridge.js +9 -1
- package/dist/core/ingestion/scope-extractor.d.ts +22 -7
- package/dist/core/ingestion/scope-extractor.js +617 -59
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +381 -22
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.js +16 -5
- package/dist/core/ingestion/scope-resolution/graph-bridge/callee-id-sink.d.ts +7 -7
- package/dist/core/ingestion/scope-resolution/graph-bridge/callee-id-sink.js +8 -7
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.d.ts +15 -1
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.js +53 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/ids.d.ts +20 -15
- package/dist/core/ingestion/scope-resolution/graph-bridge/ids.js +275 -41
- package/dist/core/ingestion/scope-resolution/graph-bridge/imports-to-edges.d.ts +123 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/imports-to-edges.js +171 -17
- package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.d.ts +56 -1
- package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +130 -32
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.d.ts +30 -1
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.js +46 -3
- package/dist/core/ingestion/scope-resolution/passes/callable-value-flow.d.ts +64 -0
- package/dist/core/ingestion/scope-resolution/passes/callable-value-flow.js +1233 -0
- package/dist/core/ingestion/scope-resolution/passes/compound-receiver.d.ts +107 -5
- package/dist/core/ingestion/scope-resolution/passes/compound-receiver.js +590 -33
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +19 -4
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +160 -4
- package/dist/core/ingestion/scope-resolution/passes/imported-value-refs.d.ts +34 -0
- package/dist/core/ingestion/scope-resolution/passes/imported-value-refs.js +62 -0
- package/dist/core/ingestion/scope-resolution/passes/property-dispatch.d.ts +64 -0
- package/dist/core/ingestion/scope-resolution/passes/property-dispatch.js +118 -0
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.d.ts +109 -8
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.js +931 -92
- package/dist/core/ingestion/scope-resolution/passes/return-shape-members.d.ts +58 -0
- package/dist/core/ingestion/scope-resolution/passes/return-shape-members.js +458 -0
- package/dist/core/ingestion/scope-resolution/passes/unique-name-properties.d.ts +180 -0
- package/dist/core/ingestion/scope-resolution/passes/unique-name-properties.js +418 -0
- package/dist/core/ingestion/scope-resolution/pipeline/phase.d.ts +34 -0
- package/dist/core/ingestion/scope-resolution/pipeline/phase.js +82 -38
- package/dist/core/ingestion/scope-resolution/pipeline/run.d.ts +61 -1
- package/dist/core/ingestion/scope-resolution/pipeline/run.js +384 -48
- package/dist/core/ingestion/scope-resolution/resolution-outcome.d.ts +112 -2
- package/dist/core/ingestion/scope-resolution/resolution-outcome.js +38 -1
- package/dist/core/ingestion/scope-resolution/scope/namespace-targets.d.ts +25 -3
- package/dist/core/ingestion/scope-resolution/scope/namespace-targets.js +36 -16
- package/dist/core/ingestion/scope-resolution/scope/walkers.d.ts +210 -9
- package/dist/core/ingestion/scope-resolution/scope/walkers.js +968 -56
- package/dist/core/ingestion/scope-resolution/summary-maps.d.ts +28 -0
- package/dist/core/ingestion/scope-resolution/summary-maps.js +50 -0
- package/dist/core/ingestion/scope-resolution/undecided-satisfaction.d.ts +55 -0
- package/dist/core/ingestion/scope-resolution/undecided-satisfaction.js +37 -0
- package/dist/core/ingestion/scope-resolution/unresolved-receivers.d.ts +109 -0
- package/dist/core/ingestion/scope-resolution/unresolved-receivers.js +204 -0
- package/dist/core/ingestion/scope-resolution/utils/definition-id.d.ts +13 -0
- package/dist/core/ingestion/scope-resolution/utils/definition-id.js +19 -0
- package/dist/core/ingestion/scope-resolution/utils/generic-instantiation.d.ts +171 -0
- package/dist/core/ingestion/scope-resolution/utils/generic-instantiation.js +218 -0
- package/dist/core/ingestion/scope-resolution/workspace-index-types.d.ts +34 -0
- package/dist/core/ingestion/scope-resolution/workspace-index-types.js +15 -0
- package/dist/core/ingestion/scope-resolution/workspace-index.d.ts +7 -20
- package/dist/core/ingestion/taint/typescript-model.js +34 -2
- package/dist/core/ingestion/tree-sitter-queries.d.ts +11 -11
- package/dist/core/ingestion/tree-sitter-queries.js +688 -5
- package/dist/core/ingestion/type-env.js +11 -7
- package/dist/core/ingestion/type-extractors/jvm.js +17 -2
- package/dist/core/ingestion/type-extractors/shared.d.ts +17 -0
- package/dist/core/ingestion/type-extractors/shared.js +16 -0
- package/dist/core/ingestion/type-extractors/types.d.ts +12 -0
- package/dist/core/ingestion/type-extractors/typescript.d.ts +20 -0
- package/dist/core/ingestion/type-extractors/typescript.js +26 -0
- package/dist/core/ingestion/utils/ast-helpers.d.ts +311 -14
- package/dist/core/ingestion/utils/ast-helpers.js +745 -48
- package/dist/core/ingestion/utils/call-analysis.d.ts +27 -22
- package/dist/core/ingestion/utils/call-analysis.js +202 -7
- package/dist/core/ingestion/utils/callable-flow-captures.d.ts +153 -0
- package/dist/core/ingestion/utils/callable-flow-captures.js +928 -0
- package/dist/core/ingestion/utils/callable-labels.d.ts +25 -0
- package/dist/core/ingestion/utils/callable-labels.js +31 -0
- package/dist/core/ingestion/utils/effective-ram.d.ts +40 -0
- package/dist/core/ingestion/utils/effective-ram.js +58 -0
- package/dist/core/ingestion/utils/line-base.d.ts +14 -0
- package/dist/core/ingestion/utils/line-base.js +14 -0
- package/dist/core/ingestion/utils/method-props.d.ts +27 -4
- package/dist/core/ingestion/utils/method-props.js +29 -4
- package/dist/core/ingestion/utils/receiver-chain-captures.d.ts +31 -0
- package/dist/core/ingestion/utils/receiver-chain-captures.js +57 -0
- package/dist/core/ingestion/utils/receiver-chain-codec.d.ts +89 -0
- package/dist/core/ingestion/utils/receiver-chain-codec.js +182 -0
- package/dist/core/ingestion/utils/scope-tree-walk.d.ts +22 -0
- package/dist/core/ingestion/utils/scope-tree-walk.js +33 -0
- package/dist/core/ingestion/utils/template-arguments.d.ts +96 -0
- package/dist/core/ingestion/utils/template-arguments.js +196 -0
- package/dist/core/ingestion/utils/type-parameters.d.ts +49 -0
- package/dist/core/ingestion/utils/type-parameters.js +206 -0
- package/dist/core/ingestion/workers/callable-id.d.ts +72 -0
- package/dist/core/ingestion/workers/callable-id.js +116 -0
- package/dist/core/ingestion/workers/parse-worker.d.ts +14 -1
- package/dist/core/ingestion/workers/parse-worker.js +409 -39
- package/dist/core/ingestion/workers/worker-pool.d.ts +34 -27
- package/dist/core/ingestion/workers/worker-pool.js +133 -25
- package/dist/core/lbug/csv-generator.d.ts +27 -0
- package/dist/core/lbug/csv-generator.js +80 -17
- package/dist/core/lbug/extension-load-error.d.ts +2 -2
- package/dist/core/lbug/extension-load-error.js +44 -27
- package/dist/core/lbug/extension-loader.d.ts +29 -0
- package/dist/core/lbug/extension-loader.js +32 -7
- package/dist/core/lbug/graph-emit-sink.d.ts +264 -0
- package/dist/core/lbug/graph-emit-sink.js +581 -0
- package/dist/core/lbug/lbug-adapter.d.ts +337 -3
- package/dist/core/lbug/lbug-adapter.js +772 -67
- package/dist/core/lbug/lbug-config.d.ts +93 -6
- package/dist/core/lbug/lbug-config.js +269 -9
- package/dist/core/lbug/native-check.d.ts +39 -0
- package/dist/core/lbug/native-check.js +323 -46
- package/dist/core/lbug/pdg-emit-sink.d.ts +13 -4
- package/dist/core/lbug/pdg-emit-sink.js +21 -111
- package/dist/core/lbug/pool-adapter.d.ts +23 -1
- package/dist/core/lbug/pool-adapter.js +115 -7
- package/dist/core/lbug/query-batch.d.ts +75 -0
- package/dist/core/lbug/query-batch.js +102 -0
- package/dist/core/lbug/rel-pair-routing.d.ts +160 -2
- package/dist/core/lbug/rel-pair-routing.js +228 -10
- package/dist/core/lbug/schema.d.ts +162 -3
- package/dist/core/lbug/schema.js +392 -157
- package/dist/core/lbug/sidecar-recovery.d.ts +1 -0
- package/dist/core/lbug/sidecar-recovery.js +1 -1
- package/dist/core/lbug/sync-csv-writer.d.ts +47 -0
- package/dist/core/lbug/sync-csv-writer.js +108 -0
- package/dist/core/lbug/wal-checkpoint-driver.js +3 -0
- package/dist/core/platform/capabilities.d.ts +0 -1
- package/dist/core/platform/capabilities.js +12 -7
- package/dist/core/run-analyze.d.ts +150 -3
- package/dist/core/run-analyze.js +1562 -151
- package/dist/core/search/bm25-index.d.ts +11 -0
- package/dist/core/search/bm25-index.js +60 -26
- package/dist/core/search/fts-indexes.d.ts +167 -2
- package/dist/core/search/fts-indexes.js +264 -10
- package/dist/core/wiki/graph-queries.js +145 -112
- package/dist/core/wiki/llm-client.d.ts +37 -5
- package/dist/core/wiki/llm-client.js +88 -17
- package/dist/core/wiki/prompts.d.ts +19 -0
- package/dist/core/wiki/prompts.js +20 -1
- package/dist/lib/utils.d.ts +113 -0
- package/dist/lib/utils.js +185 -0
- package/dist/mcp/http-transport.d.ts +5 -0
- package/dist/mcp/http-transport.js +19 -5
- package/dist/mcp/local/aop-metadata.d.ts +77 -0
- package/dist/mcp/local/aop-metadata.js +227 -0
- package/dist/mcp/local/bean-metadata.d.ts +3 -0
- package/dist/mcp/local/bean-metadata.js +46 -0
- package/dist/mcp/local/local-backend.d.ts +167 -6
- package/dist/mcp/local/local-backend.js +1756 -405
- package/dist/mcp/local/path-predicate.d.ts +19 -0
- package/dist/mcp/local/path-predicate.js +21 -0
- package/dist/mcp/local/pdg-impact.d.ts +132 -10
- package/dist/mcp/local/pdg-impact.js +391 -98
- package/dist/mcp/output-budget.d.ts +5 -0
- package/dist/mcp/output-budget.js +52 -0
- package/dist/mcp/read-only-policy.d.ts +12 -0
- package/dist/mcp/read-only-policy.js +102 -0
- package/dist/mcp/repository-policy.d.ts +35 -0
- package/dist/mcp/repository-policy.js +333 -0
- package/dist/mcp/resources.js +34 -7
- package/dist/mcp/server.d.ts +5 -2
- package/dist/mcp/server.js +48 -18
- package/dist/mcp/tools.d.ts +8 -8
- package/dist/mcp/tools.js +91 -20
- package/dist/server/analyze-job.d.ts +40 -2
- package/dist/server/analyze-job.js +30 -2
- package/dist/server/analyze-launch.d.ts +1 -1
- package/dist/server/analyze-launch.js +79 -10
- package/dist/server/analyze-worker-core.d.ts +3 -2
- package/dist/server/analyze-worker-core.js +15 -3
- package/dist/server/analyze-worker-ipc.d.ts +1 -1
- package/dist/server/analyze-worker-ipc.js +4 -0
- package/dist/server/analyze-worker-protocol.d.ts +59 -0
- package/dist/server/analyze-worker-protocol.js +1 -0
- package/dist/server/analyze-worker.d.ts +1 -17
- package/dist/server/analyze-worker.js +29 -6
- package/dist/server/api.d.ts +2 -11
- package/dist/server/api.js +200 -155
- package/dist/server/embed-run-outcome.d.ts +89 -0
- package/dist/server/embed-run-outcome.js +88 -0
- package/dist/server/git-clone.js +6 -2
- package/dist/server/mcp-http.d.ts +1 -1
- package/dist/server/mcp-http.js +4 -2
- package/dist/server/middleware.d.ts +116 -9
- package/dist/server/middleware.js +291 -22
- package/dist/server/sse-progress.d.ts +41 -0
- package/dist/server/sse-progress.js +125 -0
- package/dist/server/upload-ingest.js +2 -1
- package/dist/server/validation.js +2 -1
- package/dist/storage/branch-index.d.ts +11 -6
- package/dist/storage/branch-index.js +15 -7
- package/dist/storage/file-hash.js +2 -2
- package/dist/storage/fs-atomic.d.ts +25 -0
- package/dist/storage/fs-atomic.js +42 -0
- package/dist/storage/git.d.ts +165 -0
- package/dist/storage/git.js +352 -3
- package/dist/storage/index-lock.d.ts +83 -0
- package/dist/storage/index-lock.js +654 -0
- package/dist/storage/parse-cache.js +482 -1
- package/dist/storage/parsedfile-store.d.ts +8 -0
- package/dist/storage/parsedfile-store.js +235 -1
- package/dist/storage/repo-manager.d.ts +29 -309
- package/dist/storage/repo-manager.js +187 -165
- package/dist/storage/repo-meta.d.ts +530 -0
- package/dist/storage/repo-meta.js +100 -0
- package/dist/types/pipeline.d.ts +37 -0
- package/hooks/antigravity/gitnexus-antigravity-hook.cjs +1 -1
- package/hooks/claude/gitnexus-hook.cjs +1 -1
- package/hooks/claude/resolve-analyze-cmd.cjs +80 -13
- package/package.json +20 -12
- package/scripts/cross-platform-shard.ts +143 -0
- package/scripts/cross-platform-tests.ts +94 -0
- package/scripts/ensure-fts.ts +14 -3
- package/scripts/run-cross-platform.ts +36 -10
- package/scripts/sync-plugin-manifests.mjs +192 -0
- package/skills/gitnexus-cli.md +3 -3
- package/skills/gitnexus-debugging.md +37 -7
- package/skills/gitnexus-exploring.md +26 -4
- package/skills/gitnexus-impact-analysis.md +71 -10
- package/skills/gitnexus-lfg/README.md +55 -0
- package/skills/gitnexus-lfg/SKILL.md +86 -0
- package/skills/gitnexus-plan/README.md +147 -0
- package/skills/gitnexus-plan/SKILL.md +348 -0
- package/skills/gitnexus-plan/references/context-ledger.md +137 -0
- package/skills/gitnexus-plan/references/context-pack.md +126 -0
- package/skills/gitnexus-plan/references/evidence-provenance.md +309 -0
- package/skills/gitnexus-plan/references/pdg-slice.md +109 -0
- package/skills/gitnexus-plan/references/plan-template.md +201 -0
- package/skills/gitnexus-plan/scripts/evidence-provenance.mjs +2366 -0
- package/skills/gitnexus-refactoring.md +48 -5
- package/skills/gitnexus-review/SKILL.md +279 -0
- package/skills/gitnexus-review/ci-personas/ci-adversarial-lens.md +42 -0
- package/skills/gitnexus-review/ci-personas/ci-blast-radius-lens.md +39 -0
- package/skills/gitnexus-review/ci-personas/ci-correctness-lens.md +37 -0
- package/skills/gitnexus-review/ci-personas/ci-coverage-lens.md +40 -0
- package/skills/gitnexus-review/ci-personas/ci-critic-lens.md +42 -0
- package/skills/gitnexus-review/ci-personas/ci-security-lens.md +39 -0
- package/skills/gitnexus-taint-analysis.md +13 -7
- package/skills/gitnexus-work/README.md +71 -0
- package/skills/gitnexus-work/SKILL.md +272 -0
- package/skills/gitnexus-work/references/evidence-provenance.md +309 -0
- package/skills/gitnexus-work/scripts/evidence-provenance.mjs +2366 -0
- package/vendor/leiden/utils.cjs +28 -1
- package/web/assets/ProcessFlowModal-Badh2Pbg.js +24 -0
- package/web/assets/__vite-browser-external-bMKyYQkO.js +1 -0
- package/web/assets/abnfDiagram-QNN2D4NM-Cq2djWWe.js +1 -0
- package/web/assets/agent-DIzEQ1JJ.js +626 -0
- package/web/assets/architecture-TIHT7OUA-V6N4J3SY-fTePvLoe.js +1 -0
- package/web/assets/architectureDiagram-OT7VKSJ7-mKEXxkeF.js +36 -0
- package/web/assets/blockDiagram-54WLDVWM-Dg_hrRWE.js +132 -0
- package/web/assets/{c4Diagram-Y2BXMSZH-DOXVs7-C.js → c4Diagram-X2LASM7V-CnhoT4aV.js} +6 -6
- package/web/assets/chunk-224SPVON-B8gxtXpy.js +1 -0
- package/web/assets/chunk-2AEHWXPW-CV4r6-1I.js +127 -0
- package/web/assets/chunk-2SREHG4O-Dip42xOq.js +1 -0
- package/web/assets/chunk-4RFN2BYJ-DHHWuC-n.js +1 -0
- package/web/assets/chunk-66DQ2XMT-CM0xjFAN.js +1 -0
- package/web/assets/chunk-6BELYETK-ChsYtfHW.js +1 -0
- package/web/assets/chunk-6L755F7B-CMhLBxi2.js +1 -0
- package/web/assets/chunk-7CWYLC5S-DRgGkkpF.js +2 -0
- package/web/assets/chunk-A7VWPJGB-B4O3oQdQ.js +1 -0
- package/web/assets/chunk-BI6VK774-D0oaWk8V.js +1 -0
- package/web/assets/chunk-D6VWDJW2-BxcBdZ9c.js +2 -0
- package/web/assets/chunk-DMV4VAQV-Bn6WXDSX.js +4 -0
- package/web/assets/chunk-E5QJAATJ-dh-5CtIV.js +2 -0
- package/web/assets/chunk-EQFTRU2I-1ix7TzW9.js +2 -0
- package/web/assets/chunk-FWYVLQTC-BgDItRzJ.js +1 -0
- package/web/assets/chunk-HNC4WDU7-DoU3KnA7.js +1 -0
- package/web/assets/chunk-L5GCOVLC-CE2w8Nm_.js +161 -0
- package/web/assets/chunk-LAHSG3N2-Bz4hcn0N.js +321 -0
- package/web/assets/chunk-LORZLZWG-B57uGw2N.js +88 -0
- package/web/assets/chunk-NLANEA3F-XpH_NPA5.js +62 -0
- package/web/assets/chunk-NV3KIAZN-5yvcpMiu.js +1 -0
- package/web/assets/chunk-OIYT25JQ-CQ6KOZGX.js +1 -0
- package/web/assets/chunk-PE7DX7ZZ-CCvRVj43.js +10 -0
- package/web/assets/chunk-Q67WD55A-BWCH2SVz.js +156 -0
- package/web/assets/chunk-RRFMTAIC-CMN0wcYA.js +1 -0
- package/web/assets/{chunk-RLI5ZMPA-CkXZ0y0U.js → chunk-SATU7PGQ-B1zhgOvc.js} +1 -1
- package/web/assets/chunk-STOV2HOB-GnExfzIX.js +1 -0
- package/web/assets/chunk-SZD42YQK-ijyKKVr1.js +70 -0
- package/web/assets/chunk-TFPGFQPA-Dj6a-0pC.js +231 -0
- package/web/assets/chunk-TGVD4F4B-BMc31Gj2.js +2 -0
- package/web/assets/chunk-TZUXEDM2-B7p9AcTw.js +1 -0
- package/web/assets/chunk-UAT7B5JY-DW-A_fpI.js +1 -0
- package/web/assets/{chunk-6764PJDD-C7xxk063.js → chunk-VE5CLXGZ-C1vB7wpY.js} +1 -1
- package/web/assets/chunk-VJFVEZTB-CX66F2ep.js +206 -0
- package/web/assets/chunk-VY5UBI4V-yxPQAWxw.js +1 -0
- package/web/assets/chunk-WJBAP47W-BckNkuEN.js +1 -0
- package/web/assets/chunk-XNMVGMAZ-Cg_LnPtj.js +1 -0
- package/web/assets/classDiagram-VPOSVPXH-BjOiXA_C.js +1 -0
- package/web/assets/classDiagram-v2-5VFNUXQA-BjOiXA_C.js +1 -0
- package/web/assets/{cose-bilkent-UX7MHV2Q-BmnZ7Mvj.js → cose-bilkent-RZA4XIPR-BHpK4Crp.js} +1 -1
- package/web/assets/cynefin-VYW2F7L2-2VAHYKR6-DAsF6GZv.js +1 -0
- package/web/assets/cynefinDiagram-TR7LZUCG-C3Iar9lZ.js +62 -0
- package/web/assets/dagre-K64A6Z3X-CUwi79mA.js +4 -0
- package/web/assets/diagram-2TLGJV2N-C2F5Nfym.js +30 -0
- package/web/assets/diagram-JCD7PQ7C-DC5-9FRr.js +24 -0
- package/web/assets/diagram-KFBZAVDW-Dfmf_4ti.js +3 -0
- package/web/assets/diagram-L7DVE3PN-GIRyVUtt.js +41 -0
- package/web/assets/diagram-YP3FGXHI-CyNFYtkd.js +24 -0
- package/web/assets/ebnfDiagram-DRHRQJWO-D8_CI4ZF.js +1 -0
- package/web/assets/erDiagram-SZLJLQMB-CohQjznC.js +85 -0
- package/web/assets/eventmodeling-45OFAUF4-AOUJWSLX-BvTc6iQi.js +1 -0
- package/web/assets/flowDiagram-BWE6NHOH-B6RnEvD9.js +1 -0
- package/web/assets/ganttDiagram-2QTCJSNI-Cks_mEcF.js +292 -0
- package/web/assets/gitGraph-TEB2WS4Q-U5VWYIBC-Dy7CCSZ5.js +1 -0
- package/web/assets/gitGraphDiagram-VVZAVV5G-CG41cIVc.js +106 -0
- package/web/assets/{index-B4eB4dNZ.js → index-BBNl0qfX.js} +51 -51
- package/web/assets/index-CJDpyH-n.css +2 -0
- package/web/assets/info-DKCQHKI2-DX6KST54-BLJg1ikX.js +1 -0
- package/web/assets/infoDiagram-FY4PZKRE-BJ3vPVwW.js +2 -0
- package/web/assets/{ishikawaDiagram-BNXS4ZKH-BLjivjXL.js → ishikawaDiagram-4JDSWWDM-DmqWtjkl.js} +6 -6
- package/web/assets/{journeyDiagram-M6C3CM3L-Cetgs3NH.js → journeyDiagram-QUS3FAKT-XAzVzrQW.js} +6 -6
- package/web/assets/{kanban-definition-75IXJCU3-DMlCaIpf.js → kanban-definition-D4L7SQKK-YurRnmYn.js} +27 -27
- package/web/assets/katex-C5OPUE3Q-Bnbavtmu.js +257 -0
- package/web/assets/{mindmap-definition-2TDM6QVE-B4GbXQBc.js → mindmap-definition-66QP5TD6-ChrWWnil.js} +29 -29
- package/web/assets/node-Ct_zna8U.js +8 -0
- package/web/assets/packet-7NZHBO7P-5WG45QPS-KUxcuvaA.js +1 -0
- package/web/assets/pegDiagram-YKIO5C6U-QGeQLEq2.js +1 -0
- package/web/assets/pie-RZYD4A2V-2OCZ2VTD-DPs08kJY.js +1 -0
- package/web/assets/pieDiagram-YPY3TKG5-BuT3MYzm.js +39 -0
- package/web/assets/preload-helper-Czpn1I53.js +1 -0
- package/web/assets/{quadrantDiagram-VICAPDV7-B1TQnlm0.js → quadrantDiagram-VO5QLCXA-B7098wSc.js} +6 -6
- package/web/assets/radar-I7S5WNFK-EPLSA35B-w5F0K3a7.js +1 -0
- package/web/assets/railroad-3IZDKUUU-PWFQV6Y6-Bu668yqY.js +1 -0
- package/web/assets/railroad-abnf-AHOZXSZD-JYYJX3BS-B6ghpETS.js +1 -0
- package/web/assets/railroad-ebnf-EBAXGLYW-RBZ4ONAP-D-XmHh3M.js +1 -0
- package/web/assets/railroad-peg-LSFZ7HO6-KHNPXGPG-mhkrhzEn.js +1 -0
- package/web/assets/railroadDiagram-M77LTMSB-AXu4vxk_.js +1 -0
- package/web/assets/requirementDiagram-RASO5HTO-B-l8InpK.js +84 -0
- package/web/assets/sankeyDiagram-F32LOJ6L-Kd7zjJgX.js +40 -0
- package/web/assets/sdk-CzHHH8tD.js +37 -0
- package/web/assets/sequenceDiagram-URATNSBD-BlcdY9DS.js +162 -0
- package/web/assets/sizeCapture-5GORAGP4-BEqQzsxs.js +1 -0
- package/web/assets/src-C5sx_gMp.js +1 -0
- package/web/assets/stateDiagram-DODFXNG5-DTdHc-fF.js +1 -0
- package/web/assets/stateDiagram-v2-JNMM5JRA-DioNLDDo.js +1 -0
- package/web/assets/swimlanes-OSWOYLSK-CA0ofdwY.js +2 -0
- package/web/assets/swimlanesDiagram-RHGX2RDE-PkwUdckC.js +8 -0
- package/web/assets/timeline-definition-WJXWRH4I-DUfp1R3E.js +120 -0
- package/web/assets/treeView-QDETBFTQ-EHYTSQNO-C5lpBgPm.js +1 -0
- package/web/assets/treemap-6X3UGDF4-CCWCF7EK-BB0ZyO-B.js +1 -0
- package/web/assets/vennDiagram-K3VCMQLI-Bj-FN-XS.js +34 -0
- package/web/assets/wardley-OPB4EBWU-6OWERDVT-CEA3Nq0j.js +1 -0
- package/web/assets/wardleyDiagram-XK6FUAWV-CVV0dHFr.js +78 -0
- package/web/assets/xychartDiagram-5VRUVLCW-CK_rbSWE.js +7 -0
- package/web/index.html +17 -15
- package/dist/core/ingestion/languages/python/index-stats.d.ts +0 -18
- package/dist/core/ingestion/languages/python/index-stats.js +0 -25
- package/skills/gitnexus-pr-review.md +0 -163
- package/web/assets/ProcessFlowModal-Dna7GkwO.js +0 -22
- package/web/assets/agent-DNYDy-KA.js +0 -660
- package/web/assets/architecture-7EHR7CIX-6QZW5X65-BVWFvYz2.js +0 -1
- package/web/assets/architectureDiagram-UL44E2DR-BU5ZRITg.js +0 -36
- package/web/assets/blockDiagram-7IZFK4PR-Dut1BpTV.js +0 -132
- package/web/assets/chunk-2T2R6R2M-pkw2oXHH.js +0 -4
- package/web/assets/chunk-2UTLFMKG-CXlhF3Pt.js +0 -1
- package/web/assets/chunk-3SSMPTDK-rPsRM1x0.js +0 -321
- package/web/assets/chunk-4R4BOZG6-Be_F0JoX.js +0 -159
- package/web/assets/chunk-67TQ5CYL-zxhDWgyF.js +0 -124
- package/web/assets/chunk-7J6CGLKN-AmkN8jJN.js +0 -10
- package/web/assets/chunk-C62D2QBJ-3gdL8EKc.js +0 -1
- package/web/assets/chunk-CEXFNPSA-CjwtMDkc.js +0 -1
- package/web/assets/chunk-INKRHTLW-D9BM9HWZ.js +0 -70
- package/web/assets/chunk-J5EP6P6S-L19oz55R.js +0 -1
- package/web/assets/chunk-KGFNY3KK-tD2F6wxK.js +0 -62
- package/web/assets/chunk-KGYTTC2M-zm6n242I.js +0 -1
- package/web/assets/chunk-KNLZD3CH-BGlP6X9R.js +0 -1
- package/web/assets/chunk-LCXTWHL2-Ba9JK-6F.js +0 -231
- package/web/assets/chunk-LII3EMHJ-EGx-eBIu.js +0 -1
- package/web/assets/chunk-LRIF4GLE-C3_PqUBq.js +0 -1
- package/web/assets/chunk-QA3QBVWF-D4cSJBf6.js +0 -2
- package/web/assets/chunk-RERM46MO-B5dAdWpP.js +0 -1
- package/web/assets/chunk-RG4AUYOV-OqBBMwuQ.js +0 -206
- package/web/assets/chunk-RKZBBQEN-MyIQbGgD.js +0 -1
- package/web/assets/chunk-T2UQINTJ-BJusEiGe.js +0 -1
- package/web/assets/chunk-UP6H54XL-BG-n7qDp.js +0 -1
- package/web/assets/chunk-UXSXWOXI-CW1_r5cS.js +0 -1
- package/web/assets/chunk-UY5QBCOK-BCpUlARQ.js +0 -1
- package/web/assets/chunk-VU6ZFW4Y-BeXVk45_.js +0 -2
- package/web/assets/chunk-ZXARS5L4-BI_qR2Nm.js +0 -1
- package/web/assets/classDiagram-KGZ6W3CR-D9zSIg0x.js +0 -1
- package/web/assets/classDiagram-v2-72OJOZXJ-D9zSIg0x.js +0 -1
- package/web/assets/dagre-ND4H6XIP-CpcV5kbl.js +0 -4
- package/web/assets/diagram-3NCE3AQN-6SMxBRpj.js +0 -43
- package/web/assets/diagram-GF46GFSD-BZEdNcRZ.js +0 -24
- package/web/assets/diagram-HNR7UZ2L-DxKW2a2Y.js +0 -3
- package/web/assets/diagram-QXG6HAR7-HfTHcXX_.js +0 -24
- package/web/assets/diagram-WEQXMOUZ-CyijUS8r.js +0 -10
- package/web/assets/erDiagram-L5TCEMPS-D0fvpWEX.js +0 -85
- package/web/assets/eventmodeling-FCH6USID-MREXMVOE-CgFBM7e-.js +0 -1
- package/web/assets/flowDiagram-H6V6AXG4-Bvr9bbhk.js +0 -162
- package/web/assets/ganttDiagram-JCBTUEKG-TzODrLzv.js +0 -292
- package/web/assets/gitGraph-WXDBUCRP-R675I2BI-DCJv7SII.js +0 -1
- package/web/assets/gitGraphDiagram-S2ZK5IYY-ONQSwJIY.js +0 -106
- package/web/assets/index-CX_fADmQ.css +0 -2
- package/web/assets/info-J43DQDTF-KCYPFFUO-BfNy-9Nd.js +0 -1
- package/web/assets/infoDiagram-3YFTVSEB-DIPVUIQ6.js +0 -2
- package/web/assets/katex-K3KEBU37-qRQBy-EZ.js +0 -261
- package/web/assets/packet-YPE3B663-LP52Z2RK-D4qkeG9k.js +0 -1
- package/web/assets/pie-LRSECV5Y-TCRJHUBD-B_yMKyQa.js +0 -1
- package/web/assets/pieDiagram-CU6KROY3-D3YC_xyg.js +0 -30
- package/web/assets/radar-GUYGQ44K-RDLRG3WG-DeD6yN_0.js +0 -1
- package/web/assets/requirementDiagram-JXO7QTGE-f8wczLQf.js +0 -84
- package/web/assets/sankeyDiagram-URQDO5SZ-BTxzG5j0.js +0 -40
- package/web/assets/sequenceDiagram-VS2MUI6T-DuamM-IR.js +0 -162
- package/web/assets/src-BNCXICdA.js +0 -1
- package/web/assets/stateDiagram-7D4R322I-Ch2pEUcw.js +0 -1
- package/web/assets/stateDiagram-v2-36443NZ5-7ANuoZLL.js +0 -1
- package/web/assets/timeline-definition-O6YCAMPW-07BR8R8G.js +0 -120
- package/web/assets/treeView-BLDUP644-QA4HXRO3-CDuSYnd4.js +0 -1
- package/web/assets/treemap-LRROVOQU-LLAWBHMP-imazucyJ.js +0 -1
- package/web/assets/vennDiagram-MWXL3ELB-BQX2ossk.js +0 -34
- package/web/assets/wardley-L42UT6IY-5TKZOOLJ-DqrT9tB8.js +0 -1
- package/web/assets/wardleyDiagram-CUQ6CDDI-CGIJBBiK.js +0 -78
- package/web/assets/xychartDiagram-N2JHSOCM-B3HNMuWp.js +0 -7
- /package/web/assets/{chunk-7W6UQGC5-pyKGssV3.js → chunk-LIEV3EAG-pyKGssV3.js} +0 -0
package/dist/mcp/server.js
CHANGED
|
@@ -14,9 +14,12 @@ import { createRequire } from 'module';
|
|
|
14
14
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
15
15
|
import { CompatibleStdioServerTransport } from './compatible-stdio-transport.js';
|
|
16
16
|
import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, ListResourceTemplatesRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
17
|
-
import { GITNEXUS_TOOLS } from './tools.js';
|
|
17
|
+
import { GITNEXUS_TOOLS, REPO_SCOPED_TOOLS } from './tools.js';
|
|
18
18
|
import { installGlobalStdoutSentinel } from './stdio-context.js';
|
|
19
19
|
import { getResourceDefinitions, getResourceTemplates, readResource } from './resources.js';
|
|
20
|
+
import { assertMcpReadOnlyResource, assertMcpReadOnlyToolCall, filterMcpReadOnlyResourceContent, MCP_READ_ONLY_TOOLS, readOnlyResourceTemplateAllowed, resolveMcpReadOnlyMode, toolForReadOnlyMcp, } from './read-only-policy.js';
|
|
21
|
+
import { createMcpRepositoryPolicy, McpRepositoryPolicy, mcpRepositoryPolicyConfigured, } from './repository-policy.js';
|
|
22
|
+
import { applyMcpMaxTokens, resolveMcpMaxTokens, withoutMcpBudgetArg } from './output-budget.js';
|
|
20
23
|
/**
|
|
21
24
|
* Next-step hints appended to tool responses.
|
|
22
25
|
*
|
|
@@ -60,7 +63,13 @@ function getNextStepHint(toolName, args) {
|
|
|
60
63
|
* Create a configured MCP Server with all handlers registered.
|
|
61
64
|
* Transport-agnostic — caller connects the desired transport.
|
|
62
65
|
*/
|
|
63
|
-
export function createMCPServer(backend) {
|
|
66
|
+
export function createMCPServer(backend, options = {}) {
|
|
67
|
+
const readOnly = resolveMcpReadOnlyMode();
|
|
68
|
+
if (!options.repositoryPolicy && mcpRepositoryPolicyConfigured()) {
|
|
69
|
+
throw new Error('Configured MCP repository policy must be validated before server creation.');
|
|
70
|
+
}
|
|
71
|
+
const repositoryPolicy = options.repositoryPolicy ?? McpRepositoryPolicy.unrestricted();
|
|
72
|
+
const scopedBackend = repositoryPolicy.scopeBackend(backend);
|
|
64
73
|
const require = createRequire(import.meta.url);
|
|
65
74
|
const pkgVersion = require('../../package.json').version;
|
|
66
75
|
const server = new Server({
|
|
@@ -87,7 +96,8 @@ export function createMCPServer(backend) {
|
|
|
87
96
|
});
|
|
88
97
|
// Handle list resource templates request (for dynamic resources)
|
|
89
98
|
server.setRequestHandler(ListResourceTemplatesRequestSchema, async () => {
|
|
90
|
-
const templates = getResourceTemplates()
|
|
99
|
+
const templates = getResourceTemplates().filter((template) => readOnlyResourceTemplateAllowed(template.uriTemplate, readOnly) &&
|
|
100
|
+
repositoryPolicy.resourceTemplateAllowed(template.uriTemplate));
|
|
91
101
|
return {
|
|
92
102
|
resourceTemplates: templates.map((t) => ({
|
|
93
103
|
uriTemplate: t.uriTemplate,
|
|
@@ -101,7 +111,9 @@ export function createMCPServer(backend) {
|
|
|
101
111
|
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
102
112
|
const { uri } = request.params;
|
|
103
113
|
try {
|
|
104
|
-
|
|
114
|
+
assertMcpReadOnlyResource(uri, readOnly);
|
|
115
|
+
repositoryPolicy.assertResourceUri(uri);
|
|
116
|
+
const content = filterMcpReadOnlyResourceContent(await readResource(uri, scopedBackend), readOnly);
|
|
105
117
|
return {
|
|
106
118
|
contents: [
|
|
107
119
|
{
|
|
@@ -124,27 +136,44 @@ export function createMCPServer(backend) {
|
|
|
124
136
|
};
|
|
125
137
|
}
|
|
126
138
|
});
|
|
127
|
-
//
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
139
|
+
// With multiple visible repositories and no process-wide default, make the
|
|
140
|
+
// routing requirement machine-readable. Agents then supply `repo` before the
|
|
141
|
+
// call instead of discovering the ambiguity through a failed tool response.
|
|
142
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
143
|
+
const requireRepo = await repositoryPolicy.requiresExplicitRepo(backend);
|
|
144
|
+
return {
|
|
145
|
+
tools: GITNEXUS_TOOLS.filter((tool) => (!readOnly || MCP_READ_ONLY_TOOLS.has(tool.name)) &&
|
|
146
|
+
repositoryPolicy.toolAllowed(tool.name))
|
|
147
|
+
.map((tool) => toolForReadOnlyMcp(repositoryPolicy.toolForMcp(tool), readOnly))
|
|
148
|
+
.map((tool) => ({
|
|
149
|
+
name: tool.name,
|
|
150
|
+
description: tool.description,
|
|
151
|
+
inputSchema: requireRepo && REPO_SCOPED_TOOLS.has(tool.name)
|
|
152
|
+
? {
|
|
153
|
+
...tool.inputSchema,
|
|
154
|
+
required: [...new Set([...tool.inputSchema.required, 'repo'])],
|
|
155
|
+
}
|
|
156
|
+
: tool.inputSchema,
|
|
157
|
+
annotations: tool.annotations,
|
|
158
|
+
})),
|
|
159
|
+
};
|
|
160
|
+
});
|
|
136
161
|
// Handle tool calls — append next-step hints to guide agent workflow
|
|
137
162
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
138
163
|
const { name, arguments: args } = request.params;
|
|
164
|
+
let maxTokens;
|
|
139
165
|
try {
|
|
140
|
-
const
|
|
166
|
+
const typedArgs = args;
|
|
167
|
+
assertMcpReadOnlyToolCall(name, typedArgs, readOnly);
|
|
168
|
+
maxTokens = resolveMcpMaxTokens(name, typedArgs);
|
|
169
|
+
const result = await scopedBackend.callTool(name, withoutMcpBudgetArg(typedArgs));
|
|
141
170
|
const resultText = typeof result === 'string' ? result : JSON.stringify(result, null, 2);
|
|
142
171
|
const hint = getNextStepHint(name, args);
|
|
143
172
|
return {
|
|
144
173
|
content: [
|
|
145
174
|
{
|
|
146
175
|
type: 'text',
|
|
147
|
-
text: resultText + hint,
|
|
176
|
+
text: applyMcpMaxTokens(resultText + hint, maxTokens),
|
|
148
177
|
},
|
|
149
178
|
],
|
|
150
179
|
};
|
|
@@ -155,7 +184,7 @@ export function createMCPServer(backend) {
|
|
|
155
184
|
content: [
|
|
156
185
|
{
|
|
157
186
|
type: 'text',
|
|
158
|
-
text: `Error: ${message}`,
|
|
187
|
+
text: applyMcpMaxTokens(`Error: ${message}`, maxTokens),
|
|
159
188
|
},
|
|
160
189
|
],
|
|
161
190
|
isError: true,
|
|
@@ -265,8 +294,9 @@ export function installSignalShutdown(shutdown, on = (event, listener) => {
|
|
|
265
294
|
on('SIGINT', () => void shutdown(SHUTDOWN_EXIT_CODES.SIGINT));
|
|
266
295
|
on('SIGTERM', () => void shutdown(SHUTDOWN_EXIT_CODES.SIGTERM));
|
|
267
296
|
}
|
|
268
|
-
export async function startMCPServer(backend) {
|
|
269
|
-
const
|
|
297
|
+
export async function startMCPServer(backend, repositoryPolicy) {
|
|
298
|
+
const validatedRepositoryPolicy = repositoryPolicy ?? (await createMcpRepositoryPolicy(backend));
|
|
299
|
+
const server = createMCPServer(backend, { repositoryPolicy: validatedRepositoryPolicy });
|
|
270
300
|
// Idempotent global sentinel install. cli/mcp.ts calls this first thing
|
|
271
301
|
// (before warnMissingOptionalGrammars / backend.init can emit to stdout);
|
|
272
302
|
// calling again here is a safety net for direct callers of startMCPServer
|
package/dist/mcp/tools.d.ts
CHANGED
|
@@ -24,14 +24,6 @@ export interface ToolDefinition {
|
|
|
24
24
|
minLength?: number;
|
|
25
25
|
}>;
|
|
26
26
|
required: string[];
|
|
27
|
-
/**
|
|
28
|
-
* JSON-Schema `anyOf` for cross-property constraints `required` cannot express
|
|
29
|
-
* — e.g. "at least one of route/file". Forwarded verbatim to clients by the
|
|
30
|
-
* server's ListTools handler, so MCP clients see the constraint.
|
|
31
|
-
*/
|
|
32
|
-
anyOf?: Array<{
|
|
33
|
-
required: string[];
|
|
34
|
-
}>;
|
|
35
27
|
};
|
|
36
28
|
}
|
|
37
29
|
/**
|
|
@@ -57,3 +49,11 @@ export declare const PDG_QUERY_DEFAULT_LIMIT = 50;
|
|
|
57
49
|
export declare const PDG_QUERY_MAX_LIMIT = 200;
|
|
58
50
|
export declare const IMPACT_MAX_DEPTH = 32;
|
|
59
51
|
export declare const GITNEXUS_TOOLS: ToolDefinition[];
|
|
52
|
+
/**
|
|
53
|
+
* Per-repo tools that accept an optional `branch` scope (#2106). Single source
|
|
54
|
+
* of truth: the schema property is injected here so it cannot drift from the
|
|
55
|
+
* server-side default in `local-backend.ts` (`resolveRepo(repo, branch)`).
|
|
56
|
+
* `list_repos` and the `group_*` tools are intentionally excluded — they are
|
|
57
|
+
* not single-repo, single-branch operations.
|
|
58
|
+
*/
|
|
59
|
+
export declare const REPO_SCOPED_TOOLS: Set<string>;
|
package/dist/mcp/tools.js
CHANGED
|
@@ -141,6 +141,11 @@ SERVICE: optional monorepo path prefix (POSIX-style, case-sensitive segments). W
|
|
|
141
141
|
description: 'Include full symbol source code (default: false)',
|
|
142
142
|
default: false,
|
|
143
143
|
},
|
|
144
|
+
maxTokens: {
|
|
145
|
+
type: 'integer',
|
|
146
|
+
minimum: 1,
|
|
147
|
+
description: 'Maximum estimated tokens in the complete formatted MCP response. Explicit request overrides GITNEXUS_MCP_DEFAULT_MAX_TOKENS.',
|
|
148
|
+
},
|
|
144
149
|
repo: {
|
|
145
150
|
type: 'string',
|
|
146
151
|
description: 'Indexed repository name or path, or group mode "@<groupName>" / "@<groupName>/<memberPath>" (member path keys from group.yaml). Omit when only one indexed repo exists.',
|
|
@@ -190,8 +195,8 @@ EXAMPLES:
|
|
|
190
195
|
• Find method overrides (MRO resolution):
|
|
191
196
|
MATCH (winner:Method)-[r:CodeRelation {type: 'METHOD_OVERRIDES'}]->(loser:Method) RETURN winner.name, winner.filePath, loser.filePath, r.reason
|
|
192
197
|
|
|
193
|
-
• Find DI-injected
|
|
194
|
-
MATCH (c:Class {name: 'OrderService'})-[r:CodeRelation]->(
|
|
198
|
+
• Find DI-injected providers (provider Classes or synthetic factory declarations):
|
|
199
|
+
MATCH (c:Class {name: 'OrderService'})-[r:CodeRelation]->(provider) WHERE r.type = 'INJECTS' RETURN provider.name, r.reason
|
|
195
200
|
|
|
196
201
|
• Detect diamond inheritance:
|
|
197
202
|
MATCH (d:Class)-[:CodeRelation {type: 'EXTENDS'}]->(b1), (d)-[:CodeRelation {type: 'EXTENDS'}]->(b2), (b1)-[:CodeRelation {type: 'EXTENDS'}]->(a), (b2)-[:CodeRelation {type: 'EXTENDS'}]->(a) WHERE b1 <> b2 RETURN d.name, b1.name, b2.name, a.name
|
|
@@ -236,10 +241,20 @@ Shows categorized incoming/outgoing references (calls, imports, extends, impleme
|
|
|
236
241
|
WHEN TO USE: After query() to understand a specific symbol in depth. When you need to know all callers, callees, and what execution flows a symbol participates in.
|
|
237
242
|
AFTER THIS: Use impact() if planning changes, or READ gitnexus://repo/{name}/process/{processName} for full execution trace.
|
|
238
243
|
|
|
239
|
-
Handles disambiguation: if multiple symbols share the same name, returns ranked candidates (each with a relevance score) for you to pick from. Use uid for zero-ambiguity lookup, or narrow the search with file_path and/or kind hints.
|
|
244
|
+
Handles disambiguation: if multiple symbols share the same name, returns ranked candidates (each with a relevance score) for you to pick from. Use uid for zero-ambiguity lookup, or narrow the search with file_path and/or kind hints. The ambiguous response carries totalCandidates — the TRUE match count, not candidates[].length — plus candidatesTruncated:true and a "(showing M)" suffix on message when candidates[] is the shorter window.
|
|
240
245
|
|
|
241
246
|
NOTE: ACCESSES edges (field read/write tracking) are included in context results with reason 'read' or 'write'. CALLS edges resolve through field access chains and method-call chains (e.g., user.address.getCity().save() produces CALLS edges at each step).
|
|
242
247
|
|
|
248
|
+
COMPLETENESS OF incoming: alongside symbol/incoming/outgoing the result carries the same epistemic envelope impact() returns:
|
|
249
|
+
- epistemic: 'exact' | 'lower-bound' — 'lower-bound' means callers exist that this view provably does not list.
|
|
250
|
+
- boundaries: string[] — one plain-language sentence per reason. Prose for humans; branch on causes instead.
|
|
251
|
+
- causes: { receiverTyping, dispatchBoundary, externalBoundary, undecidedSatisfaction } — machine-readable WHY. Every field counts MISSING THINGS, never sentences:
|
|
252
|
+
- causes.receiverTyping (unit: call sites) > 0 — RESOLVER GAP: the analyzer dropped that many call sites on this name because it could not type the receiver, so they are missing from incoming. Do not read an absent caller as proof none exists.
|
|
253
|
+
- causes.externalBoundary (unit: call sites) > 0 — the calls left the indexed program (System.out.println, fetch(...)). NOT a defect: no in-graph node could have been reached. An epistemic:'exact' result can carry this.
|
|
254
|
+
- causes.dispatchBoundary (unit: symbols) > 0 — DI / interface dispatch: implementations plus interface-level consumers behind a boundary static analysis cannot cross. Irreducible.
|
|
255
|
+
|
|
256
|
+
REQUIRES RE-INDEX: causes.receiverTyping and causes.externalBoundary come from index-time metadata only a current analyzer writes; against an older index they read as absent/0, which is indistinguishable from "nothing was dropped". Re-run \`gitnexus analyze\` before trusting a zero there.
|
|
257
|
+
|
|
243
258
|
GROUP MODE: set "repo" to "@<groupName>" to run context in each member repo (aggregated list), or "@<groupName>/<groupRepoPath>" for one member. If you use "@<groupName>" only, the member defaults to the lexicographically first key in group.yaml "repos".
|
|
244
259
|
|
|
245
260
|
SERVICE: optional monorepo path prefix (case-sensitive path segments). When "repo" starts with "@", prefix-matches resolved symbol file paths; when a hit is outside the prefix, that member returns an empty payload for the symbol. Ignored for a normal indexed repo name.`,
|
|
@@ -253,6 +268,10 @@ SERVICE: optional monorepo path prefix (case-sensitive path segments). When "rep
|
|
|
253
268
|
description: 'Direct symbol UID from prior tool results (zero-ambiguity lookup)',
|
|
254
269
|
},
|
|
255
270
|
file_path: { type: 'string', description: 'File path to disambiguate common names' },
|
|
271
|
+
file: {
|
|
272
|
+
type: 'string',
|
|
273
|
+
description: 'Compatibility alias for file_path; values must agree when both are present',
|
|
274
|
+
},
|
|
256
275
|
kind: {
|
|
257
276
|
type: 'string',
|
|
258
277
|
description: "Kind filter to disambiguate common names (e.g. 'Function', 'Class', 'Method', 'Interface', 'Constructor')",
|
|
@@ -262,6 +281,11 @@ SERVICE: optional monorepo path prefix (case-sensitive path segments). When "rep
|
|
|
262
281
|
description: 'Include full symbol source code (default: false)',
|
|
263
282
|
default: false,
|
|
264
283
|
},
|
|
284
|
+
maxTokens: {
|
|
285
|
+
type: 'integer',
|
|
286
|
+
minimum: 1,
|
|
287
|
+
description: 'Maximum estimated tokens in the complete formatted MCP response. Explicit request overrides GITNEXUS_MCP_DEFAULT_MAX_TOKENS.',
|
|
288
|
+
},
|
|
265
289
|
repo: {
|
|
266
290
|
type: 'string',
|
|
267
291
|
description: 'Indexed repository name or path, or group mode "@<groupName>" / "@<groupName>/<memberPath>". Omit if only one repo is indexed.',
|
|
@@ -285,7 +309,9 @@ AFTER THIS: Review affected processes. Use context() on high-risk symbols. READ
|
|
|
285
309
|
|
|
286
310
|
GIT WORKTREE SUPPORT: GitNexus automatically detects when the MCP server was launched from inside a linked git worktree and runs git diff against that worktree — no extra parameters needed in the common case. Pass "worktree" explicitly only when the server was started from a different directory than the worktree you are editing (e.g., the server runs from the canonical root but your changes are in a linked worktree at a different path).
|
|
287
311
|
|
|
288
|
-
Returns: changed symbols, affected processes, and a risk summary
|
|
312
|
+
Returns: changed symbols, affected processes, and a risk summary.
|
|
313
|
+
- partial: true — a step failed and was swallowed, so the result is incomplete and risk_level is "unknown" instead of a ranked level. Two causes, with different blast radii: the symbol query (or an unparseable diff) degrades everything — changed_symbols, both counts, and the processes derived from them — while a failed process lookup degrades only affected_processes and the risk read off it, leaving the changed-symbol counts sound. changed_count:0 with partial:true is NOT a clean pre-commit check; re-run before treating the diff as safe.
|
|
314
|
+
- truncated: true — the changed_symbols LISTING was capped for this response. summary.changed_count counts every symbol the run observed: the true total normally, a LOWER BOUND when partial:true. Compare it with the array length rather than trusting the array.`,
|
|
289
315
|
annotations: READ_ONLY_TOOL_ANNOTATIONS,
|
|
290
316
|
inputSchema: {
|
|
291
317
|
type: 'object',
|
|
@@ -316,8 +342,24 @@ Returns: changed symbols, affected processes, and a risk summary.`,
|
|
|
316
342
|
name: 'check',
|
|
317
343
|
description: `Run read-only structural checks against the indexed graph.
|
|
318
344
|
|
|
319
|
-
Currently detects directed cycles between File nodes connected by IMPORTS edges
|
|
320
|
-
|
|
345
|
+
Currently detects directed cycles between File nodes connected by IMPORTS edges, counting only
|
|
346
|
+
edges that force a module-initialization order — a deferred import (\`import()\`, or one written
|
|
347
|
+
inside a function body) and a TypeScript \`import type\` are excluded, because neither can make the
|
|
348
|
+
modules impossible to initialize.
|
|
349
|
+
|
|
350
|
+
READ \`enumeration\` BEFORE \`cycleCount\`:
|
|
351
|
+
- \`enumeration: 'complete'\` — every elementary cycle is listed; \`cycleCount\` is their number.
|
|
352
|
+
- \`enumeration: 'component-representatives'\` — the full enumeration exceeded a safety limit, so
|
|
353
|
+
\`cycles\` holds ONE representative per circular component, \`truncated\` is true, and
|
|
354
|
+
\`cycleCount\` is **null**. Do not compare \`cycleCount\` numerically here: \`null > 0\` is false,
|
|
355
|
+
so a caller keying on it alone concludes "clean" on exactly the most tangled repositories. Use
|
|
356
|
+
\`status === 'cycles_found'\`.
|
|
357
|
+
|
|
358
|
+
\`componentCount\` (independent circular components) is present in both modes and is the number to
|
|
359
|
+
act on and to trend: cutting one import can remove thousands of elementary cycles at once, so
|
|
360
|
+
\`cycleCount\` swings wildly for small changes while \`componentCount\` stays stable.
|
|
361
|
+
|
|
362
|
+
A graph too large to analyze at all returns \`{ error, truncated: true }\` with no \`status\`.`,
|
|
321
363
|
annotations: READ_ONLY_TOOL_ANNOTATIONS,
|
|
322
364
|
inputSchema: {
|
|
323
365
|
type: 'object',
|
|
@@ -345,7 +387,9 @@ AFTER THIS: Run detect_changes() to verify no unexpected side effects.
|
|
|
345
387
|
|
|
346
388
|
Each edit is tagged with confidence:
|
|
347
389
|
- "graph": found via knowledge graph relationships (high confidence, safe to accept)
|
|
348
|
-
- "text_search": found via regex text search (lower confidence, review carefully)
|
|
390
|
+
- "text_search": found via regex text search (lower confidence, review carefully)
|
|
391
|
+
|
|
392
|
+
Handles disambiguation via context()'s payload verbatim: an ambiguous symbol_name returns status "ambiguous" with ranked candidates and totalCandidates — the TRUE match count, not candidates[].length — plus candidatesTruncated:true and a "(showing M)" suffix on message when candidates[] is the shorter window. Re-call with symbol_uid.`,
|
|
349
393
|
annotations: DESTRUCTIVE_TOOL_ANNOTATIONS,
|
|
350
394
|
inputSchema: {
|
|
351
395
|
type: 'object',
|
|
@@ -379,17 +423,28 @@ MODE (opt-in): "callgraph" (default) walks symbol→symbol edges (CALLS/IMPORTS/
|
|
|
379
423
|
|
|
380
424
|
STATEMENT-ANCHORED PDG SLICE: with mode:'pdg', pass "line" (1-based source line within the target symbol) to seed the dependence slice on the statement at that line and return what depends on it in affectedStatements (line + text). Inter-procedural symbols are still reported through interproceduralByDepth/pdgInterprocedural and the compatibility byDepth bucket. Without "line", pdg returns whole-symbol inter-procedural reach plus local whole-symbol PDG diagnostics.
|
|
381
425
|
|
|
382
|
-
PDG OUTPUT CONTRACT: every mode:'pdg' result (success, empty, degraded, or error) carries pdgResultVersion:2 — a stable discriminator for external consumers that bumps on any breaking change to the PDG result shape (distinct from the DB schema version). Successful PDG results include mode:'pdg', a full target envelope (id/name/type/filePath), affectedStatements, affectedStatementCount, interproceduralByDepth/pdgInterprocedural for cross-function reach, compatibility byDepth/byDepthCounts, risk:'UNKNOWN', and a note describing the unified contract. Degraded PDG results (no-layer, sub-layer-missing, unknown) keep mode:'pdg', pdgResultVersion:2, target metadata when the target resolves, risk:'UNKNOWN', note/remediation, and empty byDepth parity fields — never a false-safe zero. If depth and limit both bound the slice, truncatedByReasons reports both causes while truncatedBy remains scalar.
|
|
426
|
+
PDG OUTPUT CONTRACT: every mode:'pdg' result (success, empty, degraded, or error) carries pdgResultVersion:2 — a stable discriminator for external consumers that bumps on any breaking change to the PDG result shape (distinct from the DB schema version). Successful PDG results include mode:'pdg', a full target envelope (id/name/type/filePath), affectedStatements, affectedStatementCount, interproceduralByDepth/pdgInterprocedural for cross-function reach, compatibility byDepth/byDepthCounts, risk:'UNKNOWN', and a note describing the unified contract. Degraded PDG results (no-layer, sub-layer-missing, unknown) keep mode:'pdg', pdgResultVersion:2, target metadata when the target resolves, risk:'UNKNOWN', note/remediation, and empty byDepth parity fields — never a false-safe zero. If depth and limit both bound the slice, truncatedByReasons reports both causes while truncatedBy remains scalar. Return-value-ascent coverage is published structurally at pdgEvidence.ascent — present iff the inter-procedural descent ran, including on an empty slice — with referencesScanned (DISTINCT callees scanned for a CALL_SUMMARY: a distinct-id tally, not a call-site count — two call sites to the same callee count once), returnFlowFound (whether the ascent fired anywhere in the slice), undecodableSummaryCount, examinedComplete (whether that scan covered every callee the index recorded a resolved id for on the visited blocks), incompleteReasons ('traversal-truncated' | 'callee-list-capped' | 'callee-ids-unrecorded'), and callSummaryLayerPresent. Read callSummaryLayerPresent FIRST: false ⇒ a pre-CALL_SUMMARY index, so {referencesScanned:N>0, returnFlowFound:false} is self-consistent and says nothing about the callees — the scan ran, but no layer existed in which a return-flow could be recorded (remedy: re-run gitnexus analyze --pdg). Branch on those fields; the note narrates the same facts in prose for humans and is not a stable contract.
|
|
383
427
|
|
|
384
428
|
WHEN TO USE: Before making code changes — especially refactoring, renaming, or modifying shared code. Shows what would break.
|
|
385
429
|
AFTER THIS: Review d=1 items (WILL BREAK). Use context() on high-risk symbols.
|
|
386
430
|
|
|
387
431
|
Output includes:
|
|
388
|
-
- risk: LOW / MEDIUM / HIGH / CRITICAL / UNKNOWN
|
|
432
|
+
- risk: LOW / MEDIUM / HIGH / CRITICAL / UNKNOWN. An upstream walk that resolved ZERO callers reports UNKNOWN, never LOW, and carries riskNote: "safe to change" is a claim about callers and there were none to reason about, so the symbol is either genuinely unused OR reached only through a reference class the index does not record (plain-object property access, a bare-identifier read of a module-scope const). Confirm with a text search before acting on it. Downstream walks are unaffected — an empty downstream result reports resolved callees, not safety.
|
|
433
|
+
- riskNote: string — present only when risk is UNKNOWN; states why the verdict is withheld.
|
|
389
434
|
- summary: direct callers, processes affected, modules affected
|
|
390
435
|
- affected_processes: which execution flows break and at which step
|
|
391
436
|
- affected_modules: which functional areas are hit (direct vs indirect)
|
|
392
437
|
- byDepth: affected symbols grouped by traversal depth (paginated by limit/offset; omitted when summaryOnly:true — use byDepthCounts for totals per depth, pagination object when truncated). Each item includes a processes:[{id,label,processType,step}] field listing the execution flows that symbol participates in. Empty when the symbol has no process membership. Can ALSO be empty when partial:true is set — either the process-aggregation pass hit its cap before detecting affected processes, or per-symbol enrichment was capped on a very large page. When partial:true, do NOT treat processes:[] as proof of no participation; cross-check the top-level affected_processes list.
|
|
438
|
+
- epistemic: 'exact' | 'lower-bound' — whether impactedCount is the whole story. 'lower-bound' means the walk provably missed callers, so the count is a floor. Absent only on skipped probes (ambiguous-candidate lists, group fan-out).
|
|
439
|
+
- boundaries: string[] — one plain-language sentence per reason the count is short. Prose for humans; branch on causes instead.
|
|
440
|
+
- causes: { receiverTyping, dispatchBoundary, externalBoundary, undecidedSatisfaction } — the machine-readable split of WHY, so an agent gating its own edits can tell a fixable analyzer gap from an irreducible one. Every field counts MISSING THINGS, never sentences:
|
|
441
|
+
- causes.receiverTyping (unit: call sites) > 0 — the RESOLVER GAP signal: the analyzer dropped that many call sites because it could not establish the receiver's type (unresolved constructor, factory, chained expression). Those callers are absent from byDepth. Treat the result as incomplete: grep the symbol name before deleting or renaming.
|
|
442
|
+
- causes.externalBoundary (unit: call sites) > 0 — those calls left the indexed program (System.out.println, fetch(...), os.environ.*). NOT a defect and NOT a reason the count is short: there is no in-graph node any edge could have reached. An epistemic:'exact' result can carry this.
|
|
443
|
+
- causes.dispatchBoundary (unit: symbols) > 0 — DI / interface dispatch: that many implementations plus interface-level consumers sit on the far side of a boundary a static walk cannot cross. Irreducible; a compiler refuses here too. A symbol count, not a site count — per-site multiplicity is not retained for these edges — so compare its magnitude with receiverTyping, not its exact value.
|
|
444
|
+
|
|
445
|
+
- causes.undecidedSatisfaction (unit: unjudged interface/type pairs) > 0 — the analyzer could not DECIDE whether a type satisfies an interface (a type in a required signature named a package it could not resolve), so no IMPLEMENTS edge exists and no dispatch boundary was left for the walk to notice. Distinct from every cause above, which count decided facts that could not be attributed; this one counts questions never answered. It is the only cause that shortens a result WITHOUT leaving a trace in the graph, so an unhedged zero on a symbol reached only through such an interface would otherwise read as 'nobody calls this'. Usually fixable: it most often means a dependency is missing from the analyzed tree.
|
|
446
|
+
|
|
447
|
+
REQUIRES RE-INDEX: causes.receiverTyping, causes.externalBoundary and causes.undecidedSatisfaction are read from index-time metadata that only a current analyzer writes. Against an older index they read as absent/0, which is indistinguishable from "nothing was dropped" — re-run \`gitnexus analyze\` before trusting a zero there.
|
|
393
448
|
|
|
394
449
|
Depth groups:
|
|
395
450
|
- d=1: WILL BREAK (direct callers/importers)
|
|
@@ -400,12 +455,12 @@ TIP: For hub symbols (base error classes, shared utilities) with many direct cal
|
|
|
400
455
|
|
|
401
456
|
TIP: Default traversal uses CALLS/IMPORTS/EXTENDS/IMPLEMENTS. For class members, include HAS_METHOD and HAS_PROPERTY in relationTypes. For field access analysis, include ACCESSES in relationTypes.
|
|
402
457
|
|
|
403
|
-
Handles disambiguation: when multiple symbols share the target name, returns ranked candidates (each with a relevance score) instead of silently picking one. Use target_uid for zero-ambiguity lookup, or narrow with file_path and/or kind hints.
|
|
458
|
+
Handles disambiguation: when multiple symbols share the target name, returns ranked candidates (each with a relevance score) instead of silently picking one. Use target_uid for zero-ambiguity lookup, or narrow with file_path and/or kind hints. totalCandidates is the TRUE match count — it reported the capped resolver window before #2787, so it can now exceed candidates.length; candidatesTruncated:true and a "(showing M of N)" suffix on message mark the shorter window.
|
|
404
459
|
|
|
405
460
|
EdgeType: CALLS, IMPORTS, EXTENDS, IMPLEMENTS, HAS_METHOD, HAS_PROPERTY, METHOD_OVERRIDES, METHOD_IMPLEMENTS, ACCESSES
|
|
406
461
|
Confidence: 1.0 = certain, <0.8 = fuzzy match
|
|
407
462
|
|
|
408
|
-
GROUP MODE: set "repo" to "@<groupName>" for cross-repo impact anchored at the default member (lexicographically first key in group.yaml "repos"), or "@<groupName>/<groupRepoPath>" to choose the member (same path keys as in group.yaml). Phase-1 walk runs in that member; cross-boundary fan-out uses the group bridge.
|
|
463
|
+
GROUP MODE: set "repo" to "@<groupName>" for cross-repo impact anchored at the default member (lexicographically first key in group.yaml "repos"), or "@<groupName>/<groupRepoPath>" to choose the member (same path keys as in group.yaml). Phase-1 walk runs in that member; cross-boundary fan-out uses the group bridge. A cross entry with fanout_status:"not_attempted" proves the declared repository boundary, but its far endpoint has no graph symbol; do not interpret empty by_depth or affected_processes on that entry as a completed zero-impact walk. The fan-out attempts at most 50 neighbour crossings, strongest-confidence first; when it stops early the response carries truncated:true, truncatedRepos, and riskEpistemic:"lower-bound" — dropping a crossing can only move risk DOWN, so treat that risk as a floor, never as a verdict.
|
|
409
464
|
|
|
410
465
|
SERVICE: optional monorepo path prefix (case-sensitive path segments). When "repo" starts with "@", scopes the local impact walk and cross-repo symbol paths to files under that prefix; ignored for a normal indexed repo name.`,
|
|
411
466
|
annotations: READ_ONLY_TOOL_ANNOTATIONS,
|
|
@@ -413,6 +468,14 @@ SERVICE: optional monorepo path prefix (case-sensitive path segments). When "rep
|
|
|
413
468
|
type: 'object',
|
|
414
469
|
properties: {
|
|
415
470
|
target: { type: 'string', description: 'Name of function, class, or file to analyze' },
|
|
471
|
+
name: {
|
|
472
|
+
type: 'string',
|
|
473
|
+
description: 'Compatibility alias for target; all supplied target aliases must agree',
|
|
474
|
+
},
|
|
475
|
+
symbol: {
|
|
476
|
+
type: 'string',
|
|
477
|
+
description: 'Compatibility alias for target; all supplied target aliases must agree',
|
|
478
|
+
},
|
|
416
479
|
target_uid: {
|
|
417
480
|
type: 'string',
|
|
418
481
|
description: 'Direct symbol UID from prior tool results (zero-ambiguity lookup, skips target resolution)',
|
|
@@ -462,7 +525,7 @@ SERVICE: optional monorepo path prefix (case-sensitive path segments). When "rep
|
|
|
462
525
|
relationTypes: {
|
|
463
526
|
type: 'array',
|
|
464
527
|
items: { type: 'string' },
|
|
465
|
-
description: 'Filter: CALLS, IMPORTS, EXTENDS, IMPLEMENTS, HAS_METHOD, HAS_PROPERTY, METHOD_OVERRIDES, METHOD_IMPLEMENTS, ACCESSES (default: usage-based, ACCESSES excluded by default). DI
|
|
528
|
+
description: 'Filter: CALLS, IMPORTS, EXTENDS, IMPLEMENTS, HAS_METHOD, HAS_PROPERTY, METHOD_OVERRIDES, METHOD_IMPLEMENTS, ACCESSES (default: usage-based, ACCESSES excluded by default). DI edges require INJECTS; Spring proxy/advice edges require ADVISED_BY.',
|
|
466
529
|
},
|
|
467
530
|
includeTests: { type: 'boolean', description: 'Include test files (default: false)' },
|
|
468
531
|
minConfidence: {
|
|
@@ -503,6 +566,11 @@ SERVICE: optional monorepo path prefix (case-sensitive path segments). When "rep
|
|
|
503
566
|
description: 'When true, returns target, summary, risk, byDepthCounts, affected_processes, and affected_modules — omits byDepth. Single-repo only; ignored in group mode (@groupName). Use for hub symbols to get actionable signal without output explosion.',
|
|
504
567
|
default: false,
|
|
505
568
|
},
|
|
569
|
+
maxTokens: {
|
|
570
|
+
type: 'integer',
|
|
571
|
+
minimum: 1,
|
|
572
|
+
description: 'Maximum estimated tokens in the complete formatted MCP response. Explicit request overrides GITNEXUS_MCP_DEFAULT_MAX_TOKENS.',
|
|
573
|
+
},
|
|
506
574
|
timeoutMs: {
|
|
507
575
|
type: 'number',
|
|
508
576
|
description: 'Wall-clock budget in milliseconds for the Phase-1 local impact leg (default 30000)',
|
|
@@ -516,7 +584,7 @@ SERVICE: optional monorepo path prefix (case-sensitive path segments). When "rep
|
|
|
516
584
|
maximum: 3600000,
|
|
517
585
|
},
|
|
518
586
|
},
|
|
519
|
-
required: ['
|
|
587
|
+
required: ['direction'],
|
|
520
588
|
},
|
|
521
589
|
},
|
|
522
590
|
{
|
|
@@ -528,7 +596,7 @@ Each finding carries the sink category (command-injection, code-injection, path-
|
|
|
528
596
|
WHEN TO USE: Security review — "what taint findings exist in this repo / file / function?". Requires the repo to be indexed with \`gitnexus analyze --pdg\`; without that layer the tool returns a clear "no taint layer" note, not an error.
|
|
529
597
|
|
|
530
598
|
ANCHORLESS (no "target"): enumerates all persisted findings for the repo — bounded ("limit", deterministic order), with "totalFindings" and a "truncated" flag.
|
|
531
|
-
ANCHORED ("target" = file path or symbol/function name): full hop detail for that anchor. A file-ish target (contains "/" or an extension) filters by file; a symbol name resolves like context() — ambiguous names return ranked candidates, unknown names return not-found. Symbol anchoring is line-range granular for intra-procedural findings; cross-function findings match when the symbol is the source OR sink function.
|
|
599
|
+
ANCHORED ("target" = file path or symbol/function name): full hop detail for that anchor. A file-ish target (contains "/" or an extension) filters by file; a symbol name resolves like context() — ambiguous names return ranked candidates plus totalCandidates (the TRUE match count, not candidates[].length), candidatesTruncated:true and a "(showing M)" suffix on message when candidates[] is the shorter window; unknown names return not-found. Symbol anchoring is line-range granular for intra-procedural findings; cross-function findings match when the symbol is the source OR sink function.
|
|
532
600
|
|
|
533
601
|
CONTRACT CAVEATS (absent flows are NOT proof of safety):
|
|
534
602
|
- Cross-function flows ARE modeled (#2084 M4): a source flowing through helper functions into a sink is found, via summary composition over the call graph (context-insensitive — return/call-site merging is accepted).
|
|
@@ -573,7 +641,7 @@ MODES:
|
|
|
573
641
|
|
|
574
642
|
WHEN TO USE: comprehension ("what guards this statement?"), data-flow tracing within a function, guard-clause discovery. Requires \`gitnexus analyze --pdg\`; without that layer the tool returns a clear "no PDG layer" note, not an error.
|
|
575
643
|
|
|
576
|
-
ANCHORING (required): \`target\` is a file path or a symbol/function name (resolved like context()). PDG queries are ALWAYS anchored — there is no whole-repo enumeration (an unanchored basic-block path scan is unbounded; LadybugDB has no rel-property index). A symbol target is line-range granular; an ambiguous name returns ranked candidates, unknown returns not-found.
|
|
644
|
+
ANCHORING (required): \`target\` is a file path or a symbol/function name (resolved like context()). PDG queries are ALWAYS anchored — there is no whole-repo enumeration (an unanchored basic-block path scan is unbounded; LadybugDB has no rel-property index). A symbol target is line-range granular; an ambiguous name returns ranked candidates plus totalCandidates (the TRUE match count, not candidates[].length), candidatesTruncated:true and a "(showing M)" suffix on message when candidates[] is the shorter window; unknown returns not-found.
|
|
577
645
|
|
|
578
646
|
CONTRACT CAVEATS:
|
|
579
647
|
- CDG labels are binary 'T'/'F' in M5/M6; per-case \`switch\` arm conditions are not yet distinguished (every case dispatch is 'T').
|
|
@@ -699,9 +767,6 @@ Response shape is keyed on how many routes match, not on the data: exactly one m
|
|
|
699
767
|
repo: { type: 'string', description: 'Repository name or path.' },
|
|
700
768
|
},
|
|
701
769
|
required: [],
|
|
702
|
-
// Exactly one lookup key is needed, but either works (route wins if both
|
|
703
|
-
// are passed) — so the structural constraint is "at least one of route/file".
|
|
704
|
-
anyOf: [{ required: ['route'] }, { required: ['file'] }],
|
|
705
770
|
},
|
|
706
771
|
},
|
|
707
772
|
{
|
|
@@ -749,6 +814,8 @@ Traverses CALLS edges plus HAS_METHOD (class → member) edges, so a trace can d
|
|
|
749
814
|
|
|
750
815
|
Returns: ordered hops with file:line, and an aligned edges[] of edge type + confidence. When no path exists, reports the furthest reachable node so you know where the chain breaks (and truncated: true if a traversal cap was hit first).
|
|
751
816
|
|
|
817
|
+
Handles disambiguation: an ambiguous from/to name returns status "ambiguous" with role ("from" or "to"), ranked candidates and totalCandidates — the TRUE match count, not candidates[].length — plus candidatesTruncated:true and a "(showing M)" suffix on message when candidates[] is the shorter window. Re-call with from_uid/to_uid.
|
|
818
|
+
|
|
752
819
|
CROSS-REPO (experimental): pass repo as "@groupName" to trace across repositories in a group. When from/to live in different member repos, the trace stitches the two repo-local segments across a single ContractLink boundary (e.g. an HTTP consumer→provider link), clamped to one crossing. The result adds crossings[] (the bridged contract with matchType/confidence), tags each hop with its member repo, and a notes[] channel for degraded states. The boundary hop is reported with edge type CONTRACT_LINK. Pass pdg:true to also attach the intra-procedural data-flow (REACHING_DEF) for boundary-adjacent segments when those repos were indexed with --pdg; absent a PDG layer it degrades to call-level hops with a note.
|
|
753
820
|
|
|
754
821
|
DESTINATION TRACE (cross-repo): for an "@groupName" trace, OMIT to/to_uid/to_file to trace 'from' to wherever its outgoing HTTP call lands. The result ends at the provider endpoint (reported by route + file even when the handler is an anonymous function with no nameable symbol). This is the way to follow a client call to a backend handler you cannot name.`,
|
|
@@ -758,6 +825,10 @@ DESTINATION TRACE (cross-repo): for an "@groupName" trace, OMIT to/to_uid/to_fil
|
|
|
758
825
|
properties: {
|
|
759
826
|
from: { type: 'string', description: 'Source symbol name' },
|
|
760
827
|
from_uid: { type: 'string', description: 'Source symbol UID (zero-ambiguity)' },
|
|
828
|
+
file: {
|
|
829
|
+
type: 'string',
|
|
830
|
+
description: 'Source file path hint for disambiguation (alias for from_file)',
|
|
831
|
+
},
|
|
761
832
|
from_file: { type: 'string', description: 'Source file path hint for disambiguation' },
|
|
762
833
|
to: {
|
|
763
834
|
type: 'string',
|
|
@@ -812,7 +883,7 @@ DESTINATION TRACE (cross-repo): for an "@groupName" trace, OMIT to/to_uid/to_fil
|
|
|
812
883
|
* `list_repos` and the `group_*` tools are intentionally excluded — they are
|
|
813
884
|
* not single-repo, single-branch operations.
|
|
814
885
|
*/
|
|
815
|
-
const
|
|
886
|
+
export const REPO_SCOPED_TOOLS = new Set([
|
|
816
887
|
'query',
|
|
817
888
|
'cypher',
|
|
818
889
|
'context',
|
|
@@ -829,7 +900,7 @@ const BRANCH_SCOPED_TOOLS = new Set([
|
|
|
829
900
|
'trace',
|
|
830
901
|
]);
|
|
831
902
|
for (const tool of GITNEXUS_TOOLS) {
|
|
832
|
-
if (!
|
|
903
|
+
if (!REPO_SCOPED_TOOLS.has(tool.name))
|
|
833
904
|
continue;
|
|
834
905
|
if (tool.inputSchema.properties.branch)
|
|
835
906
|
continue;
|
|
@@ -14,14 +14,49 @@ export interface AnalyzeJobProgress {
|
|
|
14
14
|
percent: number;
|
|
15
15
|
message: string;
|
|
16
16
|
}
|
|
17
|
+
export type AnalyzeJobStatus = 'queued' | 'cloning' | 'analyzing' | 'loading' | 'complete' | 'failed';
|
|
18
|
+
/**
|
|
19
|
+
* A job's outcome is settled — `complete` and `failed` are the only two states
|
|
20
|
+
* from which nothing more is emitted (see `updateJob`'s immutability guard).
|
|
21
|
+
*
|
|
22
|
+
* Exported because terminality is a property of the JOB, and every consumer
|
|
23
|
+
* that has to decide "is this stream over?" must ask the same question of the
|
|
24
|
+
* same field. The SSE relay used to decide from the PHASE STRING of a progress
|
|
25
|
+
* event instead, which let a mid-run `phase: 'complete'` close the stream
|
|
26
|
+
* before the route had decided the actual outcome (#2790).
|
|
27
|
+
*/
|
|
28
|
+
export declare const isTerminalJobStatus: (status: AnalyzeJobStatus) => boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Structured detail for a job that ended `failed` while its work PARTIALLY
|
|
31
|
+
* succeeded — an embedding run that persisted most nodes and dropped a few to
|
|
32
|
+
* endpoint failures is not the same event as one that produced nothing.
|
|
33
|
+
*
|
|
34
|
+
* `AnalyzeJob.status` deliberately gains no `partial` member: the status union
|
|
35
|
+
* is consumed by the web app, the CLI and every poller, and a new member would
|
|
36
|
+
* be an unhandled value in each of them. This is additive and optional instead
|
|
37
|
+
* — absent on every job that is not a partial embedding run, so `JSON.stringify`
|
|
38
|
+
* omits it and existing payloads stay byte-identical — while giving a client
|
|
39
|
+
* that wants to distinguish "retry these N nodes" from "nothing worked" enough
|
|
40
|
+
* to do it (#2790 review). A UI that ignores it still sees the honest `failed`.
|
|
41
|
+
*/
|
|
42
|
+
export interface AnalyzeJobPartialOutcome {
|
|
43
|
+
/** Which kind of partial result this is; only embedding runs produce one today. */
|
|
44
|
+
kind: 'embedding-partial';
|
|
45
|
+
/** Nodes whose rows were dropped and are checkpointed for retry. */
|
|
46
|
+
pendingNodeCount: number;
|
|
47
|
+
/** Nodes that completed; their rows are durable. */
|
|
48
|
+
nodesProcessed: number;
|
|
49
|
+
}
|
|
17
50
|
export interface AnalyzeJob {
|
|
18
51
|
id: string;
|
|
19
|
-
status:
|
|
52
|
+
status: AnalyzeJobStatus;
|
|
20
53
|
repoUrl?: string;
|
|
21
54
|
repoPath?: string;
|
|
22
55
|
repoName?: string;
|
|
23
56
|
progress: AnalyzeJobProgress;
|
|
24
57
|
error?: string;
|
|
58
|
+
/** Set only when a terminal `failed` job still persisted usable work. */
|
|
59
|
+
partial?: AnalyzeJobPartialOutcome;
|
|
25
60
|
startedAt: number;
|
|
26
61
|
completedAt?: number;
|
|
27
62
|
/** Number of times the worker has been retried after a crash. */
|
|
@@ -30,6 +65,7 @@ export interface AnalyzeJob {
|
|
|
30
65
|
export declare class JobManager {
|
|
31
66
|
private jobs;
|
|
32
67
|
private children;
|
|
68
|
+
private abortControllers;
|
|
33
69
|
private timeouts;
|
|
34
70
|
private emitter;
|
|
35
71
|
private cleanupTimer;
|
|
@@ -42,9 +78,11 @@ export declare class JobManager {
|
|
|
42
78
|
getJob(id: string): AnalyzeJob | undefined;
|
|
43
79
|
/** Return a snapshot of all tracked jobs for inspection. */
|
|
44
80
|
listJobs(): AnalyzeJob[];
|
|
45
|
-
updateJob(id: string, update: Partial<Pick<AnalyzeJob, 'status' | 'progress' | 'error' | 'repoPath' | 'repoName' | 'completedAt'>>): void;
|
|
81
|
+
updateJob(id: string, update: Partial<Pick<AnalyzeJob, 'status' | 'progress' | 'error' | 'partial' | 'repoPath' | 'repoName' | 'completedAt'>>): void;
|
|
46
82
|
/** Register a child process for a job — enables cancellation and timeout. */
|
|
47
83
|
registerChild(jobId: string, child: ChildProcess): void;
|
|
84
|
+
/** Register cancellable in-process work for a job. */
|
|
85
|
+
registerAbortController(jobId: string, controller: AbortController): void;
|
|
48
86
|
/** Cancel a running job — sends SIGTERM to child process. */
|
|
49
87
|
cancelJob(jobId: string, reason?: string): boolean;
|
|
50
88
|
/** Subscribe to progress events for a job. Returns unsubscribe function. */
|
|
@@ -10,12 +10,24 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { randomUUID } from 'crypto';
|
|
12
12
|
import { EventEmitter } from 'events';
|
|
13
|
+
/**
|
|
14
|
+
* A job's outcome is settled — `complete` and `failed` are the only two states
|
|
15
|
+
* from which nothing more is emitted (see `updateJob`'s immutability guard).
|
|
16
|
+
*
|
|
17
|
+
* Exported because terminality is a property of the JOB, and every consumer
|
|
18
|
+
* that has to decide "is this stream over?" must ask the same question of the
|
|
19
|
+
* same field. The SSE relay used to decide from the PHASE STRING of a progress
|
|
20
|
+
* event instead, which let a mid-run `phase: 'complete'` close the stream
|
|
21
|
+
* before the route had decided the actual outcome (#2790).
|
|
22
|
+
*/
|
|
23
|
+
export const isTerminalJobStatus = (status) => status === 'complete' || status === 'failed';
|
|
13
24
|
const JOB_TTL_MS = 60 * 60 * 1000; // 1 hour
|
|
14
25
|
const CLEANUP_INTERVAL_MS = 5 * 60 * 1000; // 5 minutes
|
|
15
26
|
const JOB_TIMEOUT_MS = 30 * 60 * 1000; // 30 minutes
|
|
16
27
|
export class JobManager {
|
|
17
28
|
jobs = new Map();
|
|
18
29
|
children = new Map();
|
|
30
|
+
abortControllers = new Map();
|
|
19
31
|
timeouts = new Map();
|
|
20
32
|
emitter = new EventEmitter();
|
|
21
33
|
cleanupTimer;
|
|
@@ -72,9 +84,10 @@ export class JobManager {
|
|
|
72
84
|
Object.assign(job, update);
|
|
73
85
|
if (this.isTerminal(job.status)) {
|
|
74
86
|
job.completedAt = job.completedAt ?? Date.now();
|
|
87
|
+
this.abortControllers.delete(id);
|
|
75
88
|
}
|
|
76
89
|
// Emit exactly one event per updateJob call to prevent SSE double-write
|
|
77
|
-
if (update.status
|
|
90
|
+
if (update.status !== undefined && isTerminalJobStatus(update.status)) {
|
|
78
91
|
// Terminal event takes precedence — don't also emit the progress event
|
|
79
92
|
this.emitter.emit(`progress:${id}`, {
|
|
80
93
|
phase: update.status,
|
|
@@ -107,6 +120,15 @@ export class JobManager {
|
|
|
107
120
|
}
|
|
108
121
|
});
|
|
109
122
|
}
|
|
123
|
+
/** Register cancellable in-process work for a job. */
|
|
124
|
+
registerAbortController(jobId, controller) {
|
|
125
|
+
const job = this.jobs.get(jobId);
|
|
126
|
+
if (!job || this.isTerminal(job.status)) {
|
|
127
|
+
controller.abort();
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
this.abortControllers.set(jobId, controller);
|
|
131
|
+
}
|
|
110
132
|
/** Cancel a running job — sends SIGTERM to child process. */
|
|
111
133
|
cancelJob(jobId, reason) {
|
|
112
134
|
const job = this.jobs.get(jobId);
|
|
@@ -116,6 +138,8 @@ export class JobManager {
|
|
|
116
138
|
if (child) {
|
|
117
139
|
child.kill('SIGTERM');
|
|
118
140
|
}
|
|
141
|
+
this.abortControllers.get(jobId)?.abort();
|
|
142
|
+
this.abortControllers.delete(jobId);
|
|
119
143
|
this.updateJob(jobId, {
|
|
120
144
|
status: 'failed',
|
|
121
145
|
error: reason || 'Analysis cancelled',
|
|
@@ -134,6 +158,9 @@ export class JobManager {
|
|
|
134
158
|
child.kill('SIGTERM');
|
|
135
159
|
}
|
|
136
160
|
this.children.clear();
|
|
161
|
+
for (const controller of this.abortControllers.values())
|
|
162
|
+
controller.abort();
|
|
163
|
+
this.abortControllers.clear();
|
|
137
164
|
// Clear all timeouts
|
|
138
165
|
for (const timer of this.timeouts.values()) {
|
|
139
166
|
clearTimeout(timer);
|
|
@@ -143,13 +170,14 @@ export class JobManager {
|
|
|
143
170
|
this.emitter.removeAllListeners();
|
|
144
171
|
}
|
|
145
172
|
isTerminal(status) {
|
|
146
|
-
return status
|
|
173
|
+
return isTerminalJobStatus(status);
|
|
147
174
|
}
|
|
148
175
|
cleanup() {
|
|
149
176
|
const now = Date.now();
|
|
150
177
|
for (const [id, job] of this.jobs) {
|
|
151
178
|
if (this.isTerminal(job.status) && job.completedAt && now - job.completedAt > JOB_TTL_MS) {
|
|
152
179
|
this.jobs.delete(id);
|
|
180
|
+
this.abortControllers.delete(id);
|
|
153
181
|
}
|
|
154
182
|
}
|
|
155
183
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* NOTE: this module must live alongside analyze-worker.{ts,js} — the worker
|
|
10
10
|
* path is resolved relative to `import.meta.url`.
|
|
11
11
|
*/
|
|
12
|
-
import type
|
|
12
|
+
import { type JobManager } from './analyze-job.js';
|
|
13
13
|
export interface LaunchDeps {
|
|
14
14
|
jobManager: JobManager;
|
|
15
15
|
backend: {
|