@colbymchenry/codegraph-win32-arm64 1.5.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/codegraph +5 -0
- package/lib/dist/.test-build-engine.json +1 -0
- package/lib/dist/.test-build-viewer.json +1 -0
- package/lib/dist/bin/codegraph.d.ts +1 -0
- package/lib/dist/bin/codegraph.d.ts.map +1 -1
- package/lib/dist/bin/codegraph.js +744 -320
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/viewer-gate.d.ts +17 -0
- package/lib/dist/bin/viewer-gate.d.ts.map +1 -0
- package/lib/dist/bin/viewer-gate.js +31 -0
- package/lib/dist/bin/viewer-gate.js.map +1 -0
- package/lib/dist/context/formatter.d.ts +7 -1
- package/lib/dist/context/formatter.d.ts.map +1 -1
- package/lib/dist/context/formatter.js +12 -6
- package/lib/dist/context/formatter.js.map +1 -1
- package/lib/dist/context/index.d.ts +12 -0
- package/lib/dist/context/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +103 -16
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/db/index.d.ts +58 -2
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +187 -32
- package/lib/dist/db/index.js.map +1 -1
- package/lib/dist/db/migrations.d.ts +1 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +64 -1
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/queries.d.ts +583 -6
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +1417 -57
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/schema.sql +27 -4
- package/lib/dist/db/sqlite-adapter.d.ts +2 -0
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/lib/dist/db/sqlite-adapter.js +56 -7
- package/lib/dist/db/sqlite-adapter.js.map +1 -1
- package/lib/dist/db/synthesis-stage.d.ts +12 -0
- package/lib/dist/db/synthesis-stage.d.ts.map +1 -0
- package/lib/dist/db/synthesis-stage.js +89 -0
- package/lib/dist/db/synthesis-stage.js.map +1 -0
- package/lib/dist/db/wal-valve.d.ts +32 -12
- package/lib/dist/db/wal-valve.d.ts.map +1 -1
- package/lib/dist/db/wal-valve.js +65 -22
- package/lib/dist/db/wal-valve.js.map +1 -1
- package/lib/dist/db/wsl-shared-index.d.ts +53 -0
- package/lib/dist/db/wsl-shared-index.d.ts.map +1 -0
- package/lib/dist/db/wsl-shared-index.js +121 -0
- package/lib/dist/db/wsl-shared-index.js.map +1 -0
- package/lib/dist/directory.d.ts +130 -2
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +306 -23
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/errors.d.ts +14 -0
- package/lib/dist/errors.d.ts.map +1 -1
- package/lib/dist/errors.js +16 -1
- package/lib/dist/errors.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +1 -0
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +15 -3
- package/lib/dist/extraction/cfml-extractor.js.map +1 -1
- package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/dfm-extractor.js +14 -10
- package/lib/dist/extraction/dfm-extractor.js.map +1 -1
- package/lib/dist/extraction/extraction-version.d.ts +1 -1
- package/lib/dist/extraction/extraction-version.js +1 -1
- package/lib/dist/extraction/function-ref.d.ts +6 -4
- package/lib/dist/extraction/function-ref.d.ts.map +1 -1
- package/lib/dist/extraction/function-ref.js +41 -14
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/generated-detection.d.ts +48 -12
- package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
- package/lib/dist/extraction/generated-detection.js +176 -11
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +38 -0
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +115 -3
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +218 -14
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +874 -176
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.d.ts +58 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +310 -19
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +8 -3
- package/lib/dist/extraction/languages/dart.js.map +1 -1
- package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
- package/lib/dist/extraction/languages/erlang.js +58 -22
- package/lib/dist/extraction/languages/erlang.js.map +1 -1
- package/lib/dist/extraction/languages/javascript.js +1 -1
- package/lib/dist/extraction/languages/javascript.js.map +1 -1
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +169 -36
- package/lib/dist/extraction/languages/kotlin.js.map +1 -1
- package/lib/dist/extraction/languages/lua.d.ts.map +1 -1
- package/lib/dist/extraction/languages/lua.js +4 -1
- package/lib/dist/extraction/languages/lua.js.map +1 -1
- package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
- package/lib/dist/extraction/languages/objc.js +4 -0
- package/lib/dist/extraction/languages/objc.js.map +1 -1
- package/lib/dist/extraction/languages/python.d.ts.map +1 -1
- package/lib/dist/extraction/languages/python.js +71 -0
- package/lib/dist/extraction/languages/python.js.map +1 -1
- package/lib/dist/extraction/languages/rust.d.ts +20 -0
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
- package/lib/dist/extraction/languages/rust.js +50 -20
- package/lib/dist/extraction/languages/rust.js.map +1 -1
- package/lib/dist/extraction/languages/scala.d.ts.map +1 -1
- package/lib/dist/extraction/languages/scala.js +18 -3
- package/lib/dist/extraction/languages/scala.js.map +1 -1
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/typescript.js +9 -2
- package/lib/dist/extraction/languages/typescript.js.map +1 -1
- package/lib/dist/extraction/liquid-extractor.d.ts +18 -0
- package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/liquid-extractor.js +98 -22
- package/lib/dist/extraction/liquid-extractor.js.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.js +6 -4
- package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
- package/lib/dist/extraction/parse-pool.d.ts +7 -0
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +20 -1
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/syntax-tokens.d.ts +103 -0
- package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -0
- package/lib/dist/extraction/syntax-tokens.js +381 -0
- package/lib/dist/extraction/syntax-tokens.js.map +1 -0
- package/lib/dist/extraction/tree-sitter-helpers.d.ts +5 -0
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.js +17 -0
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts +31 -3
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +101 -18
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +926 -132
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
- package/lib/dist/file-limits.d.ts +40 -0
- package/lib/dist/file-limits.d.ts.map +1 -0
- package/lib/dist/file-limits.js +147 -0
- package/lib/dist/file-limits.js.map +1 -0
- package/lib/dist/graph/branch-guards.d.ts +248 -0
- package/lib/dist/graph/branch-guards.d.ts.map +1 -0
- package/lib/dist/graph/branch-guards.js +2231 -0
- package/lib/dist/graph/branch-guards.js.map +1 -0
- package/lib/dist/graph/dead-code.d.ts +251 -0
- package/lib/dist/graph/dead-code.d.ts.map +1 -0
- package/lib/dist/graph/dead-code.js +776 -0
- package/lib/dist/graph/dead-code.js.map +1 -0
- package/lib/dist/graph/dynamic-boundary-report.d.ts +121 -0
- package/lib/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
- package/lib/dist/graph/dynamic-boundary-report.js +283 -0
- package/lib/dist/graph/dynamic-boundary-report.js.map +1 -0
- package/lib/dist/graph/index.d.ts +4 -0
- package/lib/dist/graph/index.d.ts.map +1 -1
- package/lib/dist/graph/index.js +16 -1
- package/lib/dist/graph/index.js.map +1 -1
- package/lib/dist/graph/named-symbol-flow.d.ts +125 -0
- package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -0
- package/lib/dist/graph/named-symbol-flow.js +552 -0
- package/lib/dist/graph/named-symbol-flow.js.map +1 -0
- package/lib/dist/graph/queries.d.ts.map +1 -1
- package/lib/dist/graph/queries.js +2 -0
- package/lib/dist/graph/queries.js.map +1 -1
- package/lib/dist/graph/symbol-lookup.d.ts +83 -0
- package/lib/dist/graph/symbol-lookup.d.ts.map +1 -0
- package/lib/dist/graph/symbol-lookup.js +181 -0
- package/lib/dist/graph/symbol-lookup.js.map +1 -0
- package/lib/dist/graph/traversal.d.ts +9 -0
- package/lib/dist/graph/traversal.d.ts.map +1 -1
- package/lib/dist/graph/traversal.js +62 -36
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/graph/type-hierarchy.d.ts +155 -0
- package/lib/dist/graph/type-hierarchy.d.ts.map +1 -0
- package/lib/dist/graph/type-hierarchy.js +382 -0
- package/lib/dist/graph/type-hierarchy.js.map +1 -0
- package/lib/dist/index.d.ts +273 -11
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +511 -34
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/index.d.ts +4 -3
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +11 -8
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/targets/antigravity.d.ts.map +1 -1
- package/lib/dist/installer/targets/antigravity.js +14 -2
- package/lib/dist/installer/targets/antigravity.js.map +1 -1
- package/lib/dist/installer/targets/claude.d.ts +3 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +72 -12
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/codex.d.ts +23 -8
- package/lib/dist/installer/targets/codex.d.ts.map +1 -1
- package/lib/dist/installer/targets/codex.js +74 -47
- package/lib/dist/installer/targets/codex.js.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.d.ts +32 -0
- package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-cli.js +215 -0
- package/lib/dist/installer/targets/copilot-cli.js.map +1 -0
- package/lib/dist/installer/targets/copilot-jetbrains.d.ts +42 -0
- package/lib/dist/installer/targets/copilot-jetbrains.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-jetbrains.js +238 -0
- package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -0
- package/lib/dist/installer/targets/copilot-vscode.d.ts +47 -0
- package/lib/dist/installer/targets/copilot-vscode.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-vscode.js +219 -0
- package/lib/dist/installer/targets/copilot-vscode.js.map +1 -0
- package/lib/dist/installer/targets/opencode.d.ts +16 -5
- package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
- package/lib/dist/installer/targets/opencode.js +73 -22
- package/lib/dist/installer/targets/opencode.js.map +1 -1
- package/lib/dist/installer/targets/registry.d.ts.map +1 -1
- package/lib/dist/installer/targets/registry.js +6 -0
- package/lib/dist/installer/targets/registry.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +14 -3
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +39 -11
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/toml.d.ts +6 -5
- package/lib/dist/installer/targets/toml.d.ts.map +1 -1
- package/lib/dist/installer/targets/toml.js +99 -20
- package/lib/dist/installer/targets/toml.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +12 -5
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/mcp/answer-freshness.d.ts +10 -0
- package/lib/dist/mcp/answer-freshness.d.ts.map +1 -0
- package/lib/dist/mcp/answer-freshness.js +68 -0
- package/lib/dist/mcp/answer-freshness.js.map +1 -0
- package/lib/dist/mcp/daemon-manager.d.ts +1 -1
- package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +17 -1
- package/lib/dist/mcp/daemon-manager.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts +8 -0
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +65 -2
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +17 -4
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +133 -23
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +26 -13
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +126 -32
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.d.ts +1 -10
- package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.js +46 -42
- package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
- package/lib/dist/mcp/engine.d.ts +31 -9
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +190 -64
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-dedup.d.ts +140 -0
- package/lib/dist/mcp/explore-dedup.d.ts.map +1 -0
- package/lib/dist/mcp/explore-dedup.js +239 -0
- package/lib/dist/mcp/explore-dedup.js.map +1 -0
- package/lib/dist/mcp/explore-diagnostics.d.ts +289 -0
- package/lib/dist/mcp/explore-diagnostics.d.ts.map +1 -0
- package/lib/dist/mcp/explore-diagnostics.js +558 -0
- package/lib/dist/mcp/explore-diagnostics.js.map +1 -0
- package/lib/dist/mcp/explore-session-state.d.ts +217 -0
- package/lib/dist/mcp/explore-session-state.d.ts.map +1 -0
- package/lib/dist/mcp/explore-session-state.js +322 -0
- package/lib/dist/mcp/explore-session-state.js.map +1 -0
- package/lib/dist/mcp/index-freshness-worker.d.ts +2 -0
- package/lib/dist/mcp/index-freshness-worker.d.ts.map +1 -0
- package/lib/dist/mcp/index-freshness-worker.js +30 -0
- package/lib/dist/mcp/index-freshness-worker.js.map +1 -0
- package/lib/dist/mcp/index-freshness.d.ts +7 -0
- package/lib/dist/mcp/index-freshness.d.ts.map +1 -0
- package/lib/dist/mcp/index-freshness.js +94 -0
- package/lib/dist/mcp/index-freshness.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +27 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +159 -14
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts +4 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +14 -3
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/project-lifecycle.d.ts +9 -0
- package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -0
- package/lib/dist/mcp/project-lifecycle.js +181 -0
- package/lib/dist/mcp/project-lifecycle.js.map +1 -0
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +15 -1
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +2 -2
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +9 -7
- package/lib/dist/mcp/query-pool.js.map +1 -1
- package/lib/dist/mcp/query-worker.js +2 -2
- package/lib/dist/mcp/query-worker.js.map +1 -1
- package/lib/dist/mcp/server-instructions.d.ts +2 -2
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +13 -5
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +16 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +36 -13
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/startup-handshake.d.ts +3 -1
- package/lib/dist/mcp/startup-handshake.d.ts.map +1 -1
- package/lib/dist/mcp/startup-handshake.js +10 -2
- package/lib/dist/mcp/startup-handshake.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts +544 -38
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +4246 -770
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/mcp/writer-lock.d.ts +61 -0
- package/lib/dist/mcp/writer-lock.d.ts.map +1 -0
- package/lib/dist/mcp/writer-lock.js +260 -0
- package/lib/dist/mcp/writer-lock.js.map +1 -0
- package/lib/dist/project-config.d.ts +23 -0
- package/lib/dist/project-config.d.ts.map +1 -1
- package/lib/dist/project-config.js +39 -2
- package/lib/dist/project-config.js.map +1 -1
- package/lib/dist/resolution/alias-binding.d.ts +56 -0
- package/lib/dist/resolution/alias-binding.d.ts.map +1 -0
- package/lib/dist/resolution/alias-binding.js +127 -0
- package/lib/dist/resolution/alias-binding.js.map +1 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.js +21 -19
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts +23 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +330 -154
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/cpp-constructor.d.ts +4 -0
- package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-constructor.js +123 -0
- package/lib/dist/resolution/cpp-constructor.js.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts +12 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.js +342 -0
- package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.d.ts +32 -0
- package/lib/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.js +189 -0
- package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.js +96 -2
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.d.ts +189 -0
- package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/expo-router.js +785 -0
- package/lib/dist/resolution/frameworks/expo-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/express.js +251 -16
- package/lib/dist/resolution/frameworks/express.js.map +1 -1
- package/lib/dist/resolution/frameworks/index.d.ts +5 -0
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +29 -1
- package/lib/dist/resolution/frameworks/index.js.map +1 -1
- package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/java.js +79 -47
- package/lib/dist/resolution/frameworks/java.js.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.js +6 -14
- package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/nextjs.d.ts +76 -0
- package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/nextjs.js +328 -0
- package/lib/dist/resolution/frameworks/nextjs.js.map +1 -0
- package/lib/dist/resolution/frameworks/object-literal.d.ts +32 -0
- package/lib/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/object-literal.js +139 -0
- package/lib/dist/resolution/frameworks/object-literal.js.map +1 -0
- package/lib/dist/resolution/frameworks/package-deps.d.ts +14 -0
- package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/package-deps.js +78 -0
- package/lib/dist/resolution/frameworks/package-deps.js.map +1 -0
- package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/python.js +166 -0
- package/lib/dist/resolution/frameworks/python.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.d.ts +26 -0
- package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.js +153 -14
- package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.d.ts +46 -0
- package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/react-router.js +187 -0
- package/lib/dist/resolution/frameworks/react-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/react.d.ts +2 -1
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react.js +188 -139
- package/lib/dist/resolution/frameworks/react.js.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.js +6 -1
- package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/sveltekit-router.js +156 -0
- package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/swift.js +11 -1
- package/lib/dist/resolution/frameworks/swift.js.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/tanstack-router.js +437 -0
- package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/vue-router.d.ts +82 -0
- package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/vue-router.js +377 -0
- package/lib/dist/resolution/frameworks/vue-router.js.map +1 -0
- package/lib/dist/resolution/import-resolver.d.ts +38 -0
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +394 -28
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +89 -25
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +567 -149
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/js-builtins.d.ts +13 -0
- package/lib/dist/resolution/js-builtins.d.ts.map +1 -0
- package/lib/dist/resolution/js-builtins.js +46 -0
- package/lib/dist/resolution/js-builtins.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +99 -22
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +2192 -87
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.d.ts +27 -0
- package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/next-router-synthesizer.js +113 -0
- package/lib/dist/resolution/next-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/path-aliases.d.ts +6 -4
- package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
- package/lib/dist/resolution/path-aliases.js +125 -17
- package/lib/dist/resolution/path-aliases.js.map +1 -1
- package/lib/dist/resolution/react-router-synthesizer.d.ts +33 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/react-router-synthesizer.js +126 -0
- package/lib/dist/resolution/react-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/resolver-pool.d.ts +2 -0
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-pool.js +4 -0
- package/lib/dist/resolution/resolver-pool.js.map +1 -1
- package/lib/dist/resolution/strip-comments.d.ts +6 -0
- package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
- package/lib/dist/resolution/strip-comments.js +58 -0
- package/lib/dist/resolution/strip-comments.js.map +1 -1
- package/lib/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
- package/lib/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/sveltekit-synthesizer.js +173 -0
- package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -0
- package/lib/dist/resolution/synth-utils.d.ts +26 -0
- package/lib/dist/resolution/synth-utils.d.ts.map +1 -0
- package/lib/dist/resolution/synth-utils.js +75 -0
- package/lib/dist/resolution/synth-utils.js.map +1 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.js +114 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts +49 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.js +931 -0
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -0
- package/lib/dist/resolution/types.d.ts +78 -2
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/resolution/types.js +64 -0
- package/lib/dist/resolution/types.js.map +1 -1
- package/lib/dist/resolution/vue-router-synthesizer.d.ts +30 -0
- package/lib/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/vue-router-synthesizer.js +115 -0
- package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -0
- package/lib/dist/search/identifier-segments.d.ts +10 -0
- package/lib/dist/search/identifier-segments.d.ts.map +1 -1
- package/lib/dist/search/identifier-segments.js +29 -0
- package/lib/dist/search/identifier-segments.js.map +1 -1
- package/lib/dist/search/query-paths.d.ts +106 -0
- package/lib/dist/search/query-paths.d.ts.map +1 -0
- package/lib/dist/search/query-paths.js +513 -0
- package/lib/dist/search/query-paths.js.map +1 -0
- package/lib/dist/search/query-utils.d.ts +16 -1
- package/lib/dist/search/query-utils.d.ts.map +1 -1
- package/lib/dist/search/query-utils.js +48 -10
- package/lib/dist/search/query-utils.js.map +1 -1
- package/lib/dist/sync/watch-policy.d.ts +14 -0
- package/lib/dist/sync/watch-policy.d.ts.map +1 -1
- package/lib/dist/sync/watch-policy.js +19 -0
- package/lib/dist/sync/watch-policy.js.map +1 -1
- package/lib/dist/sync/watcher.d.ts +74 -35
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +281 -99
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/telemetry/index.d.ts +4 -2
- package/lib/dist/telemetry/index.d.ts.map +1 -1
- package/lib/dist/telemetry/index.js +92 -41
- package/lib/dist/telemetry/index.js.map +1 -1
- package/lib/dist/types.d.ts +21 -2
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +2 -0
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/ui-server/api/deadcode.d.ts +84 -0
- package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -0
- package/lib/dist/ui-server/api/deadcode.js +136 -0
- package/lib/dist/ui-server/api/deadcode.js.map +1 -0
- package/lib/dist/ui-server/api/effects.d.ts +87 -0
- package/lib/dist/ui-server/api/effects.d.ts.map +1 -0
- package/lib/dist/ui-server/api/effects.js +499 -0
- package/lib/dist/ui-server/api/effects.js.map +1 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts +86 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -0
- package/lib/dist/ui-server/api/entrypoints.js +279 -0
- package/lib/dist/ui-server/api/entrypoints.js.map +1 -0
- package/lib/dist/ui-server/api/events.d.ts +183 -0
- package/lib/dist/ui-server/api/events.d.ts.map +1 -0
- package/lib/dist/ui-server/api/events.js +430 -0
- package/lib/dist/ui-server/api/events.js.map +1 -0
- package/lib/dist/ui-server/api/file.d.ts +66 -0
- package/lib/dist/ui-server/api/file.d.ts.map +1 -0
- package/lib/dist/ui-server/api/file.js +235 -0
- package/lib/dist/ui-server/api/file.js.map +1 -0
- package/lib/dist/ui-server/api/filecode.d.ts +126 -0
- package/lib/dist/ui-server/api/filecode.d.ts.map +1 -0
- package/lib/dist/ui-server/api/filecode.js +205 -0
- package/lib/dist/ui-server/api/filecode.js.map +1 -0
- package/lib/dist/ui-server/api/flow.d.ts +226 -0
- package/lib/dist/ui-server/api/flow.d.ts.map +1 -0
- package/lib/dist/ui-server/api/flow.js +612 -0
- package/lib/dist/ui-server/api/flow.js.map +1 -0
- package/lib/dist/ui-server/api/hierarchy.d.ts +81 -0
- package/lib/dist/ui-server/api/hierarchy.d.ts.map +1 -0
- package/lib/dist/ui-server/api/hierarchy.js +92 -0
- package/lib/dist/ui-server/api/hierarchy.js.map +1 -0
- package/lib/dist/ui-server/api/index.d.ts +90 -0
- package/lib/dist/ui-server/api/index.d.ts.map +1 -0
- package/lib/dist/ui-server/api/index.js +332 -0
- package/lib/dist/ui-server/api/index.js.map +1 -0
- package/lib/dist/ui-server/api/map.d.ts +238 -0
- package/lib/dist/ui-server/api/map.d.ts.map +1 -0
- package/lib/dist/ui-server/api/map.js +681 -0
- package/lib/dist/ui-server/api/map.js.map +1 -0
- package/lib/dist/ui-server/api/node.d.ts +81 -0
- package/lib/dist/ui-server/api/node.d.ts.map +1 -0
- package/lib/dist/ui-server/api/node.js +388 -0
- package/lib/dist/ui-server/api/node.js.map +1 -0
- package/lib/dist/ui-server/api/nodes.d.ts +25 -0
- package/lib/dist/ui-server/api/nodes.d.ts.map +1 -0
- package/lib/dist/ui-server/api/nodes.js +45 -0
- package/lib/dist/ui-server/api/nodes.js.map +1 -0
- package/lib/dist/ui-server/api/program.d.ts +139 -0
- package/lib/dist/ui-server/api/program.d.ts.map +1 -0
- package/lib/dist/ui-server/api/program.js +315 -0
- package/lib/dist/ui-server/api/program.js.map +1 -0
- package/lib/dist/ui-server/api/respond.d.ts +76 -0
- package/lib/dist/ui-server/api/respond.d.ts.map +1 -0
- package/lib/dist/ui-server/api/respond.js +186 -0
- package/lib/dist/ui-server/api/respond.js.map +1 -0
- package/lib/dist/ui-server/api/route-roots.d.ts +39 -0
- package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -0
- package/lib/dist/ui-server/api/route-roots.js +96 -0
- package/lib/dist/ui-server/api/route-roots.js.map +1 -0
- package/lib/dist/ui-server/api/routes.d.ts +59 -0
- package/lib/dist/ui-server/api/routes.d.ts.map +1 -0
- package/lib/dist/ui-server/api/routes.js +108 -0
- package/lib/dist/ui-server/api/routes.js.map +1 -0
- package/lib/dist/ui-server/api/screens.d.ts +117 -0
- package/lib/dist/ui-server/api/screens.d.ts.map +1 -0
- package/lib/dist/ui-server/api/screens.js +611 -0
- package/lib/dist/ui-server/api/screens.js.map +1 -0
- package/lib/dist/ui-server/api/search.d.ts +29 -0
- package/lib/dist/ui-server/api/search.d.ts.map +1 -0
- package/lib/dist/ui-server/api/search.js +232 -0
- package/lib/dist/ui-server/api/search.js.map +1 -0
- package/lib/dist/ui-server/api/session.d.ts +52 -0
- package/lib/dist/ui-server/api/session.d.ts.map +1 -0
- package/lib/dist/ui-server/api/session.js +196 -0
- package/lib/dist/ui-server/api/session.js.map +1 -0
- package/lib/dist/ui-server/api/source.d.ts +200 -0
- package/lib/dist/ui-server/api/source.d.ts.map +1 -0
- package/lib/dist/ui-server/api/source.js +422 -0
- package/lib/dist/ui-server/api/source.js.map +1 -0
- package/lib/dist/ui-server/api/stats.d.ts +27 -0
- package/lib/dist/ui-server/api/stats.d.ts.map +1 -0
- package/lib/dist/ui-server/api/stats.js +164 -0
- package/lib/dist/ui-server/api/stats.js.map +1 -0
- package/lib/dist/ui-server/api/steps.d.ts +274 -0
- package/lib/dist/ui-server/api/steps.d.ts.map +1 -0
- package/lib/dist/ui-server/api/steps.js +1446 -0
- package/lib/dist/ui-server/api/steps.js.map +1 -0
- package/lib/dist/ui-server/api/trail-store.d.ts +142 -0
- package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -0
- package/lib/dist/ui-server/api/trail-store.js +323 -0
- package/lib/dist/ui-server/api/trail-store.js.map +1 -0
- package/lib/dist/ui-server/api/trails.d.ts +163 -0
- package/lib/dist/ui-server/api/trails.d.ts.map +1 -0
- package/lib/dist/ui-server/api/trails.js +369 -0
- package/lib/dist/ui-server/api/trails.js.map +1 -0
- package/lib/dist/ui-server/api/when.d.ts +125 -0
- package/lib/dist/ui-server/api/when.d.ts.map +1 -0
- package/lib/dist/ui-server/api/when.js +251 -0
- package/lib/dist/ui-server/api/when.js.map +1 -0
- package/lib/dist/ui-server/api/wire.d.ts +179 -0
- package/lib/dist/ui-server/api/wire.d.ts.map +1 -0
- package/lib/dist/ui-server/api/wire.js +231 -0
- package/lib/dist/ui-server/api/wire.js.map +1 -0
- package/lib/dist/ui-server/assets.d.ts +40 -0
- package/lib/dist/ui-server/assets.d.ts.map +1 -0
- package/lib/dist/ui-server/assets.js +110 -0
- package/lib/dist/ui-server/assets.js.map +1 -0
- package/lib/dist/ui-server/constants.d.ts +32 -0
- package/lib/dist/ui-server/constants.d.ts.map +1 -0
- package/lib/dist/ui-server/constants.js +35 -0
- package/lib/dist/ui-server/constants.js.map +1 -0
- package/lib/dist/ui-server/highlight/index.d.ts +113 -0
- package/lib/dist/ui-server/highlight/index.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/index.js +307 -0
- package/lib/dist/ui-server/highlight/index.js.map +1 -0
- package/lib/dist/ui-server/highlight/languages.d.ts +36 -0
- package/lib/dist/ui-server/highlight/languages.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/languages.js +50 -0
- package/lib/dist/ui-server/highlight/languages.js.map +1 -0
- package/lib/dist/ui-server/index.d.ts +92 -0
- package/lib/dist/ui-server/index.d.ts.map +1 -0
- package/lib/dist/ui-server/index.js +399 -0
- package/lib/dist/ui-server/index.js.map +1 -0
- package/lib/dist/ui-server/open-browser.d.ts +31 -0
- package/lib/dist/ui-server/open-browser.d.ts.map +1 -0
- package/lib/dist/ui-server/open-browser.js +79 -0
- package/lib/dist/ui-server/open-browser.js.map +1 -0
- package/lib/dist/ui-server/security.d.ts +127 -0
- package/lib/dist/ui-server/security.d.ts.map +1 -0
- package/lib/dist/ui-server/security.js +332 -0
- package/lib/dist/ui-server/security.js.map +1 -0
- package/lib/dist/ui-server/static.d.ts +45 -0
- package/lib/dist/ui-server/static.d.ts.map +1 -0
- package/lib/dist/ui-server/static.js +165 -0
- package/lib/dist/ui-server/static.js.map +1 -0
- package/lib/dist/utils.d.ts +14 -2
- package/lib/dist/utils.d.ts.map +1 -1
- package/lib/dist/utils.js +25 -10
- package/lib/dist/utils.js.map +1 -1
- package/lib/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
- package/lib/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
- package/lib/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
- package/lib/dist/viewer/assets/index-CF9yvio6.css +1 -0
- package/lib/dist/viewer/assets/index-D4S7YUPf.js +97 -0
- package/lib/dist/viewer/index.html +16 -0
- package/lib/kernel/codegraph-kernel.node +2 -2
- package/lib/node_modules/.package-lock.json +4 -4
- package/lib/node_modules/picomatch/README.md +56 -51
- package/lib/node_modules/picomatch/lib/constants.js +4 -0
- package/lib/node_modules/picomatch/lib/parse.js +341 -1
- package/lib/node_modules/picomatch/lib/picomatch.js +25 -5
- package/lib/node_modules/picomatch/lib/scan.js +30 -18
- package/lib/node_modules/picomatch/package.json +4 -4
- package/lib/package.json +9 -2
- package/package.json +1 -1
package/lib/dist/index.js
CHANGED
|
@@ -41,8 +41,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
41
41
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
42
42
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
43
43
|
};
|
|
44
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
+
};
|
|
44
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
48
|
exports.CodeGraph = exports.MCPServer = exports.LockUnavailableError = exports.FileWatcher = exports.MemoryMonitor = exports.throttle = exports.debounce = exports.processInBatches = exports.FileLock = exports.Mutex = exports.defaultLogger = exports.silentLogger = exports.getLogger = exports.setLogger = exports.ConfigError = exports.VectorError = exports.SearchError = exports.DatabaseError = exports.ParseError = exports.FileError = exports.CodeGraphError = exports.loadAllGrammars = exports.loadGrammarsForLanguages = exports.initGrammars = exports.getSupportedLanguages = exports.isGrammarLoaded = exports.isLanguageSupported = exports.detectLanguage = exports.CODEGRAPH_DIR = exports.findNearestCodeGraphRoot = exports.isInitialized = exports.getCodeGraphDir = exports.QueryBuilder = exports.DatabaseConnection = exports.getDatabasePath = void 0;
|
|
49
|
+
const fs = __importStar(require("fs"));
|
|
46
50
|
const path = __importStar(require("path"));
|
|
47
51
|
const db_1 = require("./db");
|
|
48
52
|
const wal_valve_1 = require("./db/wal-valve");
|
|
@@ -50,6 +54,7 @@ const queries_1 = require("./db/queries");
|
|
|
50
54
|
const directory_1 = require("./directory");
|
|
51
55
|
const extraction_1 = require("./extraction");
|
|
52
56
|
const resolution_1 = require("./resolution");
|
|
57
|
+
const callback_synthesizer_1 = require("./resolution/callback-synthesizer");
|
|
53
58
|
const graph_1 = require("./graph");
|
|
54
59
|
const context_1 = require("./context");
|
|
55
60
|
const utils_1 = require("./utils");
|
|
@@ -57,6 +62,8 @@ const sync_1 = require("./sync");
|
|
|
57
62
|
const extraction_version_1 = require("./extraction/extraction-version");
|
|
58
63
|
const directory_2 = require("./directory");
|
|
59
64
|
const query_utils_1 = require("./search/query-utils");
|
|
65
|
+
const ignore_1 = __importDefault(require("ignore"));
|
|
66
|
+
const project_config_1 = require("./project-config");
|
|
60
67
|
const version_1 = require("./mcp/version");
|
|
61
68
|
const identifier_segments_1 = require("./search/identifier-segments");
|
|
62
69
|
const cooperative_yield_1 = require("./resolution/cooperative-yield");
|
|
@@ -154,12 +161,64 @@ class CodeGraph {
|
|
|
154
161
|
catch {
|
|
155
162
|
// Best-effort: ranking still works without it.
|
|
156
163
|
}
|
|
164
|
+
// Down-weight the peripheral trees the project named in `codegraph.json`
|
|
165
|
+
// `deprioritize` — indexed and findable, but never outranking real code
|
|
166
|
+
// (#982). Ranking-only, so a bad pattern costs relevance, never recall.
|
|
167
|
+
//
|
|
168
|
+
// Read LAZILY, not once here: `wireLayers` runs from the constructor and
|
|
169
|
+
// from `reopenIfReplaced`, so a matcher built here would freeze at whatever
|
|
170
|
+
// the config said when the project opened. The MCP server caches one
|
|
171
|
+
// CodeGraph per root for its whole lifetime, so editing `codegraph.json`
|
|
172
|
+
// would appear to do nothing until the process restarted — `exclude` and
|
|
173
|
+
// `include` do not behave that way. `loadDeprioritizePatterns` is
|
|
174
|
+
// mtime-cached, so this costs one `stat`; the compiled matcher is memoized
|
|
175
|
+
// on the pattern array's identity, which the cache keeps stable.
|
|
176
|
+
let cachedPatterns;
|
|
177
|
+
let cachedMatcher;
|
|
178
|
+
this.queries.setDeprioritizedPathMatcher((filePath) => {
|
|
179
|
+
try {
|
|
180
|
+
const patterns = (0, project_config_1.loadDeprioritizePatterns)(this.projectRoot);
|
|
181
|
+
if (patterns.length === 0)
|
|
182
|
+
return false;
|
|
183
|
+
if (patterns !== cachedPatterns) {
|
|
184
|
+
cachedPatterns = patterns;
|
|
185
|
+
cachedMatcher = (0, ignore_1.default)().add(patterns);
|
|
186
|
+
}
|
|
187
|
+
const rel = path.isAbsolute(filePath)
|
|
188
|
+
? path.relative(this.projectRoot, filePath)
|
|
189
|
+
: filePath;
|
|
190
|
+
if (!rel || rel.startsWith('..'))
|
|
191
|
+
return false;
|
|
192
|
+
return cachedMatcher.ignores(rel.split(path.sep).join('/'));
|
|
193
|
+
}
|
|
194
|
+
catch {
|
|
195
|
+
// Ranking must never take the search down with it.
|
|
196
|
+
return false;
|
|
197
|
+
}
|
|
198
|
+
});
|
|
157
199
|
this.orchestrator = new extraction_1.ExtractionOrchestrator(this.projectRoot, this.queries);
|
|
158
200
|
this.resolver = (0, resolution_1.createResolver)(this.projectRoot, this.queries);
|
|
159
201
|
this.graphManager = new graph_1.GraphQueryManager(this.queries);
|
|
160
202
|
this.traverser = new graph_1.GraphTraverser(this.queries);
|
|
161
203
|
this.contextBuilder = (0, context_1.createContextBuilder)(this.projectRoot, this.queries, this.traverser);
|
|
162
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
* Set when this instance followed a database replaced on disk (#1902): the
|
|
207
|
+
* next sync that can run reconciles the whole tree, because whatever the old
|
|
208
|
+
* handle absorbed since the rebuild never reached the new file.
|
|
209
|
+
*/
|
|
210
|
+
pendingFullReconcile = false;
|
|
211
|
+
/** How long a recreated, not-yet-indexed database is treated as a rebuild in progress. */
|
|
212
|
+
static RECREATE_GRACE_MS = 120_000;
|
|
213
|
+
/** The database file at the path was written within the recreate grace window. */
|
|
214
|
+
isFreshlyRecreated() {
|
|
215
|
+
try {
|
|
216
|
+
return Date.now() - fs.statSync((0, db_1.getDatabasePath)(this.projectRoot)).mtimeMs < CodeGraph.RECREATE_GRACE_MS;
|
|
217
|
+
}
|
|
218
|
+
catch {
|
|
219
|
+
return false;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
163
222
|
/**
|
|
164
223
|
* Heal a stale database handle in place. If `.codegraph/` was removed and
|
|
165
224
|
* recreated at the SAME path while this instance held the DB open — a git
|
|
@@ -173,19 +232,33 @@ class CodeGraph {
|
|
|
173
232
|
*
|
|
174
233
|
* POSIX-only in practice: `isReplacedOnDisk` never fires on Windows (an open
|
|
175
234
|
* file can't be unlinked there, and st_ino is unreliable).
|
|
235
|
+
*
|
|
236
|
+
* Refuses (returns false) while an index/sync holds the index mutex: closing
|
|
237
|
+
* the handle that run is writing through would break it mid-flight. `sync()`
|
|
238
|
+
* performs the same check itself once it holds the mutex (#1902), so the
|
|
239
|
+
* replaced file is still picked up — by that sync, or by the caller's retry.
|
|
176
240
|
*/
|
|
177
241
|
reopenIfReplaced() {
|
|
242
|
+
if (this.indexMutex.isLocked())
|
|
243
|
+
return false;
|
|
244
|
+
return this.reopenReplacedDatabase();
|
|
245
|
+
}
|
|
246
|
+
/** The body of {@link reopenIfReplaced}, without the in-flight-sync guard. */
|
|
247
|
+
reopenReplacedDatabase() {
|
|
178
248
|
if (!this.db.isReplacedOnDisk())
|
|
179
249
|
return false;
|
|
180
250
|
const dbPath = this.db.getPath();
|
|
181
251
|
// Open the live file FIRST — if that throws (e.g. mid-recreate), the old
|
|
182
252
|
// handle stays in place and the caller retries on the next query, rather
|
|
183
253
|
// than leaving this instance with no connection at all.
|
|
184
|
-
const fresh = db_1.DatabaseConnection.open(dbPath);
|
|
254
|
+
const fresh = db_1.DatabaseConnection.open(dbPath, { readOnly: this.db.readOnly });
|
|
185
255
|
const stale = this.db;
|
|
186
256
|
this.db = fresh;
|
|
187
257
|
this.queries = new queries_1.QueryBuilder(fresh.getDb());
|
|
188
258
|
this.wireLayers();
|
|
259
|
+
// Whoever reopened — a sync, or a tool call's self-heal — the next sync
|
|
260
|
+
// must reconcile the whole tree (#1902).
|
|
261
|
+
this.pendingFullReconcile = true;
|
|
189
262
|
// Releasing the dead handle also frees the leaked db/-wal/-shm fds that were
|
|
190
263
|
// pinning the unlinked inode (#925).
|
|
191
264
|
try {
|
|
@@ -264,12 +337,18 @@ class CodeGraph {
|
|
|
264
337
|
}
|
|
265
338
|
// Open database
|
|
266
339
|
const dbPath = (0, db_1.getDatabasePath)(resolvedRoot);
|
|
267
|
-
const db = db_1.DatabaseConnection.open(dbPath);
|
|
340
|
+
const db = db_1.DatabaseConnection.open(dbPath, { readOnly: options.readOnly });
|
|
268
341
|
const queries = new queries_1.QueryBuilder(db.getDb());
|
|
269
342
|
const instance = new CodeGraph(db, queries, resolvedRoot);
|
|
270
343
|
// Sync if requested
|
|
271
|
-
if (options.sync) {
|
|
272
|
-
|
|
344
|
+
if (options.sync && !options.readOnly) {
|
|
345
|
+
try {
|
|
346
|
+
await instance.sync();
|
|
347
|
+
}
|
|
348
|
+
catch (err) {
|
|
349
|
+
instance.destroy();
|
|
350
|
+
throw err;
|
|
351
|
+
}
|
|
273
352
|
}
|
|
274
353
|
return instance;
|
|
275
354
|
}
|
|
@@ -318,7 +397,7 @@ class CodeGraph {
|
|
|
318
397
|
/**
|
|
319
398
|
* Open synchronously (without sync)
|
|
320
399
|
*/
|
|
321
|
-
static openSync(projectRoot) {
|
|
400
|
+
static openSync(projectRoot, options = {}) {
|
|
322
401
|
const resolvedRoot = path.resolve(projectRoot);
|
|
323
402
|
// Check if initialized
|
|
324
403
|
if (!(0, directory_1.isInitialized)(resolvedRoot)) {
|
|
@@ -331,7 +410,7 @@ class CodeGraph {
|
|
|
331
410
|
}
|
|
332
411
|
// Open database
|
|
333
412
|
const dbPath = (0, db_1.getDatabasePath)(resolvedRoot);
|
|
334
|
-
const db = db_1.DatabaseConnection.open(dbPath);
|
|
413
|
+
const db = db_1.DatabaseConnection.open(dbPath, { readOnly: options.readOnly });
|
|
335
414
|
const queries = new queries_1.QueryBuilder(db.getDb());
|
|
336
415
|
return new CodeGraph(db, queries, resolvedRoot);
|
|
337
416
|
}
|
|
@@ -409,6 +488,7 @@ class CodeGraph {
|
|
|
409
488
|
walValve.start();
|
|
410
489
|
}
|
|
411
490
|
try {
|
|
491
|
+
const gitState = this.orchestrator.beginGitIndexState(true);
|
|
412
492
|
const before = this.queries.getNodeAndEdgeCount();
|
|
413
493
|
// Mark the index as in-flight BEFORE any writes: a run killed
|
|
414
494
|
// mid-index (OOM, SIGKILL, the #850 liveness watchdog) leaves this
|
|
@@ -584,6 +664,10 @@ class CodeGraph {
|
|
|
584
664
|
}
|
|
585
665
|
catch { /* metadata is advisory — never fail an index over it */ }
|
|
586
666
|
}
|
|
667
|
+
if (result.success && result.filesErrored === 0 &&
|
|
668
|
+
(result.filesDiscovered === undefined || result.filesIndexed + result.filesSkipped >= result.filesDiscovered)) {
|
|
669
|
+
this.orchestrator.finishGitIndexState(gitState, true);
|
|
670
|
+
}
|
|
587
671
|
// Reconcile the scan's ground truth against what the pipeline
|
|
588
672
|
// accounted for. A shortfall means files were silently dropped
|
|
589
673
|
// (observed in the wild: a run under heavy load came up 37 files
|
|
@@ -670,7 +754,8 @@ class CodeGraph {
|
|
|
670
754
|
});
|
|
671
755
|
}
|
|
672
756
|
/**
|
|
673
|
-
* Sync with current file state (incremental update)
|
|
757
|
+
* Sync with current file state (incremental update).
|
|
758
|
+
* Throws LockUnavailableError if the cross-process write lock is unavailable.
|
|
674
759
|
*
|
|
675
760
|
* Uses a mutex to prevent concurrent indexing operations.
|
|
676
761
|
*/
|
|
@@ -679,8 +764,40 @@ class CodeGraph {
|
|
|
679
764
|
try {
|
|
680
765
|
this.fileLock.acquire();
|
|
681
766
|
}
|
|
682
|
-
catch {
|
|
683
|
-
|
|
767
|
+
catch (err) {
|
|
768
|
+
throw new sync_1.LockUnavailableError(`Sync could not acquire the file lock; retry when the index is available. ${err instanceof Error ? err.message : String(err)}`);
|
|
769
|
+
}
|
|
770
|
+
// A full rebuild in another process (`codegraph index` → recreate)
|
|
771
|
+
// unlinks the database and creates a new file at the same path. A
|
|
772
|
+
// long-lived instance — the MCP daemon's watcher — would otherwise keep
|
|
773
|
+
// "syncing" into the dead inode, and nothing it wrote there is visible
|
|
774
|
+
// to anyone (#1902). Follow the path before writing (one stat), and
|
|
775
|
+
// widen a scoped sync to a full one: whatever the old handle absorbed
|
|
776
|
+
// since the rebuild is gone, so the new file has to be reconciled whole.
|
|
777
|
+
// If the reopen fails (the rebuild is mid-way), report lock contention
|
|
778
|
+
// so the watcher keeps its pending files and retries.
|
|
779
|
+
try {
|
|
780
|
+
this.reopenReplacedDatabase();
|
|
781
|
+
}
|
|
782
|
+
catch (err) {
|
|
783
|
+
this.fileLock.release();
|
|
784
|
+
throw new sync_1.LockUnavailableError(`Sync could not open the rebuilt index yet; retry when the rebuild finishes. ${err instanceof Error ? err.message : String(err)}`);
|
|
785
|
+
}
|
|
786
|
+
if (this.pendingFullReconcile) {
|
|
787
|
+
// `codegraph index` recreates the file, THEN takes the write lock in
|
|
788
|
+
// indexAll. A sync landing in that gap would otherwise run a full
|
|
789
|
+
// reconcile of the empty file and hold the lock the rebuild is about
|
|
790
|
+
// to ask for. A fresh file with no index_state yet is that rebuild:
|
|
791
|
+
// step aside (lock contention, the watcher retries) and reconcile in
|
|
792
|
+
// full once it is done. Bounded, so a rebuild that died before
|
|
793
|
+
// indexing does not park the watcher forever.
|
|
794
|
+
if (this.getIndexState() === null && this.isFreshlyRecreated()) {
|
|
795
|
+
this.fileLock.release();
|
|
796
|
+
throw new sync_1.LockUnavailableError('A rebuild of this index is in progress; retry when it finishes.');
|
|
797
|
+
}
|
|
798
|
+
// Cleared only once this run completes (below): a sync that throws
|
|
799
|
+
// must leave the full catch-up for the next one.
|
|
800
|
+
options = { ...options, paths: undefined };
|
|
684
801
|
}
|
|
685
802
|
// Defer WAL auto-checkpointing for the whole incremental run, exactly
|
|
686
803
|
// as indexAll does for the bulk path (#1231): sync's store loop and its
|
|
@@ -715,7 +832,28 @@ class CodeGraph {
|
|
|
715
832
|
return false;
|
|
716
833
|
}
|
|
717
834
|
})();
|
|
718
|
-
|
|
835
|
+
// Writer-side backstop for deferred WAL checkpointing (#1539): sync
|
|
836
|
+
// previously armed the valve but never called backpressure(), so the
|
|
837
|
+
// hard/file caps were never enforced during daemon catch-up — only
|
|
838
|
+
// timer-driven PASSIVE checkpoints ran, and a query-pool reader could
|
|
839
|
+
// pin frames while the WAL grew without a bound.
|
|
840
|
+
const backpressure = walValve ? () => walValve.backpressure() : undefined;
|
|
841
|
+
const fullReconcile = !options.paths || options.paths.length === 0;
|
|
842
|
+
const gitState = this.orchestrator.beginGitIndexState(fullReconcile);
|
|
843
|
+
// An interrupted index may have absorbed its changed files before
|
|
844
|
+
// resolution/synthesis. Detect those orphans BEFORE this sync adds refs.
|
|
845
|
+
let refreshSynthesis = this.queries.getMetadata('synthesis_pending') === '1' ||
|
|
846
|
+
this.queries.getUnresolvedReferencesCount() > 0;
|
|
847
|
+
if (refreshSynthesis)
|
|
848
|
+
this.queries.setMetadata('synthesis_pending', '1');
|
|
849
|
+
const result = await this.orchestrator.sync(options.onProgress, options.paths, backpressure, (filePath, content) => {
|
|
850
|
+
if (!refreshSynthesis && (this.queries.hasSynthesizedEdgesTouchingFile(filePath) ||
|
|
851
|
+
this.queries.wasSynthesisInput(filePath) ||
|
|
852
|
+
(content !== undefined && (0, callback_synthesizer_1.hasSynthesisPattern)(filePath, content)))) {
|
|
853
|
+
refreshSynthesis = true;
|
|
854
|
+
this.queries.setMetadata('synthesis_pending', '1');
|
|
855
|
+
}
|
|
856
|
+
});
|
|
719
857
|
// Fold the store phase's WAL BEFORE the post-store reads below
|
|
720
858
|
// (resolution reads on the main thread) — same rationale as
|
|
721
859
|
// indexAll's fold between store and resolution.
|
|
@@ -806,7 +944,27 @@ class CodeGraph {
|
|
|
806
944
|
current: done,
|
|
807
945
|
total: totalPasses,
|
|
808
946
|
});
|
|
809
|
-
});
|
|
947
|
+
}, backpressure, false);
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
// Re-open resolution edges this sync may have invalidated ELSEWHERE in
|
|
951
|
+
// the repo (CG-33). Everything above re-resolves references in the
|
|
952
|
+
// changed files; this covers the opposite direction — references in
|
|
953
|
+
// files the sync never touched whose answer depended on a definition
|
|
954
|
+
// that just appeared or disappeared. Without it a synced index never
|
|
955
|
+
// converges to a full rebuild: measured at 4.3% of distinct edges wrong
|
|
956
|
+
// on codegraph's own index, in both directions, mostly `calls`. The
|
|
957
|
+
// resurrected refs are pending rows, so the orphan sweep immediately
|
|
958
|
+
// below is what resolves them — batched, yielding, multi-pass, exactly
|
|
959
|
+
// as a full index resolves.
|
|
960
|
+
//
|
|
961
|
+
// `definitionDelta` is empty for a body-only edit, so the overwhelmingly
|
|
962
|
+
// common sync pays one branch. CODEGRAPH_NO_REBIND=1 disables it.
|
|
963
|
+
if (result.definitionDelta && process.env.CODEGRAPH_NO_REBIND !== '1') {
|
|
964
|
+
const tRebind = Date.now();
|
|
965
|
+
const rebound = this.orchestrator.resurrectStaleResolutionEdges(result.definitionDelta, result.changedFilePaths ?? []);
|
|
966
|
+
if (process.env.CODEGRAPH_SYNTH_TIMINGS) {
|
|
967
|
+
console.error(`[phase-timing] sync-rebind: ${Date.now() - tRebind}ms (${result.definitionDelta.length} changed names, ${rebound} edges re-opened)`);
|
|
810
968
|
}
|
|
811
969
|
}
|
|
812
970
|
// Orphan sweep (#1187). A resolution pass that dies mid-run — the #850
|
|
@@ -822,6 +980,9 @@ class CodeGraph {
|
|
|
822
980
|
// Grind them down with the batched resolver; this also makes a bare
|
|
823
981
|
// `codegraph sync` the recovery command for a wedged index. On a
|
|
824
982
|
// healthy index this is one COUNT query.
|
|
983
|
+
result.pendingRefsProcessed = 0;
|
|
984
|
+
result.pendingRefsResolved = 0;
|
|
985
|
+
result.pendingRefsUnresolved = 0;
|
|
825
986
|
const orphanCount = this.queries.getUnresolvedReferencesCount();
|
|
826
987
|
if (orphanCount > 0) {
|
|
827
988
|
options.onProgress?.({
|
|
@@ -829,7 +990,7 @@ class CodeGraph {
|
|
|
829
990
|
current: 0,
|
|
830
991
|
total: orphanCount,
|
|
831
992
|
});
|
|
832
|
-
await this.resolveReferencesBatched((current, total) => {
|
|
993
|
+
const recovery = await this.resolveReferencesBatched((current, total) => {
|
|
833
994
|
options.onProgress?.({
|
|
834
995
|
phase: 'resolving',
|
|
835
996
|
current,
|
|
@@ -841,7 +1002,10 @@ class CodeGraph {
|
|
|
841
1002
|
current: done,
|
|
842
1003
|
total: totalPasses,
|
|
843
1004
|
});
|
|
844
|
-
});
|
|
1005
|
+
}, backpressure, false);
|
|
1006
|
+
result.pendingRefsProcessed = recovery.stats.total;
|
|
1007
|
+
result.pendingRefsResolved = recovery.stats.resolved;
|
|
1008
|
+
result.pendingRefsUnresolved = recovery.stats.unresolved;
|
|
845
1009
|
}
|
|
846
1010
|
if (filesChanged || orphanCount > 0) {
|
|
847
1011
|
// Second pass: chained calls whose method lives on a supertype the
|
|
@@ -852,9 +1016,15 @@ class CodeGraph {
|
|
|
852
1016
|
// member is inherited from a supertype (#808).
|
|
853
1017
|
await this.resolver.resolveDeferredThisMemberRefs();
|
|
854
1018
|
}
|
|
1019
|
+
if (refreshSynthesis) {
|
|
1020
|
+
await this.resolver.refreshSynthesis(this.db.getPath(), (done, total) => {
|
|
1021
|
+
options.onProgress?.({ phase: 'linking', current: done, total });
|
|
1022
|
+
}, backpressure);
|
|
1023
|
+
this.queries.setMetadata('synthesis_pending', '0');
|
|
1024
|
+
}
|
|
855
1025
|
// Refresh planner stats + checkpoint the WAL after bulk writes.
|
|
856
1026
|
// Off-thread — see indexAll's call site.
|
|
857
|
-
if (filesChanged || result.filesRemoved > 0 || orphanCount > 0) {
|
|
1027
|
+
if (filesChanged || result.filesRemoved > 0 || orphanCount > 0 || refreshSynthesis) {
|
|
858
1028
|
await this.db.runMaintenance();
|
|
859
1029
|
}
|
|
860
1030
|
// Heal the segment vocabulary on indexes built before the table
|
|
@@ -869,6 +1039,18 @@ class CodeGraph {
|
|
|
869
1039
|
}
|
|
870
1040
|
}
|
|
871
1041
|
catch { /* vocab is advisory — never fail a sync over it */ }
|
|
1042
|
+
// A killed full index leaves this marker at `indexing`. Sync repairs
|
|
1043
|
+
// missing files, pending refs, and (on open) dropped indexes, so a
|
|
1044
|
+
// successful recovery must also close the metadata state (#1556).
|
|
1045
|
+
if (fullReconcile && this.getIndexState() === 'indexing') {
|
|
1046
|
+
try {
|
|
1047
|
+
this.queries.setMetadata('index_state', 'complete');
|
|
1048
|
+
}
|
|
1049
|
+
catch { /* advisory */ }
|
|
1050
|
+
}
|
|
1051
|
+
this.orchestrator.finishGitIndexState(gitState, fullReconcile, result.failedFilePaths);
|
|
1052
|
+
if (fullReconcile && result.filesChecked > 0)
|
|
1053
|
+
this.pendingFullReconcile = false;
|
|
872
1054
|
return result;
|
|
873
1055
|
}
|
|
874
1056
|
finally {
|
|
@@ -899,6 +1081,29 @@ class CodeGraph {
|
|
|
899
1081
|
// ===========================================================================
|
|
900
1082
|
// File Watching
|
|
901
1083
|
// ===========================================================================
|
|
1084
|
+
/**
|
|
1085
|
+
* Whether an OS watcher event points at a file whose index metadata is still
|
|
1086
|
+
* current. Used on Windows to discard NTFS last-access notifications, which
|
|
1087
|
+
* libuv reports through fs.watch as ordinary change events (#1451).
|
|
1088
|
+
*/
|
|
1089
|
+
isIndexedFileStateCurrent(filePath) {
|
|
1090
|
+
const tracked = this.queries.getFileByPath(filePath);
|
|
1091
|
+
if (!tracked)
|
|
1092
|
+
return false;
|
|
1093
|
+
try {
|
|
1094
|
+
const stat = fs.statSync(path.join(this.projectRoot, filePath));
|
|
1095
|
+
return (stat.isFile() &&
|
|
1096
|
+
Number.isFinite(stat.mtimeMs) &&
|
|
1097
|
+
Number.isFinite(tracked.modifiedAt) &&
|
|
1098
|
+
stat.size === tracked.size &&
|
|
1099
|
+
Math.floor(stat.mtimeMs) === Math.floor(tracked.modifiedAt));
|
|
1100
|
+
}
|
|
1101
|
+
catch {
|
|
1102
|
+
// Missing/inaccessible files must still reach sync so removals and
|
|
1103
|
+
// transient filesystem failures are reconciled rather than hidden.
|
|
1104
|
+
return false;
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
902
1107
|
/**
|
|
903
1108
|
* Start watching for file changes and auto-syncing.
|
|
904
1109
|
*
|
|
@@ -913,17 +1118,11 @@ class CodeGraph {
|
|
|
913
1118
|
return true;
|
|
914
1119
|
this.watcher = new sync_1.FileWatcher(this.projectRoot, async (paths) => {
|
|
915
1120
|
const result = await this.sync({ paths });
|
|
916
|
-
// sync() returns this exact zero-shape iff it failed to acquire the
|
|
917
|
-
// file lock (a real empty sync always has filesChecked > 0 because
|
|
918
|
-
// scanDirectory ran). Surface that to the watcher as a typed error
|
|
919
|
-
// so it keeps pendingFiles + reschedules instead of clearing them
|
|
920
|
-
// (#449).
|
|
921
|
-
if (result.filesChecked === 0 && result.durationMs === 0) {
|
|
922
|
-
throw new sync_1.LockUnavailableError();
|
|
923
|
-
}
|
|
924
1121
|
const filesChanged = result.filesAdded + result.filesModified + result.filesRemoved;
|
|
925
1122
|
return { filesChanged, durationMs: result.durationMs };
|
|
926
|
-
}, options
|
|
1123
|
+
}, options, process.platform === 'win32'
|
|
1124
|
+
? (filePath) => this.isIndexedFileStateCurrent(filePath)
|
|
1125
|
+
: undefined);
|
|
927
1126
|
return this.watcher.start();
|
|
928
1127
|
}
|
|
929
1128
|
/**
|
|
@@ -942,12 +1141,11 @@ class CodeGraph {
|
|
|
942
1141
|
return this.watcher?.isActive() ?? false;
|
|
943
1142
|
}
|
|
944
1143
|
/**
|
|
945
|
-
* True once live watching has
|
|
946
|
-
*
|
|
947
|
-
*
|
|
948
|
-
* a
|
|
949
|
-
*
|
|
950
|
-
* `getPendingFiles()` goes empty once watching stops (#876).
|
|
1144
|
+
* True once live watching has degraded, or while a re-armed watcher has not
|
|
1145
|
+
* completed its full catch-up. Distinct from `!isWatching()`: a stopped or
|
|
1146
|
+
* never-started watcher is inactive but NOT degraded. MCP tools use this for
|
|
1147
|
+
* a whole-index stale notice, since pending files are lost when watching
|
|
1148
|
+
* stops (#876, #1959).
|
|
951
1149
|
*/
|
|
952
1150
|
isWatcherDegraded() {
|
|
953
1151
|
return this.watcher?.isDegraded() ?? false;
|
|
@@ -956,6 +1154,14 @@ class CodeGraph {
|
|
|
956
1154
|
getWatcherDegradedReason() {
|
|
957
1155
|
return this.watcher?.getDegradedReason() ?? null;
|
|
958
1156
|
}
|
|
1157
|
+
/** Re-arm a lock-degraded watcher; its stale state persists until a full sync. */
|
|
1158
|
+
rearmWatcherAfterLockContention() {
|
|
1159
|
+
return this.watcher?.rearmAfterLockContention() ?? false;
|
|
1160
|
+
}
|
|
1161
|
+
/** True while a re-armed watcher owes a full reconcile of missed changes. */
|
|
1162
|
+
isWatcherRecovering() {
|
|
1163
|
+
return this.watcher?.isRecoveringFromLock() ?? false;
|
|
1164
|
+
}
|
|
959
1165
|
/**
|
|
960
1166
|
* Files seen by the file watcher since the last successful sync —
|
|
961
1167
|
* the per-file "stale" signal MCP tools attach to responses so an agent
|
|
@@ -993,6 +1199,40 @@ class CodeGraph {
|
|
|
993
1199
|
getLastIndexedAt() {
|
|
994
1200
|
return this.queries.getLastIndexedAt();
|
|
995
1201
|
}
|
|
1202
|
+
/**
|
|
1203
|
+
* How far the last sync got and how many files it left behind — the cheapest
|
|
1204
|
+
* marker of "has this index moved". One query; safe to call on every
|
|
1205
|
+
* filesystem event a live viewer sees.
|
|
1206
|
+
*/
|
|
1207
|
+
getIndexRevision() {
|
|
1208
|
+
return this.queries.getIndexRevision();
|
|
1209
|
+
}
|
|
1210
|
+
/**
|
|
1211
|
+
* Files re-indexed strictly after `since`, newest first — what a sync just
|
|
1212
|
+
* picked up. `total` is the real count, `paths` is capped at `limit`.
|
|
1213
|
+
*/
|
|
1214
|
+
getFilesIndexedSince(since, limit) {
|
|
1215
|
+
return this.queries.getFilesIndexedSince(since, limit);
|
|
1216
|
+
}
|
|
1217
|
+
/**
|
|
1218
|
+
* Forget everything held in memory about rows another process may have
|
|
1219
|
+
* changed.
|
|
1220
|
+
*
|
|
1221
|
+
* The query layer keeps an LRU of nodes by id, invalidated by writes made
|
|
1222
|
+
* through THIS instance — which is exactly right for a process that owns the
|
|
1223
|
+
* index, and wrong for one that is only reading a database somebody else is
|
|
1224
|
+
* writing. A long-lived reader (the `codegraph ui` server, a daemon holding a
|
|
1225
|
+
* graph open across an agent's edits) will otherwise answer `getNode(id)`
|
|
1226
|
+
* with a row a sync deleted minutes ago, while every SQL-backed query beside
|
|
1227
|
+
* it reports the truth — a disagreement that reads as a bug in whichever
|
|
1228
|
+
* screen shows both.
|
|
1229
|
+
*
|
|
1230
|
+
* Cheap (clearing a bounded Map) and safe to call whenever the database file
|
|
1231
|
+
* looks like it moved.
|
|
1232
|
+
*/
|
|
1233
|
+
dropReadCaches() {
|
|
1234
|
+
this.queries.clearCache();
|
|
1235
|
+
}
|
|
996
1236
|
/**
|
|
997
1237
|
* Completeness of the last full index run. `'complete'` is the only good
|
|
998
1238
|
* state. `'indexing'` after the fact means a run was killed mid-index (OOM,
|
|
@@ -1066,7 +1306,7 @@ class CodeGraph {
|
|
|
1066
1306
|
// resolution is timer-driven passive checkpoints, which the pool's
|
|
1067
1307
|
// continuous reads keep perpetually partial — the WAL then accretes the
|
|
1068
1308
|
// whole phase's write volume (22GB on a 4.6GB DB at kernel scale).
|
|
1069
|
-
backpressure) {
|
|
1309
|
+
backpressure, synthesize = true) {
|
|
1070
1310
|
return this.resolver.resolveAndPersistBatched(onProgress, undefined, onSynthesisProgress, {
|
|
1071
1311
|
dbPath: this.db.getPath(),
|
|
1072
1312
|
// Bulk-edge-load hooks: on big runs the resolver drops the non-unique
|
|
@@ -1076,14 +1316,15 @@ class CodeGraph {
|
|
|
1076
1316
|
// just degrade to scans until the recreate.
|
|
1077
1317
|
bulkEdgeLoad: {
|
|
1078
1318
|
begin: () => this.db.beginBulkEdgeLoad(),
|
|
1079
|
-
end: () => this.db.endBulkEdgeLoad(),
|
|
1319
|
+
end: () => this.db.endBulkEdgeLoad({ deferSynthesisSite: true }),
|
|
1320
|
+
deferred: () => this.db.createSynthesisSiteIndex(),
|
|
1080
1321
|
},
|
|
1081
1322
|
refIndexLoad: {
|
|
1082
1323
|
begin: () => this.db.beginBulkRefLoad(),
|
|
1083
1324
|
end: () => this.db.endBulkRefLoad(),
|
|
1084
1325
|
},
|
|
1085
1326
|
backpressure,
|
|
1086
|
-
});
|
|
1327
|
+
}, synthesize);
|
|
1087
1328
|
}
|
|
1088
1329
|
/**
|
|
1089
1330
|
* References extracted but never attempted by a resolution pass. Zero on a
|
|
@@ -1116,6 +1357,7 @@ class CodeGraph {
|
|
|
1116
1357
|
getStats() {
|
|
1117
1358
|
const stats = this.queries.getStats();
|
|
1118
1359
|
stats.dbSizeBytes = this.db.getSize();
|
|
1360
|
+
stats.walSizeBytes = this.db.getWalSizeBytes();
|
|
1119
1361
|
return stats;
|
|
1120
1362
|
}
|
|
1121
1363
|
/**
|
|
@@ -1144,12 +1386,188 @@ class CodeGraph {
|
|
|
1144
1386
|
getNode(id) {
|
|
1145
1387
|
return this.queries.getNodeById(id);
|
|
1146
1388
|
}
|
|
1389
|
+
/**
|
|
1390
|
+
* Get many nodes by id in ONE round-trip (LRU-cache aware).
|
|
1391
|
+
*
|
|
1392
|
+
* The batch form of {@link getNode}. Anything resolving a list of edges to
|
|
1393
|
+
* their endpoints — a caller list, a callee rail, an impact set — must use
|
|
1394
|
+
* this rather than a `getNode` per edge: a symbol with 500 callers is 500
|
|
1395
|
+
* queries otherwise. Ids that name nothing are simply absent from the map.
|
|
1396
|
+
*/
|
|
1397
|
+
getNodesByIds(ids) {
|
|
1398
|
+
return this.queries.getNodesByIds(ids);
|
|
1399
|
+
}
|
|
1400
|
+
/**
|
|
1401
|
+
* Every symbol carrying an exact qualified name.
|
|
1402
|
+
*
|
|
1403
|
+
* The identity that survives a re-index. A node's id contains its start line,
|
|
1404
|
+
* so any edit ABOVE a symbol gives it a different id — anything that has to
|
|
1405
|
+
* name the same symbol across two indexes (a saved trail, a bookmark, a
|
|
1406
|
+
* review comment) has to key on this instead, and then disambiguate the
|
|
1407
|
+
* result by kind and file. Index-backed; unlike
|
|
1408
|
+
* {@link GraphQueryManager.findByQualifiedName} it takes no pattern and scans
|
|
1409
|
+
* nothing.
|
|
1410
|
+
*/
|
|
1411
|
+
getNodesByQualifiedName(qualifiedName) {
|
|
1412
|
+
return this.queries.getNodesByQualifiedNameExact(qualifiedName);
|
|
1413
|
+
}
|
|
1414
|
+
/**
|
|
1415
|
+
* Outgoing edges for many source nodes at once — the batch form of
|
|
1416
|
+
* {@link getOutgoingEdges}. See {@link QueryBuilder.getOutgoingEdgesFrom}.
|
|
1417
|
+
*/
|
|
1418
|
+
getOutgoingEdgesFrom(nodeIds, kinds) {
|
|
1419
|
+
return this.queries.getOutgoingEdgesFrom(nodeIds, kinds);
|
|
1420
|
+
}
|
|
1421
|
+
/**
|
|
1422
|
+
* Fan-in (incoming edge count) for many nodes at once — the "hub" signal,
|
|
1423
|
+
* without a query per node. See {@link QueryBuilder.countIncomingEdges}.
|
|
1424
|
+
*/
|
|
1425
|
+
getFanIn(ids) {
|
|
1426
|
+
return this.queries.countIncomingEdges(ids);
|
|
1427
|
+
}
|
|
1428
|
+
/**
|
|
1429
|
+
* Incoming edges for many target nodes at once — the mirror of
|
|
1430
|
+
* {@link getOutgoingEdgesFrom}. See {@link QueryBuilder.getIncomingEdgesTo}.
|
|
1431
|
+
*/
|
|
1432
|
+
getIncomingEdgesTo(nodeIds, kinds) {
|
|
1433
|
+
return this.queries.getIncomingEdgesTo(nodeIds, kinds);
|
|
1434
|
+
}
|
|
1435
|
+
/**
|
|
1436
|
+
* Fan-out (outgoing edge count) for many nodes at once — the mirror of
|
|
1437
|
+
* {@link getFanIn}. See {@link QueryBuilder.countOutgoingEdges}.
|
|
1438
|
+
*/
|
|
1439
|
+
getFanOut(ids) {
|
|
1440
|
+
return this.queries.countOutgoingEdges(ids);
|
|
1441
|
+
}
|
|
1442
|
+
/**
|
|
1443
|
+
* Symbols nothing in the index points at, by kind — the candidate set the
|
|
1444
|
+
* dead code report (`src/graph/dead-code.ts`) applies its exclusions to.
|
|
1445
|
+
*
|
|
1446
|
+
* Every edge kind except `contains` counts as a reference, so a method is
|
|
1447
|
+
* not "reached" by the class that holds it. An unreferenced symbol is not
|
|
1448
|
+
* yet a dead one: see {@link buildDeadCodeReport}.
|
|
1449
|
+
*/
|
|
1450
|
+
getUnreferencedNodes(kinds, limit) {
|
|
1451
|
+
return this.queries.getUnreferencedNodes(kinds, limit);
|
|
1452
|
+
}
|
|
1453
|
+
/**
|
|
1454
|
+
* Which of the given names are carried by more than one symbol, at least one
|
|
1455
|
+
* of which something references — the names a "nothing reaches this" claim
|
|
1456
|
+
* must not be made about, because the resolver may have picked the twin.
|
|
1457
|
+
*/
|
|
1458
|
+
getAmbiguousReferencedNames(names) {
|
|
1459
|
+
return this.queries.getAmbiguousReferencedNames(names);
|
|
1460
|
+
}
|
|
1461
|
+
/**
|
|
1462
|
+
* Which of the given languages this index records an export marker for. A
|
|
1463
|
+
* language with none has no "reachable from outside" signal at all.
|
|
1464
|
+
*/
|
|
1465
|
+
getLanguagesWithExports(languages) {
|
|
1466
|
+
return this.queries.getLanguagesWithExports(languages);
|
|
1467
|
+
}
|
|
1468
|
+
/**
|
|
1469
|
+
* Which of the given names the index holds an unresolved reference to — the
|
|
1470
|
+
* resolver saw the name and could not decide what it meant. A symbol with
|
|
1471
|
+
* such a name can never be called unreferenced.
|
|
1472
|
+
*/
|
|
1473
|
+
getUnresolvedNamesAmong(names) {
|
|
1474
|
+
return this.queries.getUnresolvedNamesAmong(names);
|
|
1475
|
+
}
|
|
1476
|
+
/**
|
|
1477
|
+
* Which of the given symbols extend or implement a type outside the index —
|
|
1478
|
+
* an ancestor the resolver could not follow, so it has no edge (#1973).
|
|
1479
|
+
*/
|
|
1480
|
+
getUnresolvedSupertypeSourcesAmong(nodeIds) {
|
|
1481
|
+
return this.queries.getUnresolvedSupertypeSourcesAmong(nodeIds);
|
|
1482
|
+
}
|
|
1483
|
+
/**
|
|
1484
|
+
* The symbols with the most distinct dependents, most first — the index's
|
|
1485
|
+
* hubs. Distinct dependents, not edges: a helper called forty times from one
|
|
1486
|
+
* function has one dependent, and it is dependents a blast radius grows from.
|
|
1487
|
+
*/
|
|
1488
|
+
getTopDependedOn(limit) {
|
|
1489
|
+
return this.queries.getTopDependedOn(limit);
|
|
1490
|
+
}
|
|
1491
|
+
/**
|
|
1492
|
+
* The graph's executable roots — files that run something at module level (a
|
|
1493
|
+
* CLI, a worker entry, a script), ranked by calls x the number of other files
|
|
1494
|
+
* they reach. A statement at the top level of a file is recorded as an edge
|
|
1495
|
+
* out of the *file* node, which is what makes these visible at all.
|
|
1496
|
+
*/
|
|
1497
|
+
getTopCallingFiles(limit) {
|
|
1498
|
+
return this.queries.getTopCallingFiles(limit);
|
|
1499
|
+
}
|
|
1500
|
+
/**
|
|
1501
|
+
* How many other files depend on each of the given files, counted through
|
|
1502
|
+
* their symbols (an `imports` edge points at the symbol, not the file).
|
|
1503
|
+
* A zero means nothing else in the index reaches into that file.
|
|
1504
|
+
*/
|
|
1505
|
+
getFileDependentCounts(filePaths) {
|
|
1506
|
+
return new Map(this.queries.getFileDependentCounts(filePaths).map((row) => [row.filePath, row.dependents]));
|
|
1507
|
+
}
|
|
1508
|
+
/**
|
|
1509
|
+
* How far each of the given files reaches out: distinct other files their
|
|
1510
|
+
* symbols touch, and how many references that is. The mirror of
|
|
1511
|
+
* {@link getFileDependentCounts}; a test file's reach is what it exercises.
|
|
1512
|
+
*/
|
|
1513
|
+
getFileReachCounts(filePaths) {
|
|
1514
|
+
return new Map(this.queries
|
|
1515
|
+
.getFileReachCounts(filePaths)
|
|
1516
|
+
.map((row) => [row.filePath, { reaches: row.reaches, refs: row.refs }]));
|
|
1517
|
+
}
|
|
1518
|
+
/** The `file` nodes for the given paths, in one query. */
|
|
1519
|
+
getFileNodes(filePaths) {
|
|
1520
|
+
return this.queries.getFileNodes(filePaths);
|
|
1521
|
+
}
|
|
1522
|
+
/**
|
|
1523
|
+
* Roll the edge table up to module granularity, for a file → module
|
|
1524
|
+
* assignment the caller decides.
|
|
1525
|
+
*
|
|
1526
|
+
* The architecture map's single query: cross-module edge counts by kind,
|
|
1527
|
+
* the `declared` subset of each (see {@link QueryBuilder.aggregateModuleGraph}),
|
|
1528
|
+
* and the busiest symbol pairs behind each link. Read-only, and bounded by
|
|
1529
|
+
* the number of modules rather than the number of edges.
|
|
1530
|
+
*/
|
|
1531
|
+
getModuleAggregation(assignments, options) {
|
|
1532
|
+
return this.queries.aggregateModuleGraph(assignments, options);
|
|
1533
|
+
}
|
|
1534
|
+
/**
|
|
1535
|
+
* Every ordered pair of files where one reaches into the other — the edge
|
|
1536
|
+
* list a cycle finder runs on. See {@link QueryBuilder.getCrossFileDependencyPairs}.
|
|
1537
|
+
*/
|
|
1538
|
+
getFileDependencyPairs(minConfidence = 0) {
|
|
1539
|
+
return this.queries.getCrossFileDependencyPairs(minConfidence);
|
|
1540
|
+
}
|
|
1541
|
+
/**
|
|
1542
|
+
* References from a symbol that never resolved to an indexed node — the
|
|
1543
|
+
* calls and type mentions that leave the index. Lets a reader account for
|
|
1544
|
+
* the call sites that have no callee row instead of implying there are none.
|
|
1545
|
+
*/
|
|
1546
|
+
getUnresolvedReferencesFrom(nodeId) {
|
|
1547
|
+
return this.queries.getUnresolvedReferencesFrom(nodeId);
|
|
1548
|
+
}
|
|
1549
|
+
/**
|
|
1550
|
+
* The same, for every symbol in a FILE at once, in line order.
|
|
1551
|
+
*
|
|
1552
|
+
* One indexed lookup instead of one per symbol — the whole-file reader needs
|
|
1553
|
+
* it for every line it draws. See
|
|
1554
|
+
* {@link QueryBuilder.getUnresolvedReferencesInFile}.
|
|
1555
|
+
*/
|
|
1556
|
+
getUnresolvedReferencesInFile(filePath, limit) {
|
|
1557
|
+
return this.queries.getUnresolvedReferencesInFile(filePath, limit);
|
|
1558
|
+
}
|
|
1147
1559
|
/**
|
|
1148
1560
|
* Get all nodes in a file
|
|
1149
1561
|
*/
|
|
1150
1562
|
getNodesInFile(filePath) {
|
|
1151
1563
|
return this.queries.getNodesByFile(filePath);
|
|
1152
1564
|
}
|
|
1565
|
+
/**
|
|
1566
|
+
* Get all nodes in several files, in one batched query.
|
|
1567
|
+
*/
|
|
1568
|
+
getNodesInFiles(filePaths) {
|
|
1569
|
+
return this.queries.getNodesByFiles(filePaths);
|
|
1570
|
+
}
|
|
1153
1571
|
/**
|
|
1154
1572
|
* Get all nodes of a specific kind
|
|
1155
1573
|
*/
|
|
@@ -1184,6 +1602,10 @@ class CodeGraph {
|
|
|
1184
1602
|
searchNodes(query, options) {
|
|
1185
1603
|
return this.queries.searchNodes(query, options);
|
|
1186
1604
|
}
|
|
1605
|
+
/** Lexical evidence for an empty explore result; does not alter retrieval. */
|
|
1606
|
+
getExploreMissDiagnostics(query) {
|
|
1607
|
+
return this.queries.getExploreMissDiagnostics(query);
|
|
1608
|
+
}
|
|
1187
1609
|
/**
|
|
1188
1610
|
* Graph-derived prompt matching for the front-load hook's MEDIUM tier:
|
|
1189
1611
|
* which indexed symbols do these prose words name? "state machine des
|
|
@@ -1416,6 +1838,34 @@ class CodeGraph {
|
|
|
1416
1838
|
getFiles() {
|
|
1417
1839
|
return this.queries.getAllFiles();
|
|
1418
1840
|
}
|
|
1841
|
+
/**
|
|
1842
|
+
* A `(path) => boolean` generated-file test over a BOUNDED candidate list,
|
|
1843
|
+
* unioning the index-time content-banner flag with the filename convention
|
|
1844
|
+
* (#1500). One query up front, O(1) per call after — built for use inside a
|
|
1845
|
+
* ranking comparator, where re-querying per comparison would be quadratic.
|
|
1846
|
+
*
|
|
1847
|
+
* Pass every path you might ask about; a path outside the list falls back to
|
|
1848
|
+
* the filename check alone.
|
|
1849
|
+
*/
|
|
1850
|
+
generatedFilePredicate(filePaths) {
|
|
1851
|
+
return this.queries.generatedPredicateFor(filePaths);
|
|
1852
|
+
}
|
|
1853
|
+
/**
|
|
1854
|
+
* A `(path) => boolean` ambient-declaration test over a BOUNDED candidate
|
|
1855
|
+
* list: true for a file that declares nothing but types, originates no call
|
|
1856
|
+
* edge, and that nothing in the index depends on — an ambient `.d.ts` of
|
|
1857
|
+
* global shims, vendored typings, module augmentation (CG-28). Structural
|
|
1858
|
+
* rather than extension-based, and deliberately narrow: see
|
|
1859
|
+
* `QueryBuilder.getAmbientDeclarationPathsAmong` for why each condition is
|
|
1860
|
+
* there, in particular why a `types.ts` the codebase imports is NOT flagged.
|
|
1861
|
+
*/
|
|
1862
|
+
ambientDeclarationFilePredicate(filePaths) {
|
|
1863
|
+
return this.queries.ambientDeclarationPredicateFor(filePaths);
|
|
1864
|
+
}
|
|
1865
|
+
/** How many indexed files are flagged tool-generated. Reported by `status`. */
|
|
1866
|
+
getGeneratedFileCount() {
|
|
1867
|
+
return this.queries.countGeneratedFiles();
|
|
1868
|
+
}
|
|
1419
1869
|
// ===========================================================================
|
|
1420
1870
|
// Graph Query Methods
|
|
1421
1871
|
// ===========================================================================
|
|
@@ -1570,7 +2020,17 @@ class CodeGraph {
|
|
|
1570
2020
|
return this.graphManager.findCircularDependencies();
|
|
1571
2021
|
}
|
|
1572
2022
|
/**
|
|
1573
|
-
* Find
|
|
2023
|
+
* Find unreferenced symbols — the RAW candidate set.
|
|
2024
|
+
*
|
|
2025
|
+
* Non-exported symbols of the given kinds with no incoming edge but
|
|
2026
|
+
* `contains`. That is a fact, not a claim: on this engine's own index it
|
|
2027
|
+
* returns ~2 500 symbols, of which about 20 are actually unreachable. The
|
|
2028
|
+
* rest are overrides, framework registrations, mis-resolved twins and
|
|
2029
|
+
* references the extractor never recorded.
|
|
2030
|
+
*
|
|
2031
|
+
* For a list anybody should act on, use `buildDeadCodeReport` from
|
|
2032
|
+
* `src/graph/dead-code.ts`, which applies the exclusions and counts every one
|
|
2033
|
+
* of them. This method is kept as-is because it is a published API.
|
|
1574
2034
|
*
|
|
1575
2035
|
* @param kinds - Node kinds to check (default: functions, methods, classes)
|
|
1576
2036
|
* @returns Array of unreferenced nodes
|
|
@@ -1612,7 +2072,24 @@ class CodeGraph {
|
|
|
1612
2072
|
* @returns Subgraph of relevant nodes and edges
|
|
1613
2073
|
*/
|
|
1614
2074
|
async findRelevantContext(query, options) {
|
|
1615
|
-
|
|
2075
|
+
// Segment-vocab supplement: FTS keeps camelCase names as single tokens,
|
|
2076
|
+
// so a word-level query ("auto-scroll to bottom") can never reach
|
|
2077
|
+
// `pinFeedIfNearBottom` through search alone. Resolve the query's words
|
|
2078
|
+
// against name_segment_vocab (same precision rules as the prompt hook:
|
|
2079
|
+
// co-occurrence, else rare singles, verified against live nodes) and hand
|
|
2080
|
+
// the names down as dampened exact-name seeds. Callers that pass their
|
|
2081
|
+
// own seedNames keep them; failures degrade to no supplement.
|
|
2082
|
+
let seedNames = options?.seedNames;
|
|
2083
|
+
if (seedNames === undefined) {
|
|
2084
|
+
try {
|
|
2085
|
+
seedNames = this.getSegmentMatches((0, identifier_segments_1.extractSegmentSearchWords)(query), 8)
|
|
2086
|
+
.map((m) => m.name);
|
|
2087
|
+
}
|
|
2088
|
+
catch {
|
|
2089
|
+
seedNames = [];
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
return this.contextBuilder.findRelevantContext(query, { ...options, seedNames });
|
|
1616
2093
|
}
|
|
1617
2094
|
/**
|
|
1618
2095
|
* Build context for a task
|