@colbymchenry/codegraph-win32-arm64 1.6.1 → 1.6.3
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 +1 -1
- package/bin/codegraph.cmd +1 -1
- package/lib/dist/.test-build-engine.json +1 -1
- package/lib/dist/.test-build-viewer.json +1 -1
- package/lib/dist/bin/codegraph.d.ts +3 -0
- package/lib/dist/bin/codegraph.d.ts.map +1 -1
- package/lib/dist/bin/codegraph.js +427 -684
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/command-supervision.d.ts +7 -0
- package/lib/dist/bin/command-supervision.d.ts.map +1 -1
- package/lib/dist/bin/command-supervision.js +30 -74
- package/lib/dist/bin/command-supervision.js.map +1 -1
- package/lib/dist/bin/fatal-handler.js +0 -46
- package/lib/dist/bin/fatal-handler.js.map +1 -1
- package/lib/dist/bin/node-version-check.js +0 -33
- package/lib/dist/bin/node-version-check.js.map +1 -1
- package/lib/dist/bin/uninstall.js +0 -19
- package/lib/dist/bin/uninstall.js.map +1 -1
- package/lib/dist/bin/viewer-gate.js +0 -14
- package/lib/dist/bin/viewer-gate.js.map +1 -1
- package/lib/dist/compile-cache.d.ts +2 -0
- package/lib/dist/compile-cache.d.ts.map +1 -0
- package/lib/dist/compile-cache.js +45 -0
- package/lib/dist/compile-cache.js.map +1 -0
- package/lib/dist/context/formatter.js +3 -66
- package/lib/dist/context/formatter.js.map +1 -1
- package/lib/dist/context/index.d.ts +44 -1
- package/lib/dist/context/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +123 -430
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/context/markers.js +0 -17
- package/lib/dist/context/markers.js.map +1 -1
- package/lib/dist/db/index.d.ts +44 -1
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +123 -395
- package/lib/dist/db/index.js.map +1 -1
- package/lib/dist/db/migrations.d.ts +11 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +71 -79
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/name-substring-index.d.ts +63 -0
- package/lib/dist/db/name-substring-index.d.ts.map +1 -0
- package/lib/dist/db/name-substring-index.js +151 -0
- package/lib/dist/db/name-substring-index.js.map +1 -0
- package/lib/dist/db/node-sqlite.d.ts +19 -0
- package/lib/dist/db/node-sqlite.d.ts.map +1 -0
- package/lib/dist/db/node-sqlite.js +23 -0
- package/lib/dist/db/node-sqlite.js.map +1 -0
- package/lib/dist/db/open-error.d.ts +36 -0
- package/lib/dist/db/open-error.d.ts.map +1 -0
- package/lib/dist/db/open-error.js +63 -0
- package/lib/dist/db/open-error.js.map +1 -0
- package/lib/dist/db/parameter-flow-queries.d.ts +120 -0
- package/lib/dist/db/parameter-flow-queries.d.ts.map +1 -0
- package/lib/dist/db/parameter-flow-queries.js +168 -0
- package/lib/dist/db/parameter-flow-queries.js.map +1 -0
- package/lib/dist/db/queries.d.ts +641 -40
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +1370 -1398
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/reference-tail.d.ts +83 -0
- package/lib/dist/db/reference-tail.d.ts.map +1 -0
- package/lib/dist/db/reference-tail.js +68 -0
- package/lib/dist/db/reference-tail.js.map +1 -0
- package/lib/dist/db/schema.sql +18 -2
- package/lib/dist/db/sqlite-adapter.d.ts +18 -1
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/lib/dist/db/sqlite-adapter.js +12 -62
- package/lib/dist/db/sqlite-adapter.js.map +1 -1
- package/lib/dist/db/synthesis-stage.d.ts.map +1 -1
- package/lib/dist/db/synthesis-stage.js +2 -6
- package/lib/dist/db/synthesis-stage.js.map +1 -1
- package/lib/dist/db/wal-valve.js +1 -153
- package/lib/dist/db/wal-valve.js.map +1 -1
- package/lib/dist/db/wsl-shared-index.js +0 -37
- package/lib/dist/db/wsl-shared-index.js.map +1 -1
- package/lib/dist/directory.d.ts +81 -0
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +91 -500
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/engine.d.ts +15 -0
- package/lib/dist/engine.d.ts.map +1 -0
- package/lib/dist/engine.js +34 -0
- package/lib/dist/engine.js.map +1 -0
- package/lib/dist/errors.d.ts +10 -0
- package/lib/dist/errors.d.ts.map +1 -1
- package/lib/dist/errors.js +8 -101
- package/lib/dist/errors.js.map +1 -1
- package/lib/dist/extraction/astro-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/astro-extractor.js +15 -133
- package/lib/dist/extraction/astro-extractor.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +102 -10
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +260 -179
- package/lib/dist/extraction/cfml-extractor.js.map +1 -1
- package/lib/dist/extraction/commonjs-requires.d.ts +23 -0
- package/lib/dist/extraction/commonjs-requires.d.ts.map +1 -0
- package/lib/dist/extraction/commonjs-requires.js +37 -0
- package/lib/dist/extraction/commonjs-requires.js.map +1 -0
- package/lib/dist/extraction/dfm-extractor.js +0 -21
- 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 -24
- package/lib/dist/extraction/extraction-version.js.map +1 -1
- package/lib/dist/extraction/function-ref.d.ts +40 -0
- package/lib/dist/extraction/function-ref.d.ts.map +1 -1
- package/lib/dist/extraction/function-ref.js +145 -206
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/generated-detection.d.ts +9 -0
- package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
- package/lib/dist/extraction/generated-detection.js +29 -154
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +47 -4
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +91 -374
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +216 -11
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +703 -1368
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/kernel/decode.js +0 -16
- package/lib/dist/extraction/kernel/decode.js.map +1 -1
- package/lib/dist/extraction/kernel/index.d.ts +3 -1
- package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
- package/lib/dist/extraction/kernel/index.js +29 -131
- package/lib/dist/extraction/kernel/index.js.map +1 -1
- package/lib/dist/extraction/kernel/layout.js +42 -76
- package/lib/dist/extraction/kernel/layout.js.map +1 -1
- package/lib/dist/extraction/kernel/loader.js +0 -37
- package/lib/dist/extraction/kernel/loader.js.map +1 -1
- package/lib/dist/extraction/languages/arkts.js +0 -59
- package/lib/dist/extraction/languages/arkts.js.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.d.ts +140 -28
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +876 -823
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/cfquery.js +0 -9
- package/lib/dist/extraction/languages/cfquery.js.map +1 -1
- package/lib/dist/extraction/languages/cfscript.d.ts +20 -0
- package/lib/dist/extraction/languages/cfscript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/cfscript.js +80 -9
- package/lib/dist/extraction/languages/cfscript.js.map +1 -1
- package/lib/dist/extraction/languages/cobol.js +0 -114
- package/lib/dist/extraction/languages/cobol.js.map +1 -1
- package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts +66 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.js +343 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.js.map +1 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.d.ts +41 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.js +487 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.js.map +1 -0
- package/lib/dist/extraction/languages/csharp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/csharp.js +11 -54
- package/lib/dist/extraction/languages/csharp.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts +84 -0
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +335 -159
- 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 +15 -102
- package/lib/dist/extraction/languages/erlang.js.map +1 -1
- package/lib/dist/extraction/languages/go.d.ts +48 -0
- package/lib/dist/extraction/languages/go.d.ts.map +1 -1
- package/lib/dist/extraction/languages/go.js +102 -31
- package/lib/dist/extraction/languages/go.js.map +1 -1
- package/lib/dist/extraction/languages/index.js +0 -6
- package/lib/dist/extraction/languages/index.js.map +1 -1
- package/lib/dist/extraction/languages/java.d.ts.map +1 -1
- package/lib/dist/extraction/languages/java.js +67 -78
- package/lib/dist/extraction/languages/java.js.map +1 -1
- package/lib/dist/extraction/languages/javascript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/javascript.js +2 -12
- package/lib/dist/extraction/languages/javascript.js.map +1 -1
- package/lib/dist/extraction/languages/kotlin.d.ts +15 -0
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +69 -150
- package/lib/dist/extraction/languages/kotlin.js.map +1 -1
- package/lib/dist/extraction/languages/lua.js +2 -39
- package/lib/dist/extraction/languages/lua.js.map +1 -1
- package/lib/dist/extraction/languages/luau.js +0 -14
- package/lib/dist/extraction/languages/luau.js.map +1 -1
- package/lib/dist/extraction/languages/nix.js +0 -16
- package/lib/dist/extraction/languages/nix.js.map +1 -1
- package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
- package/lib/dist/extraction/languages/objc.js +5 -16
- package/lib/dist/extraction/languages/objc.js.map +1 -1
- package/lib/dist/extraction/languages/pascal-preparse.d.ts +66 -0
- package/lib/dist/extraction/languages/pascal-preparse.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal-preparse.js +958 -0
- package/lib/dist/extraction/languages/pascal-preparse.js.map +1 -0
- package/lib/dist/extraction/languages/pascal-system.d.ts +11 -0
- package/lib/dist/extraction/languages/pascal-system.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal-system.js +23 -0
- package/lib/dist/extraction/languages/pascal-system.js.map +1 -0
- package/lib/dist/extraction/languages/pascal.d.ts.map +1 -1
- package/lib/dist/extraction/languages/pascal.js +3 -4
- package/lib/dist/extraction/languages/pascal.js.map +1 -1
- package/lib/dist/extraction/languages/php.js +5 -42
- package/lib/dist/extraction/languages/php.js.map +1 -1
- package/lib/dist/extraction/languages/python.js +2 -20
- package/lib/dist/extraction/languages/python.js.map +1 -1
- package/lib/dist/extraction/languages/r.js +8 -78
- package/lib/dist/extraction/languages/r.js.map +1 -1
- package/lib/dist/extraction/languages/ruby.d.ts.map +1 -1
- package/lib/dist/extraction/languages/ruby.js +17 -25
- package/lib/dist/extraction/languages/ruby.js.map +1 -1
- package/lib/dist/extraction/languages/rust.d.ts +10 -0
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
- package/lib/dist/extraction/languages/rust.js +15 -47
- package/lib/dist/extraction/languages/rust.js.map +1 -1
- package/lib/dist/extraction/languages/scala.js +5 -41
- package/lib/dist/extraction/languages/scala.js.map +1 -1
- package/lib/dist/extraction/languages/solidity.js +1 -82
- package/lib/dist/extraction/languages/solidity.js.map +1 -1
- package/lib/dist/extraction/languages/swift.d.ts +15 -0
- package/lib/dist/extraction/languages/swift.d.ts.map +1 -1
- package/lib/dist/extraction/languages/swift.js +33 -27
- package/lib/dist/extraction/languages/swift.js.map +1 -1
- package/lib/dist/extraction/languages/terraform.js +6 -152
- package/lib/dist/extraction/languages/terraform.js.map +1 -1
- package/lib/dist/extraction/languages/typescript.d.ts +71 -0
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/typescript.js +86 -41
- package/lib/dist/extraction/languages/typescript.js.map +1 -1
- package/lib/dist/extraction/languages/vbnet.d.ts.map +1 -1
- package/lib/dist/extraction/languages/vbnet.js +9 -42
- package/lib/dist/extraction/languages/vbnet.js.map +1 -1
- package/lib/dist/extraction/lazy-frameworks.d.ts +15 -0
- package/lib/dist/extraction/lazy-frameworks.d.ts.map +1 -0
- package/lib/dist/extraction/lazy-frameworks.js +8 -0
- package/lib/dist/extraction/lazy-frameworks.js.map +1 -0
- package/lib/dist/extraction/liquid-extractor.d.ts +29 -3
- package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/liquid-extractor.js +89 -148
- package/lib/dist/extraction/liquid-extractor.js.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.js +0 -78
- package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
- package/lib/dist/extraction/parse-budget.d.ts +16 -0
- package/lib/dist/extraction/parse-budget.d.ts.map +1 -0
- package/lib/dist/extraction/parse-budget.js +11 -0
- package/lib/dist/extraction/parse-budget.js.map +1 -0
- package/lib/dist/extraction/parse-pool.d.ts +41 -5
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +74 -158
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/parse-worker.d.ts +1 -1
- package/lib/dist/extraction/parse-worker.d.ts.map +1 -1
- package/lib/dist/extraction/parse-worker.js +7 -58
- package/lib/dist/extraction/parse-worker.js.map +1 -1
- package/lib/dist/extraction/razor-extractor.d.ts +9 -0
- package/lib/dist/extraction/razor-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/razor-extractor.js +45 -69
- package/lib/dist/extraction/razor-extractor.js.map +1 -1
- package/lib/dist/extraction/razor-script.d.ts +23 -0
- package/lib/dist/extraction/razor-script.d.ts.map +1 -0
- package/lib/dist/extraction/razor-script.js +244 -0
- package/lib/dist/extraction/razor-script.js.map +1 -0
- package/lib/dist/extraction/sfc-script.d.ts +85 -0
- package/lib/dist/extraction/sfc-script.d.ts.map +1 -0
- package/lib/dist/extraction/sfc-script.js +136 -0
- package/lib/dist/extraction/sfc-script.js.map +1 -0
- package/lib/dist/extraction/store-worker.d.ts +1 -1
- package/lib/dist/extraction/store-worker.d.ts.map +1 -1
- package/lib/dist/extraction/store-worker.js +5 -37
- package/lib/dist/extraction/store-worker.js.map +1 -1
- package/lib/dist/extraction/store-writer.d.ts +10 -2
- package/lib/dist/extraction/store-writer.d.ts.map +1 -1
- package/lib/dist/extraction/store-writer.js +8 -32
- package/lib/dist/extraction/store-writer.js.map +1 -1
- package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/svelte-extractor.js +16 -122
- package/lib/dist/extraction/svelte-extractor.js.map +1 -1
- package/lib/dist/extraction/syntax-tokens.d.ts +6 -5
- package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -1
- package/lib/dist/extraction/syntax-tokens.js +6 -153
- package/lib/dist/extraction/syntax-tokens.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.d.ts +37 -1
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.js +76 -68
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts +102 -22
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.js +0 -7
- package/lib/dist/extraction/tree-sitter-types.js.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +455 -9
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +1998 -2517
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/vue-extractor.d.ts +20 -0
- package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vue-extractor.js +113 -115
- package/lib/dist/extraction/vue-extractor.js.map +1 -1
- package/lib/dist/extraction/vue-options-api.d.ts +28 -0
- package/lib/dist/extraction/vue-options-api.d.ts.map +1 -0
- package/lib/dist/extraction/vue-options-api.js +164 -0
- package/lib/dist/extraction/vue-options-api.js.map +1 -0
- package/lib/dist/extraction/vue-template-calls.d.ts +37 -0
- package/lib/dist/extraction/vue-template-calls.d.ts.map +1 -0
- package/lib/dist/extraction/vue-template-calls.js +497 -0
- package/lib/dist/extraction/vue-template-calls.js.map +1 -0
- package/lib/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts +6 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
- package/lib/dist/extraction/wasm-runtime-flags.js +1 -88
- package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
- package/lib/dist/file-limits.d.ts +8 -0
- package/lib/dist/file-limits.d.ts.map +1 -1
- package/lib/dist/file-limits.js +13 -28
- package/lib/dist/file-limits.js.map +1 -1
- package/lib/dist/graph/branch-guards.d.ts +17 -0
- package/lib/dist/graph/branch-guards.d.ts.map +1 -1
- package/lib/dist/graph/branch-guards.js +98 -250
- package/lib/dist/graph/branch-guards.js.map +1 -1
- package/lib/dist/graph/call-sites.d.ts +12 -0
- package/lib/dist/graph/call-sites.d.ts.map +1 -0
- package/lib/dist/graph/call-sites.js +17 -0
- package/lib/dist/graph/call-sites.js.map +1 -0
- package/lib/dist/graph/cobol-copybooks.d.ts +75 -0
- package/lib/dist/graph/cobol-copybooks.d.ts.map +1 -0
- package/lib/dist/graph/cobol-copybooks.js +45 -0
- package/lib/dist/graph/cobol-copybooks.js.map +1 -0
- package/lib/dist/graph/dead-code.d.ts +26 -4
- package/lib/dist/graph/dead-code.d.ts.map +1 -1
- package/lib/dist/graph/dead-code.js +157 -311
- package/lib/dist/graph/dead-code.js.map +1 -1
- package/lib/dist/graph/dynamic-boundary-report.js +1 -88
- package/lib/dist/graph/dynamic-boundary-report.js.map +1 -1
- package/lib/dist/graph/file-cycles.d.ts +20 -0
- package/lib/dist/graph/file-cycles.d.ts.map +1 -0
- package/lib/dist/graph/file-cycles.js +79 -0
- package/lib/dist/graph/file-cycles.js.map +1 -0
- package/lib/dist/graph/go-package.d.ts +27 -0
- package/lib/dist/graph/go-package.d.ts.map +1 -0
- package/lib/dist/graph/go-package.js +49 -0
- package/lib/dist/graph/go-package.js.map +1 -0
- package/lib/dist/graph/index.d.ts +2 -0
- package/lib/dist/graph/index.d.ts.map +1 -1
- package/lib/dist/graph/index.js +4 -6
- package/lib/dist/graph/index.js.map +1 -1
- package/lib/dist/graph/named-symbol-flow.d.ts +5 -1
- package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -1
- package/lib/dist/graph/named-symbol-flow.js +85 -219
- package/lib/dist/graph/named-symbol-flow.js.map +1 -1
- package/lib/dist/graph/owning-package.d.ts +59 -0
- package/lib/dist/graph/owning-package.d.ts.map +1 -0
- package/lib/dist/graph/owning-package.js +120 -0
- package/lib/dist/graph/owning-package.js.map +1 -0
- package/lib/dist/graph/queries.d.ts +2 -2
- package/lib/dist/graph/queries.d.ts.map +1 -1
- package/lib/dist/graph/queries.js +2 -135
- package/lib/dist/graph/queries.js.map +1 -1
- package/lib/dist/graph/symbol-lookup.d.ts +15 -3
- package/lib/dist/graph/symbol-lookup.d.ts.map +1 -1
- package/lib/dist/graph/symbol-lookup.js +47 -89
- package/lib/dist/graph/symbol-lookup.js.map +1 -1
- package/lib/dist/graph/synthesized-hop.d.ts +37 -0
- package/lib/dist/graph/synthesized-hop.d.ts.map +1 -0
- package/lib/dist/graph/synthesized-hop.js +62 -0
- package/lib/dist/graph/synthesized-hop.js.map +1 -0
- package/lib/dist/graph/test-code.d.ts +21 -0
- package/lib/dist/graph/test-code.d.ts.map +1 -0
- package/lib/dist/graph/test-code.js +50 -0
- package/lib/dist/graph/test-code.js.map +1 -0
- package/lib/dist/graph/traversal.d.ts +31 -2
- package/lib/dist/graph/traversal.d.ts.map +1 -1
- package/lib/dist/graph/traversal.js +98 -226
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/graph/type-hierarchy.js +0 -138
- package/lib/dist/graph/type-hierarchy.js.map +1 -1
- package/lib/dist/index.d.ts +195 -25
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +697 -1105
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/beta-signup.js +0 -39
- package/lib/dist/installer/beta-signup.js.map +1 -1
- package/lib/dist/installer/config-writer.js +0 -24
- package/lib/dist/installer/config-writer.js.map +1 -1
- package/lib/dist/installer/index.d.ts +9 -5
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +25 -159
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/instructions-template.d.ts +1 -1
- package/lib/dist/installer/instructions-template.js +0 -37
- package/lib/dist/installer/instructions-template.js.map +1 -1
- package/lib/dist/installer/targets/antigravity.js +0 -113
- package/lib/dist/installer/targets/antigravity.js.map +1 -1
- package/lib/dist/installer/targets/bob.d.ts +20 -0
- package/lib/dist/installer/targets/bob.d.ts.map +1 -0
- package/lib/dist/installer/targets/bob.js +83 -0
- package/lib/dist/installer/targets/bob.js.map +1 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +1 -185
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/codex.d.ts.map +1 -1
- package/lib/dist/installer/targets/codex.js +17 -109
- package/lib/dist/installer/targets/codex.js.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.js +2 -54
- package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
- package/lib/dist/installer/targets/copilot-jetbrains.js +0 -57
- package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -1
- package/lib/dist/installer/targets/copilot-vscode.js +0 -58
- package/lib/dist/installer/targets/copilot-vscode.js.map +1 -1
- package/lib/dist/installer/targets/cursor.js +7 -88
- package/lib/dist/installer/targets/cursor.js.map +1 -1
- package/lib/dist/installer/targets/droid.d.ts +18 -0
- package/lib/dist/installer/targets/droid.d.ts.map +1 -0
- package/lib/dist/installer/targets/droid.js +92 -0
- package/lib/dist/installer/targets/droid.js.map +1 -0
- package/lib/dist/installer/targets/dsh.d.ts +35 -0
- package/lib/dist/installer/targets/dsh.d.ts.map +1 -0
- package/lib/dist/installer/targets/dsh.js +267 -0
- package/lib/dist/installer/targets/dsh.js.map +1 -0
- package/lib/dist/installer/targets/gemini.js +0 -37
- package/lib/dist/installer/targets/gemini.js.map +1 -1
- package/lib/dist/installer/targets/grok.d.ts +25 -0
- package/lib/dist/installer/targets/grok.d.ts.map +1 -0
- package/lib/dist/installer/targets/grok.js +96 -0
- package/lib/dist/installer/targets/grok.js.map +1 -0
- package/lib/dist/installer/targets/hermes.d.ts +19 -7
- package/lib/dist/installer/targets/hermes.d.ts.map +1 -1
- package/lib/dist/installer/targets/hermes.js +218 -214
- package/lib/dist/installer/targets/hermes.js.map +1 -1
- package/lib/dist/installer/targets/json-config.d.ts +45 -0
- package/lib/dist/installer/targets/json-config.d.ts.map +1 -0
- package/lib/dist/installer/targets/json-config.js +128 -0
- package/lib/dist/installer/targets/json-config.js.map +1 -0
- package/lib/dist/installer/targets/kimi.d.ts +21 -0
- package/lib/dist/installer/targets/kimi.d.ts.map +1 -0
- package/lib/dist/installer/targets/kimi.js +97 -0
- package/lib/dist/installer/targets/kimi.js.map +1 -0
- package/lib/dist/installer/targets/kiro.js +1 -41
- package/lib/dist/installer/targets/kiro.js.map +1 -1
- package/lib/dist/installer/targets/opencode.js +0 -102
- package/lib/dist/installer/targets/opencode.js.map +1 -1
- package/lib/dist/installer/targets/pi.d.ts +24 -0
- package/lib/dist/installer/targets/pi.d.ts.map +1 -0
- package/lib/dist/installer/targets/pi.js +100 -0
- package/lib/dist/installer/targets/pi.js.map +1 -0
- package/lib/dist/installer/targets/qoder.d.ts +23 -0
- package/lib/dist/installer/targets/qoder.d.ts.map +1 -0
- package/lib/dist/installer/targets/qoder.js +83 -0
- package/lib/dist/installer/targets/qoder.js.map +1 -0
- package/lib/dist/installer/targets/qwen.d.ts +21 -0
- package/lib/dist/installer/targets/qwen.d.ts.map +1 -0
- package/lib/dist/installer/targets/qwen.js +115 -0
- package/lib/dist/installer/targets/qwen.js.map +1 -0
- package/lib/dist/installer/targets/registry.d.ts.map +1 -1
- package/lib/dist/installer/targets/registry.js +18 -25
- package/lib/dist/installer/targets/registry.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +81 -11
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +183 -129
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/toml.d.ts +82 -6
- package/lib/dist/installer/targets/toml.d.ts.map +1 -1
- package/lib/dist/installer/targets/toml.js +318 -112
- package/lib/dist/installer/targets/toml.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +1 -1
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/installer/targets/types.js +0 -13
- package/lib/dist/installer/targets/types.js.map +1 -1
- package/lib/dist/installer/targets/windsurf.d.ts +22 -0
- package/lib/dist/installer/targets/windsurf.d.ts.map +1 -0
- package/lib/dist/installer/targets/windsurf.js +90 -0
- package/lib/dist/installer/targets/windsurf.js.map +1 -0
- package/lib/dist/lazy-engine.d.ts +22 -0
- package/lib/dist/lazy-engine.d.ts.map +1 -0
- package/lib/dist/lazy-engine.js +16 -0
- package/lib/dist/lazy-engine.js.map +1 -0
- package/lib/dist/mcp/answer-freshness.js +0 -6
- package/lib/dist/mcp/answer-freshness.js.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +2 -23
- package/lib/dist/mcp/daemon-manager.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +2 -79
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +44 -0
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +189 -118
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +23 -0
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +89 -373
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.js +4 -78
- package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
- package/lib/dist/mcp/early-ppid.js +0 -24
- package/lib/dist/mcp/early-ppid.js.map +1 -1
- package/lib/dist/mcp/engine.d.ts +10 -0
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +41 -152
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-dedup.js +0 -108
- package/lib/dist/mcp/explore-dedup.js.map +1 -1
- package/lib/dist/mcp/explore-diagnostics.js +0 -116
- package/lib/dist/mcp/explore-diagnostics.js.map +1 -1
- package/lib/dist/mcp/explore-session-state.js +0 -129
- package/lib/dist/mcp/explore-session-state.js.map +1 -1
- package/lib/dist/mcp/index-freshness-worker.js +5 -4
- package/lib/dist/mcp/index-freshness-worker.js.map +1 -1
- package/lib/dist/mcp/index-freshness.d.ts +7 -1
- package/lib/dist/mcp/index-freshness.d.ts.map +1 -1
- package/lib/dist/mcp/index-freshness.js +20 -12
- package/lib/dist/mcp/index-freshness.js.map +1 -1
- package/lib/dist/mcp/index-version-warning.d.ts +21 -0
- package/lib/dist/mcp/index-version-warning.d.ts.map +1 -0
- package/lib/dist/mcp/index-version-warning.js +38 -0
- package/lib/dist/mcp/index-version-warning.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +19 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +118 -293
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts +13 -3
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +106 -121
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/ppid-watchdog.js +0 -24
- package/lib/dist/mcp/ppid-watchdog.js.map +1 -1
- package/lib/dist/mcp/process-identity.d.ts +42 -0
- package/lib/dist/mcp/process-identity.d.ts.map +1 -0
- package/lib/dist/mcp/process-identity.js +130 -0
- package/lib/dist/mcp/process-identity.js.map +1 -0
- package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -1
- package/lib/dist/mcp/project-lifecycle.js +55 -21
- package/lib/dist/mcp/project-lifecycle.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts +26 -8
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +209 -223
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +58 -3
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +140 -100
- package/lib/dist/mcp/query-pool.js.map +1 -1
- package/lib/dist/mcp/query-worker.js +24 -36
- package/lib/dist/mcp/query-worker.js.map +1 -1
- package/lib/dist/mcp/server-instructions.js +0 -31
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +27 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +29 -130
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/startup-handshake.js +1 -48
- package/lib/dist/mcp/startup-handshake.js.map +1 -1
- package/lib/dist/mcp/stdin-teardown.js +0 -28
- package/lib/dist/mcp/stdin-teardown.js.map +1 -1
- package/lib/dist/mcp/stdout-teardown.d.ts +26 -0
- package/lib/dist/mcp/stdout-teardown.d.ts.map +1 -0
- package/lib/dist/mcp/stdout-teardown.js +20 -0
- package/lib/dist/mcp/stdout-teardown.js.map +1 -0
- package/lib/dist/mcp/tools.d.ts +159 -20
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +730 -3545
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/mcp/transport.d.ts.map +1 -1
- package/lib/dist/mcp/transport.js +4 -96
- package/lib/dist/mcp/transport.js.map +1 -1
- package/lib/dist/mcp/version.d.ts +13 -1
- package/lib/dist/mcp/version.d.ts.map +1 -1
- package/lib/dist/mcp/version.js +19 -21
- package/lib/dist/mcp/version.js.map +1 -1
- package/lib/dist/mcp/writer-lock.d.ts +11 -0
- package/lib/dist/mcp/writer-lock.d.ts.map +1 -1
- package/lib/dist/mcp/writer-lock.js +49 -46
- package/lib/dist/mcp/writer-lock.js.map +1 -1
- package/lib/dist/project-config.js +1 -138
- package/lib/dist/project-config.js.map +1 -1
- package/lib/dist/resolution/alias-binding.d.ts +7 -0
- package/lib/dist/resolution/alias-binding.d.ts.map +1 -1
- package/lib/dist/resolution/alias-binding.js +19 -52
- package/lib/dist/resolution/alias-binding.js.map +1 -1
- package/lib/dist/resolution/ambient-modules.d.ts +185 -0
- package/lib/dist/resolution/ambient-modules.d.ts.map +1 -0
- package/lib/dist/resolution/ambient-modules.js +732 -0
- package/lib/dist/resolution/ambient-modules.js.map +1 -0
- package/lib/dist/resolution/angular-template-synthesizer.d.ts +96 -0
- package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/angular-template-synthesizer.js +695 -0
- package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -0
- package/lib/dist/resolution/c-feature-variants.d.ts +40 -0
- package/lib/dist/resolution/c-feature-variants.d.ts.map +1 -0
- package/lib/dist/resolution/c-feature-variants.js +249 -0
- package/lib/dist/resolution/c-feature-variants.js.map +1 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.js +23 -391
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
- package/lib/dist/resolution/c-macro-renames.d.ts +25 -0
- package/lib/dist/resolution/c-macro-renames.d.ts.map +1 -0
- package/lib/dist/resolution/c-macro-renames.js +95 -0
- package/lib/dist/resolution/c-macro-renames.js.map +1 -0
- package/lib/dist/resolution/callback-synthesizer.d.ts +15 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +1487 -1234
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/const-alias-synthesizer.d.ts +48 -0
- package/lib/dist/resolution/const-alias-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/const-alias-synthesizer.js +234 -0
- package/lib/dist/resolution/const-alias-synthesizer.js.map +1 -0
- package/lib/dist/resolution/cooperative-yield.js +0 -27
- package/lib/dist/resolution/cooperative-yield.js.map +1 -1
- package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -1
- package/lib/dist/resolution/cpp-constructor.js +15 -17
- package/lib/dist/resolution/cpp-constructor.js.map +1 -1
- package/lib/dist/resolution/cpp-includers.d.ts +46 -0
- package/lib/dist/resolution/cpp-includers.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-includers.js +153 -0
- package/lib/dist/resolution/cpp-includers.js.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts +16 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -1
- package/lib/dist/resolution/cpp-macro-visibility.js +60 -61
- package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -1
- package/lib/dist/resolution/cpp-namespaces.d.ts +54 -0
- package/lib/dist/resolution/cpp-namespaces.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-namespaces.js +151 -0
- package/lib/dist/resolution/cpp-namespaces.js.map +1 -0
- package/lib/dist/resolution/cpp-raw-strings.d.ts +33 -0
- package/lib/dist/resolution/cpp-raw-strings.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-raw-strings.js +167 -0
- package/lib/dist/resolution/cpp-raw-strings.js.map +1 -0
- package/lib/dist/resolution/cpp-supertypes.d.ts +118 -0
- package/lib/dist/resolution/cpp-supertypes.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-supertypes.js +322 -0
- package/lib/dist/resolution/cpp-supertypes.js.map +1 -0
- package/lib/dist/resolution/cpp-template-instantiations.d.ts +83 -0
- package/lib/dist/resolution/cpp-template-instantiations.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-template-instantiations.js +983 -0
- package/lib/dist/resolution/cpp-template-instantiations.js.map +1 -0
- package/lib/dist/resolution/cpp-type-aliases.d.ts +194 -0
- package/lib/dist/resolution/cpp-type-aliases.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-type-aliases.js +648 -0
- package/lib/dist/resolution/cpp-type-aliases.js.map +1 -0
- package/lib/dist/resolution/dart-libraries.d.ts +75 -0
- package/lib/dist/resolution/dart-libraries.d.ts.map +1 -0
- package/lib/dist/resolution/dart-libraries.js +721 -0
- package/lib/dist/resolution/dart-libraries.js.map +1 -0
- package/lib/dist/resolution/dart-local-scope.d.ts +41 -0
- package/lib/dist/resolution/dart-local-scope.d.ts.map +1 -0
- package/lib/dist/resolution/dart-local-scope.js +565 -0
- package/lib/dist/resolution/dart-local-scope.js.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.js +0 -52
- package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/frameworks/angular-router.d.ts +142 -0
- package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/angular-router.js +959 -0
- package/lib/dist/resolution/frameworks/angular-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/astro.js +30 -60
- package/lib/dist/resolution/frameworks/astro.js.map +1 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts +18 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.js +65 -15
- package/lib/dist/resolution/frameworks/cargo-workspace.js.map +1 -1
- package/lib/dist/resolution/frameworks/cics.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/cics.js +7 -33
- package/lib/dist/resolution/frameworks/cics.js.map +1 -1
- package/lib/dist/resolution/frameworks/codeigniter.d.ts +23 -0
- package/lib/dist/resolution/frameworks/codeigniter.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/codeigniter.js +271 -0
- package/lib/dist/resolution/frameworks/codeigniter.js.map +1 -0
- package/lib/dist/resolution/frameworks/component-folder.d.ts +17 -0
- package/lib/dist/resolution/frameworks/component-folder.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/component-folder.js +11 -0
- package/lib/dist/resolution/frameworks/component-folder.js.map +1 -0
- package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.js +106 -101
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
- package/lib/dist/resolution/frameworks/drupal.d.ts +17 -8
- package/lib/dist/resolution/frameworks/drupal.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/drupal.js +377 -142
- package/lib/dist/resolution/frameworks/drupal.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.d.ts +10 -0
- package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.js +79 -65
- package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.d.ts +6 -0
- package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.js +64 -183
- package/lib/dist/resolution/frameworks/expo-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/express.js +215 -173
- package/lib/dist/resolution/frameworks/express.js.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.js +11 -112
- package/lib/dist/resolution/frameworks/fabric.js.map +1 -1
- package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/go.js +15 -61
- package/lib/dist/resolution/frameworks/go.js.map +1 -1
- package/lib/dist/resolution/frameworks/goframe.js +1 -55
- package/lib/dist/resolution/frameworks/goframe.js.map +1 -1
- package/lib/dist/resolution/frameworks/index.d.ts +16 -2
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +20 -48
- 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 +209 -147
- package/lib/dist/resolution/frameworks/java.js.map +1 -1
- package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/laravel.js +291 -71
- package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
- package/lib/dist/resolution/frameworks/name-heuristic.d.ts +35 -0
- package/lib/dist/resolution/frameworks/name-heuristic.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/name-heuristic.js +33 -0
- package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -0
- package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.js +236 -192
- package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/next-proxy.d.ts +67 -0
- package/lib/dist/resolution/frameworks/next-proxy.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/next-proxy.js +239 -0
- package/lib/dist/resolution/frameworks/next-proxy.js.map +1 -0
- package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nextjs.js +11 -66
- package/lib/dist/resolution/frameworks/nextjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/object-literal.js +0 -21
- package/lib/dist/resolution/frameworks/object-literal.js.map +1 -1
- package/lib/dist/resolution/frameworks/package-deps.d.ts +11 -7
- package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/package-deps.js +35 -26
- package/lib/dist/resolution/frameworks/package-deps.js.map +1 -1
- package/lib/dist/resolution/frameworks/page-component.d.ts +20 -0
- package/lib/dist/resolution/frameworks/page-component.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/page-component.js +31 -0
- package/lib/dist/resolution/frameworks/page-component.js.map +1 -0
- package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/play.js +27 -33
- package/lib/dist/resolution/frameworks/play.js.map +1 -1
- package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/python.js +106 -116
- package/lib/dist/resolution/frameworks/python.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.js +1 -166
- package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.d.ts +17 -7
- package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.js +21 -79
- package/lib/dist/resolution/frameworks/react-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/react.d.ts +68 -1
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react.js +1721 -114
- package/lib/dist/resolution/frameworks/react.js.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.js +152 -52
- package/lib/dist/resolution/frameworks/ruby.js.map +1 -1
- package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/rust.js +51 -70
- package/lib/dist/resolution/frameworks/rust.js.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.js +9 -74
- package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.js +8 -46
- package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/swift-objc.js +0 -97
- package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -1
- package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/swift.js +199 -167
- package/lib/dist/resolution/frameworks/swift.js.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.js +9 -130
- package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/terraform.js +1 -85
- package/lib/dist/resolution/frameworks/terraform.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.d.ts +26 -10
- package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.js +147 -147
- package/lib/dist/resolution/frameworks/vue-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue.d.ts +9 -2
- package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue.js +69 -107
- package/lib/dist/resolution/frameworks/vue.js.map +1 -1
- package/lib/dist/resolution/go-func-field-synthesizer.d.ts +58 -0
- package/lib/dist/resolution/go-func-field-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/go-func-field-synthesizer.js +696 -0
- package/lib/dist/resolution/go-func-field-synthesizer.js.map +1 -0
- package/lib/dist/resolution/go-module.d.ts +23 -7
- package/lib/dist/resolution/go-module.d.ts.map +1 -1
- package/lib/dist/resolution/go-module.js +21 -24
- package/lib/dist/resolution/go-module.js.map +1 -1
- package/lib/dist/resolution/go-stdlib-methods.d.ts +9 -0
- package/lib/dist/resolution/go-stdlib-methods.d.ts.map +1 -0
- package/lib/dist/resolution/go-stdlib-methods.js +224 -0
- package/lib/dist/resolution/go-stdlib-methods.js.map +1 -0
- package/lib/dist/resolution/goframe-synthesizer.js +2 -53
- package/lib/dist/resolution/goframe-synthesizer.js.map +1 -1
- package/lib/dist/resolution/import-resolver.d.ts +298 -23
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +1802 -1280
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +449 -5
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +1477 -981
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/js-builtins.d.ts +14 -0
- package/lib/dist/resolution/js-builtins.d.ts.map +1 -1
- package/lib/dist/resolution/js-builtins.js +15 -13
- package/lib/dist/resolution/js-builtins.js.map +1 -1
- package/lib/dist/resolution/js-class-expressions.d.ts +48 -0
- package/lib/dist/resolution/js-class-expressions.d.ts.map +1 -0
- package/lib/dist/resolution/js-class-expressions.js +25 -0
- package/lib/dist/resolution/js-class-expressions.js.map +1 -0
- package/lib/dist/resolution/js-super-calls.d.ts +18 -0
- package/lib/dist/resolution/js-super-calls.d.ts.map +1 -0
- package/lib/dist/resolution/js-super-calls.js +94 -0
- package/lib/dist/resolution/js-super-calls.js.map +1 -0
- package/lib/dist/resolution/jsx-code.d.ts +28 -0
- package/lib/dist/resolution/jsx-code.d.ts.map +1 -0
- package/lib/dist/resolution/jsx-code.js +459 -0
- package/lib/dist/resolution/jsx-code.js.map +1 -0
- package/lib/dist/resolution/lru-cache.d.ts +5 -13
- package/lib/dist/resolution/lru-cache.d.ts.map +1 -1
- package/lib/dist/resolution/lru-cache.js +43 -32
- package/lib/dist/resolution/lru-cache.js.map +1 -1
- package/lib/dist/resolution/memory-budget.js +0 -52
- package/lib/dist/resolution/memory-budget.js.map +1 -1
- package/lib/dist/resolution/module-importers.d.ts +185 -0
- package/lib/dist/resolution/module-importers.d.ts.map +1 -0
- package/lib/dist/resolution/module-importers.js +588 -0
- package/lib/dist/resolution/module-importers.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +891 -8
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +25013 -2928
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.d.ts +19 -0
- package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.js +46 -28
- package/lib/dist/resolution/next-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/override-parameters.d.ts +40 -0
- package/lib/dist/resolution/override-parameters.d.ts.map +1 -0
- package/lib/dist/resolution/override-parameters.js +339 -0
- package/lib/dist/resolution/override-parameters.js.map +1 -0
- package/lib/dist/resolution/parameter-flow.d.ts +218 -0
- package/lib/dist/resolution/parameter-flow.d.ts.map +1 -0
- package/lib/dist/resolution/parameter-flow.js +474 -0
- package/lib/dist/resolution/parameter-flow.js.map +1 -0
- package/lib/dist/resolution/pascal-scope.d.ts +91 -0
- package/lib/dist/resolution/pascal-scope.d.ts.map +1 -0
- package/lib/dist/resolution/pascal-scope.js +961 -0
- package/lib/dist/resolution/pascal-scope.js.map +1 -0
- package/lib/dist/resolution/path-aliases.d.ts +32 -4
- package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
- package/lib/dist/resolution/path-aliases.js +43 -110
- package/lib/dist/resolution/path-aliases.js.map +1 -1
- package/lib/dist/resolution/project-scans.d.ts +38 -0
- package/lib/dist/resolution/project-scans.d.ts.map +1 -0
- package/lib/dist/resolution/project-scans.js +30 -0
- package/lib/dist/resolution/project-scans.js.map +1 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts +2 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/react-router-synthesizer.js +67 -48
- package/lib/dist/resolution/react-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/resolver-pool.d.ts +43 -3
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-pool.js +55 -97
- package/lib/dist/resolution/resolver-pool.js.map +1 -1
- package/lib/dist/resolution/resolver-worker.d.ts +1 -1
- package/lib/dist/resolution/resolver-worker.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-worker.js +10 -36
- package/lib/dist/resolution/resolver-worker.js.map +1 -1
- package/lib/dist/resolution/resurrect-ref.d.ts +25 -0
- package/lib/dist/resolution/resurrect-ref.d.ts.map +1 -0
- package/lib/dist/resolution/resurrect-ref.js +19 -0
- package/lib/dist/resolution/resurrect-ref.js.map +1 -0
- package/lib/dist/resolution/ruby-constant-paths.d.ts +56 -0
- package/lib/dist/resolution/ruby-constant-paths.d.ts.map +1 -0
- package/lib/dist/resolution/ruby-constant-paths.js +255 -0
- package/lib/dist/resolution/ruby-constant-paths.js.map +1 -0
- package/lib/dist/resolution/ruby-parameter-flow.d.ts +10 -0
- package/lib/dist/resolution/ruby-parameter-flow.d.ts.map +1 -0
- package/lib/dist/resolution/ruby-parameter-flow.js +801 -0
- package/lib/dist/resolution/ruby-parameter-flow.js.map +1 -0
- package/lib/dist/resolution/rust-scopes.d.ts +120 -0
- package/lib/dist/resolution/rust-scopes.d.ts.map +1 -0
- package/lib/dist/resolution/rust-scopes.js +730 -0
- package/lib/dist/resolution/rust-scopes.js.map +1 -0
- package/lib/dist/resolution/shopify-themes.d.ts +10 -0
- package/lib/dist/resolution/shopify-themes.d.ts.map +1 -0
- package/lib/dist/resolution/shopify-themes.js +19 -0
- package/lib/dist/resolution/shopify-themes.js.map +1 -0
- package/lib/dist/resolution/strip-comments.d.ts +20 -1
- package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
- package/lib/dist/resolution/strip-comments.js +164 -119
- package/lib/dist/resolution/strip-comments.js.map +1 -1
- package/lib/dist/resolution/sveltekit-synthesizer.js +0 -64
- package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -1
- package/lib/dist/resolution/swift-objc-bridge.js +0 -160
- package/lib/dist/resolution/swift-objc-bridge.js.map +1 -1
- package/lib/dist/resolution/swift-type-visibility.d.ts +68 -0
- package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -0
- package/lib/dist/resolution/swift-type-visibility.js +355 -0
- package/lib/dist/resolution/swift-type-visibility.js.map +1 -0
- package/lib/dist/resolution/synth-utils.js +1 -22
- package/lib/dist/resolution/synth-utils.js.map +1 -1
- package/lib/dist/resolution/tanstack-router-synthesizer.js +0 -32
- package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/tauri-synthesizer.d.ts +37 -0
- package/lib/dist/resolution/tauri-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tauri-synthesizer.js +1038 -0
- package/lib/dist/resolution/tauri-synthesizer.js.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts +7 -2
- package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/tier-synthesizer.js +318 -121
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -1
- package/lib/dist/resolution/type-parameters.d.ts +34 -0
- package/lib/dist/resolution/type-parameters.d.ts.map +1 -0
- package/lib/dist/resolution/type-parameters.js +285 -0
- package/lib/dist/resolution/type-parameters.js.map +1 -0
- package/lib/dist/resolution/types.d.ts +209 -10
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/resolution/types.js +0 -47
- package/lib/dist/resolution/types.js.map +1 -1
- package/lib/dist/resolution/vbnet-receivers.d.ts +92 -0
- package/lib/dist/resolution/vbnet-receivers.d.ts.map +1 -0
- package/lib/dist/resolution/vbnet-receivers.js +1482 -0
- package/lib/dist/resolution/vbnet-receivers.js.map +1 -0
- package/lib/dist/resolution/vue-router-synthesizer.js +0 -31
- package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/workspace-packages.d.ts +206 -15
- package/lib/dist/resolution/workspace-packages.d.ts.map +1 -1
- package/lib/dist/resolution/workspace-packages.js +570 -152
- package/lib/dist/resolution/workspace-packages.js.map +1 -1
- package/lib/dist/search/identifier-segments.js +2 -93
- package/lib/dist/search/identifier-segments.js.map +1 -1
- package/lib/dist/search/query-parser.js +0 -54
- package/lib/dist/search/query-parser.js.map +1 -1
- package/lib/dist/search/query-paths.js +0 -167
- package/lib/dist/search/query-paths.js.map +1 -1
- package/lib/dist/search/query-utils.d.ts +44 -0
- package/lib/dist/search/query-utils.d.ts.map +1 -1
- package/lib/dist/search/query-utils.js +120 -198
- package/lib/dist/search/query-utils.js.map +1 -1
- package/lib/dist/sync/git-hooks.d.ts +14 -5
- package/lib/dist/sync/git-hooks.d.ts.map +1 -1
- package/lib/dist/sync/git-hooks.js +118 -65
- package/lib/dist/sync/git-hooks.js.map +1 -1
- package/lib/dist/sync/index.js +0 -14
- package/lib/dist/sync/index.js.map +1 -1
- package/lib/dist/sync/watch-policy.js +0 -45
- package/lib/dist/sync/watch-policy.js.map +1 -1
- package/lib/dist/sync/watcher.d.ts +29 -11
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +83 -487
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/sync/worktree.d.ts +29 -2
- package/lib/dist/sync/worktree.d.ts.map +1 -1
- package/lib/dist/sync/worktree.js +59 -78
- package/lib/dist/sync/worktree.js.map +1 -1
- package/lib/dist/telemetry/index.d.ts.map +1 -1
- package/lib/dist/telemetry/index.js +68 -146
- package/lib/dist/telemetry/index.js.map +1 -1
- package/lib/dist/types.d.ts +46 -0
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +15 -44
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/ui/color.js +0 -19
- package/lib/dist/ui/color.js.map +1 -1
- package/lib/dist/ui/glyphs.js +2 -45
- package/lib/dist/ui/glyphs.js.map +1 -1
- package/lib/dist/ui/shimmer-progress.js +0 -21
- package/lib/dist/ui/shimmer-progress.js.map +1 -1
- package/lib/dist/ui/shimmer-worker.js +0 -22
- package/lib/dist/ui/shimmer-worker.js.map +1 -1
- package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -1
- package/lib/dist/ui-server/api/deadcode.js +2 -31
- package/lib/dist/ui-server/api/deadcode.js.map +1 -1
- package/lib/dist/ui-server/api/effects.d.ts +7 -0
- package/lib/dist/ui-server/api/effects.d.ts.map +1 -1
- package/lib/dist/ui-server/api/effects.js +20 -103
- package/lib/dist/ui-server/api/effects.js.map +1 -1
- package/lib/dist/ui-server/api/entrypoints.d.ts +6 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -1
- package/lib/dist/ui-server/api/entrypoints.js +73 -130
- package/lib/dist/ui-server/api/entrypoints.js.map +1 -1
- package/lib/dist/ui-server/api/events.js +0 -145
- package/lib/dist/ui-server/api/events.js.map +1 -1
- package/lib/dist/ui-server/api/file.js +0 -80
- package/lib/dist/ui-server/api/file.js.map +1 -1
- package/lib/dist/ui-server/api/filecode.js +0 -95
- package/lib/dist/ui-server/api/filecode.js.map +1 -1
- package/lib/dist/ui-server/api/flow.js +0 -149
- package/lib/dist/ui-server/api/flow.js.map +1 -1
- package/lib/dist/ui-server/api/hierarchy.js +0 -28
- package/lib/dist/ui-server/api/hierarchy.js.map +1 -1
- package/lib/dist/ui-server/api/index.js +0 -88
- package/lib/dist/ui-server/api/index.js.map +1 -1
- package/lib/dist/ui-server/api/map.d.ts +41 -6
- package/lib/dist/ui-server/api/map.d.ts.map +1 -1
- package/lib/dist/ui-server/api/map.js +95 -308
- package/lib/dist/ui-server/api/map.js.map +1 -1
- package/lib/dist/ui-server/api/node.d.ts.map +1 -1
- package/lib/dist/ui-server/api/node.js +4 -109
- package/lib/dist/ui-server/api/node.js.map +1 -1
- package/lib/dist/ui-server/api/nodes.js +0 -16
- package/lib/dist/ui-server/api/nodes.js.map +1 -1
- package/lib/dist/ui-server/api/program.js +0 -90
- package/lib/dist/ui-server/api/program.js.map +1 -1
- package/lib/dist/ui-server/api/respond.js +0 -60
- package/lib/dist/ui-server/api/respond.js.map +1 -1
- package/lib/dist/ui-server/api/route-roots.d.ts +6 -0
- package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -1
- package/lib/dist/ui-server/api/route-roots.js +18 -39
- package/lib/dist/ui-server/api/route-roots.js.map +1 -1
- package/lib/dist/ui-server/api/routes.d.ts +2 -0
- package/lib/dist/ui-server/api/routes.d.ts.map +1 -1
- package/lib/dist/ui-server/api/routes.js +47 -47
- package/lib/dist/ui-server/api/routes.js.map +1 -1
- package/lib/dist/ui-server/api/screens.d.ts.map +1 -1
- package/lib/dist/ui-server/api/screens.js +16 -171
- package/lib/dist/ui-server/api/screens.js.map +1 -1
- package/lib/dist/ui-server/api/search.js +0 -62
- package/lib/dist/ui-server/api/search.js.map +1 -1
- package/lib/dist/ui-server/api/session.js +0 -58
- package/lib/dist/ui-server/api/session.js.map +1 -1
- package/lib/dist/ui-server/api/source.d.ts.map +1 -1
- package/lib/dist/ui-server/api/source.js +0 -161
- package/lib/dist/ui-server/api/source.js.map +1 -1
- package/lib/dist/ui-server/api/stats.js +0 -58
- package/lib/dist/ui-server/api/stats.js.map +1 -1
- package/lib/dist/ui-server/api/steps.d.ts.map +1 -1
- package/lib/dist/ui-server/api/steps.js +105 -373
- package/lib/dist/ui-server/api/steps.js.map +1 -1
- package/lib/dist/ui-server/api/trail-store.d.ts +3 -3
- package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -1
- package/lib/dist/ui-server/api/trail-store.js +24 -106
- package/lib/dist/ui-server/api/trail-store.js.map +1 -1
- package/lib/dist/ui-server/api/trails.d.ts.map +1 -1
- package/lib/dist/ui-server/api/trails.js +20 -94
- package/lib/dist/ui-server/api/trails.js.map +1 -1
- package/lib/dist/ui-server/api/when.d.ts +10 -2
- package/lib/dist/ui-server/api/when.d.ts.map +1 -1
- package/lib/dist/ui-server/api/when.js +32 -44
- package/lib/dist/ui-server/api/when.js.map +1 -1
- package/lib/dist/ui-server/api/wire.js +0 -58
- package/lib/dist/ui-server/api/wire.js.map +1 -1
- package/lib/dist/ui-server/assets.js +0 -35
- package/lib/dist/ui-server/assets.js.map +1 -1
- package/lib/dist/ui-server/constants.js +0 -26
- package/lib/dist/ui-server/constants.js.map +1 -1
- package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts +28 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.js +114 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -0
- package/lib/dist/ui-server/highlight/index.d.ts.map +1 -1
- package/lib/dist/ui-server/highlight/index.js +7 -133
- package/lib/dist/ui-server/highlight/index.js.map +1 -1
- package/lib/dist/ui-server/highlight/languages.d.ts +3 -3
- package/lib/dist/ui-server/highlight/languages.js +0 -31
- package/lib/dist/ui-server/highlight/languages.js.map +1 -1
- package/lib/dist/ui-server/highlight/tokenize-worker.d.ts +7 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.js +15 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -0
- package/lib/dist/ui-server/index.d.ts +25 -0
- package/lib/dist/ui-server/index.d.ts.map +1 -1
- package/lib/dist/ui-server/index.js +35 -103
- package/lib/dist/ui-server/index.js.map +1 -1
- package/lib/dist/ui-server/open-browser.js +0 -34
- package/lib/dist/ui-server/open-browser.js.map +1 -1
- package/lib/dist/ui-server/security.d.ts +5 -0
- package/lib/dist/ui-server/security.d.ts.map +1 -1
- package/lib/dist/ui-server/security.js +11 -147
- package/lib/dist/ui-server/security.js.map +1 -1
- package/lib/dist/ui-server/static.js +0 -41
- package/lib/dist/ui-server/static.js.map +1 -1
- package/lib/dist/upgrade/index.d.ts +61 -10
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +191 -225
- package/lib/dist/upgrade/index.js.map +1 -1
- package/lib/dist/upgrade/remove-binary.js +2 -67
- package/lib/dist/upgrade/remove-binary.js.map +1 -1
- package/lib/dist/upgrade/update-check.js +1 -81
- package/lib/dist/upgrade/update-check.js.map +1 -1
- package/lib/dist/utils.d.ts +69 -1
- package/lib/dist/utils.d.ts.map +1 -1
- package/lib/dist/utils.js +224 -266
- package/lib/dist/utils.js.map +1 -1
- package/lib/dist/viewer/assets/{index-D4S7YUPf.js → index-BSGpxBr9.js} +60 -58
- package/lib/dist/viewer/index.html +1 -1
- package/lib/dist/worker-teardown.d.ts +48 -0
- package/lib/dist/worker-teardown.d.ts.map +1 -0
- package/lib/dist/worker-teardown.js +53 -0
- package/lib/dist/worker-teardown.js.map +1 -0
- package/lib/kernel/codegraph-kernel.node +2 -2
- package/lib/node_modules/.package-lock.json +4 -4
- package/lib/node_modules/ignore/README.md +138 -8
- package/lib/node_modules/ignore/index.d.ts +56 -20
- package/lib/node_modules/ignore/index.js +1033 -221
- package/lib/node_modules/ignore/legacy.js +871 -178
- package/lib/node_modules/ignore/package.json +10 -4
- package/lib/package.json +14 -8
- package/node.exe +2 -2
- package/package.json +1 -1
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Context Builder
|
|
4
|
-
*
|
|
5
|
-
* Builds rich context for tasks by combining FTS search with graph traversal.
|
|
6
|
-
* Outputs structured context ready to inject into Claude.
|
|
7
|
-
*/
|
|
8
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
3
|
if (k2 === undefined) k2 = k;
|
|
10
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -39,7 +33,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
39
33
|
};
|
|
40
34
|
})();
|
|
41
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.formatContextAsJson = exports.formatContextAsMarkdown = exports.ContextBuilder = exports.LOW_CONFIDENCE_MARKER = void 0;
|
|
36
|
+
exports.formatContextAsJson = exports.formatContextAsMarkdown = exports.ContextBuilder = exports.LOW_CONFIDENCE_MARKER = exports.MAX_QUERY_TERMS = exports.MAX_QUERY_SYMBOLS = void 0;
|
|
37
|
+
exports.extractSymbolsFromQuery = extractSymbolsFromQuery;
|
|
43
38
|
exports.createContextBuilder = createContextBuilder;
|
|
44
39
|
const fs = __importStar(require("fs"));
|
|
45
40
|
const path = __importStar(require("path"));
|
|
@@ -48,55 +43,42 @@ const errors_1 = require("../errors");
|
|
|
48
43
|
const utils_1 = require("../utils");
|
|
49
44
|
const query_utils_1 = require("../search/query-utils");
|
|
50
45
|
const markers_1 = require("./markers");
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
* - snake_case: user_service, sign_in
|
|
57
|
-
* - SCREAMING_SNAKE: MAX_RETRIES
|
|
58
|
-
* - dot.notation: app.isPackaged (extracts both sides)
|
|
59
|
-
* - Single words that look like identifiers (no spaces, not common English words)
|
|
60
|
-
*
|
|
61
|
-
* @param query - Natural language query
|
|
62
|
-
* @returns Array of potential symbol names
|
|
63
|
-
*/
|
|
46
|
+
const cobol_copybooks_1 = require("../graph/cobol-copybooks");
|
|
47
|
+
const synthesized_hop_1 = require("../graph/synthesized-hop");
|
|
48
|
+
const MAX_COPYBOOK_DECLARATION_ENTRIES = 3;
|
|
49
|
+
exports.MAX_QUERY_SYMBOLS = 64;
|
|
50
|
+
exports.MAX_QUERY_TERMS = 128;
|
|
64
51
|
function extractSymbolsFromQuery(query) {
|
|
65
52
|
const symbols = new Set();
|
|
66
|
-
|
|
53
|
+
const asciiView = (0, query_utils_1.blankNonAsciiWords)(query);
|
|
67
54
|
const camelCasePattern = /\b([A-Z][a-z]+(?:[A-Z][a-z]*)*|[a-z]+(?:[A-Z][a-z]*)+)\b/g;
|
|
68
55
|
let match;
|
|
69
|
-
while ((match = camelCasePattern.exec(
|
|
56
|
+
while ((match = camelCasePattern.exec(asciiView)) !== null) {
|
|
70
57
|
if (match[1] && match[1].length >= 2) {
|
|
71
58
|
symbols.add(match[1]);
|
|
72
59
|
}
|
|
73
60
|
}
|
|
74
|
-
// Extract snake_case identifiers
|
|
75
61
|
const snakeCasePattern = /\b([a-z][a-z0-9]*(?:_[a-z0-9]+)+)\b/gi;
|
|
76
|
-
while ((match = snakeCasePattern.exec(
|
|
62
|
+
while ((match = snakeCasePattern.exec(asciiView)) !== null) {
|
|
77
63
|
if (match[1] && match[1].length >= 3) {
|
|
78
64
|
symbols.add(match[1]);
|
|
79
65
|
}
|
|
80
66
|
}
|
|
81
|
-
// Extract SCREAMING_SNAKE_CASE
|
|
82
67
|
const screamingPattern = /\b([A-Z][A-Z0-9]*(?:_[A-Z0-9]+)+)\b/g;
|
|
83
|
-
while ((match = screamingPattern.exec(
|
|
68
|
+
while ((match = screamingPattern.exec(asciiView)) !== null) {
|
|
84
69
|
if (match[1]) {
|
|
85
70
|
symbols.add(match[1]);
|
|
86
71
|
}
|
|
87
72
|
}
|
|
88
|
-
// Extract ALL_CAPS acronyms (2+ chars, e.g., REST, HTTP, LRU, API)
|
|
89
73
|
const acronymPattern = /\b([A-Z]{2,})\b/g;
|
|
90
|
-
while ((match = acronymPattern.exec(
|
|
74
|
+
while ((match = acronymPattern.exec(asciiView)) !== null) {
|
|
91
75
|
if (match[1]) {
|
|
92
76
|
symbols.add(match[1]);
|
|
93
77
|
}
|
|
94
78
|
}
|
|
95
|
-
// Extract dot.notation and split into parts (e.g., "app.isPackaged" -> ["app", "isPackaged"])
|
|
96
79
|
const dotPattern = /\b([a-zA-Z][a-zA-Z0-9]*(?:\.[a-zA-Z][a-zA-Z0-9]*)+)\b/g;
|
|
97
|
-
while ((match = dotPattern.exec(
|
|
80
|
+
while ((match = dotPattern.exec(asciiView)) !== null) {
|
|
98
81
|
if (match[1]) {
|
|
99
|
-
// Add both the full path and individual parts
|
|
100
82
|
symbols.add(match[1]);
|
|
101
83
|
const parts = match[1].split('.');
|
|
102
84
|
for (const part of parts) {
|
|
@@ -106,15 +88,23 @@ function extractSymbolsFromQuery(query) {
|
|
|
106
88
|
}
|
|
107
89
|
}
|
|
108
90
|
}
|
|
109
|
-
// Extract plain lowercase identifiers (3+ chars, not already matched)
|
|
110
|
-
// Catches symbol names like "undo", "redo", "history", "render", "parse"
|
|
111
91
|
const lowercasePattern = /\b([a-z][a-z0-9]{2,})\b/g;
|
|
112
|
-
while ((match = lowercasePattern.exec(
|
|
92
|
+
while ((match = lowercasePattern.exec(asciiView)) !== null) {
|
|
113
93
|
if (match[1]) {
|
|
114
94
|
symbols.add(match[1]);
|
|
115
95
|
}
|
|
116
96
|
}
|
|
117
|
-
|
|
97
|
+
for (const run of query.match(/[\p{L}\p{N}\p{M}_$]+/gu) ?? []) {
|
|
98
|
+
if (!/[^\x00-\x7F]/.test(run))
|
|
99
|
+
continue;
|
|
100
|
+
const words = run.split(/[_$]+/).flatMap(query_utils_1.splitAtCjkSwitches);
|
|
101
|
+
if (words.length > 1 && (0, query_utils_1.meetsQueryWordFloor)(run))
|
|
102
|
+
symbols.add(run);
|
|
103
|
+
for (const word of words) {
|
|
104
|
+
if (/[^\x00-\x7F]/.test(word) && (0, query_utils_1.meetsQueryWordFloor)(word))
|
|
105
|
+
symbols.add(word);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
118
108
|
const commonWords = new Set([
|
|
119
109
|
'the', 'and', 'for', 'with', 'from', 'this', 'that', 'have', 'been',
|
|
120
110
|
'will', 'would', 'could', 'should', 'does', 'done', 'make', 'made',
|
|
@@ -129,7 +119,6 @@ function extractSymbolsFromQuery(query) {
|
|
|
129
119
|
'more', 'most', 'very', 'being', 'having', 'doing',
|
|
130
120
|
'system', 'need', 'needs', 'want', 'wants', 'like', 'look',
|
|
131
121
|
'change', 'changes', 'changed', 'changing',
|
|
132
|
-
// Common English nouns/verbs that match thousands of unrelated code symbols
|
|
133
122
|
'layer', 'handle', 'handles', 'handling', 'incoming', 'outgoing',
|
|
134
123
|
'data', 'flow', 'flows', 'level', 'levels', 'request', 'requests',
|
|
135
124
|
'response', 'responses', 'implement', 'implements', 'implementation',
|
|
@@ -143,56 +132,31 @@ function extractSymbolsFromQuery(query) {
|
|
|
143
132
|
]);
|
|
144
133
|
return Array.from(symbols).filter(s => !commonWords.has(s.toLowerCase()));
|
|
145
134
|
}
|
|
146
|
-
/**
|
|
147
|
-
* Default options for context building
|
|
148
|
-
*
|
|
149
|
-
* Tuned for minimal context usage while still providing useful results:
|
|
150
|
-
* - Fewer nodes and code blocks by default
|
|
151
|
-
* - Smaller code block size limit
|
|
152
|
-
* - Shallower traversal
|
|
153
|
-
*/
|
|
154
135
|
const DEFAULT_BUILD_OPTIONS = {
|
|
155
|
-
maxNodes: 20,
|
|
156
|
-
maxCodeBlocks: 5,
|
|
157
|
-
maxCodeBlockSize: 1500,
|
|
136
|
+
maxNodes: 20,
|
|
137
|
+
maxCodeBlocks: 5,
|
|
138
|
+
maxCodeBlockSize: 1500,
|
|
158
139
|
includeCode: true,
|
|
159
140
|
format: 'markdown',
|
|
160
|
-
searchLimit: 3,
|
|
161
|
-
traversalDepth: 1,
|
|
141
|
+
searchLimit: 3,
|
|
142
|
+
traversalDepth: 1,
|
|
162
143
|
minScore: 0.3,
|
|
163
144
|
};
|
|
164
|
-
/**
|
|
165
|
-
* Node kinds that provide high information value in context results.
|
|
166
|
-
* Imports/exports are excluded because they have near-zero information density -
|
|
167
|
-
* they tell you something exists, not how it works.
|
|
168
|
-
*/
|
|
169
145
|
const HIGH_VALUE_NODE_KINDS = [
|
|
170
146
|
'function', 'method', 'class', 'interface', 'type_alias', 'struct', 'union', 'trait',
|
|
171
147
|
'component', 'route', 'variable', 'constant', 'enum', 'module', 'namespace',
|
|
172
148
|
];
|
|
173
|
-
/**
|
|
174
|
-
* Default options for finding relevant context
|
|
175
|
-
*/
|
|
176
149
|
const DEFAULT_FIND_OPTIONS = {
|
|
177
|
-
searchLimit: 3,
|
|
178
|
-
traversalDepth: 1,
|
|
179
|
-
maxNodes: 20,
|
|
150
|
+
searchLimit: 3,
|
|
151
|
+
traversalDepth: 1,
|
|
152
|
+
maxNodes: 20,
|
|
180
153
|
minScore: 0.3,
|
|
181
154
|
edgeKinds: [],
|
|
182
|
-
nodeKinds: HIGH_VALUE_NODE_KINDS,
|
|
183
|
-
seedNames: [],
|
|
155
|
+
nodeKinds: HIGH_VALUE_NODE_KINDS,
|
|
156
|
+
seedNames: [],
|
|
184
157
|
};
|
|
185
|
-
// Re-export the low-confidence sentinel (defined in a dependency-free leaf so
|
|
186
|
-
// the MCP layer can import it without pulling this module's deps onto the
|
|
187
|
-
// cold-start path). Builder code below uses the imported binding directly.
|
|
188
158
|
var markers_2 = require("./markers");
|
|
189
159
|
Object.defineProperty(exports, "LOW_CONFIDENCE_MARKER", { enumerable: true, get: function () { return markers_2.LOW_CONFIDENCE_MARKER; } });
|
|
190
|
-
/**
|
|
191
|
-
* Context Builder
|
|
192
|
-
*
|
|
193
|
-
* Coordinates semantic search and graph traversal to build
|
|
194
|
-
* comprehensive context for tasks.
|
|
195
|
-
*/
|
|
196
160
|
class ContextBuilder {
|
|
197
161
|
projectRoot;
|
|
198
162
|
queries;
|
|
@@ -202,56 +166,25 @@ class ContextBuilder {
|
|
|
202
166
|
this.queries = queries;
|
|
203
167
|
this.traverser = traverser;
|
|
204
168
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
* `searchNodes`, so the lever has to be applied here too or the setting would
|
|
209
|
-
* only half-work — and explore is the surface #982 actually reports on.
|
|
210
|
-
*
|
|
211
|
-
* Only the -15 relevance penalty is shared. Explore's hard `continue` filters
|
|
212
|
-
* and its non-production budget cap are deliberately NOT joined: those REMOVE
|
|
213
|
-
* content, and `deprioritize` is a ranking lever by definition — `exclude` is
|
|
214
|
-
* the lever for taking things out of reach.
|
|
215
|
-
*/
|
|
216
|
-
isDeprioritized(filePath) {
|
|
217
|
-
return this.queries.getDeprioritizedPathMatcher()?.(filePath) ?? false;
|
|
169
|
+
deprioritizedPaths() {
|
|
170
|
+
const matcher = this.queries.getDeprioritizedPathSnapshot?.() ?? this.queries.getDeprioritizedPathMatcher?.();
|
|
171
|
+
return (filePath) => matcher?.(filePath) ?? false;
|
|
218
172
|
}
|
|
219
|
-
/**
|
|
220
|
-
* Build context for a task
|
|
221
|
-
*
|
|
222
|
-
* Pipeline:
|
|
223
|
-
* 1. Parse task input (string or {title, description})
|
|
224
|
-
* 2. Run semantic search to find entry points
|
|
225
|
-
* 3. Expand graph around entry points
|
|
226
|
-
* 4. Extract code blocks for key nodes
|
|
227
|
-
* 5. Format output for Claude
|
|
228
|
-
*
|
|
229
|
-
* @param input - Task description or object with title/description
|
|
230
|
-
* @param options - Build options
|
|
231
|
-
* @returns TaskContext (structured) or formatted string
|
|
232
|
-
*/
|
|
233
173
|
async buildContext(input, options = {}) {
|
|
234
174
|
const opts = { ...DEFAULT_BUILD_OPTIONS, ...options };
|
|
235
|
-
// Parse input
|
|
236
175
|
const query = typeof input === 'string' ? input : `${input.title}${input.description ? `: ${input.description}` : ''}`;
|
|
237
|
-
// Find relevant context (semantic search + graph expansion)
|
|
238
176
|
const subgraph = await this.findRelevantContext(query, {
|
|
239
177
|
searchLimit: opts.searchLimit,
|
|
240
178
|
traversalDepth: opts.traversalDepth,
|
|
241
179
|
maxNodes: opts.maxNodes,
|
|
242
180
|
minScore: opts.minScore,
|
|
243
181
|
});
|
|
244
|
-
// Get entry points (nodes from semantic search)
|
|
245
182
|
const entryPoints = this.getEntryPoints(subgraph);
|
|
246
|
-
// Extract code blocks for key nodes
|
|
247
183
|
const codeBlocks = opts.includeCode
|
|
248
184
|
? await this.extractCodeBlocks(subgraph, opts.maxCodeBlocks, opts.maxCodeBlockSize)
|
|
249
185
|
: [];
|
|
250
|
-
// Get related files
|
|
251
186
|
const relatedFiles = this.getRelatedFiles(subgraph);
|
|
252
|
-
// Generate summary
|
|
253
187
|
const summary = this.generateSummary(query, subgraph, entryPoints);
|
|
254
|
-
// Calculate stats
|
|
255
188
|
const stats = {
|
|
256
189
|
nodeCount: subgraph.nodes.size,
|
|
257
190
|
edgeCount: subgraph.edges.length,
|
|
@@ -268,10 +201,7 @@ class ContextBuilder {
|
|
|
268
201
|
summary,
|
|
269
202
|
stats,
|
|
270
203
|
};
|
|
271
|
-
// Return formatted output or raw context
|
|
272
204
|
if (opts.format === 'markdown') {
|
|
273
|
-
// Bounded candidate set (entry points + subgraph + code blocks), so the
|
|
274
|
-
// DB-backed generated check is one probe, not a per-comparison query.
|
|
275
205
|
const isGenerated = this.queries.generatedPredicateFor([
|
|
276
206
|
...entryPoints.map((n) => n.filePath),
|
|
277
207
|
...Array.from(subgraph.nodes.values(), (n) => n.filePath),
|
|
@@ -286,13 +216,6 @@ class ContextBuilder {
|
|
|
286
216
|
}
|
|
287
217
|
return context;
|
|
288
218
|
}
|
|
289
|
-
/**
|
|
290
|
-
* Honest handoff appended when retrieval confidence is low (the query matched
|
|
291
|
-
* mostly common words). Instead of the usual "this covers the surface" framing
|
|
292
|
-
* — which, when wrong, sends the agent off to Read/Grep — it admits the
|
|
293
|
-
* uncertainty and routes the agent to the precise tools (explore with real
|
|
294
|
-
* symbol names, search, or files to browse the closest areas we *did* surface).
|
|
295
|
-
*/
|
|
296
219
|
buildLowConfidenceNote(entryPoints) {
|
|
297
220
|
const dirs = [];
|
|
298
221
|
const seen = new Set();
|
|
@@ -319,18 +242,6 @@ class ContextBuilder {
|
|
|
319
242
|
+ dirLine
|
|
320
243
|
+ '\n\nDo not assume the list above is comprehensive.';
|
|
321
244
|
}
|
|
322
|
-
/**
|
|
323
|
-
* Surface short call-paths among the symbols this context already found,
|
|
324
|
-
* derived in-memory from the subgraph's `calls` edges (no extra queries).
|
|
325
|
-
*
|
|
326
|
-
* This bakes the value of path-finding INTO the always-loaded `context` tool.
|
|
327
|
-
* Agents reliably read context's output but do NOT discover/adopt a standalone
|
|
328
|
-
* trace tool (in deferred-MCP harnesses they only ToolSearch-select tools they
|
|
329
|
-
* already know). Delivering the flow here means "how does X reach Y" is
|
|
330
|
-
* answered without the agent needing to find, load, or choose a new tool.
|
|
331
|
-
* Chains stop where the static call graph ends (e.g. dynamic dispatch) — that
|
|
332
|
-
* truncation is honest, and the agent can codegraph_node the last hop to bridge.
|
|
333
|
-
*/
|
|
334
245
|
buildCallPathsSection(subgraph) {
|
|
335
246
|
const adj = new Map();
|
|
336
247
|
for (const e of subgraph.edges) {
|
|
@@ -348,14 +259,14 @@ class ContextBuilder {
|
|
|
348
259
|
return '';
|
|
349
260
|
const MAX_HOPS = 6;
|
|
350
261
|
const chains = [];
|
|
351
|
-
let budget = 2000;
|
|
262
|
+
let budget = 2000;
|
|
352
263
|
const dfs = (id, path, seen) => {
|
|
353
264
|
if (budget-- <= 0)
|
|
354
265
|
return;
|
|
355
266
|
const next = (adj.get(id) ?? []).filter((t) => !seen.has(t));
|
|
356
267
|
if (next.length === 0 || path.length >= MAX_HOPS) {
|
|
357
268
|
if (path.length >= 3)
|
|
358
|
-
chains.push([...path]);
|
|
269
|
+
chains.push([...path]);
|
|
359
270
|
return;
|
|
360
271
|
}
|
|
361
272
|
for (const t of next) {
|
|
@@ -371,11 +282,6 @@ class ContextBuilder {
|
|
|
371
282
|
dfs(s, [s], new Set([s]));
|
|
372
283
|
if (chains.length === 0)
|
|
373
284
|
return '';
|
|
374
|
-
// Keep only chains that connect TWO OR MORE query-relevant symbols (roots).
|
|
375
|
-
// A chain from a root into an arbitrary callee (render → onMagicFrameGenerate)
|
|
376
|
-
// is structurally valid but tangential to the question; requiring ≥2 roots
|
|
377
|
-
// keeps the chain anchored to what the user actually asked about. Rank by
|
|
378
|
-
// #roots then length, and drop any that are a sub-path of a longer kept chain.
|
|
379
285
|
const rootSet = new Set(subgraph.roots);
|
|
380
286
|
const rootCount = (c) => c.reduce((n, id) => n + (rootSet.has(id) ? 1 : 0), 0);
|
|
381
287
|
const relevant = chains.filter((c) => rootCount(c) >= 2);
|
|
@@ -392,34 +298,15 @@ class ContextBuilder {
|
|
|
392
298
|
if (kept.length === 0)
|
|
393
299
|
return '';
|
|
394
300
|
const name = (id) => subgraph.nodes.get(id)?.name ?? id;
|
|
395
|
-
// Synthesized (dynamic-dispatch) hops are real `calls` edges but invisible to
|
|
396
|
-
// static parsing — mark them inline so the agent sees WHERE the callback was
|
|
397
|
-
// wired up (`registered @file:line`) instead of grepping for it. Keyed by
|
|
398
|
-
// "source>target".
|
|
399
301
|
const synthByPair = new Map();
|
|
400
302
|
for (const e of subgraph.edges) {
|
|
401
|
-
if (e.kind !== 'calls'
|
|
303
|
+
if (e.kind !== 'calls')
|
|
402
304
|
continue;
|
|
403
|
-
const
|
|
404
|
-
if (!
|
|
305
|
+
const hop = (0, synthesized_hop_1.describeSynthesizedHop)(e);
|
|
306
|
+
if (!hop)
|
|
405
307
|
continue;
|
|
406
|
-
const at =
|
|
407
|
-
|
|
408
|
-
? `callback via ${m.via ? `\`${String(m.via)}\`` : 'registrar'}${at}`
|
|
409
|
-
: m.synthesizedBy === 'react-render'
|
|
410
|
-
? `React re-render via setState${at}`
|
|
411
|
-
: m.synthesizedBy === 'jsx-render'
|
|
412
|
-
? `renders <${String(m.via || 'child')}>`
|
|
413
|
-
: m.synthesizedBy === 'vue-handler'
|
|
414
|
-
? `Vue @${String(m.event || 'event')} handler`
|
|
415
|
-
: m.synthesizedBy === 'http-client'
|
|
416
|
-
? `HTTP ${String(m.method || 'GET')} ${String(m.href || '')} — the client's call onto its own route${at}`
|
|
417
|
-
: m.synthesizedBy === 'queue-job'
|
|
418
|
-
? `queue job ${m.event ? `\`${String(m.event)}\`` : ''}${m.queue ? ` on \`${String(m.queue)}\`` : ''}${at}`
|
|
419
|
-
: m.synthesizedBy === 'event-bus' && m.channel === 'socket'
|
|
420
|
-
? `socket message ${m.event ? `\`${String(m.event)}\`` : ''}${m.tier === 'client→server' ? ' → server' : m.tier === 'server→client' ? ' → client' : ''}${at}`
|
|
421
|
-
: `event ${m.event ? `\`${String(m.event)}\`` : ''}${at}`;
|
|
422
|
-
synthByPair.set(`${e.source}>${e.target}`, label);
|
|
308
|
+
const at = hop.registeredAt ? ` @${hop.registeredAt}` : '';
|
|
309
|
+
synthByPair.set(`${e.source}>${e.target}`, `${hop.summary}${hop.detail}${at}`);
|
|
423
310
|
}
|
|
424
311
|
const renderChain = (c) => {
|
|
425
312
|
let s = name(c[0]);
|
|
@@ -439,58 +326,30 @@ class ContextBuilder {
|
|
|
439
326
|
...kept.map((c) => `- ${renderChain(c)}`),
|
|
440
327
|
'',
|
|
441
328
|
hasSynth
|
|
442
|
-
? '_Hops marked `[
|
|
329
|
+
? '_Hops marked `[…]` are dynamic dispatch bridged by codegraph (with the registration site); the rest are direct calls. codegraph_node any symbol for its body._'
|
|
443
330
|
: '_codegraph_node any symbol above for its source + its own callers/callees._',
|
|
444
331
|
];
|
|
445
332
|
return '\n' + lines.join('\n') + '\n';
|
|
446
333
|
}
|
|
447
|
-
/**
|
|
448
|
-
* Find relevant subgraph for a query
|
|
449
|
-
*
|
|
450
|
-
* Uses hybrid search combining exact symbol lookup with semantic search:
|
|
451
|
-
* 1. Extract potential symbol names from query
|
|
452
|
-
* 2. Look up exact matches for those symbols (high confidence)
|
|
453
|
-
* 3. Use semantic search for concept matching
|
|
454
|
-
* 4. Merge results, prioritizing exact matches
|
|
455
|
-
* 5. Traverse graph from entry points
|
|
456
|
-
*
|
|
457
|
-
* @param query - Natural language query
|
|
458
|
-
* @param options - Search and traversal options
|
|
459
|
-
* @returns Subgraph of relevant nodes and edges
|
|
460
|
-
*/
|
|
461
334
|
async findRelevantContext(query, options = {}) {
|
|
462
335
|
const opts = { ...DEFAULT_FIND_OPTIONS, ...options };
|
|
463
|
-
// Start with empty subgraph
|
|
464
336
|
const nodes = new Map();
|
|
465
337
|
const edges = [];
|
|
466
338
|
const roots = [];
|
|
467
|
-
// Handle empty query - return empty subgraph
|
|
468
339
|
if (!query || query.trim().length === 0) {
|
|
469
340
|
return { nodes, edges, roots };
|
|
470
341
|
}
|
|
471
|
-
|
|
472
|
-
// Step 1: Extract potential symbol names from query
|
|
473
|
-
const symbolsFromQuery = extractSymbolsFromQuery(query);
|
|
342
|
+
const symbolsFromQuery = extractSymbolsFromQuery(query).slice(0, exports.MAX_QUERY_SYMBOLS);
|
|
474
343
|
(0, errors_1.logDebug)('Extracted symbols from query', { query, symbols: symbolsFromQuery });
|
|
475
|
-
// Step 2: Look up exact matches for extracted symbols
|
|
476
344
|
let exactMatches = [];
|
|
477
345
|
if (symbolsFromQuery.length > 0 || opts.seedNames.length > 0) {
|
|
478
346
|
try {
|
|
479
347
|
if (symbolsFromQuery.length > 0) {
|
|
480
|
-
// Get more results so we can apply co-location boosting before trimming
|
|
481
348
|
exactMatches = this.queries.findNodesByExactName(symbolsFromQuery, {
|
|
482
349
|
limit: Math.ceil(opts.searchLimit * 5),
|
|
483
350
|
kinds: opts.nodeKinds && opts.nodeKinds.length > 0 ? opts.nodeKinds : undefined,
|
|
484
351
|
});
|
|
485
352
|
}
|
|
486
|
-
// Step 2a: segment-vocabulary seeds. Word-level query terms cannot
|
|
487
|
-
// reach camelCase names through FTS (one token per name), so the
|
|
488
|
-
// caller resolves query words → names via the segment vocab and hands
|
|
489
|
-
// them in as seedNames. Merged at a dampened score — a symbol the
|
|
490
|
-
// query names outright must outrank a segment-derived one — but
|
|
491
|
-
// BEFORE the co-location boost below, because several seeds landing
|
|
492
|
-
// in one file (pinFeedIfNearBottom + feedAtBottom + handleFeedScroll)
|
|
493
|
-
// is exactly the evidence that file is the answer.
|
|
494
353
|
if (opts.seedNames.length > 0) {
|
|
495
354
|
const seedResults = this.queries.findNodesByExactName(opts.seedNames, {
|
|
496
355
|
limit: Math.ceil(opts.searchLimit * 3),
|
|
@@ -505,18 +364,13 @@ class ContextBuilder {
|
|
|
505
364
|
}
|
|
506
365
|
(0, errors_1.logDebug)('Segment seed matches', { seedNames: opts.seedNames, added: known.size });
|
|
507
366
|
}
|
|
508
|
-
// Co-location boost: when multiple extracted symbols appear in the same file,
|
|
509
|
-
// those results are much more likely to be what the user is looking for.
|
|
510
|
-
// E.g., "scrapeLoop" + "run" both in scrape/scrape.go → boost both.
|
|
511
367
|
if (exactMatches.length > 1) {
|
|
512
|
-
// Build a map of files → how many distinct symbol names matched in that file
|
|
513
368
|
const fileSymbolCounts = new Map();
|
|
514
369
|
for (const r of exactMatches) {
|
|
515
370
|
const names = fileSymbolCounts.get(r.node.filePath) || new Set();
|
|
516
371
|
names.add(r.node.name.toLowerCase());
|
|
517
372
|
fileSymbolCounts.set(r.node.filePath, names);
|
|
518
373
|
}
|
|
519
|
-
// Boost results in files where multiple query symbols co-occur
|
|
520
374
|
exactMatches = exactMatches.map(r => {
|
|
521
375
|
const symbolCount = fileSymbolCounts.get(r.node.filePath)?.size || 1;
|
|
522
376
|
return {
|
|
@@ -526,7 +380,6 @@ class ContextBuilder {
|
|
|
526
380
|
});
|
|
527
381
|
exactMatches.sort((a, b) => b.score - a.score);
|
|
528
382
|
}
|
|
529
|
-
// Trim back to reasonable size
|
|
530
383
|
exactMatches = exactMatches.slice(0, Math.ceil(opts.searchLimit * 2));
|
|
531
384
|
(0, errors_1.logDebug)('Exact symbol matches', { count: exactMatches.length });
|
|
532
385
|
}
|
|
@@ -534,14 +387,9 @@ class ContextBuilder {
|
|
|
534
387
|
(0, errors_1.logDebug)('Exact symbol lookup failed', { error: String(error) });
|
|
535
388
|
}
|
|
536
389
|
}
|
|
537
|
-
// Step 2b: Search for extracted symbols as definition (class/interface) prefixes.
|
|
538
|
-
// When the user writes "REST", "bulk", or "allocation", they usually mean classes
|
|
539
|
-
// like RestController, BulkRequest, AllocationService — not nodes named exactly that.
|
|
540
|
-
// Also tries stem variants: "caching" → "cache" finds Cache, CacheBuilder.
|
|
541
390
|
if (symbolsFromQuery.length > 0) {
|
|
542
391
|
const definitionKinds = ['class', 'interface', 'struct', 'union', 'trait',
|
|
543
392
|
'protocol', 'enum', 'type_alias'];
|
|
544
|
-
// Expand symbols with stem variants for broader definition matching
|
|
545
393
|
const expandedSymbols = new Set(symbolsFromQuery);
|
|
546
394
|
for (const sym of symbolsFromQuery) {
|
|
547
395
|
for (const variant of (0, query_utils_1.getStemVariants)(sym)) {
|
|
@@ -549,11 +397,9 @@ class ContextBuilder {
|
|
|
549
397
|
}
|
|
550
398
|
}
|
|
551
399
|
for (const sym of expandedSymbols) {
|
|
552
|
-
// Title-case the symbol: "REST" → "Rest", "bulk" → "Bulk", "allocation" → "Allocation"
|
|
553
400
|
const titleCased = sym.charAt(0).toUpperCase() + sym.slice(1).toLowerCase();
|
|
554
401
|
if (titleCased === sym)
|
|
555
|
-
continue;
|
|
556
|
-
// Fetch more results since popular prefixes have many matches
|
|
402
|
+
continue;
|
|
557
403
|
const prefixResults = this.queries.searchNodes(titleCased, {
|
|
558
404
|
limit: 30,
|
|
559
405
|
kinds: definitionKinds,
|
|
@@ -561,9 +407,6 @@ class ContextBuilder {
|
|
|
561
407
|
const matched = [];
|
|
562
408
|
for (const r of prefixResults) {
|
|
563
409
|
if (r.node.name.toLowerCase().startsWith(titleCased.toLowerCase())) {
|
|
564
|
-
// Favor shorter names: "AllocationService" (18 chars) over
|
|
565
|
-
// "AllocationBalancingRoundMetrics" (31 chars). Core classes tend
|
|
566
|
-
// to have concise names; test/helper classes are verbose.
|
|
567
410
|
const brevityBonus = Math.max(0, 10 - (r.node.name.length - titleCased.length) / 3);
|
|
568
411
|
matched.push({ ...r, score: r.score + 15 + brevityBonus });
|
|
569
412
|
}
|
|
@@ -579,9 +422,6 @@ class ContextBuilder {
|
|
|
579
422
|
exactMatches.sort((a, b) => b.score - a.score);
|
|
580
423
|
exactMatches = exactMatches.slice(0, Math.ceil(opts.searchLimit * 3));
|
|
581
424
|
}
|
|
582
|
-
// Step 2c: Match an exact Han filename (with or without its extension).
|
|
583
|
-
// Keep this separate from natural-language terms so partial Chinese words
|
|
584
|
-
// do not become broad FTS queries.
|
|
585
425
|
const filenameQuery = query.trim();
|
|
586
426
|
const hasHanInFilename = Array.from(filenameQuery).some((char) => /\p{Script_Extensions=Han}/u.test(char));
|
|
587
427
|
const allowsFileNodes = options.nodeKinds === undefined
|
|
@@ -605,20 +445,19 @@ class ContextBuilder {
|
|
|
605
445
|
exactFileMatches.push({ node, score: 1 });
|
|
606
446
|
}
|
|
607
447
|
}
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
448
|
+
const allowsIncludes = options.nodeKinds === undefined
|
|
449
|
+
|| options.nodeKinds.length === 0
|
|
450
|
+
|| options.nodeKinds.includes('import');
|
|
451
|
+
const copybooks = allowsIncludes
|
|
452
|
+
? this.findCopybookEntries(query)
|
|
453
|
+
: { entries: [], members: new Set() };
|
|
612
454
|
let textResults = [];
|
|
613
455
|
try {
|
|
614
|
-
const searchTerms = (0, query_utils_1.extractSearchTerms)(query)
|
|
456
|
+
const searchTerms = (0, query_utils_1.extractSearchTerms)(query)
|
|
457
|
+
.filter((term) => !copybooks.members.has(term.toUpperCase()))
|
|
458
|
+
.slice(0, exports.MAX_QUERY_TERMS);
|
|
615
459
|
if (searchTerms.length > 0) {
|
|
616
|
-
// Search each term individually to get broader coverage,
|
|
617
|
-
// then boost results that match multiple terms
|
|
618
460
|
const termResultsMap = new Map();
|
|
619
|
-
// When no explicit kind filter is set, exclude imports — they flood FTS
|
|
620
|
-
// results with qualified name matches (e.g., "REST" matches 445K import paths)
|
|
621
|
-
// but are almost never what exploration queries want.
|
|
622
461
|
const searchKinds = opts.nodeKinds && opts.nodeKinds.length > 0
|
|
623
462
|
? opts.nodeKinds
|
|
624
463
|
: ['file', 'module', 'class', 'struct', 'union', 'interface', 'trait', 'protocol',
|
|
@@ -641,7 +480,6 @@ class ContextBuilder {
|
|
|
641
480
|
}
|
|
642
481
|
}
|
|
643
482
|
}
|
|
644
|
-
// Boost results matching multiple terms and sort
|
|
645
483
|
textResults = Array.from(termResultsMap.values())
|
|
646
484
|
.map(({ result, termHits }) => ({
|
|
647
485
|
...result,
|
|
@@ -655,12 +493,8 @@ class ContextBuilder {
|
|
|
655
493
|
catch (error) {
|
|
656
494
|
(0, errors_1.logDebug)('Text search failed', { query, error: String(error) });
|
|
657
495
|
}
|
|
658
|
-
// Step 4: Merge results, taking the max score when duplicates appear
|
|
659
|
-
// across search channels. Exact matches may have lower scores than FTS
|
|
660
|
-
// results for the same node — use the best score from any channel.
|
|
661
496
|
const resultById = new Map();
|
|
662
497
|
let searchResults = [];
|
|
663
|
-
// Add exact matches first
|
|
664
498
|
for (const result of exactMatches) {
|
|
665
499
|
const existing = resultById.get(result.node.id);
|
|
666
500
|
if (existing) {
|
|
@@ -671,7 +505,6 @@ class ContextBuilder {
|
|
|
671
505
|
searchResults.push(result);
|
|
672
506
|
}
|
|
673
507
|
}
|
|
674
|
-
// Add text search results, upgrading scores for duplicates
|
|
675
508
|
for (const result of textResults) {
|
|
676
509
|
const existing = resultById.get(result.node.id);
|
|
677
510
|
if (existing) {
|
|
@@ -684,7 +517,6 @@ class ContextBuilder {
|
|
|
684
517
|
}
|
|
685
518
|
const queryLower = query.toLowerCase();
|
|
686
519
|
const isTestQuery = queryLower.includes('test') || queryLower.includes('spec');
|
|
687
|
-
// Deprioritize test files early so they don't take multi-term boost slots
|
|
688
520
|
if (!isTestQuery) {
|
|
689
521
|
for (const result of searchResults) {
|
|
690
522
|
if ((0, query_utils_1.isTestFile)(result.node.filePath)) {
|
|
@@ -692,23 +524,9 @@ class ContextBuilder {
|
|
|
692
524
|
}
|
|
693
525
|
}
|
|
694
526
|
}
|
|
695
|
-
// Iter7 — Core-directory boost. On projects with one file that holds
|
|
696
|
-
// the dense majority of internal call edges (e.g. sinatra's
|
|
697
|
-
// `lib/sinatra/base.rb` at 85% of all in-file edges), the agent's
|
|
698
|
-
// task usually asks about the framework's core. Without this boost,
|
|
699
|
-
// ranking favors small focused extension files (e.g. text search
|
|
700
|
-
// picks `sinatra-contrib/lib/sinatra/multi_route.rb`'s 10-line
|
|
701
|
-
// `route` method over `base.rb`'s `route!` because the extension
|
|
702
|
-
// file's `route` matches the query verbatim AND the file is small,
|
|
703
|
-
// dwarfing the longer name `route!` in a 1500-line file). Boost
|
|
704
|
-
// results that share a directory prefix with the dominant file's
|
|
705
|
-
// directory so the core file's siblings outrank sibling-package
|
|
706
|
-
// extensions.
|
|
707
527
|
try {
|
|
708
528
|
const dominant = this.queries.getDominantFile?.();
|
|
709
529
|
if (dominant && dominant.edgeCount >= 3 * dominant.nextEdgeCount) {
|
|
710
|
-
// Take the directory of the dominant file (everything up to the
|
|
711
|
-
// last slash). For `lib/sinatra/base.rb` → `lib/sinatra/`.
|
|
712
530
|
const slash = dominant.filePath.lastIndexOf('/');
|
|
713
531
|
if (slash > 0) {
|
|
714
532
|
const coreDir = dominant.filePath.slice(0, slash + 1);
|
|
@@ -721,20 +539,9 @@ class ContextBuilder {
|
|
|
721
539
|
}
|
|
722
540
|
}
|
|
723
541
|
catch {
|
|
724
|
-
// SQL failure — fall through, scoring works without the boost
|
|
725
542
|
}
|
|
726
|
-
|
|
727
|
-
// For multi-word queries like "search execution from request to shard",
|
|
728
|
-
// nodes matching 2+ query terms in their name or path are far more relevant
|
|
729
|
-
// than nodes matching just one generic term. Without this, "ExecutionUtils"
|
|
730
|
-
// (matches only "execution") fills budget slots meant for "ShardSearchRequest"
|
|
731
|
-
// (matches "shard" + "search" + "request").
|
|
732
|
-
const queryTermsForBoost = (0, query_utils_1.extractSearchTerms)(query);
|
|
543
|
+
const queryTermsForBoost = (0, query_utils_1.extractSearchTerms)(query).slice(0, exports.MAX_QUERY_TERMS);
|
|
733
544
|
if (queryTermsForBoost.length >= 2) {
|
|
734
|
-
// Group terms that are substrings of each other (stem variants of the same
|
|
735
|
-
// root word). "indexed", "indexe", "index" should count as ONE concept match,
|
|
736
|
-
// not three. Without this, stem variants inflate matchCount and give false
|
|
737
|
-
// multi-term boosts to symbols matching one root word multiple times.
|
|
738
545
|
const termGroups = [];
|
|
739
546
|
const sorted = [...queryTermsForBoost].sort((a, b) => b.length - a.length);
|
|
740
547
|
const assigned = new Set();
|
|
@@ -753,26 +560,12 @@ class ContextBuilder {
|
|
|
753
560
|
}
|
|
754
561
|
termGroups.push(group);
|
|
755
562
|
}
|
|
756
|
-
// Build a set of exact-match node IDs so we can exempt them from dampening.
|
|
757
|
-
// When the query is "LiveEditMode DevServerPreview", these are specific
|
|
758
|
-
// symbols the user asked for — dampening them because they only match 1
|
|
759
|
-
// term group is counter-productive.
|
|
760
563
|
const exactMatchIds = new Set(exactMatches.map(r => r.node.id));
|
|
761
|
-
// ...but only exempt exact matches the user *named as an identifier*
|
|
762
|
-
// (camelCase/snake_case/acronym). A plain dictionary word that happens to
|
|
763
|
-
// exact-match an unrelated symbol — query "flat object" → a constant named
|
|
764
|
-
// FLAT — must NOT be exempt, or the +exact-name bonus floats it to the top
|
|
765
|
-
// of a prose query with zero corroboration from any other term. Classify by
|
|
766
|
-
// the QUERY token (what the user typed), not the matched symbol's name.
|
|
767
564
|
const distinctiveTokens = new Set(symbolsFromQuery.filter(query_utils_1.isDistinctiveIdentifier).map(s => s.toLowerCase()));
|
|
768
565
|
const distinctiveExactMatchIds = new Set(exactMatches
|
|
769
566
|
.filter(r => distinctiveTokens.has(r.node.name.toLowerCase()))
|
|
770
567
|
.map(r => r.node.id));
|
|
771
568
|
for (const result of searchResults) {
|
|
772
|
-
// Check term matches in name (substring) and path DIRECTORIES (exact).
|
|
773
|
-
// Directory segments must match exactly — "search" matches directory
|
|
774
|
-
// "search/" but NOT "elasticsearch/". The class name is checked
|
|
775
|
-
// separately via substring match on the node name.
|
|
776
569
|
const nameLower = result.node.name.toLowerCase();
|
|
777
570
|
const dirSegments = path.dirname(result.node.filePath).toLowerCase().split('/');
|
|
778
571
|
let matchCount = 0;
|
|
@@ -786,44 +579,35 @@ class ContextBuilder {
|
|
|
786
579
|
matchCount++;
|
|
787
580
|
}
|
|
788
581
|
if (matchCount >= 2) {
|
|
789
|
-
// Multiplicative boost — 2 terms → 2x, 3 terms → 2.5x
|
|
790
582
|
result.score *= 1 + matchCount * 0.5;
|
|
791
583
|
}
|
|
792
584
|
else if (distinctiveExactMatchIds.has(result.node.id)) {
|
|
793
|
-
// Exact match on a distinctive identifier the user explicitly named —
|
|
794
|
-
// keep full score (e.g. "LiveEditMode DevServerPreview").
|
|
795
585
|
}
|
|
796
586
|
else if (exactMatchIds.has(result.node.id)) {
|
|
797
|
-
// Exact match on a COMMON word (e.g. "flat" → FLAT): high-scoring noise
|
|
798
|
-
// inflated by the +exact-name bonus, corroborated by no other query
|
|
799
|
-
// term. Demote hard so corroborated matches win.
|
|
800
587
|
result.score *= 0.3;
|
|
801
588
|
}
|
|
802
589
|
else {
|
|
803
|
-
// Mild dampen for generic single-term matches — they might be generic
|
|
804
|
-
// but could also be the right result (e.g., "Protocol" class for an IPC query).
|
|
805
590
|
result.score *= 0.6;
|
|
806
591
|
}
|
|
807
592
|
}
|
|
808
593
|
searchResults.sort((a, b) => b.score - a.score);
|
|
809
594
|
}
|
|
810
|
-
// Step 5b: CamelCase-boundary matching via LIKE query.
|
|
811
|
-
// FTS can't find "Search" inside "TransportSearchAction" (one FTS token).
|
|
812
|
-
// LIKE reliably finds these substring matches. Results are appended with
|
|
813
|
-
// guaranteed slots so they don't compete with higher-scoring prefix matches.
|
|
814
595
|
if (symbolsFromQuery.length > 0) {
|
|
815
596
|
const camelDefinitionKinds = ['class', 'interface', 'struct', 'union', 'trait',
|
|
816
597
|
'protocol', 'enum', 'type_alias'];
|
|
817
|
-
// Callable kinds participate too: in service-layer codebases the
|
|
818
|
-
// camel-infix definers of a queried FIELD are methods/functions
|
|
819
|
-
// (`profileInfo` → `getProfileInfoV2`), not classes — the type-only
|
|
820
|
-
// whitelist made this whole step dead code there (#1196). Fetched as a
|
|
821
|
-
// SEPARATE LIKE batch so one hot single-word term can't crowd classes
|
|
822
|
-
// out of the length-ordered 200-row batch.
|
|
823
598
|
const camelCallableKinds = ['function', 'method', 'component'];
|
|
599
|
+
const isDeprioritized = this.deprioritizedPaths();
|
|
600
|
+
const pathScores = new Map();
|
|
601
|
+
const pathScoreOf = (filePath) => {
|
|
602
|
+
let score = pathScores.get(filePath);
|
|
603
|
+
if (score === undefined) {
|
|
604
|
+
score = (0, query_utils_1.scorePathRelevance)(filePath, query, undefined, isDeprioritized(filePath));
|
|
605
|
+
pathScores.set(filePath, score);
|
|
606
|
+
}
|
|
607
|
+
return score;
|
|
608
|
+
};
|
|
824
609
|
const camelSearchedTerms = new Set();
|
|
825
610
|
const searchIdSet = new Set(searchResults.map(r => r.node.id));
|
|
826
|
-
// Track per-node term hits for multi-term boosting
|
|
827
611
|
const camelNodeTerms = new Map();
|
|
828
612
|
const maxCamelPerTerm = Math.ceil(opts.searchLimit / 2);
|
|
829
613
|
for (const sym of symbolsFromQuery) {
|
|
@@ -834,10 +618,6 @@ class ContextBuilder {
|
|
|
834
618
|
if (camelSearchedTerms.has(termKey))
|
|
835
619
|
continue;
|
|
836
620
|
camelSearchedTerms.add(termKey);
|
|
837
|
-
// Fetch a large batch — popular terms like "Search" in Elasticsearch
|
|
838
|
-
// have hundreds of substring matches. The LIKE scan cost is the same
|
|
839
|
-
// regardless of LIMIT (SQLite scans all matches to sort), so we fetch
|
|
840
|
-
// generously and let path-relevance scoring pick the best ones.
|
|
841
621
|
const likeResults = [
|
|
842
622
|
...this.queries.findNodesByNameSubstring(titleCased, {
|
|
843
623
|
limit: 200,
|
|
@@ -850,38 +630,25 @@ class ContextBuilder {
|
|
|
850
630
|
excludePrefix: true,
|
|
851
631
|
}),
|
|
852
632
|
];
|
|
853
|
-
// Filter to CamelCase boundaries, score by path relevance, and take top N
|
|
854
633
|
const termCandidates = [];
|
|
855
634
|
for (const r of likeResults) {
|
|
856
635
|
const name = r.node.name;
|
|
857
|
-
// Case-INSENSITIVE hump lookup: title-casing lowercases interior
|
|
858
|
-
// humps (`profileInfo` → `Profileinfo`), which SQLite's LIKE still
|
|
859
|
-
// matched but a case-sensitive indexOf here silently dropped —
|
|
860
|
-
// making every multi-hump query term unfindable by this step
|
|
861
|
-
// (#1196). The match must still LAND on an uppercase char, so a
|
|
862
|
-
// plain lowercase infix can't slip through.
|
|
863
636
|
const idx = name.toLowerCase().indexOf(termKey);
|
|
864
637
|
if (idx <= 0)
|
|
865
638
|
continue;
|
|
866
639
|
if (!/[A-Z]/.test(name.charAt(idx)))
|
|
867
640
|
continue;
|
|
868
|
-
// Accept CamelCase boundary (lowercase before match) OR
|
|
869
|
-
// acronym boundary (uppercase before match, e.g., RPCProtocol)
|
|
870
641
|
if (!/[a-zA-Z]/.test(name.charAt(idx - 1)))
|
|
871
642
|
continue;
|
|
872
643
|
if (searchIdSet.has(r.node.id))
|
|
873
644
|
continue;
|
|
874
645
|
if ((0, query_utils_1.isTestFile)(r.node.filePath) && !isTestQuery)
|
|
875
646
|
continue;
|
|
876
|
-
const pathScore = (
|
|
647
|
+
const pathScore = pathScoreOf(r.node.filePath);
|
|
877
648
|
const brevityBonus = Math.max(0, 6 - (name.length - titleCased.length) / 4);
|
|
878
649
|
termCandidates.push({ node: r.node, score: 8 + brevityBonus + pathScore });
|
|
879
650
|
}
|
|
880
651
|
termCandidates.sort((a, b) => b.score - a.score);
|
|
881
|
-
// Widen the per-term pool for accumulation so multi-term co-occurrences
|
|
882
|
-
// can be discovered. A class matching 3 query terms at CamelCase boundaries
|
|
883
|
-
// is far more relevant than one matching just 1, but it needs to survive
|
|
884
|
-
// the per-term cut for EACH term to accumulate its count.
|
|
885
652
|
const accumPerTerm = maxCamelPerTerm * 4;
|
|
886
653
|
for (const r of termCandidates.slice(0, accumPerTerm)) {
|
|
887
654
|
const existing = camelNodeTerms.get(r.node.id);
|
|
@@ -896,15 +663,8 @@ class ContextBuilder {
|
|
|
896
663
|
}
|
|
897
664
|
}
|
|
898
665
|
}
|
|
899
|
-
// Append CamelCase matches with multi-term boost.
|
|
900
|
-
// These are structurally important (class names containing query terms at
|
|
901
|
-
// CamelCase boundaries) but score much lower than FTS results. Scale their
|
|
902
|
-
// scores up so multi-term CamelCase matches can compete with FTS results.
|
|
903
666
|
const camelResults = [];
|
|
904
667
|
for (const [, info] of camelNodeTerms) {
|
|
905
|
-
// Multi-term CamelCase matches are extremely relevant — a class matching
|
|
906
|
-
// 3+ query terms in its name (e.g., ExtensionHostProcess) is almost
|
|
907
|
-
// certainly what the user wants. Scale aggressively.
|
|
908
668
|
info.result.score = info.result.score * (1 + info.termCount) + (info.termCount - 1) * 30;
|
|
909
669
|
camelResults.push(info.result);
|
|
910
670
|
}
|
|
@@ -914,15 +674,7 @@ class ContextBuilder {
|
|
|
914
674
|
searchResults.push(r);
|
|
915
675
|
searchIdSet.add(r.node.id);
|
|
916
676
|
}
|
|
917
|
-
// Step 5c: Compound term matching — find classes whose name contains 2+
|
|
918
|
-
// query terms at ANY position (not just CamelCase boundaries).
|
|
919
|
-
// The CamelCase step above requires idx > 0, which misses classes that
|
|
920
|
-
// START with a query term (e.g., "SearchShardsRequest" starts with "Search").
|
|
921
|
-
// For multi-word queries, a class matching multiple query terms in its name
|
|
922
|
-
// is almost certainly relevant regardless of position.
|
|
923
677
|
if (symbolsFromQuery.length >= 2) {
|
|
924
|
-
// Collect ALL LIKE results per term (reusing findNodesByNameSubstring)
|
|
925
|
-
// but without the CamelCase boundary or prefix exclusion filters.
|
|
926
678
|
const compoundTermMap = new Map();
|
|
927
679
|
for (const sym of symbolsFromQuery) {
|
|
928
680
|
const titleCased = sym.charAt(0).toUpperCase() + sym.slice(1).toLowerCase();
|
|
@@ -934,7 +686,6 @@ class ContextBuilder {
|
|
|
934
686
|
kinds: camelDefinitionKinds,
|
|
935
687
|
excludePrefix: false,
|
|
936
688
|
}),
|
|
937
|
-
// Same separate callable batch as Step 5b (#1196).
|
|
938
689
|
...this.queries.findNodesByNameSubstring(titleCased, {
|
|
939
690
|
limit: 200,
|
|
940
691
|
kinds: camelCallableKinds,
|
|
@@ -955,11 +706,10 @@ class ContextBuilder {
|
|
|
955
706
|
}
|
|
956
707
|
}
|
|
957
708
|
}
|
|
958
|
-
// Keep only nodes matching 2+ distinct terms
|
|
959
709
|
const compoundResults = [];
|
|
960
710
|
for (const [, entry] of compoundTermMap) {
|
|
961
711
|
if (entry.terms.size >= 2) {
|
|
962
|
-
const pathScore = (
|
|
712
|
+
const pathScore = pathScoreOf(entry.node.filePath);
|
|
963
713
|
const brevityBonus = Math.max(0, 6 - entry.node.name.length / 8);
|
|
964
714
|
compoundResults.push({
|
|
965
715
|
node: entry.node,
|
|
@@ -975,19 +725,10 @@ class ContextBuilder {
|
|
|
975
725
|
}
|
|
976
726
|
}
|
|
977
727
|
}
|
|
978
|
-
// Final sort and truncation — all search channels (exact, text, CamelCase,
|
|
979
|
-
// compound) have now contributed. Sort by score so multi-term matches from
|
|
980
|
-
// later steps can outrank dampened single-term matches from earlier steps.
|
|
981
728
|
searchResults.sort((a, b) => b.score - a.score);
|
|
982
729
|
searchResults = searchResults.slice(0, opts.searchLimit * 3);
|
|
983
|
-
// Filter by minimum score
|
|
984
730
|
let filteredResults = searchResults.filter((r) => r.score >= opts.minScore);
|
|
985
|
-
// Resolve imports/exports to their actual definitions
|
|
986
|
-
// If someone searches "terminal" and finds `import { TerminalPanel }`,
|
|
987
|
-
// they want the TerminalPanel class, not the import statement
|
|
988
731
|
filteredResults = this.resolveImportsToDefinitions(filteredResults);
|
|
989
|
-
// An exact filename is the query's requested entry point. Keep it ahead of
|
|
990
|
-
// broader text matches before applying the entry-point cap.
|
|
991
732
|
if (exactFileMatches.length > 0) {
|
|
992
733
|
const exactFileIds = new Set(exactFileMatches.map((result) => result.node.id));
|
|
993
734
|
filteredResults = [
|
|
@@ -995,25 +736,30 @@ class ContextBuilder {
|
|
|
995
736
|
...filteredResults.filter((result) => !exactFileIds.has(result.node.id)),
|
|
996
737
|
];
|
|
997
738
|
}
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
739
|
+
const copybookIds = new Set(copybooks.entries.map((r) => r.node.id));
|
|
740
|
+
const leafEntryIds = new Set();
|
|
741
|
+
if (copybooks.entries.length > 0) {
|
|
742
|
+
const matchedElsewhere = new Set(filteredResults.map((r) => r.node.id));
|
|
743
|
+
const others = filteredResults.filter((r) => !copybookIds.has(r.node.id));
|
|
744
|
+
const otherFiles = new Set(others.map((r) => r.node.filePath));
|
|
745
|
+
const rank = (r) => !(0, cobol_copybooks_1.isCopybookInclude)(r.node) ? 0 : otherFiles.has(r.node.filePath) ? 1 : 2;
|
|
746
|
+
const ordered = [...copybooks.entries].sort((a, b) => rank(a) - rank(b));
|
|
747
|
+
const kept = others.length > 0 ? ordered.slice(0, Math.ceil(opts.searchLimit / 2)) : ordered;
|
|
748
|
+
for (const r of kept)
|
|
749
|
+
if (!matchedElsewhere.has(r.node.id))
|
|
750
|
+
leafEntryIds.add(r.node.id);
|
|
751
|
+
filteredResults = [...kept, ...others];
|
|
752
|
+
}
|
|
1001
753
|
if (filteredResults.length > opts.searchLimit) {
|
|
1002
754
|
filteredResults = filteredResults.slice(0, opts.searchLimit);
|
|
1003
755
|
}
|
|
1004
|
-
// Confidence signal for the honest-handoff footer (consumed in buildContext).
|
|
1005
|
-
// A multi-term prose query that resolves only to isolated common-word matches
|
|
1006
|
-
// — no entry point corroborated by 2+ distinct query terms, and none a
|
|
1007
|
-
// distinctive identifier the user explicitly named — is LOW confidence: the
|
|
1008
|
-
// results are best-effort, not a located answer, so the agent should be told
|
|
1009
|
-
// to drill in with explore/trace rather than trust the list as comprehensive.
|
|
1010
|
-
// Single-keyword and symbol-name queries are exempt (their single match IS the
|
|
1011
|
-
// answer), so the handoff never fires on them.
|
|
1012
756
|
let confidence = 'high';
|
|
1013
757
|
const confTerms = (0, query_utils_1.extractSearchTerms)(query, { stems: false }).filter(t => t.length >= 3);
|
|
1014
758
|
if (confTerms.length >= 2 && filteredResults.length > 0) {
|
|
1015
759
|
const distinctive = new Set(symbolsFromQuery.filter(query_utils_1.isDistinctiveIdentifier).map(s => s.toLowerCase()));
|
|
1016
760
|
const anyStrong = filteredResults.some(r => {
|
|
761
|
+
if (copybookIds.has(r.node.id))
|
|
762
|
+
return true;
|
|
1017
763
|
if (distinctive.has(r.node.name.toLowerCase()))
|
|
1018
764
|
return true;
|
|
1019
765
|
const nameLower = r.node.name.toLowerCase();
|
|
@@ -1030,16 +776,10 @@ class ContextBuilder {
|
|
|
1030
776
|
if (!anyStrong)
|
|
1031
777
|
confidence = 'low';
|
|
1032
778
|
}
|
|
1033
|
-
// Add entry points to subgraph
|
|
1034
779
|
for (const result of filteredResults) {
|
|
1035
780
|
nodes.set(result.node.id, result.node);
|
|
1036
781
|
roots.push(result.node.id);
|
|
1037
782
|
}
|
|
1038
|
-
// Expand type hierarchy for class/interface entry points.
|
|
1039
|
-
// BFS often exhausts its per-entry-point budget on contained methods
|
|
1040
|
-
// before reaching extends/implements neighbors. This dedicated step
|
|
1041
|
-
// ensures subclasses and superclasses always appear in results.
|
|
1042
|
-
// Budget: up to maxNodes/4 hierarchy nodes to avoid flooding.
|
|
1043
783
|
const typeHierarchyKinds = new Set(['class', 'interface', 'struct', 'union', 'trait', 'protocol']);
|
|
1044
784
|
const maxHierarchyNodes = Math.ceil(opts.maxNodes / 4);
|
|
1045
785
|
let hierarchyNodesAdded = 0;
|
|
@@ -1049,12 +789,14 @@ class ContextBuilder {
|
|
|
1049
789
|
if (typeHierarchyKinds.has(result.node.kind)) {
|
|
1050
790
|
const hierarchy = this.traverser.getTypeHierarchy(result.node.id);
|
|
1051
791
|
for (const [id, node] of hierarchy.nodes) {
|
|
1052
|
-
if (!nodes.has(id)) {
|
|
792
|
+
if (!nodes.has(id) && hierarchyNodesAdded < maxHierarchyNodes) {
|
|
1053
793
|
nodes.set(id, node);
|
|
1054
794
|
hierarchyNodesAdded++;
|
|
1055
795
|
}
|
|
1056
796
|
}
|
|
1057
797
|
for (const edge of hierarchy.edges) {
|
|
798
|
+
if (!nodes.has(edge.source) || !nodes.has(edge.target))
|
|
799
|
+
continue;
|
|
1058
800
|
const exists = edges.some((e) => e.source === edge.source && e.target === edge.target && e.kind === edge.kind);
|
|
1059
801
|
if (!exists) {
|
|
1060
802
|
edges.push(edge);
|
|
@@ -1062,8 +804,6 @@ class ContextBuilder {
|
|
|
1062
804
|
}
|
|
1063
805
|
}
|
|
1064
806
|
}
|
|
1065
|
-
// Pass 2: expand hierarchy of newly-discovered parent types to find siblings.
|
|
1066
|
-
// E.g., InternalEngine → Engine (parent, from pass 1) → ReadOnlyEngine (sibling).
|
|
1067
807
|
if (hierarchyNodesAdded > 0) {
|
|
1068
808
|
const pass2Candidates = [...nodes.values()].filter(n => typeHierarchyKinds.has(n.kind) && !roots.includes(n.id));
|
|
1069
809
|
for (const candidate of pass2Candidates) {
|
|
@@ -1086,8 +826,9 @@ class ContextBuilder {
|
|
|
1086
826
|
}
|
|
1087
827
|
}
|
|
1088
828
|
}
|
|
1089
|
-
// Traverse from each entry point
|
|
1090
829
|
for (const result of filteredResults) {
|
|
830
|
+
if (leafEntryIds.has(result.node.id))
|
|
831
|
+
continue;
|
|
1091
832
|
const traversalResult = this.traverser.traverseBFS(result.node.id, {
|
|
1092
833
|
maxDepth: opts.traversalDepth,
|
|
1093
834
|
edgeKinds: opts.edgeKinds && opts.edgeKinds.length > 0 ? opts.edgeKinds : undefined,
|
|
@@ -1095,13 +836,11 @@ class ContextBuilder {
|
|
|
1095
836
|
direction: 'both',
|
|
1096
837
|
limit: Math.ceil(opts.maxNodes / Math.max(1, filteredResults.length)),
|
|
1097
838
|
});
|
|
1098
|
-
// Merge nodes
|
|
1099
839
|
for (const [id, node] of traversalResult.nodes) {
|
|
1100
840
|
if (!nodes.has(id)) {
|
|
1101
841
|
nodes.set(id, node);
|
|
1102
842
|
}
|
|
1103
843
|
}
|
|
1104
|
-
// Merge edges (avoid duplicates)
|
|
1105
844
|
for (const edge of traversalResult.edges) {
|
|
1106
845
|
const exists = edges.some((e) => e.source === edge.source && e.target === edge.target && e.kind === edge.kind);
|
|
1107
846
|
if (!exists) {
|
|
@@ -1109,11 +848,9 @@ class ContextBuilder {
|
|
|
1109
848
|
}
|
|
1110
849
|
}
|
|
1111
850
|
}
|
|
1112
|
-
// Trim to max nodes if needed
|
|
1113
851
|
let finalNodes = nodes;
|
|
1114
852
|
let finalEdges = edges;
|
|
1115
853
|
if (nodes.size > opts.maxNodes) {
|
|
1116
|
-
// Prioritize entry points and their direct neighbors
|
|
1117
854
|
const priorityIds = new Set(roots);
|
|
1118
855
|
for (const edge of edges) {
|
|
1119
856
|
if (priorityIds.has(edge.source)) {
|
|
@@ -1123,7 +860,6 @@ class ContextBuilder {
|
|
|
1123
860
|
priorityIds.add(edge.source);
|
|
1124
861
|
}
|
|
1125
862
|
}
|
|
1126
|
-
// Keep priority nodes, then fill remaining slots
|
|
1127
863
|
finalNodes = new Map();
|
|
1128
864
|
for (const id of priorityIds) {
|
|
1129
865
|
const node = nodes.get(id);
|
|
@@ -1131,7 +867,6 @@ class ContextBuilder {
|
|
|
1131
867
|
finalNodes.set(id, node);
|
|
1132
868
|
}
|
|
1133
869
|
}
|
|
1134
|
-
// Fill remaining from other nodes
|
|
1135
870
|
for (const [id, node] of nodes) {
|
|
1136
871
|
if (finalNodes.size >= opts.maxNodes)
|
|
1137
872
|
break;
|
|
@@ -1139,14 +874,8 @@ class ContextBuilder {
|
|
|
1139
874
|
finalNodes.set(id, node);
|
|
1140
875
|
}
|
|
1141
876
|
}
|
|
1142
|
-
// Filter edges to only include kept nodes
|
|
1143
877
|
finalEdges = edges.filter((e) => finalNodes.has(e.source) && finalNodes.has(e.target));
|
|
1144
878
|
}
|
|
1145
|
-
// Per-file diversity cap: prevent any single file from monopolizing the
|
|
1146
|
-
// node budget. When BFS traverses from a method, it follows `contains`
|
|
1147
|
-
// to the parent class, then back down to all sibling methods. With
|
|
1148
|
-
// multiple entry points in the same class, one file can consume 30-40%
|
|
1149
|
-
// of maxNodes. Cap each file to ~20% to ensure cross-file diversity.
|
|
1150
879
|
const maxPerFile = Math.max(5, Math.ceil(opts.maxNodes * 0.2));
|
|
1151
880
|
const fileCounts = new Map();
|
|
1152
881
|
for (const [id, node] of finalNodes) {
|
|
@@ -1158,7 +887,6 @@ class ContextBuilder {
|
|
|
1158
887
|
for (const [, nodeIds] of fileCounts) {
|
|
1159
888
|
if (nodeIds.length <= maxPerFile)
|
|
1160
889
|
continue;
|
|
1161
|
-
// Sort: entry points first, then classes/interfaces, then others
|
|
1162
890
|
const kindPriority = {
|
|
1163
891
|
class: 3, interface: 3, struct: 3, trait: 3, protocol: 3, enum: 3,
|
|
1164
892
|
method: 1, function: 1, property: 0, field: 0, variable: 0,
|
|
@@ -1170,16 +898,10 @@ class ContextBuilder {
|
|
|
1170
898
|
const bKind = kindPriority[finalNodes.get(b).kind] ?? 0;
|
|
1171
899
|
return (bRoot + bKind) - (aRoot + aKind);
|
|
1172
900
|
});
|
|
1173
|
-
// Remove excess nodes (keep the highest-priority ones)
|
|
1174
901
|
for (const id of nodeIds.slice(maxPerFile)) {
|
|
1175
902
|
finalNodes.delete(id);
|
|
1176
903
|
}
|
|
1177
904
|
}
|
|
1178
|
-
// Non-production node cap: limit test/sample/integration/example files to
|
|
1179
|
-
// at most 15% of the budget. Many codebases have dozens of near-identical
|
|
1180
|
-
// test implementations (e.g., 6 Guard classes in integration tests) that
|
|
1181
|
-
// individually survive score dampening but collectively flood the result.
|
|
1182
|
-
// Test entry points are NOT exempt — they should be evicted too.
|
|
1183
905
|
if (!isTestQuery) {
|
|
1184
906
|
const maxNonProd = Math.max(3, Math.ceil(opts.maxNodes * 0.15));
|
|
1185
907
|
const nonProdIds = [];
|
|
@@ -1191,17 +913,13 @@ class ContextBuilder {
|
|
|
1191
913
|
if (nonProdIds.length > maxNonProd) {
|
|
1192
914
|
for (const id of nonProdIds.slice(maxNonProd)) {
|
|
1193
915
|
finalNodes.delete(id);
|
|
1194
|
-
// Also remove from roots — test file entry points shouldn't anchor results
|
|
1195
916
|
const rootIdx = roots.indexOf(id);
|
|
1196
917
|
if (rootIdx !== -1)
|
|
1197
918
|
roots.splice(rootIdx, 1);
|
|
1198
919
|
}
|
|
1199
920
|
}
|
|
1200
921
|
}
|
|
1201
|
-
// Re-filter edges after per-file and non-production caps
|
|
1202
922
|
finalEdges = finalEdges.filter((e) => finalNodes.has(e.source) && finalNodes.has(e.target));
|
|
1203
|
-
// Edge recovery: BFS with many entry points leaves most nodes disconnected.
|
|
1204
|
-
// Discover edges between already-selected nodes to recover connectivity.
|
|
1205
923
|
const recoveryKinds = ['calls', 'extends', 'implements', 'references', 'overrides', 'navigates'];
|
|
1206
924
|
const recoveredEdges = this.queries.findEdgesBetweenNodes([...finalNodes.keys()], recoveryKinds);
|
|
1207
925
|
const existingEdgeKeys = new Set(finalEdges.map((e) => `${e.source}:${e.target}:${e.kind}`));
|
|
@@ -1214,14 +932,37 @@ class ContextBuilder {
|
|
|
1214
932
|
}
|
|
1215
933
|
return { nodes: finalNodes, edges: finalEdges, roots, confidence };
|
|
1216
934
|
}
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
935
|
+
findCopybookEntries(query) {
|
|
936
|
+
const named = (0, cobol_copybooks_1.findNamedCopybooks)(this.queries, query);
|
|
937
|
+
const members = new Set(named.map((c) => c.member.toUpperCase()));
|
|
938
|
+
const entries = [];
|
|
939
|
+
const seen = new Set();
|
|
940
|
+
const add = (node) => {
|
|
941
|
+
if (seen.has(node.id))
|
|
942
|
+
return;
|
|
943
|
+
seen.add(node.id);
|
|
944
|
+
entries.push({ node, score: 1 });
|
|
945
|
+
};
|
|
946
|
+
for (const copybook of named) {
|
|
947
|
+
for (const file of copybook.files) {
|
|
948
|
+
const declarationIds = this.queries.getOutgoingEdges(file.id, ['contains']).map((e) => e.target);
|
|
949
|
+
[...this.queries.getNodesByIds(declarationIds).values()]
|
|
950
|
+
.filter((n) => n.kind !== 'import' && n.kind !== 'export')
|
|
951
|
+
.sort((a, b) => a.startLine - b.startLine || a.id.localeCompare(b.id))
|
|
952
|
+
.slice(0, MAX_COPYBOOK_DECLARATION_ENTRIES)
|
|
953
|
+
.forEach(add);
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
const longest = Math.max(0, ...named.map((c) => c.includes.length));
|
|
957
|
+
for (let i = 0; i < longest; i++) {
|
|
958
|
+
for (const copybook of named) {
|
|
959
|
+
const include = copybook.includes[i];
|
|
960
|
+
if (include)
|
|
961
|
+
add(include);
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
return { entries, members };
|
|
965
|
+
}
|
|
1225
966
|
async getCode(nodeId) {
|
|
1226
967
|
const node = this.queries.getNodeById(nodeId);
|
|
1227
968
|
if (!node) {
|
|
@@ -1229,14 +970,7 @@ class ContextBuilder {
|
|
|
1229
970
|
}
|
|
1230
971
|
return this.extractNodeCode(node);
|
|
1231
972
|
}
|
|
1232
|
-
/**
|
|
1233
|
-
* Extract code from a node's source file
|
|
1234
|
-
*/
|
|
1235
973
|
async extractNodeCode(node) {
|
|
1236
|
-
// SECURITY (#383): a config-leaf node's on-disk line is `key = <secret>`.
|
|
1237
|
-
// Return the KEY only — never read the value off disk. This closes the
|
|
1238
|
-
// includeCode / buildContext code-block path, mirroring the explore source
|
|
1239
|
-
// renderer; an agent that genuinely needs a value can read the file itself.
|
|
1240
974
|
if ((0, utils_1.isConfigLeafNode)(node)) {
|
|
1241
975
|
return node.signature || node.qualifiedName || node.name;
|
|
1242
976
|
}
|
|
@@ -1247,7 +981,6 @@ class ContextBuilder {
|
|
|
1247
981
|
try {
|
|
1248
982
|
const content = fs.readFileSync(filePath, 'utf-8');
|
|
1249
983
|
const lines = content.split('\n');
|
|
1250
|
-
// Extract lines (1-indexed to 0-indexed)
|
|
1251
984
|
const startIdx = Math.max(0, node.startLine - 1);
|
|
1252
985
|
const endIdx = Math.min(lines.length, node.endLine);
|
|
1253
986
|
return lines.slice(startIdx, endIdx).join('\n');
|
|
@@ -1257,29 +990,20 @@ class ContextBuilder {
|
|
|
1257
990
|
return null;
|
|
1258
991
|
}
|
|
1259
992
|
}
|
|
1260
|
-
/**
|
|
1261
|
-
* Get entry points from a subgraph (the root nodes)
|
|
1262
|
-
*/
|
|
1263
993
|
getEntryPoints(subgraph) {
|
|
1264
994
|
return subgraph.roots
|
|
1265
995
|
.map((id) => subgraph.nodes.get(id))
|
|
1266
996
|
.filter((n) => n !== undefined);
|
|
1267
997
|
}
|
|
1268
|
-
/**
|
|
1269
|
-
* Extract code blocks for key nodes in the subgraph
|
|
1270
|
-
*/
|
|
1271
998
|
async extractCodeBlocks(subgraph, maxBlocks, maxBlockSize) {
|
|
1272
999
|
const blocks = [];
|
|
1273
|
-
// Prioritize entry points, then functions/methods
|
|
1274
1000
|
const priorityNodes = [];
|
|
1275
|
-
// First: entry points
|
|
1276
1001
|
for (const id of subgraph.roots) {
|
|
1277
1002
|
const node = subgraph.nodes.get(id);
|
|
1278
1003
|
if (node) {
|
|
1279
1004
|
priorityNodes.push(node);
|
|
1280
1005
|
}
|
|
1281
1006
|
}
|
|
1282
|
-
// Then: functions and methods
|
|
1283
1007
|
for (const node of subgraph.nodes.values()) {
|
|
1284
1008
|
if (!subgraph.roots.includes(node.id)) {
|
|
1285
1009
|
if (node.kind === 'function' || node.kind === 'method') {
|
|
@@ -1287,7 +1011,6 @@ class ContextBuilder {
|
|
|
1287
1011
|
}
|
|
1288
1012
|
}
|
|
1289
1013
|
}
|
|
1290
|
-
// Then: classes
|
|
1291
1014
|
for (const node of subgraph.nodes.values()) {
|
|
1292
1015
|
if (!subgraph.roots.includes(node.id)) {
|
|
1293
1016
|
if (node.kind === 'class') {
|
|
@@ -1295,15 +1018,11 @@ class ContextBuilder {
|
|
|
1295
1018
|
}
|
|
1296
1019
|
}
|
|
1297
1020
|
}
|
|
1298
|
-
// Extract code for priority nodes
|
|
1299
1021
|
for (const node of priorityNodes) {
|
|
1300
1022
|
if (blocks.length >= maxBlocks)
|
|
1301
1023
|
break;
|
|
1302
1024
|
const code = await this.extractNodeCode(node);
|
|
1303
1025
|
if (code) {
|
|
1304
|
-
// Truncate if too long. Language-neutral marker (no `//` — not a
|
|
1305
|
-
// comment in Python, Ruby, etc.); this renders inside a fenced
|
|
1306
|
-
// source block whose language varies.
|
|
1307
1026
|
const truncated = code.length > maxBlockSize
|
|
1308
1027
|
? code.slice(0, maxBlockSize) + '\n... (truncated) ...'
|
|
1309
1028
|
: code;
|
|
@@ -1319,9 +1038,6 @@ class ContextBuilder {
|
|
|
1319
1038
|
}
|
|
1320
1039
|
return blocks;
|
|
1321
1040
|
}
|
|
1322
|
-
/**
|
|
1323
|
-
* Get unique files from a subgraph
|
|
1324
|
-
*/
|
|
1325
1041
|
getRelatedFiles(subgraph) {
|
|
1326
1042
|
const files = new Set();
|
|
1327
1043
|
for (const node of subgraph.nodes.values()) {
|
|
@@ -1329,9 +1045,6 @@ class ContextBuilder {
|
|
|
1329
1045
|
}
|
|
1330
1046
|
return Array.from(files).sort();
|
|
1331
1047
|
}
|
|
1332
|
-
/**
|
|
1333
|
-
* Generate a summary of the context
|
|
1334
|
-
*/
|
|
1335
1048
|
generateSummary(_query, subgraph, entryPoints) {
|
|
1336
1049
|
const nodeCount = subgraph.nodes.size;
|
|
1337
1050
|
const edgeCount = subgraph.edges.length;
|
|
@@ -1345,22 +1058,11 @@ class ContextBuilder {
|
|
|
1345
1058
|
`Key entry points: ${entryPointNames}${remaining}. ` +
|
|
1346
1059
|
`${edgeCount} relationships identified.`;
|
|
1347
1060
|
}
|
|
1348
|
-
/**
|
|
1349
|
-
* Resolve import/export nodes to their actual definitions
|
|
1350
|
-
*
|
|
1351
|
-
* When search returns `import { TerminalPanel }`, users want the TerminalPanel
|
|
1352
|
-
* class definition, not the import statement. This follows the `imports` edge
|
|
1353
|
-
* to find and return the actual definition instead.
|
|
1354
|
-
*
|
|
1355
|
-
* @param results - Search results that may include import/export nodes
|
|
1356
|
-
* @returns Results with imports resolved to definitions where possible
|
|
1357
|
-
*/
|
|
1358
1061
|
resolveImportsToDefinitions(results) {
|
|
1359
1062
|
const resolved = [];
|
|
1360
1063
|
const seenIds = new Set();
|
|
1361
1064
|
for (const result of results) {
|
|
1362
1065
|
const { node, score } = result;
|
|
1363
|
-
// If it's not an import/export, keep it as-is
|
|
1364
1066
|
if (node.kind !== 'import' && node.kind !== 'export') {
|
|
1365
1067
|
if (!seenIds.has(node.id)) {
|
|
1366
1068
|
seenIds.add(node.id);
|
|
@@ -1368,20 +1070,16 @@ class ContextBuilder {
|
|
|
1368
1070
|
}
|
|
1369
1071
|
continue;
|
|
1370
1072
|
}
|
|
1371
|
-
// For imports/exports, try to find what they reference
|
|
1372
|
-
// Imports have outgoing 'imports' edges to the definition
|
|
1373
|
-
// Exports have outgoing 'exports' edges to the definition
|
|
1374
1073
|
const edgeKind = node.kind === 'import' ? 'imports' : 'exports';
|
|
1375
1074
|
const outgoingEdges = this.queries.getOutgoingEdges(node.id, [edgeKind]);
|
|
1376
1075
|
let foundDefinition = false;
|
|
1377
1076
|
for (const edge of outgoingEdges) {
|
|
1378
1077
|
const targetNode = this.queries.getNodeById(edge.target);
|
|
1379
1078
|
if (targetNode && !seenIds.has(targetNode.id)) {
|
|
1380
|
-
// Found the definition - use it instead of the import
|
|
1381
1079
|
seenIds.add(targetNode.id);
|
|
1382
1080
|
resolved.push({
|
|
1383
1081
|
node: targetNode,
|
|
1384
|
-
score: score,
|
|
1082
|
+
score: score,
|
|
1385
1083
|
});
|
|
1386
1084
|
foundDefinition = true;
|
|
1387
1085
|
(0, errors_1.logDebug)('Resolved import to definition', {
|
|
@@ -1391,7 +1089,6 @@ class ContextBuilder {
|
|
|
1391
1089
|
});
|
|
1392
1090
|
}
|
|
1393
1091
|
}
|
|
1394
|
-
// If we couldn't resolve the import, skip it (it's low-value on its own)
|
|
1395
1092
|
if (!foundDefinition) {
|
|
1396
1093
|
(0, errors_1.logDebug)('Skipping unresolved import', { name: node.name, file: node.filePath });
|
|
1397
1094
|
}
|
|
@@ -1400,13 +1097,9 @@ class ContextBuilder {
|
|
|
1400
1097
|
}
|
|
1401
1098
|
}
|
|
1402
1099
|
exports.ContextBuilder = ContextBuilder;
|
|
1403
|
-
/**
|
|
1404
|
-
* Create a context builder
|
|
1405
|
-
*/
|
|
1406
1100
|
function createContextBuilder(projectRoot, queries, traverser) {
|
|
1407
1101
|
return new ContextBuilder(projectRoot, queries, traverser);
|
|
1408
1102
|
}
|
|
1409
|
-
// Re-export formatter
|
|
1410
1103
|
var formatter_2 = require("./formatter");
|
|
1411
1104
|
Object.defineProperty(exports, "formatContextAsMarkdown", { enumerable: true, get: function () { return formatter_2.formatContextAsMarkdown; } });
|
|
1412
1105
|
Object.defineProperty(exports, "formatContextAsJson", { enumerable: true, get: function () { return formatter_2.formatContextAsJson; } });
|