gitnexus 1.6.11-rc.8 → 1.6.11
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 +95 -26
- package/dist/_shared/graph/types.d.ts +81 -2
- package/dist/_shared/graph/types.d.ts.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.map +1 -1
- package/dist/_shared/integrations/resilient-fetch.js.map +1 -1
- package/dist/_shared/language-detection.d.ts.map +1 -1
- package/dist/_shared/language-detection.js +2 -0
- package/dist/_shared/language-detection.js.map +1 -1
- package/dist/_shared/languages.d.ts +2 -1
- package/dist/_shared/languages.d.ts.map +1 -1
- package/dist/_shared/languages.js +1 -0
- package/dist/_shared/languages.js.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 +4 -0
- package/dist/_shared/lbug/schema-constants.js.map +1 -1
- package/dist/_shared/scope-resolution/evidence-weights.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/finalize-algorithm.js +1 -0
- package/dist/_shared/scope-resolution/finalize-algorithm.js.map +1 -1
- package/dist/_shared/scope-resolution/language-classification.d.ts +3 -0
- package/dist/_shared/scope-resolution/language-classification.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/language-classification.js +4 -0
- package/dist/_shared/scope-resolution/language-classification.js.map +1 -1
- package/dist/_shared/scope-resolution/reference-site.d.ts +10 -0
- 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/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/types.d.ts +15 -0
- package/dist/_shared/scope-resolution/types.d.ts.map +1 -1
- package/dist/cli/ai-context.d.ts +4 -0
- package/dist/cli/ai-context.js +90 -14
- package/dist/cli/analyze-config.js +14 -0
- package/dist/cli/analyze-options.d.ts +14 -0
- package/dist/cli/analyze-watch.d.ts +20 -0
- package/dist/cli/analyze-watch.js +434 -0
- package/dist/cli/analyze.js +27 -9
- package/dist/cli/auto-sync.d.ts +1 -0
- package/dist/cli/auto-sync.js +107 -0
- package/dist/cli/command-banner.d.ts +15 -0
- package/dist/cli/command-banner.js +42 -0
- package/dist/cli/detect-changes-format.js +21 -0
- package/dist/cli/doctor.d.ts +7 -0
- package/dist/cli/doctor.js +14 -0
- package/dist/cli/group.js +7 -1
- package/dist/cli/help-i18n.js +4 -0
- package/dist/cli/i18n/en.d.ts +18 -3
- package/dist/cli/i18n/en.js +18 -3
- package/dist/cli/i18n/resources.d.ts +33 -3
- package/dist/cli/i18n/zh-CN.d.ts +15 -0
- package/dist/cli/i18n/zh-CN.js +18 -3
- package/dist/cli/index.js +34 -7
- package/dist/cli/mcp.d.ts +15 -0
- package/dist/cli/mcp.js +44 -0
- package/dist/cli/optional-grammars.d.ts +3 -2
- package/dist/cli/optional-grammars.js +19 -3
- package/dist/cli/setup.js +41 -15
- package/dist/cli/update-notice.d.ts +34 -0
- package/dist/cli/update-notice.js +91 -0
- package/dist/cli/update.d.ts +21 -0
- package/dist/cli/update.js +93 -0
- package/dist/cli/watch.d.ts +1 -20
- package/dist/cli/watch.js +5 -371
- package/dist/core/analysis-feature-registry.d.ts +2 -0
- package/dist/core/analysis-feature-registry.js +15 -0
- package/dist/core/analyzer-identity.js +21 -3
- package/dist/core/auto-sync/analysis-worker-launch.d.ts +30 -0
- package/dist/core/auto-sync/analysis-worker-launch.js +166 -0
- package/dist/core/auto-sync/config.d.ts +33 -0
- package/dist/core/auto-sync/config.js +320 -0
- package/dist/core/auto-sync/index.d.ts +6 -0
- package/dist/core/auto-sync/index.js +6 -0
- package/dist/core/auto-sync/path-security.d.ts +9 -0
- package/dist/core/auto-sync/path-security.js +251 -0
- package/dist/core/auto-sync/repo.d.ts +1 -0
- package/dist/core/auto-sync/repo.js +6 -0
- package/dist/core/auto-sync/runner.d.ts +44 -0
- package/dist/core/auto-sync/runner.js +428 -0
- package/dist/core/auto-sync/starter.d.ts +50 -0
- package/dist/core/auto-sync/starter.js +497 -0
- package/dist/core/auto-sync/state.d.ts +37 -0
- package/dist/core/auto-sync/state.js +119 -0
- package/dist/core/group/config-parser.js +8 -1
- package/dist/core/group/cross-impact.d.ts +3 -0
- package/dist/core/group/cross-impact.js +36 -4
- package/dist/core/group/extractors/http-patterns/java.js +22 -8
- package/dist/core/group/extractors/http-patterns/kotlin.js +86 -31
- package/dist/core/group/extractors/http-patterns/node.js +145 -8
- package/dist/core/group/extractors/http-patterns/python.js +11 -7
- package/dist/core/group/extractors/http-route-extractor.js +63 -17
- package/dist/core/group/extractors/java-workspace-extractor.js +244 -31
- package/dist/core/group/group-lock.js +5 -6
- package/dist/core/group/normalization.d.ts +38 -1
- package/dist/core/group/normalization.js +59 -3
- package/dist/core/group/service.d.ts +11 -0
- package/dist/core/group/service.js +13 -1
- package/dist/core/group/storage.js +2 -2
- package/dist/core/group/sync.d.ts +24 -1
- package/dist/core/group/sync.js +46 -8
- package/dist/core/group/types.d.ts +13 -0
- package/dist/core/incremental/derived-writeback.d.ts +36 -0
- package/dist/core/incremental/derived-writeback.js +68 -0
- package/dist/core/incremental/spring-config-drift.d.ts +12 -0
- package/dist/core/incremental/spring-config-drift.js +46 -0
- package/dist/core/incremental/subgraph-extract.d.ts +7 -4
- package/dist/core/incremental/subgraph-extract.js +30 -5
- package/dist/core/ingestion/asyncapi/document.d.ts +226 -0
- package/dist/core/ingestion/asyncapi/document.js +758 -0
- package/dist/core/ingestion/asyncapi/protocol.d.ts +79 -0
- package/dist/core/ingestion/asyncapi/protocol.js +203 -0
- package/dist/core/ingestion/call-extractors/configs/zig.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/zig.js +4 -0
- package/dist/core/ingestion/call-extractors/zig-static-gating.d.ts +100 -0
- package/dist/core/ingestion/call-extractors/zig-static-gating.js +319 -0
- package/dist/core/ingestion/call-processor.js +3 -1
- package/dist/core/ingestion/class-extractors/configs/zig.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/zig.js +32 -0
- package/dist/core/ingestion/class-extractors/generic.js +4 -1
- package/dist/core/ingestion/class-types.d.ts +6 -2
- package/dist/core/ingestion/destination-key.d.ts +59 -0
- package/dist/core/ingestion/destination-key.js +61 -0
- package/dist/core/ingestion/entry-point-scoring.d.ts +6 -2
- package/dist/core/ingestion/entry-point-scoring.js +8 -44
- package/dist/core/ingestion/export-detection.d.ts +37 -0
- package/dist/core/ingestion/export-detection.js +60 -0
- package/dist/core/ingestion/field-extractors/configs/zig.d.ts +8 -0
- package/dist/core/ingestion/field-extractors/configs/zig.js +49 -0
- package/dist/core/ingestion/field-extractors/generic.d.ts +1 -1
- package/dist/core/ingestion/field-extractors/generic.js +12 -1
- package/dist/core/ingestion/frameworks/spring/actuator-runtime.d.ts +26 -0
- package/dist/core/ingestion/frameworks/spring/actuator-runtime.js +843 -0
- package/dist/core/ingestion/frameworks/spring/analysis-features.d.ts +5 -0
- package/dist/core/ingestion/frameworks/spring/analysis-features.js +9 -0
- package/dist/core/ingestion/frameworks/spring/annotation-arguments.js +8 -1
- package/dist/core/ingestion/frameworks/spring/argument-facts.d.ts +80 -0
- package/dist/core/ingestion/frameworks/spring/argument-facts.js +85 -0
- package/dist/core/ingestion/frameworks/spring/config-bindings.d.ts +1 -0
- package/dist/core/ingestion/frameworks/spring/config-bindings.js +2 -1
- package/dist/core/ingestion/frameworks/spring/destinations.d.ts +539 -0
- package/dist/core/ingestion/frameworks/spring/destinations.js +840 -0
- package/dist/core/ingestion/frameworks/spring/dynamic-lookups.d.ts +22 -0
- package/dist/core/ingestion/frameworks/spring/dynamic-lookups.js +124 -0
- package/dist/core/ingestion/frameworks/spring/message-producers.d.ts +78 -0
- package/dist/core/ingestion/frameworks/spring/message-producers.js +90 -0
- package/dist/core/ingestion/frameworks/spring/non-http-handlers.d.ts +29 -0
- package/dist/core/ingestion/frameworks/spring/vendor-prefixes.d.ts +7 -0
- package/dist/core/ingestion/frameworks/spring/vendor-prefixes.js +22 -0
- package/dist/core/ingestion/import-resolvers/configs/zig.d.ts +13 -0
- package/dist/core/ingestion/import-resolvers/configs/zig.js +26 -0
- package/dist/core/ingestion/import-resolvers/zig.d.ts +34 -0
- package/dist/core/ingestion/import-resolvers/zig.js +193 -0
- package/dist/core/ingestion/language-config.d.ts +177 -0
- package/dist/core/ingestion/language-config.js +719 -0
- package/dist/core/ingestion/language-provider.d.ts +178 -1
- package/dist/core/ingestion/language-provider.js +22 -0
- package/dist/core/ingestion/languages/csharp/razor-view-components.d.ts +62 -0
- package/dist/core/ingestion/languages/csharp/razor-view-components.js +954 -0
- package/dist/core/ingestion/languages/csharp/resolution-config.d.ts +3 -0
- package/dist/core/ingestion/languages/csharp/resolution-config.js +6 -1
- package/dist/core/ingestion/languages/csharp/scope-resolver.js +8 -0
- package/dist/core/ingestion/languages/index.d.ts +1 -0
- package/dist/core/ingestion/languages/index.js +2 -0
- package/dist/core/ingestion/languages/java/analysis-features.d.ts +1 -1
- package/dist/core/ingestion/languages/java/analysis-features.js +14 -6
- package/dist/core/ingestion/languages/java/capture-side-channel.d.ts +8 -0
- package/dist/core/ingestion/languages/java/capture-side-channel.js +34 -0
- package/dist/core/ingestion/languages/java/captures.js +22 -1
- package/dist/core/ingestion/languages/java/lombok-synthesizer.d.ts +42 -0
- package/dist/core/ingestion/languages/java/lombok-synthesizer.js +439 -0
- package/dist/core/ingestion/languages/java/scope-resolver.js +2 -0
- package/dist/core/ingestion/languages/java/spring-actuator.d.ts +2 -0
- package/dist/core/ingestion/languages/java/spring-actuator.js +62 -0
- package/dist/core/ingestion/languages/java/spring-di.d.ts +17 -1
- package/dist/core/ingestion/languages/java/spring-di.js +44 -2
- package/dist/core/ingestion/languages/java/spring-dynamic-lookup.d.ts +8 -0
- package/dist/core/ingestion/languages/java/spring-dynamic-lookup.js +62 -0
- package/dist/core/ingestion/languages/java/spring-message-producers.d.ts +20 -0
- package/dist/core/ingestion/languages/java/spring-message-producers.js +83 -0
- package/dist/core/ingestion/languages/java/spring-non-http-handlers.d.ts +11 -1
- package/dist/core/ingestion/languages/java/spring-non-http-handlers.js +13 -3
- package/dist/core/ingestion/languages/java.js +18 -8
- package/dist/core/ingestion/languages/jvm/accessor-synthesis.d.ts +99 -0
- package/dist/core/ingestion/languages/jvm/accessor-synthesis.js +173 -0
- package/dist/core/ingestion/languages/jvm/beanspec.d.ts +17 -0
- package/dist/core/ingestion/languages/jvm/beanspec.js +42 -0
- package/dist/core/ingestion/languages/kotlin/capture-side-channel.d.ts +15 -0
- package/dist/core/ingestion/languages/kotlin/capture-side-channel.js +50 -0
- package/dist/core/ingestion/languages/kotlin/captures.js +24 -1
- package/dist/core/ingestion/languages/kotlin/lombok-synthesizer.d.ts +26 -0
- package/dist/core/ingestion/languages/kotlin/lombok-synthesizer.js +417 -0
- package/dist/core/ingestion/languages/kotlin/scope-resolver.js +4 -0
- package/dist/core/ingestion/languages/kotlin/spring-actuator.d.ts +4 -0
- package/dist/core/ingestion/languages/kotlin/spring-actuator.js +172 -0
- package/dist/core/ingestion/languages/kotlin/spring-config-bindings.d.ts +18 -0
- package/dist/core/ingestion/languages/kotlin/spring-config-bindings.js +411 -0
- package/dist/core/ingestion/languages/kotlin/spring-di.d.ts +51 -1
- package/dist/core/ingestion/languages/kotlin/spring-di.js +86 -6
- package/dist/core/ingestion/languages/kotlin/spring-dynamic-lookup.d.ts +8 -0
- package/dist/core/ingestion/languages/kotlin/spring-dynamic-lookup.js +77 -0
- package/dist/core/ingestion/languages/kotlin/spring-message-producers.d.ts +17 -0
- package/dist/core/ingestion/languages/kotlin/spring-message-producers.js +119 -0
- package/dist/core/ingestion/languages/kotlin/spring-non-http-handlers.d.ts +16 -0
- package/dist/core/ingestion/languages/kotlin/spring-non-http-handlers.js +77 -2
- package/dist/core/ingestion/languages/kotlin.js +24 -0
- package/dist/core/ingestion/languages/python.js +2 -0
- package/dist/core/ingestion/languages/rust/query.js +8 -8
- package/dist/core/ingestion/languages/zig/captures.d.ts +260 -0
- package/dist/core/ingestion/languages/zig/captures.js +2070 -0
- package/dist/core/ingestion/languages/zig/index.d.ts +4 -0
- package/dist/core/ingestion/languages/zig/index.js +4 -0
- package/dist/core/ingestion/languages/zig/interpret.d.ts +36 -0
- package/dist/core/ingestion/languages/zig/interpret.js +176 -0
- package/dist/core/ingestion/languages/zig/query.d.ts +3 -0
- package/dist/core/ingestion/languages/zig/query.js +426 -0
- package/dist/core/ingestion/languages/zig/range-binding.d.ts +37 -0
- package/dist/core/ingestion/languages/zig/range-binding.js +373 -0
- package/dist/core/ingestion/languages/zig/scope-resolver.d.ts +12 -0
- package/dist/core/ingestion/languages/zig/scope-resolver.js +58 -0
- package/dist/core/ingestion/languages/zig/simple-hooks.d.ts +25 -0
- package/dist/core/ingestion/languages/zig/simple-hooks.js +143 -0
- package/dist/core/ingestion/languages/zig.d.ts +32 -0
- package/dist/core/ingestion/languages/zig.js +130 -0
- package/dist/core/ingestion/method-extractors/configs/zig.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/zig.js +120 -0
- package/dist/core/ingestion/method-extractors/generic.js +16 -4
- package/dist/core/ingestion/method-types.d.ts +10 -4
- package/dist/core/ingestion/model/field-registry.d.ts +3 -3
- package/dist/core/ingestion/model/field-registry.js +11 -7
- package/dist/core/ingestion/model/method-registry.d.ts +3 -3
- package/dist/core/ingestion/model/method-registry.js +13 -8
- package/dist/core/ingestion/model/registration-table.js +3 -0
- package/dist/core/ingestion/model/type-registry.js +8 -4
- package/dist/core/ingestion/pipeline-phases/di.js +47 -14
- package/dist/core/ingestion/pipeline-phases/index.d.ts +1 -0
- package/dist/core/ingestion/pipeline-phases/index.js +1 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +7 -1
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +79 -91
- package/dist/core/ingestion/pipeline-phases/parse.d.ts +17 -0
- package/dist/core/ingestion/pipeline-phases/processes.d.ts +2 -1
- package/dist/core/ingestion/pipeline-phases/processes.js +39 -4
- package/dist/core/ingestion/pipeline-phases/routes.js +27 -18
- package/dist/core/ingestion/pipeline-phases/runner.d.ts +4 -1
- package/dist/core/ingestion/pipeline-phases/runner.js +34 -14
- package/dist/core/ingestion/pipeline-phases/scan.js +82 -1
- package/dist/core/ingestion/pipeline-phases/spring-auto-configuration.d.ts +2 -0
- package/dist/core/ingestion/pipeline-phases/spring-auto-configuration.js +8 -0
- package/dist/core/ingestion/pipeline-phases/spring-destinations.d.ts +123 -0
- package/dist/core/ingestion/pipeline-phases/spring-destinations.js +688 -0
- package/dist/core/ingestion/pipeline.d.ts +30 -1
- package/dist/core/ingestion/pipeline.js +52 -14
- package/dist/core/ingestion/resolve-references.js +5 -0
- package/dist/core/ingestion/route-extractors/constant-resolver.d.ts +16 -0
- package/dist/core/ingestion/route-extractors/constant-resolver.js +10 -0
- package/dist/core/ingestion/route-extractors/java-const-resolver.d.ts +27 -1
- package/dist/core/ingestion/route-extractors/java-const-resolver.js +161 -13
- package/dist/core/ingestion/route-extractors/kotlin-const-resolver.d.ts +12 -18
- package/dist/core/ingestion/route-extractors/kotlin-const-resolver.js +214 -33
- package/dist/core/ingestion/route-extractors/kotlin-spring.d.ts +13 -0
- package/dist/core/ingestion/route-extractors/kotlin-spring.js +259 -0
- package/dist/core/ingestion/route-extractors/python-decorator-handler.d.ts +6 -0
- package/dist/core/ingestion/route-extractors/python-decorator-handler.js +16 -0
- package/dist/core/ingestion/route-extractors/spring-shared.d.ts +30 -1
- package/dist/core/ingestion/route-extractors/spring-shared.js +77 -9
- package/dist/core/ingestion/route-extractors/spring.js +9 -5
- package/dist/core/ingestion/scope-extractor.js +8 -0
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +62 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.d.ts +4 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.js +2 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/ids.js +28 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +11 -2
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.d.ts +23 -2
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.js +24 -3
- package/dist/core/ingestion/scope-resolution/passes/callable-value-flow.d.ts +11 -1
- package/dist/core/ingestion/scope-resolution/passes/callable-value-flow.js +26 -6
- package/dist/core/ingestion/scope-resolution/passes/compound-receiver.d.ts +11 -0
- package/dist/core/ingestion/scope-resolution/passes/compound-receiver.js +29 -3
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +8 -1
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +35 -9
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.d.ts +1 -4
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.js +277 -9
- package/dist/core/ingestion/scope-resolution/pipeline/registry.js +2 -0
- package/dist/core/ingestion/scope-resolution/pipeline/run.js +7 -3
- package/dist/core/ingestion/scope-resolution/scope/walkers.d.ts +43 -9
- package/dist/core/ingestion/scope-resolution/scope/walkers.js +71 -10
- package/dist/core/ingestion/tree-sitter-queries.d.ts +1 -0
- package/dist/core/ingestion/tree-sitter-queries.js +161 -0
- package/dist/core/ingestion/type-extractors/zig.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/zig.js +17 -0
- package/dist/core/ingestion/utils/ast-helpers.d.ts +40 -1
- package/dist/core/ingestion/utils/ast-helpers.js +124 -6
- package/dist/core/ingestion/utils/callable-flow-captures.d.ts +9 -0
- package/dist/core/ingestion/utils/callable-flow-captures.js +75 -14
- package/dist/core/ingestion/utils/test-file-path.d.ts +28 -0
- package/dist/core/ingestion/utils/test-file-path.js +87 -0
- package/dist/core/ingestion/variable-extractors/configs/zig.d.ts +2 -0
- package/dist/core/ingestion/variable-extractors/configs/zig.js +71 -0
- package/dist/core/ingestion/workers/parse-worker.js +85 -14
- package/dist/core/install-context.d.ts +4 -0
- package/dist/core/install-context.js +152 -0
- package/dist/core/lbug/csv-generator.d.ts +10 -1
- package/dist/core/lbug/csv-generator.js +92 -22
- package/dist/core/lbug/graph-emit-sink.d.ts +3 -2
- package/dist/core/lbug/graph-emit-sink.js +4 -2
- package/dist/core/lbug/lbug-adapter.d.ts +100 -5
- package/dist/core/lbug/lbug-adapter.js +236 -24
- package/dist/core/lbug/schema.d.ts +6 -5
- package/dist/core/lbug/schema.js +84 -22
- package/dist/core/net/url-guard.d.ts +6 -0
- package/dist/core/net/url-guard.js +147 -0
- package/dist/core/package-version.d.ts +5 -0
- package/dist/core/package-version.js +10 -0
- package/dist/core/run-analyze.d.ts +21 -4
- package/dist/core/run-analyze.js +426 -117
- package/dist/core/search/fts-indexes.d.ts +19 -1
- package/dist/core/search/fts-indexes.js +28 -1
- package/dist/core/tree-sitter/parser-loader.js +16 -0
- package/dist/core/update-cache.d.ts +39 -0
- package/dist/core/update-cache.js +141 -0
- package/dist/core/update-check.d.ts +31 -0
- package/dist/core/update-check.js +274 -0
- package/dist/mcp/local/local-backend.d.ts +27 -13
- package/dist/mcp/local/local-backend.js +148 -60
- package/dist/mcp/repository-policy.d.ts +5 -1
- package/dist/mcp/repository-policy.js +48 -4
- package/dist/mcp/resources.js +10 -1
- package/dist/mcp/server.js +8 -9
- package/dist/mcp/tools.js +32 -22
- package/dist/server/analyze-launch.d.ts +2 -0
- package/dist/server/analyze-launch.js +2 -0
- package/dist/server/analyze-worker-protocol.d.ts +6 -1
- package/dist/server/analyze-worker.d.ts +1 -0
- package/dist/server/analyze-worker.js +38 -20
- package/dist/server/api.d.ts +5 -1
- package/dist/server/api.js +105 -88
- package/dist/server/git-clone.d.ts +40 -16
- package/dist/server/git-clone.js +253 -199
- package/dist/server/grep-params.d.ts +18 -0
- package/dist/server/grep-params.js +83 -0
- package/dist/server/grep-scan.d.ts +23 -0
- package/dist/server/grep-scan.js +107 -0
- package/dist/server/grep-worker.d.ts +1 -0
- package/dist/server/grep-worker.js +12 -0
- package/dist/server/mcp-http.d.ts +8 -0
- package/dist/server/mcp-http.js +16 -1
- package/dist/server/update-controller.d.ts +29 -0
- package/dist/server/update-controller.js +82 -0
- package/dist/storage/file-lock.d.ts +15 -0
- package/dist/storage/file-lock.js +155 -0
- package/dist/storage/fs-atomic.d.ts +24 -0
- package/dist/storage/fs-atomic.js +86 -2
- package/dist/storage/global-dir.d.ts +2 -0
- package/dist/storage/global-dir.js +6 -0
- package/dist/storage/parse-cache.d.ts +45 -7
- package/dist/storage/parse-cache.js +189 -42
- package/dist/storage/parsedfile-store.d.ts +41 -60
- package/dist/storage/parsedfile-store.js +247 -171
- package/dist/storage/repo-manager.d.ts +10 -4
- package/dist/storage/repo-manager.js +35 -25
- package/dist/storage/repo-meta.d.ts +34 -0
- package/dist/storage/v8-sidecar.d.ts +48 -0
- package/dist/storage/v8-sidecar.js +347 -0
- package/dist/types/pipeline.d.ts +14 -0
- package/dist/utils/process-identity.d.ts +2 -0
- package/dist/utils/process-identity.js +35 -0
- package/package.json +10 -4
- package/scripts/assert-web-assets.mjs +35 -0
- package/scripts/build-web.js +72 -0
- package/scripts/build.js +31 -28
- package/scripts/cross-platform-tests.ts +5 -0
- package/skills/gitnexus-cli.md +5 -1
- package/web/assets/ProcessFlowModal-DAeX2BHW.js +24 -0
- package/web/assets/{abnfDiagram-QNN2D4NM-Cq2djWWe.js → abnfDiagram-PAR5IXJI-J3OdeHLl.js} +1 -1
- package/web/assets/{agent-BWAXPjC5.js → agent-BMRqXorA.js} +6 -4
- package/web/assets/architecture-7GRP2DOG-M7G3SWCO-G3sWyX6M.js +1 -0
- package/web/assets/architectureDiagram-2PNWDENW-ysKcRlGT.js +36 -0
- package/web/assets/blockDiagram-PUWGUBOA-oLXTa1lY.js +129 -0
- package/web/assets/c4Diagram-3NLNHZP5-D3iu4eC0.js +38 -0
- package/web/assets/{chunk-2SREHG4O-Dip42xOq.js → chunk-2NMSUPJH-B24w-wng.js} +1 -1
- package/web/assets/{chunk-VJFVEZTB-CX66F2ep.js → chunk-32MCUW2P-ByUyt0Sa.js} +3 -3
- package/web/assets/{chunk-4RFN2BYJ-DHHWuC-n.js → chunk-3NPNU5GP-DocZ07Sg.js} +1 -1
- package/web/assets/{chunk-XNMVGMAZ-Cg_LnPtj.js → chunk-3SMGFRGC-CAu4JRLv.js} +1 -1
- package/web/assets/{chunk-W44A43WB-BN8EQc_u.js → chunk-4CAJECRU-DRYMwG9z.js} +1 -1
- package/web/assets/chunk-4OADUZ5Q-CxrSvOwZ.js +10 -0
- package/web/assets/{chunk-DMV4VAQV-Bn6WXDSX.js → chunk-5IQCK5RY-CCMhl4so.js} +2 -2
- package/web/assets/{chunk-RRFMTAIC-CMN0wcYA.js → chunk-5MVFYWFU-Db9KvrYO.js} +1 -1
- package/web/assets/chunk-CLS4B6BI-Uvx5QNsu.js +168 -0
- package/web/assets/chunk-DZP67EKU-B3Mt380j.js +70 -0
- package/web/assets/{chunk-6L755F7B-CMhLBxi2.js → chunk-EICP7K5X-CqwE9hui.js} +1 -1
- package/web/assets/{chunk-BI6VK774-D0oaWk8V.js → chunk-GDY2UAB4-CtQQR0a8.js} +1 -1
- package/web/assets/chunk-H7VHZCWX-CE1nAmt6.js +1 -0
- package/web/assets/chunk-IJBDOHL6-BUKtY6oF.js +1 -0
- package/web/assets/{chunk-OIYT25JQ-CQ6KOZGX.js → chunk-JFFVMJIA-0fJenqia.js} +1 -1
- package/web/assets/{chunk-HNC4WDU7-DoU3KnA7.js → chunk-JZGDI5JK-BeTMSSkJ.js} +1 -1
- package/web/assets/{chunk-EQFTRU2I-1ix7TzW9.js → chunk-KD6SPIPN-Qp1Pflah.js} +1 -1
- package/web/assets/chunk-NF366YI6-CpSpya3n.js +231 -0
- package/web/assets/chunk-NUDPKBEF-CU1-BQIW.js +34 -0
- package/web/assets/{chunk-SATU7PGQ-B1zhgOvc.js → chunk-OJINMHTS-zOCQe4eI.js} +1 -1
- package/web/assets/{chunk-E5QJAATJ-dh-5CtIV.js → chunk-Q6NGPIAH-yyBomb63.js} +1 -1
- package/web/assets/chunk-QJSWEUOL-D_rf9gPD.js +128 -0
- package/web/assets/chunk-R7JDMUKV-CRoqKpD6.js +1 -0
- package/web/assets/{chunk-VE5CLXGZ-C1vB7wpY.js → chunk-RCXAM2GK-CUqrWQDV.js} +1 -1
- package/web/assets/{chunk-66DQ2XMT-CM0xjFAN.js → chunk-RT4MAWR3-zXy9-Lvt.js} +1 -1
- package/web/assets/{chunk-TZUXEDM2-B7p9AcTw.js → chunk-SFMINX4W-J2UrvMpD.js} +1 -1
- package/web/assets/{chunk-LORZLZWG-B57uGw2N.js → chunk-SLDQ463B-CHY6e_bQ.js} +2 -2
- package/web/assets/{chunk-FWYVLQTC-BgDItRzJ.js → chunk-TCEHX7R3-CXPDEVbm.js} +1 -1
- package/web/assets/{chunk-224SPVON-B8gxtXpy.js → chunk-VQC2EELJ-Dc8fIy4R.js} +1 -1
- package/web/assets/chunk-VRZKL3EH-DB3KixTQ.js +1 -0
- package/web/assets/{chunk-A7VWPJGB-B4O3oQdQ.js → chunk-VTHDQ7BV-b7FsPQZO.js} +1 -1
- package/web/assets/chunk-VY2OSTJR-Dkgc3Brg.js +2 -0
- package/web/assets/chunk-WUBWJARI-7FwILJ3k.js +2 -0
- package/web/assets/{chunk-D6VWDJW2-BxcBdZ9c.js → chunk-YBMQ5JGJ-BSnyWZmd.js} +1 -1
- package/web/assets/chunk-YDMLL4PJ-IHhMngTz.js +2 -0
- package/web/assets/chunk-Z6V44ARX-BjCEsF0Q.js +62 -0
- package/web/assets/chunk-ZJJ7VQJP-Dz089b-K.js +321 -0
- package/web/assets/chunk-ZNLK7HRR-B0iFpmW4.js +1 -0
- package/web/assets/chunk-ZQN7UHIL-Cy7KAjQt.js +1 -0
- package/web/assets/{chunk-L5GCOVLC-CE2w8Nm_.js → chunk-ZS6VBONO-DBjJO0w9.js} +2 -2
- package/web/assets/{chunk-NV3KIAZN-5yvcpMiu.js → chunk-ZUNWM646-DNRJyNPe.js} +1 -1
- package/web/assets/classDiagram-FGAMPOII-C5Ibyode.js +1 -0
- package/web/assets/classDiagram-v2-AI5RJEK4-C5Ibyode.js +1 -0
- package/web/assets/{cose-bilkent-RZA4XIPR-BHpK4Crp.js → cose-bilkent-Q72C2OJ3-DMeFXnK8.js} +1 -1
- package/web/assets/cynefin-OW5HDTMX-6OCTWOGG-vlqakYcO.js +1 -0
- package/web/assets/{cynefinDiagram-TR7LZUCG-C3Iar9lZ.js → cynefinDiagram-2OOWUY4M-BY6DZkTt.js} +1 -1
- package/web/assets/dagre-MPVFI544-DWO70fy_.js +4 -0
- package/web/assets/diagram-AE4NWXFW-f7JRVRUL.js +24 -0
- package/web/assets/{diagram-L7DVE3PN-GIRyVUtt.js → diagram-BUJID5UG-BXZv1rCS.js} +2 -2
- package/web/assets/{diagram-JCD7PQ7C-DC5-9FRr.js → diagram-C44CZ5NI-CRNfvjCq.js} +1 -1
- package/web/assets/diagram-EYOLEXXS-DZOjKQVE.js +30 -0
- package/web/assets/diagram-P7B6PWOJ-D3SQmw3_.js +3 -0
- package/web/assets/{ebnfDiagram-DRHRQJWO-D8_CI4ZF.js → ebnfDiagram-FTPZ3PV6-jKWpIDN2.js} +1 -1
- package/web/assets/erDiagram-H3ERR26V-BqJntEuJ.js +99 -0
- package/web/assets/eventmodeling-NTZA5JFV-WKSWQHFS-Bq4FqtBL.js +1 -0
- package/web/assets/flowDiagram-YHGXBVSY-Dnlk2bEu.js +1 -0
- package/web/assets/ganttDiagram-RWFTB7ED-Bl6Y1K5T.js +292 -0
- package/web/assets/gitGraph-4MIJSDKK-JH2HKYUO-B3yc4GkH.js +1 -0
- package/web/assets/gitGraphDiagram-MAR6GKOP-CkNvsrdw.js +106 -0
- package/web/assets/{index-CJDpyH-n.css → index-C2_aej58.css} +1 -1
- package/web/assets/{index-DDRie6_8.js → index-Dj3vQOHK.js} +51 -51
- package/web/assets/info-A6RAGUB7-3TX3OFWW-BM3N5_Dv.js +1 -0
- package/web/assets/infoDiagram-LV547AFH-COkFutAf.js +2 -0
- package/web/assets/{ishikawaDiagram-4JDSWWDM-DmqWtjkl.js → ishikawaDiagram-PUJQGNDS-Bb8FylSR.js} +2 -2
- package/web/assets/{journeyDiagram-QUS3FAKT-XAzVzrQW.js → journeyDiagram-EW5QJT4W-BzoHUBhM.js} +4 -4
- package/web/assets/{kanban-definition-D4L7SQKK-YurRnmYn.js → kanban-definition-JSQERAZB-Uy2Pi0yQ.js} +4 -4
- package/web/assets/katex-CZ4GXH2S-C0Fcou7U.js +257 -0
- package/web/assets/{mindmap-definition-66QP5TD6-ChrWWnil.js → mindmap-definition-VBJCLQLM-B-CnOnt_.js} +3 -3
- package/web/assets/packet-AYTQ26CC-MKII6P3Y-Bd52ZE3V.js +1 -0
- package/web/assets/{pegDiagram-YKIO5C6U-QGeQLEq2.js → pegDiagram-7WILOQTJ-D9sneKXg.js} +1 -1
- package/web/assets/pie-WAS4IAKB-6B4OPMJ5-DW5Xy69Z.js +1 -0
- package/web/assets/pieDiagram-EFA7CBSB-Dx2NQofL.js +39 -0
- package/web/assets/{quadrantDiagram-VO5QLCXA-B7098wSc.js → quadrantDiagram-WARVYA7P-DPKL9_0A.js} +3 -3
- package/web/assets/radar-RG4KPBEZ-UPTR3XUL-CkzibT2h.js +1 -0
- package/web/assets/railroad-74A4TZTK-MEFUPFMS-D9zF-mDN.js +1 -0
- package/web/assets/railroad-abnf-HS5TGJTU-R5YG2S5D-ruacjUbX.js +1 -0
- package/web/assets/railroad-ebnf-LZEXJU2U-G5QEX2L6-S1zc5OiO.js +1 -0
- package/web/assets/railroad-peg-WCYAUIDC-H5I2ZRY2-Cbcr0XzY.js +1 -0
- package/web/assets/{railroadDiagram-M77LTMSB-AXu4vxk_.js → railroadDiagram-5NIQVNLQ-DsweTo14.js} +1 -1
- package/web/assets/{requirementDiagram-RASO5HTO-B-l8InpK.js → requirementDiagram-SXREGOKZ-CXwdNSVR.js} +4 -4
- package/web/assets/{sankeyDiagram-F32LOJ6L-Kd7zjJgX.js → sankeyDiagram-VV74M2VP-CA6jtP9P.js} +3 -3
- package/web/assets/{sequenceDiagram-URATNSBD-BlcdY9DS.js → sequenceDiagram-52ZFIFDL-k_5rEbzm.js} +15 -15
- package/web/assets/src-Df5C1Nz4.js +1 -0
- package/web/assets/stateDiagram-3QAKPIVI-BejHTf31.js +1 -0
- package/web/assets/stateDiagram-v2-HN2P4RDZ-BrfoRuOc.js +1 -0
- package/web/assets/swimlanes-QLVP42QD-CQSVO5D6.js +1 -0
- package/web/assets/swimlanesDiagram-JKPDBFCN-DrWB9kcD.js +8 -0
- package/web/assets/{timeline-definition-WJXWRH4I-DUfp1R3E.js → timeline-definition-GS45XAXW-C0Ks8rPP.js} +4 -4
- package/web/assets/treeView-Q6P3EWNA-ZRJGANNQ-DmKOCo6L.js +1 -0
- package/web/assets/treemap-WGGIJYW6-K64VN5AS-DO3xY92U.js +1 -0
- package/web/assets/{vennDiagram-K3VCMQLI-Bj-FN-XS.js → vennDiagram-QIQU2ZRJ-rgPiS837.js} +3 -3
- package/web/assets/wardley-WFR3VGLG-D67OWCCH-DiDPBNft.js +1 -0
- package/web/assets/wardleyDiagram-U6YNM66N-DRVr7SPi.js +78 -0
- package/web/assets/{xychartDiagram-5VRUVLCW-CK_rbSWE.js → xychartDiagram-XJAZEDNM-COtlZzYb.js} +3 -3
- package/web/index.html +19 -17
- package/web/assets/ProcessFlowModal-Badh2Pbg.js +0 -24
- package/web/assets/architecture-TIHT7OUA-V6N4J3SY-fTePvLoe.js +0 -1
- package/web/assets/architectureDiagram-OT7VKSJ7-mKEXxkeF.js +0 -36
- package/web/assets/blockDiagram-54WLDVWM-Dg_hrRWE.js +0 -132
- package/web/assets/c4Diagram-X2LASM7V-CnhoT4aV.js +0 -10
- package/web/assets/chunk-2AEHWXPW-CV4r6-1I.js +0 -127
- package/web/assets/chunk-5VCL7Z4A-CQ-2dYWj.js +0 -1
- package/web/assets/chunk-6BELYETK-ChsYtfHW.js +0 -1
- package/web/assets/chunk-7CWYLC5S-DRgGkkpF.js +0 -2
- package/web/assets/chunk-7FYTHRHK-CsmYIswB.js +0 -32
- package/web/assets/chunk-KRXBNO2N-C-UNuKKf.js +0 -1
- package/web/assets/chunk-LAHSG3N2-Bz4hcn0N.js +0 -321
- package/web/assets/chunk-LIEV3EAG-pyKGssV3.js +0 -1
- package/web/assets/chunk-NLANEA3F-XpH_NPA5.js +0 -62
- package/web/assets/chunk-PE7DX7ZZ-CCvRVj43.js +0 -10
- package/web/assets/chunk-Q67WD55A-BWCH2SVz.js +0 -156
- package/web/assets/chunk-SZD42YQK-ijyKKVr1.js +0 -70
- package/web/assets/chunk-TFPGFQPA-Dj6a-0pC.js +0 -231
- package/web/assets/chunk-TGVD4F4B-BMc31Gj2.js +0 -2
- package/web/assets/chunk-UAT7B5JY-DW-A_fpI.js +0 -1
- package/web/assets/chunk-VY5UBI4V-yxPQAWxw.js +0 -1
- package/web/assets/chunk-WJBAP47W-BckNkuEN.js +0 -1
- package/web/assets/classDiagram-VPOSVPXH-BjOiXA_C.js +0 -1
- package/web/assets/classDiagram-v2-5VFNUXQA-BjOiXA_C.js +0 -1
- package/web/assets/cynefin-VYW2F7L2-2VAHYKR6-DAsF6GZv.js +0 -1
- package/web/assets/dagre-K64A6Z3X-CUwi79mA.js +0 -4
- package/web/assets/diagram-2TLGJV2N-C2F5Nfym.js +0 -30
- package/web/assets/diagram-KFBZAVDW-Dfmf_4ti.js +0 -3
- package/web/assets/diagram-YP3FGXHI-CyNFYtkd.js +0 -24
- package/web/assets/erDiagram-SZLJLQMB-CohQjznC.js +0 -85
- package/web/assets/eventmodeling-45OFAUF4-AOUJWSLX-BvTc6iQi.js +0 -1
- package/web/assets/flowDiagram-BWE6NHOH-B6RnEvD9.js +0 -1
- package/web/assets/ganttDiagram-2QTCJSNI-Cks_mEcF.js +0 -292
- package/web/assets/gitGraph-TEB2WS4Q-U5VWYIBC-Dy7CCSZ5.js +0 -1
- package/web/assets/gitGraphDiagram-VVZAVV5G-CG41cIVc.js +0 -106
- package/web/assets/info-DKCQHKI2-DX6KST54-BLJg1ikX.js +0 -1
- package/web/assets/infoDiagram-FY4PZKRE-BJ3vPVwW.js +0 -2
- package/web/assets/katex-C5OPUE3Q-Bnbavtmu.js +0 -257
- package/web/assets/packet-7NZHBO7P-5WG45QPS-KUxcuvaA.js +0 -1
- package/web/assets/pie-RZYD4A2V-2OCZ2VTD-DPs08kJY.js +0 -1
- package/web/assets/pieDiagram-YPY3TKG5-BuT3MYzm.js +0 -39
- package/web/assets/radar-I7S5WNFK-EPLSA35B-w5F0K3a7.js +0 -1
- package/web/assets/railroad-3IZDKUUU-PWFQV6Y6-Bu668yqY.js +0 -1
- package/web/assets/railroad-abnf-AHOZXSZD-JYYJX3BS-B6ghpETS.js +0 -1
- package/web/assets/railroad-ebnf-EBAXGLYW-RBZ4ONAP-D-XmHh3M.js +0 -1
- package/web/assets/railroad-peg-LSFZ7HO6-KHNPXGPG-mhkrhzEn.js +0 -1
- package/web/assets/src-C5sx_gMp.js +0 -1
- package/web/assets/stateDiagram-DODFXNG5-DTdHc-fF.js +0 -1
- package/web/assets/stateDiagram-v2-JNMM5JRA-DioNLDDo.js +0 -1
- package/web/assets/swimlanes-OSWOYLSK-CA0ofdwY.js +0 -2
- package/web/assets/swimlanesDiagram-RHGX2RDE-PkwUdckC.js +0 -8
- package/web/assets/treeView-QDETBFTQ-EHYTSQNO-C5lpBgPm.js +0 -1
- package/web/assets/treemap-6X3UGDF4-CCWCF7EK-BB0ZyO-B.js +0 -1
- package/web/assets/wardley-OPB4EBWU-6OWERDVT-CEA3Nq0j.js +0 -1
- package/web/assets/wardleyDiagram-XK6FUAWV-CVV0dHFr.js +0 -78
- /package/web/assets/{sizeCapture-5GORAGP4-BEqQzsxs.js → sizeCapture-FGA5AGYP-BEqQzsxs.js} +0 -0
|
@@ -100,6 +100,15 @@ export const escapeCSVNumber = (value, defaultValue = -1) => {
|
|
|
100
100
|
return String(defaultValue);
|
|
101
101
|
return String(value);
|
|
102
102
|
};
|
|
103
|
+
/**
|
|
104
|
+
* A numeric column that may legitimately have NO value.
|
|
105
|
+
*
|
|
106
|
+
* `escapeCSVNumber` substitutes a sentinel (-1) for absence, which is right
|
|
107
|
+
* where every row has a span and wrong where absence is the fact being
|
|
108
|
+
* recorded. An empty field is loaded as NULL by COPY, so the column can say
|
|
109
|
+
* "there is no line here" instead of pointing at line -1.
|
|
110
|
+
*/
|
|
111
|
+
export const escapeCSVNullableNumber = (value) => typeof value === 'number' && Number.isFinite(value) ? String(value) : '';
|
|
103
112
|
const formatCSVStringArray = (value) => {
|
|
104
113
|
const items = Array.isArray(value)
|
|
105
114
|
? value.filter((item) => typeof item === 'string')
|
|
@@ -152,14 +161,15 @@ export const isBinaryContent = (content) => {
|
|
|
152
161
|
}
|
|
153
162
|
return nonPrintable / end > 0.1;
|
|
154
163
|
};
|
|
164
|
+
const EMPTY_PREPARED = { content: '', lines: [''], isBinary: false };
|
|
155
165
|
/**
|
|
156
166
|
* LRU content cache — avoids re-reading the same source file for every
|
|
157
167
|
* symbol defined in it. Sized generously so most files stay cached during
|
|
158
|
-
* the single-pass node iteration.
|
|
168
|
+
* the single-pass node iteration. Insertion order on the Map is LRU
|
|
169
|
+
* (delete+set on touch).
|
|
159
170
|
*/
|
|
160
171
|
class FileContentCache {
|
|
161
172
|
cache = new Map();
|
|
162
|
-
accessOrder = [];
|
|
163
173
|
maxSize;
|
|
164
174
|
repoPath;
|
|
165
175
|
constructor(repoPath, maxSize = 3000) {
|
|
@@ -168,36 +178,36 @@ class FileContentCache {
|
|
|
168
178
|
}
|
|
169
179
|
async get(relativePath) {
|
|
170
180
|
if (!relativePath)
|
|
171
|
-
return
|
|
181
|
+
return EMPTY_PREPARED;
|
|
172
182
|
const cached = this.cache.get(relativePath);
|
|
173
183
|
if (cached !== undefined) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
if (idx !== -1) {
|
|
177
|
-
this.accessOrder.splice(idx, 1);
|
|
178
|
-
this.accessOrder.push(relativePath);
|
|
179
|
-
}
|
|
184
|
+
this.cache.delete(relativePath);
|
|
185
|
+
this.cache.set(relativePath, cached);
|
|
180
186
|
return cached;
|
|
181
187
|
}
|
|
182
188
|
try {
|
|
183
189
|
const fullPath = path.join(this.repoPath, relativePath);
|
|
184
190
|
const content = await fs.readFile(fullPath, 'utf-8');
|
|
185
|
-
|
|
186
|
-
|
|
191
|
+
const prepared = {
|
|
192
|
+
content,
|
|
193
|
+
lines: content.split('\n'),
|
|
194
|
+
isBinary: isBinaryContent(content),
|
|
195
|
+
};
|
|
196
|
+
this.set(relativePath, prepared);
|
|
197
|
+
return prepared;
|
|
187
198
|
}
|
|
188
199
|
catch {
|
|
189
|
-
this.set(relativePath,
|
|
190
|
-
return
|
|
200
|
+
this.set(relativePath, EMPTY_PREPARED);
|
|
201
|
+
return EMPTY_PREPARED;
|
|
191
202
|
}
|
|
192
203
|
}
|
|
193
204
|
set(key, value) {
|
|
194
|
-
if (this.cache.size >= this.maxSize) {
|
|
195
|
-
const oldest = this.
|
|
196
|
-
if (oldest)
|
|
205
|
+
if (this.cache.size >= this.maxSize && !this.cache.has(key)) {
|
|
206
|
+
const oldest = this.cache.keys().next().value;
|
|
207
|
+
if (oldest !== undefined)
|
|
197
208
|
this.cache.delete(oldest);
|
|
198
209
|
}
|
|
199
210
|
this.cache.set(key, value);
|
|
200
|
-
this.accessOrder.push(key);
|
|
201
211
|
}
|
|
202
212
|
}
|
|
203
213
|
/**
|
|
@@ -247,12 +257,13 @@ const formatFtsDescription = (description) => isBinaryContent(description) ? ''
|
|
|
247
257
|
const EXACT_SYMBOL_CONTENT_LABELS = SYMBOL_NODE_LABELS;
|
|
248
258
|
const extractContent = async (node, contentCache) => {
|
|
249
259
|
const filePath = node.properties.filePath;
|
|
250
|
-
const
|
|
260
|
+
const prepared = await contentCache.get(filePath);
|
|
261
|
+
const content = prepared.content;
|
|
251
262
|
if (!content)
|
|
252
263
|
return '';
|
|
253
264
|
if (node.label === 'Folder')
|
|
254
265
|
return '';
|
|
255
|
-
if (
|
|
266
|
+
if (prepared.isBinary)
|
|
256
267
|
return '[Binary file - content not stored]';
|
|
257
268
|
// File content is stored in full — intentionally NOT length-capped here, so
|
|
258
269
|
// text past the old 10KB cutoff stays FTS-searchable (#2317). It is already
|
|
@@ -266,7 +277,7 @@ const extractContent = async (node, contentCache) => {
|
|
|
266
277
|
const endLine = node.properties.endLine;
|
|
267
278
|
if (startLine === undefined || endLine === undefined)
|
|
268
279
|
return '';
|
|
269
|
-
const lines =
|
|
280
|
+
const lines = prepared.lines;
|
|
270
281
|
const exactSymbolContent = EXACT_SYMBOL_CONTENT_LABELS.has(node.label);
|
|
271
282
|
const start = Math.max(0, exactSymbolContent ? startLine : startLine - 2);
|
|
272
283
|
const end = Math.min(lines.length - 1, exactSymbolContent ? endLine : endLine + 2);
|
|
@@ -340,7 +351,7 @@ class BufferedCSVWriter {
|
|
|
340
351
|
// ============================================================================
|
|
341
352
|
/** Canonical relationship CSV header — shared by the emit pass and the
|
|
342
353
|
* `splitRelCsvByLabelPair` differential oracle. */
|
|
343
|
-
export const REL_CSV_HEADER = 'from,to,type,confidence,reason,step';
|
|
354
|
+
export const REL_CSV_HEADER = 'from,to,type,confidence,reason,step,staticGated';
|
|
344
355
|
/** Build the escaped CSV row (no trailing newline) for one relationship.
|
|
345
356
|
* Single source of the relationship row bytes — used by the emit pass and by
|
|
346
357
|
* the byte-identity differential test that feeds the legacy split oracle. */
|
|
@@ -351,6 +362,10 @@ export const buildRelRow = (rel) => [
|
|
|
351
362
|
escapeCSVNumber(rel.confidence, 1.0),
|
|
352
363
|
escapeCSVField(rel.reason),
|
|
353
364
|
escapeCSVNumber(rel.step, 0),
|
|
365
|
+
// `staticGated` persists as 0/1 (LadybugDB BOOLEAN COPY accepts both).
|
|
366
|
+
// Every edge that does not carry the flag writes 0, so readers treat
|
|
367
|
+
// absence and `false` identically.
|
|
368
|
+
rel.staticGated === true ? '1' : '0',
|
|
354
369
|
].join(',');
|
|
355
370
|
/** Canonical BasicBlock node CSV header — taint/PDG substrate (issue #2080).
|
|
356
371
|
* No `name` column; blocks are identified by id + source span. Shared by the
|
|
@@ -428,9 +443,11 @@ export const streamAllCSVsToDisk = async (graph, repoPath, csvDir, onNodePhaseCo
|
|
|
428
443
|
// Section nodes have an extra 'level' column
|
|
429
444
|
const sectionWriter = new BufferedCSVWriter(path.join(csvDir, 'section.csv'), 'id,name,filePath,startLine,endLine,level,content,description');
|
|
430
445
|
// Route nodes for API endpoint mapping
|
|
431
|
-
const routeWriter = new BufferedCSVWriter(path.join(csvDir, 'route.csv'), 'id,name,filePath,responseKeys,errorKeys,middleware,method,handlerSymbolId');
|
|
446
|
+
const routeWriter = new BufferedCSVWriter(path.join(csvDir, 'route.csv'), 'id,name,filePath,responseKeys,errorKeys,middleware,method,handlerSymbolId,runtimeConfirmed,runtimeSource,runtimeStatus');
|
|
432
447
|
// Tool nodes for MCP tool definitions
|
|
433
448
|
const toolWriter = new BufferedCSVWriter(path.join(csvDir, 'tool.csv'), 'id,name,filePath,description');
|
|
449
|
+
// Destination nodes for async messaging (Kafka topics, Rabbit exchanges, …)
|
|
450
|
+
const destinationWriter = new BufferedCSVWriter(path.join(csvDir, 'destination.csv'), 'id,name,filePath,startLine,endLine,address,broker,resolution,configKey,configDefault,description');
|
|
434
451
|
// BasicBlock nodes — taint/PDG substrate (issue #2080). No `name` column;
|
|
435
452
|
// blocks are identified by id + source span. Emitted by no phase yet.
|
|
436
453
|
const basicBlockWriter = new BufferedCSVWriter(path.join(csvDir, 'basicblock.csv'), BASICBLOCK_CSV_HEADER);
|
|
@@ -578,6 +595,9 @@ export const streamAllCSVsToDisk = async (graph, repoPath, csvDir, onNodePhaseCo
|
|
|
578
595
|
escapeCSVField(middlewareStr),
|
|
579
596
|
escapeCSVField(String(node.properties.method ?? '')),
|
|
580
597
|
escapeCSVField(String(node.properties.handlerSymbolId ?? '')),
|
|
598
|
+
node.properties.runtimeConfirmed === true ? 'true' : 'false',
|
|
599
|
+
escapeCSVField(String(node.properties.runtimeSource ?? '')),
|
|
600
|
+
escapeCSVField(String(node.properties.runtimeStatus ?? '')),
|
|
581
601
|
].join(','));
|
|
582
602
|
break;
|
|
583
603
|
}
|
|
@@ -589,6 +609,48 @@ export const streamAllCSVsToDisk = async (graph, repoPath, csvDir, onNodePhaseCo
|
|
|
589
609
|
escapeCSVField(formatFtsDescription(node.properties.description || '')),
|
|
590
610
|
].join(','));
|
|
591
611
|
break;
|
|
612
|
+
case 'Destination':
|
|
613
|
+
// `address` is the cross-service join key and is written as an EMPTY
|
|
614
|
+
// field for an unresolved destination, which COPY loads as NULL —
|
|
615
|
+
// mirroring the in-memory rule that the property is absent there, and
|
|
616
|
+
// measured on a real index (`spring-destinations-lbug.test.ts` asserts
|
|
617
|
+
// both the NULL and the zero-false-join it buys). Writing the
|
|
618
|
+
// placeholder text into this column instead would make two services
|
|
619
|
+
// that merely both wrote `${app.topic}` join on it, reintroducing
|
|
620
|
+
// below the database line the exact false connection the
|
|
621
|
+
// location-based node id prevents above it. The placeholder is
|
|
622
|
+
// carried by `name`, which nothing joins on.
|
|
623
|
+
//
|
|
624
|
+
// The line columns are written EMPTY (→ NULL) rather than defaulted
|
|
625
|
+
// to -1 when the node carries none. A resolved destination has no
|
|
626
|
+
// location at all — that is the point of the `filePath` rule two
|
|
627
|
+
// fields to the left — and a row saying `filePath` NULL but
|
|
628
|
+
// `startLine` -1 makes the two columns disagree about one fact and
|
|
629
|
+
// renders as "line -1" in the UI.
|
|
630
|
+
//
|
|
631
|
+
// `broker` is written for every destination, resolved or not. It is
|
|
632
|
+
// part of the resolved node's IDENTITY — the id is minted from
|
|
633
|
+
// `(broker, address)` — so a reader who joins on `address` alone and
|
|
634
|
+
// sees two rows needs this column to tell them apart, not merely to
|
|
635
|
+
// decorate them. Every column named in this row list must also be
|
|
636
|
+
// named in DESTINATION_SCHEMA and in the COPY statement in
|
|
637
|
+
// `lbug-adapter.ts`; a property the phase writes but those two omit is
|
|
638
|
+
// dropped at the database boundary without a warning, and the query
|
|
639
|
+
// that reads it back raises a binder error instead.
|
|
640
|
+
pending = destinationWriter.addRow([
|
|
641
|
+
escapeCSVField(node.id),
|
|
642
|
+
escapeCSVField(node.properties.name || ''),
|
|
643
|
+
escapeCSVField(node.properties.filePath || ''),
|
|
644
|
+
escapeCSVNullableNumber(node.properties.startLine),
|
|
645
|
+
escapeCSVNullableNumber(node.properties.endLine),
|
|
646
|
+
escapeCSVField(String(node.properties.address ?? '')),
|
|
647
|
+
escapeCSVField(String(node.properties.broker ?? '')),
|
|
648
|
+
escapeCSVField(String(node.properties.resolution ?? '')),
|
|
649
|
+
escapeCSVField(String(node.properties.configKey ?? '')),
|
|
650
|
+
escapeCSVField(String(node.properties.configDefault ?? '')),
|
|
651
|
+
escapeCSVField(formatFtsDescription(node.properties.description || '')),
|
|
652
|
+
].join(','));
|
|
653
|
+
break;
|
|
592
654
|
case 'BasicBlock':
|
|
593
655
|
pending = basicBlockWriter.addRow(buildBasicBlockRow(node));
|
|
594
656
|
break;
|
|
@@ -669,6 +731,13 @@ export const streamAllCSVsToDisk = async (graph, repoPath, csvDir, onNodePhaseCo
|
|
|
669
731
|
sectionWriter,
|
|
670
732
|
routeWriter,
|
|
671
733
|
toolWriter,
|
|
734
|
+
// A writer missing from THIS list is not a loud failure. `finish()` is
|
|
735
|
+
// what flushes the buffered rows, while the header is written eagerly and
|
|
736
|
+
// `.rows` counts rows as they are added — so an unflushed writer still
|
|
737
|
+
// produces a valid, header-only CSV and a manifest entry claiming rows.
|
|
738
|
+
// The COPY then succeeds and loads nothing. Adding a node table means
|
|
739
|
+
// adding it here as well as to the switch and the manifest.
|
|
740
|
+
destinationWriter,
|
|
672
741
|
basicBlockWriter,
|
|
673
742
|
...multiLangWriters.values(),
|
|
674
743
|
];
|
|
@@ -692,6 +761,7 @@ export const streamAllCSVsToDisk = async (graph, repoPath, csvDir, onNodePhaseCo
|
|
|
692
761
|
['Section', sectionWriter],
|
|
693
762
|
['Route', routeWriter],
|
|
694
763
|
['Tool', toolWriter],
|
|
764
|
+
['Destination', destinationWriter],
|
|
695
765
|
['BasicBlock', basicBlockWriter],
|
|
696
766
|
...Array.from(multiLangWriters.entries()).map(([name, w]) => [name, w]),
|
|
697
767
|
];
|
|
@@ -19,12 +19,13 @@ import type { KnowledgeGraph } from '../graph/types.js';
|
|
|
19
19
|
* METHOD_IMPLEMENTS - mro-processor
|
|
20
20
|
* DEFINES - local-symbol-pruner's isFileDefinesEdge test
|
|
21
21
|
* INJECTS - di phase fan-out
|
|
22
|
+
* HANDLES_ROUTE - Spring Actuator runtime handler conflict detection
|
|
22
23
|
*
|
|
23
24
|
* Deliberately NOT retained: STEP_IN_PROCESS / ENTRY_POINT_OF / MEMBER_OF
|
|
24
25
|
* (written only by the `processes` / `communities` phases, which the streaming
|
|
25
26
|
* flag disables), TAINT_PATH / CALL_SUMMARY (their phases are likewise gated
|
|
26
|
-
* off under the flag), and
|
|
27
|
-
*
|
|
27
|
+
* off under the flag), and HANDLES_TOOL (written by `tools`, never read back
|
|
28
|
+
* mid-pipeline).
|
|
28
29
|
*
|
|
29
30
|
* Adding a relationship type that a phase reads back WITHOUT adding it here is
|
|
30
31
|
* a silent-wrong-graph bug, not a crash. The differential round-trip test cannot:
|
|
@@ -117,12 +117,13 @@ import { PDG_EDGE_TYPES } from './pdg-emit-sink.js';
|
|
|
117
117
|
* METHOD_IMPLEMENTS - mro-processor
|
|
118
118
|
* DEFINES - local-symbol-pruner's isFileDefinesEdge test
|
|
119
119
|
* INJECTS - di phase fan-out
|
|
120
|
+
* HANDLES_ROUTE - Spring Actuator runtime handler conflict detection
|
|
120
121
|
*
|
|
121
122
|
* Deliberately NOT retained: STEP_IN_PROCESS / ENTRY_POINT_OF / MEMBER_OF
|
|
122
123
|
* (written only by the `processes` / `communities` phases, which the streaming
|
|
123
124
|
* flag disables), TAINT_PATH / CALL_SUMMARY (their phases are likewise gated
|
|
124
|
-
* off under the flag), and
|
|
125
|
-
*
|
|
125
|
+
* off under the flag), and HANDLES_TOOL (written by `tools`, never read back
|
|
126
|
+
* mid-pipeline).
|
|
126
127
|
*
|
|
127
128
|
* Adding a relationship type that a phase reads back WITHOUT adding it here is
|
|
128
129
|
* a silent-wrong-graph bug, not a crash. The differential round-trip test cannot:
|
|
@@ -142,6 +143,7 @@ export const RETAINED_REL_TYPES = new Set([
|
|
|
142
143
|
'METHOD_IMPLEMENTS',
|
|
143
144
|
'DEFINES',
|
|
144
145
|
'INJECTS',
|
|
146
|
+
'HANDLES_ROUTE',
|
|
145
147
|
// springAopInheritance reads direct behavior evidence after MRO.
|
|
146
148
|
'ADVISED_BY',
|
|
147
149
|
]);
|
|
@@ -352,11 +352,19 @@ export declare const deleteNodesForFile: (filePath: string, dbPath?: string) =>
|
|
|
352
352
|
/**
|
|
353
353
|
* Chunk size for {@link deleteNodesForFiles}. 200 paths keeps each
|
|
354
354
|
* statement ~13KB (well inside parser limits) while a ~700-file write set
|
|
355
|
-
* still collapses from ~13,000 statements to
|
|
356
|
-
* (1 CodeEmbedding join-delete +
|
|
357
|
-
*
|
|
355
|
+
* still collapses from ~13,000 statements to 128: 32 statements per chunk
|
|
356
|
+
* (1 CodeEmbedding join-delete + 31 filePath-bearing node tables — the
|
|
357
|
+
* 33-table NODE_TABLES roster minus Community/Process) × 4 chunks. The
|
|
358
358
|
* original "~40" claim under-counted the per-chunk statement fan-out
|
|
359
359
|
* (tri-review 4669518496 accuracy sweep).
|
|
360
|
+
*
|
|
361
|
+
* `Destination` is counted in that 31 because the table IS visited, but a
|
|
362
|
+
* RESOLVED destination stores no `filePath` and so never matches the
|
|
363
|
+
* predicate — deliberately, because it is shared across files. See the node
|
|
364
|
+
* property block in `pipeline-phases/spring-destinations.ts` for why deleting
|
|
365
|
+
* one here would cut edges belonging to files outside the write set. Because
|
|
366
|
+
* this pass therefore cannot maintain the layer, {@link deleteAllDestinations}
|
|
367
|
+
* clears it separately and `extractChangedSubgraph` re-includes it whole.
|
|
360
368
|
*/
|
|
361
369
|
export declare const DELETE_FILES_CHUNK_SIZE = 200;
|
|
362
370
|
/**
|
|
@@ -377,15 +385,77 @@ export declare const DELETE_FILES_CHUNK_SIZE = 200;
|
|
|
377
385
|
* EMBEDDING_SCHEMA cannot own embedding rows, so skipping that one
|
|
378
386
|
* statement is sound, while failing would brick every incremental run on
|
|
379
387
|
* such a DB until `--force`. Statement count per chunk is unchanged by the
|
|
380
|
-
* multi-label join: 1 embedding join-delete +
|
|
381
|
-
* (the rejected per-label fallback shape would have been 19 +
|
|
388
|
+
* multi-label join: 1 embedding join-delete + 31 node-table deletes = 32
|
|
389
|
+
* (the rejected per-label fallback shape would have been 19 + 31 = 50).
|
|
390
|
+
* The 31 is the filePath-bearing half of the 33-table NODE_TABLES roster and
|
|
391
|
+
* moves whenever a node table is added — it went up by one when `Destination`
|
|
392
|
+
* joined, and the twin note on DELETE_FILES_CHUNK_SIZE has to move with it.
|
|
382
393
|
* Singleton-connection only: the analyze writeback owns the write lock,
|
|
383
394
|
* and `queryAndDrain` routes through `withConnLock` for it (the WAL
|
|
384
395
|
* checkpoint driver is live during this).
|
|
385
396
|
*/
|
|
386
397
|
export declare const deleteNodesForFiles: (filePaths: readonly string[], options?: {
|
|
387
398
|
onChunk?: (filesDone: number, filesTotal: number) => void;
|
|
399
|
+
/** When set, only these node tables are DETACH DELETEd (#3016). */
|
|
400
|
+
nodeTables?: readonly string[];
|
|
388
401
|
}) => Promise<void>;
|
|
402
|
+
/**
|
|
403
|
+
* Which of `candidateTables` currently hold at least one row for `filePaths`.
|
|
404
|
+
*
|
|
405
|
+
* The incremental writeback uses this to decide which FTS-backed tables it is
|
|
406
|
+
* about to DML (#3016). It has to be a question about the DB, not about the
|
|
407
|
+
* freshly built graph: an edit that DELETES the last Rust trait in a file
|
|
408
|
+
* leaves no Trait node in the new graph, but the old row is still in the index
|
|
409
|
+
* and still has to be deleted — and its FTS index still has to come down first.
|
|
410
|
+
*/
|
|
411
|
+
export declare const nodeTablesWithRowsForFiles: (filePaths: readonly string[], candidateTables: readonly string[]) => Promise<Set<string>>;
|
|
412
|
+
/**
|
|
413
|
+
* One MEMBER_OF / STEP_IN_PROCESS edge, carrying everything needed to recreate
|
|
414
|
+
* it byte-for-byte: both endpoint labels (so the re-MATCH is label-scoped
|
|
415
|
+
* rather than a scan of every node) and every column of the relationship
|
|
416
|
+
* table, `step` included — process traces order by it (`ORDER BY r.step`), so
|
|
417
|
+
* an edge restored without it silently scrambles the flow it belongs to.
|
|
418
|
+
*/
|
|
419
|
+
export interface DerivedRelSnapshot {
|
|
420
|
+
sourceId: string;
|
|
421
|
+
sourceLabel: string;
|
|
422
|
+
targetId: string;
|
|
423
|
+
targetLabel: string;
|
|
424
|
+
type: string;
|
|
425
|
+
confidence: number;
|
|
426
|
+
reason: string;
|
|
427
|
+
step: number;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Capture the MEMBER_OF / STEP_IN_PROCESS / ENTRY_POINT_OF edges owned by `filePaths`, before a
|
|
431
|
+
* surgical incremental write DETACH DELETEs their file-side endpoints (#3016).
|
|
432
|
+
*
|
|
433
|
+
* Only meaningful on the write plan that keeps the persisted Community/Process
|
|
434
|
+
* nodes: those nodes survive the delete, but the edges tying this run's changed
|
|
435
|
+
* files to them do not, and the pipeline did not re-derive them.
|
|
436
|
+
*
|
|
437
|
+
* Both endpoints are matched by an EXPLICIT label — `sourceTables` on one side,
|
|
438
|
+
* the edge type's fixed target table on the other — so the labels come from the
|
|
439
|
+
* query rather than the rows. `labels(n)[0]` over an unlabelled match returns
|
|
440
|
+
* an empty string on this engine, which silently produced a snapshot that
|
|
441
|
+
* restored nothing.
|
|
442
|
+
*
|
|
443
|
+
* Read failures propagate. This runs against a warm index whose derived tables
|
|
444
|
+
* the caller has already established exist, so a failure here is a real fault —
|
|
445
|
+
* and swallowing it would drop the edges silently, which looks identical to a
|
|
446
|
+
* repo that genuinely has no communities.
|
|
447
|
+
*/
|
|
448
|
+
export declare const snapshotDerivedRelsForFiles: (filePaths: readonly string[], sourceTables: readonly string[]) => Promise<DerivedRelSnapshot[]>;
|
|
449
|
+
/**
|
|
450
|
+
* Re-create the edges captured by `snapshotDerivedRelsForFiles`, after the
|
|
451
|
+
* incremental subgraph load has put their file-side endpoints back.
|
|
452
|
+
*
|
|
453
|
+
* Endpoints are matched by label + id, mirroring `fallbackRelationshipInserts`:
|
|
454
|
+
* an unlabelled `MATCH (a), (b)` is a cartesian product over the whole graph
|
|
455
|
+
* and does not finish on a real index. An endpoint the load did not restore
|
|
456
|
+
* simply matches nothing, so the edge is dropped rather than mis-attached.
|
|
457
|
+
*/
|
|
458
|
+
export declare const restoreDerivedRels: (rels: readonly DerivedRelSnapshot[]) => Promise<void>;
|
|
389
459
|
export declare const getEmbeddingTableName: () => string;
|
|
390
460
|
/**
|
|
391
461
|
* Return the distinct repo-relative paths of files that import
|
|
@@ -501,6 +571,31 @@ export declare const deleteAllAdvisedBy: () => Promise<{
|
|
|
501
571
|
export declare const deleteSpringAopEvidenceNodes: () => Promise<{
|
|
502
572
|
nodesDeleted: number;
|
|
503
573
|
}>;
|
|
574
|
+
/**
|
|
575
|
+
* Drop EVERY `Destination` node before an incremental writeback, so the async
|
|
576
|
+
* messaging overlay is rebuilt whole from the fresh graph.
|
|
577
|
+
*
|
|
578
|
+
* Delete-all rather than delete-by-file, because the file-keyed rule cannot
|
|
579
|
+
* express this layer in either direction. A RESOLVED destination stores no
|
|
580
|
+
* `filePath` — that is what stops `deleteNodesForFiles` cutting a node shared
|
|
581
|
+
* by files outside the write set — which also means it is never deleted when it
|
|
582
|
+
* SHOULD be, so a destination whose last referrer stopped naming it survived as
|
|
583
|
+
* an edgeless orphan that still carried `address`, the cross-repository join
|
|
584
|
+
* key, accumulating on every run. The mirror defect was worse: without a
|
|
585
|
+
* matching graph-wide re-include, a newly added file publishing to a NEW topic
|
|
586
|
+
* wrote neither the destination nor the publisher's edge, silently and with a
|
|
587
|
+
* zero exit.
|
|
588
|
+
*
|
|
589
|
+
* The `springDestinations` phase runs on every persisting analyze and recomputes
|
|
590
|
+
* the full set from the whole file list, so delete-then-re-include is complete.
|
|
591
|
+
* `extractChangedSubgraph` treats `Destination` as graph-wide to supply the
|
|
592
|
+
* other half; the two must be changed together. DETACH DELETE also takes the
|
|
593
|
+
* `CONSUMES_FROM` / `PUBLISHES_TO` edges, which the re-include restores because
|
|
594
|
+
* every one of them has the destination as an endpoint.
|
|
595
|
+
*/
|
|
596
|
+
export declare const deleteAllDestinations: () => Promise<{
|
|
597
|
+
nodesDeleted: number;
|
|
598
|
+
}>;
|
|
504
599
|
/**
|
|
505
600
|
* Drop Spring-owned auto-configuration `DECLARES` relationships before
|
|
506
601
|
* incremental writeback. `DECLARES` is generic, so exact reason filtering is
|