@colbymchenry/codegraph-win32-arm64 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/codegraph +5 -0
- package/lib/dist/.test-build-engine.json +1 -0
- package/lib/dist/.test-build-viewer.json +1 -0
- package/lib/dist/bin/codegraph.d.ts +1 -0
- package/lib/dist/bin/codegraph.d.ts.map +1 -1
- package/lib/dist/bin/codegraph.js +605 -291
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/command-supervision.d.ts +7 -0
- package/lib/dist/bin/command-supervision.d.ts.map +1 -1
- package/lib/dist/bin/command-supervision.js +39 -27
- package/lib/dist/bin/command-supervision.js.map +1 -1
- package/lib/dist/bin/viewer-gate.d.ts +17 -0
- package/lib/dist/bin/viewer-gate.d.ts.map +1 -0
- package/lib/dist/bin/viewer-gate.js +31 -0
- package/lib/dist/bin/viewer-gate.js.map +1 -0
- package/lib/dist/context/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +43 -2
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/db/index.d.ts +21 -2
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +86 -31
- package/lib/dist/db/index.js.map +1 -1
- package/lib/dist/db/migrations.d.ts +1 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +40 -1
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/queries.d.ts +454 -10
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +1080 -41
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/schema.sql +11 -1
- package/lib/dist/db/sqlite-adapter.d.ts +2 -0
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/lib/dist/db/sqlite-adapter.js +56 -7
- package/lib/dist/db/sqlite-adapter.js.map +1 -1
- package/lib/dist/db/synthesis-stage.d.ts +12 -0
- package/lib/dist/db/synthesis-stage.d.ts.map +1 -0
- package/lib/dist/db/synthesis-stage.js +89 -0
- package/lib/dist/db/synthesis-stage.js.map +1 -0
- package/lib/dist/db/wal-valve.d.ts +32 -12
- package/lib/dist/db/wal-valve.d.ts.map +1 -1
- package/lib/dist/db/wal-valve.js +65 -22
- package/lib/dist/db/wal-valve.js.map +1 -1
- package/lib/dist/db/wsl-shared-index.d.ts +53 -0
- package/lib/dist/db/wsl-shared-index.d.ts.map +1 -0
- package/lib/dist/db/wsl-shared-index.js +121 -0
- package/lib/dist/db/wsl-shared-index.js.map +1 -0
- package/lib/dist/directory.d.ts +131 -2
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +299 -23
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/errors.d.ts +14 -0
- package/lib/dist/errors.d.ts.map +1 -1
- package/lib/dist/errors.js +16 -1
- package/lib/dist/errors.js.map +1 -1
- package/lib/dist/extraction/astro-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/astro-extractor.js +7 -35
- package/lib/dist/extraction/astro-extractor.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +77 -10
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +302 -71
- package/lib/dist/extraction/cfml-extractor.js.map +1 -1
- package/lib/dist/extraction/commonjs-requires.d.ts +23 -0
- package/lib/dist/extraction/commonjs-requires.d.ts.map +1 -0
- package/lib/dist/extraction/commonjs-requires.js +68 -0
- package/lib/dist/extraction/commonjs-requires.js.map +1 -0
- package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/dfm-extractor.js +14 -10
- package/lib/dist/extraction/dfm-extractor.js.map +1 -1
- package/lib/dist/extraction/extraction-version.d.ts +1 -1
- package/lib/dist/extraction/extraction-version.js +1 -1
- package/lib/dist/extraction/function-ref.d.ts +6 -4
- package/lib/dist/extraction/function-ref.d.ts.map +1 -1
- package/lib/dist/extraction/function-ref.js +35 -14
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/generated-detection.d.ts +9 -0
- package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
- package/lib/dist/extraction/generated-detection.js +42 -2
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +40 -0
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +171 -1
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +132 -19
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +825 -195
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
- package/lib/dist/extraction/kernel/index.js +6 -0
- package/lib/dist/extraction/kernel/index.js.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.d.ts +73 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +412 -16
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/csharp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/csharp.js +14 -5
- package/lib/dist/extraction/languages/csharp.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +16 -3
- package/lib/dist/extraction/languages/dart.js.map +1 -1
- package/lib/dist/extraction/languages/javascript.js +1 -1
- package/lib/dist/extraction/languages/javascript.js.map +1 -1
- package/lib/dist/extraction/languages/kotlin.d.ts +4 -0
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +237 -36
- package/lib/dist/extraction/languages/kotlin.js.map +1 -1
- package/lib/dist/extraction/languages/lua.d.ts.map +1 -1
- package/lib/dist/extraction/languages/lua.js +4 -1
- package/lib/dist/extraction/languages/lua.js.map +1 -1
- package/lib/dist/extraction/languages/python.d.ts.map +1 -1
- package/lib/dist/extraction/languages/python.js +71 -0
- package/lib/dist/extraction/languages/python.js.map +1 -1
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
- package/lib/dist/extraction/languages/rust.js +3 -0
- package/lib/dist/extraction/languages/rust.js.map +1 -1
- package/lib/dist/extraction/languages/scala.d.ts.map +1 -1
- package/lib/dist/extraction/languages/scala.js +18 -3
- package/lib/dist/extraction/languages/scala.js.map +1 -1
- package/lib/dist/extraction/languages/swift.d.ts +15 -0
- package/lib/dist/extraction/languages/swift.d.ts.map +1 -1
- package/lib/dist/extraction/languages/swift.js +50 -0
- package/lib/dist/extraction/languages/swift.js.map +1 -1
- package/lib/dist/extraction/languages/typescript.d.ts +7 -0
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/typescript.js +30 -2
- package/lib/dist/extraction/languages/typescript.js.map +1 -1
- package/lib/dist/extraction/liquid-extractor.d.ts +18 -0
- package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/liquid-extractor.js +98 -22
- package/lib/dist/extraction/liquid-extractor.js.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.js +6 -4
- package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
- package/lib/dist/extraction/parse-budget.d.ts +16 -0
- package/lib/dist/extraction/parse-budget.d.ts.map +1 -0
- package/lib/dist/extraction/parse-budget.js +24 -0
- package/lib/dist/extraction/parse-budget.js.map +1 -0
- package/lib/dist/extraction/parse-pool.d.ts +12 -0
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +51 -3
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/parse-worker.js +3 -1
- package/lib/dist/extraction/parse-worker.js.map +1 -1
- package/lib/dist/extraction/sfc-script.d.ts +43 -0
- package/lib/dist/extraction/sfc-script.d.ts.map +1 -0
- package/lib/dist/extraction/sfc-script.js +135 -0
- package/lib/dist/extraction/sfc-script.js.map +1 -0
- package/lib/dist/extraction/store-worker.js +5 -0
- package/lib/dist/extraction/store-worker.js.map +1 -1
- package/lib/dist/extraction/store-writer.d.ts +10 -2
- package/lib/dist/extraction/store-writer.d.ts.map +1 -1
- package/lib/dist/extraction/store-writer.js +12 -4
- 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 +7 -37
- package/lib/dist/extraction/svelte-extractor.js.map +1 -1
- package/lib/dist/extraction/syntax-tokens.d.ts +103 -0
- package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -0
- package/lib/dist/extraction/syntax-tokens.js +382 -0
- package/lib/dist/extraction/syntax-tokens.js.map +1 -0
- package/lib/dist/extraction/tree-sitter-helpers.d.ts +5 -0
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.js +17 -0
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts +29 -3
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +104 -17
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +943 -88
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/vue-extractor.d.ts +7 -0
- package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vue-extractor.js +73 -35
- package/lib/dist/extraction/vue-extractor.js.map +1 -1
- package/lib/dist/extraction/vue-options-api.d.ts +28 -0
- package/lib/dist/extraction/vue-options-api.d.ts.map +1 -0
- package/lib/dist/extraction/vue-options-api.js +196 -0
- package/lib/dist/extraction/vue-options-api.js.map +1 -0
- package/lib/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
- package/lib/dist/file-limits.d.ts +40 -0
- package/lib/dist/file-limits.d.ts.map +1 -0
- package/lib/dist/file-limits.js +147 -0
- package/lib/dist/file-limits.js.map +1 -0
- package/lib/dist/graph/branch-guards.d.ts +265 -0
- package/lib/dist/graph/branch-guards.d.ts.map +1 -0
- package/lib/dist/graph/branch-guards.js +2326 -0
- package/lib/dist/graph/branch-guards.js.map +1 -0
- package/lib/dist/graph/dead-code.d.ts +251 -0
- package/lib/dist/graph/dead-code.d.ts.map +1 -0
- package/lib/dist/graph/dead-code.js +776 -0
- package/lib/dist/graph/dead-code.js.map +1 -0
- package/lib/dist/graph/dynamic-boundary-report.d.ts +121 -0
- package/lib/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
- package/lib/dist/graph/dynamic-boundary-report.js +283 -0
- package/lib/dist/graph/dynamic-boundary-report.js.map +1 -0
- package/lib/dist/graph/index.d.ts +4 -0
- package/lib/dist/graph/index.d.ts.map +1 -1
- package/lib/dist/graph/index.js +16 -1
- package/lib/dist/graph/index.js.map +1 -1
- package/lib/dist/graph/named-symbol-flow.d.ts +125 -0
- package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -0
- package/lib/dist/graph/named-symbol-flow.js +559 -0
- package/lib/dist/graph/named-symbol-flow.js.map +1 -0
- package/lib/dist/graph/symbol-lookup.d.ts +83 -0
- package/lib/dist/graph/symbol-lookup.d.ts.map +1 -0
- package/lib/dist/graph/symbol-lookup.js +181 -0
- package/lib/dist/graph/symbol-lookup.js.map +1 -0
- package/lib/dist/graph/traversal.d.ts +9 -0
- package/lib/dist/graph/traversal.d.ts.map +1 -1
- package/lib/dist/graph/traversal.js +61 -35
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/graph/type-hierarchy.d.ts +155 -0
- package/lib/dist/graph/type-hierarchy.d.ts.map +1 -0
- package/lib/dist/graph/type-hierarchy.js +382 -0
- package/lib/dist/graph/type-hierarchy.js.map +1 -0
- package/lib/dist/index.d.ts +256 -11
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +402 -34
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +3 -2
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/targets/antigravity.d.ts.map +1 -1
- package/lib/dist/installer/targets/antigravity.js +14 -2
- package/lib/dist/installer/targets/antigravity.js.map +1 -1
- package/lib/dist/installer/targets/claude.d.ts +3 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +35 -7
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/codex.d.ts +2 -1
- package/lib/dist/installer/targets/codex.d.ts.map +1 -1
- package/lib/dist/installer/targets/codex.js +14 -4
- 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 +7 -1
- package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
- package/lib/dist/installer/targets/opencode.d.ts +16 -5
- package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
- package/lib/dist/installer/targets/opencode.js +73 -22
- package/lib/dist/installer/targets/opencode.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +14 -3
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +39 -11
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +7 -0
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/mcp/answer-freshness.d.ts +10 -0
- package/lib/dist/mcp/answer-freshness.d.ts.map +1 -0
- package/lib/dist/mcp/answer-freshness.js +68 -0
- package/lib/dist/mcp/answer-freshness.js.map +1 -0
- package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +16 -0
- 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 +20 -5
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +11 -4
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +132 -36
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +17 -7
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +116 -24
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.d.ts +1 -10
- package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.js +46 -42
- package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
- package/lib/dist/mcp/engine.d.ts +30 -9
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +158 -66
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-dedup.d.ts +5 -2
- package/lib/dist/mcp/explore-dedup.d.ts.map +1 -1
- package/lib/dist/mcp/explore-dedup.js +8 -5
- package/lib/dist/mcp/explore-dedup.js.map +1 -1
- package/lib/dist/mcp/index-freshness-worker.d.ts +2 -0
- package/lib/dist/mcp/index-freshness-worker.d.ts.map +1 -0
- package/lib/dist/mcp/index-freshness-worker.js +36 -0
- package/lib/dist/mcp/index-freshness-worker.js.map +1 -0
- package/lib/dist/mcp/index-freshness.d.ts +13 -0
- package/lib/dist/mcp/index-freshness.d.ts.map +1 -0
- package/lib/dist/mcp/index-freshness.js +117 -0
- package/lib/dist/mcp/index-freshness.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +3 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +95 -11
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts +4 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +11 -2
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/project-lifecycle.d.ts +9 -0
- package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -0
- package/lib/dist/mcp/project-lifecycle.js +182 -0
- package/lib/dist/mcp/project-lifecycle.js.map +1 -0
- package/lib/dist/mcp/proxy.d.ts +9 -2
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +201 -32
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +18 -3
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +67 -11
- package/lib/dist/mcp/query-pool.js.map +1 -1
- package/lib/dist/mcp/query-worker.js +2 -2
- package/lib/dist/mcp/query-worker.js.map +1 -1
- package/lib/dist/mcp/server-instructions.d.ts +1 -1
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +6 -3
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/startup-handshake.d.ts +3 -1
- package/lib/dist/mcp/startup-handshake.d.ts.map +1 -1
- package/lib/dist/mcp/startup-handshake.js +10 -2
- package/lib/dist/mcp/startup-handshake.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts +306 -36
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +2395 -966
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/mcp/writer-lock.d.ts +61 -0
- package/lib/dist/mcp/writer-lock.d.ts.map +1 -0
- package/lib/dist/mcp/writer-lock.js +260 -0
- package/lib/dist/mcp/writer-lock.js.map +1 -0
- package/lib/dist/resolution/alias-binding.d.ts +56 -0
- package/lib/dist/resolution/alias-binding.d.ts.map +1 -0
- package/lib/dist/resolution/alias-binding.js +143 -0
- package/lib/dist/resolution/alias-binding.js.map +1 -0
- package/lib/dist/resolution/angular-template-synthesizer.d.ts +49 -0
- package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/angular-template-synthesizer.js +359 -0
- package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -0
- package/lib/dist/resolution/callback-synthesizer.d.ts +23 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +460 -144
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/cpp-constructor.d.ts +4 -0
- package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-constructor.js +123 -0
- package/lib/dist/resolution/cpp-constructor.js.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts +12 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.js +392 -0
- package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.d.ts +32 -0
- package/lib/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.js +189 -0
- package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/frameworks/angular-router.d.ts +142 -0
- package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/angular-router.js +1126 -0
- package/lib/dist/resolution/frameworks/angular-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/astro.js +32 -6
- package/lib/dist/resolution/frameworks/astro.js.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.js +186 -24
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.d.ts +10 -0
- package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.js +95 -1
- package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.d.ts +195 -0
- package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/expo-router.js +847 -0
- package/lib/dist/resolution/frameworks/expo-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/express.js +339 -45
- package/lib/dist/resolution/frameworks/express.js.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.js +13 -11
- 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 +11 -28
- package/lib/dist/resolution/frameworks/go.js.map +1 -1
- package/lib/dist/resolution/frameworks/index.d.ts +8 -2
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +39 -1
- package/lib/dist/resolution/frameworks/index.js.map +1 -1
- package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/java.js +88 -68
- 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 +369 -26
- package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
- package/lib/dist/resolution/frameworks/name-heuristic.d.ts +35 -0
- package/lib/dist/resolution/frameworks/name-heuristic.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/name-heuristic.js +45 -0
- package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -0
- package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.js +288 -55
- package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/nextjs.d.ts +76 -0
- package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/nextjs.js +329 -0
- package/lib/dist/resolution/frameworks/nextjs.js.map +1 -0
- package/lib/dist/resolution/frameworks/object-literal.d.ts +32 -0
- package/lib/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/object-literal.js +139 -0
- package/lib/dist/resolution/frameworks/object-literal.js.map +1 -0
- package/lib/dist/resolution/frameworks/package-deps.d.ts +14 -0
- package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/package-deps.js +78 -0
- package/lib/dist/resolution/frameworks/package-deps.js.map +1 -0
- package/lib/dist/resolution/frameworks/page-component.d.ts +20 -0
- package/lib/dist/resolution/frameworks/page-component.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/page-component.js +45 -0
- package/lib/dist/resolution/frameworks/page-component.js.map +1 -0
- package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/play.js +3 -1
- package/lib/dist/resolution/frameworks/play.js.map +1 -1
- package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/python.js +279 -26
- package/lib/dist/resolution/frameworks/python.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.d.ts +26 -0
- package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.js +153 -14
- package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.d.ts +47 -0
- package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/react-router.js +201 -0
- package/lib/dist/resolution/frameworks/react-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/react.d.ts +13 -2
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react.js +542 -144
- package/lib/dist/resolution/frameworks/react.js.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.js +177 -17
- 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 +24 -22
- 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 +14 -6
- package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/sveltekit-router.js +156 -0
- package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/swift.js +253 -124
- package/lib/dist/resolution/frameworks/swift.js.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/tanstack-router.js +437 -0
- package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/vue-router.d.ts +98 -0
- package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/vue-router.js +500 -0
- package/lib/dist/resolution/frameworks/vue-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/vue.d.ts +9 -2
- package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue.js +45 -11
- package/lib/dist/resolution/frameworks/vue.js.map +1 -1
- package/lib/dist/resolution/import-resolver.d.ts +66 -0
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +643 -61
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +124 -25
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +769 -152
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/js-builtins.d.ts +13 -0
- package/lib/dist/resolution/js-builtins.d.ts.map +1 -0
- package/lib/dist/resolution/js-builtins.js +48 -0
- package/lib/dist/resolution/js-builtins.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +101 -22
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +8267 -287
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.d.ts +27 -0
- package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/next-router-synthesizer.js +113 -0
- package/lib/dist/resolution/next-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts +35 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/react-router-synthesizer.js +197 -0
- package/lib/dist/resolution/react-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/resolver-pool.d.ts +22 -1
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-pool.js +35 -5
- package/lib/dist/resolution/resolver-pool.js.map +1 -1
- package/lib/dist/resolution/resolver-worker.js +3 -0
- package/lib/dist/resolution/resolver-worker.js.map +1 -1
- package/lib/dist/resolution/strip-comments.d.ts +6 -0
- package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
- package/lib/dist/resolution/strip-comments.js +58 -0
- package/lib/dist/resolution/strip-comments.js.map +1 -1
- package/lib/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
- package/lib/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/sveltekit-synthesizer.js +173 -0
- package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -0
- package/lib/dist/resolution/swift-type-visibility.d.ts +68 -0
- package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -0
- package/lib/dist/resolution/swift-type-visibility.js +454 -0
- package/lib/dist/resolution/swift-type-visibility.js.map +1 -0
- package/lib/dist/resolution/synth-utils.d.ts +26 -0
- package/lib/dist/resolution/synth-utils.d.ts.map +1 -0
- package/lib/dist/resolution/synth-utils.js +75 -0
- package/lib/dist/resolution/synth-utils.js.map +1 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.js +114 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts +54 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.js +1294 -0
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -0
- package/lib/dist/resolution/type-parameters.d.ts +11 -0
- package/lib/dist/resolution/type-parameters.d.ts.map +1 -0
- package/lib/dist/resolution/type-parameters.js +287 -0
- package/lib/dist/resolution/type-parameters.js.map +1 -0
- package/lib/dist/resolution/types.d.ts +105 -2
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/resolution/types.js +64 -0
- package/lib/dist/resolution/types.js.map +1 -1
- package/lib/dist/resolution/vue-router-synthesizer.d.ts +30 -0
- package/lib/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/vue-router-synthesizer.js +115 -0
- package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -0
- package/lib/dist/search/query-paths.d.ts +50 -1
- package/lib/dist/search/query-paths.d.ts.map +1 -1
- package/lib/dist/search/query-paths.js +227 -12
- package/lib/dist/search/query-paths.js.map +1 -1
- package/lib/dist/search/query-utils.d.ts +15 -0
- package/lib/dist/search/query-utils.d.ts.map +1 -1
- package/lib/dist/search/query-utils.js +35 -7
- package/lib/dist/search/query-utils.js.map +1 -1
- package/lib/dist/sync/watch-policy.d.ts +14 -0
- package/lib/dist/sync/watch-policy.d.ts.map +1 -1
- package/lib/dist/sync/watch-policy.js +19 -0
- package/lib/dist/sync/watch-policy.js.map +1 -1
- package/lib/dist/sync/watcher.d.ts +52 -35
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +236 -100
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/sync/worktree.d.ts +22 -0
- package/lib/dist/sync/worktree.d.ts.map +1 -1
- package/lib/dist/sync/worktree.js +54 -0
- package/lib/dist/sync/worktree.js.map +1 -1
- package/lib/dist/telemetry/index.d.ts +4 -2
- package/lib/dist/telemetry/index.d.ts.map +1 -1
- package/lib/dist/telemetry/index.js +159 -66
- package/lib/dist/telemetry/index.js.map +1 -1
- package/lib/dist/types.d.ts +1 -1
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +1 -0
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/ui-server/api/deadcode.d.ts +84 -0
- package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -0
- package/lib/dist/ui-server/api/deadcode.js +136 -0
- package/lib/dist/ui-server/api/deadcode.js.map +1 -0
- package/lib/dist/ui-server/api/effects.d.ts +94 -0
- package/lib/dist/ui-server/api/effects.d.ts.map +1 -0
- package/lib/dist/ui-server/api/effects.js +527 -0
- package/lib/dist/ui-server/api/effects.js.map +1 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts +92 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -0
- package/lib/dist/ui-server/api/entrypoints.js +364 -0
- package/lib/dist/ui-server/api/entrypoints.js.map +1 -0
- package/lib/dist/ui-server/api/events.d.ts +183 -0
- package/lib/dist/ui-server/api/events.d.ts.map +1 -0
- package/lib/dist/ui-server/api/events.js +430 -0
- package/lib/dist/ui-server/api/events.js.map +1 -0
- package/lib/dist/ui-server/api/file.d.ts +66 -0
- package/lib/dist/ui-server/api/file.d.ts.map +1 -0
- package/lib/dist/ui-server/api/file.js +235 -0
- package/lib/dist/ui-server/api/file.js.map +1 -0
- package/lib/dist/ui-server/api/filecode.d.ts +126 -0
- package/lib/dist/ui-server/api/filecode.d.ts.map +1 -0
- package/lib/dist/ui-server/api/filecode.js +205 -0
- package/lib/dist/ui-server/api/filecode.js.map +1 -0
- package/lib/dist/ui-server/api/flow.d.ts +226 -0
- package/lib/dist/ui-server/api/flow.d.ts.map +1 -0
- package/lib/dist/ui-server/api/flow.js +612 -0
- package/lib/dist/ui-server/api/flow.js.map +1 -0
- package/lib/dist/ui-server/api/hierarchy.d.ts +81 -0
- package/lib/dist/ui-server/api/hierarchy.d.ts.map +1 -0
- package/lib/dist/ui-server/api/hierarchy.js +92 -0
- package/lib/dist/ui-server/api/hierarchy.js.map +1 -0
- package/lib/dist/ui-server/api/index.d.ts +90 -0
- package/lib/dist/ui-server/api/index.d.ts.map +1 -0
- package/lib/dist/ui-server/api/index.js +332 -0
- package/lib/dist/ui-server/api/index.js.map +1 -0
- package/lib/dist/ui-server/api/map.d.ts +273 -0
- package/lib/dist/ui-server/api/map.d.ts.map +1 -0
- package/lib/dist/ui-server/api/map.js +781 -0
- package/lib/dist/ui-server/api/map.js.map +1 -0
- package/lib/dist/ui-server/api/node.d.ts +81 -0
- package/lib/dist/ui-server/api/node.d.ts.map +1 -0
- package/lib/dist/ui-server/api/node.js +394 -0
- package/lib/dist/ui-server/api/node.js.map +1 -0
- package/lib/dist/ui-server/api/nodes.d.ts +25 -0
- package/lib/dist/ui-server/api/nodes.d.ts.map +1 -0
- package/lib/dist/ui-server/api/nodes.js +45 -0
- package/lib/dist/ui-server/api/nodes.js.map +1 -0
- package/lib/dist/ui-server/api/program.d.ts +139 -0
- package/lib/dist/ui-server/api/program.d.ts.map +1 -0
- package/lib/dist/ui-server/api/program.js +315 -0
- package/lib/dist/ui-server/api/program.js.map +1 -0
- package/lib/dist/ui-server/api/respond.d.ts +76 -0
- package/lib/dist/ui-server/api/respond.d.ts.map +1 -0
- package/lib/dist/ui-server/api/respond.js +186 -0
- package/lib/dist/ui-server/api/respond.js.map +1 -0
- package/lib/dist/ui-server/api/route-roots.d.ts +45 -0
- package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -0
- package/lib/dist/ui-server/api/route-roots.js +117 -0
- package/lib/dist/ui-server/api/route-roots.js.map +1 -0
- package/lib/dist/ui-server/api/routes.d.ts +61 -0
- package/lib/dist/ui-server/api/routes.d.ts.map +1 -0
- package/lib/dist/ui-server/api/routes.js +164 -0
- package/lib/dist/ui-server/api/routes.js.map +1 -0
- package/lib/dist/ui-server/api/screens.d.ts +117 -0
- package/lib/dist/ui-server/api/screens.d.ts.map +1 -0
- package/lib/dist/ui-server/api/screens.js +626 -0
- package/lib/dist/ui-server/api/screens.js.map +1 -0
- package/lib/dist/ui-server/api/search.d.ts +29 -0
- package/lib/dist/ui-server/api/search.d.ts.map +1 -0
- package/lib/dist/ui-server/api/search.js +232 -0
- package/lib/dist/ui-server/api/search.js.map +1 -0
- package/lib/dist/ui-server/api/session.d.ts +52 -0
- package/lib/dist/ui-server/api/session.d.ts.map +1 -0
- package/lib/dist/ui-server/api/session.js +196 -0
- package/lib/dist/ui-server/api/session.js.map +1 -0
- package/lib/dist/ui-server/api/source.d.ts +200 -0
- package/lib/dist/ui-server/api/source.d.ts.map +1 -0
- package/lib/dist/ui-server/api/source.js +422 -0
- package/lib/dist/ui-server/api/source.js.map +1 -0
- package/lib/dist/ui-server/api/stats.d.ts +27 -0
- package/lib/dist/ui-server/api/stats.d.ts.map +1 -0
- package/lib/dist/ui-server/api/stats.js +164 -0
- package/lib/dist/ui-server/api/stats.js.map +1 -0
- package/lib/dist/ui-server/api/steps.d.ts +274 -0
- package/lib/dist/ui-server/api/steps.d.ts.map +1 -0
- package/lib/dist/ui-server/api/steps.js +1554 -0
- package/lib/dist/ui-server/api/steps.js.map +1 -0
- package/lib/dist/ui-server/api/trail-store.d.ts +142 -0
- package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -0
- package/lib/dist/ui-server/api/trail-store.js +323 -0
- package/lib/dist/ui-server/api/trail-store.js.map +1 -0
- package/lib/dist/ui-server/api/trails.d.ts +163 -0
- package/lib/dist/ui-server/api/trails.d.ts.map +1 -0
- package/lib/dist/ui-server/api/trails.js +370 -0
- package/lib/dist/ui-server/api/trails.js.map +1 -0
- package/lib/dist/ui-server/api/when.d.ts +133 -0
- package/lib/dist/ui-server/api/when.d.ts.map +1 -0
- package/lib/dist/ui-server/api/when.js +275 -0
- package/lib/dist/ui-server/api/when.js.map +1 -0
- package/lib/dist/ui-server/api/wire.d.ts +179 -0
- package/lib/dist/ui-server/api/wire.d.ts.map +1 -0
- package/lib/dist/ui-server/api/wire.js +231 -0
- package/lib/dist/ui-server/api/wire.js.map +1 -0
- package/lib/dist/ui-server/assets.d.ts +40 -0
- package/lib/dist/ui-server/assets.d.ts.map +1 -0
- package/lib/dist/ui-server/assets.js +110 -0
- package/lib/dist/ui-server/assets.js.map +1 -0
- package/lib/dist/ui-server/constants.d.ts +32 -0
- package/lib/dist/ui-server/constants.d.ts.map +1 -0
- package/lib/dist/ui-server/constants.js +35 -0
- package/lib/dist/ui-server/constants.js.map +1 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts +28 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.js +139 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -0
- package/lib/dist/ui-server/highlight/index.d.ts +113 -0
- package/lib/dist/ui-server/highlight/index.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/index.js +312 -0
- package/lib/dist/ui-server/highlight/index.js.map +1 -0
- package/lib/dist/ui-server/highlight/languages.d.ts +36 -0
- package/lib/dist/ui-server/highlight/languages.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/languages.js +50 -0
- package/lib/dist/ui-server/highlight/languages.js.map +1 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.d.ts +7 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.js +20 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -0
- package/lib/dist/ui-server/index.d.ts +92 -0
- package/lib/dist/ui-server/index.d.ts.map +1 -0
- package/lib/dist/ui-server/index.js +399 -0
- package/lib/dist/ui-server/index.js.map +1 -0
- package/lib/dist/ui-server/open-browser.d.ts +31 -0
- package/lib/dist/ui-server/open-browser.d.ts.map +1 -0
- package/lib/dist/ui-server/open-browser.js +79 -0
- package/lib/dist/ui-server/open-browser.js.map +1 -0
- package/lib/dist/ui-server/security.d.ts +127 -0
- package/lib/dist/ui-server/security.d.ts.map +1 -0
- package/lib/dist/ui-server/security.js +332 -0
- package/lib/dist/ui-server/security.js.map +1 -0
- package/lib/dist/ui-server/static.d.ts +45 -0
- package/lib/dist/ui-server/static.d.ts.map +1 -0
- package/lib/dist/ui-server/static.js +165 -0
- package/lib/dist/ui-server/static.js.map +1 -0
- package/lib/dist/upgrade/index.d.ts +43 -5
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +157 -35
- package/lib/dist/upgrade/index.js.map +1 -1
- package/lib/dist/utils.d.ts +14 -2
- package/lib/dist/utils.d.ts.map +1 -1
- package/lib/dist/utils.js +25 -10
- package/lib/dist/utils.js.map +1 -1
- package/lib/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
- package/lib/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
- package/lib/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
- package/lib/dist/viewer/assets/index-BSGpxBr9.js +99 -0
- package/lib/dist/viewer/assets/index-CF9yvio6.css +1 -0
- package/lib/dist/viewer/index.html +16 -0
- package/lib/dist/worker-teardown.d.ts +48 -0
- package/lib/dist/worker-teardown.d.ts.map +1 -0
- package/lib/dist/worker-teardown.js +100 -0
- package/lib/dist/worker-teardown.js.map +1 -0
- package/lib/kernel/codegraph-kernel.node +2 -2
- package/lib/node_modules/.package-lock.json +4 -4
- package/lib/node_modules/picomatch/README.md +56 -51
- package/lib/node_modules/picomatch/lib/constants.js +4 -0
- package/lib/node_modules/picomatch/lib/parse.js +341 -1
- package/lib/node_modules/picomatch/lib/picomatch.js +25 -5
- package/lib/node_modules/picomatch/lib/scan.js +30 -18
- package/lib/node_modules/picomatch/package.json +4 -4
- package/lib/package.json +9 -2
- package/package.json +1 -1
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
* codegraph callees <symbol> Find what a function/method calls
|
|
22
22
|
* codegraph impact <symbol> Analyze what code is affected by changing a symbol
|
|
23
23
|
* codegraph affected [files] Find test files affected by changes
|
|
24
|
+
* codegraph ui [path] Open the browser viewer (alias: web; not released yet — needs CODEGRAPH_UI=1)
|
|
24
25
|
* codegraph upgrade [version] Update CodeGraph to the latest release
|
|
25
26
|
*/
|
|
26
27
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -61,6 +62,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
61
62
|
// launcher is (almost certainly) still alive. A launcher killed mid-startup
|
|
62
63
|
// otherwise blinds the PPID watchdog forever (#1185) — see early-ppid.ts.
|
|
63
64
|
require("../mcp/early-ppid");
|
|
65
|
+
// The browser viewer is not part of a release yet (see viewer-gate). Refuse
|
|
66
|
+
// `ui` / `web` — also as `help ui` or `ui --help` — before any startup work,
|
|
67
|
+
// unless CODEGRAPH_UI=1 opts in.
|
|
68
|
+
const viewer_gate_1 = require("./viewer-gate");
|
|
69
|
+
{
|
|
70
|
+
const viewerCommand = (0, viewer_gate_1.requestedViewerCommand)(process.argv.slice(2));
|
|
71
|
+
if (viewerCommand && !(0, viewer_gate_1.viewerEnabled)()) {
|
|
72
|
+
process.stderr.write(`error: 'codegraph ${viewerCommand}' is not in this release yet. The browser viewer is coming in an upcoming release.\n`);
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
64
76
|
// Persist V8 compile artifacts across runs (Node ≥22.8). Every invocation —
|
|
65
77
|
// and every worker thread, which re-requires the whole extraction module
|
|
66
78
|
// graph — skips recompiling unchanged sources. Worth hundreds of ms of
|
|
@@ -85,6 +97,12 @@ const wasm_runtime_flags_1 = require("../extraction/wasm-runtime-flags");
|
|
|
85
97
|
const command_supervision_1 = require("./command-supervision");
|
|
86
98
|
const extraction_version_1 = require("../extraction/extraction-version");
|
|
87
99
|
const telemetry_1 = require("../telemetry");
|
|
100
|
+
// Value import, but dependency-free by design so `--help` text can name the
|
|
101
|
+
// default port without dragging node:http into every other subcommand; the
|
|
102
|
+
// server itself is loaded lazily inside the `ui` action. See ui-server/constants.
|
|
103
|
+
const constants_1 = require("../ui-server/constants");
|
|
104
|
+
const symbol_lookup_1 = require("../graph/symbol-lookup");
|
|
105
|
+
const query_utils_1 = require("../search/query-utils");
|
|
88
106
|
// Decided once, before `--color`/`--no-color` are stripped from argv below
|
|
89
107
|
// (#1281). Piped/redirected stdout, NO_COLOR, or --no-color -> plain output.
|
|
90
108
|
const COLORS_ENABLED = (0, color_1.ansiColorsEnabled)();
|
|
@@ -355,11 +373,31 @@ function main() {
|
|
|
355
373
|
function warn(message) {
|
|
356
374
|
console.log(chalk.yellow((0, glyphs_1.getGlyphs)().warn) + ' ' + message);
|
|
357
375
|
}
|
|
376
|
+
/** "not found" (+ optional did-you-mean) when no exact symbol matches. */
|
|
377
|
+
function formatSymbolNotFound(symbol, fuzzyNames) {
|
|
378
|
+
const suggestions = [...new Set(fuzzyNames.filter((n) => n !== symbol))].slice(0, 3);
|
|
379
|
+
if (suggestions.length === 0)
|
|
380
|
+
return `Symbol "${symbol}" not found`;
|
|
381
|
+
return `Symbol "${symbol}" not found — did you mean: ${suggestions.join(', ')}?`;
|
|
382
|
+
}
|
|
383
|
+
/** Compact node shape retained by the CLI's existing JSON lists. */
|
|
384
|
+
function cliNode(node) {
|
|
385
|
+
return { name: node.name, kind: node.kind, filePath: node.filePath, startLine: node.startLine };
|
|
386
|
+
}
|
|
387
|
+
/** Attribute a group's edges to every overload of this definition. */
|
|
388
|
+
function cliDefinition(group) {
|
|
389
|
+
const head = group[0];
|
|
390
|
+
return {
|
|
391
|
+
definition: { ...cliNode(head), id: head.id, qualifiedName: head.qualifiedName, language: head.language },
|
|
392
|
+
roots: group.map((node) => node.id),
|
|
393
|
+
};
|
|
394
|
+
}
|
|
358
395
|
/**
|
|
359
396
|
* Print indexing results using clack log methods
|
|
360
397
|
*/
|
|
361
398
|
function printIndexResult(clack, result, projectPath) {
|
|
362
399
|
const hasErrors = result.filesErrored > 0;
|
|
400
|
+
const parseWarnings = result.errors.filter((e) => e.code === 'parse_error' && e.severity === 'warning');
|
|
363
401
|
// Surface non-file-level failures (e.g. lock-acquisition failure
|
|
364
402
|
// when another indexer is running) before the file-count branches.
|
|
365
403
|
// Without this the CLI falls through to "No files found to index",
|
|
@@ -384,6 +422,10 @@ function main() {
|
|
|
384
422
|
clack.log.success(`Indexed ${formatNumber(result.filesIndexed)} files`);
|
|
385
423
|
}
|
|
386
424
|
clack.log.info(`${formatNumber(result.nodesCreated)} nodes, ${formatNumber(result.edgesCreated)} edges in ${formatDuration(result.durationMs)}`);
|
|
425
|
+
// Warning-only parse failures keep indexing successful, but must be visible.
|
|
426
|
+
for (const warning of parseWarnings) {
|
|
427
|
+
clack.log.warn(warning.message);
|
|
428
|
+
}
|
|
387
429
|
// A PARTIAL index (files silently dropped mid-pipeline) must not pass
|
|
388
430
|
// as a clean run — it's the difference between "indexed the repo" and
|
|
389
431
|
// "indexed most of the repo, quietly". Only the completeness
|
|
@@ -406,6 +448,19 @@ function main() {
|
|
|
406
448
|
else if (hasErrors) {
|
|
407
449
|
clack.log.error(`Indexing failed ${(0, glyphs_1.getGlyphs)().dash} all ${formatNumber(result.filesErrored)} files had errors`);
|
|
408
450
|
}
|
|
451
|
+
else if (result.filesSkippedUnsupported) {
|
|
452
|
+
// A project CodeGraph has no grammar for used to be indistinguishable from
|
|
453
|
+
// an empty one: same message, same `complete` state, same exit 0. Say which
|
|
454
|
+
// files were there and that the graph is empty on purpose, so nobody — and
|
|
455
|
+
// no agent trusting the graph — reads silence as "this code doesn't exist"
|
|
456
|
+
// (#1502).
|
|
457
|
+
const top = (result.topUnsupportedExtensions ?? [])
|
|
458
|
+
.map(e => `${e.ext} (${formatNumber(e.count)})`)
|
|
459
|
+
.join(', ');
|
|
460
|
+
clack.log.warn(`No supported source files found ${(0, glyphs_1.getGlyphs)().dash} ${formatNumber(result.filesSkippedUnsupported)} file(s) present, none in a language CodeGraph indexes`
|
|
461
|
+
+ (top ? `: ${top}` : ''));
|
|
462
|
+
clack.log.info('CodeGraph is inactive for this workspace — searches will return nothing. Use your own file tools here.');
|
|
463
|
+
}
|
|
409
464
|
else {
|
|
410
465
|
clack.log.warn('No files found to index');
|
|
411
466
|
}
|
|
@@ -601,9 +656,27 @@ function main() {
|
|
|
601
656
|
clack.outro('');
|
|
602
657
|
return;
|
|
603
658
|
}
|
|
659
|
+
if ((0, directory_1.hasForeignDbFile)(projectPath)) {
|
|
660
|
+
const dbFile = path.join((0, directory_1.getCodeGraphDir)(projectPath), 'codegraph.db');
|
|
661
|
+
clack.log.error(`${dbFile} is not a SQLite database, so it cannot be rebuilt in place.`);
|
|
662
|
+
clack.log.info('Move or delete that file, then run "codegraph init" again.');
|
|
663
|
+
clack.outro('');
|
|
664
|
+
process.exitCode = 1;
|
|
665
|
+
return;
|
|
666
|
+
}
|
|
667
|
+
if ((0, directory_1.hasSchemalessDb)(projectPath)) {
|
|
668
|
+
clack.log.warn(`Found a codegraph.db without the codegraph schema in ${(0, directory_1.getCodeGraphDir)(projectPath)} (left by an interrupted init?) — rebuilding it.`);
|
|
669
|
+
}
|
|
604
670
|
const { default: CodeGraph, getDatabasePath } = await loadCodeGraph();
|
|
605
671
|
const cg = await CodeGraph.init(projectPath, { index: false });
|
|
606
672
|
clack.log.success(`Initialized in ${projectPath}`);
|
|
673
|
+
// A fresh index on a Windows drive under WSL gets its own directory (#995).
|
|
674
|
+
// It isn't the documented name, so say where it went and why.
|
|
675
|
+
const dataDir = path.basename((0, directory_1.getCodeGraphDir)(projectPath));
|
|
676
|
+
if (dataDir !== (0, directory_1.codeGraphDirName)()) {
|
|
677
|
+
clack.log.info(`The index is in ${dataDir}/: this project is on a Windows drive, so WSL keeps its own index ` +
|
|
678
|
+
`rather than share ${directory_1.DEFAULT_CODEGRAPH_DIR}/ with CodeGraph on Windows. Set CODEGRAPH_DIR to choose the name yourself.`);
|
|
679
|
+
}
|
|
607
680
|
// Indexing runs by default now. The legacy -i/--index flag is still
|
|
608
681
|
// accepted (so existing muscle memory and scripts don't break) but is a
|
|
609
682
|
// no-op — initializing always builds the initial index.
|
|
@@ -729,7 +802,13 @@ function main() {
|
|
|
729
802
|
.option('-q, --quiet', 'Suppress progress output')
|
|
730
803
|
.option('-v, --verbose', 'Show detailed worker lifecycle and memory info')
|
|
731
804
|
.action(async (pathArg, options) => {
|
|
732
|
-
|
|
805
|
+
// An EXPLICIT path names the project to rebuild — it is never a hint to go
|
|
806
|
+
// looking for one. resolveProjectPath walks up to the nearest initialized
|
|
807
|
+
// ancestor, which is right for `codegraph query` run from a subdirectory,
|
|
808
|
+
// but for a full re-index it silently rebuilt the parent's graph under a
|
|
809
|
+
// normal "Done" when <path> had no index of its own (#1524). Only a bare
|
|
810
|
+
// `codegraph index` (cwd) may resolve upward.
|
|
811
|
+
const projectPath = pathArg ? path.resolve(pathArg) : resolveProjectPath();
|
|
733
812
|
try {
|
|
734
813
|
// Don't (re)index your home directory / a filesystem root (#845). --force
|
|
735
814
|
// doubles as the override.
|
|
@@ -740,66 +819,97 @@ function main() {
|
|
|
740
819
|
}
|
|
741
820
|
if (!(0, directory_1.isInitialized)(projectPath)) {
|
|
742
821
|
error(`CodeGraph not initialized in ${projectPath}`);
|
|
743
|
-
|
|
822
|
+
const ancestor = pathArg ? resolveProjectPath(pathArg) : projectPath;
|
|
823
|
+
if (ancestor !== projectPath) {
|
|
824
|
+
info(`The nearest initialized project is ${ancestor} — pass that path to rebuild it, or run "codegraph init" in ${projectPath} to index it on its own.`);
|
|
825
|
+
}
|
|
826
|
+
else {
|
|
827
|
+
info('Run "codegraph init" first');
|
|
828
|
+
}
|
|
744
829
|
process.exit(1);
|
|
745
830
|
}
|
|
746
|
-
const {
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
// approach reported "0 nodes" without the clear (#874); the recreate keeps
|
|
751
|
-
// that fixed AND avoids the failure mode where, on a large or pre-fix
|
|
752
|
-
// poisoned index, the per-row FTS delete churn wedged the main thread long
|
|
753
|
-
// enough to trip the liveness watchdog before scanning even began (#1067).
|
|
754
|
-
// recreate() hands back a fresh, empty instance — no clear() needed. For
|
|
755
|
-
// fast incremental updates use `sync`.
|
|
756
|
-
const cg = await CodeGraph.recreate(projectPath);
|
|
757
|
-
// Supervise the indexer: self-terminate if orphaned (parent shim killed)
|
|
758
|
-
// or if the main thread wedges — neither was guarded on this path (#999).
|
|
759
|
-
// The DB + WAL paths let the liveness watchdog tell a slow store on
|
|
760
|
-
// degraded storage from a true wedge (#1231).
|
|
761
|
-
const dbPath = getDatabasePath(projectPath);
|
|
762
|
-
const supervision = (0, command_supervision_1.installCommandSupervision)('index', { progressPaths: [dbPath, `${dbPath}-wal`] });
|
|
831
|
+
const { tryAcquireWriterLock, releaseWriterLock, writerLockHeldMessage } = await Promise.resolve().then(() => __importStar(require('../mcp/writer-lock')));
|
|
832
|
+
const rebuild = tryAcquireWriterLock(projectPath, 'rebuild', 'rebuild.pid');
|
|
833
|
+
if (rebuild.kind === 'taken')
|
|
834
|
+
throw new Error('Another index rebuild is already in progress.');
|
|
763
835
|
try {
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
return;
|
|
836
|
+
// A live MCP daemon keeps SQLite handles open. Verify it by its socket
|
|
837
|
+
// before stopping it so a stale pidfile can never signal another process.
|
|
838
|
+
const { stopDaemonAt } = await Promise.resolve().then(() => __importStar(require('../mcp/daemon-registry')));
|
|
839
|
+
const daemonStop = await stopDaemonAt(fs.realpathSync(projectPath), { preserveUnverified: true });
|
|
840
|
+
if (daemonStop.outcome === 'unverified' || daemonStop.outcome === 'still-running') {
|
|
841
|
+
throw new Error('Could not verify that the active CodeGraph daemon has stopped. Run `codegraph daemon stop` to stop it, then retry `codegraph index`.');
|
|
771
842
|
}
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
843
|
+
// Keep the writer slot through recreation AND indexing. A reconnecting
|
|
844
|
+
// proxy/daemon must not open the replacement database halfway through.
|
|
845
|
+
const writer = tryAcquireWriterLock(projectPath, 'rebuild');
|
|
846
|
+
if (writer.kind === 'taken')
|
|
847
|
+
throw new Error(writerLockHeldMessage(writer.existing, writer.pidPath));
|
|
848
|
+
try {
|
|
849
|
+
const { default: CodeGraph, getDatabasePath } = await loadCodeGraph();
|
|
850
|
+
// `index` is a FULL re-index — identical to a fresh `init`. RECREATE the
|
|
851
|
+
// database from scratch (discard .codegraph/codegraph.db + its WAL) rather
|
|
852
|
+
// than opening the old graph and DELETE-ing every row. The clear-then-index
|
|
853
|
+
// approach reported "0 nodes" without the clear (#874); the recreate keeps
|
|
854
|
+
// that fixed AND avoids the failure mode where, on a large or pre-fix
|
|
855
|
+
// poisoned index, the per-row FTS delete churn wedged the main thread long
|
|
856
|
+
// enough to trip the liveness watchdog before scanning even began (#1067).
|
|
857
|
+
// recreate() hands back a fresh, empty instance — no clear() needed. For
|
|
858
|
+
// fast incremental updates use `sync`.
|
|
859
|
+
const cg = await CodeGraph.recreate(projectPath);
|
|
860
|
+
// Supervise the indexer: self-terminate if orphaned (parent shim killed)
|
|
861
|
+
// or if the main thread wedges — neither was guarded on this path (#999).
|
|
862
|
+
// The DB + WAL paths let the liveness watchdog tell a slow store on
|
|
863
|
+
// degraded storage from a true wedge (#1231).
|
|
864
|
+
const dbPath = getDatabasePath(projectPath);
|
|
865
|
+
const supervision = (0, command_supervision_1.installCommandSupervision)('index', { progressPaths: [dbPath, `${dbPath}-wal`] });
|
|
866
|
+
try {
|
|
867
|
+
if (options.quiet) {
|
|
868
|
+
// Quiet mode: no UI, just run against the freshly-recreated graph.
|
|
869
|
+
const result = await cg.indexAll();
|
|
870
|
+
if (!result.success)
|
|
871
|
+
process.exit(1);
|
|
872
|
+
return;
|
|
873
|
+
}
|
|
874
|
+
const clack = await importESM('@clack/prompts');
|
|
875
|
+
clack.intro('Indexing project');
|
|
876
|
+
// A closure so a re-index (after opting gitignored child repos in, #1156)
|
|
877
|
+
// renders identically. Supervision already wraps the whole command.
|
|
878
|
+
const renderIndex = async () => {
|
|
879
|
+
if (options.verbose) {
|
|
880
|
+
return await cg.indexAll({ onProgress: createVerboseProgress(), verbose: true });
|
|
881
|
+
}
|
|
882
|
+
process.stdout.write(`${colors.dim}${(0, glyphs_1.getGlyphs)().rail}${colors.reset}\n`);
|
|
883
|
+
const progress = (0, shimmer_progress_1.createShimmerProgress)();
|
|
884
|
+
const r = await cg.indexAll({ onProgress: progress.onProgress });
|
|
885
|
+
await progress.stop();
|
|
886
|
+
return r;
|
|
887
|
+
};
|
|
888
|
+
const result = await renderIndex();
|
|
889
|
+
printIndexResult(clack, result, projectPath);
|
|
890
|
+
await recordIndexTelemetry(cg, result);
|
|
891
|
+
// Empty graph at a git super-repo → likely `.gitignore`d child repos;
|
|
892
|
+
// name them and offer to opt in instead of a silent 0-node result (#1156).
|
|
893
|
+
let finalResult = result;
|
|
894
|
+
if (result.nodesCreated === 0) {
|
|
895
|
+
finalResult = (await offerIndexIgnoredRepos(clack, projectPath, renderIndex, { interactive: true })) ?? result;
|
|
896
|
+
}
|
|
897
|
+
if (!finalResult.success) {
|
|
898
|
+
process.exit(1);
|
|
899
|
+
}
|
|
900
|
+
clack.outro('Done');
|
|
901
|
+
}
|
|
902
|
+
finally {
|
|
903
|
+
supervision.stop();
|
|
904
|
+
cg.destroy();
|
|
779
905
|
}
|
|
780
|
-
process.stdout.write(`${colors.dim}${(0, glyphs_1.getGlyphs)().rail}${colors.reset}\n`);
|
|
781
|
-
const progress = (0, shimmer_progress_1.createShimmerProgress)();
|
|
782
|
-
const r = await cg.indexAll({ onProgress: progress.onProgress });
|
|
783
|
-
await progress.stop();
|
|
784
|
-
return r;
|
|
785
|
-
};
|
|
786
|
-
const result = await renderIndex();
|
|
787
|
-
printIndexResult(clack, result, projectPath);
|
|
788
|
-
await recordIndexTelemetry(cg, result);
|
|
789
|
-
// Empty graph at a git super-repo → likely `.gitignore`d child repos;
|
|
790
|
-
// name them and offer to opt in instead of a silent 0-node result (#1156).
|
|
791
|
-
let finalResult = result;
|
|
792
|
-
if (result.nodesCreated === 0) {
|
|
793
|
-
finalResult = (await offerIndexIgnoredRepos(clack, projectPath, renderIndex, { interactive: true })) ?? result;
|
|
794
906
|
}
|
|
795
|
-
|
|
796
|
-
|
|
907
|
+
finally {
|
|
908
|
+
releaseWriterLock(projectPath);
|
|
797
909
|
}
|
|
798
|
-
clack.outro('Done');
|
|
799
|
-
cg.destroy();
|
|
800
910
|
}
|
|
801
911
|
finally {
|
|
802
|
-
|
|
912
|
+
releaseWriterLock(projectPath, 'rebuild.pid');
|
|
803
913
|
}
|
|
804
914
|
}
|
|
805
915
|
catch (err) {
|
|
@@ -825,36 +935,43 @@ function main() {
|
|
|
825
935
|
}
|
|
826
936
|
const { default: CodeGraph } = await loadCodeGraph();
|
|
827
937
|
const cg = await CodeGraph.open(projectPath);
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
938
|
+
try {
|
|
939
|
+
if (options.quiet) {
|
|
940
|
+
await cg.sync();
|
|
941
|
+
return;
|
|
942
|
+
}
|
|
943
|
+
const clack = await importESM('@clack/prompts');
|
|
944
|
+
clack.intro('Syncing CodeGraph');
|
|
945
|
+
process.stdout.write(`${colors.dim}${(0, glyphs_1.getGlyphs)().rail}${colors.reset}\n`);
|
|
946
|
+
const progress = (0, shimmer_progress_1.createShimmerProgress)();
|
|
947
|
+
const result = await cg.sync({
|
|
948
|
+
onProgress: progress.onProgress,
|
|
949
|
+
}).finally(() => progress.stop());
|
|
950
|
+
const totalChanges = result.filesAdded + result.filesModified + result.filesRemoved;
|
|
951
|
+
if (totalChanges === 0 && !result.pendingRefsProcessed) {
|
|
952
|
+
clack.log.info('Already up to date');
|
|
953
|
+
}
|
|
954
|
+
else if (totalChanges > 0) {
|
|
955
|
+
clack.log.success(`Synced ${formatNumber(totalChanges)} changed files`);
|
|
956
|
+
const details = [];
|
|
957
|
+
if (result.filesAdded > 0)
|
|
958
|
+
details.push(`Added: ${result.filesAdded}`);
|
|
959
|
+
if (result.filesModified > 0)
|
|
960
|
+
details.push(`Modified: ${result.filesModified}`);
|
|
961
|
+
if (result.filesRemoved > 0)
|
|
962
|
+
details.push(`Removed: ${result.filesRemoved}`);
|
|
963
|
+
clack.log.info(`${details.join(', ')} ${(0, glyphs_1.getGlyphs)().dash} ${formatNumber(result.nodesUpdated)} nodes in ${formatDuration(result.durationMs)}`);
|
|
964
|
+
}
|
|
965
|
+
if (result.pendingRefsProcessed) {
|
|
966
|
+
const unresolved = result.pendingRefsUnresolved
|
|
967
|
+
? ` (${formatNumber(result.pendingRefsUnresolved)} unresolved)` : '';
|
|
968
|
+
clack.log.info(`Resolved ${formatNumber(result.pendingRefsResolved ?? 0)} pending references${unresolved}`);
|
|
969
|
+
}
|
|
970
|
+
clack.outro('Done');
|
|
844
971
|
}
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
const details = [];
|
|
848
|
-
if (result.filesAdded > 0)
|
|
849
|
-
details.push(`Added: ${result.filesAdded}`);
|
|
850
|
-
if (result.filesModified > 0)
|
|
851
|
-
details.push(`Modified: ${result.filesModified}`);
|
|
852
|
-
if (result.filesRemoved > 0)
|
|
853
|
-
details.push(`Removed: ${result.filesRemoved}`);
|
|
854
|
-
clack.log.info(`${details.join(', ')} ${(0, glyphs_1.getGlyphs)().dash} ${formatNumber(result.nodesUpdated)} nodes in ${formatDuration(result.durationMs)}`);
|
|
972
|
+
finally {
|
|
973
|
+
cg.destroy();
|
|
855
974
|
}
|
|
856
|
-
clack.outro('Done');
|
|
857
|
-
cg.destroy();
|
|
858
975
|
}
|
|
859
976
|
catch (err) {
|
|
860
977
|
if (!options.quiet) {
|
|
@@ -1075,20 +1192,27 @@ function main() {
|
|
|
1075
1192
|
const cg = await CodeGraph.open(projectPath);
|
|
1076
1193
|
const limit = parseInt(options.limit || '10', 10);
|
|
1077
1194
|
const rawResults = cg.searchNodes(search, {
|
|
1078
|
-
|
|
1195
|
+
// Fetch one extra row so the CLI can report a cut without changing the
|
|
1196
|
+
// long-standing bare-array contract of `query --json` (#1639).
|
|
1197
|
+
limit: limit + 1,
|
|
1079
1198
|
kinds: options.kind ? [options.kind] : undefined,
|
|
1080
1199
|
});
|
|
1081
1200
|
// Mirror the MCP search down-rank so the CLI also surfaces the
|
|
1082
1201
|
// hand-written implementation before protobuf/gRPC scaffolding
|
|
1083
1202
|
// when both share a name. See extraction/generated-detection.ts.
|
|
1084
1203
|
const isGen = cg.generatedFilePredicate(rawResults.map((r) => r.node.filePath));
|
|
1085
|
-
const
|
|
1204
|
+
const rankedResults = [...rawResults].sort((a, b) => {
|
|
1086
1205
|
const aGen = isGen(a.node.filePath) ? 1 : 0;
|
|
1087
1206
|
const bGen = isGen(b.node.filePath) ? 1 : 0;
|
|
1088
1207
|
return aGen - bGen;
|
|
1089
1208
|
});
|
|
1209
|
+
const truncated = rankedResults.length > limit;
|
|
1210
|
+
const results = rankedResults.slice(0, limit);
|
|
1211
|
+
const truncationMessage = `Results truncated at ${limit}; pass --limit to widen.`;
|
|
1090
1212
|
if (options.json) {
|
|
1091
1213
|
console.log(JSON.stringify(results, null, 2));
|
|
1214
|
+
if (truncated)
|
|
1215
|
+
console.error(truncationMessage);
|
|
1092
1216
|
}
|
|
1093
1217
|
else {
|
|
1094
1218
|
if (results.length === 0) {
|
|
@@ -1112,6 +1236,8 @@ function main() {
|
|
|
1112
1236
|
}
|
|
1113
1237
|
console.log();
|
|
1114
1238
|
}
|
|
1239
|
+
if (truncated)
|
|
1240
|
+
console.log(chalk.dim(truncationMessage));
|
|
1115
1241
|
}
|
|
1116
1242
|
}
|
|
1117
1243
|
cg.destroy();
|
|
@@ -1254,6 +1380,11 @@ function main() {
|
|
|
1254
1380
|
return;
|
|
1255
1381
|
}
|
|
1256
1382
|
const prompt = String(input.prompt || '');
|
|
1383
|
+
// System-injected task notifications and subagent hand-backs are not
|
|
1384
|
+
// user prompts: exit before any project lookup or explore work (#1832,
|
|
1385
|
+
// #2184).
|
|
1386
|
+
if ((0, directory_1.isTaskNotification)(prompt) || (0, directory_1.isAgentMessage)(prompt))
|
|
1387
|
+
return;
|
|
1257
1388
|
// Gate telemetry: how often each tier fires vs. no-ops — counter names
|
|
1258
1389
|
// only, NEVER prompt content (see TELEMETRY.md). This is the data that
|
|
1259
1390
|
// turns "is the gate any good" from vibes into a measured recall rate.
|
|
@@ -1318,8 +1449,11 @@ function main() {
|
|
|
1318
1449
|
const text = result.content[0]?.text ?? '';
|
|
1319
1450
|
if (!result.isError && text.trim()) {
|
|
1320
1451
|
// Cap the injection so a large-repo explore can't flood the prompt.
|
|
1321
|
-
|
|
1322
|
-
|
|
1452
|
+
// Claude Code shows hook stdout inline only up to 10,000 characters;
|
|
1453
|
+
// above that it persists the output to a file and the model sees a
|
|
1454
|
+
// 2 KB preview (#1694). PROMPT_HOOK_INJECTION_MAX (9,000) leaves
|
|
1455
|
+
// room for the wrapper and the projectPath nudge lines below.
|
|
1456
|
+
const body = (0, directory_1.capPromptHookInjection)(text);
|
|
1323
1457
|
// For a front-loaded SUB-project, a follow-up explore needs its path.
|
|
1324
1458
|
const more = plan.viaSubScan
|
|
1325
1459
|
? `call codegraph_explore with projectPath: "${plan.exploreRoot}" for more`
|
|
@@ -1701,6 +1835,176 @@ function main() {
|
|
|
1701
1835
|
done: (m) => clack.outro(m),
|
|
1702
1836
|
});
|
|
1703
1837
|
});
|
|
1838
|
+
/**
|
|
1839
|
+
* Print the "no index here" guidance.
|
|
1840
|
+
*
|
|
1841
|
+
* The viewer READS an index; it never builds one — indexing stays the user's
|
|
1842
|
+
* decision, exactly as it is for the MCP tools. So a missing index is normal
|
|
1843
|
+
* input, not a failure to apologize for: say what is missing, say the one
|
|
1844
|
+
* command that fixes it, and never print a stack trace.
|
|
1845
|
+
*/
|
|
1846
|
+
function printNoIndexGuidance(projectPath) {
|
|
1847
|
+
error(`No CodeGraph index found for ${projectPath}`);
|
|
1848
|
+
console.error('');
|
|
1849
|
+
// getGlyphs() (not a literal em dash): a legacy Windows console decodes raw
|
|
1850
|
+
// UTF-8 with its OEM codepage and renders one as mojibake (#168).
|
|
1851
|
+
console.error(` The viewer reads an index that already exists ${(0, glyphs_1.getGlyphs)().dash} it never creates one.`);
|
|
1852
|
+
console.error(' To index this project:');
|
|
1853
|
+
console.error('');
|
|
1854
|
+
console.error(` ${chalk.cyan('codegraph init')}`);
|
|
1855
|
+
console.error('');
|
|
1856
|
+
console.error(' Already indexed somewhere else? Point the viewer at it:');
|
|
1857
|
+
console.error('');
|
|
1858
|
+
console.error(` ${chalk.cyan('codegraph ui /path/to/indexed/project')}`);
|
|
1859
|
+
console.error('');
|
|
1860
|
+
}
|
|
1861
|
+
/**
|
|
1862
|
+
* codegraph ui [path] (alias: web)
|
|
1863
|
+
*
|
|
1864
|
+
* The browser reader: serves the built viewer (`dist/viewer/`) over loopback
|
|
1865
|
+
* and opens it. It opens the index for reading and never writes to it, never
|
|
1866
|
+
* indexes, and never changes a line of the project's code. The single thing it
|
|
1867
|
+
* writes is a trail the reader saved, as JSON under `.codegraph/ui/trails/`;
|
|
1868
|
+
* `--read-only` turns even that off.
|
|
1869
|
+
*
|
|
1870
|
+
* Deliberately absent from TELEMETRY_FLUSH_COMMANDS above: the command's own
|
|
1871
|
+
* banner tells the user nothing leaves their machine, so it must not be the
|
|
1872
|
+
* thing that triggers a telemetry send. The usage count still buffers locally
|
|
1873
|
+
* like every other quick command.
|
|
1874
|
+
*/
|
|
1875
|
+
program
|
|
1876
|
+
.command('ui [path]', { hidden: !(0, viewer_gate_1.viewerEnabled)() })
|
|
1877
|
+
.alias('web')
|
|
1878
|
+
.description('Open the CodeGraph viewer in your browser — read your indexed project as a graph')
|
|
1879
|
+
.option('--port <number>', `Port to listen on (default: ${constants_1.DEFAULT_UI_PORT}, or the next free one)`)
|
|
1880
|
+
.option('--no-open', 'Print the URL instead of opening a browser')
|
|
1881
|
+
.option('--read-only', 'Refuse every write — saved trails can be opened but not saved or deleted')
|
|
1882
|
+
.addHelpText('after', `
|
|
1883
|
+
Examples:
|
|
1884
|
+
$ codegraph ui Read the project you're standing in
|
|
1885
|
+
$ codegraph ui ~/code/my-app Read a specific indexed project
|
|
1886
|
+
$ codegraph ui --port 8080 Use one specific port (fails if it's taken)
|
|
1887
|
+
$ codegraph ui --no-open Just print the URL (headless boxes, SSH)
|
|
1888
|
+
$ codegraph web Same command under its alias
|
|
1889
|
+
|
|
1890
|
+
Pick a symbol and you see who calls it on the left, its source in the middle,
|
|
1891
|
+
and what it calls on the right at the height of the line that calls it. Search
|
|
1892
|
+
with / (or Cmd-K), click a file path for the file's outline and its imports.
|
|
1893
|
+
|
|
1894
|
+
Ask "how does execute reach getFile" (or "execute -> getFile") in the search
|
|
1895
|
+
box for the flow between two symbols: one card per hop, opened at the line that
|
|
1896
|
+
makes the next call, with dynamic-dispatch hops drawn dashed and named. The Map
|
|
1897
|
+
tab draws the whole project by module, with dependencies pointing down.
|
|
1898
|
+
|
|
1899
|
+
Never opened this codebase before? The Entry points tab lists the routes with
|
|
1900
|
+
the symbols that serve them, the files that run something when they load, the
|
|
1901
|
+
tests, and what the most code depends on — and starts a flow from any of them.
|
|
1902
|
+
|
|
1903
|
+
The page keeps up with the project while it is open: save a file and it says so
|
|
1904
|
+
within about a third of a second, and whatever is on screen re-reads the graph
|
|
1905
|
+
when something re-indexes it. It watches for that; it never polls.
|
|
1906
|
+
|
|
1907
|
+
Save a walk you want to keep: name the trail and it is written to
|
|
1908
|
+
.codegraph/ui/trails/ (already gitignored) as plain JSON, listed on the empty
|
|
1909
|
+
screen, and reopened at the symbol you left. Hops are remembered by name rather
|
|
1910
|
+
than by position, so a saved trail survives re-indexing and says which hop moved
|
|
1911
|
+
when one does. Pass --read-only to refuse every write.
|
|
1912
|
+
|
|
1913
|
+
The viewer listens on 127.0.0.1 only, so nothing on your network can reach it.
|
|
1914
|
+
It opens an index that already exists, never indexes, and never changes a line
|
|
1915
|
+
of your code — the one thing it writes is a trail you asked it to save.
|
|
1916
|
+
Requests from any other host are refused, and nothing is sent anywhere: no code,
|
|
1917
|
+
no paths, no analytics.
|
|
1918
|
+
|
|
1919
|
+
Without --port it takes ${constants_1.DEFAULT_UI_PORT}, or the next free port if that one is busy.
|
|
1920
|
+
|
|
1921
|
+
Set ${constants_1.BROWSER_ENV}=<command> to choose which browser opens, or
|
|
1922
|
+
${constants_1.BROWSER_ENV}=none to never open one.
|
|
1923
|
+
`)
|
|
1924
|
+
.action(async (pathArg, options) => {
|
|
1925
|
+
// An explicit --port stays explicit: a scripted `--port 8080` that quietly
|
|
1926
|
+
// lands on 8081 is worse than one that says the port is busy. The default
|
|
1927
|
+
// port is the only one we're free to walk away from.
|
|
1928
|
+
let requestedPort;
|
|
1929
|
+
if (options.port !== undefined) {
|
|
1930
|
+
requestedPort = Number(options.port);
|
|
1931
|
+
if (!Number.isInteger(requestedPort) || requestedPort < 0 || requestedPort > 65535) {
|
|
1932
|
+
error(`--port must be a whole number between 0 and 65535 (got "${options.port}").`);
|
|
1933
|
+
process.exit(1);
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
const projectPath = resolveProjectPath(pathArg);
|
|
1937
|
+
// Sensitive-directory refusal before anything opens: the same guard the MCP
|
|
1938
|
+
// entry points use, so `codegraph ui /etc` is turned away here rather than
|
|
1939
|
+
// becoming a browsable view of the system.
|
|
1940
|
+
const { validateProjectPath } = await Promise.resolve().then(() => __importStar(require('../utils')));
|
|
1941
|
+
const rootError = validateProjectPath(projectPath);
|
|
1942
|
+
if (rootError) {
|
|
1943
|
+
error(rootError);
|
|
1944
|
+
process.exit(1);
|
|
1945
|
+
}
|
|
1946
|
+
if (!(0, directory_1.isInitialized)(projectPath)) {
|
|
1947
|
+
printNoIndexGuidance(projectPath);
|
|
1948
|
+
process.exit(1);
|
|
1949
|
+
}
|
|
1950
|
+
const { startUiServer, openBrowser, createGraphApi, ViewerMissingError } = await Promise.resolve().then(() => __importStar(require('../ui-server')));
|
|
1951
|
+
// The JSON API the viewer reads its screens from. It opens the index lazily
|
|
1952
|
+
// on the first request, so a slow first paint is the only cost of mounting
|
|
1953
|
+
// it here rather than after the browser connects.
|
|
1954
|
+
const readOnly = options.readOnly === true;
|
|
1955
|
+
const api = createGraphApi({
|
|
1956
|
+
projectRoot: projectPath,
|
|
1957
|
+
readOnly,
|
|
1958
|
+
readOnlyReason: readOnly
|
|
1959
|
+
? 'This viewer was started with --read-only, so trails cannot be saved.'
|
|
1960
|
+
: undefined,
|
|
1961
|
+
});
|
|
1962
|
+
let handle;
|
|
1963
|
+
try {
|
|
1964
|
+
handle = await startUiServer({
|
|
1965
|
+
projectRoot: projectPath,
|
|
1966
|
+
port: requestedPort,
|
|
1967
|
+
portFallback: requestedPort === undefined,
|
|
1968
|
+
api: api.handler,
|
|
1969
|
+
});
|
|
1970
|
+
}
|
|
1971
|
+
catch (err) {
|
|
1972
|
+
api.close();
|
|
1973
|
+
// Both failure modes here (viewer assets missing, no port available) carry
|
|
1974
|
+
// their own remediation — print it plainly, never a stack trace.
|
|
1975
|
+
error(err instanceof ViewerMissingError || err instanceof Error ? err.message : String(err));
|
|
1976
|
+
process.exit(1);
|
|
1977
|
+
}
|
|
1978
|
+
console.log('');
|
|
1979
|
+
console.log(chalk.bold('CodeGraph viewer'));
|
|
1980
|
+
console.log('');
|
|
1981
|
+
console.log(` ${chalk.dim('Reading')} ${projectPath}`);
|
|
1982
|
+
console.log(` ${chalk.dim('URL')} ${chalk.cyan(handle.url)}`);
|
|
1983
|
+
console.log(` ${chalk.dim('Access')} this machine only ${(0, glyphs_1.getGlyphs)().dash} ` +
|
|
1984
|
+
(readOnly
|
|
1985
|
+
? 'read-only, nothing leaves your computer'
|
|
1986
|
+
: 'nothing leaves your computer; saved trails are the only thing written'));
|
|
1987
|
+
console.log('');
|
|
1988
|
+
const opened = options.open === false ? false : openBrowser(handle.url);
|
|
1989
|
+
console.log(opened
|
|
1990
|
+
? chalk.dim(' Opening your browser... press Ctrl+C to stop.')
|
|
1991
|
+
: chalk.dim(' Open that URL in a browser. Press Ctrl+C to stop.'));
|
|
1992
|
+
console.log('');
|
|
1993
|
+
// The http server keeps the event loop alive on its own; these just make
|
|
1994
|
+
// Ctrl-C hang up live sockets instead of waiting on browser keep-alives.
|
|
1995
|
+
const shutdown = () => {
|
|
1996
|
+
// Release the SQLite handle before the socket: the process should never
|
|
1997
|
+
// exit with a live connection to the user's index.
|
|
1998
|
+
api.close();
|
|
1999
|
+
void handle.close().then(() => process.exit(0));
|
|
2000
|
+
};
|
|
2001
|
+
process.once('SIGINT', shutdown);
|
|
2002
|
+
process.once('SIGTERM', shutdown);
|
|
2003
|
+
// Killing the command the user started (its pid, not Ctrl+C's process
|
|
2004
|
+
// group) leaves this re-exec'd server with no parent to forward the
|
|
2005
|
+
// signal: shut down the same way instead of serving the port forever.
|
|
2006
|
+
(0, command_supervision_1.watchParent)(shutdown);
|
|
2007
|
+
});
|
|
1704
2008
|
/**
|
|
1705
2009
|
* codegraph serve
|
|
1706
2010
|
*/
|
|
@@ -1810,157 +2114,147 @@ function main() {
|
|
|
1810
2114
|
}
|
|
1811
2115
|
});
|
|
1812
2116
|
/**
|
|
1813
|
-
*
|
|
1814
|
-
*
|
|
1815
|
-
*
|
|
1816
|
-
* traversal queries work in scripts, CI, and git hooks without a running MCP
|
|
1817
|
-
* server.
|
|
2117
|
+
* CLI parity with MCP callers/callees: resolve once, then collect and limit
|
|
2118
|
+
* within each definition. The legacy JSON list remains an explicitly labeled
|
|
2119
|
+
* union, with its original total/limit/truncated contract (#1674).
|
|
1818
2120
|
*/
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
if (matches.length === 0) {
|
|
1837
|
-
info(`Symbol "${symbol}" not found`);
|
|
1838
|
-
cg.destroy();
|
|
1839
|
-
return;
|
|
1840
|
-
}
|
|
1841
|
-
const seen = new Set();
|
|
1842
|
-
const allCallers = [];
|
|
1843
|
-
for (const match of matches) {
|
|
1844
|
-
const exactMatch = match.node.name === symbol || match.node.name.endsWith(`.${symbol}`) || match.node.name.endsWith(`::${symbol}`);
|
|
1845
|
-
if (!exactMatch && matches.length > 1)
|
|
1846
|
-
continue;
|
|
1847
|
-
for (const c of cg.getCallers(match.node.id)) {
|
|
1848
|
-
if (!seen.has(c.node.id)) {
|
|
1849
|
-
seen.add(c.node.id);
|
|
1850
|
-
allCallers.push({ name: c.node.name, kind: c.node.kind, filePath: c.node.filePath, startLine: c.node.startLine });
|
|
1851
|
-
}
|
|
2121
|
+
for (const direction of ['callers', 'callees']) {
|
|
2122
|
+
const title = direction === 'callers' ? 'Callers' : 'Callees';
|
|
2123
|
+
program
|
|
2124
|
+
.command(`${direction} <symbol>`)
|
|
2125
|
+
.description(direction === 'callers'
|
|
2126
|
+
? 'Find all functions/methods that call a specific symbol'
|
|
2127
|
+
: 'Find all functions/methods called by a specific symbol')
|
|
2128
|
+
.option('-p, --path <path>', 'Project path')
|
|
2129
|
+
.option('-f, --file <path>', 'Narrow definitions by file path or suffix (no match: show all with a note)')
|
|
2130
|
+
.option('-l, --limit <number>', 'Maximum results per definition (also caps the JSON union)', '20')
|
|
2131
|
+
.option('-j, --json', 'Output as JSON')
|
|
2132
|
+
.action(async (symbol, options) => {
|
|
2133
|
+
const projectPath = resolveProjectPath(options.path);
|
|
2134
|
+
try {
|
|
2135
|
+
if (!(0, directory_1.isInitialized)(projectPath)) {
|
|
2136
|
+
error(`CodeGraph not initialized in ${projectPath}`);
|
|
2137
|
+
process.exit(1);
|
|
1852
2138
|
}
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
2139
|
+
const { default: CodeGraph } = await loadCodeGraph();
|
|
2140
|
+
const cg = await CodeGraph.open(projectPath);
|
|
2141
|
+
try {
|
|
2142
|
+
const limit = parseInt(options.limit || '20', 10);
|
|
2143
|
+
const { nodes: targets } = (0, symbol_lookup_1.lookupSymbolNodes)(cg, symbol);
|
|
2144
|
+
if (targets.length === 0) {
|
|
2145
|
+
info(formatSymbolNotFound(symbol, cg.searchNodes(symbol, { limit: 5 }).map((m) => m.node.name)));
|
|
2146
|
+
return;
|
|
1860
2147
|
}
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
const exactMatch = match.node.name === symbol || match.node.name.endsWith(`.${symbol}`) || match.node.name.endsWith(`::${symbol}`);
|
|
1916
|
-
if (!exactMatch && matches.length > 1)
|
|
1917
|
-
continue;
|
|
1918
|
-
for (const c of cg.getCallees(match.node.id)) {
|
|
1919
|
-
if (!seen.has(c.node.id)) {
|
|
1920
|
-
seen.add(c.node.id);
|
|
1921
|
-
allCallees.push({ name: c.node.name, kind: c.node.kind, filePath: c.node.filePath, startLine: c.node.startLine });
|
|
2148
|
+
const { groups, filteredOut } = (0, symbol_lookup_1.groupDefinitions)(targets, options.file);
|
|
2149
|
+
const ambiguous = groups.length > 1;
|
|
2150
|
+
const note = filteredOut
|
|
2151
|
+
? `no definition of "${symbol}" matches file "${options.file}" — showing all definitions instead.`
|
|
2152
|
+
: undefined;
|
|
2153
|
+
const collected = groups.map((group) => {
|
|
2154
|
+
const nodes = new Map();
|
|
2155
|
+
const edges = new Map();
|
|
2156
|
+
for (const target of group) {
|
|
2157
|
+
const connections = direction === 'callers' ? cg.getCallers(target.id) : cg.getCallees(target.id);
|
|
2158
|
+
for (const { node, edge } of connections) {
|
|
2159
|
+
nodes.set(node.id, node);
|
|
2160
|
+
edges.set(`${edge.source}->${edge.target}:${edge.kind}`, edge);
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
return { group, nodes: [...nodes.values()], edges: [...edges.values()] };
|
|
2164
|
+
});
|
|
2165
|
+
const relationships = (node, edges) => [...new Set(edges
|
|
2166
|
+
.filter((edge) => (direction === 'callers' ? edge.source : edge.target) === node.id)
|
|
2167
|
+
.map((edge) => edge.kind))];
|
|
2168
|
+
if (options.json) {
|
|
2169
|
+
const definitions = collected.map(({ group, nodes, edges }) => {
|
|
2170
|
+
const limited = nodes.slice(0, limit);
|
|
2171
|
+
const shown = new Set(limited.map((node) => node.id));
|
|
2172
|
+
return {
|
|
2173
|
+
...cliDefinition(group),
|
|
2174
|
+
[direction]: limited.map((node) => ({ id: node.id, ...cliNode(node), relationships: relationships(node, edges) })),
|
|
2175
|
+
edges: edges.filter((edge) => shown.has(direction === 'callers' ? edge.source : edge.target)),
|
|
2176
|
+
total: nodes.length,
|
|
2177
|
+
limit,
|
|
2178
|
+
truncated: nodes.length > limit,
|
|
2179
|
+
};
|
|
2180
|
+
});
|
|
2181
|
+
const union = new Map();
|
|
2182
|
+
for (const { nodes } of collected) {
|
|
2183
|
+
for (const node of nodes)
|
|
2184
|
+
union.set(node.id, node);
|
|
2185
|
+
}
|
|
2186
|
+
const total = union.size;
|
|
2187
|
+
console.log(JSON.stringify({
|
|
2188
|
+
symbol,
|
|
2189
|
+
targets: groups.flat().map((node) => cliDefinition([node]).definition),
|
|
2190
|
+
ambiguous,
|
|
2191
|
+
aggregation: ambiguous ? 'union' : 'definition',
|
|
2192
|
+
file: options.file,
|
|
2193
|
+
filteredOut,
|
|
2194
|
+
note,
|
|
2195
|
+
definitions,
|
|
2196
|
+
[direction]: [...union.values()].slice(0, limit).map((node) => ({ ...cliNode(node),
|
|
2197
|
+
relationships: relationships(node, collected.flatMap((entry) => entry.edges)) })),
|
|
2198
|
+
total,
|
|
2199
|
+
limit,
|
|
2200
|
+
truncated: total > limit,
|
|
2201
|
+
}, null, 2));
|
|
1922
2202
|
}
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
2203
|
+
else {
|
|
2204
|
+
if (note)
|
|
2205
|
+
warn(note);
|
|
2206
|
+
if (ambiguous) {
|
|
2207
|
+
console.log(chalk.bold(`\n${title} of "${symbol}" — ${groups.length} distinct definitions (narrow with --file):`));
|
|
2208
|
+
}
|
|
2209
|
+
for (const { group, nodes, edges } of collected) {
|
|
2210
|
+
const limited = nodes.slice(0, limit);
|
|
2211
|
+
const total = nodes.length;
|
|
2212
|
+
const truncated = total > limit;
|
|
2213
|
+
const count = truncated ? `${limited.length} of ${total}` : String(total);
|
|
2214
|
+
if (ambiguous) {
|
|
2215
|
+
console.log(chalk.bold(`\n${(0, symbol_lookup_1.describeSymbolNode)(group[0])} (${count}):\n`));
|
|
2216
|
+
}
|
|
2217
|
+
else {
|
|
2218
|
+
console.log(chalk.bold(`\n${title} of "${symbol}" (${count}):\n`));
|
|
2219
|
+
console.log(chalk.dim((0, symbol_lookup_1.describeSymbolNode)(group[0])));
|
|
2220
|
+
}
|
|
2221
|
+
if (total === 0) {
|
|
2222
|
+
if (ambiguous)
|
|
2223
|
+
console.log(chalk.dim(` (no ${direction})`));
|
|
2224
|
+
else
|
|
2225
|
+
info(`No ${direction} found for "${symbol}"`);
|
|
2226
|
+
}
|
|
2227
|
+
for (const node of limited) {
|
|
2228
|
+
const loc = node.startLine ? `:${node.startLine}` : '';
|
|
2229
|
+
const kinds = relationships(node, edges).filter((kind) => kind !== 'calls');
|
|
2230
|
+
const relation = kinds.length ? ` [${kinds.join(', ')}]` : '';
|
|
2231
|
+
console.log(chalk.cyan(node.kind.padEnd(12)) + chalk.white(node.name) + chalk.dim(relation));
|
|
2232
|
+
console.log(chalk.dim(` ${node.filePath}${loc}`));
|
|
2233
|
+
console.log();
|
|
2234
|
+
}
|
|
2235
|
+
if (truncated)
|
|
2236
|
+
console.log(chalk.dim(`Showing ${limited.length} of ${total}; pass --limit to widen.`));
|
|
2237
|
+
}
|
|
1930
2238
|
}
|
|
1931
2239
|
}
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
if (options.json) {
|
|
1935
|
-
console.log(JSON.stringify({ symbol, callees: limited }, null, 2));
|
|
1936
|
-
}
|
|
1937
|
-
else if (limited.length === 0) {
|
|
1938
|
-
info(`No callees found for "${symbol}"`);
|
|
1939
|
-
}
|
|
1940
|
-
else {
|
|
1941
|
-
console.log(chalk.bold(`\nCallees of "${symbol}" (${limited.length}):\n`));
|
|
1942
|
-
for (const node of limited) {
|
|
1943
|
-
const loc = node.startLine ? `:${node.startLine}` : '';
|
|
1944
|
-
console.log(chalk.cyan(node.kind.padEnd(12)) +
|
|
1945
|
-
chalk.white(node.name));
|
|
1946
|
-
console.log(chalk.dim(` ${node.filePath}${loc}`));
|
|
1947
|
-
console.log();
|
|
2240
|
+
finally {
|
|
2241
|
+
cg.destroy();
|
|
1948
2242
|
}
|
|
1949
2243
|
}
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
});
|
|
2244
|
+
catch (err) {
|
|
2245
|
+
error(`${direction} failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
2246
|
+
process.exit(1);
|
|
2247
|
+
}
|
|
2248
|
+
});
|
|
2249
|
+
}
|
|
1957
2250
|
/**
|
|
1958
|
-
* codegraph impact <symbol>
|
|
2251
|
+
* codegraph impact <symbol> — one blast radius per distinct definition.
|
|
1959
2252
|
*/
|
|
1960
2253
|
program
|
|
1961
2254
|
.command('impact <symbol>')
|
|
1962
2255
|
.description('Analyze what code is affected by changing a symbol')
|
|
1963
2256
|
.option('-p, --path <path>', 'Project path')
|
|
2257
|
+
.option('-f, --file <path>', 'Narrow definitions by file path or suffix (no match: show all with a note)')
|
|
1964
2258
|
.option('-d, --depth <number>', 'Traversal depth', '2')
|
|
1965
2259
|
.option('-j, --json', 'Output as JSON')
|
|
1966
2260
|
.action(async (symbol, options) => {
|
|
@@ -1972,72 +2266,95 @@ function main() {
|
|
|
1972
2266
|
}
|
|
1973
2267
|
const { default: CodeGraph } = await loadCodeGraph();
|
|
1974
2268
|
const cg = await CodeGraph.open(projectPath);
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
}
|
|
1982
|
-
// Merge impact subgraphs across all exact-matching symbols
|
|
1983
|
-
const mergedNodes = new Map();
|
|
1984
|
-
const seenEdges = new Set();
|
|
1985
|
-
let edgeCount = 0;
|
|
1986
|
-
for (const match of matches) {
|
|
1987
|
-
const exactMatch = match.node.name === symbol || match.node.name.endsWith(`.${symbol}`) || match.node.name.endsWith(`::${symbol}`);
|
|
1988
|
-
if (!exactMatch && matches.length > 1)
|
|
1989
|
-
continue;
|
|
1990
|
-
const impact = cg.getImpactRadius(match.node.id, depth);
|
|
1991
|
-
for (const [id, n] of impact.nodes) {
|
|
1992
|
-
mergedNodes.set(id, { name: n.name, kind: n.kind, filePath: n.filePath, startLine: n.startLine });
|
|
2269
|
+
try {
|
|
2270
|
+
const depth = Math.min(Math.max(parseInt(options.depth || '2', 10), 1), 10);
|
|
2271
|
+
const { nodes: targets } = (0, symbol_lookup_1.lookupSymbolNodes)(cg, symbol);
|
|
2272
|
+
if (targets.length === 0) {
|
|
2273
|
+
info(formatSymbolNotFound(symbol, cg.searchNodes(symbol, { limit: 5 }).map((m) => m.node.name)));
|
|
2274
|
+
return;
|
|
1993
2275
|
}
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
2276
|
+
const { groups, filteredOut } = (0, symbol_lookup_1.groupDefinitions)(targets, options.file);
|
|
2277
|
+
const ambiguous = groups.length > 1;
|
|
2278
|
+
const note = filteredOut
|
|
2279
|
+
? `no definition of "${symbol}" matches file "${options.file}" — showing all definitions instead.`
|
|
2280
|
+
: undefined;
|
|
2281
|
+
const collected = groups.map((group) => {
|
|
2282
|
+
const nodes = new Map();
|
|
2283
|
+
const edges = new Map();
|
|
2284
|
+
for (const target of group) {
|
|
2285
|
+
const impact = cg.getImpactRadius(target.id, depth);
|
|
2286
|
+
for (const [id, node] of impact.nodes)
|
|
2287
|
+
nodes.set(id, node);
|
|
2288
|
+
for (const edge of impact.edges)
|
|
2289
|
+
edges.set(`${edge.source}->${edge.target}:${edge.kind}`, edge);
|
|
1999
2290
|
}
|
|
2291
|
+
return { group, nodes, edges };
|
|
2292
|
+
});
|
|
2293
|
+
if (options.json) {
|
|
2294
|
+
const unionNodes = new Map();
|
|
2295
|
+
const unionEdges = new Map();
|
|
2296
|
+
const definitions = collected.map(({ group, nodes, edges }) => {
|
|
2297
|
+
for (const [id, node] of nodes)
|
|
2298
|
+
unionNodes.set(id, node);
|
|
2299
|
+
for (const [key, edge] of edges)
|
|
2300
|
+
unionEdges.set(key, edge);
|
|
2301
|
+
return {
|
|
2302
|
+
...cliDefinition(group),
|
|
2303
|
+
nodeCount: nodes.size,
|
|
2304
|
+
edgeCount: edges.size,
|
|
2305
|
+
affected: [...nodes.values()].map((node) => ({ id: node.id, ...cliNode(node) })),
|
|
2306
|
+
edges: [...edges.values()],
|
|
2307
|
+
};
|
|
2308
|
+
});
|
|
2309
|
+
console.log(JSON.stringify({
|
|
2310
|
+
symbol,
|
|
2311
|
+
depth,
|
|
2312
|
+
targets: groups.flat().map((node) => cliDefinition([node]).definition),
|
|
2313
|
+
ambiguous,
|
|
2314
|
+
aggregation: ambiguous ? 'union' : 'definition',
|
|
2315
|
+
file: options.file,
|
|
2316
|
+
filteredOut,
|
|
2317
|
+
note,
|
|
2318
|
+
definitions,
|
|
2319
|
+
nodeCount: unionNodes.size,
|
|
2320
|
+
edgeCount: unionEdges.size,
|
|
2321
|
+
affected: [...unionNodes.values()].map(cliNode),
|
|
2322
|
+
}, null, 2));
|
|
2000
2323
|
}
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
byFile.set(node.filePath, list);
|
|
2030
|
-
}
|
|
2031
|
-
for (const [file, nodes] of byFile) {
|
|
2032
|
-
console.log(chalk.cyan(file));
|
|
2033
|
-
for (const node of nodes) {
|
|
2034
|
-
const loc = node.startLine ? `:${node.startLine}` : '';
|
|
2035
|
-
console.log(` ${chalk.dim(node.kind.padEnd(12))}${node.name}${chalk.dim(loc)}`);
|
|
2324
|
+
else {
|
|
2325
|
+
if (note)
|
|
2326
|
+
warn(note);
|
|
2327
|
+
if (ambiguous) {
|
|
2328
|
+
console.log(chalk.bold(`\nImpact of changing "${symbol}" — ${groups.length} distinct definitions (each with its own blast radius; narrow with --file):`));
|
|
2329
|
+
}
|
|
2330
|
+
for (const { group, nodes } of collected) {
|
|
2331
|
+
if (ambiguous) {
|
|
2332
|
+
console.log(chalk.bold(`\n${(0, symbol_lookup_1.describeSymbolNode)(group[0])} — ${nodes.size} affected symbols:\n`));
|
|
2333
|
+
}
|
|
2334
|
+
else {
|
|
2335
|
+
console.log(chalk.bold(`\nImpact of changing "${symbol}" — ${nodes.size} affected symbols:\n`));
|
|
2336
|
+
console.log(chalk.dim((0, symbol_lookup_1.describeSymbolNode)(group[0])));
|
|
2337
|
+
}
|
|
2338
|
+
const byFile = new Map();
|
|
2339
|
+
for (const node of nodes.values()) {
|
|
2340
|
+
const list = byFile.get(node.filePath) || [];
|
|
2341
|
+
list.push(node);
|
|
2342
|
+
byFile.set(node.filePath, list);
|
|
2343
|
+
}
|
|
2344
|
+
for (const [file, affected] of byFile) {
|
|
2345
|
+
console.log(chalk.cyan(file));
|
|
2346
|
+
for (const node of affected) {
|
|
2347
|
+
const loc = node.startLine ? `:${node.startLine}` : '';
|
|
2348
|
+
console.log(` ${chalk.dim(node.kind.padEnd(12))}${node.name}${chalk.dim(loc)}`);
|
|
2349
|
+
}
|
|
2350
|
+
console.log();
|
|
2351
|
+
}
|
|
2036
2352
|
}
|
|
2037
|
-
console.log();
|
|
2038
2353
|
}
|
|
2039
2354
|
}
|
|
2040
|
-
|
|
2355
|
+
finally {
|
|
2356
|
+
cg.destroy();
|
|
2357
|
+
}
|
|
2041
2358
|
}
|
|
2042
2359
|
catch (err) {
|
|
2043
2360
|
error(`impact failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -2092,15 +2409,6 @@ function main() {
|
|
|
2092
2409
|
const { default: CodeGraph } = await loadCodeGraph();
|
|
2093
2410
|
const cg = await CodeGraph.open(projectPath);
|
|
2094
2411
|
const maxDepth = parseInt(options.depth || '5', 10);
|
|
2095
|
-
// Common test file patterns
|
|
2096
|
-
const defaultTestPatterns = [
|
|
2097
|
-
/\.spec\./,
|
|
2098
|
-
/\.test\./,
|
|
2099
|
-
/\/__tests__\//,
|
|
2100
|
-
/\/tests?\//,
|
|
2101
|
-
/\/e2e\//,
|
|
2102
|
-
/\/spec\//,
|
|
2103
|
-
];
|
|
2104
2412
|
// Custom filter pattern
|
|
2105
2413
|
let customFilter = null;
|
|
2106
2414
|
if (options.filter) {
|
|
@@ -2112,10 +2420,15 @@ function main() {
|
|
|
2112
2420
|
.replace(/\*/g, '[^/]*');
|
|
2113
2421
|
customFilter = new RegExp(regex);
|
|
2114
2422
|
}
|
|
2423
|
+
// One notion of "a test" for the whole tool (#1507): the CLI used to keep
|
|
2424
|
+
// its own six regexes here, which knew `.test.` and `/tests/` but not Go's
|
|
2425
|
+
// `_test.go`, Python's `test_x.py` or the JVM's `FooTest.kt` — so
|
|
2426
|
+
// `affected` reported "no tests" for whole ecosystems while `search` and
|
|
2427
|
+
// the MCP tools counted those very files as tests.
|
|
2115
2428
|
function isTestFile(filePath) {
|
|
2116
2429
|
if (customFilter)
|
|
2117
2430
|
return customFilter.test(filePath);
|
|
2118
|
-
return
|
|
2431
|
+
return (0, query_utils_1.isTestPath)(filePath);
|
|
2119
2432
|
}
|
|
2120
2433
|
// BFS to find all transitive dependents of changed files, filtered to test files
|
|
2121
2434
|
const affectedTests = new Set();
|
|
@@ -2379,6 +2692,7 @@ function main() {
|
|
|
2379
2692
|
run: up.defaultRun,
|
|
2380
2693
|
capture: up.defaultCapture,
|
|
2381
2694
|
hasCommand: up.hasCommand,
|
|
2695
|
+
wirePromptHook: up.defaultWirePromptHook,
|
|
2382
2696
|
log: (m) => console.log(m),
|
|
2383
2697
|
warn: (m) => warn(m),
|
|
2384
2698
|
error: (m) => error(m),
|