@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/sync/watcher.js
CHANGED
|
@@ -1,38 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* File Watcher
|
|
4
|
-
*
|
|
5
|
-
* Watches the project directory for file changes and triggers debounced sync
|
|
6
|
-
* operations to keep the code graph up-to-date.
|
|
7
|
-
*
|
|
8
|
-
* Uses Node's built-in `fs.watch` directly (no third-party watcher, no native
|
|
9
|
-
* addon) with a per-platform strategy chosen to keep the open-descriptor /
|
|
10
|
-
* kernel-watch cost BOUNDED rather than growing with the number of files:
|
|
11
|
-
*
|
|
12
|
-
* - macOS / Windows: a recursive `fs.watch(root, {recursive:true})`, plus
|
|
13
|
-
* bounded supplemental streams for directory symlinks (#770).
|
|
14
|
-
* libuv maps this to one FSEvents stream (macOS) / one
|
|
15
|
-
* ReadDirectoryChangesW handle (Windows), so it costs O(1) descriptors no
|
|
16
|
-
* matter how large the tree. This is the fix for the macOS file-table
|
|
17
|
-
* exhaustion (#644 / #496 / #555 / #628): the previous watcher held one
|
|
18
|
-
* open fd PER WATCHED FILE on macOS (tens of thousands of REG fds), which
|
|
19
|
-
* exhausted `kern.maxfiles` and crashed unrelated processes system-wide.
|
|
20
|
-
*
|
|
21
|
-
* - Linux: recursive `fs.watch` is unsupported, so we watch each (non-ignored)
|
|
22
|
-
* DIRECTORY with one inotify watch — O(directories), NOT O(files). New
|
|
23
|
-
* directories are picked up dynamically and an overall watch cap bounds
|
|
24
|
-
* inotify usage on pathological monorepos (#579). A single inotify watch on
|
|
25
|
-
* a directory already reports create/modify/delete for its children, so
|
|
26
|
-
* per-file watches are never needed.
|
|
27
|
-
*
|
|
28
|
-
* Excluded trees (node_modules/, dist/, .git/, …) are filtered via the
|
|
29
|
-
* indexer's `buildScopeIgnore` (built-in defaults + root `.gitignore` +
|
|
30
|
-
* `.git/info/exclude` + `core.excludesFile` + git ignored-untracked dirs) —
|
|
31
|
-
* on Linux they're never descended into (so they cost no watch), and on
|
|
32
|
-
* macOS/Windows the single recursive stream still covers them but their
|
|
33
|
-
* events are dropped before any sync is scheduled. Either way the watcher's
|
|
34
|
-
* scope matches `git ls-files --exclude-standard` (#276 / #407 / #1728).
|
|
35
|
-
*/
|
|
36
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
37
3
|
if (k2 === undefined) k2 = k;
|
|
38
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -75,62 +41,27 @@ const path = __importStar(require("path"));
|
|
|
75
41
|
const extraction_1 = require("../extraction");
|
|
76
42
|
const project_config_1 = require("../project-config");
|
|
77
43
|
const errors_1 = require("../errors");
|
|
44
|
+
Object.defineProperty(exports, "LockUnavailableError", { enumerable: true, get: function () { return errors_1.LockUnavailableError; } });
|
|
78
45
|
const utils_1 = require("../utils");
|
|
79
46
|
const directory_1 = require("../directory");
|
|
80
47
|
const watch_policy_1 = require("./watch-policy");
|
|
81
|
-
/**
|
|
82
|
-
* Number of consecutive lock-contention retries the watcher tolerates before
|
|
83
|
-
* it gives up and degrades auto-sync. Brief contention (another writer for a
|
|
84
|
-
* few cycles) stays under this; a long-lived external writer crosses it.
|
|
85
|
-
*/
|
|
86
48
|
const MAX_LOCK_RETRIES = 5;
|
|
87
|
-
/** A failed re-arm must not turn frequent MCP calls into a lock-polling loop. */
|
|
88
49
|
const LOCK_REARM_COOLDOWN_MS = 30_000;
|
|
89
|
-
/**
|
|
90
|
-
* Number of consecutive GENERIC (non-lock) sync failures the watcher tolerates
|
|
91
|
-
* before it degrades auto-sync. A deterministic failure — a tree-sitter
|
|
92
|
-
* extractor that crashes on one file, DB corruption, `SQLITE_FULL`, an OOM in
|
|
93
|
-
* batched resolution — recurs every debounce cycle, so left unbounded it would
|
|
94
|
-
* retry forever (log + work spam) while the auto-update guarantee is silently
|
|
95
|
-
* dead (#1127). A single clean sync resets the streak, so a transient hiccup
|
|
96
|
-
* that recovers within the budget never degrades.
|
|
97
|
-
*/
|
|
98
50
|
const MAX_SYNC_FAILURE_RETRIES = 5;
|
|
99
|
-
/** Cap on the exponential retry backoff (either mode) so it never sleeps absurdly long. */
|
|
100
51
|
const MAX_RETRY_BACKOFF_MS = 30_000;
|
|
101
|
-
/**
|
|
102
|
-
* Adaptive debounce: a pending set this small fires after the quick quiet
|
|
103
|
-
* window instead of the full debounce — a lone save (or editor + test file
|
|
104
|
-
* pair) syncs near-instantly, while larger bursts keep the full window and
|
|
105
|
-
* coalesce exactly as before.
|
|
106
|
-
*/
|
|
107
52
|
const QUICK_SYNC_MAX_PENDING = 2;
|
|
108
53
|
const QUICK_SYNC_QUIET_MS = 300;
|
|
109
|
-
/**
|
|
110
|
-
* Scoped-sync ceiling: above this many pending files a full scan-diff is
|
|
111
|
-
* simpler and comparably fast (a branch checkout emits thousands of events),
|
|
112
|
-
* and it self-heals anything event coalescing dropped along the way.
|
|
113
|
-
*/
|
|
114
54
|
const SCOPED_SYNC_MAX_PENDING = 500;
|
|
115
|
-
/** Actionable degrade message; both exhaustion paths share it verbatim. */
|
|
116
55
|
const EXHAUSTION_REASON = 'OS watch/file limit exhausted; auto-sync disabled. Run `codegraph sync` ' +
|
|
117
56
|
'(or install git sync hooks) to refresh the graph after changes.';
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
* watches already installed keep working — so it names the exact kernel knob to
|
|
122
|
-
* raise instead.
|
|
123
|
-
*/
|
|
57
|
+
const ROOT_GONE_REASON = 'The project folder was deleted or moved away while watched; auto-sync disabled. ' +
|
|
58
|
+
'Run `codegraph sync` once it is back to refresh the graph.';
|
|
59
|
+
const GONE_CHECK_DELAY_MS = 200;
|
|
124
60
|
const INOTIFY_LIMIT_REASON = 'Linux inotify watch limit reached (fs.inotify.max_user_watches); live ' +
|
|
125
61
|
'watching now covers only part of the project, so edits in unwatched ' +
|
|
126
62
|
'directories will not auto-sync. Raise the limit (e.g. `sudo sysctl ' +
|
|
127
63
|
'fs.inotify.max_user_watches=1048576`, persisted in /etc/sysctl.d) and ' +
|
|
128
64
|
'restart, or run `codegraph sync` (or install git sync hooks) to refresh.';
|
|
129
|
-
/**
|
|
130
|
-
* True when an error is OS watch/file-descriptor exhaustion (EMFILE/ENFILE).
|
|
131
|
-
* Prefers the structured `err.code`; falls back to message matching ONLY when
|
|
132
|
-
* no code is present (some platforms surface a bare Error from `fs.watch`).
|
|
133
|
-
*/
|
|
134
65
|
function isWatchResourceExhaustion(err) {
|
|
135
66
|
const e = err;
|
|
136
67
|
if (e?.code === 'EMFILE' || e?.code === 'ENFILE')
|
|
@@ -140,37 +71,32 @@ function isWatchResourceExhaustion(err) {
|
|
|
140
71
|
}
|
|
141
72
|
return false;
|
|
142
73
|
}
|
|
143
|
-
/**
|
|
144
|
-
* True when an error is Linux inotify *watch-count* exhaustion. `fs.watch`
|
|
145
|
-
* surfaces a hit `fs.inotify.max_user_watches` as ENOSPC ("no space" = no watch
|
|
146
|
-
* descriptors left, NOT disk space). This only arises on the Linux
|
|
147
|
-
* per-directory path; it is non-fatal (raise the limit and partial watching
|
|
148
|
-
* keeps working), so it warns rather than degrading.
|
|
149
|
-
*/
|
|
150
74
|
function isInotifyWatchExhaustion(err) {
|
|
151
75
|
return err?.code === 'ENOSPC';
|
|
152
76
|
}
|
|
153
|
-
/**
|
|
154
|
-
* Native recursive `fs.watch` is only reliable on macOS and Windows; on Linux
|
|
155
|
-
* (and AIX) it throws `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM`. We branch on this
|
|
156
|
-
* to pick the recursive vs per-directory strategy.
|
|
157
|
-
*/
|
|
158
77
|
function supportsRecursiveWatch() {
|
|
159
78
|
return process.platform === 'darwin' || process.platform === 'win32';
|
|
160
79
|
}
|
|
80
|
+
function isDirectory(p) {
|
|
81
|
+
try {
|
|
82
|
+
return fs.statSync(p).isDirectory();
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function realpathOrNull(p) {
|
|
89
|
+
try {
|
|
90
|
+
return fs.realpathSync(p);
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
161
96
|
let watchImpl = fs.watch;
|
|
162
|
-
/** @internal Test-only seam to inject a fake fs.watch implementation. */
|
|
163
97
|
function __setFsWatchForTests(fn) {
|
|
164
98
|
watchImpl = fn ?? fs.watch;
|
|
165
99
|
}
|
|
166
|
-
/**
|
|
167
|
-
* Upper bound on simultaneously-watched directories on the Linux per-directory
|
|
168
|
-
* path. Each is one inotify watch; the kernel's `fs.inotify.max_user_watches`
|
|
169
|
-
* is the hard limit (commonly 8k–128k). We stop adding watches past this and
|
|
170
|
-
* log once — partial live-watch (with `codegraph sync` as the backstop) is far
|
|
171
|
-
* better than exhausting the user's inotify budget and breaking watching
|
|
172
|
-
* system-wide (#579). Tunable via CODEGRAPH_MAX_DIR_WATCHES.
|
|
173
|
-
*/
|
|
174
100
|
const DEFAULT_MAX_DIR_WATCHES = 50_000;
|
|
175
101
|
function maxDirWatches() {
|
|
176
102
|
const raw = process.env.CODEGRAPH_MAX_DIR_WATCHES;
|
|
@@ -181,133 +107,33 @@ function maxDirWatches() {
|
|
|
181
107
|
}
|
|
182
108
|
return DEFAULT_MAX_DIR_WATCHES;
|
|
183
109
|
}
|
|
184
|
-
/**
|
|
185
|
-
* Test seam (see {@link __emitWatchEventForTests}). Maps a watcher's project
|
|
186
|
-
* root to its live instance so tests can synthesize a change event
|
|
187
|
-
* deterministically — real fs.watch delivery latency races under parallel
|
|
188
|
-
* vitest (the reason the previous chokidar mock existed). Only populated under
|
|
189
|
-
* a test runner, so production carries no bookkeeping or retained references.
|
|
190
|
-
*/
|
|
191
110
|
const liveWatchersForTests = new Map();
|
|
192
111
|
const IS_TEST_RUNTIME = !!(process.env.VITEST || process.env.NODE_ENV === 'test');
|
|
193
|
-
/**
|
|
194
|
-
* Thrown by a `syncFn` to signal that the underlying sync couldn't acquire
|
|
195
|
-
* the cross-process write lock (#449). The watcher treats this as "no
|
|
196
|
-
* progress" — preserves `pendingFiles`, skips `onSyncComplete`, and the
|
|
197
|
-
* `finally` block reschedules. Quiet (debug-only) because a long-running
|
|
198
|
-
* external indexer can hit this every debounce cycle.
|
|
199
|
-
*/
|
|
200
|
-
class LockUnavailableError extends Error {
|
|
201
|
-
constructor(message = 'CodeGraph file lock unavailable; another process is writing') {
|
|
202
|
-
super(message);
|
|
203
|
-
this.name = 'LockUnavailableError';
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
exports.LockUnavailableError = LockUnavailableError;
|
|
207
|
-
/**
|
|
208
|
-
* FileWatcher monitors a project directory for changes and triggers
|
|
209
|
-
* debounced sync operations via a provided callback.
|
|
210
|
-
*
|
|
211
|
-
* Design goals:
|
|
212
|
-
* - Bounded resource usage: one recursive stream plus capped symlink streams
|
|
213
|
-
* on macOS/Windows, O(directories) inotify watches on Linux — never O(files), which
|
|
214
|
-
* was the system-crashing fd leak on macOS (#644/#496/#555/#628).
|
|
215
|
-
* - Debounced to avoid thrashing on rapid saves
|
|
216
|
-
* - Filters to supported source files by extension
|
|
217
|
-
* - Ignores .codegraph/ and .git/ regardless of .gitignore
|
|
218
|
-
* - Tracks per-file pending state so MCP tools can flag stale results
|
|
219
|
-
* without blocking on a sync (issue #403)
|
|
220
|
-
*/
|
|
221
112
|
class FileWatcher {
|
|
222
|
-
/** macOS/Windows: the single recursive watcher. Null on Linux. */
|
|
223
113
|
recursiveWatcher = null;
|
|
224
|
-
/** Linux directory watches / macOS and Windows supplemental symlink streams. */
|
|
225
114
|
dirWatchers = new Map();
|
|
226
|
-
/** Set once the per-directory watch cap is hit, so we log only once. */
|
|
227
115
|
dirCapWarned = false;
|
|
228
|
-
/**
|
|
229
|
-
* Set once the Linux inotify watch limit (ENOSPC) is hit. Double duty: we
|
|
230
|
-
* warn only once, AND we stop attempting new directory watches for the rest
|
|
231
|
-
* of the session — once the kernel budget is exhausted every further
|
|
232
|
-
* `inotify_add_watch` fails too, so trying the rest of the tree is pure
|
|
233
|
-
* waste. NON-fatal (does not degrade): installed watches keep working.
|
|
234
|
-
*/
|
|
235
116
|
inotifyLimitWarned = false;
|
|
236
|
-
/**
|
|
237
|
-
* The reason live watching was disabled at runtime
|
|
238
|
-
* (watch-resource exhaustion, lock contention past the retry budget, or a
|
|
239
|
-
* persistent generic sync failure past the retry budget), or null while
|
|
240
|
-
* healthy. Set by {@link degrade}; a lock-contention recovery keeps it until
|
|
241
|
-
* a full reconciliation succeeds.
|
|
242
|
-
*/
|
|
243
117
|
degradedReason = null;
|
|
244
118
|
degradedByLock = false;
|
|
245
119
|
recoveringFromLock = false;
|
|
246
120
|
lastLockRearmMs = 0;
|
|
247
|
-
/** Consecutive lock-contention retries for watcher-triggered syncs. */
|
|
248
121
|
lockRetryCount = 0;
|
|
249
|
-
/** Consecutive generic (non-lock) sync failures; reset only by a clean sync. */
|
|
250
122
|
syncFailureRetryCount = 0;
|
|
251
|
-
/** Test-only inert mode: started, but with no OS watcher installed. */
|
|
252
123
|
inert = false;
|
|
253
|
-
/**
|
|
254
|
-
* Resolved realpath of directories already watched (or skipped). Prevents
|
|
255
|
-
* infinite recursion via symlink cycles — mirrors the same guard used in
|
|
256
|
-
* the indexer's `walk()` (extraction/index.ts).
|
|
257
|
-
*/
|
|
258
124
|
visitedRealDirs = new Set();
|
|
259
125
|
knownDirs = new Map();
|
|
260
126
|
watchedRealDirs = new Map();
|
|
261
127
|
treeRefreshTimer = null;
|
|
262
128
|
debounceTimer = null;
|
|
263
|
-
|
|
264
|
-
* True when the pending set does NOT exactly describe the change (a
|
|
265
|
-
* directory removal's children are unknown from the event, #1285) — the
|
|
266
|
-
* next sync must be a full scan-diff. Cleared only after a successful FULL
|
|
267
|
-
* sync reconciles the tree.
|
|
268
|
-
*/
|
|
129
|
+
goneChecks = new Map();
|
|
269
130
|
needsFullScan = false;
|
|
270
|
-
/**
|
|
271
|
-
* Files seen by the watcher since the last successful sync — populated on
|
|
272
|
-
* every change event, cleared at the start of a sync, and re-populated by
|
|
273
|
-
* events that arrive mid-sync (or restored on sync failure). Keyed by the
|
|
274
|
-
* same project-relative POSIX path the rest of the codebase uses, so a
|
|
275
|
-
* caller can intersect tool-response file paths against this map cheaply.
|
|
276
|
-
*/
|
|
277
131
|
pendingFiles = new Map();
|
|
278
|
-
/**
|
|
279
|
-
* Wall-clock ms at which the in-flight sync began. Combined with
|
|
280
|
-
* {@link pendingFiles}'s `lastSeenMs`, this distinguishes "still in the
|
|
281
|
-
* debounce window" (lastSeen > syncStarted, sync hasn't started yet for
|
|
282
|
-
* this edit) from "currently being indexed" (lastSeen <= syncStarted).
|
|
283
|
-
*/
|
|
284
132
|
syncStartedMs = 0;
|
|
285
133
|
syncing = false;
|
|
286
134
|
stopped = false;
|
|
287
|
-
/**
|
|
288
|
-
* True once the initial watch set is established. Unlike the previous
|
|
289
|
-
* chokidar implementation there is no asynchronous initial "crawl" emitting
|
|
290
|
-
* an `add` per existing file — `fs.watch` only reports changes from the
|
|
291
|
-
* moment it's installed — so this flips to true synchronously at the end of
|
|
292
|
-
* `start()`. The startup reconcile against on-disk state is handled
|
|
293
|
-
* separately by the engine's catch-up sync, not by the watcher.
|
|
294
|
-
*/
|
|
295
135
|
ready = false;
|
|
296
|
-
/**
|
|
297
|
-
* Callbacks that resolve when the watch set is established. Used by tests
|
|
298
|
-
* (and any production caller that cares about a clean baseline) to
|
|
299
|
-
* deterministically gate on watcher readiness.
|
|
300
|
-
*/
|
|
301
136
|
readyWaiters = [];
|
|
302
|
-
// The shared scope matcher from `buildScopeIgnore` (built-in defaults +
|
|
303
|
-
// root `.gitignore` + `.git/info/exclude` + `core.excludesFile` + dirs
|
|
304
|
-
// `git ls-files --exclude-standard` reports ignored + `codegraph.json`
|
|
305
|
-
// exclude/include, with embedded child repos matched by their OWN rules —
|
|
306
|
-
// #514), built at start() and REBUILT whenever one of the files it is
|
|
307
|
-
// derived from changes (see `refreshScope`, #1590). Same construction the
|
|
308
|
-
// indexer uses for scoped sync, so watcher scope cannot diverge from index
|
|
309
|
-
// scope (#1728). An embedded repo created after start() joins the scope on
|
|
310
|
-
// the next scope refresh / watcher restart / re-index.
|
|
311
137
|
ignoreMatcher = null;
|
|
312
138
|
projectRoot;
|
|
313
139
|
debounceMs;
|
|
@@ -316,12 +142,6 @@ class FileWatcher {
|
|
|
316
142
|
onSyncError;
|
|
317
143
|
onDegraded;
|
|
318
144
|
inertForTests;
|
|
319
|
-
/**
|
|
320
|
-
* Optional metadata guard supplied by the CodeGraph facade. Windows'
|
|
321
|
-
* ReadDirectoryChangesW stream includes last-access updates, so a read can
|
|
322
|
-
* otherwise look exactly like an edit. Returning true means the file's
|
|
323
|
-
* current size/mtime still match the indexed record and the event is noise.
|
|
324
|
-
*/
|
|
325
145
|
isFileStateCurrent;
|
|
326
146
|
constructor(projectRoot, syncFn, options = {}, isFileStateCurrent) {
|
|
327
147
|
this.projectRoot = projectRoot;
|
|
@@ -333,13 +153,9 @@ class FileWatcher {
|
|
|
333
153
|
this.inertForTests = options.inertForTests ?? false;
|
|
334
154
|
this.isFileStateCurrent = isFileStateCurrent;
|
|
335
155
|
}
|
|
336
|
-
/**
|
|
337
|
-
* Start watching for file changes.
|
|
338
|
-
* Returns true if watching started successfully, false otherwise.
|
|
339
|
-
*/
|
|
340
156
|
start() {
|
|
341
157
|
if (this.recursiveWatcher || this.dirWatchers.size > 0 || this.inert)
|
|
342
|
-
return true;
|
|
158
|
+
return true;
|
|
343
159
|
this.stopped = false;
|
|
344
160
|
this.degradedReason = null;
|
|
345
161
|
this.degradedByLock = false;
|
|
@@ -347,20 +163,14 @@ class FileWatcher {
|
|
|
347
163
|
this.lockRetryCount = 0;
|
|
348
164
|
this.syncFailureRetryCount = 0;
|
|
349
165
|
this.needsFullScan = false;
|
|
350
|
-
// Some environments make filesystem watching unusable — most notably
|
|
351
|
-
// WSL2 /mnt/ drives, where the underlying fs.watch calls block long
|
|
352
|
-
// enough to break MCP startup handshakes (issue #199). Skip watching
|
|
353
|
-
// there; callers fall back to manual `codegraph sync` or git sync hooks.
|
|
354
166
|
const disabledReason = (0, watch_policy_1.watchDisabledReason)(this.projectRoot);
|
|
355
167
|
if (disabledReason) {
|
|
356
168
|
(0, errors_1.logDebug)('File watcher disabled', { reason: disabledReason, projectRoot: this.projectRoot });
|
|
357
169
|
return false;
|
|
358
170
|
}
|
|
359
|
-
// Reuse the indexer's ignore set so the watcher and indexer agree on scope.
|
|
360
171
|
this.ignoreMatcher = (0, extraction_1.buildScopeIgnore)(this.projectRoot);
|
|
361
172
|
try {
|
|
362
173
|
if (this.inertForTests) {
|
|
363
|
-
// Test-only: install no OS watcher; the seam drives events instead.
|
|
364
174
|
this.inert = true;
|
|
365
175
|
}
|
|
366
176
|
else if (supportsRecursiveWatch()) {
|
|
@@ -369,15 +179,8 @@ class FileWatcher {
|
|
|
369
179
|
else {
|
|
370
180
|
this.refreshWatchTree();
|
|
371
181
|
}
|
|
372
|
-
// The per-directory (Linux) path catches watch-resource exhaustion inside
|
|
373
|
-
// watchDirectory and degrades synchronously rather than throwing, so it never
|
|
374
|
-
// reaches the catch below. Surface that as a failed start here so both
|
|
375
|
-
// strategies report exhaustion identically (start() === false).
|
|
376
182
|
if (this.degradedReason)
|
|
377
183
|
return false;
|
|
378
|
-
// No async crawl to wait on: as soon as the watch set is installed we
|
|
379
|
-
// have a clean baseline (pendingFiles is only populated by post-start
|
|
380
|
-
// events). Clear defensively and flip ready.
|
|
381
184
|
this.pendingFiles.clear();
|
|
382
185
|
this.ready = true;
|
|
383
186
|
for (const cb of this.readyWaiters)
|
|
@@ -394,10 +197,6 @@ class FileWatcher {
|
|
|
394
197
|
return true;
|
|
395
198
|
}
|
|
396
199
|
catch (err) {
|
|
397
|
-
// Watcher setup failed. Watch-resource exhaustion (EMFILE/ENFILE on the
|
|
398
|
-
// recursive path) is terminal — degrade cleanly with one actionable
|
|
399
|
-
// warning instead of leaving a half-broken watcher. Everything else
|
|
400
|
-
// (permission denied, missing directory) keeps the prior quiet-stop.
|
|
401
200
|
if (isWatchResourceExhaustion(err)) {
|
|
402
201
|
this.degrade(EXHAUSTION_REASON, { error: String(err) });
|
|
403
202
|
}
|
|
@@ -408,11 +207,6 @@ class FileWatcher {
|
|
|
408
207
|
return false;
|
|
409
208
|
}
|
|
410
209
|
}
|
|
411
|
-
/**
|
|
412
|
-
* macOS/Windows: one root stream, supplemented for directory symlinks.
|
|
413
|
-
* `filename` arrives relative to the project root (with subdirectories), so
|
|
414
|
-
* it maps straight to a project-relative path.
|
|
415
|
-
*/
|
|
416
210
|
startRecursive() {
|
|
417
211
|
this.recursiveWatcher = watchImpl(this.projectRoot, { recursive: true, persistent: true }, (_event, filename) => this.handleDirEvent(this.projectRoot, filename));
|
|
418
212
|
this.recursiveWatcher.on('error', (err) => {
|
|
@@ -424,7 +218,6 @@ class FileWatcher {
|
|
|
424
218
|
});
|
|
425
219
|
this.refreshWatchTree();
|
|
426
220
|
}
|
|
427
|
-
/** Reconcile logical directory paths with real targets, including retargeted links. */
|
|
428
221
|
refreshWatchTree() {
|
|
429
222
|
if (this.stopped || this.inert)
|
|
430
223
|
return;
|
|
@@ -450,17 +243,15 @@ class FileWatcher {
|
|
|
450
243
|
walk(child, false);
|
|
451
244
|
}
|
|
452
245
|
else if (entry.isSymbolicLink()) {
|
|
453
|
-
// Follow directory symlinks just like the indexer's walk. Realpath
|
|
454
|
-
// deduplication includes ordinary directories and the root itself.
|
|
455
246
|
try {
|
|
456
247
|
if (fs.statSync(child).isDirectory())
|
|
457
248
|
walk(child, true);
|
|
458
249
|
}
|
|
459
|
-
catch {
|
|
250
|
+
catch { }
|
|
460
251
|
}
|
|
461
252
|
}
|
|
462
253
|
}
|
|
463
|
-
catch {
|
|
254
|
+
catch { }
|
|
464
255
|
};
|
|
465
256
|
walk(this.projectRoot, false);
|
|
466
257
|
this.knownDirs = directories;
|
|
@@ -471,7 +262,6 @@ class FileWatcher {
|
|
|
471
262
|
for (const [dir, real] of desired)
|
|
472
263
|
this.watchDirectory(dir, real, recursive);
|
|
473
264
|
}
|
|
474
|
-
/** Coalesce directory topology events before walking; file edits never walk the tree. */
|
|
475
265
|
scheduleTreeRefresh() {
|
|
476
266
|
if (this.treeRefreshTimer || this.inert || this.stopped)
|
|
477
267
|
return;
|
|
@@ -480,8 +270,6 @@ class FileWatcher {
|
|
|
480
270
|
this.refreshWatchTree();
|
|
481
271
|
if (this.stopped)
|
|
482
272
|
return;
|
|
483
|
-
// A new/retargeted directory can already contain files before its watch
|
|
484
|
-
// is installed; a full reconcile closes that race and removes old paths.
|
|
485
273
|
this.needsFullScan = true;
|
|
486
274
|
this.scheduleSync();
|
|
487
275
|
}, 50);
|
|
@@ -491,8 +279,6 @@ class FileWatcher {
|
|
|
491
279
|
return;
|
|
492
280
|
if (this.dirWatchers.has(dir))
|
|
493
281
|
return;
|
|
494
|
-
// Recursive streams cost more than inotify entries. Keep a separate hard
|
|
495
|
-
// ceiling while honouring a lower user-configured directory watch budget.
|
|
496
282
|
const cap = recursive ? Math.min(256, maxDirWatches()) : maxDirWatches();
|
|
497
283
|
if (this.dirWatchers.size >= cap) {
|
|
498
284
|
if (!this.dirCapWarned) {
|
|
@@ -506,18 +292,12 @@ class FileWatcher {
|
|
|
506
292
|
w = watchImpl(dir, { persistent: true, recursive }, (_event, filename) => this.handleDirEvent(dir, filename));
|
|
507
293
|
}
|
|
508
294
|
catch (err) {
|
|
509
|
-
// EMFILE/ENFILE means the PROCESS is out of descriptors — every further
|
|
510
|
-
// directory would fail too, so degrade the whole watcher rather than
|
|
511
|
-
// limping along with a partial watch set.
|
|
512
295
|
if (isWatchResourceExhaustion(err)) {
|
|
513
296
|
this.degrade(EXHAUSTION_REASON, { error: String(err), dir });
|
|
514
297
|
}
|
|
515
298
|
else if (isInotifyWatchExhaustion(err)) {
|
|
516
|
-
// ENOSPC = inotify watch budget exhausted. NON-fatal: keep the watches
|
|
517
|
-
// we have and tell the user the knob to raise (warn once).
|
|
518
299
|
this.warnInotifyLimit({ error: String(err), dir });
|
|
519
300
|
}
|
|
520
|
-
// ENOENT / EACCES on a single directory stays non-fatal: skip it quietly.
|
|
521
301
|
return;
|
|
522
302
|
}
|
|
523
303
|
w.on('error', (err) => {
|
|
@@ -533,7 +313,6 @@ class FileWatcher {
|
|
|
533
313
|
this.dirWatchers.set(dir, w);
|
|
534
314
|
this.watchedRealDirs.set(dir, real);
|
|
535
315
|
}
|
|
536
|
-
/** Events are relative to a watch's logical path, even for an external target. */
|
|
537
316
|
handleDirEvent(dir, filename) {
|
|
538
317
|
if (this.stopped)
|
|
539
318
|
return;
|
|
@@ -541,75 +320,53 @@ class FileWatcher {
|
|
|
541
320
|
this.scheduleTreeRefresh();
|
|
542
321
|
return;
|
|
543
322
|
}
|
|
544
|
-
const
|
|
323
|
+
const name = String(filename);
|
|
324
|
+
if (path.isAbsolute(name)) {
|
|
325
|
+
this.armGoneCheck(dir);
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
const full = path.join(dir, name);
|
|
545
329
|
const rel = (0, utils_1.normalizePath)(path.relative(this.projectRoot, full));
|
|
546
330
|
if (!rel || rel === '.') {
|
|
547
331
|
this.scheduleTreeRefresh();
|
|
548
332
|
return;
|
|
549
333
|
}
|
|
550
|
-
// Churn under an ignored directory (node_modules, dist, .git) is dropped
|
|
551
|
-
// before any per-event fs call; `.git/info/exclude` still reaches the scope
|
|
552
|
-
// refresh in handleChange (#1728).
|
|
553
334
|
if (rel !== '.git/info/exclude' && this.shouldIgnoreDir(path.dirname(full)))
|
|
554
335
|
return;
|
|
555
336
|
try {
|
|
556
337
|
if (fs.statSync(full).isDirectory()) {
|
|
557
338
|
if (this.shouldIgnoreDir(full))
|
|
558
339
|
return;
|
|
559
|
-
// Existing directory notifications can represent a retargeted link.
|
|
560
340
|
if (this.knownDirs.get(full) !== fs.realpathSync(full))
|
|
561
341
|
this.scheduleTreeRefresh();
|
|
562
342
|
return;
|
|
563
343
|
}
|
|
564
344
|
}
|
|
565
|
-
catch {
|
|
345
|
+
catch { }
|
|
566
346
|
if (this.knownDirs.has(full) && !this.shouldIgnoreDir(full))
|
|
567
347
|
this.scheduleTreeRefresh();
|
|
568
348
|
this.handleChange(rel);
|
|
569
349
|
}
|
|
570
|
-
/**
|
|
571
|
-
* Shared change handler for both watch strategies. `rel` is a
|
|
572
|
-
* project-relative POSIX path. Applies the ignore + source-file filters and,
|
|
573
|
-
* for a real source change, records it as pending (#403) and schedules a
|
|
574
|
-
* debounced sync.
|
|
575
|
-
*
|
|
576
|
-
* The recursive (macOS/Windows) watcher reports events for ignored trees too
|
|
577
|
-
* (one stream covers the whole repo), so the ignore check here is load-bearing
|
|
578
|
-
* — it drops node_modules/dist/.git churn before any sync is scheduled.
|
|
579
|
-
*/
|
|
580
350
|
handleChange(rel) {
|
|
581
|
-
if (!rel || rel === '.' ||
|
|
351
|
+
if (!rel || rel === '.' || (0, utils_1.escapesRoot)(rel))
|
|
582
352
|
return;
|
|
583
|
-
// `.git/info/exclude` is otherwise always-ignored with the rest of `.git/`,
|
|
584
|
-
// but it feeds `buildScopeIgnore` — allow it through as a scope refresh
|
|
585
|
-
// when the platform delivers the event (recursive watchers may; Linux
|
|
586
|
-
// per-directory watching does not descend into `.git/`) (#1728).
|
|
587
353
|
if (rel === '.git/info/exclude') {
|
|
588
354
|
this.refreshScope(rel);
|
|
589
355
|
return;
|
|
590
356
|
}
|
|
591
357
|
if (this.isAlwaysIgnored(rel))
|
|
592
358
|
return;
|
|
593
|
-
// The two root files the scope matcher is derived from are handled BEFORE
|
|
594
|
-
// the matcher is consulted: a user `exclude` pattern that happens to cover
|
|
595
|
-
// them (`*.json`, `.*`) must not be able to hide their own edits (#1590).
|
|
596
359
|
if (rel === project_config_1.PROJECT_CONFIG_FILENAME || rel === '.gitignore') {
|
|
597
360
|
this.refreshScope(rel);
|
|
598
361
|
return;
|
|
599
362
|
}
|
|
600
363
|
if (this.ignoreMatcher && this.ignoreMatcher.ignores(rel))
|
|
601
364
|
return;
|
|
602
|
-
// A nested `.gitignore` (an embedded child repo's own rules, #514, or a
|
|
603
|
-
// subdirectory rule the git-backed full scan honors) is only a scope
|
|
604
|
-
// change when it sits INSIDE the current scope — checked after the matcher
|
|
605
|
-
// on purpose, so the thousands of package-local `.gitignore`s an
|
|
606
|
-
// `npm install` writes under an ignored `node_modules/` never trigger a
|
|
607
|
-
// rebuild storm.
|
|
608
365
|
if (rel.endsWith('/.gitignore')) {
|
|
609
366
|
this.refreshScope(rel);
|
|
610
367
|
return;
|
|
611
368
|
}
|
|
612
|
-
if (!(0, extraction_1.isSourceFile)(rel, (0, project_config_1.loadExtensionOverrides)(this.projectRoot))) {
|
|
369
|
+
if (!(0, extraction_1.isSourceFile)(rel, (0, project_config_1.loadExtensionOverrides)(this.projectRoot), this.projectRoot)) {
|
|
613
370
|
this.maybeScheduleForRemovedDir(rel);
|
|
614
371
|
return;
|
|
615
372
|
}
|
|
@@ -620,8 +377,6 @@ class FileWatcher {
|
|
|
620
377
|
}
|
|
621
378
|
}
|
|
622
379
|
catch (error) {
|
|
623
|
-
// The guard is an optimization, never a correctness boundary. If the
|
|
624
|
-
// stat/DB lookup fails, keep the event so a sync can reconcile it.
|
|
625
380
|
(0, errors_1.logDebug)('Could not verify file event metadata; treating it as a change', {
|
|
626
381
|
file: rel,
|
|
627
382
|
error: String(error),
|
|
@@ -638,27 +393,6 @@ class FileWatcher {
|
|
|
638
393
|
}
|
|
639
394
|
this.scheduleSync();
|
|
640
395
|
}
|
|
641
|
-
/**
|
|
642
|
-
* A scope-defining file changed (`codegraph.json`, a `.gitignore`): rebuild
|
|
643
|
-
* the ignore matcher and make the next sync a FULL reconcile (#1590).
|
|
644
|
-
*
|
|
645
|
-
* The matcher used to be built once in `start()` and kept for the watcher's
|
|
646
|
-
* lifetime — in a long-lived MCP daemon that meant a `codegraph.json`
|
|
647
|
-
* created or edited after startup was invisible to the live watcher, while
|
|
648
|
-
* `codegraph sync` (a fresh process) honoured it immediately: the CLI
|
|
649
|
-
* removed a newly excluded file and the watcher re-added it seconds later.
|
|
650
|
-
* `loadExtensionOverrides()` on the same filter line was already read live
|
|
651
|
-
* (mtime-cached), so two fields of the same config file disagreed.
|
|
652
|
-
*
|
|
653
|
-
* Rebuilding costs one `git ls-files` pass (embedded-repo discovery), which
|
|
654
|
-
* is fine per config edit — never per event. Replacing the field is enough
|
|
655
|
-
* for both strategies: the recursive handler and the per-directory
|
|
656
|
-
* `shouldIgnoreDir` walk read `this.ignoreMatcher` on every call. The full
|
|
657
|
-
* scan is required because a scope change has no per-file events: newly
|
|
658
|
-
* excluded files must be REMOVED from the index and newly included ones
|
|
659
|
-
* added, and only the scan-diff (which builds its own fresh matcher) knows
|
|
660
|
-
* which those are.
|
|
661
|
-
*/
|
|
662
396
|
refreshScope(rel) {
|
|
663
397
|
(0, errors_1.logDebug)('Scope config changed; rebuilding watcher scope', { file: rel });
|
|
664
398
|
this.ignoreMatcher = (0, extraction_1.buildScopeIgnore)(this.projectRoot);
|
|
@@ -666,29 +400,12 @@ class FileWatcher {
|
|
|
666
400
|
this.needsFullScan = true;
|
|
667
401
|
this.scheduleSync();
|
|
668
402
|
}
|
|
669
|
-
/**
|
|
670
|
-
* A deleted DIRECTORY arrives as one event on the directory's own path —
|
|
671
|
-
* no source extension, so the source-file filter drops it, and the files
|
|
672
|
-
* underneath may never get events of their own (Windows's recursive
|
|
673
|
-
* watcher reports only the top-most removed entry; macOS FSEvents can
|
|
674
|
-
* coalesce a tree deletion the same way). The index then kept every child
|
|
675
|
-
* record until some unrelated edit happened to trigger a sync (#1285).
|
|
676
|
-
*
|
|
677
|
-
* If a non-source path no longer exists on disk, treat it as a potential
|
|
678
|
-
* subtree removal and schedule the debounced sync — its scan-diff removes
|
|
679
|
-
* whatever is gone, which is the ground truth for what was underneath.
|
|
680
|
-
* pendingFiles is left alone (we can't know the children from the event).
|
|
681
|
-
* An event for an EXISTING non-source file stays fully ignored, so build
|
|
682
|
-
* churn on live files never schedules work; a deleted non-source file
|
|
683
|
-
* costs at most one no-op scan-diff, absorbed by the debounce.
|
|
684
|
-
*/
|
|
685
403
|
maybeScheduleForRemovedDir(rel) {
|
|
686
404
|
try {
|
|
687
405
|
fs.statSync(path.join(this.projectRoot, rel));
|
|
688
|
-
return;
|
|
406
|
+
return;
|
|
689
407
|
}
|
|
690
408
|
catch {
|
|
691
|
-
/* gone — fall through */
|
|
692
409
|
}
|
|
693
410
|
(0, errors_1.logDebug)('Non-source path removed; scheduling sync for possible directory removal', {
|
|
694
411
|
path: rel,
|
|
@@ -696,49 +413,68 @@ class FileWatcher {
|
|
|
696
413
|
this.needsFullScan = true;
|
|
697
414
|
this.scheduleSync();
|
|
698
415
|
}
|
|
699
|
-
|
|
416
|
+
armGoneCheck(dir) {
|
|
417
|
+
if (this.stopped || this.goneChecks.has(dir))
|
|
418
|
+
return;
|
|
419
|
+
const isRoot = dir === this.projectRoot;
|
|
420
|
+
if (!isRoot && !this.dirWatchers.has(dir))
|
|
421
|
+
return;
|
|
422
|
+
const timer = setTimeout(() => {
|
|
423
|
+
this.goneChecks.delete(dir);
|
|
424
|
+
if (this.stopped)
|
|
425
|
+
return;
|
|
426
|
+
if (isRoot) {
|
|
427
|
+
if (!isDirectory(this.projectRoot))
|
|
428
|
+
this.degrade(ROOT_GONE_REASON, { projectRoot: this.projectRoot });
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
if (realpathOrNull(dir) === this.watchedRealDirs.get(dir))
|
|
432
|
+
return;
|
|
433
|
+
(0, errors_1.logDebug)('Watched link no longer leads to its folder; closing its stream', { dir });
|
|
434
|
+
this.unwatchDir(dir);
|
|
435
|
+
this.scheduleTreeRefresh();
|
|
436
|
+
}, GONE_CHECK_DELAY_MS);
|
|
437
|
+
timer.unref?.();
|
|
438
|
+
this.goneChecks.set(dir, timer);
|
|
439
|
+
}
|
|
700
440
|
unwatchDir(dir) {
|
|
441
|
+
const check = this.goneChecks.get(dir);
|
|
442
|
+
if (check) {
|
|
443
|
+
clearTimeout(check);
|
|
444
|
+
this.goneChecks.delete(dir);
|
|
445
|
+
}
|
|
701
446
|
const w = this.dirWatchers.get(dir);
|
|
702
447
|
if (w) {
|
|
703
448
|
try {
|
|
704
449
|
w.close();
|
|
705
450
|
}
|
|
706
451
|
catch {
|
|
707
|
-
/* already closed */
|
|
708
452
|
}
|
|
709
453
|
this.dirWatchers.delete(dir);
|
|
710
454
|
this.watchedRealDirs.delete(dir);
|
|
711
455
|
}
|
|
712
456
|
}
|
|
713
|
-
/** Our own dirs are always ignored, regardless of .gitignore. */
|
|
714
457
|
isAlwaysIgnored(rel) {
|
|
715
|
-
// Ignore any CodeGraph data dir — the active one AND a
|
|
716
|
-
// sibling like `.codegraph-win` a second environment (Windows/WSL) created
|
|
717
|
-
// in the same tree, so neither side watches the other's index (#636).
|
|
718
458
|
return rel.split('/').some(part => (0, directory_1.isCodeGraphDataDir)(part) || part === '.git');
|
|
719
459
|
}
|
|
720
|
-
/**
|
|
721
|
-
* True for any directory that should NOT be watched (used while building the
|
|
722
|
-
* Linux per-directory watch tree). Tests the directory form of the path so a
|
|
723
|
-
* dir-only ignore rule like `build/` matches.
|
|
724
|
-
*/
|
|
725
460
|
shouldIgnoreDir(dirPath) {
|
|
726
461
|
const rel = (0, utils_1.normalizePath)(path.relative(this.projectRoot, dirPath));
|
|
727
|
-
if (!rel || rel === '.' ||
|
|
728
|
-
return false;
|
|
462
|
+
if (!rel || rel === '.' || (0, utils_1.escapesRoot)(rel))
|
|
463
|
+
return false;
|
|
729
464
|
if (this.isAlwaysIgnored(rel))
|
|
730
465
|
return true;
|
|
731
466
|
if (!this.ignoreMatcher)
|
|
732
467
|
return false;
|
|
733
468
|
return this.ignoreMatcher.ignores(rel + '/');
|
|
734
469
|
}
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
470
|
+
callHost(name, call) {
|
|
471
|
+
try {
|
|
472
|
+
call();
|
|
473
|
+
}
|
|
474
|
+
catch (err) {
|
|
475
|
+
(0, errors_1.logWarn)(`File watcher ${name} callback threw`, { error: err instanceof Error ? err.message : String(err) });
|
|
476
|
+
}
|
|
477
|
+
}
|
|
742
478
|
degrade(reason, context = {}, byLock = false) {
|
|
743
479
|
if (this.degradedReason && !this.recoveringFromLock)
|
|
744
480
|
return;
|
|
@@ -746,47 +482,24 @@ class FileWatcher {
|
|
|
746
482
|
this.degradedByLock = byLock;
|
|
747
483
|
this.recoveringFromLock = false;
|
|
748
484
|
(0, errors_1.logWarn)('File watcher disabled', { projectRoot: this.projectRoot, reason, ...context });
|
|
749
|
-
this.onDegraded?.(reason);
|
|
485
|
+
this.callHost('onDegraded', () => this.onDegraded?.(reason));
|
|
750
486
|
this.stop();
|
|
751
487
|
}
|
|
752
|
-
/**
|
|
753
|
-
* Warn ONCE that the Linux inotify watch budget is exhausted (ENOSPC), and
|
|
754
|
-
* stop adding new watches for the rest of this session — every further
|
|
755
|
-
* `inotify_add_watch` would fail too, so walking the rest of the tree is
|
|
756
|
-
* waste. Unlike {@link degrade} this is NON-fatal: the watches already
|
|
757
|
-
* installed keep firing, and `codegraph sync` covers the unwatched remainder.
|
|
758
|
-
* The message names the kernel knob to raise (`fs.inotify.max_user_watches`).
|
|
759
|
-
*/
|
|
760
488
|
warnInotifyLimit(context = {}) {
|
|
761
489
|
if (this.inotifyLimitWarned)
|
|
762
490
|
return;
|
|
763
491
|
this.inotifyLimitWarned = true;
|
|
764
492
|
(0, errors_1.logWarn)(INOTIFY_LIMIT_REASON, { watchedDirs: this.dirWatchers.size, ...context });
|
|
765
493
|
}
|
|
766
|
-
/**
|
|
767
|
-
* Whether live watching has degraded or is still catching up after re-arm.
|
|
768
|
-
* Distinct from {@link isActive}: a degraded watcher is inactive, but an
|
|
769
|
-
* inactive watcher is not necessarily degraded (it may simply be stopped or
|
|
770
|
-
* never started). Hosts use this to tell the user auto-sync is off.
|
|
771
|
-
*/
|
|
772
494
|
isDegraded() {
|
|
773
495
|
return this.degradedReason !== null;
|
|
774
496
|
}
|
|
775
|
-
/** The reason live watching degraded, or null if it is healthy. */
|
|
776
497
|
getDegradedReason() {
|
|
777
498
|
return this.degradedReason;
|
|
778
499
|
}
|
|
779
|
-
/** Watches are live again, but the full catch-up has not committed yet. */
|
|
780
500
|
isRecoveringFromLock() {
|
|
781
501
|
return this.recoveringFromLock;
|
|
782
502
|
}
|
|
783
|
-
/**
|
|
784
|
-
* Re-arm a watcher disabled by lock contention when a caller next uses the
|
|
785
|
-
* graph. Keep the whole-index stale banner until a FULL scan reconciles edits
|
|
786
|
-
* missed while watches were off. Resource exhaustion and deterministic sync
|
|
787
|
-
* failures are not automatically retried. Repeated unsuccessful re-arms are
|
|
788
|
-
* throttled so many MCP sessions cannot hammer a long-lived writer.
|
|
789
|
-
*/
|
|
790
503
|
rearmAfterLockContention() {
|
|
791
504
|
if (!this.degradedByLock || this.isActive())
|
|
792
505
|
return false;
|
|
@@ -796,9 +509,6 @@ class FileWatcher {
|
|
|
796
509
|
const reason = this.degradedReason;
|
|
797
510
|
this.lastLockRearmMs = now;
|
|
798
511
|
if (!this.start()) {
|
|
799
|
-
// A disabled platform can reject start() without calling degrade().
|
|
800
|
-
// Preserve the old stale-index signal in that case; a new resource
|
|
801
|
-
// failure has its own more precise degraded reason.
|
|
802
512
|
if (!this.degradedReason) {
|
|
803
513
|
this.degradedReason = reason;
|
|
804
514
|
this.degradedByLock = true;
|
|
@@ -811,14 +521,14 @@ class FileWatcher {
|
|
|
811
521
|
this.scheduleSync();
|
|
812
522
|
return true;
|
|
813
523
|
}
|
|
814
|
-
/**
|
|
815
|
-
* Stop watching for file changes.
|
|
816
|
-
*/
|
|
817
524
|
stop() {
|
|
818
525
|
this.stopped = true;
|
|
819
526
|
if (this.treeRefreshTimer)
|
|
820
527
|
clearTimeout(this.treeRefreshTimer);
|
|
821
528
|
this.treeRefreshTimer = null;
|
|
529
|
+
for (const check of this.goneChecks.values())
|
|
530
|
+
clearTimeout(check);
|
|
531
|
+
this.goneChecks.clear();
|
|
822
532
|
this.knownDirs.clear();
|
|
823
533
|
this.watchedRealDirs.clear();
|
|
824
534
|
this.recoveringFromLock = false;
|
|
@@ -831,7 +541,6 @@ class FileWatcher {
|
|
|
831
541
|
this.recursiveWatcher.close();
|
|
832
542
|
}
|
|
833
543
|
catch {
|
|
834
|
-
/* already closed */
|
|
835
544
|
}
|
|
836
545
|
this.recursiveWatcher = null;
|
|
837
546
|
}
|
|
@@ -840,7 +549,6 @@ class FileWatcher {
|
|
|
840
549
|
w.close();
|
|
841
550
|
}
|
|
842
551
|
catch {
|
|
843
|
-
/* already closed */
|
|
844
552
|
}
|
|
845
553
|
}
|
|
846
554
|
this.dirWatchers.clear();
|
|
@@ -848,8 +556,6 @@ class FileWatcher {
|
|
|
848
556
|
this.inotifyLimitWarned = false;
|
|
849
557
|
this.lockRetryCount = 0;
|
|
850
558
|
this.syncFailureRetryCount = 0;
|
|
851
|
-
// NB: degradedReason is intentionally NOT reset here — it must survive the
|
|
852
|
-
// stop() that degrade() triggers so isDegraded() stays true. start() clears it.
|
|
853
559
|
this.visitedRealDirs.clear();
|
|
854
560
|
this.inert = false;
|
|
855
561
|
this.pendingFiles.clear();
|
|
@@ -859,31 +565,12 @@ class FileWatcher {
|
|
|
859
565
|
liveWatchersForTests.delete(this.projectRoot);
|
|
860
566
|
(0, errors_1.logDebug)('File watcher stopped');
|
|
861
567
|
}
|
|
862
|
-
/**
|
|
863
|
-
* @internal Test-only: feed a synthetic project-relative change through the
|
|
864
|
-
* same filter → pendingFiles → debounced-sync path a real fs.watch event
|
|
865
|
-
* takes. Lets the watcher / staleness-banner suites stay deterministic
|
|
866
|
-
* instead of racing on OS watch-delivery latency. See
|
|
867
|
-
* {@link __emitWatchEventForTests}.
|
|
868
|
-
*/
|
|
869
568
|
ingestEventForTests(relPath) {
|
|
870
569
|
this.handleChange((0, utils_1.normalizePath)(relPath));
|
|
871
570
|
}
|
|
872
|
-
/**
|
|
873
|
-
* Whether the watcher is currently active.
|
|
874
|
-
*/
|
|
875
571
|
isActive() {
|
|
876
572
|
return (this.recursiveWatcher !== null || this.dirWatchers.size > 0 || this.inert) && !this.stopped;
|
|
877
573
|
}
|
|
878
|
-
/**
|
|
879
|
-
* Resolves once the watch set has been installed (or immediately if it
|
|
880
|
-
* already has). Useful for tests that need a deterministic boundary before
|
|
881
|
-
* asserting on `pendingFiles`.
|
|
882
|
-
*
|
|
883
|
-
* Production callers don't need this: `pendingFiles` is read continuously,
|
|
884
|
-
* the staleness banner is always correct (empty or populated), and there is
|
|
885
|
-
* no asynchronous initial-scan window with `fs.watch`.
|
|
886
|
-
*/
|
|
887
574
|
waitUntilReady(timeoutMs = 10000) {
|
|
888
575
|
if (this.ready)
|
|
889
576
|
return Promise.resolve();
|
|
@@ -898,21 +585,10 @@ class FileWatcher {
|
|
|
898
585
|
this.readyWaiters.push(handler);
|
|
899
586
|
});
|
|
900
587
|
}
|
|
901
|
-
/**
|
|
902
|
-
* Schedule a normal debounced sync after a source edit.
|
|
903
|
-
*/
|
|
904
588
|
scheduleSync() {
|
|
905
589
|
if (this.debounceTimer) {
|
|
906
590
|
clearTimeout(this.debounceTimer);
|
|
907
591
|
}
|
|
908
|
-
// Adaptive quiet window: a lone save (or a pair — editor + its test file)
|
|
909
|
-
// fires fast so the graph feels instant; anything bigger keeps the full
|
|
910
|
-
// configured window so an agent's multi-file burst still coalesces into
|
|
911
|
-
// one sync exactly as before. Re-arming on each event preserves the
|
|
912
|
-
// trailing-edge semantics either way: if more events arrive inside the
|
|
913
|
-
// quick window, the reschedule sees the larger pending set and extends to
|
|
914
|
-
// the full window. Never exceeds the configured debounce (a user-lowered
|
|
915
|
-
// CODEGRAPH_WATCH_DEBOUNCE_MS stays authoritative), floor 100ms.
|
|
916
592
|
const quickMs = Math.max(100, Math.min(QUICK_SYNC_QUIET_MS, this.debounceMs));
|
|
917
593
|
const delay = this.pendingFiles.size <= QUICK_SYNC_MAX_PENDING ? quickMs : this.debounceMs;
|
|
918
594
|
this.debounceTimer = setTimeout(() => {
|
|
@@ -920,11 +596,6 @@ class FileWatcher {
|
|
|
920
596
|
this.flush();
|
|
921
597
|
}, delay);
|
|
922
598
|
}
|
|
923
|
-
/**
|
|
924
|
-
* Schedule a retry after a recoverable sync failure (lock contention). Kept
|
|
925
|
-
* separate from {@link scheduleSync} so prolonged contention backs off
|
|
926
|
-
* exponentially instead of hammering the lock every debounce cycle.
|
|
927
|
-
*/
|
|
928
599
|
scheduleRetrySync(delayMs) {
|
|
929
600
|
if (this.debounceTimer) {
|
|
930
601
|
clearTimeout(this.debounceTimer);
|
|
@@ -934,34 +605,14 @@ class FileWatcher {
|
|
|
934
605
|
this.flush();
|
|
935
606
|
}, delayMs);
|
|
936
607
|
}
|
|
937
|
-
/**
|
|
938
|
-
* Flush pending changes by running sync.
|
|
939
|
-
*
|
|
940
|
-
* pendingFiles is NOT cleared at the start of sync — entries are removed
|
|
941
|
-
* only after sync commits successfully, and only for entries whose
|
|
942
|
-
* lastSeenMs <= syncStartedMs. That way, a query that arrives mid-sync
|
|
943
|
-
* still sees the affected files marked stale (the DB hasn't been updated
|
|
944
|
-
* yet), and an event that lands mid-sync persists into the follow-up.
|
|
945
|
-
*
|
|
946
|
-
* On sync failure pendingFiles is left untouched — every edit is still
|
|
947
|
-
* unindexed, and the rescheduled sync will absorb the same set next time.
|
|
948
|
-
*/
|
|
949
608
|
async flush() {
|
|
950
|
-
// If already syncing, the post-sync check will re-trigger
|
|
951
609
|
if (this.syncing || this.stopped)
|
|
952
610
|
return;
|
|
953
611
|
this.syncStartedMs = Date.now();
|
|
954
612
|
this.syncing = true;
|
|
955
|
-
// Scoped fast path: when every pending change is a known file event, hand
|
|
956
|
-
// the exact paths to sync and skip its O(repo) scan-diff. Anything the
|
|
957
|
-
// events can't fully describe — a directory removal, an empty pending set
|
|
958
|
-
// (retry paths), or an event storm past the ceiling — runs the full
|
|
959
|
-
// scan-diff, which remains the ground truth.
|
|
960
613
|
const scoped = !this.needsFullScan && this.pendingFiles.size > 0 && this.pendingFiles.size <= SCOPED_SYNC_MAX_PENDING
|
|
961
614
|
? [...this.pendingFiles.keys()]
|
|
962
615
|
: undefined;
|
|
963
|
-
// Consume this request before yielding so a topology/scope change during
|
|
964
|
-
// the full sync remains pending for the next reconcile.
|
|
965
616
|
if (!scoped)
|
|
966
617
|
this.needsFullScan = false;
|
|
967
618
|
try {
|
|
@@ -970,32 +621,20 @@ class FileWatcher {
|
|
|
970
621
|
this.degradedReason = null;
|
|
971
622
|
this.recoveringFromLock = false;
|
|
972
623
|
}
|
|
973
|
-
this.lockRetryCount = 0;
|
|
974
|
-
this.syncFailureRetryCount = 0;
|
|
975
|
-
// Remove entries whose most recent event predates this sync — those
|
|
976
|
-
// edits are now in the DB. Entries with lastSeenMs > syncStartedMs
|
|
977
|
-
// arrived mid-sync; whether the in-flight sync captured them depends
|
|
978
|
-
// on when sync read that file, so we keep them as pending and let
|
|
979
|
-
// the follow-up sync handle them. We prefer false positives ("shown
|
|
980
|
-
// stale, actually fresh" → at worst one extra Read) over false
|
|
981
|
-
// negatives ("shown fresh, actually stale" → misleads the agent).
|
|
624
|
+
this.lockRetryCount = 0;
|
|
625
|
+
this.syncFailureRetryCount = 0;
|
|
982
626
|
for (const [filePath, info] of this.pendingFiles) {
|
|
983
627
|
if (info.lastSeenMs <= this.syncStartedMs) {
|
|
984
628
|
this.pendingFiles.delete(filePath);
|
|
985
629
|
}
|
|
986
630
|
}
|
|
987
|
-
this.onSyncComplete?.(result);
|
|
631
|
+
this.callHost('onSyncComplete', () => this.onSyncComplete?.(result));
|
|
988
632
|
}
|
|
989
633
|
catch (err) {
|
|
990
634
|
if (!scoped)
|
|
991
635
|
this.needsFullScan = true;
|
|
992
|
-
if (err instanceof LockUnavailableError) {
|
|
636
|
+
if (err instanceof errors_1.LockUnavailableError) {
|
|
993
637
|
this.lockRetryCount += 1;
|
|
994
|
-
// Lock-failure no-op (another writer holds the lock). pendingFiles
|
|
995
|
-
// stays intact and the `finally` block reschedules with backoff. Keep
|
|
996
|
-
// brief contention quiet (debug-only — a long external index would
|
|
997
|
-
// otherwise spam stderr every cycle), but stop retrying forever: once a
|
|
998
|
-
// writer holds the lock past the budget, degrade auto-sync explicitly.
|
|
999
638
|
(0, errors_1.logDebug)('Watch sync skipped: file lock unavailable', {
|
|
1000
639
|
pendingFiles: this.pendingFiles.size,
|
|
1001
640
|
retryCount: this.lockRetryCount,
|
|
@@ -1007,43 +646,23 @@ class FileWatcher {
|
|
|
1007
646
|
}
|
|
1008
647
|
}
|
|
1009
648
|
else {
|
|
1010
|
-
this.lockRetryCount = 0;
|
|
649
|
+
this.lockRetryCount = 0;
|
|
1011
650
|
this.syncFailureRetryCount += 1;
|
|
1012
651
|
const error = err instanceof Error ? err : new Error(String(err));
|
|
1013
652
|
(0, errors_1.logWarn)('Watch sync failed', {
|
|
1014
653
|
error: error.message,
|
|
1015
654
|
retryCount: this.syncFailureRetryCount,
|
|
1016
655
|
});
|
|
1017
|
-
this.onSyncError?.(error);
|
|
1018
|
-
// A persistent (deterministic) sync failure — a broken extractor on a
|
|
1019
|
-
// specific file, DB corruption, SQLITE_FULL, an OOM in resolution —
|
|
1020
|
-
// would otherwise retry forever at the debounce cadence, spamming logs
|
|
1021
|
-
// and work while the auto-update guarantee is silently dead (#1127).
|
|
1022
|
-
// Bound it exactly like lock contention: the `finally` block backs off
|
|
1023
|
-
// exponentially, and past the budget we degrade so the dead guarantee
|
|
1024
|
-
// is surfaced (onDegraded / isDegraded) instead of hidden. A single
|
|
1025
|
-
// clean sync resets the streak, so a transient hiccup never degrades.
|
|
656
|
+
this.callHost('onSyncError', () => this.onSyncError?.(error));
|
|
1026
657
|
if (this.syncFailureRetryCount > MAX_SYNC_FAILURE_RETRIES) {
|
|
1027
658
|
this.degrade(`CodeGraph auto-sync failed ${this.syncFailureRetryCount} times in a row; ` +
|
|
1028
659
|
'auto-sync disabled. Run `codegraph sync` (or install git sync hooks) to ' +
|
|
1029
660
|
`refresh the graph after changes. Last error: ${error.message}`, { error: error.message, retryCount: this.syncFailureRetryCount });
|
|
1030
661
|
}
|
|
1031
662
|
}
|
|
1032
|
-
// Failure: leave pendingFiles untouched. Every edit it tracks is
|
|
1033
|
-
// still unindexed; the rescheduled sync sees the same set.
|
|
1034
663
|
}
|
|
1035
664
|
finally {
|
|
1036
665
|
this.syncing = false;
|
|
1037
|
-
// If pending files remain (mid-sync events, or this sync failed),
|
|
1038
|
-
// schedule another pass. After EITHER failure mode — lock contention or a
|
|
1039
|
-
// generic sync failure — back off exponentially (debounceMs · 2^(n-1),
|
|
1040
|
-
// capped) instead of retrying at the normal debounce cadence; a clean
|
|
1041
|
-
// sync resets both counters so normal edits keep the fast debounce. Use
|
|
1042
|
-
// the larger streak so interleaved failures still back off. A degrade()
|
|
1043
|
-
// above already set `stopped`, so this won't reschedule a watcher that
|
|
1044
|
-
// has given up. A directory removal whose full sync failed adds no
|
|
1045
|
-
// pending file, only `needsFullScan` — it still owes the full reconcile
|
|
1046
|
-
// it asked for (#1964).
|
|
1047
666
|
if ((this.pendingFiles.size > 0 || this.needsFullScan) && !this.stopped) {
|
|
1048
667
|
const retryCount = Math.max(this.lockRetryCount, this.syncFailureRetryCount);
|
|
1049
668
|
if (retryCount > 0) {
|
|
@@ -1056,21 +675,6 @@ class FileWatcher {
|
|
|
1056
675
|
}
|
|
1057
676
|
}
|
|
1058
677
|
}
|
|
1059
|
-
/**
|
|
1060
|
-
* Snapshot of files seen by the watcher since the last successful sync.
|
|
1061
|
-
*
|
|
1062
|
-
* Used by MCP tool responses to mark stale results without blocking on a
|
|
1063
|
-
* sync: a tool that returns a hit in `src/foo.ts` while `src/foo.ts` is in
|
|
1064
|
-
* this list tells the agent "Read this file directly, the index lags."
|
|
1065
|
-
*
|
|
1066
|
-
* `indexing` is true when a sync is currently in flight whose start time is
|
|
1067
|
-
* AFTER this file's most recent event — i.e. that sync will absorb the
|
|
1068
|
-
* edit. False means the file is still inside the debounce window and no
|
|
1069
|
-
* sync has started yet (a follow-up call a few hundred ms later may show
|
|
1070
|
-
* `indexing: true` or the file may have left the list entirely).
|
|
1071
|
-
*
|
|
1072
|
-
* Cheap: O(pendingFiles.size), no I/O, no locks.
|
|
1073
|
-
*/
|
|
1074
678
|
getPendingFiles() {
|
|
1075
679
|
const result = [];
|
|
1076
680
|
for (const [filePath, info] of this.pendingFiles) {
|
|
@@ -1085,14 +689,6 @@ class FileWatcher {
|
|
|
1085
689
|
}
|
|
1086
690
|
}
|
|
1087
691
|
exports.FileWatcher = FileWatcher;
|
|
1088
|
-
/**
|
|
1089
|
-
* Test-only: synthesize a source-file change for the live watcher running at
|
|
1090
|
-
* `projectRoot`, exercising the real filter → pendingFiles → debounced-sync
|
|
1091
|
-
* logic without depending on fs.watch delivery timing (which races under
|
|
1092
|
-
* parallel vitest). `relPath` is project-relative POSIX (e.g. "src/foo.ts").
|
|
1093
|
-
* Returns false if no live watcher is registered for that root (e.g. outside a
|
|
1094
|
-
* test runtime, where the registry is intentionally not populated).
|
|
1095
|
-
*/
|
|
1096
692
|
function __emitWatchEventForTests(projectRoot, relPath) {
|
|
1097
693
|
const w = liveWatchersForTests.get(projectRoot);
|
|
1098
694
|
if (!w)
|