gitnexus 1.6.8-rc.9 → 1.6.8
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 +3 -3
- package/dist/_shared/graph/types.d.ts +31 -1
- package/dist/_shared/graph/types.d.ts.map +1 -1
- package/dist/_shared/language-detection.d.ts.map +1 -1
- package/dist/_shared/language-detection.js +11 -1
- package/dist/_shared/language-detection.js.map +1 -1
- package/dist/_shared/lbug/schema-constants.d.ts +1 -1
- package/dist/_shared/lbug/schema-constants.d.ts.map +1 -1
- package/dist/_shared/lbug/schema-constants.js +6 -0
- package/dist/_shared/lbug/schema-constants.js.map +1 -1
- package/dist/_shared/scope-resolution/parsed-file.d.ts +21 -0
- package/dist/_shared/scope-resolution/parsed-file.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/symbol-definition.d.ts +6 -0
- package/dist/_shared/scope-resolution/symbol-definition.d.ts.map +1 -1
- package/dist/cli/ai-context.d.ts +31 -1
- package/dist/cli/ai-context.js +18 -16
- package/dist/cli/analyze-config.js +11 -0
- package/dist/cli/analyze.d.ts +14 -0
- package/dist/cli/analyze.js +98 -0
- package/dist/cli/embedding-dims.d.ts +33 -0
- package/dist/cli/embedding-dims.js +39 -0
- package/dist/cli/eval-server.d.ts +8 -0
- package/dist/cli/eval-server.js +242 -2
- package/dist/cli/help-i18n.js +19 -0
- package/dist/cli/i18n/en.d.ts +15 -1
- package/dist/cli/i18n/en.js +15 -1
- package/dist/cli/i18n/resources.d.ts +29 -1
- package/dist/cli/i18n/zh-CN.d.ts +14 -0
- package/dist/cli/i18n/zh-CN.js +15 -1
- package/dist/cli/index.js +89 -1
- package/dist/cli/mcp.d.ts +6 -1
- package/dist/cli/mcp.js +26 -1
- package/dist/cli/optional-grammars.d.ts +6 -8
- package/dist/cli/optional-grammars.js +8 -11
- package/dist/cli/setup.d.ts +3 -1
- package/dist/cli/setup.js +67 -17
- package/dist/cli/skill-gen.js +2 -1
- package/dist/cli/tool.d.ts +19 -1
- package/dist/cli/tool.js +96 -3
- package/dist/core/embeddings/hf-env.d.ts +0 -66
- package/dist/core/embeddings/http-client.d.ts +7 -0
- package/dist/core/embeddings/http-client.js +5 -3
- package/dist/core/embeddings/server-mapping.d.ts +1 -1
- package/dist/core/embeddings/server-mapping.js +7 -3
- package/dist/core/graph/import-cycles.d.ts +10 -0
- package/dist/core/graph/import-cycles.js +103 -0
- package/dist/core/group/cross-impact.d.ts +2 -1
- package/dist/core/group/cross-impact.js +5 -1
- package/dist/core/group/extractors/grpc-patterns/proto.js +10 -6
- package/dist/core/group/extractors/http-patterns/kotlin.js +7 -7
- package/dist/core/group/extractors/http-route-extractor.d.ts +24 -0
- package/dist/core/group/extractors/http-route-extractor.js +22 -4
- package/dist/core/group/extractors/include-extractor.js +22 -13
- package/dist/core/group/sync.d.ts +27 -1
- package/dist/core/group/sync.js +0 -0
- package/dist/core/incremental/subgraph-extract.js +18 -1
- package/dist/core/ingestion/cfg/cfg-builder.d.ts +114 -0
- package/dist/core/ingestion/cfg/cfg-builder.js +196 -0
- package/dist/core/ingestion/cfg/collect.d.ts +51 -0
- package/dist/core/ingestion/cfg/collect.js +77 -0
- package/dist/core/ingestion/cfg/control-dependence.d.ts +58 -0
- package/dist/core/ingestion/cfg/control-dependence.js +182 -0
- package/dist/core/ingestion/cfg/control-flow-context.d.ts +106 -0
- package/dist/core/ingestion/cfg/control-flow-context.js +124 -0
- package/dist/core/ingestion/cfg/emit.d.ts +293 -0
- package/dist/core/ingestion/cfg/emit.js +646 -0
- package/dist/core/ingestion/cfg/post-dominators.d.ts +79 -0
- package/dist/core/ingestion/cfg/post-dominators.js +176 -0
- package/dist/core/ingestion/cfg/reaching-def-reason-codec.d.ts +106 -0
- package/dist/core/ingestion/cfg/reaching-def-reason-codec.js +133 -0
- package/dist/core/ingestion/cfg/reaching-defs-graph.d.ts +18 -0
- package/dist/core/ingestion/cfg/reaching-defs-graph.js +312 -0
- package/dist/core/ingestion/cfg/reaching-defs.d.ts +162 -0
- package/dist/core/ingestion/cfg/reaching-defs.js +785 -0
- package/dist/core/ingestion/cfg/synthetic-escape.d.ts +124 -0
- package/dist/core/ingestion/cfg/synthetic-escape.js +300 -0
- package/dist/core/ingestion/cfg/traversal-result.d.ts +20 -0
- package/dist/core/ingestion/cfg/traversal-result.js +2 -0
- package/dist/core/ingestion/cfg/types.d.ts +274 -0
- package/dist/core/ingestion/cfg/types.js +13 -0
- package/dist/core/ingestion/cfg/visitors/c-cpp-harvest.d.ts +111 -0
- package/dist/core/ingestion/cfg/visitors/c-cpp-harvest.js +541 -0
- package/dist/core/ingestion/cfg/visitors/c-cpp.d.ts +74 -0
- package/dist/core/ingestion/cfg/visitors/c-cpp.js +584 -0
- package/dist/core/ingestion/cfg/visitors/call-site-harvest.d.ts +195 -0
- package/dist/core/ingestion/cfg/visitors/call-site-harvest.js +350 -0
- package/dist/core/ingestion/cfg/visitors/csharp-harvest.d.ts +124 -0
- package/dist/core/ingestion/cfg/visitors/csharp-harvest.js +589 -0
- package/dist/core/ingestion/cfg/visitors/csharp.d.ts +87 -0
- package/dist/core/ingestion/cfg/visitors/csharp.js +867 -0
- package/dist/core/ingestion/cfg/visitors/dart-harvest.d.ts +278 -0
- package/dist/core/ingestion/cfg/visitors/dart-harvest.js +870 -0
- package/dist/core/ingestion/cfg/visitors/dart.d.ts +119 -0
- package/dist/core/ingestion/cfg/visitors/dart.js +836 -0
- package/dist/core/ingestion/cfg/visitors/go-harvest.d.ts +160 -0
- package/dist/core/ingestion/cfg/visitors/go-harvest.js +621 -0
- package/dist/core/ingestion/cfg/visitors/go.d.ts +108 -0
- package/dist/core/ingestion/cfg/visitors/go.js +638 -0
- package/dist/core/ingestion/cfg/visitors/java-harvest.d.ts +108 -0
- package/dist/core/ingestion/cfg/visitors/java-harvest.js +513 -0
- package/dist/core/ingestion/cfg/visitors/java.d.ts +101 -0
- package/dist/core/ingestion/cfg/visitors/java.js +812 -0
- package/dist/core/ingestion/cfg/visitors/kotlin-harvest.d.ts +253 -0
- package/dist/core/ingestion/cfg/visitors/kotlin-harvest.js +719 -0
- package/dist/core/ingestion/cfg/visitors/kotlin.d.ts +121 -0
- package/dist/core/ingestion/cfg/visitors/kotlin.js +809 -0
- package/dist/core/ingestion/cfg/visitors/php-harvest.d.ts +172 -0
- package/dist/core/ingestion/cfg/visitors/php-harvest.js +626 -0
- package/dist/core/ingestion/cfg/visitors/php.d.ts +96 -0
- package/dist/core/ingestion/cfg/visitors/php.js +721 -0
- package/dist/core/ingestion/cfg/visitors/python-harvest.d.ts +212 -0
- package/dist/core/ingestion/cfg/visitors/python-harvest.js +739 -0
- package/dist/core/ingestion/cfg/visitors/python.d.ts +103 -0
- package/dist/core/ingestion/cfg/visitors/python.js +558 -0
- package/dist/core/ingestion/cfg/visitors/ruby-harvest.d.ts +223 -0
- package/dist/core/ingestion/cfg/visitors/ruby-harvest.js +587 -0
- package/dist/core/ingestion/cfg/visitors/ruby.d.ts +112 -0
- package/dist/core/ingestion/cfg/visitors/ruby.js +756 -0
- package/dist/core/ingestion/cfg/visitors/rust-harvest.d.ts +324 -0
- package/dist/core/ingestion/cfg/visitors/rust-harvest.js +873 -0
- package/dist/core/ingestion/cfg/visitors/rust.d.ts +95 -0
- package/dist/core/ingestion/cfg/visitors/rust.js +558 -0
- package/dist/core/ingestion/cfg/visitors/scope-tree-harvest.d.ts +87 -0
- package/dist/core/ingestion/cfg/visitors/scope-tree-harvest.js +116 -0
- package/dist/core/ingestion/cfg/visitors/swift-harvest.d.ts +255 -0
- package/dist/core/ingestion/cfg/visitors/swift-harvest.js +679 -0
- package/dist/core/ingestion/cfg/visitors/swift.d.ts +116 -0
- package/dist/core/ingestion/cfg/visitors/swift.js +787 -0
- package/dist/core/ingestion/cfg/visitors/typescript-harvest.d.ts +149 -0
- package/dist/core/ingestion/cfg/visitors/typescript-harvest.js +1056 -0
- package/dist/core/ingestion/cfg/visitors/typescript.d.ts +66 -0
- package/dist/core/ingestion/cfg/visitors/typescript.js +583 -0
- package/dist/core/ingestion/import-resolvers/utils.js +2 -0
- package/dist/core/ingestion/language-provider.d.ts +11 -0
- package/dist/core/ingestion/languages/c-cpp.js +6 -1
- package/dist/core/ingestion/languages/cobol.js +4 -0
- package/dist/core/ingestion/languages/cpp/arity-metadata.js +41 -2
- package/dist/core/ingestion/languages/cpp/captures.js +50 -1
- package/dist/core/ingestion/languages/cpp/conversion-rank.d.ts +2 -0
- package/dist/core/ingestion/languages/cpp/conversion-rank.js +89 -0
- package/dist/core/ingestion/languages/cpp/header-scan.d.ts +1 -1
- package/dist/core/ingestion/languages/cpp/header-scan.js +2 -2
- package/dist/core/ingestion/languages/cpp/inline-namespaces.js +7 -2
- package/dist/core/ingestion/languages/cpp/member-lookup.js +2 -1
- package/dist/core/ingestion/languages/cpp/query.js +23 -0
- package/dist/core/ingestion/languages/cpp/scope-resolver.js +2 -1
- package/dist/core/ingestion/languages/csharp.js +2 -0
- package/dist/core/ingestion/languages/dart.js +2 -0
- package/dist/core/ingestion/languages/go.js +2 -0
- package/dist/core/ingestion/languages/java.js +3 -0
- package/dist/core/ingestion/languages/kotlin/query.js +3 -2
- package/dist/core/ingestion/languages/kotlin.js +3 -0
- package/dist/core/ingestion/languages/php.js +2 -0
- package/dist/core/ingestion/languages/python.js +2 -0
- package/dist/core/ingestion/languages/ruby.js +2 -0
- package/dist/core/ingestion/languages/rust.js +2 -0
- package/dist/core/ingestion/languages/swift.js +2 -0
- package/dist/core/ingestion/languages/typescript.js +5 -0
- package/dist/core/ingestion/languages/vue.js +6 -0
- package/dist/core/ingestion/method-extractors/configs/c-cpp.js +6 -13
- package/dist/core/ingestion/method-extractors/generic.js +1 -0
- package/dist/core/ingestion/method-types.d.ts +2 -0
- package/dist/core/ingestion/model/symbol-table.d.ts +1 -0
- package/dist/core/ingestion/model/symbol-table.js +1 -0
- package/dist/core/ingestion/mro-processor.js +109 -0
- package/dist/core/ingestion/parsing-processor.js +23 -0
- package/dist/core/ingestion/pipeline-phases/call-summaries.d.ts +26 -0
- package/dist/core/ingestion/pipeline-phases/call-summaries.js +46 -0
- package/dist/core/ingestion/pipeline-phases/index.d.ts +2 -0
- package/dist/core/ingestion/pipeline-phases/index.js +2 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +0 -21
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +18 -1
- package/dist/core/ingestion/pipeline-phases/routes.d.ts +10 -0
- package/dist/core/ingestion/pipeline-phases/routes.js +30 -1
- package/dist/core/ingestion/pipeline-phases/taint-summaries.d.ts +30 -0
- package/dist/core/ingestion/pipeline-phases/taint-summaries.js +81 -0
- package/dist/core/ingestion/pipeline.d.ts +92 -10
- package/dist/core/ingestion/pipeline.js +11 -2
- package/dist/core/ingestion/scope-extractor.js +12 -2
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +9 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/callee-id-sink.d.ts +75 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/callee-id-sink.js +67 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.d.ts +12 -2
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.js +14 -2
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.d.ts +6 -1
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.js +13 -1
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +9 -1
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +28 -2
- package/dist/core/ingestion/scope-resolution/passes/overload-narrowing.d.ts +4 -0
- package/dist/core/ingestion/scope-resolution/passes/overload-narrowing.js +9 -0
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.d.ts +6 -1
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.js +174 -40
- package/dist/core/ingestion/scope-resolution/pipeline/phase.d.ts +24 -0
- package/dist/core/ingestion/scope-resolution/pipeline/phase.js +276 -190
- package/dist/core/ingestion/scope-resolution/pipeline/reconcile-ownership.js +43 -3
- package/dist/core/ingestion/scope-resolution/pipeline/run.d.ts +75 -0
- package/dist/core/ingestion/scope-resolution/pipeline/run.js +349 -1
- package/dist/core/ingestion/scope-resolution/resolution-outcome.d.ts +1 -1
- package/dist/core/ingestion/taint/call-summary-codec.d.ts +75 -0
- package/dist/core/ingestion/taint/call-summary-codec.js +128 -0
- package/dist/core/ingestion/taint/call-summary-emit.d.ts +43 -0
- package/dist/core/ingestion/taint/call-summary-emit.js +70 -0
- package/dist/core/ingestion/taint/call-summary-harvest.d.ts +77 -0
- package/dist/core/ingestion/taint/call-summary-harvest.js +179 -0
- package/dist/core/ingestion/taint/call-summary-model.d.ts +47 -0
- package/dist/core/ingestion/taint/call-summary-model.js +25 -0
- package/dist/core/ingestion/taint/emit.d.ts +125 -0
- package/dist/core/ingestion/taint/emit.js +208 -0
- package/dist/core/ingestion/taint/interproc-emit.d.ts +50 -0
- package/dist/core/ingestion/taint/interproc-emit.js +88 -0
- package/dist/core/ingestion/taint/interproc-solver.d.ts +110 -0
- package/dist/core/ingestion/taint/interproc-solver.js +312 -0
- package/dist/core/ingestion/taint/match.d.ts +153 -0
- package/dist/core/ingestion/taint/match.js +278 -0
- package/dist/core/ingestion/taint/path-codec.d.ts +134 -0
- package/dist/core/ingestion/taint/path-codec.js +190 -0
- package/dist/core/ingestion/taint/propagate.d.ts +216 -0
- package/dist/core/ingestion/taint/propagate.js +659 -0
- package/dist/core/ingestion/taint/site-safety.d.ts +29 -0
- package/dist/core/ingestion/taint/site-safety.js +98 -0
- package/dist/core/ingestion/taint/source-sink-config.d.ts +107 -23
- package/dist/core/ingestion/taint/source-sink-config.js +35 -12
- package/dist/core/ingestion/taint/source-sink-registry.d.ts +6 -4
- package/dist/core/ingestion/taint/source-sink-registry.js +6 -4
- package/dist/core/ingestion/taint/summary-harvest-driver.d.ts +80 -0
- package/dist/core/ingestion/taint/summary-harvest-driver.js +179 -0
- package/dist/core/ingestion/taint/summary-harvest.d.ts +89 -0
- package/dist/core/ingestion/taint/summary-harvest.js +537 -0
- package/dist/core/ingestion/taint/summary-model.d.ts +200 -0
- package/dist/core/ingestion/taint/summary-model.js +86 -0
- package/dist/core/ingestion/taint/typescript-model.d.ts +38 -0
- package/dist/core/ingestion/taint/typescript-model.js +102 -0
- package/dist/core/ingestion/type-extractors/c-cpp.js +21 -0
- package/dist/core/ingestion/utils/env.d.ts +7 -0
- package/dist/core/ingestion/utils/env.js +12 -0
- package/dist/core/ingestion/utils/method-props.js +1 -0
- package/dist/core/ingestion/workers/parse-worker.d.ts +13 -0
- package/dist/core/ingestion/workers/parse-worker.js +76 -17
- package/dist/core/ingestion/workers/worker-pool.d.ts +9 -40
- package/dist/core/ingestion/workers/worker-pool.js +15 -2
- package/dist/core/lbug/csv-generator.d.ts +51 -3
- package/dist/core/lbug/csv-generator.js +369 -255
- package/dist/core/lbug/lbug-adapter.d.ts +58 -18
- package/dist/core/lbug/lbug-adapter.js +346 -84
- package/dist/core/lbug/lbug-config.d.ts +19 -0
- package/dist/core/lbug/lbug-config.js +29 -0
- package/dist/core/lbug/pdg-emit-sink.d.ts +127 -0
- package/dist/core/lbug/pdg-emit-sink.js +358 -0
- package/dist/core/lbug/pool-adapter.d.ts +35 -0
- package/dist/core/lbug/pool-adapter.js +90 -1
- package/dist/core/lbug/rel-pair-routing.d.ts +54 -0
- package/dist/core/lbug/rel-pair-routing.js +140 -0
- package/dist/core/lbug/schema.d.ts +2 -2
- package/dist/core/lbug/schema.js +3 -0
- package/dist/core/logger.d.ts +0 -5
- package/dist/core/run-analyze.d.ts +96 -0
- package/dist/core/run-analyze.js +207 -3
- package/dist/core/tree-sitter/parser-loader.js +5 -4
- package/dist/core/tree-sitter/safe-parse.d.ts +0 -5
- package/dist/core/tree-sitter/vendored-grammars.d.ts +39 -0
- package/dist/core/tree-sitter/vendored-grammars.js +57 -0
- package/dist/core/wiki/generator.js +3 -1
- package/dist/core/wiki/graph-queries.d.ts +6 -0
- package/dist/core/wiki/graph-queries.js +9 -1
- package/dist/mcp/http-transport.d.ts +134 -0
- package/dist/mcp/http-transport.js +503 -0
- package/dist/mcp/local/local-backend.d.ts +110 -24
- package/dist/mcp/local/local-backend.js +1225 -19
- package/dist/mcp/local/pdg-impact.d.ts +384 -0
- package/dist/mcp/local/pdg-impact.js +1972 -0
- package/dist/mcp/resources.js +13 -1
- package/dist/mcp/tools.d.ts +12 -0
- package/dist/mcp/tools.js +214 -7
- package/dist/server/analyze-launch.d.ts +29 -0
- package/dist/server/analyze-launch.js +137 -0
- package/dist/server/analyze-upload.d.ts +33 -0
- package/dist/server/analyze-upload.js +123 -0
- package/dist/server/analyze-worker.d.ts +17 -1
- package/dist/server/api.d.ts +17 -0
- package/dist/server/api.js +132 -168
- package/dist/server/git-clone.d.ts +43 -2
- package/dist/server/git-clone.js +211 -16
- package/dist/server/mcp-http.d.ts +5 -6
- package/dist/server/mcp-http.js +9 -82
- package/dist/server/middleware.d.ts +40 -0
- package/dist/server/middleware.js +92 -0
- package/dist/server/private-ip.d.ts +1 -0
- package/dist/server/private-ip.js +15 -0
- package/dist/server/upload-ingest.d.ts +56 -0
- package/dist/server/upload-ingest.js +276 -0
- package/dist/server/upload-paths.d.ts +37 -0
- package/dist/server/upload-paths.js +57 -0
- package/dist/server/upload-sweep.d.ts +20 -0
- package/dist/server/upload-sweep.js +57 -0
- package/dist/storage/git.js +5 -8
- package/dist/storage/parse-cache.d.ts +22 -1
- package/dist/storage/parse-cache.js +41 -10
- package/dist/storage/repo-manager.d.ts +121 -10
- package/dist/storage/repo-manager.js +43 -5
- package/dist/types/pipeline.d.ts +9 -0
- package/hooks/antigravity/gitnexus-antigravity-hook.cjs +110 -10
- package/hooks/claude/gitnexus-hook.cjs +110 -13
- package/hooks/claude/hook-db-lock-probe.cjs +513 -26
- package/package.json +8 -2
- package/scripts/assert-publish-grammar-coverage.cjs +31 -0
- package/scripts/build-tree-sitter-grammars.cjs +16 -10
- package/scripts/cross-platform-tests.ts +1 -0
- package/skills/gitnexus-debugging.md +16 -4
- package/skills/gitnexus-exploring.md +3 -3
- package/skills/gitnexus-guide.md +33 -0
- package/skills/gitnexus-pdg-query.md +89 -0
- package/skills/gitnexus-refactoring.md +1 -1
- package/skills/gitnexus-taint-analysis.md +178 -0
- package/vendor/tree-sitter-c/package.json +1 -1
- package/vendor/tree-sitter-dart/package.json +1 -1
- package/vendor/tree-sitter-kotlin/package.json +1 -1
- package/vendor/tree-sitter-proto/package.json +1 -1
- package/vendor/tree-sitter-swift/package.json +1 -1
- package/web/assets/{agent-CKPMqImC.js → agent-D3Xd7zZE.js} +123 -123
- package/web/assets/architecture-7EHR7CIX-6QZW5X65-DxJw65fT.js +1 -0
- package/web/assets/architectureDiagram-UL44E2DR-ChH9xW-N.js +36 -0
- package/web/assets/{blockDiagram-7IZFK4PR-B4niSLvR.js → blockDiagram-7IZFK4PR-BkWhpzWB.js} +1 -1
- package/web/assets/{c4Diagram-Y2BXMSZH-DIzEXalR.js → c4Diagram-Y2BXMSZH-DtBvpzWD.js} +1 -1
- package/web/assets/{chunk-3SSMPTDK-BzGeeheI.js → chunk-3SSMPTDK-B4_etUhr.js} +2 -2
- package/web/assets/{chunk-5IMINLNL-CnTLsXIV.js → chunk-5IMINLNL-DOdTeQri.js} +1 -1
- package/web/assets/{chunk-5VCL7Z4A-w1BCx98Z.js → chunk-5VCL7Z4A-CQ-2dYWj.js} +1 -1
- package/web/assets/chunk-6764PJDD-DpIS7hxD.js +1 -0
- package/web/assets/{chunk-67TQ5CYL-CChC2cAv.js → chunk-67TQ5CYL-4sNPJU1q.js} +3 -3
- package/web/assets/{chunk-7W6UQGC5-CgFyfZ6k.js → chunk-7W6UQGC5-KyEG0HQg.js} +1 -1
- package/web/assets/{chunk-AZZRMDJM-5E9ARdDQ.js → chunk-AZZRMDJM-y-xJBuMz.js} +1 -1
- package/web/assets/{chunk-INKRHTLW-ELpfuk9h.js → chunk-INKRHTLW-Nu4ri9P-.js} +1 -1
- package/web/assets/{chunk-JQRUD6KW-Dcq_Qnyy.js → chunk-JQRUD6KW-Dbva2Z17.js} +1 -1
- package/web/assets/{chunk-KGFNY3KK-W-VR57xb.js → chunk-KGFNY3KK-JGMJvKCK.js} +1 -1
- package/web/assets/chunk-KGYTTC2M-CWC_c3H9.js +161 -0
- package/web/assets/{chunk-KNLZD3CH-BuZBOcso.js → chunk-KNLZD3CH-BGlP6X9R.js} +1 -1
- package/web/assets/{chunk-KRXBNO2N-DH2NPM7I.js → chunk-KRXBNO2N-BW5o0KUN.js} +1 -1
- package/web/assets/{chunk-LCXTWHL2-Dfmux4m1.js → chunk-LCXTWHL2-zoomRtWX.js} +1 -1
- package/web/assets/{chunk-LII3EMHJ-3X33tCpU.js → chunk-LII3EMHJ-D-jm-dLa.js} +1 -1
- package/web/assets/{chunk-QA3QBVWF-D5Ha3GgB.js → chunk-QA3QBVWF-BgRW3SXd.js} +1 -1
- package/web/assets/{chunk-RG4AUYOV-CAkzcoRj.js → chunk-RG4AUYOV-DD0B2N2B.js} +1 -1
- package/web/assets/{chunk-T2UQINTJ-kGYG7ppP.js → chunk-T2UQINTJ-DSBqkzH7.js} +1 -1
- package/web/assets/chunk-T5OCTHI4-DdZvN-9i.js +1 -0
- package/web/assets/{chunk-UY5QBCOK-Du-c56gs.js → chunk-UY5QBCOK-DyF0vyGd.js} +1 -1
- package/web/assets/{chunk-W44A43WB-lrCpuupA.js → chunk-W44A43WB-JqMLIpR0.js} +1 -1
- package/web/assets/{chunk-ZXARS5L4-CSZRiyOf.js → chunk-ZXARS5L4-CxN8oiwI.js} +1 -1
- package/web/assets/classDiagram-KGZ6W3CR-DJm9BgF-.js +1 -0
- package/web/assets/classDiagram-v2-72OJOZXJ-DJm9BgF-.js +1 -0
- package/web/assets/{context-builder-_HS0v2ma.js → context-builder-BHiFUA8O.js} +10 -2
- package/web/assets/{cose-bilkent-UX7MHV2Q-BHv2bbtl.js → cose-bilkent-UX7MHV2Q-D71wNYRJ.js} +1 -1
- package/web/assets/dagre-ND4H6XIP-BIkxmhcu.js +4 -0
- package/web/assets/diagram-3NCE3AQN-BTa6iH0T.js +43 -0
- package/web/assets/diagram-GF46GFSD-DZDV0vBj.js +24 -0
- package/web/assets/{diagram-HNR7UZ2L-fUWreZzx.js → diagram-HNR7UZ2L-DFCfd5LI.js} +2 -2
- package/web/assets/diagram-QXG6HAR7-BzM--Jj0.js +24 -0
- package/web/assets/diagram-WEQXMOUZ-DFFwz0k4.js +10 -0
- package/web/assets/{erDiagram-L5TCEMPS-QN2eEP1e.js → erDiagram-L5TCEMPS-CfHMJJqo.js} +1 -1
- package/web/assets/eventmodeling-FCH6USID-MREXMVOE-BQm9QzEa.js +1 -0
- package/web/assets/{flowDiagram-H6V6AXG4-CXbXImlN.js → flowDiagram-H6V6AXG4-Be805QiJ.js} +3 -3
- package/web/assets/{ganttDiagram-JCBTUEKG-BHQssTz6.js → ganttDiagram-JCBTUEKG-D3iL2Aet.js} +1 -1
- package/web/assets/gitGraph-WXDBUCRP-R675I2BI-Cr_Bm2Nb.js +1 -0
- package/web/assets/gitGraphDiagram-S2ZK5IYY-CPIDgxGm.js +106 -0
- package/web/assets/index-BvYev1UJ.js +635 -0
- package/web/assets/index-_lgn7hs5.css +2 -0
- package/web/assets/info-J43DQDTF-KCYPFFUO-Cs4p2oyk.js +1 -0
- package/web/assets/infoDiagram-3YFTVSEB-Y7BKSoke.js +2 -0
- package/web/assets/{ishikawaDiagram-BNXS4ZKH-6LKOvBfp.js → ishikawaDiagram-BNXS4ZKH-CT4SHFuI.js} +1 -1
- package/web/assets/{journeyDiagram-M6C3CM3L-DNPYCpvq.js → journeyDiagram-M6C3CM3L-CvArszLo.js} +1 -1
- package/web/assets/{kanban-definition-75IXJCU3-DgDi9oJT.js → kanban-definition-75IXJCU3-C6yDxr7N.js} +3 -3
- package/web/assets/{katex-K3KEBU37-CrVLz8l7.js → katex-K3KEBU37-CTc5BslQ.js} +1 -1
- package/web/assets/{mindmap-definition-2TDM6QVE-CwR5sBB-.js → mindmap-definition-2TDM6QVE-BOc2WEne.js} +1 -1
- package/web/assets/packet-YPE3B663-LP52Z2RK-CKCrztD2.js +1 -0
- package/web/assets/pie-LRSECV5Y-TCRJHUBD-BB7pHqoD.js +1 -0
- package/web/assets/{pieDiagram-CU6KROY3-By8g6f6B.js → pieDiagram-CU6KROY3-Cvc0f_Pd.js} +1 -1
- package/web/assets/{quadrantDiagram-VICAPDV7-bAm6Hi_5.js → quadrantDiagram-VICAPDV7-yXSZ2lLz.js} +1 -1
- package/web/assets/radar-GUYGQ44K-RDLRG3WG-DhoTOcuK.js +1 -0
- package/web/assets/{requirementDiagram-JXO7QTGE-7oDcJ1_J.js → requirementDiagram-JXO7QTGE-BRcZvHs4.js} +1 -1
- package/web/assets/{sankeyDiagram-URQDO5SZ-LFJz53u5.js → sankeyDiagram-URQDO5SZ-1qEjlFIB.js} +1 -1
- package/web/assets/{sequenceDiagram-VS2MUI6T-FySeKCUy.js → sequenceDiagram-VS2MUI6T-PcSCuvrB.js} +3 -3
- package/web/assets/stateDiagram-7D4R322I-D6qYSV1E.js +1 -0
- package/web/assets/stateDiagram-v2-36443NZ5-Bg-ImOSX.js +1 -0
- package/web/assets/{timeline-definition-O6YCAMPW-Ds2CnVZK.js → timeline-definition-O6YCAMPW-QWkh01xw.js} +1 -1
- package/web/assets/treeView-BLDUP644-QA4HXRO3-ODehyGKL.js +1 -0
- package/web/assets/treemap-LRROVOQU-LLAWBHMP-BfpgC-7o.js +1 -0
- package/web/assets/{vennDiagram-MWXL3ELB-DUIEwXWp.js → vennDiagram-MWXL3ELB-ak4DfwuM.js} +3 -3
- package/web/assets/wardley-L42UT6IY-5TKZOOLJ-CNeL6VHE.js +1 -0
- package/web/assets/{wardleyDiagram-CUQ6CDDI-DEiFPQih.js → wardleyDiagram-CUQ6CDDI-CTzR4Loq.js} +1 -1
- package/web/assets/{xychartDiagram-N2JHSOCM-BUbayhST.js → xychartDiagram-N2JHSOCM-DA1BEaQz.js} +1 -1
- package/web/index.html +13 -15
- package/scripts/materialize-vendor-grammars.cjs +0 -97
- package/web/assets/architecture-7EHR7CIX-6QZW5X65-BETj2x4g.js +0 -1
- package/web/assets/architectureDiagram-UL44E2DR-D1EXI0zA.js +0 -36
- package/web/assets/chunk-2T2R6R2M-n6s9JZqv.js +0 -4
- package/web/assets/chunk-2UTLFMKG-CMBB1TMN.js +0 -1
- package/web/assets/chunk-4R4BOZG6-mKhL59ul.js +0 -159
- package/web/assets/chunk-6764PJDD-ChwMM2z4.js +0 -1
- package/web/assets/chunk-7J6CGLKN-DT-b53FT.js +0 -10
- package/web/assets/chunk-C62D2QBJ-CDAWj26E.js +0 -1
- package/web/assets/chunk-CEXFNPSA-D68Tk6ls.js +0 -1
- package/web/assets/chunk-CilyBKbf.js +0 -1
- package/web/assets/chunk-J5EP6P6S-DxWW0yvu.js +0 -1
- package/web/assets/chunk-KGYTTC2M-C6PHeuay.js +0 -1
- package/web/assets/chunk-RERM46MO-DQNbXtfw.js +0 -1
- package/web/assets/chunk-RKZBBQEN-BmTPLSyv.js +0 -1
- package/web/assets/chunk-RLI5ZMPA-DExu2DOK.js +0 -1
- package/web/assets/chunk-T5OCTHI4--9wWpVws.js +0 -1
- package/web/assets/chunk-UP6H54XL-DsKdC6jC.js +0 -1
- package/web/assets/chunk-UXSXWOXI-DR81EqLr.js +0 -1
- package/web/assets/classDiagram-KGZ6W3CR-Bv93af_b.js +0 -1
- package/web/assets/classDiagram-v2-72OJOZXJ-CLfEqHUa.js +0 -1
- package/web/assets/dagre-ND4H6XIP-DsIr9MOv.js +0 -4
- package/web/assets/diagram-3NCE3AQN-BqAtKUpW.js +0 -43
- package/web/assets/diagram-GF46GFSD-CaBG6n6o.js +0 -24
- package/web/assets/diagram-QXG6HAR7-CZ-O3rcV.js +0 -24
- package/web/assets/diagram-WEQXMOUZ-P4lSL4GH.js +0 -10
- package/web/assets/eventmodeling-FCH6USID-MREXMVOE-B3myHUst.js +0 -1
- package/web/assets/gitGraph-WXDBUCRP-R675I2BI-DF3rtf4A.js +0 -1
- package/web/assets/gitGraphDiagram-S2ZK5IYY-CCwVLT__.js +0 -106
- package/web/assets/index-BKWA-m7o.css +0 -2
- package/web/assets/index-CG6q8eTs.js +0 -626
- package/web/assets/info-J43DQDTF-KCYPFFUO-R4XV_akJ.js +0 -1
- package/web/assets/infoDiagram-3YFTVSEB-DmLICZx1.js +0 -2
- package/web/assets/packet-YPE3B663-LP52Z2RK-CgQPdNZa.js +0 -1
- package/web/assets/pie-LRSECV5Y-TCRJHUBD-BzWOwc_c.js +0 -1
- package/web/assets/radar-GUYGQ44K-RDLRG3WG-B7KG0FN7.js +0 -1
- package/web/assets/stateDiagram-7D4R322I-CB2nABwH.js +0 -1
- package/web/assets/stateDiagram-v2-36443NZ5-COBGd2RL.js +0 -1
- package/web/assets/treeView-BLDUP644-QA4HXRO3-CRSxEwLO.js +0 -1
- package/web/assets/treemap-LRROVOQU-LLAWBHMP-a0PfKoVn.js +0 -1
- package/web/assets/wardley-L42UT6IY-5TKZOOLJ-BKQ6e5mC.js +0 -1
- /package/web/assets/{chunk-AQ6EADP3-CCFje6lL.js → chunk-AQ6EADP3-CZhslHi-.js} +0 -0
package/dist/cli/eval-server.js
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
* POST /shutdown — Graceful shutdown.
|
|
30
30
|
*/
|
|
31
31
|
import http from 'http';
|
|
32
|
+
import crypto from 'node:crypto';
|
|
32
33
|
import { isIPv4, isIPv6 } from 'node:net';
|
|
33
34
|
import { writeSync } from 'node:fs';
|
|
34
35
|
import { LocalBackend, } from '../mcp/local/local-backend.js';
|
|
@@ -146,6 +147,14 @@ export function formatContextResult(result) {
|
|
|
146
147
|
}
|
|
147
148
|
return lines.join('\n').trim();
|
|
148
149
|
}
|
|
150
|
+
function formatTruncationSuffix(result) {
|
|
151
|
+
const label = Array.isArray(result.truncatedByReasons)
|
|
152
|
+
? result.truncatedByReasons.join(', ')
|
|
153
|
+
: typeof result.truncatedBy === 'string'
|
|
154
|
+
? result.truncatedBy
|
|
155
|
+
: '';
|
|
156
|
+
return label ? ` (by ${label})` : '';
|
|
157
|
+
}
|
|
149
158
|
export function formatImpactResult(result) {
|
|
150
159
|
if (result.error) {
|
|
151
160
|
const suggestion = result.suggestion ? `\nSuggestion: ${result.suggestion}` : '';
|
|
@@ -160,6 +169,25 @@ export function formatImpactResult(result) {
|
|
|
160
169
|
// mirroring formatContextResult, so the real impact under whichever symbol the
|
|
161
170
|
// caller meant is visible on the text surface, not just in the JSON.
|
|
162
171
|
if (result.status === 'ambiguous') {
|
|
172
|
+
if (result.mode === 'pdg') {
|
|
173
|
+
const shown = result.candidates?.length ?? 0;
|
|
174
|
+
const totalCandidates = result.totalCandidates ?? shown;
|
|
175
|
+
const countPhrase = totalCandidates > shown
|
|
176
|
+
? `${totalCandidates} symbols (showing ${shown})`
|
|
177
|
+
: `${totalCandidates} symbols`;
|
|
178
|
+
const lines = [
|
|
179
|
+
`${target?.name || '?'}: AMBIGUOUS — ${countPhrase} share this name. ` +
|
|
180
|
+
`PDG impact was not computed until the target is disambiguated. ` +
|
|
181
|
+
`Use --uid, file_path, or kind for one authoritative PDG result.`,
|
|
182
|
+
];
|
|
183
|
+
if (result.message)
|
|
184
|
+
lines.push(String(result.message));
|
|
185
|
+
for (const c of result.candidates || []) {
|
|
186
|
+
const score = typeof c.score === 'number' ? ` score ${c.score}` : '';
|
|
187
|
+
lines.push(` ${c.kind} ${c.name} → ${c.filePath}:${c.line || '?'}${score} (uid: ${c.uid})`);
|
|
188
|
+
}
|
|
189
|
+
return lines.join('\n');
|
|
190
|
+
}
|
|
163
191
|
// #2129 review F11 — report the FULL match count (`totalCandidates`), not the
|
|
164
192
|
// truncated `candidates[]` length; note when the candidate list is capped.
|
|
165
193
|
const shown = result.candidates?.length ?? 0;
|
|
@@ -180,6 +208,176 @@ export function formatImpactResult(result) {
|
|
|
180
208
|
}
|
|
181
209
|
return lines.join('\n');
|
|
182
210
|
}
|
|
211
|
+
// ─── PDG mode (mode:'pdg') ────────────────────────────────────────────
|
|
212
|
+
// KTD8 presentation half. PDG results are intra-procedural Program
|
|
213
|
+
// Dependence Graph blast radii: the single collapsed `byDepth[1]` bucket
|
|
214
|
+
// has NO call-hop depth meaning (block-hops ≠ call-hops), so we must NOT
|
|
215
|
+
// reuse the callgraph "depth N / WILL BREAK (direct)" framing, the
|
|
216
|
+
// callgraph DI/dynamic-dispatch lower-bound copy, or the confident
|
|
217
|
+
// "isolated" zero. A degraded / no-body PDG result is INCONCLUSIVE, not
|
|
218
|
+
// safe-to-refactor — it gets the explicit caveat + remediation, never an
|
|
219
|
+
// empty blast radius. Detect on `mode:'pdg'` (every PDG return path —
|
|
220
|
+
// findings, degradation, no-body, no-dependence — carries it). Ambiguous
|
|
221
|
+
// PDG results carry `status:'ambiguous'` and are handled above; they never
|
|
222
|
+
// reach here.
|
|
223
|
+
if (result.mode === 'pdg') {
|
|
224
|
+
const name = target?.name || '?';
|
|
225
|
+
const appendPdgInterproceduralSymbols = (lines) => {
|
|
226
|
+
const byDepth = result.interproceduralByDepth || result.pdgInterprocedural?.byDepth || result.byDepth || {};
|
|
227
|
+
const byDepthCounts = result.interproceduralByDepthCounts ||
|
|
228
|
+
result.pdgInterprocedural?.byDepthCounts ||
|
|
229
|
+
result.byDepthCounts ||
|
|
230
|
+
{};
|
|
231
|
+
const depthKeys = Array.from(new Set([...Object.keys(byDepthCounts), ...Object.keys(byDepth)]))
|
|
232
|
+
.map((d) => Number(d))
|
|
233
|
+
.filter((d) => Number.isFinite(d))
|
|
234
|
+
.sort((a, b) => a - b);
|
|
235
|
+
const hasReach = depthKeys.some((depth) => {
|
|
236
|
+
const items = byDepth[depth] || byDepth[String(depth)] || [];
|
|
237
|
+
const count = byDepthCounts[depth] ?? byDepthCounts[String(depth)] ?? items.length;
|
|
238
|
+
return count > 0;
|
|
239
|
+
});
|
|
240
|
+
if (!hasReach)
|
|
241
|
+
return false;
|
|
242
|
+
const totalSymbols = result.pdgInterprocedural?.impactedCount ??
|
|
243
|
+
(typeof result.impactedCount === 'number' ? result.impactedCount : 0);
|
|
244
|
+
lines.push('');
|
|
245
|
+
lines.push(`Inter-procedural symbol reach (${totalSymbols}):`);
|
|
246
|
+
for (const depth of depthKeys) {
|
|
247
|
+
const items = byDepth[depth] || byDepth[String(depth)] || [];
|
|
248
|
+
const count = byDepthCounts[depth] ?? byDepthCounts[String(depth)] ?? items.length;
|
|
249
|
+
if (count <= 0)
|
|
250
|
+
continue;
|
|
251
|
+
lines.push(` d=${depth} (${count})`);
|
|
252
|
+
const shown = Math.min(items.length, 12);
|
|
253
|
+
for (const item of items.slice(0, shown)) {
|
|
254
|
+
const flags = [];
|
|
255
|
+
if (item.unresolved)
|
|
256
|
+
flags.push('unresolved');
|
|
257
|
+
if (item.ambiguous)
|
|
258
|
+
flags.push('ambiguous');
|
|
259
|
+
const flagStr = flags.length ? ` [${flags.join(', ')}]` : '';
|
|
260
|
+
lines.push(` ${item.type || ''} ${item.name} → ${item.filePath}${flagStr}`);
|
|
261
|
+
}
|
|
262
|
+
if (count > shown)
|
|
263
|
+
lines.push(` ... and ${count - shown} more`);
|
|
264
|
+
}
|
|
265
|
+
return true;
|
|
266
|
+
};
|
|
267
|
+
// (1) Degradation — the PDG layer (or a sub-layer) is absent/unreadable.
|
|
268
|
+
// `pdgLayer` is the non-'ready' state from `pdgLayerStatus`. Print the
|
|
269
|
+
// honest remediation, NOT a zero/empty blast radius.
|
|
270
|
+
if (result.pdgLayer) {
|
|
271
|
+
const subLayer = result.missingSubLayer
|
|
272
|
+
? ` (missing sub-layer: ${result.missingSubLayer})`
|
|
273
|
+
: '';
|
|
274
|
+
return (`${name}: PDG impact unavailable — the index has no usable PDG layer ` +
|
|
275
|
+
`[${result.pdgLayer}]${subLayer}. This is NOT "no impact". ` +
|
|
276
|
+
`Re-index with \`gitnexus analyze --pdg\` to build the control/data ` +
|
|
277
|
+
`dependence layer, or use \`--mode callgraph\` for the call-graph blast radius.` +
|
|
278
|
+
(result.note ? `\n${result.note}` : ''));
|
|
279
|
+
}
|
|
280
|
+
// (2) No-body symbol (KTD6) — interface / type alias / abstract / ambient
|
|
281
|
+
// member / one-line declaration with no CFG. Show the caveat, never
|
|
282
|
+
// "isolated / no dependencies".
|
|
283
|
+
if (result.epistemic === 'no-pdg-body') {
|
|
284
|
+
const noBodyLines = [
|
|
285
|
+
`${name}: local PDG slice not applicable to this symbol — it has no PDG body ` +
|
|
286
|
+
`(no control/data dependence edges; e.g. an interface, type alias, ` +
|
|
287
|
+
`abstract/ambient member, or a one-line declaration). This is NOT a ` +
|
|
288
|
+
`confident "no impact".`,
|
|
289
|
+
];
|
|
290
|
+
appendPdgInterproceduralSymbols(noBodyLines);
|
|
291
|
+
if (result.note)
|
|
292
|
+
noBodyLines.push(result.note);
|
|
293
|
+
return noBodyLines.join('\n');
|
|
294
|
+
}
|
|
295
|
+
// (2b) STATEMENT-ANCHORED SLICE (mode:'pdg' + line). When `criterionLine` is
|
|
296
|
+
// present the result is a statement slice: the seeded line plus the list of
|
|
297
|
+
// dependent statements (`affectedStatements: {line,filePath,text}[]`). Render
|
|
298
|
+
// those statements directly — this IS the useful output of statement mode —
|
|
299
|
+
// rather than the symbol-projection bucket below. Empty cases:
|
|
300
|
+
// - `pdg-no-block-at-line`: the line is blank / a comment / outside the
|
|
301
|
+
// body (no statement block) — print the steering note.
|
|
302
|
+
// - empty `affectedStatements` with `pdg-intra-procedural`: the line has no
|
|
303
|
+
// dependents in this direction — print the steering note.
|
|
304
|
+
// Each non-empty case also surfaces truncation honestly.
|
|
305
|
+
if (typeof result.criterionLine === 'number') {
|
|
306
|
+
const slice = Array.isArray(result.affectedStatements)
|
|
307
|
+
? result.affectedStatements
|
|
308
|
+
: [];
|
|
309
|
+
const count = typeof result.affectedStatementCount === 'number'
|
|
310
|
+
? result.affectedStatementCount
|
|
311
|
+
: slice.length;
|
|
312
|
+
// File anchor for the heading — the seeded statement's file (every slice
|
|
313
|
+
// statement shares the function's file). Fall back to the target's file.
|
|
314
|
+
const anchorFile = slice[0]?.filePath || target?.filePath || name;
|
|
315
|
+
if (count === 0 || slice.length === 0) {
|
|
316
|
+
// No statement block at the line, or no dependents in this direction.
|
|
317
|
+
// Print the honest note (pdg-no-block-at-line or the no-dependence note)
|
|
318
|
+
// verbatim — never an empty "isolated" headline.
|
|
319
|
+
const emptySliceLines = [
|
|
320
|
+
`No statements ${direction}-dependent on ${anchorFile}:${result.criterionLine}.`,
|
|
321
|
+
];
|
|
322
|
+
if (result.truncated) {
|
|
323
|
+
const by = formatTruncationSuffix(result);
|
|
324
|
+
emptySliceLines.push(`⚠️ Truncated${by} — the dependence slice was bounded; deeper PDG-dependent statements may exist.`);
|
|
325
|
+
}
|
|
326
|
+
appendPdgInterproceduralSymbols(emptySliceLines);
|
|
327
|
+
if (result.note)
|
|
328
|
+
emptySliceLines.push(result.note);
|
|
329
|
+
return emptySliceLines.join('\n');
|
|
330
|
+
}
|
|
331
|
+
const slLines = [];
|
|
332
|
+
slLines.push(`Statements ${direction}-dependent on ${anchorFile}:${result.criterionLine} (${count}):`);
|
|
333
|
+
for (const s of slice) {
|
|
334
|
+
const text = typeof s.text === 'string' ? s.text : '';
|
|
335
|
+
slLines.push(` L${s.line}: ${text}`);
|
|
336
|
+
}
|
|
337
|
+
// Truncation honesty — the slice may be a lower bound (depth or per-step
|
|
338
|
+
// LIMIT bound). Surface it the same way the symbol render does.
|
|
339
|
+
if (result.truncated) {
|
|
340
|
+
const by = formatTruncationSuffix(result);
|
|
341
|
+
slLines.push(`⚠️ Truncated${by} — the dependence slice was bounded; deeper PDG-dependent statements may exist.`);
|
|
342
|
+
}
|
|
343
|
+
appendPdgInterproceduralSymbols(slLines);
|
|
344
|
+
if (result.note) {
|
|
345
|
+
slLines.push('');
|
|
346
|
+
slLines.push(`ℹ️ ${result.note}`);
|
|
347
|
+
}
|
|
348
|
+
return slLines.join('\n').trim();
|
|
349
|
+
}
|
|
350
|
+
const pdgLines = [];
|
|
351
|
+
if (!appendPdgInterproceduralSymbols(pdgLines)) {
|
|
352
|
+
pdgLines.push(`${name} (${direction}): no inter-procedural symbols reached. ` +
|
|
353
|
+
`The local PDG statement slice may still report affectedStatements when seeded with line:<N>.`);
|
|
354
|
+
}
|
|
355
|
+
// The assembled note carries the local-PDG framing plus the unified
|
|
356
|
+
// inter-procedural symbol-reach contract; surface it verbatim so the CLI
|
|
357
|
+
// reader sees the same honesty the JSON consumer does.
|
|
358
|
+
if (result.note) {
|
|
359
|
+
pdgLines.push('');
|
|
360
|
+
pdgLines.push(`ℹ️ ${result.note}`);
|
|
361
|
+
}
|
|
362
|
+
else {
|
|
363
|
+
pdgLines.push('');
|
|
364
|
+
pdgLines.push('ℹ️ Program Dependence Graph result — statement reach is reported in affectedStatements and inter-procedural symbol reach in interproceduralByDepth/byDepth.');
|
|
365
|
+
}
|
|
366
|
+
// Honest incompleteness signals (block-attribution + truncation).
|
|
367
|
+
if (result.ambiguousProjectionCount > 0) {
|
|
368
|
+
pdgLines.push(`⚠️ ${result.ambiguousProjectionCount} block(s) could not be attributed to a ` +
|
|
369
|
+
`unique owning symbol (same-line functions) — all colliding symbols are shown.`);
|
|
370
|
+
}
|
|
371
|
+
if (result.unresolvedBlockCount > 0) {
|
|
372
|
+
pdgLines.push(`⚠️ ${result.unresolvedBlockCount} dependence block(s) map to no owning ` +
|
|
373
|
+
`Function/Method/Constructor (top-level statement / closure) — surfaced under their file.`);
|
|
374
|
+
}
|
|
375
|
+
if (result.truncated) {
|
|
376
|
+
const by = formatTruncationSuffix(result);
|
|
377
|
+
pdgLines.push(`⚠️ Truncated${by} — the dependence traversal was bounded; deeper PDG impacts may exist.`);
|
|
378
|
+
}
|
|
379
|
+
return pdgLines.join('\n').trim();
|
|
380
|
+
}
|
|
183
381
|
if (total === 0) {
|
|
184
382
|
// #1858 — "isolated" is a confident claim. If an interface / indirection
|
|
185
383
|
// boundary is on the path, the true count is a lower bound, not zero;
|
|
@@ -317,13 +515,20 @@ function formatToolResult(toolName, result) {
|
|
|
317
515
|
// ─── Next-Step Hints ──────────────────────────────────────────────────
|
|
318
516
|
// Guide the agent to the logical next tool call.
|
|
319
517
|
// Critical for tool chaining: query → context → impact → fix.
|
|
320
|
-
function getNextStepHint(toolName) {
|
|
518
|
+
export function getNextStepHint(toolName, result) {
|
|
321
519
|
switch (toolName) {
|
|
322
520
|
case 'query':
|
|
323
521
|
return '\n---\nNext: Pick a symbol above and run gitnexus-context "<name>" to see all its callers, callees, and execution flows.';
|
|
324
522
|
case 'context':
|
|
325
523
|
return '\n---\nNext: To check what breaks if you change this, run gitnexus-impact "<name>" upstream';
|
|
326
524
|
case 'impact':
|
|
525
|
+
if (result?.error ||
|
|
526
|
+
result?.status === 'ambiguous' ||
|
|
527
|
+
result?.mode === 'pdg' ||
|
|
528
|
+
result?.pdgLayer ||
|
|
529
|
+
typeof result?.criterionLine === 'number') {
|
|
530
|
+
return '';
|
|
531
|
+
}
|
|
327
532
|
return '\n---\nNext: Review d=1 items first (WILL BREAK). Read the source with cat to understand the code, then make your fix.';
|
|
328
533
|
case 'cypher':
|
|
329
534
|
return '\n---\nNext: To explore a result symbol in depth, run gitnexus-context "<name>"';
|
|
@@ -376,6 +581,13 @@ export async function evalServerCommand(options) {
|
|
|
376
581
|
process.exit(0);
|
|
377
582
|
}, idleTimeoutSec * 1000);
|
|
378
583
|
}
|
|
584
|
+
// Startup-generated shutdown token: a `POST /shutdown` must present it in the
|
|
585
|
+
// X-Shutdown-Token header. The local agent that launches the server reads it
|
|
586
|
+
// from the GITNEXUS_EVAL_SERVER_SHUTDOWN_TOKEN line on fd 1 (next to the READY
|
|
587
|
+
// signal); a client on another VM under `--host 0.0.0.0` cannot guess it, so it
|
|
588
|
+
// can no longer kill the server. (SIGINT/SIGTERM and the idle timeout still
|
|
589
|
+
// shut down locally without a token.)
|
|
590
|
+
const shutdownToken = crypto.randomBytes(24).toString('hex');
|
|
379
591
|
const server = http.createServer(async (req, res) => {
|
|
380
592
|
resetIdleTimer();
|
|
381
593
|
try {
|
|
@@ -388,6 +600,12 @@ export async function evalServerCommand(options) {
|
|
|
388
600
|
}
|
|
389
601
|
// Shutdown
|
|
390
602
|
if (req.method === 'POST' && req.url === '/shutdown') {
|
|
603
|
+
if (req.headers['x-shutdown-token'] !== shutdownToken) {
|
|
604
|
+
res.setHeader('Content-Type', 'application/json');
|
|
605
|
+
res.writeHead(403);
|
|
606
|
+
res.end(JSON.stringify({ error: 'forbidden: missing or invalid X-Shutdown-Token' }));
|
|
607
|
+
return;
|
|
608
|
+
}
|
|
391
609
|
res.setHeader('Content-Type', 'application/json');
|
|
392
610
|
res.writeHead(200);
|
|
393
611
|
res.end(JSON.stringify({ status: 'shutting_down' }));
|
|
@@ -402,6 +620,12 @@ export async function evalServerCommand(options) {
|
|
|
402
620
|
const toolMatch = req.url?.match(/^\/tool\/(\w+)$/);
|
|
403
621
|
if (req.method === 'POST' && toolMatch) {
|
|
404
622
|
const toolName = toolMatch[1];
|
|
623
|
+
if (!EVAL_SERVER_TOOLS.has(toolName)) {
|
|
624
|
+
res.setHeader('Content-Type', 'text/plain');
|
|
625
|
+
res.writeHead(400);
|
|
626
|
+
res.end(`Error: unsupported tool '${toolName}'. Supported: ${[...EVAL_SERVER_TOOLS].sort().join(', ')}`);
|
|
627
|
+
return;
|
|
628
|
+
}
|
|
405
629
|
const body = await readBody(req);
|
|
406
630
|
let args = {};
|
|
407
631
|
if (body.trim()) {
|
|
@@ -418,7 +642,7 @@ export async function evalServerCommand(options) {
|
|
|
418
642
|
// Call tool, format result as text, append next-step hint
|
|
419
643
|
const result = await backend.callTool(toolName, args);
|
|
420
644
|
const formatted = formatToolResult(toolName, result);
|
|
421
|
-
const hint = getNextStepHint(toolName);
|
|
645
|
+
const hint = getNextStepHint(toolName, result);
|
|
422
646
|
res.setHeader('Content-Type', 'text/plain');
|
|
423
647
|
res.writeHead(200);
|
|
424
648
|
res.end(formatted + hint);
|
|
@@ -518,6 +742,8 @@ export async function evalServerCommand(options) {
|
|
|
518
742
|
try {
|
|
519
743
|
// Use fd 1 directly — LadybugDB captures process.stdout (#324)
|
|
520
744
|
writeSync(1, `GITNEXUS_EVAL_SERVER_READY:${displayHost}:${boundPort}\n`);
|
|
745
|
+
// The launching agent reads this to authorize POST /shutdown.
|
|
746
|
+
writeSync(1, `GITNEXUS_EVAL_SERVER_SHUTDOWN_TOKEN:${shutdownToken}\n`);
|
|
521
747
|
}
|
|
522
748
|
catch {
|
|
523
749
|
// stdout may not be available (e.g., broken pipe)
|
|
@@ -533,6 +759,20 @@ export async function evalServerCommand(options) {
|
|
|
533
759
|
process.on('SIGINT', shutdown);
|
|
534
760
|
process.on('SIGTERM', shutdown);
|
|
535
761
|
}
|
|
762
|
+
/**
|
|
763
|
+
* Tools the eval-server exposes over HTTP — the read-only query surface the
|
|
764
|
+
* banner advertises. `LocalBackend.callTool` ALSO dispatches write-side / heavier
|
|
765
|
+
* tools (rename, shape_check, tool_map, …); the allowlist keeps a stray
|
|
766
|
+
* `POST /tool/<name>` from reaching those through this Docker/eval-harness server.
|
|
767
|
+
*/
|
|
768
|
+
export const EVAL_SERVER_TOOLS = new Set([
|
|
769
|
+
'query',
|
|
770
|
+
'context',
|
|
771
|
+
'impact',
|
|
772
|
+
'cypher',
|
|
773
|
+
'detect_changes',
|
|
774
|
+
'list_repos',
|
|
775
|
+
]);
|
|
536
776
|
export const MAX_BODY_SIZE = 1024 * 1024; // 1MB
|
|
537
777
|
function readBody(req) {
|
|
538
778
|
return new Promise((resolve, reject) => {
|
package/dist/cli/help-i18n.js
CHANGED
|
@@ -27,6 +27,8 @@ const COMMAND_DESCRIPTION_KEYS = {
|
|
|
27
27
|
impact: 'help.command.impact.description',
|
|
28
28
|
cypher: 'help.command.cypher.description',
|
|
29
29
|
'detect-changes': 'help.command.detectChanges.description',
|
|
30
|
+
check: 'help.command.check.description',
|
|
31
|
+
trace: 'help.command.trace.description',
|
|
30
32
|
'eval-server': 'help.command.evalServer.description',
|
|
31
33
|
group: 'help.command.group.description',
|
|
32
34
|
'group create': 'help.command.group.create.description',
|
|
@@ -41,6 +43,7 @@ const COMMAND_DESCRIPTION_KEYS = {
|
|
|
41
43
|
};
|
|
42
44
|
const OPTION_DESCRIPTION_KEYS = {
|
|
43
45
|
'|-V, --version': 'help.option.version',
|
|
46
|
+
'setup|-c, --coding-agent <agents>': 'help.option.setup.codingAgent',
|
|
44
47
|
'analyze|-f, --force': 'help.option.analyze.force',
|
|
45
48
|
'analyze|--repair-fts': 'help.option.analyze.repairFts',
|
|
46
49
|
'analyze|--embeddings [limit]': 'help.option.analyze.embeddings',
|
|
@@ -64,6 +67,10 @@ const OPTION_DESCRIPTION_KEYS = {
|
|
|
64
67
|
'analyze|--embedding-device <device>': 'help.option.analyze.embeddingDevice',
|
|
65
68
|
'index|-f, --force': 'help.option.index.force',
|
|
66
69
|
'index|--allow-non-git': 'help.option.index.allowNonGit',
|
|
70
|
+
'mcp|--http': 'help.option.mcp.http',
|
|
71
|
+
'mcp|-p, --port <port>': 'help.option.port',
|
|
72
|
+
'mcp|--host <host>': 'help.option.mcp.host',
|
|
73
|
+
'mcp|--auth-token <token>': 'help.option.mcp.authToken',
|
|
67
74
|
'serve|-p, --port <port>': 'help.option.port',
|
|
68
75
|
'serve|--host <host>': 'help.option.serve.host',
|
|
69
76
|
'uninstall|-f, --force': 'help.option.uninstall.force',
|
|
@@ -117,6 +124,18 @@ const OPTION_DESCRIPTION_KEYS = {
|
|
|
117
124
|
'detect-changes|-b, --base-ref <ref>': 'help.option.detectChanges.baseRef',
|
|
118
125
|
'detect-changes|-r, --repo <name>': 'help.option.repo.target',
|
|
119
126
|
'detect-changes|--branch <name>': 'help.option.branch',
|
|
127
|
+
'check|--cycles': 'help.option.check.cycles',
|
|
128
|
+
'check|--json': 'help.option.json',
|
|
129
|
+
'check|-r, --repo <name>': 'help.option.repo.target',
|
|
130
|
+
'check|--branch <name>': 'help.option.branch',
|
|
131
|
+
'trace|--from-uid <uid>': 'help.option.trace.fromUid',
|
|
132
|
+
'trace|--from-file <path>': 'help.option.trace.fromFile',
|
|
133
|
+
'trace|--to-uid <uid>': 'help.option.trace.toUid',
|
|
134
|
+
'trace|--to-file <path>': 'help.option.trace.toFile',
|
|
135
|
+
'trace|--depth <n>': 'help.option.trace.depth',
|
|
136
|
+
'trace|--include-tests': 'help.option.trace.includeTests',
|
|
137
|
+
'trace|-r, --repo <name>': 'help.option.repo.target',
|
|
138
|
+
'trace|--branch <name>': 'help.option.branch',
|
|
120
139
|
'eval-server|-p, --port <port>': 'help.option.port',
|
|
121
140
|
'eval-server|--host <host>': 'help.option.evalServer.host',
|
|
122
141
|
'eval-server|--idle-timeout <seconds>': 'help.option.evalServer.idleTimeout',
|
package/dist/cli/i18n/en.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export declare const en: {
|
|
|
51
51
|
readonly 'tool.usage.query': "Usage: gitnexus query <search_query>";
|
|
52
52
|
readonly 'tool.usage.context': "Usage: gitnexus context <symbol_name> [--uid <uid>] [--file <path>]";
|
|
53
53
|
readonly 'tool.usage.impact': "Usage: gitnexus impact <symbol_name> [--uid <uid>] [--file <path>] [--kind <kind>] [--direction upstream|downstream]";
|
|
54
|
+
readonly 'tool.usage.trace': "Usage: gitnexus trace <from> <to> [--from-uid <uid>] [--to-uid <uid>] [--depth <n>]";
|
|
54
55
|
readonly 'tool.usage.cypher': "Usage: gitnexus cypher <cypher_query>";
|
|
55
56
|
readonly 'tool.warn.unknownKind': "--kind '{{kind}}' is not a known symbol kind (e.g. Function, Class, Method); it will not narrow the result.";
|
|
56
57
|
readonly 'tool.detectChanges.noChanges': "No changes detected.";
|
|
@@ -112,7 +113,7 @@ export declare const en: {
|
|
|
112
113
|
readonly 'help.command.analyze.description': "Index a repository (full analysis)";
|
|
113
114
|
readonly 'help.command.index.description': "Register an existing .gitnexus/ folder into the global registry (no re-analysis needed)";
|
|
114
115
|
readonly 'help.command.serve.description': "Start local HTTP server for web UI connection";
|
|
115
|
-
readonly 'help.command.mcp.description': "Start MCP server
|
|
116
|
+
readonly 'help.command.mcp.description': "Start MCP server. Default: stdio. Use --http for a remote HTTP server (Streamable HTTP at POST /mcp + legacy SSE at GET /sse, POST /messages).";
|
|
116
117
|
readonly 'help.command.list.description': "List all indexed repositories";
|
|
117
118
|
readonly 'help.command.status.description': "Show index status for current repo";
|
|
118
119
|
readonly 'help.command.doctor.description': "Show runtime platform capabilities and embedding configuration";
|
|
@@ -124,8 +125,10 @@ export declare const en: {
|
|
|
124
125
|
readonly 'help.command.query.description': "Search the knowledge graph for execution flows related to a concept";
|
|
125
126
|
readonly 'help.command.context.description': "360-degree view of a code symbol: callers, callees, processes";
|
|
126
127
|
readonly 'help.command.impact.description': "Blast radius analysis: what breaks if you change a symbol";
|
|
128
|
+
readonly 'help.command.trace.description': "Find the shortest directed path between two symbols (call + class-member edges)";
|
|
127
129
|
readonly 'help.command.cypher.description': "Execute raw Cypher query against the knowledge graph";
|
|
128
130
|
readonly 'help.command.detectChanges.description': "Map git diff hunks to indexed symbols and affected execution flows";
|
|
131
|
+
readonly 'help.command.check.description': "Run structural checks against the indexed graph";
|
|
129
132
|
readonly 'help.command.evalServer.description': "Start lightweight HTTP server for fast tool calls during evaluation";
|
|
130
133
|
readonly 'help.command.group.description': "Manage repository groups for cross-index impact analysis";
|
|
131
134
|
readonly 'help.command.group.create.description': "Create a new group with template group.yaml";
|
|
@@ -137,6 +140,7 @@ export declare const en: {
|
|
|
137
140
|
readonly 'help.command.group.impact.description': "Cross-repo impact for a symbol in one member repo of a group";
|
|
138
141
|
readonly 'help.command.group.query.description': "Search execution flows across all repos in a group";
|
|
139
142
|
readonly 'help.command.group.contracts.description': "Inspect Contract Registry";
|
|
143
|
+
readonly 'help.option.setup.codingAgent': "Configure only these coding agents (comma-separated or repeatable)";
|
|
140
144
|
readonly 'help.option.analyze.force': "Force full re-index even if up to date";
|
|
141
145
|
readonly 'help.option.analyze.repairFts': "Repair/rebuild search FTS indexes without full re-analysis";
|
|
142
146
|
readonly 'help.option.analyze.embeddings': "Enable embedding generation for semantic search (off by default). Optional [limit] overrides the 50,000-node safety cap; pass 0 to disable the cap entirely.";
|
|
@@ -162,6 +166,9 @@ export declare const en: {
|
|
|
162
166
|
readonly 'help.option.index.allowNonGit': "Allow registering folders that are not Git repositories";
|
|
163
167
|
readonly 'help.option.port': "Port number";
|
|
164
168
|
readonly 'help.option.serve.host': "Bind address (default: 127.0.0.1, use 0.0.0.0 for remote access)";
|
|
169
|
+
readonly 'help.option.mcp.http': "Serve MCP over HTTP instead of stdio (for remote clients)";
|
|
170
|
+
readonly 'help.option.mcp.host': "HTTP bind address (only with --http). Default: 127.0.0.1 (loopback). Use 0.0.0.0 to expose to all interfaces.";
|
|
171
|
+
readonly 'help.option.mcp.authToken': "Require this bearer token in the Authorization header (only with --http); may also be set via the GITNEXUS_MCP_AUTH_TOKEN env var. Required for a non-loopback bind (--host 0.0.0.0/::), which otherwise refuses to start.";
|
|
165
172
|
readonly 'help.option.force.confirmation': "Skip confirmation prompt";
|
|
166
173
|
readonly 'help.option.uninstall.force': "Apply the changes (default is a dry-run preview)";
|
|
167
174
|
readonly 'help.option.clean.all': "Clean all indexed repos";
|
|
@@ -198,8 +205,15 @@ export declare const en: {
|
|
|
198
205
|
readonly 'help.option.impact.limit': "Max symbols per depth level (default: 100)";
|
|
199
206
|
readonly 'help.option.impact.offset': "Skip N symbols per depth level for pagination";
|
|
200
207
|
readonly 'help.option.impact.summaryOnly': "Return counts and risk only, omit symbol list";
|
|
208
|
+
readonly 'help.option.trace.fromUid': "Source symbol UID (zero-ambiguity lookup)";
|
|
209
|
+
readonly 'help.option.trace.fromFile': "Source file path to disambiguate common names";
|
|
210
|
+
readonly 'help.option.trace.toUid': "Target symbol UID (zero-ambiguity lookup)";
|
|
211
|
+
readonly 'help.option.trace.toFile': "Target file path to disambiguate common names";
|
|
212
|
+
readonly 'help.option.trace.depth': "Max path length in hops (default: 10)";
|
|
213
|
+
readonly 'help.option.trace.includeTests': "Traverse through test-file symbols (default: false)";
|
|
201
214
|
readonly 'help.option.detectChanges.scope': "What to analyze: unstaged, staged, all, or compare";
|
|
202
215
|
readonly 'help.option.detectChanges.baseRef': "Branch/commit for compare scope (e.g. main)";
|
|
216
|
+
readonly 'help.option.check.cycles': "Detect circular imports and fail when any are found";
|
|
203
217
|
readonly 'help.option.evalServer.host': "Bind address (default: 127.0.0.1, use 0.0.0.0 to expose to all interfaces)";
|
|
204
218
|
readonly 'help.option.evalServer.idleTimeout': "Auto-shutdown after N seconds idle (0 = disabled)";
|
|
205
219
|
readonly 'help.option.group.create.force': "Overwrite existing group";
|
package/dist/cli/i18n/en.js
CHANGED
|
@@ -51,6 +51,7 @@ export const en = {
|
|
|
51
51
|
'tool.usage.query': 'Usage: gitnexus query <search_query>',
|
|
52
52
|
'tool.usage.context': 'Usage: gitnexus context <symbol_name> [--uid <uid>] [--file <path>]',
|
|
53
53
|
'tool.usage.impact': 'Usage: gitnexus impact <symbol_name> [--uid <uid>] [--file <path>] [--kind <kind>] [--direction upstream|downstream]',
|
|
54
|
+
'tool.usage.trace': 'Usage: gitnexus trace <from> <to> [--from-uid <uid>] [--to-uid <uid>] [--depth <n>]',
|
|
54
55
|
'tool.usage.cypher': 'Usage: gitnexus cypher <cypher_query>',
|
|
55
56
|
'tool.warn.unknownKind': "--kind '{{kind}}' is not a known symbol kind (e.g. Function, Class, Method); it will not narrow the result.",
|
|
56
57
|
'tool.detectChanges.noChanges': 'No changes detected.',
|
|
@@ -112,7 +113,7 @@ export const en = {
|
|
|
112
113
|
'help.command.analyze.description': 'Index a repository (full analysis)',
|
|
113
114
|
'help.command.index.description': 'Register an existing .gitnexus/ folder into the global registry (no re-analysis needed)',
|
|
114
115
|
'help.command.serve.description': 'Start local HTTP server for web UI connection',
|
|
115
|
-
'help.command.mcp.description': 'Start MCP server
|
|
116
|
+
'help.command.mcp.description': 'Start MCP server. Default: stdio. Use --http for a remote HTTP server (Streamable HTTP at POST /mcp + legacy SSE at GET /sse, POST /messages).',
|
|
116
117
|
'help.command.list.description': 'List all indexed repositories',
|
|
117
118
|
'help.command.status.description': 'Show index status for current repo',
|
|
118
119
|
'help.command.doctor.description': 'Show runtime platform capabilities and embedding configuration',
|
|
@@ -124,8 +125,10 @@ export const en = {
|
|
|
124
125
|
'help.command.query.description': 'Search the knowledge graph for execution flows related to a concept',
|
|
125
126
|
'help.command.context.description': '360-degree view of a code symbol: callers, callees, processes',
|
|
126
127
|
'help.command.impact.description': 'Blast radius analysis: what breaks if you change a symbol',
|
|
128
|
+
'help.command.trace.description': 'Find the shortest directed path between two symbols (call + class-member edges)',
|
|
127
129
|
'help.command.cypher.description': 'Execute raw Cypher query against the knowledge graph',
|
|
128
130
|
'help.command.detectChanges.description': 'Map git diff hunks to indexed symbols and affected execution flows',
|
|
131
|
+
'help.command.check.description': 'Run structural checks against the indexed graph',
|
|
129
132
|
'help.command.evalServer.description': 'Start lightweight HTTP server for fast tool calls during evaluation',
|
|
130
133
|
'help.command.group.description': 'Manage repository groups for cross-index impact analysis',
|
|
131
134
|
'help.command.group.create.description': 'Create a new group with template group.yaml',
|
|
@@ -137,6 +140,7 @@ export const en = {
|
|
|
137
140
|
'help.command.group.impact.description': 'Cross-repo impact for a symbol in one member repo of a group',
|
|
138
141
|
'help.command.group.query.description': 'Search execution flows across all repos in a group',
|
|
139
142
|
'help.command.group.contracts.description': 'Inspect Contract Registry',
|
|
143
|
+
'help.option.setup.codingAgent': 'Configure only these coding agents (comma-separated or repeatable)',
|
|
140
144
|
'help.option.analyze.force': 'Force full re-index even if up to date',
|
|
141
145
|
'help.option.analyze.repairFts': 'Repair/rebuild search FTS indexes without full re-analysis',
|
|
142
146
|
'help.option.analyze.embeddings': 'Enable embedding generation for semantic search (off by default). Optional [limit] overrides the 50,000-node safety cap; pass 0 to disable the cap entirely.',
|
|
@@ -162,6 +166,9 @@ export const en = {
|
|
|
162
166
|
'help.option.index.allowNonGit': 'Allow registering folders that are not Git repositories',
|
|
163
167
|
'help.option.port': 'Port number',
|
|
164
168
|
'help.option.serve.host': 'Bind address (default: 127.0.0.1, use 0.0.0.0 for remote access)',
|
|
169
|
+
'help.option.mcp.http': 'Serve MCP over HTTP instead of stdio (for remote clients)',
|
|
170
|
+
'help.option.mcp.host': 'HTTP bind address (only with --http). Default: 127.0.0.1 (loopback). Use 0.0.0.0 to expose to all interfaces.',
|
|
171
|
+
'help.option.mcp.authToken': 'Require this bearer token in the Authorization header (only with --http); may also be set via the GITNEXUS_MCP_AUTH_TOKEN env var. Required for a non-loopback bind (--host 0.0.0.0/::), which otherwise refuses to start.',
|
|
165
172
|
'help.option.force.confirmation': 'Skip confirmation prompt',
|
|
166
173
|
'help.option.uninstall.force': 'Apply the changes (default is a dry-run preview)',
|
|
167
174
|
'help.option.clean.all': 'Clean all indexed repos',
|
|
@@ -198,8 +205,15 @@ export const en = {
|
|
|
198
205
|
'help.option.impact.limit': 'Max symbols per depth level (default: 100)',
|
|
199
206
|
'help.option.impact.offset': 'Skip N symbols per depth level for pagination',
|
|
200
207
|
'help.option.impact.summaryOnly': 'Return counts and risk only, omit symbol list',
|
|
208
|
+
'help.option.trace.fromUid': 'Source symbol UID (zero-ambiguity lookup)',
|
|
209
|
+
'help.option.trace.fromFile': 'Source file path to disambiguate common names',
|
|
210
|
+
'help.option.trace.toUid': 'Target symbol UID (zero-ambiguity lookup)',
|
|
211
|
+
'help.option.trace.toFile': 'Target file path to disambiguate common names',
|
|
212
|
+
'help.option.trace.depth': 'Max path length in hops (default: 10)',
|
|
213
|
+
'help.option.trace.includeTests': 'Traverse through test-file symbols (default: false)',
|
|
201
214
|
'help.option.detectChanges.scope': 'What to analyze: unstaged, staged, all, or compare',
|
|
202
215
|
'help.option.detectChanges.baseRef': 'Branch/commit for compare scope (e.g. main)',
|
|
216
|
+
'help.option.check.cycles': 'Detect circular imports and fail when any are found',
|
|
203
217
|
'help.option.evalServer.host': 'Bind address (default: 127.0.0.1, use 0.0.0.0 to expose to all interfaces)',
|
|
204
218
|
'help.option.evalServer.idleTimeout': 'Auto-shutdown after N seconds idle (0 = disabled)',
|
|
205
219
|
'help.option.group.create.force': 'Overwrite existing group',
|
|
@@ -52,6 +52,7 @@ export declare const cliResources: {
|
|
|
52
52
|
readonly 'tool.usage.query': "Usage: gitnexus query <search_query>";
|
|
53
53
|
readonly 'tool.usage.context': "Usage: gitnexus context <symbol_name> [--uid <uid>] [--file <path>]";
|
|
54
54
|
readonly 'tool.usage.impact': "Usage: gitnexus impact <symbol_name> [--uid <uid>] [--file <path>] [--kind <kind>] [--direction upstream|downstream]";
|
|
55
|
+
readonly 'tool.usage.trace': "Usage: gitnexus trace <from> <to> [--from-uid <uid>] [--to-uid <uid>] [--depth <n>]";
|
|
55
56
|
readonly 'tool.usage.cypher': "Usage: gitnexus cypher <cypher_query>";
|
|
56
57
|
readonly 'tool.warn.unknownKind': "--kind '{{kind}}' is not a known symbol kind (e.g. Function, Class, Method); it will not narrow the result.";
|
|
57
58
|
readonly 'tool.detectChanges.noChanges': "No changes detected.";
|
|
@@ -113,7 +114,7 @@ export declare const cliResources: {
|
|
|
113
114
|
readonly 'help.command.analyze.description': "Index a repository (full analysis)";
|
|
114
115
|
readonly 'help.command.index.description': "Register an existing .gitnexus/ folder into the global registry (no re-analysis needed)";
|
|
115
116
|
readonly 'help.command.serve.description': "Start local HTTP server for web UI connection";
|
|
116
|
-
readonly 'help.command.mcp.description': "Start MCP server
|
|
117
|
+
readonly 'help.command.mcp.description': "Start MCP server. Default: stdio. Use --http for a remote HTTP server (Streamable HTTP at POST /mcp + legacy SSE at GET /sse, POST /messages).";
|
|
117
118
|
readonly 'help.command.list.description': "List all indexed repositories";
|
|
118
119
|
readonly 'help.command.status.description': "Show index status for current repo";
|
|
119
120
|
readonly 'help.command.doctor.description': "Show runtime platform capabilities and embedding configuration";
|
|
@@ -125,8 +126,10 @@ export declare const cliResources: {
|
|
|
125
126
|
readonly 'help.command.query.description': "Search the knowledge graph for execution flows related to a concept";
|
|
126
127
|
readonly 'help.command.context.description': "360-degree view of a code symbol: callers, callees, processes";
|
|
127
128
|
readonly 'help.command.impact.description': "Blast radius analysis: what breaks if you change a symbol";
|
|
129
|
+
readonly 'help.command.trace.description': "Find the shortest directed path between two symbols (call + class-member edges)";
|
|
128
130
|
readonly 'help.command.cypher.description': "Execute raw Cypher query against the knowledge graph";
|
|
129
131
|
readonly 'help.command.detectChanges.description': "Map git diff hunks to indexed symbols and affected execution flows";
|
|
132
|
+
readonly 'help.command.check.description': "Run structural checks against the indexed graph";
|
|
130
133
|
readonly 'help.command.evalServer.description': "Start lightweight HTTP server for fast tool calls during evaluation";
|
|
131
134
|
readonly 'help.command.group.description': "Manage repository groups for cross-index impact analysis";
|
|
132
135
|
readonly 'help.command.group.create.description': "Create a new group with template group.yaml";
|
|
@@ -138,6 +141,7 @@ export declare const cliResources: {
|
|
|
138
141
|
readonly 'help.command.group.impact.description': "Cross-repo impact for a symbol in one member repo of a group";
|
|
139
142
|
readonly 'help.command.group.query.description': "Search execution flows across all repos in a group";
|
|
140
143
|
readonly 'help.command.group.contracts.description': "Inspect Contract Registry";
|
|
144
|
+
readonly 'help.option.setup.codingAgent': "Configure only these coding agents (comma-separated or repeatable)";
|
|
141
145
|
readonly 'help.option.analyze.force': "Force full re-index even if up to date";
|
|
142
146
|
readonly 'help.option.analyze.repairFts': "Repair/rebuild search FTS indexes without full re-analysis";
|
|
143
147
|
readonly 'help.option.analyze.embeddings': "Enable embedding generation for semantic search (off by default). Optional [limit] overrides the 50,000-node safety cap; pass 0 to disable the cap entirely.";
|
|
@@ -163,6 +167,9 @@ export declare const cliResources: {
|
|
|
163
167
|
readonly 'help.option.index.allowNonGit': "Allow registering folders that are not Git repositories";
|
|
164
168
|
readonly 'help.option.port': "Port number";
|
|
165
169
|
readonly 'help.option.serve.host': "Bind address (default: 127.0.0.1, use 0.0.0.0 for remote access)";
|
|
170
|
+
readonly 'help.option.mcp.http': "Serve MCP over HTTP instead of stdio (for remote clients)";
|
|
171
|
+
readonly 'help.option.mcp.host': "HTTP bind address (only with --http). Default: 127.0.0.1 (loopback). Use 0.0.0.0 to expose to all interfaces.";
|
|
172
|
+
readonly 'help.option.mcp.authToken': "Require this bearer token in the Authorization header (only with --http); may also be set via the GITNEXUS_MCP_AUTH_TOKEN env var. Required for a non-loopback bind (--host 0.0.0.0/::), which otherwise refuses to start.";
|
|
166
173
|
readonly 'help.option.force.confirmation': "Skip confirmation prompt";
|
|
167
174
|
readonly 'help.option.uninstall.force': "Apply the changes (default is a dry-run preview)";
|
|
168
175
|
readonly 'help.option.clean.all': "Clean all indexed repos";
|
|
@@ -199,8 +206,15 @@ export declare const cliResources: {
|
|
|
199
206
|
readonly 'help.option.impact.limit': "Max symbols per depth level (default: 100)";
|
|
200
207
|
readonly 'help.option.impact.offset': "Skip N symbols per depth level for pagination";
|
|
201
208
|
readonly 'help.option.impact.summaryOnly': "Return counts and risk only, omit symbol list";
|
|
209
|
+
readonly 'help.option.trace.fromUid': "Source symbol UID (zero-ambiguity lookup)";
|
|
210
|
+
readonly 'help.option.trace.fromFile': "Source file path to disambiguate common names";
|
|
211
|
+
readonly 'help.option.trace.toUid': "Target symbol UID (zero-ambiguity lookup)";
|
|
212
|
+
readonly 'help.option.trace.toFile': "Target file path to disambiguate common names";
|
|
213
|
+
readonly 'help.option.trace.depth': "Max path length in hops (default: 10)";
|
|
214
|
+
readonly 'help.option.trace.includeTests': "Traverse through test-file symbols (default: false)";
|
|
202
215
|
readonly 'help.option.detectChanges.scope': "What to analyze: unstaged, staged, all, or compare";
|
|
203
216
|
readonly 'help.option.detectChanges.baseRef': "Branch/commit for compare scope (e.g. main)";
|
|
217
|
+
readonly 'help.option.check.cycles': "Detect circular imports and fail when any are found";
|
|
204
218
|
readonly 'help.option.evalServer.host': "Bind address (default: 127.0.0.1, use 0.0.0.0 to expose to all interfaces)";
|
|
205
219
|
readonly 'help.option.evalServer.idleTimeout': "Auto-shutdown after N seconds idle (0 = disabled)";
|
|
206
220
|
readonly 'help.option.group.create.force': "Overwrite existing group";
|
|
@@ -276,6 +290,7 @@ export declare const cliResources: {
|
|
|
276
290
|
'tool.usage.query': string;
|
|
277
291
|
'tool.usage.context': string;
|
|
278
292
|
'tool.usage.impact': string;
|
|
293
|
+
'tool.usage.trace': string;
|
|
279
294
|
'tool.usage.cypher': string;
|
|
280
295
|
'tool.warn.unknownKind': string;
|
|
281
296
|
'tool.detectChanges.noChanges': string;
|
|
@@ -349,8 +364,10 @@ export declare const cliResources: {
|
|
|
349
364
|
'help.command.query.description': string;
|
|
350
365
|
'help.command.context.description': string;
|
|
351
366
|
'help.command.impact.description': string;
|
|
367
|
+
'help.command.trace.description': string;
|
|
352
368
|
'help.command.cypher.description': string;
|
|
353
369
|
'help.command.detectChanges.description': string;
|
|
370
|
+
'help.command.check.description': string;
|
|
354
371
|
'help.command.evalServer.description': string;
|
|
355
372
|
'help.command.group.description': string;
|
|
356
373
|
'help.command.group.create.description': string;
|
|
@@ -362,6 +379,7 @@ export declare const cliResources: {
|
|
|
362
379
|
'help.command.group.impact.description': string;
|
|
363
380
|
'help.command.group.query.description': string;
|
|
364
381
|
'help.command.group.contracts.description': string;
|
|
382
|
+
'help.option.setup.codingAgent': string;
|
|
365
383
|
'help.option.analyze.force': string;
|
|
366
384
|
'help.option.analyze.repairFts': string;
|
|
367
385
|
'help.option.analyze.embeddings': string;
|
|
@@ -387,6 +405,9 @@ export declare const cliResources: {
|
|
|
387
405
|
'help.option.index.allowNonGit': string;
|
|
388
406
|
'help.option.port': string;
|
|
389
407
|
'help.option.serve.host': string;
|
|
408
|
+
'help.option.mcp.http': string;
|
|
409
|
+
'help.option.mcp.host': string;
|
|
410
|
+
'help.option.mcp.authToken': string;
|
|
390
411
|
'help.option.force.confirmation': string;
|
|
391
412
|
'help.option.uninstall.force': string;
|
|
392
413
|
'help.option.clean.all': string;
|
|
@@ -423,8 +444,15 @@ export declare const cliResources: {
|
|
|
423
444
|
'help.option.impact.limit': string;
|
|
424
445
|
'help.option.impact.offset': string;
|
|
425
446
|
'help.option.impact.summaryOnly': string;
|
|
447
|
+
'help.option.trace.fromUid': string;
|
|
448
|
+
'help.option.trace.fromFile': string;
|
|
449
|
+
'help.option.trace.toUid': string;
|
|
450
|
+
'help.option.trace.toFile': string;
|
|
451
|
+
'help.option.trace.depth': string;
|
|
452
|
+
'help.option.trace.includeTests': string;
|
|
426
453
|
'help.option.detectChanges.scope': string;
|
|
427
454
|
'help.option.detectChanges.baseRef': string;
|
|
455
|
+
'help.option.check.cycles': string;
|
|
428
456
|
'help.option.evalServer.host': string;
|
|
429
457
|
'help.option.evalServer.idleTimeout': string;
|
|
430
458
|
'help.option.group.create.force': string;
|