@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
package/lib/dist/db/index.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Database Layer
|
|
4
|
-
*
|
|
5
|
-
* Handles SQLite database initialization and connection management.
|
|
6
|
-
*/
|
|
7
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
3
|
if (k2 === undefined) k2 = k;
|
|
9
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -38,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
38
33
|
};
|
|
39
34
|
})();
|
|
40
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.DATABASE_FILENAME = exports.DatabaseConnection = exports.WAL_HEAL_THRESHOLD_BYTES = void 0;
|
|
36
|
+
exports.DATABASE_FILENAME = exports.DatabaseConnection = exports.WAL_HEAL_THRESHOLD_BYTES = exports.NodeSqliteUnavailableError = exports.DatabaseOpenError = void 0;
|
|
42
37
|
exports.resolveWalHealBytes = resolveWalHealBytes;
|
|
43
38
|
exports.getDatabasePath = getDatabasePath;
|
|
44
39
|
exports.removeDatabaseFiles = removeDatabaseFiles;
|
|
@@ -47,50 +42,36 @@ const fs = __importStar(require("fs"));
|
|
|
47
42
|
const path = __importStar(require("path"));
|
|
48
43
|
const migrations_1 = require("./migrations");
|
|
49
44
|
const directory_1 = require("../directory");
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
* time, the later pragmas — and the connection's first query — then wait out
|
|
57
|
-
* the lock instead of throwing "database is locked" immediately. See issue #238.
|
|
58
|
-
*
|
|
59
|
-
* The 5s window (was 120s) rides out a normal incremental sync; the old
|
|
60
|
-
* 2-minute wait presented as a frozen, hung agent. With WAL, reads never block
|
|
61
|
-
* on a writer, so this timeout only governs cross-process write contention
|
|
62
|
-
* (e.g. the git-hook `codegraph sync` running while the MCP server writes).
|
|
63
|
-
*/
|
|
45
|
+
const open_error_1 = require("./open-error");
|
|
46
|
+
var open_error_2 = require("./open-error");
|
|
47
|
+
Object.defineProperty(exports, "DatabaseOpenError", { enumerable: true, get: function () { return open_error_2.DatabaseOpenError; } });
|
|
48
|
+
var node_sqlite_1 = require("./node-sqlite");
|
|
49
|
+
Object.defineProperty(exports, "NodeSqliteUnavailableError", { enumerable: true, get: function () { return node_sqlite_1.NodeSqliteUnavailableError; } });
|
|
50
|
+
const MMAP_SIZE_BYTES = 268435456;
|
|
64
51
|
function configureConnection(db, readOnly = false) {
|
|
65
|
-
db.pragma('busy_timeout = 5000');
|
|
52
|
+
db.pragma('busy_timeout = 5000');
|
|
66
53
|
db.pragma('foreign_keys = ON');
|
|
67
54
|
if (!readOnly)
|
|
68
|
-
db.pragma('journal_mode = WAL');
|
|
69
|
-
db.pragma('synchronous = NORMAL');
|
|
70
|
-
db.pragma('cache_size = -64000');
|
|
71
|
-
db.pragma('temp_store = MEMORY');
|
|
72
|
-
db.pragma(
|
|
73
|
-
// Without a journal_size_limit the -wal file never shrinks below its
|
|
74
|
-
// high-water mark while a connection lives: checkpoints fold frames back but
|
|
75
|
-
// leave the file at full size, so one giant deferred-sync WAL stays giant
|
|
76
|
-
// forever. With the limit set, any checkpoint that resets the WAL truncates
|
|
77
|
-
// the file back down. Killed-process leftovers are handled separately by
|
|
78
|
-
// healOversizedWal() at open. (#1431)
|
|
55
|
+
db.pragma('journal_mode = WAL');
|
|
56
|
+
db.pragma('synchronous = NORMAL');
|
|
57
|
+
db.pragma('cache_size = -64000');
|
|
58
|
+
db.pragma('temp_store = MEMORY');
|
|
59
|
+
db.pragma(`mmap_size = ${MMAP_SIZE_BYTES}`);
|
|
79
60
|
db.pragma(`journal_size_limit = ${exports.WAL_HEAL_THRESHOLD_BYTES}`);
|
|
80
61
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
62
|
+
function withOpenFailures(db, dbPath, finish) {
|
|
63
|
+
try {
|
|
64
|
+
return finish();
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
try {
|
|
68
|
+
db.close();
|
|
69
|
+
}
|
|
70
|
+
catch { }
|
|
71
|
+
throw (0, open_error_1.toDatabaseOpenError)(err, dbPath);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
92
74
|
exports.WAL_HEAL_THRESHOLD_BYTES = resolveWalHealBytes(process.env.CODEGRAPH_WAL_HEAL_MB);
|
|
93
|
-
/** Resolve the heal threshold from the env override (MB); invalid ⇒ 64 MB. */
|
|
94
75
|
function resolveWalHealBytes(envVal) {
|
|
95
76
|
if (envVal !== undefined && envVal !== '') {
|
|
96
77
|
const n = Number(envVal);
|
|
@@ -99,27 +80,12 @@ function resolveWalHealBytes(envVal) {
|
|
|
99
80
|
}
|
|
100
81
|
return 64 * 1024 * 1024;
|
|
101
82
|
}
|
|
102
|
-
/**
|
|
103
|
-
* Database connection wrapper with lifecycle management
|
|
104
|
-
*/
|
|
105
83
|
class DatabaseConnection {
|
|
106
84
|
readOnly;
|
|
107
85
|
db;
|
|
108
86
|
dbPath;
|
|
109
87
|
backend;
|
|
110
|
-
/**
|
|
111
|
-
* `dev:ino` of the DB file at the moment we opened it (or null when the
|
|
112
|
-
* platform/filesystem reports no usable inode). Lets us notice when the file
|
|
113
|
-
* we hold open has been unlinked and REPLACED by a new file at the same path
|
|
114
|
-
* — a git worktree removed and re-added, or `.codegraph/` deleted and
|
|
115
|
-
* re-`init`ed under a long-lived server — at which point our fd reads a now
|
|
116
|
-
* dead inode forever (#925). See `isReplacedOnDisk`.
|
|
117
|
-
*/
|
|
118
88
|
openedInode;
|
|
119
|
-
/**
|
|
120
|
-
* Whether FTS5 is available in this Node.js build. When false, search
|
|
121
|
-
* falls back to LIKE + fuzzy matching (#1532).
|
|
122
|
-
*/
|
|
123
89
|
fts5Available;
|
|
124
90
|
constructor(db, dbPath, backend, fts5Available, readOnly = false) {
|
|
125
91
|
this.readOnly = readOnly;
|
|
@@ -129,20 +95,16 @@ class DatabaseConnection {
|
|
|
129
95
|
this.fts5Available = fts5Available;
|
|
130
96
|
this.openedInode = (0, directory_1.statInode)(dbPath);
|
|
131
97
|
}
|
|
132
|
-
/**
|
|
133
|
-
* Initialize a new database at the given path
|
|
134
|
-
*/
|
|
135
98
|
static initialize(dbPath) {
|
|
136
|
-
// Ensure parent directory exists
|
|
137
99
|
const dir = path.dirname(dbPath);
|
|
138
100
|
if (!fs.existsSync(dir)) {
|
|
139
101
|
fs.mkdirSync(dir, { recursive: true });
|
|
140
102
|
}
|
|
141
|
-
// Create and configure database
|
|
142
103
|
const { db, backend } = (0, sqlite_adapter_1.createDatabase)(dbPath);
|
|
104
|
+
return withOpenFailures(db, dbPath, () => DatabaseConnection.initializeOn(db, backend, dbPath));
|
|
105
|
+
}
|
|
106
|
+
static initializeOn(db, backend, dbPath) {
|
|
143
107
|
configureConnection(db);
|
|
144
|
-
// Run schema initialization, splitting FTS5 from the rest so
|
|
145
|
-
// codegraph still works when Node.js was built without FTS5 (#1532).
|
|
146
108
|
const schemaPath = path.join(__dirname, 'schema.sql');
|
|
147
109
|
const schema = fs.readFileSync(schemaPath, 'utf-8');
|
|
148
110
|
const FTS5_MARKER = '-- Full-text search index on node names, docstrings, and signatures';
|
|
@@ -150,14 +112,10 @@ class DatabaseConnection {
|
|
|
150
112
|
let fts5Available = true;
|
|
151
113
|
if (ftsIdx >= 0) {
|
|
152
114
|
const preFts = schema.slice(0, ftsIdx);
|
|
153
|
-
// FTS ends after the update trigger; required tables and indexes follow
|
|
154
|
-
// it in schema.sql and must still be created when FTS5 is unavailable.
|
|
155
115
|
const ftsSection = schema.slice(ftsIdx).match(/^[\s\S]*?CREATE TRIGGER IF NOT EXISTS nodes_au\b[\s\S]*?END;/)?.[0];
|
|
156
116
|
if (!ftsSection)
|
|
157
117
|
throw new Error('schema.sql: FTS5 update trigger not found');
|
|
158
|
-
// Execute everything before FTS5 first
|
|
159
118
|
db.exec(preFts);
|
|
160
|
-
// Try FTS5; if it fails, skip it and continue with LIKE-only search
|
|
161
119
|
try {
|
|
162
120
|
db.exec(ftsSection);
|
|
163
121
|
}
|
|
@@ -173,23 +131,21 @@ class DatabaseConnection {
|
|
|
173
131
|
else {
|
|
174
132
|
db.exec(schema);
|
|
175
133
|
}
|
|
176
|
-
// Record current schema version so migrations aren't re-applied on open
|
|
177
134
|
const currentVersion = (0, migrations_1.getCurrentVersion)(db);
|
|
178
135
|
if (currentVersion < migrations_1.CURRENT_SCHEMA_VERSION) {
|
|
179
136
|
db.prepare('INSERT OR IGNORE INTO schema_versions (version, applied_at, description) VALUES (?, ?, ?)').run(migrations_1.CURRENT_SCHEMA_VERSION, Date.now(), 'Initial schema includes all migrations');
|
|
180
137
|
}
|
|
181
138
|
return new DatabaseConnection(db, dbPath, backend, fts5Available);
|
|
182
139
|
}
|
|
183
|
-
/**
|
|
184
|
-
* Open an existing database
|
|
185
|
-
*/
|
|
186
140
|
static open(dbPath, options = {}) {
|
|
187
141
|
if (!fs.existsSync(dbPath)) {
|
|
188
142
|
throw new Error(`Database not found: ${dbPath}`);
|
|
189
143
|
}
|
|
190
144
|
const { db, backend } = (0, sqlite_adapter_1.createDatabase)(dbPath, options);
|
|
145
|
+
return withOpenFailures(db, dbPath, () => DatabaseConnection.openOn(db, backend, dbPath, options));
|
|
146
|
+
}
|
|
147
|
+
static openOn(db, backend, dbPath, options) {
|
|
191
148
|
configureConnection(db, options.readOnly);
|
|
192
|
-
// Detect FTS5 availability for search fallback (#1532)
|
|
193
149
|
let fts5Available = true;
|
|
194
150
|
try {
|
|
195
151
|
db.exec("SELECT * FROM nodes_fts LIMIT 0");
|
|
@@ -197,39 +153,22 @@ class DatabaseConnection {
|
|
|
197
153
|
catch {
|
|
198
154
|
fts5Available = false;
|
|
199
155
|
}
|
|
200
|
-
// Check and run migrations if needed
|
|
201
156
|
const conn = new DatabaseConnection(db, dbPath, backend, fts5Available, options.readOnly);
|
|
202
|
-
// A concurrent reader must leave migrations, bulk-load repair, and WAL
|
|
203
|
-
// maintenance to the writer, including when versions differ (#1963).
|
|
204
157
|
if (options.readOnly)
|
|
205
158
|
return conn;
|
|
206
159
|
const currentVersion = (0, migrations_1.getCurrentVersion)(db);
|
|
207
160
|
if (currentVersion < migrations_1.CURRENT_SCHEMA_VERSION) {
|
|
208
161
|
(0, migrations_1.runMigrations)(db, currentVersion);
|
|
209
162
|
}
|
|
210
|
-
// Self-heal a bulk-load window that never closed (crash between
|
|
211
|
-
// beginBulkNodeLoad and endBulkNodeLoad): the FTS triggers are missing and
|
|
212
|
-
// nodes_fts is stale. Rebuild + recreate so search stays in sync.
|
|
213
163
|
conn.healBulkNodeLoad();
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
164
|
+
if (options.deferIndexRecovery)
|
|
165
|
+
conn.deferredIndexDdls = conn.missingBulkSecondaryIndexDdls();
|
|
166
|
+
else
|
|
167
|
+
conn.healBulkSecondaryIndexes();
|
|
217
168
|
void conn.healOversizedWal();
|
|
218
169
|
return conn;
|
|
219
170
|
}
|
|
220
|
-
/**
|
|
221
|
-
* FTS maintenance triggers dropped/recreated around a bulk load.
|
|
222
|
-
* Names must match schema.sql.
|
|
223
|
-
*/
|
|
224
171
|
static FTS_TRIGGER_NAMES = ['nodes_ai', 'nodes_ad', 'nodes_au'];
|
|
225
|
-
/**
|
|
226
|
-
* Enter bulk-load mode: drop the per-row FTS sync triggers so mass node
|
|
227
|
-
* inserts skip per-row tokenization. MUST be paired with endBulkNodeLoad()
|
|
228
|
-
* (use try/finally); a crash inside the window is healed on the next open().
|
|
229
|
-
* The window is DB-wide (triggers are schema objects), which is safe because
|
|
230
|
-
* endBulkNodeLoad() rebuilds nodes_fts from the nodes table wholesale — any
|
|
231
|
-
* row written by anyone during the window is captured by the rebuild.
|
|
232
|
-
*/
|
|
233
172
|
beginBulkNodeLoad() {
|
|
234
173
|
if (!this.fts5Available)
|
|
235
174
|
return;
|
|
@@ -237,31 +176,12 @@ class DatabaseConnection {
|
|
|
237
176
|
this.db.exec(`DROP TRIGGER IF EXISTS ${t}`);
|
|
238
177
|
}
|
|
239
178
|
}
|
|
240
|
-
/**
|
|
241
|
-
* Leave bulk-load mode: rebuild the whole FTS index from the nodes table in
|
|
242
|
-
* one pass (far cheaper than per-row trigger firings), then recreate the
|
|
243
|
-
* triggers by re-running schema.sql (idempotent — everything in it is
|
|
244
|
-
* IF NOT EXISTS).
|
|
245
|
-
*/
|
|
246
179
|
endBulkNodeLoad() {
|
|
247
180
|
if (!this.fts5Available)
|
|
248
181
|
return;
|
|
249
182
|
this.db.exec(`INSERT INTO nodes_fts(nodes_fts) VALUES('rebuild')`);
|
|
250
183
|
this.recreateFtsTriggers();
|
|
251
184
|
}
|
|
252
|
-
/**
|
|
253
|
-
* NON-UNIQUE secondary indexes maintained per-row during the parse phase's
|
|
254
|
-
* bulk inserts — the store-architecture arc's first lever (plan §4d: dubbo's
|
|
255
|
-
* parse-loop wall is 94% store-writer busy, and the #1320 post-mortem showed
|
|
256
|
-
* statement batching and sorted inserts are ~zero on this path because
|
|
257
|
-
* B-TREE MAINTENANCE is the floor). A fresh init writes every row of
|
|
258
|
-
* nodes/unresolved_refs/files exactly once and reads none of them until
|
|
259
|
-
* resolution, so the parse window can drop all of these and rebuild each in
|
|
260
|
-
* one table scan afterwards — the same measured trade as the resolution
|
|
261
|
-
* phase's edge-index window (2.8s → 1.1s inserting, ~0.3s recreating).
|
|
262
|
-
* Primary keys and UNIQUE constraints stay (upserts and OR-IGNORE dedup
|
|
263
|
-
* conflict on them).
|
|
264
|
-
*/
|
|
265
185
|
static BULK_PARSE_INDEX_NAMES = [
|
|
266
186
|
'idx_nodes_kind',
|
|
267
187
|
'idx_nodes_name',
|
|
@@ -279,32 +199,12 @@ class DatabaseConnection {
|
|
|
279
199
|
'idx_files_language',
|
|
280
200
|
'idx_files_modified_at',
|
|
281
201
|
];
|
|
282
|
-
/**
|
|
283
|
-
* Enter bulk-parse-load mode (FRESH-INIT ONLY — the caller gates on a fresh
|
|
284
|
-
* DB, because an incremental index deletes per-file rows mid-phase and needs
|
|
285
|
-
* the file_path indexes): drop every parse-lane secondary index, including
|
|
286
|
-
* the four non-unique edge indexes (parse inserts contains-edges too; the
|
|
287
|
-
* UNIQUE identity index stays for INSERT OR IGNORE dedup, and its `source`
|
|
288
|
-
* prefix keeps source-keyed reads indexed, as in the edge window). MUST be
|
|
289
|
-
* paired with endBulkParseLoad(); a crash inside the window is healed on the
|
|
290
|
-
* next DatabaseConnection open (schema.sql re-applies CREATE INDEX IF NOT
|
|
291
|
-
* EXISTS).
|
|
292
|
-
*/
|
|
293
202
|
beginBulkParseLoad() {
|
|
294
203
|
for (const idx of DatabaseConnection.BULK_PARSE_INDEX_NAMES) {
|
|
295
204
|
this.db.exec(`DROP INDEX IF EXISTS ${idx}`);
|
|
296
205
|
}
|
|
297
206
|
this.beginBulkEdgeLoad();
|
|
298
207
|
}
|
|
299
|
-
/**
|
|
300
|
-
* Leave bulk-parse-load mode: recreate everything the window dropped, one
|
|
301
|
-
* table scan per index, with a yield between statements (same
|
|
302
|
-
* liveness-watchdog rationale as endBulkEdgeLoad — at kernel scale each
|
|
303
|
-
* build is a long synchronous scan). The edge indexes are rebuilt here too,
|
|
304
|
-
* so paths that never enter the resolution phase's own bulk-edge window
|
|
305
|
-
* (small runs) are left with a complete schema; the batched resolver's
|
|
306
|
-
* beginBulkEdgeLoad simply re-drops them (DROP IF EXISTS — idempotent).
|
|
307
|
-
*/
|
|
308
208
|
async endBulkParseLoad() {
|
|
309
209
|
const schemaPath = path.join(__dirname, 'schema.sql');
|
|
310
210
|
const schema = fs.readFileSync(schemaPath, 'utf-8');
|
|
@@ -317,18 +217,6 @@ class DatabaseConnection {
|
|
|
317
217
|
}
|
|
318
218
|
await this.endBulkEdgeLoad();
|
|
319
219
|
}
|
|
320
|
-
/**
|
|
321
|
-
* unresolved_refs secondary indexes NOT read by the batched resolution
|
|
322
|
-
* loop. The loop pages pending refs by keyset (`status='pending' AND id>?`
|
|
323
|
-
* — the status index + PK), deletes resolved rows by id, and parks failures
|
|
324
|
-
* with a status UPDATE; every other ref index serves SYNC-time paths
|
|
325
|
-
* (per-file re-index deletes, name-keyed retry, failed-tail heal). Each
|
|
326
|
-
* per-batch DELETE maintains all of them — the biggest single main-thread
|
|
327
|
-
* stage on the dubbo profile (deletes 1.2s of a 5.4s resolution phase) —
|
|
328
|
-
* so the batched loop drops them and rebuilds at the end, where the table
|
|
329
|
-
* holds only the surviving FAILED refs (resolved rows are gone), making
|
|
330
|
-
* the recreate near-free.
|
|
331
|
-
*/
|
|
332
220
|
static BULK_REF_INDEX_NAMES = [
|
|
333
221
|
'idx_unresolved_from_node',
|
|
334
222
|
'idx_unresolved_name',
|
|
@@ -336,18 +224,11 @@ class DatabaseConnection {
|
|
|
336
224
|
'idx_unresolved_from_name',
|
|
337
225
|
'idx_unresolved_failed_tail',
|
|
338
226
|
];
|
|
339
|
-
/**
|
|
340
|
-
* Enter bulk-ref mode for the batched resolution loop — see
|
|
341
|
-
* BULK_REF_INDEX_NAMES. MUST be paired with endBulkRefLoad(); a crash
|
|
342
|
-
* inside the window heals on the next open (schema.sql re-applies
|
|
343
|
-
* CREATE INDEX IF NOT EXISTS).
|
|
344
|
-
*/
|
|
345
227
|
beginBulkRefLoad() {
|
|
346
228
|
for (const idx of DatabaseConnection.BULK_REF_INDEX_NAMES) {
|
|
347
229
|
this.db.exec(`DROP INDEX IF EXISTS ${idx}`);
|
|
348
230
|
}
|
|
349
231
|
}
|
|
350
|
-
/** Leave bulk-ref mode: recreate each index in one scan (yield between). */
|
|
351
232
|
async endBulkRefLoad() {
|
|
352
233
|
const schemaPath = path.join(__dirname, 'schema.sql');
|
|
353
234
|
const schema = fs.readFileSync(schemaPath, 'utf-8');
|
|
@@ -359,15 +240,6 @@ class DatabaseConnection {
|
|
|
359
240
|
await new Promise((resolve) => setImmediate(resolve));
|
|
360
241
|
}
|
|
361
242
|
}
|
|
362
|
-
/**
|
|
363
|
-
* Names of the NON-UNIQUE edge indexes dropped for a bulk edge load.
|
|
364
|
-
* idx_edges_identity deliberately stays: INSERT OR IGNORE's dedup conflicts
|
|
365
|
-
* on it (#1034), and its leftmost column is `source`, so the source-keyed
|
|
366
|
-
* reads resolution makes mid-window (supertype walks over
|
|
367
|
-
* `implements`/`extends`) keep an index via its prefix — verified with
|
|
368
|
-
* EXPLAIN QUERY PLAN. Target-keyed and kind-keyed reads (traversal,
|
|
369
|
-
* synthesis) happen only after endBulkEdgeLoad().
|
|
370
|
-
*/
|
|
371
243
|
static BULK_EDGE_INDEX_NAMES = [
|
|
372
244
|
'idx_edges_kind',
|
|
373
245
|
'idx_edges_source_kind',
|
|
@@ -375,32 +247,11 @@ class DatabaseConnection {
|
|
|
375
247
|
'idx_edges_provenance',
|
|
376
248
|
'idx_edges_synthesis_site',
|
|
377
249
|
];
|
|
378
|
-
/**
|
|
379
|
-
* Enter bulk-edge-load mode: drop the non-unique edge indexes so the mass
|
|
380
|
-
* INSERT OR IGNORE stream pays one B-tree (the identity index) instead of
|
|
381
|
-
* five — measured 2.8s → 1.1s inserting a 224k-edge resolution set, with
|
|
382
|
-
* recreation costing ~0.3s. MUST be paired with endBulkEdgeLoad(); a crash
|
|
383
|
-
* inside the window is healed on the next DatabaseConnection open (schema.sql
|
|
384
|
-
* re-applies CREATE INDEX IF NOT EXISTS).
|
|
385
|
-
*/
|
|
386
250
|
beginBulkEdgeLoad() {
|
|
387
251
|
for (const idx of DatabaseConnection.BULK_EDGE_INDEX_NAMES) {
|
|
388
252
|
this.db.exec(`DROP INDEX IF EXISTS ${idx}`);
|
|
389
253
|
}
|
|
390
254
|
}
|
|
391
|
-
/**
|
|
392
|
-
* Leave bulk-edge-load mode: recreate the dropped indexes in one pass each
|
|
393
|
-
* over the (now fully loaded) edges table — far cheaper than maintaining
|
|
394
|
-
* them per-insert. DDL is extracted from schema.sql so it cannot drift.
|
|
395
|
-
*
|
|
396
|
-
* Async with a yield BETWEEN the four CREATE INDEX statements: each build is
|
|
397
|
-
* a synchronous scan of the whole edges table (~20s apiece at Linux-kernel
|
|
398
|
-
* scale, 79s total measured), and running them back-to-back is a single
|
|
399
|
-
* event-loop stall longer than the #850 liveness watchdog's 60s window — a
|
|
400
|
-
* daemon-triggered re-index would be SIGKILLed right after doing the work.
|
|
401
|
-
* One yield per statement keeps every stall to a single index build, which
|
|
402
|
-
* stays inside the window.
|
|
403
|
-
*/
|
|
404
255
|
async endBulkEdgeLoad(options = {}) {
|
|
405
256
|
const schemaPath = path.join(__dirname, 'schema.sql');
|
|
406
257
|
const schema = fs.readFileSync(schemaPath, 'utf-8');
|
|
@@ -414,13 +265,6 @@ class DatabaseConnection {
|
|
|
414
265
|
await new Promise((resolve) => setImmediate(resolve));
|
|
415
266
|
}
|
|
416
267
|
}
|
|
417
|
-
/**
|
|
418
|
-
* The sync-only synthesis-site index (#1988), which endBulkEdgeLoad can
|
|
419
|
-
* leave for later. Its partial predicate runs json_valid over the metadata of
|
|
420
|
-
* every edge — ~1.5M rows, several seconds on vscode — while nothing before
|
|
421
|
-
* the end of an index reads it, so the resolver builds it while the pool is
|
|
422
|
-
* busy with synthesis rather than on the critical path. Idempotent.
|
|
423
|
-
*/
|
|
424
268
|
createSynthesisSiteIndex() {
|
|
425
269
|
const schema = fs.readFileSync(path.join(__dirname, 'schema.sql'), 'utf-8');
|
|
426
270
|
const m = schema.match(new RegExp(`CREATE INDEX IF NOT EXISTS ${DatabaseConnection.SYNTHESIS_SITE_INDEX}\\b[^;]*;`));
|
|
@@ -429,7 +273,6 @@ class DatabaseConnection {
|
|
|
429
273
|
this.db.exec(m[0]);
|
|
430
274
|
}
|
|
431
275
|
static SYNTHESIS_SITE_INDEX = 'idx_edges_synthesis_site';
|
|
432
|
-
/** Recreate the FTS triggers + rebuild if a bulk-load window never closed. */
|
|
433
276
|
healBulkNodeLoad() {
|
|
434
277
|
if (!this.fts5Available)
|
|
435
278
|
return;
|
|
@@ -440,8 +283,11 @@ class DatabaseConnection {
|
|
|
440
283
|
return;
|
|
441
284
|
this.endBulkNodeLoad();
|
|
442
285
|
}
|
|
443
|
-
/** Recreate every secondary index a killed bulk parse/ref/edge window may leave dropped. */
|
|
444
286
|
healBulkSecondaryIndexes() {
|
|
287
|
+
for (const ddl of this.missingBulkSecondaryIndexDdls())
|
|
288
|
+
this.db.exec(ddl);
|
|
289
|
+
}
|
|
290
|
+
missingBulkSecondaryIndexDdls() {
|
|
445
291
|
const names = [...new Set([
|
|
446
292
|
...DatabaseConnection.BULK_PARSE_INDEX_NAMES,
|
|
447
293
|
...DatabaseConnection.BULK_REF_INDEX_NAMES,
|
|
@@ -452,22 +298,87 @@ class DatabaseConnection {
|
|
|
452
298
|
.prepare(`SELECT count(*) AS c FROM sqlite_master WHERE type = 'index' AND name IN (${placeholders})`)
|
|
453
299
|
.get(...names);
|
|
454
300
|
if ((row?.c ?? 0) >= names.length)
|
|
455
|
-
return;
|
|
301
|
+
return [];
|
|
456
302
|
const schemaPath = path.join(__dirname, 'schema.sql');
|
|
457
303
|
const schema = fs.readFileSync(schemaPath, 'utf-8');
|
|
458
|
-
|
|
304
|
+
return names.map((idx) => {
|
|
459
305
|
const m = schema.match(new RegExp(`CREATE INDEX IF NOT EXISTS ${idx}\\b[^;]*;`));
|
|
460
306
|
if (!m)
|
|
461
307
|
throw new Error(`schema.sql: index ${idx} not found for crash recovery`);
|
|
462
|
-
|
|
308
|
+
return m[0];
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
deferredIndexDdls = [];
|
|
312
|
+
indexRecovery = null;
|
|
313
|
+
hasDeferredIndexRecovery() {
|
|
314
|
+
return this.deferredIndexDdls.length > 0;
|
|
315
|
+
}
|
|
316
|
+
recoverIndexesOffThread() {
|
|
317
|
+
if (this.deferredIndexDdls.length === 0)
|
|
318
|
+
return Promise.resolve();
|
|
319
|
+
this.indexRecovery ??= this.runRecoveryOffThread(this.deferredIndexDdls)
|
|
320
|
+
.then(() => { this.deferredIndexDdls = []; })
|
|
321
|
+
.finally(() => { this.indexRecovery = null; });
|
|
322
|
+
return this.indexRecovery;
|
|
323
|
+
}
|
|
324
|
+
async runRecoveryOffThread(statements) {
|
|
325
|
+
let WorkerCtor;
|
|
326
|
+
try {
|
|
327
|
+
WorkerCtor = (await Promise.resolve().then(() => __importStar(require('node:worker_threads')))).Worker;
|
|
463
328
|
}
|
|
329
|
+
catch {
|
|
330
|
+
for (const ddl of statements)
|
|
331
|
+
this.db.exec(ddl);
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
const workerSource = `
|
|
335
|
+
const { workerData, parentPort } = require('node:worker_threads');
|
|
336
|
+
let error = null;
|
|
337
|
+
try {
|
|
338
|
+
const { DatabaseSync } = require('node:sqlite');
|
|
339
|
+
const db = new DatabaseSync(workerData.dbPath);
|
|
340
|
+
try {
|
|
341
|
+
db.exec('PRAGMA busy_timeout = 30000');
|
|
342
|
+
for (const sql of workerData.statements) db.exec(sql);
|
|
343
|
+
} finally {
|
|
344
|
+
db.close();
|
|
345
|
+
}
|
|
346
|
+
} catch (e) {
|
|
347
|
+
error = String((e && e.message) || e);
|
|
348
|
+
}
|
|
349
|
+
try {
|
|
350
|
+
const v8 = require('v8');
|
|
351
|
+
v8.setFlagsFromString('--expose-gc');
|
|
352
|
+
const gc = require('vm').runInNewContext('gc');
|
|
353
|
+
v8.setFlagsFromString('--no-expose-gc');
|
|
354
|
+
gc();
|
|
355
|
+
} catch {}
|
|
356
|
+
parentPort.postMessage({ error });
|
|
357
|
+
`;
|
|
358
|
+
await new Promise((resolve, reject) => {
|
|
359
|
+
let settled = false;
|
|
360
|
+
const worker = new WorkerCtor(workerSource, { eval: true, workerData: { dbPath: this.dbPath, statements } });
|
|
361
|
+
worker.once('message', (message) => {
|
|
362
|
+
settled = true;
|
|
363
|
+
if (message.error)
|
|
364
|
+
reject(new Error(`Could not restore the indexes of ${this.dbPath}: ${message.error}`));
|
|
365
|
+
else
|
|
366
|
+
resolve();
|
|
367
|
+
});
|
|
368
|
+
worker.once('error', (err) => {
|
|
369
|
+
if (settled)
|
|
370
|
+
return;
|
|
371
|
+
settled = true;
|
|
372
|
+
reject(err);
|
|
373
|
+
});
|
|
374
|
+
worker.once('exit', (code) => {
|
|
375
|
+
if (settled)
|
|
376
|
+
return;
|
|
377
|
+
settled = true;
|
|
378
|
+
reject(new Error(`Restoring the indexes of ${this.dbPath} stopped early (worker exit ${code}).`));
|
|
379
|
+
});
|
|
380
|
+
});
|
|
464
381
|
}
|
|
465
|
-
/**
|
|
466
|
-
* Recreate the FTS sync triggers from schema.sql — extracted from the file
|
|
467
|
-
* rather than duplicated here so the DDL cannot drift from the schema.
|
|
468
|
-
* (Re-execing the whole schema is not an option: it contains data INSERTs
|
|
469
|
-
* that are not idempotent, e.g. schema_versions.)
|
|
470
|
-
*/
|
|
471
382
|
recreateFtsTriggers() {
|
|
472
383
|
const schemaPath = path.join(__dirname, 'schema.sql');
|
|
473
384
|
const schema = fs.readFileSync(schemaPath, 'utf-8');
|
|
@@ -479,36 +390,15 @@ class DatabaseConnection {
|
|
|
479
390
|
this.db.exec(ddl);
|
|
480
391
|
}
|
|
481
392
|
}
|
|
482
|
-
/**
|
|
483
|
-
* Get the underlying database instance
|
|
484
|
-
*/
|
|
485
393
|
getDb() {
|
|
486
394
|
return this.db;
|
|
487
395
|
}
|
|
488
|
-
/**
|
|
489
|
-
* Get the SQLite backend serving this connection. Per-instance so
|
|
490
|
-
* MCP cross-project queries report the right backend even when
|
|
491
|
-
* multiple project DBs are open in the same process.
|
|
492
|
-
*/
|
|
493
396
|
getBackend() {
|
|
494
397
|
return this.backend;
|
|
495
398
|
}
|
|
496
|
-
/**
|
|
497
|
-
* Get database file path
|
|
498
|
-
*/
|
|
499
399
|
getPath() {
|
|
500
400
|
return this.dbPath;
|
|
501
401
|
}
|
|
502
|
-
/**
|
|
503
|
-
* The journal mode actually in effect (e.g. 'wal', 'delete').
|
|
504
|
-
*
|
|
505
|
-
* SQLite silently keeps the prior mode if WAL can't be enabled — e.g. on
|
|
506
|
-
* filesystems without shared-memory support (some network/virtualized mounts,
|
|
507
|
-
* WSL2 /mnt). So the effective mode can differ
|
|
508
|
-
* from what `configureConnection` requested. Surfaced in `codegraph status` so
|
|
509
|
-
* a "database is locked" report is triageable: 'wal' ⇒ readers never block on a
|
|
510
|
-
* writer; anything else ⇒ they can. See issue #238.
|
|
511
|
-
*/
|
|
512
402
|
getJournalMode() {
|
|
513
403
|
const raw = this.db.pragma('journal_mode');
|
|
514
404
|
const row = Array.isArray(raw) ? raw[0] : raw;
|
|
@@ -517,9 +407,6 @@ class DatabaseConnection {
|
|
|
517
407
|
: row;
|
|
518
408
|
return String(mode ?? '').toLowerCase();
|
|
519
409
|
}
|
|
520
|
-
/**
|
|
521
|
-
* Get current schema version
|
|
522
|
-
*/
|
|
523
410
|
getSchemaVersion() {
|
|
524
411
|
const row = this.db
|
|
525
412
|
.prepare('SELECT version, applied_at, description FROM schema_versions ORDER BY version DESC LIMIT 1')
|
|
@@ -532,23 +419,13 @@ class DatabaseConnection {
|
|
|
532
419
|
description: row.description ?? undefined,
|
|
533
420
|
};
|
|
534
421
|
}
|
|
535
|
-
/**
|
|
536
|
-
* Execute a function within a transaction
|
|
537
|
-
*/
|
|
538
422
|
transaction(fn) {
|
|
539
423
|
return this.db.transaction(fn)();
|
|
540
424
|
}
|
|
541
|
-
/**
|
|
542
|
-
* Get database file size in bytes
|
|
543
|
-
*/
|
|
544
425
|
getSize() {
|
|
545
426
|
const stats = fs.statSync(this.dbPath);
|
|
546
427
|
return stats.size;
|
|
547
428
|
}
|
|
548
|
-
/**
|
|
549
|
-
* Size of the `-wal` sidecar file in bytes. 0 when it doesn't exist (non-WAL
|
|
550
|
-
* journal mode, in-memory DB, or no write since the last checkpoint+reset).
|
|
551
|
-
*/
|
|
552
429
|
getWalSizeBytes() {
|
|
553
430
|
if (!this.dbPath || this.dbPath === ':memory:')
|
|
554
431
|
return 0;
|
|
@@ -559,8 +436,6 @@ class DatabaseConnection {
|
|
|
559
436
|
return 0;
|
|
560
437
|
}
|
|
561
438
|
}
|
|
562
|
-
/** Size of the main DB file in bytes (0 for in-memory/unknown) — the WAL
|
|
563
|
-
* valve scales its fold caps with it (resolveWalValveMb). */
|
|
564
439
|
getDbFileSizeBytes() {
|
|
565
440
|
if (!this.dbPath || this.dbPath === ':memory:')
|
|
566
441
|
return 0;
|
|
@@ -571,89 +446,30 @@ class DatabaseConnection {
|
|
|
571
446
|
return 0;
|
|
572
447
|
}
|
|
573
448
|
}
|
|
574
|
-
/** Current `wal_autocheckpoint` interval in pages (0 = disabled). */
|
|
575
449
|
getWalAutocheckpoint() {
|
|
576
450
|
const v = this.db.pragma('wal_autocheckpoint', { simple: true });
|
|
577
451
|
const n = Number(v);
|
|
578
452
|
return Number.isFinite(n) ? n : 0;
|
|
579
453
|
}
|
|
580
|
-
/**
|
|
581
|
-
* Set the connection's `wal_autocheckpoint` interval (pages; 0 disables).
|
|
582
|
-
* Bulk indexing defers checkpoints entirely (#1231): the default 1000-page
|
|
583
|
-
* auto-checkpoint re-writes hot B-tree/FTS pages into the main DB file over
|
|
584
|
-
* and over — measured at ~95% of ALL disk I/O during a bulk index, and the
|
|
585
|
-
* difference between 45s and 19+ minutes on HDD-class storage. During
|
|
586
|
-
* deferral a {@link WalCheckpointValve} bounds WAL growth off-thread.
|
|
587
|
-
*/
|
|
588
454
|
setWalAutocheckpoint(pages) {
|
|
589
455
|
this.db.pragma(`wal_autocheckpoint = ${Math.max(0, Math.floor(pages))}`);
|
|
590
456
|
}
|
|
591
|
-
/**
|
|
592
|
-
* `PRAGMA wal_checkpoint(PASSIVE)` on a worker thread with its own
|
|
593
|
-
* connection. PASSIVE never blocks the writer, and running it off-thread
|
|
594
|
-
* means the main thread — and the #850 watchdog heartbeat — keep turning
|
|
595
|
-
* even when the backfill is minutes of I/O on slow storage (a synchronous
|
|
596
|
-
* checkpoint that exceeds the watchdog's 60s window gets a healthy index
|
|
597
|
-
* SIGKILLed — observed in the #1231 repro).
|
|
598
|
-
*
|
|
599
|
-
* Returns SQLite's checkpoint result row — `log === checkpointed` with
|
|
600
|
-
* `busy === 0` means the ENTIRE WAL was backfilled, so the writer's next
|
|
601
|
-
* commit restarts the WAL from the top and the file stops growing. The
|
|
602
|
-
* WAL valve needs that signal because a WAL file's SIZE never shrinks:
|
|
603
|
-
* after the first wrap, raw file size says nothing about the un-backfilled
|
|
604
|
-
* backlog. Best-effort: returns null on any failure (including worker
|
|
605
|
-
* threads being unavailable — a potentially minutes-long checkpoint must
|
|
606
|
-
* never run inline on the main thread).
|
|
607
|
-
*/
|
|
608
457
|
async checkpointWalPassive() {
|
|
609
458
|
return this.checkpointWal('PASSIVE');
|
|
610
459
|
}
|
|
611
|
-
/**
|
|
612
|
-
* `PRAGMA wal_checkpoint(TRUNCATE)` — same off-thread pattern as PASSIVE,
|
|
613
|
-
* but on success the WAL FILE is chopped to zero. A completed passive
|
|
614
|
-
* backfill bounds the un-checkpointed backlog, yet the FILE only stops
|
|
615
|
-
* growing when a commit finds ZERO readers holding WAL marks — rare while
|
|
616
|
-
* pool workers cycle, so at kernel scale a fully-backfilled WAL still
|
|
617
|
-
* accreted the phase's whole write volume on disk (§7a.1: 22GB). The valve
|
|
618
|
-
* calls this exactly at a parked barrier (writer parked, pool drained,
|
|
619
|
-
* backfill complete) where the no-reader condition is guaranteed rather
|
|
620
|
-
* than lucky. The worker sets a short busy_timeout so a racing reader
|
|
621
|
-
* degrades this to a no-op (busy=1) instead of a stall.
|
|
622
|
-
*/
|
|
623
460
|
async checkpointWalTruncate() {
|
|
624
461
|
return this.checkpointWal('TRUNCATE');
|
|
625
462
|
}
|
|
626
|
-
/**
|
|
627
|
-
* Shrink a leftover oversized WAL (#1431). A SIGKILL'd session — the #850
|
|
628
|
-
* liveness watchdog, OOM, a crash — leaves its WAL on disk, the next session
|
|
629
|
-
* appends to the same file, and (pre-#1431) nothing ever truncated it:
|
|
630
|
-
* PASSIVE checkpoints fold frames but keep the file at its high-water mark,
|
|
631
|
-
* and the one shrinking path (a clean last-connection close) is exactly what
|
|
632
|
-
* the killed world never takes. Unbounded growth until the disk fills.
|
|
633
|
-
*
|
|
634
|
-
* Called fire-and-forget from every `open()`: cost is one statSync when the
|
|
635
|
-
* WAL is small (the overwhelmingly common case). Past the threshold it runs
|
|
636
|
-
* the off-thread PASSIVE fold then TRUNCATE — both on worker connections
|
|
637
|
-
* with a busy_timeout, so a racing writer degrades this to a no-op that the
|
|
638
|
-
* next open retries rather than a stall.
|
|
639
|
-
*/
|
|
640
463
|
async healOversizedWal() {
|
|
641
464
|
const beforeBytes = this.getWalSizeBytes();
|
|
642
465
|
if (beforeBytes <= exports.WAL_HEAL_THRESHOLD_BYTES) {
|
|
643
466
|
return { healed: false, beforeBytes, afterBytes: beforeBytes };
|
|
644
467
|
}
|
|
645
|
-
// Single-flight: open() fires this fire-and-forget and callers may also
|
|
646
|
-
// invoke it explicitly. Two concurrent passes DEFEAT each other — each
|
|
647
|
-
// checkpoint worker sees the other as a busy reader and no-ops — so share
|
|
648
|
-
// one in-flight pass instead of racing.
|
|
649
468
|
this.walHeal ??= this.runWalHeal(beforeBytes).finally(() => { this.walHeal = null; });
|
|
650
469
|
return this.walHeal;
|
|
651
470
|
}
|
|
652
471
|
walHeal = null;
|
|
653
472
|
async runWalHeal(beforeBytes) {
|
|
654
|
-
// A racing reader/writer (another session healing the same file, a query
|
|
655
|
-
// pool warming up) degrades a checkpoint pass to a busy no-op — retry a
|
|
656
|
-
// few times before leaving the rest to the next open.
|
|
657
473
|
for (let attempt = 0; attempt < 3; attempt++) {
|
|
658
474
|
if (attempt > 0)
|
|
659
475
|
await new Promise((r) => setTimeout(r, 300));
|
|
@@ -725,67 +541,24 @@ class DatabaseConnection {
|
|
|
725
541
|
return null;
|
|
726
542
|
}
|
|
727
543
|
}
|
|
728
|
-
/**
|
|
729
|
-
* Optimize database (vacuum and analyze)
|
|
730
|
-
*/
|
|
731
544
|
optimize() {
|
|
732
545
|
this.db.exec('VACUUM');
|
|
733
546
|
this.db.exec('ANALYZE');
|
|
734
547
|
}
|
|
735
|
-
/**
|
|
736
|
-
* Lightweight maintenance to run after bulk writes (indexAll, sync).
|
|
737
|
-
* Two operations:
|
|
738
|
-
*
|
|
739
|
-
* - `PRAGMA optimize` — incremental ANALYZE; SQLite only re-analyzes
|
|
740
|
-
* tables whose row counts changed materially since the last
|
|
741
|
-
* ANALYZE. Without it, the query planner has no statistics on the
|
|
742
|
-
* freshly-bulk-loaded tables and can pick suboptimal indexes.
|
|
743
|
-
*
|
|
744
|
-
* - `PRAGMA wal_checkpoint(PASSIVE)` — fold pending WAL pages back
|
|
745
|
-
* into the main database file so the WAL file doesn't grow
|
|
746
|
-
* unboundedly between automatic checkpoints (auto-fires at 1000
|
|
747
|
-
* pages by default; large indexAll runs blow past that).
|
|
748
|
-
*
|
|
749
|
-
* Runs on a WORKER THREAD with its own connection: on a multi-GB index
|
|
750
|
-
* these pragmas are minutes of synchronous IO (a 95k-file kernel index
|
|
751
|
-
* left a 593MB WAL whose checkpoint alone blew the #850 watchdog's 60s
|
|
752
|
-
* window and got a COMPLETED index SIGKILLed at the finish line). WAL
|
|
753
|
-
* checkpointing from a second connection is standard SQLite; `PRAGMA
|
|
754
|
-
* optimize` persists its statistics in sqlite_stat tables, so the main
|
|
755
|
-
* connection benefits the same. The main thread just awaits a message,
|
|
756
|
-
* so the event loop — and the watchdog heartbeat — keep turning.
|
|
757
|
-
*
|
|
758
|
-
* Everything is silently swallowed on failure — best-effort
|
|
759
|
-
* optimization, never load-bearing for correctness. If worker threads
|
|
760
|
-
* are unavailable, falls back to a bounded in-line `PRAGMA optimize`
|
|
761
|
-
* and SKIPS the checkpoint (the final close() checkpoints after the
|
|
762
|
-
* CLI has already disarmed its watchdog).
|
|
763
|
-
*/
|
|
764
548
|
async runMaintenance() {
|
|
765
|
-
// In-memory / test databases: nothing worth a worker round-trip.
|
|
766
549
|
if (!this.dbPath || this.dbPath === ':memory:') {
|
|
767
550
|
try {
|
|
768
551
|
this.db.exec('PRAGMA optimize');
|
|
769
552
|
}
|
|
770
|
-
catch {
|
|
553
|
+
catch { }
|
|
771
554
|
try {
|
|
772
555
|
this.db.exec('PRAGMA wal_checkpoint(PASSIVE)');
|
|
773
556
|
}
|
|
774
|
-
catch {
|
|
557
|
+
catch { }
|
|
775
558
|
return;
|
|
776
559
|
}
|
|
777
|
-
await this.runPragmasOffThread(['PRAGMA analysis_limit=1000', 'PRAGMA optimize', 'PRAGMA wal_checkpoint(PASSIVE)'],
|
|
778
|
-
|
|
779
|
-
['PRAGMA analysis_limit=1000', 'PRAGMA optimize']);
|
|
780
|
-
}
|
|
781
|
-
/**
|
|
782
|
-
* Run pragmas on a worker thread against its own connection to this DB
|
|
783
|
-
* (shared machinery for {@link runMaintenance} and
|
|
784
|
-
* {@link checkpointWalPassive}). Each pragma is individually best-effort;
|
|
785
|
-
* the whole call is best-effort. `inlineFallback` (if any) runs on THIS
|
|
786
|
-
* connection only when worker threads are unavailable — keep it to pragmas
|
|
787
|
-
* that are safe to run synchronously on the main thread.
|
|
788
|
-
*/
|
|
560
|
+
await this.runPragmasOffThread(['PRAGMA analysis_limit=1000', 'PRAGMA optimize', 'PRAGMA wal_checkpoint(PASSIVE)'], ['PRAGMA analysis_limit=1000', 'PRAGMA optimize']);
|
|
561
|
+
}
|
|
789
562
|
async runPragmasOffThread(pragmas, inlineFallback = []) {
|
|
790
563
|
try {
|
|
791
564
|
const { Worker } = await Promise.resolve().then(() => __importStar(require('node:worker_threads')));
|
|
@@ -823,33 +596,21 @@ class DatabaseConnection {
|
|
|
823
596
|
try {
|
|
824
597
|
this.db.exec(p);
|
|
825
598
|
}
|
|
826
|
-
catch {
|
|
599
|
+
catch { }
|
|
827
600
|
}
|
|
828
601
|
}
|
|
829
602
|
}
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
603
|
+
releaseMemory() {
|
|
604
|
+
this.db.exec('PRAGMA shrink_memory');
|
|
605
|
+
this.db.pragma('mmap_size = 0');
|
|
606
|
+
this.db.pragma(`mmap_size = ${MMAP_SIZE_BYTES}`);
|
|
607
|
+
}
|
|
833
608
|
close() {
|
|
834
609
|
this.db.close();
|
|
835
610
|
}
|
|
836
|
-
/**
|
|
837
|
-
* Check if the database connection is open
|
|
838
|
-
*/
|
|
839
611
|
isOpen() {
|
|
840
612
|
return this.db.open;
|
|
841
613
|
}
|
|
842
|
-
/**
|
|
843
|
-
* True when the DB file at our path has been REPLACED on disk since we opened
|
|
844
|
-
* it — a different inode now lives at the same path, so the fd we still hold
|
|
845
|
-
* points at a now-unlinked inode that can never receive new writes (#925).
|
|
846
|
-
* The trigger is removing and recreating `.codegraph/` at the same path under
|
|
847
|
-
* a long-lived process (`git worktree remove` + re-add, or `rm -rf
|
|
848
|
-
* .codegraph` + `codegraph init`). Returns false when the inode is unchanged,
|
|
849
|
-
* when the file is momentarily absent (mid-recreate — nothing to reopen onto
|
|
850
|
-
* yet), or when the platform doesn't report a usable inode (Windows can't
|
|
851
|
-
* unlink an open file and its st_ino is unreliable, so this never fires there).
|
|
852
|
-
*/
|
|
853
614
|
isReplacedOnDisk() {
|
|
854
615
|
if (this.openedInode === null)
|
|
855
616
|
return false;
|
|
@@ -858,51 +619,18 @@ class DatabaseConnection {
|
|
|
858
619
|
}
|
|
859
620
|
}
|
|
860
621
|
exports.DatabaseConnection = DatabaseConnection;
|
|
861
|
-
/**
|
|
862
|
-
* Default database filename
|
|
863
|
-
*/
|
|
864
622
|
exports.DATABASE_FILENAME = 'codegraph.db';
|
|
865
|
-
/**
|
|
866
|
-
* SQLite's sidecar files in WAL mode — the write-ahead log and its shared-memory
|
|
867
|
-
* index. They sit beside the main DB file and are removed alongside it when the
|
|
868
|
-
* database is discarded (see `removeDatabaseFiles`).
|
|
869
|
-
*/
|
|
870
623
|
const WAL_SIDECAR_SUFFIXES = ['-wal', '-shm'];
|
|
871
|
-
/**
|
|
872
|
-
* Get the default database path for a project
|
|
873
|
-
*/
|
|
874
624
|
function getDatabasePath(projectRoot) {
|
|
875
625
|
return path.join((0, directory_1.getCodeGraphDir)(projectRoot), exports.DATABASE_FILENAME);
|
|
876
626
|
}
|
|
877
|
-
/**
|
|
878
|
-
* Delete a database file and its WAL sidecars (`-wal`/`-shm`).
|
|
879
|
-
*
|
|
880
|
-
* This is how a FULL re-index discards an existing database — rather than
|
|
881
|
-
* opening the old graph and DELETE-ing every row. On a large or pre-fix
|
|
882
|
-
* poisoned index (e.g. an old graph that scanned an ignored gitlink corpus into
|
|
883
|
-
* ~1.6M nodes with a multi-GB WAL, #1065) the per-row `nodes_fts` delete-trigger
|
|
884
|
-
* churn blocks the main thread long enough to trip the #850 liveness watchdog
|
|
885
|
-
* before indexing even starts, so the rebuild could never recover the bad state
|
|
886
|
-
* (#1067). Unlinking is O(1) regardless of DB size and also reclaims the disk
|
|
887
|
-
* the bloated WAL would otherwise keep.
|
|
888
|
-
*
|
|
889
|
-
* POSIX removes the directory entry even while another process (a daemon/MCP
|
|
890
|
-
* server) still holds the file open; that holder heals via `reopenIfReplaced`
|
|
891
|
-
* (#925). On Windows a live holder can make the unlink fail with EBUSY/EPERM —
|
|
892
|
-
* that is thrown for the caller to surface ("stop the other process and retry").
|
|
893
|
-
* The `-wal`/`-shm` sidecars are best-effort: SQLite recreates them on the next
|
|
894
|
-
* open, so a leftover sidecar is harmless.
|
|
895
|
-
*/
|
|
896
627
|
function removeDatabaseFiles(dbPath) {
|
|
897
|
-
// The main DB file first — its removal is the operation that must succeed (or
|
|
898
|
-
// report why it couldn't). force:true treats an already-missing file as done.
|
|
899
628
|
fs.rmSync(dbPath, { force: true });
|
|
900
629
|
for (const suffix of WAL_SIDECAR_SUFFIXES) {
|
|
901
630
|
try {
|
|
902
631
|
fs.rmSync(dbPath + suffix, { force: true });
|
|
903
632
|
}
|
|
904
633
|
catch {
|
|
905
|
-
// A sidecar still held/locked is harmless — SQLite rebuilds it on open.
|
|
906
634
|
}
|
|
907
635
|
}
|
|
908
636
|
}
|