@colbymchenry/codegraph-win32-arm64 1.6.2 → 1.6.4
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 +507 -702
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/command-supervision.js +1 -57
- 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 +654 -34
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +1466 -1470
- 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 +51 -0
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +76 -530
- 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 +35 -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 +11 -101
- package/lib/dist/extraction/astro-extractor.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +27 -1
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +70 -206
- package/lib/dist/extraction/cfml-extractor.js.map +1 -1
- package/lib/dist/extraction/commonjs-requires.js +0 -31
- package/lib/dist/extraction/commonjs-requires.js.map +1 -1
- 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 +157 -207
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/generated-detection.js +0 -165
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +73 -4
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +160 -431
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +208 -7
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +594 -1383
- 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 +48 -135
- 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.d.ts +5 -1
- package/lib/dist/extraction/kernel/loader.d.ts.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 +125 -28
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +789 -856
- 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.js +3 -55
- package/lib/dist/extraction/languages/csharp.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts +129 -0
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +517 -162
- 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 +11 -0
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +43 -197
- 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.d.ts +9 -0
- package/lib/dist/extraction/languages/php.d.ts.map +1 -1
- package/lib/dist/extraction/languages/php.js +207 -44
- 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-macro-calls.d.ts +32 -0
- package/lib/dist/extraction/languages/rust-macro-calls.d.ts.map +1 -0
- package/lib/dist/extraction/languages/rust-macro-calls.js +306 -0
- package/lib/dist/extraction/languages/rust-macro-calls.js.map +1 -0
- 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.js +3 -47
- 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 +64 -0
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/typescript.js +73 -49
- 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 +42 -7
- package/lib/dist/extraction/parse-budget.d.ts.map +1 -1
- package/lib/dist/extraction/parse-budget.js +39 -15
- package/lib/dist/extraction/parse-budget.js.map +1 -1
- package/lib/dist/extraction/parse-pool.d.ts +29 -17
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +49 -193
- 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 +5 -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 +42 -0
- package/lib/dist/extraction/sfc-script.d.ts.map +1 -1
- package/lib/dist/extraction/sfc-script.js +32 -31
- package/lib/dist/extraction/sfc-script.js.map +1 -1
- 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 +1 -38
- package/lib/dist/extraction/store-worker.js.map +1 -1
- package/lib/dist/extraction/store-writer.js +2 -34
- 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 +11 -87
- 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 +4 -152
- 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 +518 -10
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +2118 -2554
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/vue-extractor.d.ts +13 -0
- package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vue-extractor.js +52 -92
- package/lib/dist/extraction/vue-extractor.js.map +1 -1
- package/lib/dist/extraction/vue-options-api.js +0 -32
- package/lib/dist/extraction/vue-options-api.js.map +1 -1
- 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-dart.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-swift.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts +15 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
- package/lib/dist/extraction/wasm-runtime-flags.js +18 -89
- 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.map +1 -1
- package/lib/dist/graph/branch-guards.js +4 -251
- 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/file-drift.d.ts +35 -0
- package/lib/dist/graph/file-drift.d.ts.map +1 -0
- package/lib/dist/graph/file-drift.js +46 -0
- package/lib/dist/graph/file-drift.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 +82 -223
- 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 +6 -3
- package/lib/dist/graph/queries.d.ts.map +1 -1
- package/lib/dist/graph/queries.js +4 -137
- 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/symbol-references.d.ts +86 -0
- package/lib/dist/graph/symbol-references.d.ts.map +1 -0
- package/lib/dist/graph/symbol-references.js +304 -0
- package/lib/dist/graph/symbol-references.js.map +1 -0
- 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 +33 -0
- package/lib/dist/graph/test-code.d.ts.map +1 -0
- package/lib/dist/graph/test-code.js +104 -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 +96 -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 +214 -26
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +736 -1112
- 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 +13 -6
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +27 -160
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/instructions-template.d.ts +16 -1
- package/lib/dist/installer/instructions-template.d.ts.map +1 -1
- package/lib/dist/installer/instructions-template.js +10 -38
- 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.d.ts.map +1 -1
- package/lib/dist/installer/targets/opencode.js +1 -103
- 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 +83 -13
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +201 -131
- 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 +2 -0
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +9 -85
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-proof.d.ts +19 -0
- package/lib/dist/mcp/daemon-proof.d.ts.map +1 -0
- package/lib/dist/mcp/daemon-proof.js +126 -0
- package/lib/dist/mcp/daemon-proof.js.map +1 -0
- package/lib/dist/mcp/daemon-registry.d.ts +47 -2
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +188 -139
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +69 -0
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +186 -376
- 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 +24 -0
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +47 -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.d.ts +6 -0
- package/lib/dist/mcp/explore-diagnostics.d.ts.map +1 -1
- package/lib/dist/mcp/explore-diagnostics.js +8 -116
- package/lib/dist/mcp/explore-diagnostics.js.map +1 -1
- package/lib/dist/mcp/explore-one-symbol.d.ts +77 -0
- package/lib/dist/mcp/explore-one-symbol.d.ts.map +1 -0
- package/lib/dist/mcp/explore-one-symbol.js +431 -0
- package/lib/dist/mcp/explore-one-symbol.js.map +1 -0
- 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/hook-client.d.ts +44 -0
- package/lib/dist/mcp/hook-client.d.ts.map +1 -0
- package/lib/dist/mcp/hook-client.js +202 -0
- package/lib/dist/mcp/hook-client.js.map +1 -0
- package/lib/dist/mcp/index-freshness-worker.js +1 -6
- package/lib/dist/mcp/index-freshness-worker.js.map +1 -1
- package/lib/dist/mcp/index-freshness.js +0 -15
- 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 +29 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +131 -300
- 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/opencode-tool-names.d.ts +32 -0
- package/lib/dist/mcp/opencode-tool-names.d.ts.map +1 -0
- package/lib/dist/mcp/opencode-tool-names.js +24 -0
- package/lib/dist/mcp/opencode-tool-names.js.map +1 -0
- 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 +6 -0
- package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -1
- package/lib/dist/mcp/project-lifecycle.js +70 -19
- package/lib/dist/mcp/project-lifecycle.js.map +1 -1
- package/lib/dist/mcp/prompt-explore.d.ts +19 -0
- package/lib/dist/mcp/prompt-explore.d.ts.map +1 -0
- package/lib/dist/mcp/prompt-explore.js +6 -0
- package/lib/dist/mcp/prompt-explore.js.map +1 -0
- package/lib/dist/mcp/proxy.d.ts +25 -7
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +145 -274
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +52 -3
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +114 -123
- 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.d.ts +18 -0
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +12 -32
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +46 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +70 -132
- 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 +157 -18
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +797 -3621
- 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.d.ts +20 -0
- package/lib/dist/project-config.d.ts.map +1 -1
- package/lib/dist/project-config.js +31 -140
- 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 +7 -56
- 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 +48 -1
- package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/angular-template-synthesizer.js +401 -65
- package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -1
- 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 +19 -5
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +1395 -1343
- 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 +17 -68
- 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/event-emitter-synthesizer.d.ts +39 -0
- package/lib/dist/resolution/event-emitter-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/event-emitter-synthesizer.js +656 -0
- package/lib/dist/resolution/event-emitter-synthesizer.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.map +1 -1
- package/lib/dist/resolution/frameworks/angular-router.js +41 -208
- package/lib/dist/resolution/frameworks/angular-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/aspnet-routes.d.ts +62 -0
- package/lib/dist/resolution/frameworks/aspnet-routes.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/aspnet-routes.js +382 -0
- package/lib/dist/resolution/frameworks/aspnet-routes.js.map +1 -0
- package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/astro.js +4 -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 +85 -102
- 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/elysia.d.ts +38 -0
- package/lib/dist/resolution/frameworks/elysia.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/elysia.js +683 -0
- package/lib/dist/resolution/frameworks/elysia.js.map +1 -0
- package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.js +8 -88
- package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.js +9 -190
- package/lib/dist/resolution/frameworks/expo-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/express.d.ts +48 -1
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/express.js +193 -199
- package/lib/dist/resolution/frameworks/express.js.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.js +1 -104
- 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 +14 -43
- 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 +14 -0
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +16 -50
- 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 +203 -129
- 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 +71 -136
- package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
- package/lib/dist/resolution/frameworks/name-heuristic.js +0 -12
- package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.js +2 -199
- 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 +10 -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.js +0 -14
- package/lib/dist/resolution/frameworks/page-component.js.map +1 -1
- package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/play.js +26 -34
- package/lib/dist/resolution/frameworks/play.js.map +1 -1
- package/lib/dist/resolution/frameworks/python.js +5 -102
- 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 +13 -4
- package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.js +10 -82
- package/lib/dist/resolution/frameworks/react-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/react.d.ts +57 -0
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react.js +1449 -191
- package/lib/dist/resolution/frameworks/react.js.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.js +1 -61
- 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 +35 -56
- 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 +7 -75
- 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.js +0 -97
- 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.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.js +11 -134
- package/lib/dist/resolution/frameworks/vue-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue.js +42 -114
- 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 +278 -29
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +1825 -1396
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +517 -6
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +1604 -1042
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/js-builtins.d.ts +23 -0
- package/lib/dist/resolution/js-builtins.d.ts.map +1 -1
- package/lib/dist/resolution/js-builtins.js +34 -14
- 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 +210 -0
- package/lib/dist/resolution/module-importers.d.ts.map +1 -0
- package/lib/dist/resolution/module-importers.js +673 -0
- package/lib/dist/resolution/module-importers.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +986 -7
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +24176 -6745
- 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/php-web-root.d.ts +39 -0
- package/lib/dist/resolution/php-web-root.d.ts.map +1 -0
- package/lib/dist/resolution/php-web-root.js +141 -0
- package/lib/dist/resolution/php-web-root.js.map +1 -0
- 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/python-overloads.d.ts +10 -0
- package/lib/dist/resolution/python-overloads.d.ts.map +1 -0
- package/lib/dist/resolution/python-overloads.js +75 -0
- package/lib/dist/resolution/python-overloads.js.map +1 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/react-router-synthesizer.js +3 -55
- package/lib/dist/resolution/react-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/resolver-pool.d.ts +23 -2
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-pool.js +43 -111
- 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 +8 -37
- 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.map +1 -1
- package/lib/dist/resolution/swift-type-visibility.js +62 -104
- package/lib/dist/resolution/swift-type-visibility.js.map +1 -1
- 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.map +1 -1
- package/lib/dist/resolution/tier-synthesizer.js +35 -177
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -1
- package/lib/dist/resolution/type-parameters.d.ts +23 -0
- package/lib/dist/resolution/type-parameters.d.ts.map +1 -1
- package/lib/dist/resolution/type-parameters.js +52 -54
- package/lib/dist/resolution/type-parameters.js.map +1 -1
- package/lib/dist/resolution/types.d.ts +192 -11
- 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 +573 -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 +7 -2
- package/lib/dist/sync/worktree.d.ts.map +1 -1
- package/lib/dist/sync/worktree.js +24 -97
- 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 +15 -135
- 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.js +0 -111
- package/lib/dist/ui-server/api/effects.js.map +1 -1
- package/lib/dist/ui-server/api/entrypoints.js +0 -142
- 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.map +1 -1
- package/lib/dist/ui-server/api/map.js +4 -317
- package/lib/dist/ui-server/api/map.js.map +1 -1
- package/lib/dist/ui-server/api/node.js +0 -111
- 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.map +1 -1
- package/lib/dist/ui-server/api/route-roots.js +2 -44
- package/lib/dist/ui-server/api/route-roots.js.map +1 -1
- package/lib/dist/ui-server/api/routes.d.ts.map +1 -1
- package/lib/dist/ui-server/api/routes.js +4 -60
- 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 +4 -174
- 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 +5 -381
- 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 +19 -94
- package/lib/dist/ui-server/api/trails.js.map +1 -1
- package/lib/dist/ui-server/api/when.js +0 -36
- 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.js +0 -25
- package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -1
- package/lib/dist/ui-server/highlight/index.js +1 -132
- 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.js +0 -5
- package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -1
- 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 +18 -5
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +73 -229
- 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/worker-teardown.js +0 -47
- package/lib/dist/worker-teardown.js.map +1 -1
- 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/directory.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Directory Management
|
|
4
|
-
*
|
|
5
|
-
* Manages the .codegraph/ directory structure for CodeGraph data.
|
|
6
|
-
*/
|
|
7
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
3
|
if (k2 === undefined) k2 = k;
|
|
9
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -58,6 +53,7 @@ exports.extractCodeTokens = extractCodeTokens;
|
|
|
58
53
|
exports.isStructuralPrompt = isStructuralPrompt;
|
|
59
54
|
exports.capPromptHookInjection = capPromptHookInjection;
|
|
60
55
|
exports.planFrontload = planFrontload;
|
|
56
|
+
exports.makeGitignoreLocalOnly = makeGitignoreLocalOnly;
|
|
61
57
|
exports.createDirectory = createDirectory;
|
|
62
58
|
exports.removeDirectory = removeDirectory;
|
|
63
59
|
exports.listDirectoryContents = listDirectoryContents;
|
|
@@ -66,38 +62,18 @@ exports.ensureSubdirectory = ensureSubdirectory;
|
|
|
66
62
|
exports.validateDirectory = validateDirectory;
|
|
67
63
|
exports.isTaskNotification = isTaskNotification;
|
|
68
64
|
exports.isAgentMessage = isAgentMessage;
|
|
65
|
+
exports.isCrossSessionMessage = isCrossSessionMessage;
|
|
66
|
+
exports.stripSystemReminders = stripSystemReminders;
|
|
67
|
+
const child_process_1 = require("child_process");
|
|
69
68
|
const fs = __importStar(require("fs"));
|
|
70
69
|
const os = __importStar(require("os"));
|
|
71
70
|
const path = __importStar(require("path"));
|
|
72
71
|
const watch_policy_1 = require("./sync/watch-policy");
|
|
73
|
-
|
|
72
|
+
const node_sqlite_1 = require("./db/node-sqlite");
|
|
73
|
+
const utils_1 = require("./utils");
|
|
74
74
|
exports.DEFAULT_CODEGRAPH_DIR = '.codegraph';
|
|
75
|
-
/**
|
|
76
|
-
* The data directory name WSL gives a fresh project on a Windows drive, so it
|
|
77
|
-
* never shares one index with CodeGraph on Windows (issue #995). Indexing and
|
|
78
|
-
* watching skip every `.codegraph-*` sibling on both sides (#636).
|
|
79
|
-
*/
|
|
80
75
|
exports.WSL_CODEGRAPH_DIR = '.codegraph-wsl';
|
|
81
76
|
let warnedBadDirName = false;
|
|
82
|
-
/**
|
|
83
|
-
* Resolve the per-project data directory name, honoring the `CODEGRAPH_DIR`
|
|
84
|
-
* environment override (default `.codegraph`). The override is a single path
|
|
85
|
-
* segment that lives in the project root.
|
|
86
|
-
*
|
|
87
|
-
* Why this exists: two environments that share one working tree must NOT share
|
|
88
|
-
* one `.codegraph/` — most concretely Windows-native and WSL (issue #636). The
|
|
89
|
-
* daemon lockfile (`.codegraph/daemon.pid`) records a platform-specific pid and
|
|
90
|
-
* socket path (a Windows named pipe vs a WSL Unix socket), and SQLite file
|
|
91
|
-
* locking across the WSL2 ↔ Windows filesystem boundary is unreliable, so two
|
|
92
|
-
* daemons sharing one index risks corruption. Setting `CODEGRAPH_DIR=.codegraph-win`
|
|
93
|
-
* on one side gives each environment its own index in the same tree.
|
|
94
|
-
*
|
|
95
|
-
* Read live (not captured at load) so it is both process-accurate and testable.
|
|
96
|
-
* An override that isn't a plain directory name — empty, containing a path
|
|
97
|
-
* separator, `.`, `..`/traversal, or absolute — is ignored (we keep the
|
|
98
|
-
* default) rather than risk writing the index outside the project or into the
|
|
99
|
-
* project root itself; we warn once to stderr so the misconfiguration is seen.
|
|
100
|
-
*/
|
|
101
77
|
function codeGraphDirName() {
|
|
102
78
|
const raw = process.env.CODEGRAPH_DIR?.trim();
|
|
103
79
|
if (!raw)
|
|
@@ -110,7 +86,6 @@ function codeGraphDirName() {
|
|
|
110
86
|
if (invalid) {
|
|
111
87
|
if (!warnedBadDirName) {
|
|
112
88
|
warnedBadDirName = true;
|
|
113
|
-
// stderr only — stdout is the MCP protocol channel.
|
|
114
89
|
console.warn(`[codegraph] Ignoring invalid CODEGRAPH_DIR="${raw}" — it must be a plain ` +
|
|
115
90
|
`directory name (no path separators, no "..", not absolute). Using "${exports.DEFAULT_CODEGRAPH_DIR}".`);
|
|
116
91
|
}
|
|
@@ -118,42 +93,12 @@ function codeGraphDirName() {
|
|
|
118
93
|
}
|
|
119
94
|
return raw;
|
|
120
95
|
}
|
|
121
|
-
/**
|
|
122
|
-
* CodeGraph directory name — a load-time snapshot of {@link codeGraphDirName}.
|
|
123
|
-
* A running process's environment is fixed, so this equals the live value;
|
|
124
|
-
* it's kept as a stable string export for backward compatibility. Internal code
|
|
125
|
-
* resolves the name through {@link codeGraphDirName} / {@link getCodeGraphDir}
|
|
126
|
-
* so the `CODEGRAPH_DIR` override always applies.
|
|
127
|
-
*/
|
|
128
96
|
exports.CODEGRAPH_DIR = codeGraphDirName();
|
|
129
|
-
/**
|
|
130
|
-
* Is `name` (a single path segment) a CodeGraph data directory? Matches the
|
|
131
|
-
* default `.codegraph`, the active `CODEGRAPH_DIR` override, and any
|
|
132
|
-
* `.codegraph-*` sibling. File-watching and the indexer skip ALL of these, so
|
|
133
|
-
* when two environments share one working tree (Windows + WSL, issue #636)
|
|
134
|
-
* neither indexes or watches the other's index directory.
|
|
135
|
-
*/
|
|
136
97
|
function isCodeGraphDataDir(name) {
|
|
137
98
|
return (name === exports.DEFAULT_CODEGRAPH_DIR ||
|
|
138
99
|
name === codeGraphDirName() ||
|
|
139
100
|
name.startsWith(exports.DEFAULT_CODEGRAPH_DIR + '-'));
|
|
140
101
|
}
|
|
141
|
-
/**
|
|
142
|
-
* The data directory name for one project: {@link codeGraphDirName}, except
|
|
143
|
-
* for a project on a Windows drive under WSL (`/mnt/c/...`) with no
|
|
144
|
-
* `CODEGRAPH_DIR` set. Windows-native CodeGraph opens `.codegraph` in that
|
|
145
|
-
* same tree, and SQLite's locking doesn't hold across the 9p/DrvFs bridge, so
|
|
146
|
-
* the two sharing one index fails with "disk I/O error" (issue #995). There:
|
|
147
|
-
*
|
|
148
|
-
* 1. `.codegraph-wsl/` exists → it. Once WSL has its own index it keeps it,
|
|
149
|
-
* even after Windows builds a `.codegraph` beside it.
|
|
150
|
-
* 2. `.codegraph/codegraph.db` exists → `.codegraph`. An index built before
|
|
151
|
-
* this default is kept rather than silently rebuilt somewhere else.
|
|
152
|
-
* 3. neither → `.codegraph-wsl`, so a fresh WSL index never shares.
|
|
153
|
-
*
|
|
154
|
-
* Every other host keeps the plain name without a stat: the WSL check is
|
|
155
|
-
* cached per process.
|
|
156
|
-
*/
|
|
157
102
|
function codeGraphDirNameFor(projectRoot) {
|
|
158
103
|
if (process.env.CODEGRAPH_DIR?.trim() || !(0, watch_policy_1.isWslWindowsDrive)(projectRoot))
|
|
159
104
|
return codeGraphDirName();
|
|
@@ -162,41 +107,19 @@ function codeGraphDirNameFor(projectRoot) {
|
|
|
162
107
|
return exports.WSL_CODEGRAPH_DIR;
|
|
163
108
|
}
|
|
164
109
|
catch {
|
|
165
|
-
// absent — fall through
|
|
166
110
|
}
|
|
167
111
|
if (fs.existsSync(path.join(projectRoot, exports.DEFAULT_CODEGRAPH_DIR, 'codegraph.db')))
|
|
168
112
|
return exports.DEFAULT_CODEGRAPH_DIR;
|
|
169
113
|
return exports.WSL_CODEGRAPH_DIR;
|
|
170
114
|
}
|
|
171
|
-
/**
|
|
172
|
-
* Get the .codegraph directory path for a project
|
|
173
|
-
*/
|
|
174
115
|
function getCodeGraphDir(projectRoot) {
|
|
175
116
|
return path.join(projectRoot, codeGraphDirNameFor(projectRoot));
|
|
176
117
|
}
|
|
177
|
-
/**
|
|
178
|
-
* Check if a project has been initialized with CodeGraph.
|
|
179
|
-
*
|
|
180
|
-
* Requires `.codegraph/codegraph.db` to exist AND to carry the codegraph
|
|
181
|
-
* schema. A file that merely exists — empty, or a SQLite database with no
|
|
182
|
-
* tables, as an interrupted `init` or a stray `touch` leaves behind — used to
|
|
183
|
-
* count as initialized, so one such file in an ANCESTOR directory (worst
|
|
184
|
-
* case: `$HOME`) captured the upward resolution of every project beneath it
|
|
185
|
-
* and made their real indexes unreachable (#1895).
|
|
186
|
-
*
|
|
187
|
-
* The probe is cheap and gated so hot callers (the prompt hook, MCP root
|
|
188
|
-
* resolution on every call) pay one `stat`: file size, then a read-only
|
|
189
|
-
* SQLite open with a single `sqlite_master` lookup — memoized per path +
|
|
190
|
-
* mtime + size so an unchanged db is never reopened. A database that cannot
|
|
191
|
-
* be inspected counts as initialized (see probeSchema) — only a proven-absent
|
|
192
|
-
* schema, or a file SQLite refuses as not a database, says no.
|
|
193
|
-
*/
|
|
194
118
|
function isInitialized(projectRoot) {
|
|
195
119
|
const codegraphDir = getCodeGraphDir(projectRoot);
|
|
196
120
|
if (!fs.existsSync(codegraphDir) || !fs.statSync(codegraphDir).isDirectory()) {
|
|
197
121
|
return false;
|
|
198
122
|
}
|
|
199
|
-
// Must have codegraph.db, not just .codegraph folder
|
|
200
123
|
const dbPath = path.join(codegraphDir, 'codegraph.db');
|
|
201
124
|
let st;
|
|
202
125
|
try {
|
|
@@ -207,12 +130,6 @@ function isInitialized(projectRoot) {
|
|
|
207
130
|
}
|
|
208
131
|
return hasCodeGraphSchema(dbPath, st);
|
|
209
132
|
}
|
|
210
|
-
/**
|
|
211
|
-
* `codegraph.db` exists at `projectRoot` but does not carry the schema, and
|
|
212
|
-
* `init` can add it in place: an empty file, or a SQLite database without the
|
|
213
|
-
* codegraph tables (#1895). A file that is not SQLite at all is NOT this case —
|
|
214
|
-
* see {@link hasForeignDbFile}.
|
|
215
|
-
*/
|
|
216
133
|
function hasSchemalessDb(projectRoot) {
|
|
217
134
|
const dbPath = path.join(getCodeGraphDir(projectRoot), 'codegraph.db');
|
|
218
135
|
let st;
|
|
@@ -226,12 +143,6 @@ function hasSchemalessDb(projectRoot) {
|
|
|
226
143
|
return false;
|
|
227
144
|
return st.size === 0 || probeSchema(dbPath) === 'no-schema';
|
|
228
145
|
}
|
|
229
|
-
/**
|
|
230
|
-
* `codegraph.db` exists at `projectRoot` and is not a SQLite database (no
|
|
231
|
-
* header magic): SQLite refuses to open it, so `init` cannot rebuild it in
|
|
232
|
-
* place. The caller must say so rather than promise a repair; nothing here
|
|
233
|
-
* deletes the file.
|
|
234
|
-
*/
|
|
235
146
|
function hasForeignDbFile(projectRoot) {
|
|
236
147
|
const dbPath = path.join(getCodeGraphDir(projectRoot), 'codegraph.db');
|
|
237
148
|
let st;
|
|
@@ -243,9 +154,7 @@ function hasForeignDbFile(projectRoot) {
|
|
|
243
154
|
}
|
|
244
155
|
return st.isFile() && st.size > 0 && probeSchema(dbPath) === 'not-sqlite';
|
|
245
156
|
}
|
|
246
|
-
/** A SQLite file header is 100 bytes; anything shorter cannot hold a schema. */
|
|
247
157
|
const SQLITE_HEADER_SIZE = 100;
|
|
248
|
-
/** SQLITE_NOTADB: SQLite read the file and it is not a database. */
|
|
249
158
|
const SQLITE_NOTADB = 26;
|
|
250
159
|
const schemaProbeCache = new Map();
|
|
251
160
|
function hasCodeGraphSchema(dbPath, st) {
|
|
@@ -259,27 +168,10 @@ function hasCodeGraphSchema(dbPath, st) {
|
|
|
259
168
|
schemaProbeCache.set(dbPath, { mtimeMs: st.mtimeMs, size: st.size, ok });
|
|
260
169
|
return ok;
|
|
261
170
|
}
|
|
262
|
-
/**
|
|
263
|
-
* What `codegraph.db` holds, asked of SQLite itself through a read-only
|
|
264
|
-
* connection: the codegraph schema, a database without it, not a database at
|
|
265
|
-
* all (SQLITE_NOTADB), or `unknown` — locked, busy, a WAL db in a directory we
|
|
266
|
-
* cannot create `-shm` in (read-only checkout, mount, another user's tree),
|
|
267
|
-
* disk I/O. Callers treat `unknown` as initialized: the pre-existing behaviour
|
|
268
|
-
* for a database we cannot inspect.
|
|
269
|
-
*
|
|
270
|
-
* The file is never read through a descriptor of our own, not even for its
|
|
271
|
-
* 16-byte header. Closing ANY descriptor on a database file drops every POSIX
|
|
272
|
-
* lock this process holds on it, including those of a connection it already
|
|
273
|
-
* has open (sqlite.org/howtocorrupt.html §2.2.1) — and the MCP server resolves
|
|
274
|
-
* projects through isInitialized on every call while it holds the index as
|
|
275
|
-
* its writer. SQLite's own connections share one lock table per file, so a
|
|
276
|
-
* second connection opened and closed here leaves the first one's locks alone.
|
|
277
|
-
*/
|
|
278
171
|
function probeSchema(dbPath) {
|
|
279
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
280
|
-
const { DatabaseSync } = require('node:sqlite');
|
|
281
172
|
let db = null;
|
|
282
173
|
try {
|
|
174
|
+
const { DatabaseSync } = (0, node_sqlite_1.loadNodeSqlite)();
|
|
283
175
|
db = new DatabaseSync(dbPath, { readOnly: true });
|
|
284
176
|
const row = db.prepare("SELECT 1 AS ok FROM sqlite_master WHERE type = 'table' AND name = 'nodes'").get();
|
|
285
177
|
return row !== undefined ? 'schema' : 'no-schema';
|
|
@@ -288,36 +180,12 @@ function probeSchema(dbPath) {
|
|
|
288
180
|
return error?.errcode === SQLITE_NOTADB ? 'not-sqlite' : 'unknown';
|
|
289
181
|
}
|
|
290
182
|
finally {
|
|
291
|
-
// Never hold the handle: Windows file locking would block the owner.
|
|
292
183
|
try {
|
|
293
184
|
db?.close();
|
|
294
185
|
}
|
|
295
|
-
catch {
|
|
186
|
+
catch { }
|
|
296
187
|
}
|
|
297
188
|
}
|
|
298
|
-
/**
|
|
299
|
-
* Find the nearest parent directory containing .codegraph/
|
|
300
|
-
*
|
|
301
|
-
* Walks up from the given path to find a CodeGraph-initialized project,
|
|
302
|
-
* similar to how git finds .git/ directories.
|
|
303
|
-
*
|
|
304
|
-
* @param startPath - Directory to start searching from
|
|
305
|
-
* @returns The project root containing .codegraph/, or null if not found
|
|
306
|
-
*/
|
|
307
|
-
/**
|
|
308
|
-
* Reason a directory is unsafe to use as an index ROOT, or null when it's fine.
|
|
309
|
-
*
|
|
310
|
-
* Indexing your home directory or a filesystem root drags in caches, `Library`,
|
|
311
|
-
* every other project, etc. — a multi-GB index, constant file-watcher churn, and
|
|
312
|
-
* (pre-1.0 on macOS) a file-descriptor blowup that exhausted `kern.maxfiles` and
|
|
313
|
-
* took unrelated apps / the whole machine down (#845). The classic trigger:
|
|
314
|
-
* running the installer or `codegraph init` from `$HOME`, which auto-indexes the
|
|
315
|
-
* current directory. These are never intended project roots, so the installer
|
|
316
|
-
* and `init`/`index` refuse them (overridable with `--force`).
|
|
317
|
-
*
|
|
318
|
-
* Pure-ish (reads only `os.homedir()` + realpath) so it's easy to unit-test.
|
|
319
|
-
* The returned string is a human phrase that slots into "… looks like {reason}".
|
|
320
|
-
*/
|
|
321
189
|
function unsafeIndexRootReason(projectRoot) {
|
|
322
190
|
const resolve = (p) => {
|
|
323
191
|
try {
|
|
@@ -328,33 +196,21 @@ function unsafeIndexRootReason(projectRoot) {
|
|
|
328
196
|
}
|
|
329
197
|
};
|
|
330
198
|
const resolved = resolve(projectRoot);
|
|
331
|
-
// Filesystem root: `/` on POSIX, a drive root like `C:\` on Windows.
|
|
332
199
|
if (path.parse(resolved).root === resolved) {
|
|
333
200
|
return 'the filesystem root';
|
|
334
201
|
}
|
|
335
202
|
const home = resolve(os.homedir());
|
|
336
|
-
// Case-insensitive on macOS/Windows (case-preserving but case-insensitive FS).
|
|
337
203
|
const norm = (p) => process.platform === 'darwin' || process.platform === 'win32' ? p.toLowerCase() : p;
|
|
338
204
|
const r = norm(resolved);
|
|
339
205
|
const h = norm(home);
|
|
340
206
|
if (r === h) {
|
|
341
207
|
return 'your home directory';
|
|
342
208
|
}
|
|
343
|
-
// An ancestor of home (e.g. `/Users`, `/home`) — even broader than home.
|
|
344
209
|
if (h.startsWith(r + path.sep)) {
|
|
345
210
|
return 'a parent of your home directory';
|
|
346
211
|
}
|
|
347
212
|
return null;
|
|
348
213
|
}
|
|
349
|
-
/**
|
|
350
|
-
* `dev:ino` for a path, or null if it can't be stat'd or the platform doesn't
|
|
351
|
-
* report a usable inode. Read as bigints: WSL DrvFs (`/mnt/c`) reports inodes
|
|
352
|
-
* above 2^53, where a plain number rounds nearby inodes onto one value. Windows
|
|
353
|
-
* st_ino is unreliable across handle reopens, so we deliberately return null
|
|
354
|
-
* there — the deleted-but-open-inode hazard this guards (#925) is a POSIX
|
|
355
|
-
* file-semantics issue that doesn't arise on Windows (an open file can't be
|
|
356
|
-
* unlinked).
|
|
357
|
-
*/
|
|
358
214
|
function statInode(p) {
|
|
359
215
|
if (process.platform === 'win32')
|
|
360
216
|
return null;
|
|
@@ -366,28 +222,6 @@ function statInode(p) {
|
|
|
366
222
|
return null;
|
|
367
223
|
}
|
|
368
224
|
}
|
|
369
|
-
/**
|
|
370
|
-
* Canonicalize a project root for IDENTITY: hashing it into a rendezvous key
|
|
371
|
-
* (the daemon's named pipe / tmpdir socket, a registry record). Not for display
|
|
372
|
-
* — the caller-visible root keeps its own spelling.
|
|
373
|
-
*
|
|
374
|
-
* The contract is that two spellings of ONE directory yield ONE string, because
|
|
375
|
-
* a client that derives a different key silently fails to meet the daemon that
|
|
376
|
-
* is already running: it probes a socket nobody bound, spawns a redundant
|
|
377
|
-
* daemon, and that daemon dies on the lock the first one holds, so the session
|
|
378
|
-
* degrades to a single-process engine. `path.resolve` alone does NOT satisfy
|
|
379
|
-
* that contract — NTFS is case-insensitive, so `d:\work\codegraph` and
|
|
380
|
-
* `D:\work\codegraph` name one directory but two strings, and non-native
|
|
381
|
-
* `fs.realpathSync` keeps whichever casing the caller passed (only `.native`
|
|
382
|
-
* asks the filesystem for the on-disk name — the same reason
|
|
383
|
-
* {@link isSameIndexRoot} uses it). Both spellings really do occur: a
|
|
384
|
-
* cwd-derived root is the on-disk case, while a client-supplied
|
|
385
|
-
* `rootUri`/`workspaceFolders` path arrives as `file:///d%3A/…`.
|
|
386
|
-
*
|
|
387
|
-
* The Windows lowercase is belt-and-braces on top of the native realpath — NTFS
|
|
388
|
-
* can't hold two directories differing only by case, and it also absorbs a
|
|
389
|
-
* `\\?\`-prefixed native result diverging from a plain one.
|
|
390
|
-
*/
|
|
391
225
|
function canonicalProjectRoot(projectRoot) {
|
|
392
226
|
const resolved = path.resolve(projectRoot);
|
|
393
227
|
let canonical = resolved;
|
|
@@ -395,19 +229,9 @@ function canonicalProjectRoot(projectRoot) {
|
|
|
395
229
|
canonical = fs.realpathSync.native(resolved);
|
|
396
230
|
}
|
|
397
231
|
catch {
|
|
398
|
-
// ENOENT/EACCES/ELOOP — the root is normally there (`.codegraph/` lives in
|
|
399
|
-
// it), so this is a fallback rather than a path we expect to take.
|
|
400
232
|
}
|
|
401
233
|
return process.platform === 'win32' ? canonical.toLowerCase() : canonical;
|
|
402
234
|
}
|
|
403
|
-
/**
|
|
404
|
-
* Whether two resolved index roots are one index spelled two ways — a symlinked
|
|
405
|
-
* checkout, or a case-variant on a case-insensitive mount (macOS, NTFS, WSL
|
|
406
|
-
* DrvFs `/mnt/c`), where `realpathSync` keeps the caller's casing (#1057).
|
|
407
|
-
* Compares the identity of both data directories as they are NOW, so an inode
|
|
408
|
-
* reused after a delete can't match: the deleted root no longer stats. Windows
|
|
409
|
-
* has no usable inode, so it compares the on-disk-cased native realpaths.
|
|
410
|
-
*/
|
|
411
235
|
function isSameIndexRoot(a, b) {
|
|
412
236
|
if (a === b)
|
|
413
237
|
return true;
|
|
@@ -431,24 +255,19 @@ function findNearestCodeGraphRoot(startPath) {
|
|
|
431
255
|
}
|
|
432
256
|
const parent = path.dirname(current);
|
|
433
257
|
if (parent === current)
|
|
434
|
-
break;
|
|
258
|
+
break;
|
|
435
259
|
current = parent;
|
|
436
260
|
}
|
|
437
|
-
// Check root as well
|
|
438
261
|
if (isInitialized(current)) {
|
|
439
262
|
return current;
|
|
440
263
|
}
|
|
441
264
|
return null;
|
|
442
265
|
}
|
|
443
|
-
/** Heavy/irrelevant directory names the sub-project scan never descends into. */
|
|
444
266
|
const SUBPROJECT_SCAN_SKIP = new Set([
|
|
445
267
|
'node_modules', '.git', '.svn', '.hg', 'dist', 'build', 'out', 'target',
|
|
446
268
|
'vendor', 'bin', 'obj', '.next', '.nuxt', '.svelte-kit', '.cache', 'coverage',
|
|
447
269
|
'.venv', 'venv', '__pycache__', '.turbo', '.idea', '.vscode', 'tmp', 'temp',
|
|
448
270
|
]);
|
|
449
|
-
/** Manifests that mark a directory as a project/workspace root. The down-scan
|
|
450
|
-
* is gated on one of these so a non-project cwd (e.g. `$HOME`) is a cheap
|
|
451
|
-
* no-op instead of a deep filesystem crawl. */
|
|
452
271
|
const WORKSPACE_ROOT_MANIFESTS = [
|
|
453
272
|
'package.json', 'pnpm-workspace.yaml', 'lerna.json', 'nx.json', 'turbo.json',
|
|
454
273
|
'go.work', 'go.mod', 'Cargo.toml', 'pom.xml', 'build.gradle', 'build.gradle.kts',
|
|
@@ -461,16 +280,7 @@ function looksLikeProjectRoot(dir) {
|
|
|
461
280
|
function escapeRegExp(s) {
|
|
462
281
|
return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
463
282
|
}
|
|
464
|
-
/**
|
|
465
|
-
* Indexed sub-project roots beneath `root` (bounded breadth-first scan). For
|
|
466
|
-
* the monorepo case behind #964: the index lives in a CHILD
|
|
467
|
-
* (`packages/x/.codegraph/`), not at the workspace root the agent's cwd points
|
|
468
|
-
* at. Descent stops at the first indexed directory on a branch (a project's
|
|
469
|
-
* own sub-dirs aren't separate projects) and is bounded by depth + count so it
|
|
470
|
-
* never turns into a full-tree crawl on a large repo.
|
|
471
|
-
*/
|
|
472
283
|
function findIndexedSubprojectRoots(root, opts = {}) {
|
|
473
|
-
// A stray workspace manifest must not enable scanning home or broader roots (#1454).
|
|
474
284
|
if (unsafeIndexRootReason(root) !== null)
|
|
475
285
|
return [];
|
|
476
286
|
const maxDepth = opts.maxDepth ?? 4;
|
|
@@ -497,22 +307,13 @@ function findIndexedSubprojectRoots(root, opts = {}) {
|
|
|
497
307
|
if (isInitialized(child)) {
|
|
498
308
|
out.push(child);
|
|
499
309
|
continue;
|
|
500
|
-
}
|
|
310
|
+
}
|
|
501
311
|
walk(child, depth + 1);
|
|
502
312
|
}
|
|
503
313
|
};
|
|
504
314
|
walk(root, 1);
|
|
505
315
|
return out;
|
|
506
316
|
}
|
|
507
|
-
/**
|
|
508
|
-
* Whether `base` is a plausible workspace root for the sub-project down-scan.
|
|
509
|
-
* Mirrors `planFrontload`'s manifest gate, widened to accept a bare `.git`
|
|
510
|
-
* entry — the #1606 shape is a workspace container holding only agent config
|
|
511
|
-
* and a `.git`, with every build manifest living in the indexed children. The
|
|
512
|
-
* user's home directory and the filesystem root are never eligible: a stray
|
|
513
|
-
* manifest there must not turn server startup into a scan that could adopt an
|
|
514
|
-
* unrelated project (#1454 documents that failure mode for the prompt-hook).
|
|
515
|
-
*/
|
|
516
317
|
function eligibleForSubprojectScan(base) {
|
|
517
318
|
if (base === path.parse(base).root)
|
|
518
319
|
return false;
|
|
@@ -529,283 +330,100 @@ function eligibleForSubprojectScan(base) {
|
|
|
529
330
|
return true;
|
|
530
331
|
return fs.existsSync(path.join(base, '.git'));
|
|
531
332
|
}
|
|
532
|
-
/**
|
|
533
|
-
* Resolve the project root an MCP server should serve as its DEFAULT project
|
|
534
|
-
* (#1606). Up-walk first (`findNearestCodeGraphRoot` — the common case, and
|
|
535
|
-
* cheap). When nothing is indexed at or above `searchFrom`, run the bounded
|
|
536
|
-
* sub-project down-scan `planFrontload` already uses, behind the workspace
|
|
537
|
-
* gate above: EXACTLY ONE indexed sub-project is unambiguous and is adopted
|
|
538
|
-
* as the root; zero or several yield no root, with the candidates carried so
|
|
539
|
-
* the caller can name them instead of failing silently (#1607).
|
|
540
|
-
*
|
|
541
|
-
* `opts.subprojectScan: false` skips the down-scan entirely (the per-tool-call
|
|
542
|
-
* retry path throttles it; the up-walk always runs).
|
|
543
|
-
*/
|
|
544
333
|
function resolveServerRoot(searchFrom, opts = {}) {
|
|
334
|
+
const found = findServerRoot(searchFrom, opts);
|
|
335
|
+
if (!found.root && found.candidates.length === 0)
|
|
336
|
+
return found;
|
|
337
|
+
const startRefusal = fs.existsSync(searchFrom) ? (0, utils_1.sensitiveDirectoryRefusal)(searchFrom) : null;
|
|
338
|
+
if (!found.root)
|
|
339
|
+
return startRefusal ? { ...found, candidates: [] } : found;
|
|
340
|
+
const refusal = startRefusal ?? (0, utils_1.sensitiveDirectoryRefusal)(found.root);
|
|
341
|
+
return refusal ? { root: null, viaSubScan: false, candidates: [], refusal } : found;
|
|
342
|
+
}
|
|
343
|
+
function findServerRoot(searchFrom, opts) {
|
|
344
|
+
const none = { root: null, viaSubScan: false, candidates: [], refusal: null };
|
|
545
345
|
const up = findNearestCodeGraphRoot(searchFrom);
|
|
546
346
|
if (up)
|
|
547
|
-
return { root: up, viaSubScan: false, candidates: [] };
|
|
347
|
+
return { root: up, viaSubScan: false, candidates: [], refusal: null };
|
|
548
348
|
if (opts.subprojectScan === false)
|
|
549
|
-
return
|
|
349
|
+
return none;
|
|
550
350
|
const base = path.resolve(searchFrom);
|
|
551
351
|
if (!eligibleForSubprojectScan(base))
|
|
552
|
-
return
|
|
352
|
+
return none;
|
|
553
353
|
const subs = findIndexedSubprojectRoots(base);
|
|
554
354
|
if (subs.length === 1)
|
|
555
|
-
return { root: subs[0], viaSubScan: true, candidates: subs };
|
|
556
|
-
return {
|
|
355
|
+
return { root: subs[0], viaSubScan: true, candidates: subs, refusal: null };
|
|
356
|
+
return { ...none, candidates: subs };
|
|
557
357
|
}
|
|
558
|
-
/**
|
|
559
|
-
* Unicode-aware word-boundary emulation for the keyword lists below. JS's `\b`
|
|
560
|
-
* is ASCII-only — it fires only at `[A-Za-z0-9_]` edges — so it can never bound
|
|
561
|
-
* a keyword whose first or last character is accented or non-Latin: `/\boù\b/`
|
|
562
|
-
* NEVER matches "où est …" (ù isn't an ASCII word char, so no boundary exists
|
|
563
|
-
* next to it). That is the #994 CJK mechanism resurfaced for Latin scripts and
|
|
564
|
-
* Cyrillic (#1126). A lookaround — "not flanked by a letter, digit, or
|
|
565
|
-
* underscore" — is the script-independent equivalent.
|
|
566
|
-
*/
|
|
567
358
|
const NOT_WORD_BEFORE = /(?<![\p{L}\p{N}_])/u.source;
|
|
568
359
|
const NOT_WORD_AFTER = /(?![\p{L}\p{N}_])/u.source;
|
|
569
|
-
/**
|
|
570
|
-
* Structural keywords matched as EXACT words (boundary on both sides): short
|
|
571
|
-
* or ambiguous tokens where prefix matching would false-positive ("flow" in
|
|
572
|
-
* "flower", "path" in "pathological"). Grouped by language; a term appears once
|
|
573
|
-
* even when several languages share it. Ambiguous everyday words like PT/ES
|
|
574
|
-
* "como" and DE "wie" are excluded: the hook instead requires another strong
|
|
575
|
-
* keyword, a verified code token, or indexed prose segments (#1654).
|
|
576
|
-
*/
|
|
577
360
|
const STRUCTURAL_WORDS = [
|
|
578
|
-
// English — the pre-#1126 list minus what moved to STRUCTURAL_STEMS: the
|
|
579
|
-
// bare-stem entries never matched their own derived forms (`\barchitect\b`
|
|
580
|
-
// can't match "architecture"), and "what calls" is subsumed by the "call" stem.
|
|
581
361
|
'how', 'where', 'tracing', 'flows?', 'paths?', 'reach(?:es|ed)?', 'wired?', 'breaks?', 'why does',
|
|
582
|
-
// French (où=where, flux=flow, chemin=path, casse=breaks)
|
|
583
362
|
'comment', 'où', 'flux', 'chemins?', 'casse',
|
|
584
|
-
// Spanish (cómo=how, dónde/donde=where, flujo=flow, ruta/camino=path,
|
|
585
|
-
// rompe=breaks, llaman / quién llama = call(s) — bare "llama" is excluded:
|
|
586
|
-
// it's also the animal/model name in English prompts)
|
|
587
363
|
'cómo', 'dónde', 'donde', 'flujos?', 'rutas?', 'caminos?', 'rompe', 'llaman', 'quién llama', 'quien llama',
|
|
588
|
-
// Portuguese (onde=where, fluxo=flow, caminho=path)
|
|
589
364
|
'onde', 'fluxos?', 'caminhos?',
|
|
590
|
-
// German (wo/woher/wohin=where, Pfad=path, Fluss/Ablauf=flow,
|
|
591
|
-
// bricht/kaputt=breaks, ruft=calls, hängt=depends — "hängt … von X ab"
|
|
592
|
-
// splits the separable verb "abhängen", so the "abhäng" stem can't catch it)
|
|
593
365
|
'wo', 'woher', 'wohin', 'pfade?', 'fluss', 'ablauf', 'bricht', 'kaputt', 'ruft', 'hängt',
|
|
594
|
-
// Italian (dove=where, flusso=flow, percorso/i=path)
|
|
595
366
|
'dove', 'flusso', 'percors[oi]',
|
|
596
|
-
// Russian (как=how, где=where, путь/пути=path, работает=works)
|
|
597
367
|
'как', 'где', 'путь', 'пути', 'работает',
|
|
598
|
-
// Ukrainian (як=how, де=where, потік=flow — обліque cases reuse the RU
|
|
599
|
-
// "поток" stem; працює=works)
|
|
600
368
|
'як', 'де', 'потік', 'працює',
|
|
601
|
-
// Dutch (hoe=how, waar=where, roept=calls, werkt=works, aangeroepen=called —
|
|
602
|
-
// the ge- participle escapes the "aanroep" stem)
|
|
603
369
|
'hoe', 'waar', 'roept', 'werkt', 'aangeroepen',
|
|
604
|
-
// Polish + Czech (jak=how — shared; gdzie/kde=where, cesta=path)
|
|
605
370
|
'jak', 'gdzie', 'kde', 'cesta',
|
|
606
|
-
// Romanian (cum=how, unde=where; flux is shared with French)
|
|
607
371
|
'cum', 'unde',
|
|
608
|
-
// Hungarian (hogyan=how, hol=where)
|
|
609
372
|
'hogyan', 'hol',
|
|
610
|
-
// Turkish (nasıl=how, mimari=architecture, takip=trace/follow)
|
|
611
373
|
'nasıl', 'mimari', 'takip',
|
|
612
|
-
// Indonesian/Malay (bagaimana=how, di mana/dimana=where, alur=flow, jalur=path)
|
|
613
374
|
'bagaimana', 'di mana', 'dimana', 'alur', 'jalur',
|
|
614
|
-
// Vietnamese — spaced Latin with heavy diacritics, the exact class ASCII `\b`
|
|
615
|
-
// breaks (làm sao/thế nào=how, ở đâu=where, gọi=call, phụ thuộc=depend,
|
|
616
|
-
// ảnh hưởng=affect, kiến trúc=architecture, cấu trúc=structure, luồng=flow,
|
|
617
|
-
// đường dẫn=path, hoạt động=works, giải thích=explain, theo dõi=trace)
|
|
618
375
|
'làm sao', 'thế nào', 'ở đâu', 'gọi', 'phụ thuộc', 'ảnh hưởng', 'kiến trúc',
|
|
619
376
|
'cấu trúc', 'luồng', 'đường dẫn', 'hoạt động', 'giải thích', 'theo dõi',
|
|
620
|
-
// Swedish / Danish / Norwegian (hur/hvordan=how, hvor=where, beror=depends,
|
|
621
|
-
// flöde=flow)
|
|
622
377
|
'hur', 'hvordan', 'hvor', 'beror', 'flöde',
|
|
623
|
-
// Finnish (miten=how, missä=where, toimii=works)
|
|
624
378
|
'miten', 'missä', 'toimii',
|
|
625
|
-
// Greek (πώς=how, πού=where — accented forms only: unaccented πως/που are
|
|
626
|
-
// ubiquitous conjunctions; καλεί=calls, δομή=structure, ροή=flow)
|
|
627
379
|
'πώς', 'πού', 'καλεί', 'δομή', 'ροή',
|
|
628
|
-
// Hindi (कैसे=how, कहाँ/कहां=where, कॉल=call, निर्भर=depends,
|
|
629
|
-
// संरचना=structure, प्रवाह=flow)
|
|
630
380
|
'कैसे', 'कहाँ', 'कहां', 'कॉल', 'निर्भर', 'संरचना', 'प्रवाह',
|
|
631
381
|
];
|
|
632
|
-
/**
|
|
633
|
-
* Structural keyword STEMS matched as word PREFIXES (boundary on the left
|
|
634
|
-
* only), so derived forms match without enumerating each: "architect" fires on
|
|
635
|
-
* architecture/architectural, "depend" on depends/dependency/dependencies,
|
|
636
|
-
* "вызыва" on вызывает/вызывается. Mid-word occurrences stay excluded —
|
|
637
|
-
* "restructure"/"independent" don't fire — so precision stays close to the
|
|
638
|
-
* exact-word class. Add a stem only when every plausible completion is still a
|
|
639
|
-
* structural word; a stem with ordinary-English completions must instead
|
|
640
|
-
* enumerate its structural suffixes and re-assert the right boundary (see the
|
|
641
|
-
* four bounded English entries below, #1138).
|
|
642
|
-
*/
|
|
643
382
|
const STRUCTURAL_STEMS = [
|
|
644
|
-
// English + the Latin-script languages that share the spelling (French
|
|
645
|
-
// architecture/structure/trace/impact, Spanish depende/implementa/impacto, …).
|
|
646
|
-
// call/trace/affect/connect are NOT safe as open prefixes — callus,
|
|
647
|
-
// calligraphy, Connecticut, connective, affectionate, Tracey are ordinary
|
|
648
|
-
// words that would false-fire the full-explore tier (#1138) — so they carry
|
|
649
|
-
// an enumerated suffix set + right boundary. "tracing" lives in
|
|
650
|
-
// STRUCTURAL_WORDS (the e is dropped, so no trace-prefix form matches it).
|
|
651
383
|
'architect', 'structur', 'depend', 'implement', 'impact', 'explain',
|
|
652
384
|
`call(?:s|ing|ed|ers?|backs?|able|sites?)?${NOT_WORD_AFTER}`,
|
|
653
385
|
`trace(?:s|d|rs?)?${NOT_WORD_AFTER}`,
|
|
654
386
|
`affect(?:s|ed|ing)?${NOT_WORD_AFTER}`,
|
|
655
387
|
`connect(?:s|ed|ing|ions?|ors?|ivity)?${NOT_WORD_AFTER}`,
|
|
656
|
-
// French (appel(le)=call, dépend=depends, implément(e)=implement,
|
|
657
|
-
// connex(ion)=connection, expliqu(e)=explain, fonctionn(e/ement)=works)
|
|
658
388
|
'appel', 'dépend', 'implément', 'connex', 'expliqu', 'fonctionn',
|
|
659
|
-
// Spanish (llamad(a)=call, afect(a)=affect, conect(a)/conexi(ón)=connect,
|
|
660
|
-
// arquitec(tura)=architecture, estructur(a)=structure, funcion(a)=works,
|
|
661
|
-
// traza(r)=trace, explica=explain)
|
|
662
389
|
'llamad', 'afect', 'conect', 'conexi', 'arquitec', 'estructur', 'funcion', 'traza', 'explica',
|
|
663
|
-
// Portuguese (chama(da)=call, afeta=affect, arquitet(ura)=architecture,
|
|
664
|
-
// estrutur(a)=structure, quebra(do)=breaks)
|
|
665
390
|
'chama', 'afeta', 'arquitet', 'estrutur', 'quebra',
|
|
666
|
-
// German (abhäng(t)=depend, Auswirkung=impact, beeinfluss(t)=affect,
|
|
667
|
-
// verbind(et)=connect, Architektur, Struktur, funktionier(t)=works,
|
|
668
|
-
// Aufruf/aufgerufen=call, erklär(t)=explain, verfolg(en)=trace)
|
|
669
391
|
'abhäng', 'auswirkung', 'beeinfluss', 'verbind', 'architekt', 'struktur', 'funktionier', 'aufruf', 'aufgerufen', 'erklär', 'verfolg',
|
|
670
|
-
// Italian (chiam(a/ata)=call, dipend(e/enza)=depend, impatt(o)=impact,
|
|
671
|
-
// connett(e)/conness(ione)=connect, architett(ura), struttur(a),
|
|
672
|
-
// funzion(a/amento)=works, tracci(a)=trace, spiega(mi)=explain)
|
|
673
392
|
'chiam', 'dipend', 'impatt', 'connett', 'conness', 'architett', 'struttur', 'funzion', 'tracci', 'spiega',
|
|
674
|
-
// Russian (вызыва(ет)=calls, завис(ит)=depends, влия(ет)=affects,
|
|
675
|
-
// реализ(ация)=implementation, структур(а), архитектур(а),
|
|
676
|
-
// трассир(овка)=trace, лома(ет)=breaks, объясн(и)=explain, поток=flow)
|
|
677
393
|
'вызыва', 'завис', 'влия', 'реализ', 'структур', 'архитектур', 'трассир', 'лома', 'объясн', 'поток',
|
|
678
|
-
// Ukrainian — і/и spellings diverge from Russian (виклика(є)=calls,
|
|
679
|
-
// залеж(ить)=depends, вплива(є)=affects, архітектур(а), реаліз(ація),
|
|
680
|
-
// поясн(и)=explain, шлях(у)=path; структур(а) is shared with Russian)
|
|
681
394
|
'виклика', 'залеж', 'вплива', 'архітектур', 'реаліз', 'поясн', 'шлях',
|
|
682
|
-
// Dutch (aanroep(en)=call, afhankelijk(heid)=depends, beïnvloed(t)=affects,
|
|
683
|
-
// structuur — "structur" can't reach the uu; uitleg(gen)=explain)
|
|
684
395
|
'aanroep', 'afhankelijk', 'beïnvloed', 'structuur', 'uitleg',
|
|
685
|
-
// Polish (wywoł(uje)=calls, zależ(y)=depends, wpływ(a)=affects/impact,
|
|
686
|
-
// przepływ=flow, ścieżk(a)=path, działa(nie)=works, wyjaśni(j)=explain,
|
|
687
|
-
// śledz(enie)=trace; architektura/struktura fire via the German stems)
|
|
688
396
|
'wywoł', 'zależ', 'wpływ', 'przepływ', 'ścieżk', 'działa', 'wyjaśni', 'śledz',
|
|
689
|
-
// Czech (volá(ní)=calls, závis(í)=depends, ovlivň(uje)=affects,
|
|
690
|
-
// funguj(e)=works, vysvětl(i)=explain)
|
|
691
397
|
'volá', 'závis', 'ovlivň', 'funguj', 'vysvětl',
|
|
692
|
-
// Romanian (apel(ează)=calls, depind(e)=depends — i not e, so "depend" misses
|
|
693
|
-
// it; arhitectur(a) — no c; funcțion(ează)=works, explică=explain)
|
|
694
398
|
'apel', 'depind', 'arhitectur', 'funcțion', 'explică',
|
|
695
|
-
// Hungarian (hív(ja)=calls, függ(őség)=depends, működ(ik)=works,
|
|
696
|
-
// struktúr(a) — ú escapes "struktur"; magyaráz(d)=explain;
|
|
697
|
-
// architektúra fires via the German stem)
|
|
698
399
|
'hív', 'függ', 'működ', 'struktúr', 'magyaráz',
|
|
699
|
-
// Turkish — agglutinative, so stems beat exact words (nere(de/ye/den)=where,
|
|
700
|
-
// çağır/çağrı=call, bağıml(ı)=depends, bağlant(ı)=connection, akış(ı)=flow,
|
|
701
|
-
// etkile(r)/etkisi=affects/impact)
|
|
702
400
|
'nere', 'çağır', 'çağrı', 'bağıml', 'bağlant', 'akış', 'etkile', 'etkisi',
|
|
703
|
-
// Indonesian/Malay — me-/di-/ber- prefixes block a bare stem, so affixed
|
|
704
|
-
// forms are listed too (panggil(an)/memanggil/dipanggil=call,
|
|
705
|
-
// bergantung/tergantung=depends, pengaruh/mempengaruhi/memengaruhi=affect,
|
|
706
|
-
// arsitektur=architecture, fungsi/berfungsi=works,
|
|
707
|
-
// jelaskan/menjelaskan=explain)
|
|
708
401
|
'panggil', 'memanggil', 'dipanggil', 'bergantung', 'tergantung', 'pengaruh',
|
|
709
402
|
'mempengaruhi', 'memengaruhi', 'arsitektur', 'fungsi', 'berfungsi', 'jelaskan', 'menjelaskan',
|
|
710
|
-
// Swedish / Danish / Norwegian (anrop(ar)=calls, påverk(ar)/påvirk(er)=affects,
|
|
711
|
-
// afhæng(er)/avheng(er)=depends, förklar(a)/forklar=explain,
|
|
712
|
-
// arkitektur — k not ch; funger(ar/er)=works)
|
|
713
403
|
'anrop', 'påverk', 'påvirk', 'afhæng', 'avheng', 'förklar', 'forklar', 'arkitektur', 'funger',
|
|
714
|
-
// Finnish (kutsu(u)=calls, riippu(u)=depends, arkkitehtuur(i),
|
|
715
|
-
// rakente(en)=structure, selit(ä)=explain)
|
|
716
404
|
'kutsu', 'riippu', 'arkkitehtuur', 'rakente', 'selit',
|
|
717
|
-
// Greek — accented and unaccented stem spellings both occur
|
|
718
|
-
// (εξαρτ(άται)=depends, επηρε(άζει)=affects, αρχιτεκτονικ(ή),
|
|
719
|
-
// διαδρομ(ή)=path, εξηγ/εξήγ(ησε)=explain)
|
|
720
405
|
'εξαρτ', 'επηρε', 'αρχιτεκτονικ', 'διαδρομ', 'εξηγ', 'εξήγ',
|
|
721
|
-
// Hindi (समझा(ओ/इए)=explain, आर्किटेक्चर=architecture)
|
|
722
406
|
'समझा', 'आर्किटेक्चर',
|
|
723
407
|
];
|
|
724
408
|
const STRUCTURAL_WORDS_RE = new RegExp(`${NOT_WORD_BEFORE}(?:${STRUCTURAL_WORDS.join('|')})${NOT_WORD_AFTER}`, 'iu');
|
|
725
409
|
const STRUCTURAL_STEMS_RE = new RegExp(`${NOT_WORD_BEFORE}(?:${STRUCTURAL_STEMS.join('|')})`, 'iu');
|
|
726
|
-
/**
|
|
727
|
-
* Structural keywords matched as bare SUBSTRINGS, for languages where a
|
|
728
|
-
* boundary can't be relied on: scripts with no word separators (Chinese —
|
|
729
|
-
* simplified AND traditional; the original #994 set was simplified-only —
|
|
730
|
-
* Japanese, Thai), Korean (spaced, but particles attach directly to the noun:
|
|
731
|
-
* 구조가/구조를), and Arabic / Farsi / Hebrew (spaced, but proclitics attach to
|
|
732
|
-
* the word: وكيف "and-how", והמבנה "and-the-structure"). JS's `\b` can never
|
|
733
|
-
* fire between Han characters, which was issue #994: the English-only gate
|
|
734
|
-
* silently no-op'd every Chinese prompt, so non-English users got no front-load
|
|
735
|
-
* nudge and no error to explain why. The sets mirror the English intent
|
|
736
|
-
* (如何/怎么/怎麼/どうやって/どのように/어떻게/كيف/چگونه/چطور/איך/อย่างไร/ยังไง=how,
|
|
737
|
-
* 在哪/哪里/哪裡/어디/أين/كجا/איפה/ที่ไหน=where, 流程/流向/流れ/흐름/تدفق/זרימה=flow,
|
|
738
|
-
* 路径/路徑/経路/경로/مسار/مسیر/נתיב/เส้นทาง=path,
|
|
739
|
-
* 调用/調用/呼び出/호출/يستدعي/استدعاء/فراخوان/קורא/เรียกใช้=call,
|
|
740
|
-
* 依赖/依賴/依存/의존/يعتمد/تعتمد/وابسته/תלוי/ขึ้นอยู่กับ=depend,
|
|
741
|
-
* 影响/影響/영향/يؤثر/تأثير/تأثیر/משפיע/ผลกระทบ=impact/affect,
|
|
742
|
-
* 实现/實現/実装/구현=implement,
|
|
743
|
-
* 架构/架構/アーキテクチャ/아키텍처/معماري/معماری/ארכיטקטור/สถาปัตยกรรม=architecture,
|
|
744
|
-
* 结构/結構/構造/구조/بنية/هيكل/ساختار/מבנה/โครงสร้าง=structure,
|
|
745
|
-
* 追踪/跟踪/追蹤/追跡/トレース/추적/تتبع/ติดตาม=trace,
|
|
746
|
-
* يعمل/تعمل/ทำงาน=works) plus structural-overview words with no single clean
|
|
747
|
-
* English equivalent (介绍/介紹/解析/分析/原理/机制/機制/仕組み/説明/설명/動作/동작/작동/
|
|
748
|
-
* اشرح/شرح/توضیح/הסבר/อธิบาย=explain).
|
|
749
|
-
*
|
|
750
|
-
* KNOWN, ACCEPTED false-positive class (#1140): substring matching cannot see
|
|
751
|
-
* homograph compounds — Korean 구조 (structure) also fires inside 구조대
|
|
752
|
-
* (rescue squad). Verified unfixable at this layer: ICU word segmentation
|
|
753
|
-
* (Intl.Segmenter) returns 구조대 and the particle form 구조가 (which the gate
|
|
754
|
-
* MUST keep matching) as equally opaque single segments, and a 구조대 denylist
|
|
755
|
-
* would break 구조대로 ("according to the structure" — 구조 + the 대로
|
|
756
|
-
* particle), a legitimate structural prompt. The miss rate this design avoids
|
|
757
|
-
* (silently no-op'ing every prompt in these languages, #994) outweighs the
|
|
758
|
-
* occasional off-domain fire.
|
|
759
|
-
*/
|
|
760
410
|
const STRUCTURAL_UNSEGMENTED = /如何|怎么|怎麼|在哪|哪里|哪裡|追踪|跟踪|追蹤|追跡|トレース|流程|流向|流れ|路径|路徑|経路|调用|調用|呼び出|依赖|依賴|依存|影响|影響|实现|實現|実装|架构|架構|アーキテクチャ|结构|結構|構造|介绍|介紹|解析|分析|原理|机制|機制|仕組み|説明|動作|どうやって|どのように|어떻게|어디|호출|흐름|경로|의존|영향|구현|구조|아키텍처|추적|동작|작동|설명|كيف|أين|اين|يستدعي|استدعاء|يعتمد|تعتمد|يؤثر|تأثير|معماري|بنية|هيكل|تدفق|مسار|تتبع|يعمل|تعمل|اشرح|شرح|چگونه|چطور|کجا|فراخوان|وابسته|تأثیر|معماری|ساختار|مسیر|توضیح|איך|איפה|קורא|תלוי|משפיע|ארכיטקטור|מבנה|זרימה|נתיב|הסבר|อย่างไร|ยังไง|ที่ไหน|เรียกใช้|ขึ้นอยู่กับ|ผลกระทบ|สถาปัตยกรรม|โครงสร้าง|เส้นทาง|ติดตาม|ทำงาน|อธิบาย/;
|
|
761
|
-
/** Doc/data/asset file extensions — a `name.ext` of this kind is a file
|
|
762
|
-
* reference, not a code symbol, so it must not trip the member-access signal. */
|
|
763
411
|
const DOC_DATA_EXT = /\.(md|markdown|txt|rst|json|ya?ml|toml|lock|csv|tsv|log|ini|cfg|conf|env|xml|html?|png|jpe?g|gif|svg|pdf)$/i;
|
|
764
|
-
/**
|
|
765
|
-
* Does `prompt` contain an explicit structural keyword? A keyword is a strong,
|
|
766
|
-
* self-contained signal, so the front-load hook fires on it directly — no graph
|
|
767
|
-
* check needed. (A *code-token* match, by contrast, is only a candidate the
|
|
768
|
-
* hook verifies against the graph first; see {@link extractCodeTokens}.)
|
|
769
|
-
* Coverage is multilingual (#994, #1126): the ~29 languages with the largest
|
|
770
|
-
* developer populations, across Latin, Cyrillic, Greek, CJK, Hangul, Arabic,
|
|
771
|
-
* Hebrew, Thai, and Devanagari scripts. Languages beyond the keyword table
|
|
772
|
-
* still fire through the language-agnostic code-token path.
|
|
773
|
-
*/
|
|
774
412
|
function hasStructuralKeyword(prompt) {
|
|
775
413
|
return (!!prompt &&
|
|
776
414
|
(STRUCTURAL_WORDS_RE.test(prompt) || STRUCTURAL_STEMS_RE.test(prompt) || STRUCTURAL_UNSEGMENTED.test(prompt)));
|
|
777
415
|
}
|
|
778
|
-
/**
|
|
779
|
-
* Identifier-shaped tokens in `prompt` — camelCase / PascalCase-with-inner-cap,
|
|
780
|
-
* snake_case, a `name(` call, or the two sides of an `a.b` member access. Naming
|
|
781
|
-
* a symbol is a code question whatever the surrounding human language, and these
|
|
782
|
-
* shapes almost never occur in ordinary prose, so they catch the common
|
|
783
|
-
* "<symbol> 的调用链?" / "where is <symbol> 定義" prompts no keyword list would.
|
|
784
|
-
*
|
|
785
|
-
* These are *candidates*, not a verdict: a tech brand like `JavaScript` or
|
|
786
|
-
* `GitHub` is identifier-shaped too, so the front-load hook checks each token
|
|
787
|
-
* against the actual index ({@link getNodesByName}) and only fires when one is a
|
|
788
|
-
* real symbol here — otherwise a brand-name prompt would inject ~16KB of
|
|
789
|
-
* low-relevance context (issue #994 follow-up). A doc/data filename ("README.md")
|
|
790
|
-
* is excluded from the member-access form since it's a file reference, not a symbol.
|
|
791
|
-
*/
|
|
792
416
|
function extractCodeTokens(prompt) {
|
|
793
417
|
if (!prompt)
|
|
794
418
|
return [];
|
|
795
419
|
const out = new Set();
|
|
796
|
-
// camelCase / PascalCase-with-inner-cap (getUserId, parseToken, UserService) or
|
|
797
|
-
// snake_case (article_publish, get_user) — a whole identifier run that has an
|
|
798
|
-
// inner lower→upper transition or an underscore flanked by alphanumerics.
|
|
799
420
|
for (const m of prompt.matchAll(/[A-Za-z_$][\w$]*/g)) {
|
|
800
421
|
const w = m[0];
|
|
801
422
|
if (/[a-z][A-Z]/.test(w) || /[A-Za-z0-9]_[A-Za-z0-9]/.test(w))
|
|
802
423
|
out.add(w);
|
|
803
424
|
}
|
|
804
|
-
// call form: an identifier directly before '(' — parseToken(, render(). No
|
|
805
|
-
// whitespace before '(' so prose like "the function (entry point)" doesn't trip it.
|
|
806
425
|
for (const m of prompt.matchAll(/([A-Za-z_$][\w$]*)\(/g))
|
|
807
426
|
out.add(m[1]);
|
|
808
|
-
// member access on identifiers (user.login) — but not a doc/data filename.
|
|
809
427
|
for (const m of prompt.matchAll(/([A-Za-z_$][\w$]*)\.([A-Za-z_$][\w$]*)/g)) {
|
|
810
428
|
if (!DOC_DATA_EXT.test(m[0])) {
|
|
811
429
|
out.add(m[1]);
|
|
@@ -814,59 +432,18 @@ function extractCodeTokens(prompt) {
|
|
|
814
432
|
}
|
|
815
433
|
return [...out];
|
|
816
434
|
}
|
|
817
|
-
/**
|
|
818
|
-
* Cheap, graph-free candidate gate for the front-load hook: could `prompt` be a
|
|
819
|
-
* structural / flow / impact / "where-how" question worth front-loading context
|
|
820
|
-
* for? True on an explicit keyword in any covered language (#994, #1126) OR an
|
|
821
|
-
* identifier-shaped token. A keyword is sufficient to fire on its own; a
|
|
822
|
-
* token-only match is only a candidate the hook then verifies against the graph
|
|
823
|
-
* (a brand name like `JavaScript` is token-shaped but isn't a symbol). Every
|
|
824
|
-
* non-candidate prompt ("fix this typo", in any language) stays a zero-cost no-op.
|
|
825
|
-
*/
|
|
826
435
|
function isStructuralPrompt(prompt) {
|
|
827
436
|
return hasStructuralKeyword(prompt) || extractCodeTokens(prompt).length > 0;
|
|
828
437
|
}
|
|
829
|
-
/**
|
|
830
|
-
* Claude Code persists `UserPromptSubmit` hook stdout above this many
|
|
831
|
-
* characters to a file and shows the model a ~2 KB preview instead (#1694).
|
|
832
|
-
* Measured on Claude Code 2.1.261; documented in the hooks reference as a
|
|
833
|
-
* 10,000-character cap on hook output strings.
|
|
834
|
-
*/
|
|
835
438
|
exports.CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT = 10_000;
|
|
836
|
-
/**
|
|
837
|
-
* Max characters of explore text injected by `codegraph prompt-hook` before
|
|
838
|
-
* truncation. Must stay under {@link CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT} so
|
|
839
|
-
* the host delivers the payload inline. 9,000 leaves ~1k for the
|
|
840
|
-
* `<codegraph_context>` wrapper and the `projectPath` nudge lines appended
|
|
841
|
-
* after the cap is applied.
|
|
842
|
-
*/
|
|
843
439
|
exports.PROMPT_HOOK_INJECTION_MAX = 9_000;
|
|
844
|
-
/**
|
|
845
|
-
* Cap explore text for the prompt-hook injection, preserving the existing
|
|
846
|
-
* "call codegraph_explore for the rest" notice when truncated.
|
|
847
|
-
*/
|
|
848
440
|
function capPromptHookInjection(text, max = exports.PROMPT_HOOK_INJECTION_MAX) {
|
|
849
441
|
return text.length > max
|
|
850
442
|
? `${text.slice(0, max)}\n…(truncated; call codegraph_explore for the rest)`
|
|
851
443
|
: text;
|
|
852
444
|
}
|
|
853
|
-
/**
|
|
854
|
-
* Decide what the front-load hook injects for a `prompt` issued from `cwd`,
|
|
855
|
-
* shaped by where the `.codegraph/` index(es) actually are:
|
|
856
|
-
* 1. **cwd (or an ancestor) is indexed** → front-load that project. The
|
|
857
|
-
* normal single-project / nested-file case.
|
|
858
|
-
* 2. **cwd isn't indexed but looks like a workspace root** → the indexes live
|
|
859
|
-
* in sub-projects (the monorepo case behind #964). One indexed
|
|
860
|
-
* sub-project → front-load it; several → front-load the one the prompt
|
|
861
|
-
* names (by relative path like `packages/api`, or package directory name)
|
|
862
|
-
* and nudge about the rest; several with no match → nudge the full list so
|
|
863
|
-
* the agent passes `projectPath`, rather than guessing wrong.
|
|
864
|
-
* 3. **nothing indexed reachable** → do nothing (the agent's own tools apply).
|
|
865
|
-
*/
|
|
866
445
|
function planFrontload(cwd, prompt) {
|
|
867
446
|
const none = { exploreRoot: null, nudgeProjects: [], viaSubScan: false };
|
|
868
|
-
// 1. up-walk — nearest indexed ancestor (incl. cwd). Cheap; covers the common
|
|
869
|
-
// single-project case without a down-scan.
|
|
870
447
|
let dir = path.resolve(cwd);
|
|
871
448
|
for (let i = 0; i < 6; i++) {
|
|
872
449
|
if (isInitialized(dir))
|
|
@@ -876,8 +453,6 @@ function planFrontload(cwd, prompt) {
|
|
|
876
453
|
break;
|
|
877
454
|
dir = parent;
|
|
878
455
|
}
|
|
879
|
-
// 2. down-scan — only from something that looks like a workspace root, so a
|
|
880
|
-
// non-project cwd (e.g. $HOME) is a cheap no-op, not a deep crawl.
|
|
881
456
|
const base = path.resolve(cwd);
|
|
882
457
|
if (!looksLikeProjectRoot(base))
|
|
883
458
|
return none;
|
|
@@ -886,7 +461,6 @@ function planFrontload(cwd, prompt) {
|
|
|
886
461
|
return none;
|
|
887
462
|
if (subs.length === 1)
|
|
888
463
|
return { exploreRoot: subs[0], nudgeProjects: [], viaSubScan: true };
|
|
889
|
-
// Several indexed sub-projects — pick the one the prompt points at, if any.
|
|
890
464
|
const p = prompt.toLowerCase();
|
|
891
465
|
let best = null;
|
|
892
466
|
for (const s of subs) {
|
|
@@ -895,9 +469,9 @@ function planFrontload(cwd, prompt) {
|
|
|
895
469
|
const name = path.basename(s).toLowerCase();
|
|
896
470
|
let score = 0;
|
|
897
471
|
if (relLc && p.includes(relLc))
|
|
898
|
-
score = 10;
|
|
472
|
+
score = 10;
|
|
899
473
|
else if (name.length >= 3 && new RegExp(`\\b${escapeRegExp(name)}\\b`).test(p))
|
|
900
|
-
score = 5;
|
|
474
|
+
score = 5;
|
|
901
475
|
if (score > 0 && (!best || score > best.score || (score === best.score && rel.length < best.relLen))) {
|
|
902
476
|
best = { root: s, score, relLen: rel.length };
|
|
903
477
|
}
|
|
@@ -905,54 +479,28 @@ function planFrontload(cwd, prompt) {
|
|
|
905
479
|
if (best) {
|
|
906
480
|
return { exploreRoot: best.root, nudgeProjects: subs.filter((s) => s !== best.root), viaSubScan: true };
|
|
907
481
|
}
|
|
908
|
-
// No clear match — nudge the full list rather than front-load a guess.
|
|
909
482
|
return { exploreRoot: null, nudgeProjects: subs, viaSubScan: true };
|
|
910
483
|
}
|
|
911
|
-
/**
|
|
912
|
-
* Contents of `.codegraph/.gitignore`. A single wildcard ignore keeps every
|
|
913
|
-
* transient file in the index dir — the database, `daemon.pid`, the socket,
|
|
914
|
-
* logs, cache, and anything future versions add — out of git, without having
|
|
915
|
-
* to enumerate each name (issues #788, #492, #484). Older versions wrote an
|
|
916
|
-
* explicit allowlist that never listed `daemon.pid` or the socket, so those
|
|
917
|
-
* runtime files were silently committed.
|
|
918
|
-
*/
|
|
919
484
|
const GITIGNORE_CONTENT = `# CodeGraph data files — local to each machine, not for committing.
|
|
920
485
|
# Ignore everything in .codegraph/ except this file itself, so transient
|
|
921
486
|
# files (the database, daemon.pid, sockets, logs) never show up in git.
|
|
922
487
|
*
|
|
923
488
|
!.gitignore
|
|
924
489
|
`;
|
|
925
|
-
/** Header line that prefixes every .gitignore CodeGraph has auto-generated. */
|
|
926
490
|
const GITIGNORE_MARKER = '# CodeGraph data files';
|
|
927
|
-
/**
|
|
928
|
-
* Is `content` a stale CodeGraph-generated `.gitignore` that should be
|
|
929
|
-
* regenerated in place? True when it carries our header but predates the
|
|
930
|
-
* wildcard ignore (it has no bare `*` line) — i.e. one of the old explicit
|
|
931
|
-
* allowlists (`*.db`, `cache/`, `.dirty`, …) that never ignored `daemon.pid`
|
|
932
|
-
* or the socket (issue #788). A file WITHOUT our header is user-authored and
|
|
933
|
-
* is left untouched; one that already has the wildcard is current. Matching
|
|
934
|
-
* on the header (not a byte-exact list of past defaults) heals every old
|
|
935
|
-
* variant — v0.7.x through 0.9.9 — and is idempotent once upgraded.
|
|
936
|
-
*/
|
|
937
491
|
function isStaleDefaultGitignore(content) {
|
|
938
492
|
if (!content.trimStart().startsWith(GITIGNORE_MARKER))
|
|
939
493
|
return false;
|
|
940
494
|
return !content.split('\n').some((line) => line.trim() === '*');
|
|
941
495
|
}
|
|
942
|
-
/**
|
|
943
|
-
* Write `.codegraph/.gitignore` if it's absent, or upgrade a stale
|
|
944
|
-
* CodeGraph-generated default in place; a user-customized file is left alone.
|
|
945
|
-
* Best-effort — returns `false` only if a needed write failed.
|
|
946
|
-
*/
|
|
947
496
|
function ensureGitignore(gitignorePath) {
|
|
948
497
|
let existing;
|
|
949
498
|
try {
|
|
950
499
|
existing = fs.readFileSync(gitignorePath, 'utf-8');
|
|
951
500
|
}
|
|
952
501
|
catch {
|
|
953
|
-
existing = null;
|
|
502
|
+
existing = null;
|
|
954
503
|
}
|
|
955
|
-
// Current default or a user-authored file: nothing to do.
|
|
956
504
|
if (existing !== null && !isStaleDefaultGitignore(existing))
|
|
957
505
|
return true;
|
|
958
506
|
try {
|
|
@@ -963,50 +511,65 @@ function ensureGitignore(gitignorePath) {
|
|
|
963
511
|
return false;
|
|
964
512
|
}
|
|
965
513
|
}
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
514
|
+
const LOCAL_ONLY_GITIGNORE_CONTENT = '*\n';
|
|
515
|
+
function isTrackedByGit(file) {
|
|
516
|
+
try {
|
|
517
|
+
(0, child_process_1.execFileSync)('git', ['ls-files', '--error-unmatch', '--', path.basename(file)], {
|
|
518
|
+
cwd: path.dirname(file),
|
|
519
|
+
stdio: 'ignore',
|
|
520
|
+
windowsHide: true,
|
|
521
|
+
timeout: 10_000,
|
|
522
|
+
});
|
|
523
|
+
return true;
|
|
524
|
+
}
|
|
525
|
+
catch {
|
|
526
|
+
return false;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
function makeGitignoreLocalOnly(projectRoot) {
|
|
530
|
+
const gitignorePath = path.join(getCodeGraphDir(projectRoot), '.gitignore');
|
|
531
|
+
let existing;
|
|
532
|
+
try {
|
|
533
|
+
existing = fs.readFileSync(gitignorePath, 'utf-8').replace(/\r\n/g, '\n');
|
|
534
|
+
}
|
|
535
|
+
catch {
|
|
536
|
+
existing = null;
|
|
537
|
+
}
|
|
538
|
+
if (existing === LOCAL_ONLY_GITIGNORE_CONTENT)
|
|
539
|
+
return 'unchanged';
|
|
540
|
+
if (existing !== null) {
|
|
541
|
+
if (existing !== GITIGNORE_CONTENT && !isStaleDefaultGitignore(existing))
|
|
542
|
+
return 'customized';
|
|
543
|
+
if (isTrackedByGit(gitignorePath))
|
|
544
|
+
return 'tracked';
|
|
545
|
+
}
|
|
546
|
+
fs.writeFileSync(gitignorePath, LOCAL_ONLY_GITIGNORE_CONTENT, 'utf-8');
|
|
547
|
+
return 'written';
|
|
548
|
+
}
|
|
970
549
|
function createDirectory(projectRoot) {
|
|
971
550
|
const codegraphDir = getCodeGraphDir(projectRoot);
|
|
972
|
-
// Only throw if CodeGraph is actually initialized (db with a schema).
|
|
973
|
-
// .codegraph/ folder alone — or a schema-less codegraph.db left by an
|
|
974
|
-
// interrupted init (#1895) — is fine: initialize() adds the schema to it.
|
|
975
551
|
if (isInitialized(projectRoot)) {
|
|
976
552
|
throw new Error(`CodeGraph already initialized in ${projectRoot}`);
|
|
977
553
|
}
|
|
978
|
-
// Create main directory (if it doesn't exist)
|
|
979
554
|
fs.mkdirSync(codegraphDir, { recursive: true });
|
|
980
|
-
// Write .gitignore inside .codegraph (create if absent, upgrade a stale
|
|
981
|
-
// pre-wildcard default left by an older version — issue #788).
|
|
982
555
|
ensureGitignore(path.join(codegraphDir, '.gitignore'));
|
|
983
556
|
}
|
|
984
|
-
/**
|
|
985
|
-
* Remove the .codegraph directory
|
|
986
|
-
*/
|
|
987
557
|
function removeDirectory(projectRoot) {
|
|
988
558
|
const codegraphDir = getCodeGraphDir(projectRoot);
|
|
989
559
|
if (!fs.existsSync(codegraphDir)) {
|
|
990
560
|
return;
|
|
991
561
|
}
|
|
992
|
-
// Verify .codegraph is a real directory, not a symlink pointing elsewhere
|
|
993
562
|
const lstat = fs.lstatSync(codegraphDir);
|
|
994
563
|
if (lstat.isSymbolicLink()) {
|
|
995
|
-
// Only remove the symlink itself, never follow it for recursive delete
|
|
996
564
|
fs.unlinkSync(codegraphDir);
|
|
997
565
|
return;
|
|
998
566
|
}
|
|
999
567
|
if (!lstat.isDirectory()) {
|
|
1000
|
-
// Not a directory - remove the single file
|
|
1001
568
|
fs.unlinkSync(codegraphDir);
|
|
1002
569
|
return;
|
|
1003
570
|
}
|
|
1004
|
-
// Recursively remove directory
|
|
1005
571
|
fs.rmSync(codegraphDir, { recursive: true, force: true });
|
|
1006
572
|
}
|
|
1007
|
-
/**
|
|
1008
|
-
* Get all files in the .codegraph directory
|
|
1009
|
-
*/
|
|
1010
573
|
function listDirectoryContents(projectRoot) {
|
|
1011
574
|
const codegraphDir = getCodeGraphDir(projectRoot);
|
|
1012
575
|
if (!fs.existsSync(codegraphDir)) {
|
|
@@ -1017,7 +580,6 @@ function listDirectoryContents(projectRoot) {
|
|
|
1017
580
|
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
1018
581
|
for (const entry of entries) {
|
|
1019
582
|
const relativePath = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
1020
|
-
// Skip symlinks to prevent following links outside .codegraph
|
|
1021
583
|
if (entry.isSymbolicLink()) {
|
|
1022
584
|
continue;
|
|
1023
585
|
}
|
|
@@ -1032,9 +594,6 @@ function listDirectoryContents(projectRoot) {
|
|
|
1032
594
|
walkDir(codegraphDir);
|
|
1033
595
|
return files;
|
|
1034
596
|
}
|
|
1035
|
-
/**
|
|
1036
|
-
* Get the total size of the .codegraph directory in bytes
|
|
1037
|
-
*/
|
|
1038
597
|
function getDirectorySize(projectRoot) {
|
|
1039
598
|
const codegraphDir = getCodeGraphDir(projectRoot);
|
|
1040
599
|
if (!fs.existsSync(codegraphDir)) {
|
|
@@ -1044,7 +603,6 @@ function getDirectorySize(projectRoot) {
|
|
|
1044
603
|
function walkDir(dir) {
|
|
1045
604
|
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
1046
605
|
for (const entry of entries) {
|
|
1047
|
-
// Skip symlinks to prevent following links outside .codegraph
|
|
1048
606
|
if (entry.isSymbolicLink()) {
|
|
1049
607
|
continue;
|
|
1050
608
|
}
|
|
@@ -1061,9 +619,6 @@ function getDirectorySize(projectRoot) {
|
|
|
1061
619
|
walkDir(codegraphDir);
|
|
1062
620
|
return totalSize;
|
|
1063
621
|
}
|
|
1064
|
-
/**
|
|
1065
|
-
* Ensure a subdirectory exists within .codegraph
|
|
1066
|
-
*/
|
|
1067
622
|
function ensureSubdirectory(projectRoot, subdirName) {
|
|
1068
623
|
if (subdirName.includes('..') || subdirName.includes(path.sep) || subdirName.includes('/')) {
|
|
1069
624
|
throw new Error(`Invalid subdirectory name: ${subdirName}`);
|
|
@@ -1074,9 +629,6 @@ function ensureSubdirectory(projectRoot, subdirName) {
|
|
|
1074
629
|
}
|
|
1075
630
|
return subdirPath;
|
|
1076
631
|
}
|
|
1077
|
-
/**
|
|
1078
|
-
* Check if the .codegraph directory has valid structure
|
|
1079
|
-
*/
|
|
1080
632
|
function validateDirectory(projectRoot) {
|
|
1081
633
|
const errors = [];
|
|
1082
634
|
const codegraphDir = getCodeGraphDir(projectRoot);
|
|
@@ -1088,14 +640,9 @@ function validateDirectory(projectRoot) {
|
|
|
1088
640
|
errors.push('.codegraph exists but is not a directory');
|
|
1089
641
|
return { valid: false, errors };
|
|
1090
642
|
}
|
|
1091
|
-
// Auto-repair / upgrade .gitignore (non-critical file). A missing one is
|
|
1092
|
-
// recreated; a stale pre-wildcard default that never ignored daemon.pid is
|
|
1093
|
-
// regenerated in place (issue #788); a user-authored file is left alone.
|
|
1094
643
|
const gitignorePath = path.join(codegraphDir, '.gitignore');
|
|
1095
644
|
const existedBefore = fs.existsSync(gitignorePath);
|
|
1096
645
|
if (!ensureGitignore(gitignorePath) && !existedBefore) {
|
|
1097
|
-
// Only a missing-and-uncreatable file is surfaced; a failed in-place
|
|
1098
|
-
// upgrade of an existing file is non-fatal — the index still works.
|
|
1099
646
|
errors.push('.gitignore missing in .codegraph directory and could not be created');
|
|
1100
647
|
}
|
|
1101
648
|
return {
|
|
@@ -1103,23 +650,22 @@ function validateDirectory(projectRoot) {
|
|
|
1103
650
|
errors,
|
|
1104
651
|
};
|
|
1105
652
|
}
|
|
1106
|
-
/**
|
|
1107
|
-
* Claude Code injects `<task-notification>…</task-notification>` blocks as
|
|
1108
|
-
* `user` messages when a background agent finishes, and UserPromptSubmit
|
|
1109
|
-
* hooks receive them exactly like typed prompts (#1832). The whole prompt
|
|
1110
|
-
* must be that single envelope; a user question that merely mentions the
|
|
1111
|
-
* marker is still a prompt.
|
|
1112
|
-
*/
|
|
1113
653
|
function isTaskNotification(prompt) {
|
|
1114
654
|
return /^\s*<task-notification>[\s\S]*<\/task-notification>\s*$/.test(prompt);
|
|
1115
655
|
}
|
|
1116
|
-
/**
|
|
1117
|
-
* Claude Code hands a subagent's report back to the parent session as a
|
|
1118
|
-
* `<agent-message from="…">…</agent-message>` prompt, which UserPromptSubmit
|
|
1119
|
-
* hooks also receive (#2184). Same rule as {@link isTaskNotification}: only a
|
|
1120
|
-
* prompt that is entirely that envelope is skipped.
|
|
1121
|
-
*/
|
|
1122
656
|
function isAgentMessage(prompt) {
|
|
1123
657
|
return /^\s*<agent-message(?:\s[^>]*)?>[\s\S]*<\/agent-message>\s*$/.test(prompt);
|
|
1124
658
|
}
|
|
659
|
+
function isCrossSessionMessage(prompt) {
|
|
660
|
+
return /^\s*<cross-session-message(?:\s[^>]*)?>[\s\S]*<\/cross-session-message>\s*$/.test(prompt);
|
|
661
|
+
}
|
|
662
|
+
const SYSTEM_REMINDER_CLOSE = '</system-reminder>';
|
|
663
|
+
const SYSTEM_REMINDER_BLOCK = /<system-reminder(?:\s[^<>]*)?>[\s\S]*?<\/system-reminder>/g;
|
|
664
|
+
function stripSystemReminders(prompt) {
|
|
665
|
+
const end = prompt.lastIndexOf(SYSTEM_REMINDER_CLOSE);
|
|
666
|
+
if (end < 0)
|
|
667
|
+
return prompt.trim();
|
|
668
|
+
const head = prompt.slice(0, end + SYSTEM_REMINDER_CLOSE.length);
|
|
669
|
+
return (head.replace(SYSTEM_REMINDER_BLOCK, '\n') + prompt.slice(head.length)).trim();
|
|
670
|
+
}
|
|
1125
671
|
//# sourceMappingURL=directory.js.map
|