@colbymchenry/codegraph-win32-arm64 1.5.0 → 1.6.1
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 +744 -320
- package/lib/dist/bin/codegraph.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/formatter.d.ts +7 -1
- package/lib/dist/context/formatter.d.ts.map +1 -1
- package/lib/dist/context/formatter.js +12 -6
- package/lib/dist/context/formatter.js.map +1 -1
- package/lib/dist/context/index.d.ts +12 -0
- package/lib/dist/context/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +103 -16
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/db/index.d.ts +58 -2
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +187 -32
- 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 +64 -1
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/queries.d.ts +583 -6
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +1417 -57
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/schema.sql +27 -4
- 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 +130 -2
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +306 -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/cfml-extractor.d.ts +1 -0
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +15 -3
- package/lib/dist/extraction/cfml-extractor.js.map +1 -1
- 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 +41 -14
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/generated-detection.d.ts +48 -12
- package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
- package/lib/dist/extraction/generated-detection.js +176 -11
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +38 -0
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +115 -3
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +218 -14
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +874 -176
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.d.ts +58 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +310 -19
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +8 -3
- package/lib/dist/extraction/languages/dart.js.map +1 -1
- package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
- package/lib/dist/extraction/languages/erlang.js +58 -22
- package/lib/dist/extraction/languages/erlang.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.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +169 -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/objc.d.ts.map +1 -1
- package/lib/dist/extraction/languages/objc.js +4 -0
- package/lib/dist/extraction/languages/objc.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 +20 -0
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
- package/lib/dist/extraction/languages/rust.js +50 -20
- 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/typescript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/typescript.js +9 -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-pool.d.ts +7 -0
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +20 -1
- package/lib/dist/extraction/parse-pool.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 +381 -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 +31 -3
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +101 -18
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +926 -132
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- 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 +248 -0
- package/lib/dist/graph/branch-guards.d.ts.map +1 -0
- package/lib/dist/graph/branch-guards.js +2231 -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 +552 -0
- package/lib/dist/graph/named-symbol-flow.js.map +1 -0
- package/lib/dist/graph/queries.d.ts.map +1 -1
- package/lib/dist/graph/queries.js +2 -0
- package/lib/dist/graph/queries.js.map +1 -1
- 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 +62 -36
- 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 +273 -11
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +511 -34
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/index.d.ts +4 -3
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +11 -8
- 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 +72 -12
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/codex.d.ts +23 -8
- package/lib/dist/installer/targets/codex.d.ts.map +1 -1
- package/lib/dist/installer/targets/codex.js +74 -47
- package/lib/dist/installer/targets/codex.js.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.d.ts +32 -0
- package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-cli.js +215 -0
- package/lib/dist/installer/targets/copilot-cli.js.map +1 -0
- package/lib/dist/installer/targets/copilot-jetbrains.d.ts +42 -0
- package/lib/dist/installer/targets/copilot-jetbrains.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-jetbrains.js +238 -0
- package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -0
- package/lib/dist/installer/targets/copilot-vscode.d.ts +47 -0
- package/lib/dist/installer/targets/copilot-vscode.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-vscode.js +219 -0
- package/lib/dist/installer/targets/copilot-vscode.js.map +1 -0
- 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/registry.d.ts.map +1 -1
- package/lib/dist/installer/targets/registry.js +6 -0
- package/lib/dist/installer/targets/registry.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/toml.d.ts +6 -5
- package/lib/dist/installer/targets/toml.d.ts.map +1 -1
- package/lib/dist/installer/targets/toml.js +99 -20
- package/lib/dist/installer/targets/toml.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +12 -5
- 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 +1 -1
- package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +17 -1
- package/lib/dist/mcp/daemon-manager.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts +8 -0
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +65 -2
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +17 -4
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +133 -23
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +26 -13
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +126 -32
- 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 +31 -9
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +190 -64
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-dedup.d.ts +140 -0
- package/lib/dist/mcp/explore-dedup.d.ts.map +1 -0
- package/lib/dist/mcp/explore-dedup.js +239 -0
- package/lib/dist/mcp/explore-dedup.js.map +1 -0
- package/lib/dist/mcp/explore-diagnostics.d.ts +289 -0
- package/lib/dist/mcp/explore-diagnostics.d.ts.map +1 -0
- package/lib/dist/mcp/explore-diagnostics.js +558 -0
- package/lib/dist/mcp/explore-diagnostics.js.map +1 -0
- package/lib/dist/mcp/explore-session-state.d.ts +217 -0
- package/lib/dist/mcp/explore-session-state.d.ts.map +1 -0
- package/lib/dist/mcp/explore-session-state.js +322 -0
- package/lib/dist/mcp/explore-session-state.js.map +1 -0
- 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 +30 -0
- package/lib/dist/mcp/index-freshness-worker.js.map +1 -0
- package/lib/dist/mcp/index-freshness.d.ts +7 -0
- package/lib/dist/mcp/index-freshness.d.ts.map +1 -0
- package/lib/dist/mcp/index-freshness.js +94 -0
- package/lib/dist/mcp/index-freshness.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +27 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +159 -14
- 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 +14 -3
- 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 +181 -0
- package/lib/dist/mcp/project-lifecycle.js.map +1 -0
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +15 -1
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +2 -2
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +9 -7
- 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 +2 -2
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +13 -5
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +16 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +36 -13
- package/lib/dist/mcp/session.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 +544 -38
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +4246 -770
- 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/project-config.d.ts +23 -0
- package/lib/dist/project-config.d.ts.map +1 -1
- package/lib/dist/project-config.js +39 -2
- package/lib/dist/project-config.js.map +1 -1
- 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 +127 -0
- package/lib/dist/resolution/alias-binding.js.map +1 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.js +21 -19
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
- 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 +330 -154
- 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 +342 -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/csharp.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.js +96 -2
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.d.ts +189 -0
- package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/expo-router.js +785 -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 +251 -16
- package/lib/dist/resolution/frameworks/express.js.map +1 -1
- package/lib/dist/resolution/frameworks/index.d.ts +5 -0
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +29 -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 +79 -47
- package/lib/dist/resolution/frameworks/java.js.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.js +6 -14
- 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 +328 -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/python.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/python.js +166 -0
- 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 +46 -0
- package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/react-router.js +187 -0
- package/lib/dist/resolution/frameworks/react-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/react.d.ts +2 -1
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react.js +188 -139
- package/lib/dist/resolution/frameworks/react.js.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.js +6 -1
- 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 +11 -1
- 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 +82 -0
- package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/vue-router.js +377 -0
- package/lib/dist/resolution/frameworks/vue-router.js.map +1 -0
- package/lib/dist/resolution/import-resolver.d.ts +38 -0
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +394 -28
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +89 -25
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +567 -149
- 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 +46 -0
- package/lib/dist/resolution/js-builtins.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +99 -22
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +2192 -87
- 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/path-aliases.d.ts +6 -4
- package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
- package/lib/dist/resolution/path-aliases.js +125 -17
- package/lib/dist/resolution/path-aliases.js.map +1 -1
- package/lib/dist/resolution/react-router-synthesizer.d.ts +33 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/react-router-synthesizer.js +126 -0
- package/lib/dist/resolution/react-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/resolver-pool.d.ts +2 -0
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-pool.js +4 -0
- package/lib/dist/resolution/resolver-pool.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/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 +49 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.js +931 -0
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -0
- package/lib/dist/resolution/types.d.ts +78 -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/identifier-segments.d.ts +10 -0
- package/lib/dist/search/identifier-segments.d.ts.map +1 -1
- package/lib/dist/search/identifier-segments.js +29 -0
- package/lib/dist/search/identifier-segments.js.map +1 -1
- package/lib/dist/search/query-paths.d.ts +106 -0
- package/lib/dist/search/query-paths.d.ts.map +1 -0
- package/lib/dist/search/query-paths.js +513 -0
- package/lib/dist/search/query-paths.js.map +1 -0
- package/lib/dist/search/query-utils.d.ts +16 -1
- package/lib/dist/search/query-utils.d.ts.map +1 -1
- package/lib/dist/search/query-utils.js +48 -10
- 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 +74 -35
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +281 -99
- package/lib/dist/sync/watcher.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 +92 -41
- package/lib/dist/telemetry/index.js.map +1 -1
- package/lib/dist/types.d.ts +21 -2
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +2 -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 +87 -0
- package/lib/dist/ui-server/api/effects.d.ts.map +1 -0
- package/lib/dist/ui-server/api/effects.js +499 -0
- package/lib/dist/ui-server/api/effects.js.map +1 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts +86 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -0
- package/lib/dist/ui-server/api/entrypoints.js +279 -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 +238 -0
- package/lib/dist/ui-server/api/map.d.ts.map +1 -0
- package/lib/dist/ui-server/api/map.js +681 -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 +388 -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 +39 -0
- package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -0
- package/lib/dist/ui-server/api/route-roots.js +96 -0
- package/lib/dist/ui-server/api/route-roots.js.map +1 -0
- package/lib/dist/ui-server/api/routes.d.ts +59 -0
- package/lib/dist/ui-server/api/routes.d.ts.map +1 -0
- package/lib/dist/ui-server/api/routes.js +108 -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 +611 -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 +1446 -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 +369 -0
- package/lib/dist/ui-server/api/trails.js.map +1 -0
- package/lib/dist/ui-server/api/when.d.ts +125 -0
- package/lib/dist/ui-server/api/when.d.ts.map +1 -0
- package/lib/dist/ui-server/api/when.js +251 -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/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 +307 -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/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/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-CF9yvio6.css +1 -0
- package/lib/dist/viewer/assets/index-D4S7YUPf.js +97 -0
- package/lib/dist/viewer/index.html +16 -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
package/lib/dist/directory.d.ts
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Manages the .codegraph/ directory structure for CodeGraph data.
|
|
5
5
|
*/
|
|
6
|
+
/** The default per-project data directory name. */
|
|
7
|
+
export declare const DEFAULT_CODEGRAPH_DIR = ".codegraph";
|
|
8
|
+
/**
|
|
9
|
+
* The data directory name WSL gives a fresh project on a Windows drive, so it
|
|
10
|
+
* never shares one index with CodeGraph on Windows (issue #995). Indexing and
|
|
11
|
+
* watching skip every `.codegraph-*` sibling on both sides (#636).
|
|
12
|
+
*/
|
|
13
|
+
export declare const WSL_CODEGRAPH_DIR = ".codegraph-wsl";
|
|
6
14
|
/**
|
|
7
15
|
* Resolve the per-project data directory name, honoring the `CODEGRAPH_DIR`
|
|
8
16
|
* environment override (default `.codegraph`). The override is a single path
|
|
@@ -39,15 +47,59 @@ export declare const CODEGRAPH_DIR: string;
|
|
|
39
47
|
* neither indexes or watches the other's index directory.
|
|
40
48
|
*/
|
|
41
49
|
export declare function isCodeGraphDataDir(name: string): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The data directory name for one project: {@link codeGraphDirName}, except
|
|
52
|
+
* for a project on a Windows drive under WSL (`/mnt/c/...`) with no
|
|
53
|
+
* `CODEGRAPH_DIR` set. Windows-native CodeGraph opens `.codegraph` in that
|
|
54
|
+
* same tree, and SQLite's locking doesn't hold across the 9p/DrvFs bridge, so
|
|
55
|
+
* the two sharing one index fails with "disk I/O error" (issue #995). There:
|
|
56
|
+
*
|
|
57
|
+
* 1. `.codegraph-wsl/` exists → it. Once WSL has its own index it keeps it,
|
|
58
|
+
* even after Windows builds a `.codegraph` beside it.
|
|
59
|
+
* 2. `.codegraph/codegraph.db` exists → `.codegraph`. An index built before
|
|
60
|
+
* this default is kept rather than silently rebuilt somewhere else.
|
|
61
|
+
* 3. neither → `.codegraph-wsl`, so a fresh WSL index never shares.
|
|
62
|
+
*
|
|
63
|
+
* Every other host keeps the plain name without a stat: the WSL check is
|
|
64
|
+
* cached per process.
|
|
65
|
+
*/
|
|
66
|
+
export declare function codeGraphDirNameFor(projectRoot: string): string;
|
|
42
67
|
/**
|
|
43
68
|
* Get the .codegraph directory path for a project
|
|
44
69
|
*/
|
|
45
70
|
export declare function getCodeGraphDir(projectRoot: string): string;
|
|
46
71
|
/**
|
|
47
|
-
* Check if a project has been initialized with CodeGraph
|
|
48
|
-
*
|
|
72
|
+
* Check if a project has been initialized with CodeGraph.
|
|
73
|
+
*
|
|
74
|
+
* Requires `.codegraph/codegraph.db` to exist AND to carry the codegraph
|
|
75
|
+
* schema. A file that merely exists — empty, or a SQLite database with no
|
|
76
|
+
* tables, as an interrupted `init` or a stray `touch` leaves behind — used to
|
|
77
|
+
* count as initialized, so one such file in an ANCESTOR directory (worst
|
|
78
|
+
* case: `$HOME`) captured the upward resolution of every project beneath it
|
|
79
|
+
* and made their real indexes unreachable (#1895).
|
|
80
|
+
*
|
|
81
|
+
* The probe is cheap and gated so hot callers (the prompt hook, MCP root
|
|
82
|
+
* resolution on every call) pay one `stat`: file size, then a read-only
|
|
83
|
+
* SQLite open with a single `sqlite_master` lookup — memoized per path +
|
|
84
|
+
* mtime + size so an unchanged db is never reopened. A database that cannot
|
|
85
|
+
* be inspected counts as initialized (see probeSchema) — only a proven-absent
|
|
86
|
+
* schema, or a file SQLite refuses as not a database, says no.
|
|
49
87
|
*/
|
|
50
88
|
export declare function isInitialized(projectRoot: string): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* `codegraph.db` exists at `projectRoot` but does not carry the schema, and
|
|
91
|
+
* `init` can add it in place: an empty file, or a SQLite database without the
|
|
92
|
+
* codegraph tables (#1895). A file that is not SQLite at all is NOT this case —
|
|
93
|
+
* see {@link hasForeignDbFile}.
|
|
94
|
+
*/
|
|
95
|
+
export declare function hasSchemalessDb(projectRoot: string): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* `codegraph.db` exists at `projectRoot` and is not a SQLite database (no
|
|
98
|
+
* header magic): SQLite refuses to open it, so `init` cannot rebuild it in
|
|
99
|
+
* place. The caller must say so rather than promise a repair; nothing here
|
|
100
|
+
* deletes the file.
|
|
101
|
+
*/
|
|
102
|
+
export declare function hasForeignDbFile(projectRoot: string): boolean;
|
|
51
103
|
/**
|
|
52
104
|
* Find the nearest parent directory containing .codegraph/
|
|
53
105
|
*
|
|
@@ -72,6 +124,25 @@ export declare function isInitialized(projectRoot: string): boolean;
|
|
|
72
124
|
* The returned string is a human phrase that slots into "… looks like {reason}".
|
|
73
125
|
*/
|
|
74
126
|
export declare function unsafeIndexRootReason(projectRoot: string): string | null;
|
|
127
|
+
/**
|
|
128
|
+
* `dev:ino` for a path, or null if it can't be stat'd or the platform doesn't
|
|
129
|
+
* report a usable inode. Read as bigints: WSL DrvFs (`/mnt/c`) reports inodes
|
|
130
|
+
* above 2^53, where a plain number rounds nearby inodes onto one value. Windows
|
|
131
|
+
* st_ino is unreliable across handle reopens, so we deliberately return null
|
|
132
|
+
* there — the deleted-but-open-inode hazard this guards (#925) is a POSIX
|
|
133
|
+
* file-semantics issue that doesn't arise on Windows (an open file can't be
|
|
134
|
+
* unlinked).
|
|
135
|
+
*/
|
|
136
|
+
export declare function statInode(p: string): string | null;
|
|
137
|
+
/**
|
|
138
|
+
* Whether two resolved index roots are one index spelled two ways — a symlinked
|
|
139
|
+
* checkout, or a case-variant on a case-insensitive mount (macOS, NTFS, WSL
|
|
140
|
+
* DrvFs `/mnt/c`), where `realpathSync` keeps the caller's casing (#1057).
|
|
141
|
+
* Compares the identity of both data directories as they are NOW, so an inode
|
|
142
|
+
* reused after a delete can't match: the deleted root no longer stats. Windows
|
|
143
|
+
* has no usable inode, so it compares the on-disk-cased native realpaths.
|
|
144
|
+
*/
|
|
145
|
+
export declare function isSameIndexRoot(a: string, b: string): boolean;
|
|
75
146
|
export declare function findNearestCodeGraphRoot(startPath: string): string | null;
|
|
76
147
|
/**
|
|
77
148
|
* Indexed sub-project roots beneath `root` (bounded breadth-first scan). For
|
|
@@ -85,6 +156,35 @@ export declare function findIndexedSubprojectRoots(root: string, opts?: {
|
|
|
85
156
|
maxDepth?: number;
|
|
86
157
|
max?: number;
|
|
87
158
|
}): string[];
|
|
159
|
+
/** Result of {@link resolveServerRoot}. */
|
|
160
|
+
export interface ServerRootResolution {
|
|
161
|
+
/** The project root to serve as the default, or null when none resolved. */
|
|
162
|
+
root: string | null;
|
|
163
|
+
/** True when `root` was adopted from the down-scan rather than the up-walk. */
|
|
164
|
+
viaSubScan: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* Indexed sub-projects the down-scan saw when it ran but could NOT adopt
|
|
167
|
+
* (zero or several candidates). Empty when the up-walk resolved or the scan
|
|
168
|
+
* was skipped. Callers surface these so "no default project" errors can say
|
|
169
|
+
* what IS reachable (#1607).
|
|
170
|
+
*/
|
|
171
|
+
candidates: string[];
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Resolve the project root an MCP server should serve as its DEFAULT project
|
|
175
|
+
* (#1606). Up-walk first (`findNearestCodeGraphRoot` — the common case, and
|
|
176
|
+
* cheap). When nothing is indexed at or above `searchFrom`, run the bounded
|
|
177
|
+
* sub-project down-scan `planFrontload` already uses, behind the workspace
|
|
178
|
+
* gate above: EXACTLY ONE indexed sub-project is unambiguous and is adopted
|
|
179
|
+
* as the root; zero or several yield no root, with the candidates carried so
|
|
180
|
+
* the caller can name them instead of failing silently (#1607).
|
|
181
|
+
*
|
|
182
|
+
* `opts.subprojectScan: false` skips the down-scan entirely (the per-tool-call
|
|
183
|
+
* retry path throttles it; the up-walk always runs).
|
|
184
|
+
*/
|
|
185
|
+
export declare function resolveServerRoot(searchFrom: string, opts?: {
|
|
186
|
+
subprojectScan?: boolean;
|
|
187
|
+
}): ServerRootResolution;
|
|
88
188
|
/**
|
|
89
189
|
* Does `prompt` contain an explicit structural keyword? A keyword is a strong,
|
|
90
190
|
* self-contained signal, so the front-load hook fires on it directly — no graph
|
|
@@ -121,6 +221,26 @@ export declare function extractCodeTokens(prompt: string): string[];
|
|
|
121
221
|
* non-candidate prompt ("fix this typo", in any language) stays a zero-cost no-op.
|
|
122
222
|
*/
|
|
123
223
|
export declare function isStructuralPrompt(prompt: string): boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Claude Code persists `UserPromptSubmit` hook stdout above this many
|
|
226
|
+
* characters to a file and shows the model a ~2 KB preview instead (#1694).
|
|
227
|
+
* Measured on Claude Code 2.1.261; documented in the hooks reference as a
|
|
228
|
+
* 10,000-character cap on hook output strings.
|
|
229
|
+
*/
|
|
230
|
+
export declare const CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT = 10000;
|
|
231
|
+
/**
|
|
232
|
+
* Max characters of explore text injected by `codegraph prompt-hook` before
|
|
233
|
+
* truncation. Must stay under {@link CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT} so
|
|
234
|
+
* the host delivers the payload inline. 9,000 leaves ~1k for the
|
|
235
|
+
* `<codegraph_context>` wrapper and the `projectPath` nudge lines appended
|
|
236
|
+
* after the cap is applied.
|
|
237
|
+
*/
|
|
238
|
+
export declare const PROMPT_HOOK_INJECTION_MAX = 9000;
|
|
239
|
+
/**
|
|
240
|
+
* Cap explore text for the prompt-hook injection, preserving the existing
|
|
241
|
+
* "call codegraph_explore for the rest" notice when truncated.
|
|
242
|
+
*/
|
|
243
|
+
export declare function capPromptHookInjection(text: string, max?: number): string;
|
|
124
244
|
/**
|
|
125
245
|
* What the front-load hook should do for a prompt issued from a directory.
|
|
126
246
|
*/
|
|
@@ -180,4 +300,12 @@ export declare function validateDirectory(projectRoot: string): {
|
|
|
180
300
|
valid: boolean;
|
|
181
301
|
errors: string[];
|
|
182
302
|
};
|
|
303
|
+
/**
|
|
304
|
+
* Claude Code injects `<task-notification>…</task-notification>` blocks as
|
|
305
|
+
* `user` messages when a background agent finishes, and UserPromptSubmit
|
|
306
|
+
* hooks receive them exactly like typed prompts (#1832). The whole prompt
|
|
307
|
+
* must be that single envelope; a user question that merely mentions the
|
|
308
|
+
* marker is still a prompt.
|
|
309
|
+
*/
|
|
310
|
+
export declare function isTaskNotification(prompt: string): boolean;
|
|
183
311
|
//# sourceMappingURL=directory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directory.d.ts","sourceRoot":"","sources":["../src/directory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"directory.d.ts","sourceRoot":"","sources":["../src/directory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,mDAAmD;AACnD,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAIlD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAqBzC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,QAAqB,CAAC;AAEhD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMxD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAS/D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAc1D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAM5D;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAK7D;AAkDD;;;;;;;;GAQG;AACH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA8BxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQlD;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAW7D;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAmBzE;AA2BD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAC7C,MAAM,EAAE,CAqBV;AAED,2CAA2C;AAC3C,MAAM,WAAW,oBAAoB;IACnC,4EAA4E;IAC5E,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,+EAA+E;IAC/E,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAoBD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAO,GACtC,oBAAoB,CAStB;AAsND;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAK5D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAkB1D;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;;;;GAKG;AACH,eAAO,MAAM,oCAAoC,QAAS,CAAC;AAE3D;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,OAAQ,CAAC;AAE/C;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAA4B,GAAG,MAAM,CAI5F;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;yEAEqE;IACrE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;6EAEyE;IACzE,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB;;+DAE2D;IAC3D,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CAwCxE;AAyDD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAgBzD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAuBzD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CA8BnE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CA+B5D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAYlF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG;IACtD,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CA6BA;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D"}
|
package/lib/dist/directory.js
CHANGED
|
@@ -38,17 +38,24 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
38
38
|
};
|
|
39
39
|
})();
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.CODEGRAPH_DIR = void 0;
|
|
41
|
+
exports.PROMPT_HOOK_INJECTION_MAX = exports.CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT = exports.CODEGRAPH_DIR = exports.WSL_CODEGRAPH_DIR = exports.DEFAULT_CODEGRAPH_DIR = void 0;
|
|
42
42
|
exports.codeGraphDirName = codeGraphDirName;
|
|
43
43
|
exports.isCodeGraphDataDir = isCodeGraphDataDir;
|
|
44
|
+
exports.codeGraphDirNameFor = codeGraphDirNameFor;
|
|
44
45
|
exports.getCodeGraphDir = getCodeGraphDir;
|
|
45
46
|
exports.isInitialized = isInitialized;
|
|
47
|
+
exports.hasSchemalessDb = hasSchemalessDb;
|
|
48
|
+
exports.hasForeignDbFile = hasForeignDbFile;
|
|
46
49
|
exports.unsafeIndexRootReason = unsafeIndexRootReason;
|
|
50
|
+
exports.statInode = statInode;
|
|
51
|
+
exports.isSameIndexRoot = isSameIndexRoot;
|
|
47
52
|
exports.findNearestCodeGraphRoot = findNearestCodeGraphRoot;
|
|
48
53
|
exports.findIndexedSubprojectRoots = findIndexedSubprojectRoots;
|
|
54
|
+
exports.resolveServerRoot = resolveServerRoot;
|
|
49
55
|
exports.hasStructuralKeyword = hasStructuralKeyword;
|
|
50
56
|
exports.extractCodeTokens = extractCodeTokens;
|
|
51
57
|
exports.isStructuralPrompt = isStructuralPrompt;
|
|
58
|
+
exports.capPromptHookInjection = capPromptHookInjection;
|
|
52
59
|
exports.planFrontload = planFrontload;
|
|
53
60
|
exports.createDirectory = createDirectory;
|
|
54
61
|
exports.removeDirectory = removeDirectory;
|
|
@@ -56,11 +63,19 @@ exports.listDirectoryContents = listDirectoryContents;
|
|
|
56
63
|
exports.getDirectorySize = getDirectorySize;
|
|
57
64
|
exports.ensureSubdirectory = ensureSubdirectory;
|
|
58
65
|
exports.validateDirectory = validateDirectory;
|
|
66
|
+
exports.isTaskNotification = isTaskNotification;
|
|
59
67
|
const fs = __importStar(require("fs"));
|
|
60
68
|
const os = __importStar(require("os"));
|
|
61
69
|
const path = __importStar(require("path"));
|
|
70
|
+
const watch_policy_1 = require("./sync/watch-policy");
|
|
62
71
|
/** The default per-project data directory name. */
|
|
63
|
-
|
|
72
|
+
exports.DEFAULT_CODEGRAPH_DIR = '.codegraph';
|
|
73
|
+
/**
|
|
74
|
+
* The data directory name WSL gives a fresh project on a Windows drive, so it
|
|
75
|
+
* never shares one index with CodeGraph on Windows (issue #995). Indexing and
|
|
76
|
+
* watching skip every `.codegraph-*` sibling on both sides (#636).
|
|
77
|
+
*/
|
|
78
|
+
exports.WSL_CODEGRAPH_DIR = '.codegraph-wsl';
|
|
64
79
|
let warnedBadDirName = false;
|
|
65
80
|
/**
|
|
66
81
|
* Resolve the per-project data directory name, honoring the `CODEGRAPH_DIR`
|
|
@@ -84,7 +99,7 @@ let warnedBadDirName = false;
|
|
|
84
99
|
function codeGraphDirName() {
|
|
85
100
|
const raw = process.env.CODEGRAPH_DIR?.trim();
|
|
86
101
|
if (!raw)
|
|
87
|
-
return DEFAULT_CODEGRAPH_DIR;
|
|
102
|
+
return exports.DEFAULT_CODEGRAPH_DIR;
|
|
88
103
|
const invalid = raw === '.' ||
|
|
89
104
|
raw.includes('..') ||
|
|
90
105
|
raw.includes('/') ||
|
|
@@ -95,9 +110,9 @@ function codeGraphDirName() {
|
|
|
95
110
|
warnedBadDirName = true;
|
|
96
111
|
// stderr only — stdout is the MCP protocol channel.
|
|
97
112
|
console.warn(`[codegraph] Ignoring invalid CODEGRAPH_DIR="${raw}" — it must be a plain ` +
|
|
98
|
-
`directory name (no path separators, no "..", not absolute). Using "${DEFAULT_CODEGRAPH_DIR}".`);
|
|
113
|
+
`directory name (no path separators, no "..", not absolute). Using "${exports.DEFAULT_CODEGRAPH_DIR}".`);
|
|
99
114
|
}
|
|
100
|
-
return DEFAULT_CODEGRAPH_DIR;
|
|
115
|
+
return exports.DEFAULT_CODEGRAPH_DIR;
|
|
101
116
|
}
|
|
102
117
|
return raw;
|
|
103
118
|
}
|
|
@@ -117,19 +132,62 @@ exports.CODEGRAPH_DIR = codeGraphDirName();
|
|
|
117
132
|
* neither indexes or watches the other's index directory.
|
|
118
133
|
*/
|
|
119
134
|
function isCodeGraphDataDir(name) {
|
|
120
|
-
return (name === DEFAULT_CODEGRAPH_DIR ||
|
|
135
|
+
return (name === exports.DEFAULT_CODEGRAPH_DIR ||
|
|
121
136
|
name === codeGraphDirName() ||
|
|
122
|
-
name.startsWith(DEFAULT_CODEGRAPH_DIR + '-'));
|
|
137
|
+
name.startsWith(exports.DEFAULT_CODEGRAPH_DIR + '-'));
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* The data directory name for one project: {@link codeGraphDirName}, except
|
|
141
|
+
* for a project on a Windows drive under WSL (`/mnt/c/...`) with no
|
|
142
|
+
* `CODEGRAPH_DIR` set. Windows-native CodeGraph opens `.codegraph` in that
|
|
143
|
+
* same tree, and SQLite's locking doesn't hold across the 9p/DrvFs bridge, so
|
|
144
|
+
* the two sharing one index fails with "disk I/O error" (issue #995). There:
|
|
145
|
+
*
|
|
146
|
+
* 1. `.codegraph-wsl/` exists → it. Once WSL has its own index it keeps it,
|
|
147
|
+
* even after Windows builds a `.codegraph` beside it.
|
|
148
|
+
* 2. `.codegraph/codegraph.db` exists → `.codegraph`. An index built before
|
|
149
|
+
* this default is kept rather than silently rebuilt somewhere else.
|
|
150
|
+
* 3. neither → `.codegraph-wsl`, so a fresh WSL index never shares.
|
|
151
|
+
*
|
|
152
|
+
* Every other host keeps the plain name without a stat: the WSL check is
|
|
153
|
+
* cached per process.
|
|
154
|
+
*/
|
|
155
|
+
function codeGraphDirNameFor(projectRoot) {
|
|
156
|
+
if (process.env.CODEGRAPH_DIR?.trim() || !(0, watch_policy_1.isWslWindowsDrive)(projectRoot))
|
|
157
|
+
return codeGraphDirName();
|
|
158
|
+
try {
|
|
159
|
+
if (fs.statSync(path.join(projectRoot, exports.WSL_CODEGRAPH_DIR)).isDirectory())
|
|
160
|
+
return exports.WSL_CODEGRAPH_DIR;
|
|
161
|
+
}
|
|
162
|
+
catch {
|
|
163
|
+
// absent — fall through
|
|
164
|
+
}
|
|
165
|
+
if (fs.existsSync(path.join(projectRoot, exports.DEFAULT_CODEGRAPH_DIR, 'codegraph.db')))
|
|
166
|
+
return exports.DEFAULT_CODEGRAPH_DIR;
|
|
167
|
+
return exports.WSL_CODEGRAPH_DIR;
|
|
123
168
|
}
|
|
124
169
|
/**
|
|
125
170
|
* Get the .codegraph directory path for a project
|
|
126
171
|
*/
|
|
127
172
|
function getCodeGraphDir(projectRoot) {
|
|
128
|
-
return path.join(projectRoot,
|
|
173
|
+
return path.join(projectRoot, codeGraphDirNameFor(projectRoot));
|
|
129
174
|
}
|
|
130
175
|
/**
|
|
131
|
-
* Check if a project has been initialized with CodeGraph
|
|
132
|
-
*
|
|
176
|
+
* Check if a project has been initialized with CodeGraph.
|
|
177
|
+
*
|
|
178
|
+
* Requires `.codegraph/codegraph.db` to exist AND to carry the codegraph
|
|
179
|
+
* schema. A file that merely exists — empty, or a SQLite database with no
|
|
180
|
+
* tables, as an interrupted `init` or a stray `touch` leaves behind — used to
|
|
181
|
+
* count as initialized, so one such file in an ANCESTOR directory (worst
|
|
182
|
+
* case: `$HOME`) captured the upward resolution of every project beneath it
|
|
183
|
+
* and made their real indexes unreachable (#1895).
|
|
184
|
+
*
|
|
185
|
+
* The probe is cheap and gated so hot callers (the prompt hook, MCP root
|
|
186
|
+
* resolution on every call) pay one `stat`: file size, then a read-only
|
|
187
|
+
* SQLite open with a single `sqlite_master` lookup — memoized per path +
|
|
188
|
+
* mtime + size so an unchanged db is never reopened. A database that cannot
|
|
189
|
+
* be inspected counts as initialized (see probeSchema) — only a proven-absent
|
|
190
|
+
* schema, or a file SQLite refuses as not a database, says no.
|
|
133
191
|
*/
|
|
134
192
|
function isInitialized(projectRoot) {
|
|
135
193
|
const codegraphDir = getCodeGraphDir(projectRoot);
|
|
@@ -138,7 +196,102 @@ function isInitialized(projectRoot) {
|
|
|
138
196
|
}
|
|
139
197
|
// Must have codegraph.db, not just .codegraph folder
|
|
140
198
|
const dbPath = path.join(codegraphDir, 'codegraph.db');
|
|
141
|
-
|
|
199
|
+
let st;
|
|
200
|
+
try {
|
|
201
|
+
st = fs.statSync(dbPath);
|
|
202
|
+
}
|
|
203
|
+
catch {
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
return hasCodeGraphSchema(dbPath, st);
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* `codegraph.db` exists at `projectRoot` but does not carry the schema, and
|
|
210
|
+
* `init` can add it in place: an empty file, or a SQLite database without the
|
|
211
|
+
* codegraph tables (#1895). A file that is not SQLite at all is NOT this case —
|
|
212
|
+
* see {@link hasForeignDbFile}.
|
|
213
|
+
*/
|
|
214
|
+
function hasSchemalessDb(projectRoot) {
|
|
215
|
+
const dbPath = path.join(getCodeGraphDir(projectRoot), 'codegraph.db');
|
|
216
|
+
let st;
|
|
217
|
+
try {
|
|
218
|
+
st = fs.statSync(dbPath);
|
|
219
|
+
}
|
|
220
|
+
catch {
|
|
221
|
+
return false;
|
|
222
|
+
}
|
|
223
|
+
if (!st.isFile() || isInitialized(projectRoot))
|
|
224
|
+
return false;
|
|
225
|
+
return st.size === 0 || probeSchema(dbPath) === 'no-schema';
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* `codegraph.db` exists at `projectRoot` and is not a SQLite database (no
|
|
229
|
+
* header magic): SQLite refuses to open it, so `init` cannot rebuild it in
|
|
230
|
+
* place. The caller must say so rather than promise a repair; nothing here
|
|
231
|
+
* deletes the file.
|
|
232
|
+
*/
|
|
233
|
+
function hasForeignDbFile(projectRoot) {
|
|
234
|
+
const dbPath = path.join(getCodeGraphDir(projectRoot), 'codegraph.db');
|
|
235
|
+
let st;
|
|
236
|
+
try {
|
|
237
|
+
st = fs.statSync(dbPath);
|
|
238
|
+
}
|
|
239
|
+
catch {
|
|
240
|
+
return false;
|
|
241
|
+
}
|
|
242
|
+
return st.isFile() && st.size > 0 && probeSchema(dbPath) === 'not-sqlite';
|
|
243
|
+
}
|
|
244
|
+
/** A SQLite file header is 100 bytes; anything shorter cannot hold a schema. */
|
|
245
|
+
const SQLITE_HEADER_SIZE = 100;
|
|
246
|
+
/** SQLITE_NOTADB: SQLite read the file and it is not a database. */
|
|
247
|
+
const SQLITE_NOTADB = 26;
|
|
248
|
+
const schemaProbeCache = new Map();
|
|
249
|
+
function hasCodeGraphSchema(dbPath, st) {
|
|
250
|
+
if (!st.isFile() || st.size < SQLITE_HEADER_SIZE)
|
|
251
|
+
return false;
|
|
252
|
+
const cached = schemaProbeCache.get(dbPath);
|
|
253
|
+
if (cached && cached.mtimeMs === st.mtimeMs && cached.size === st.size)
|
|
254
|
+
return cached.ok;
|
|
255
|
+
const probe = probeSchema(dbPath);
|
|
256
|
+
const ok = probe === 'schema' || probe === 'unknown';
|
|
257
|
+
schemaProbeCache.set(dbPath, { mtimeMs: st.mtimeMs, size: st.size, ok });
|
|
258
|
+
return ok;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* What `codegraph.db` holds, asked of SQLite itself through a read-only
|
|
262
|
+
* connection: the codegraph schema, a database without it, not a database at
|
|
263
|
+
* all (SQLITE_NOTADB), or `unknown` — locked, busy, a WAL db in a directory we
|
|
264
|
+
* cannot create `-shm` in (read-only checkout, mount, another user's tree),
|
|
265
|
+
* disk I/O. Callers treat `unknown` as initialized: the pre-existing behaviour
|
|
266
|
+
* for a database we cannot inspect.
|
|
267
|
+
*
|
|
268
|
+
* The file is never read through a descriptor of our own, not even for its
|
|
269
|
+
* 16-byte header. Closing ANY descriptor on a database file drops every POSIX
|
|
270
|
+
* lock this process holds on it, including those of a connection it already
|
|
271
|
+
* has open (sqlite.org/howtocorrupt.html §2.2.1) — and the MCP server resolves
|
|
272
|
+
* projects through isInitialized on every call while it holds the index as
|
|
273
|
+
* its writer. SQLite's own connections share one lock table per file, so a
|
|
274
|
+
* second connection opened and closed here leaves the first one's locks alone.
|
|
275
|
+
*/
|
|
276
|
+
function probeSchema(dbPath) {
|
|
277
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
278
|
+
const { DatabaseSync } = require('node:sqlite');
|
|
279
|
+
let db = null;
|
|
280
|
+
try {
|
|
281
|
+
db = new DatabaseSync(dbPath, { readOnly: true });
|
|
282
|
+
const row = db.prepare("SELECT 1 AS ok FROM sqlite_master WHERE type = 'table' AND name = 'nodes'").get();
|
|
283
|
+
return row !== undefined ? 'schema' : 'no-schema';
|
|
284
|
+
}
|
|
285
|
+
catch (error) {
|
|
286
|
+
return error?.errcode === SQLITE_NOTADB ? 'not-sqlite' : 'unknown';
|
|
287
|
+
}
|
|
288
|
+
finally {
|
|
289
|
+
// Never hold the handle: Windows file locking would block the owner.
|
|
290
|
+
try {
|
|
291
|
+
db?.close();
|
|
292
|
+
}
|
|
293
|
+
catch { /* already closed */ }
|
|
294
|
+
}
|
|
142
295
|
}
|
|
143
296
|
/**
|
|
144
297
|
* Find the nearest parent directory containing .codegraph/
|
|
@@ -191,6 +344,48 @@ function unsafeIndexRootReason(projectRoot) {
|
|
|
191
344
|
}
|
|
192
345
|
return null;
|
|
193
346
|
}
|
|
347
|
+
/**
|
|
348
|
+
* `dev:ino` for a path, or null if it can't be stat'd or the platform doesn't
|
|
349
|
+
* report a usable inode. Read as bigints: WSL DrvFs (`/mnt/c`) reports inodes
|
|
350
|
+
* above 2^53, where a plain number rounds nearby inodes onto one value. Windows
|
|
351
|
+
* st_ino is unreliable across handle reopens, so we deliberately return null
|
|
352
|
+
* there — the deleted-but-open-inode hazard this guards (#925) is a POSIX
|
|
353
|
+
* file-semantics issue that doesn't arise on Windows (an open file can't be
|
|
354
|
+
* unlinked).
|
|
355
|
+
*/
|
|
356
|
+
function statInode(p) {
|
|
357
|
+
if (process.platform === 'win32')
|
|
358
|
+
return null;
|
|
359
|
+
try {
|
|
360
|
+
const s = fs.statSync(p, { bigint: true });
|
|
361
|
+
return `${s.dev}:${s.ino}`;
|
|
362
|
+
}
|
|
363
|
+
catch {
|
|
364
|
+
return null;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Whether two resolved index roots are one index spelled two ways — a symlinked
|
|
369
|
+
* checkout, or a case-variant on a case-insensitive mount (macOS, NTFS, WSL
|
|
370
|
+
* DrvFs `/mnt/c`), where `realpathSync` keeps the caller's casing (#1057).
|
|
371
|
+
* Compares the identity of both data directories as they are NOW, so an inode
|
|
372
|
+
* reused after a delete can't match: the deleted root no longer stats. Windows
|
|
373
|
+
* has no usable inode, so it compares the on-disk-cased native realpaths.
|
|
374
|
+
*/
|
|
375
|
+
function isSameIndexRoot(a, b) {
|
|
376
|
+
if (a === b)
|
|
377
|
+
return true;
|
|
378
|
+
if (process.platform === 'win32') {
|
|
379
|
+
try {
|
|
380
|
+
return fs.realpathSync.native(getCodeGraphDir(a)) === fs.realpathSync.native(getCodeGraphDir(b));
|
|
381
|
+
}
|
|
382
|
+
catch {
|
|
383
|
+
return false;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
const id = statInode(getCodeGraphDir(a));
|
|
387
|
+
return id !== null && id === statInode(getCodeGraphDir(b));
|
|
388
|
+
}
|
|
194
389
|
function findNearestCodeGraphRoot(startPath) {
|
|
195
390
|
let current = path.resolve(startPath);
|
|
196
391
|
const root = path.parse(current).root;
|
|
@@ -239,6 +434,9 @@ function escapeRegExp(s) {
|
|
|
239
434
|
* never turns into a full-tree crawl on a large repo.
|
|
240
435
|
*/
|
|
241
436
|
function findIndexedSubprojectRoots(root, opts = {}) {
|
|
437
|
+
// A stray workspace manifest must not enable scanning home or broader roots (#1454).
|
|
438
|
+
if (unsafeIndexRootReason(root) !== null)
|
|
439
|
+
return [];
|
|
242
440
|
const maxDepth = opts.maxDepth ?? 4;
|
|
243
441
|
const max = opts.max ?? 64;
|
|
244
442
|
const out = [];
|
|
@@ -270,6 +468,57 @@ function findIndexedSubprojectRoots(root, opts = {}) {
|
|
|
270
468
|
walk(root, 1);
|
|
271
469
|
return out;
|
|
272
470
|
}
|
|
471
|
+
/**
|
|
472
|
+
* Whether `base` is a plausible workspace root for the sub-project down-scan.
|
|
473
|
+
* Mirrors `planFrontload`'s manifest gate, widened to accept a bare `.git`
|
|
474
|
+
* entry — the #1606 shape is a workspace container holding only agent config
|
|
475
|
+
* and a `.git`, with every build manifest living in the indexed children. The
|
|
476
|
+
* user's home directory and the filesystem root are never eligible: a stray
|
|
477
|
+
* manifest there must not turn server startup into a scan that could adopt an
|
|
478
|
+
* unrelated project (#1454 documents that failure mode for the prompt-hook).
|
|
479
|
+
*/
|
|
480
|
+
function eligibleForSubprojectScan(base) {
|
|
481
|
+
if (base === path.parse(base).root)
|
|
482
|
+
return false;
|
|
483
|
+
let home = null;
|
|
484
|
+
try {
|
|
485
|
+
home = os.homedir();
|
|
486
|
+
}
|
|
487
|
+
catch {
|
|
488
|
+
home = null;
|
|
489
|
+
}
|
|
490
|
+
if (home && (base === home || base === path.resolve(home)))
|
|
491
|
+
return false;
|
|
492
|
+
if (looksLikeProjectRoot(base))
|
|
493
|
+
return true;
|
|
494
|
+
return fs.existsSync(path.join(base, '.git'));
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Resolve the project root an MCP server should serve as its DEFAULT project
|
|
498
|
+
* (#1606). Up-walk first (`findNearestCodeGraphRoot` — the common case, and
|
|
499
|
+
* cheap). When nothing is indexed at or above `searchFrom`, run the bounded
|
|
500
|
+
* sub-project down-scan `planFrontload` already uses, behind the workspace
|
|
501
|
+
* gate above: EXACTLY ONE indexed sub-project is unambiguous and is adopted
|
|
502
|
+
* as the root; zero or several yield no root, with the candidates carried so
|
|
503
|
+
* the caller can name them instead of failing silently (#1607).
|
|
504
|
+
*
|
|
505
|
+
* `opts.subprojectScan: false` skips the down-scan entirely (the per-tool-call
|
|
506
|
+
* retry path throttles it; the up-walk always runs).
|
|
507
|
+
*/
|
|
508
|
+
function resolveServerRoot(searchFrom, opts = {}) {
|
|
509
|
+
const up = findNearestCodeGraphRoot(searchFrom);
|
|
510
|
+
if (up)
|
|
511
|
+
return { root: up, viaSubScan: false, candidates: [] };
|
|
512
|
+
if (opts.subprojectScan === false)
|
|
513
|
+
return { root: null, viaSubScan: false, candidates: [] };
|
|
514
|
+
const base = path.resolve(searchFrom);
|
|
515
|
+
if (!eligibleForSubprojectScan(base))
|
|
516
|
+
return { root: null, viaSubScan: false, candidates: [] };
|
|
517
|
+
const subs = findIndexedSubprojectRoots(base);
|
|
518
|
+
if (subs.length === 1)
|
|
519
|
+
return { root: subs[0], viaSubScan: true, candidates: subs };
|
|
520
|
+
return { root: null, viaSubScan: false, candidates: subs };
|
|
521
|
+
}
|
|
273
522
|
/**
|
|
274
523
|
* Unicode-aware word-boundary emulation for the keyword lists below. JS's `\b`
|
|
275
524
|
* is ASCII-only — it fires only at `[A-Za-z0-9_]` edges — so it can never bound
|
|
@@ -285,8 +534,9 @@ const NOT_WORD_AFTER = /(?![\p{L}\p{N}_])/u.source;
|
|
|
285
534
|
* Structural keywords matched as EXACT words (boundary on both sides): short
|
|
286
535
|
* or ambiguous tokens where prefix matching would false-positive ("flow" in
|
|
287
536
|
* "flower", "path" in "pathological"). Grouped by language; a term appears once
|
|
288
|
-
* even when several languages share it
|
|
289
|
-
*
|
|
537
|
+
* even when several languages share it. Ambiguous everyday words like PT/ES
|
|
538
|
+
* "como" and DE "wie" are excluded: the hook instead requires another strong
|
|
539
|
+
* keyword, a verified code token, or indexed prose segments (#1654).
|
|
290
540
|
*/
|
|
291
541
|
const STRUCTURAL_WORDS = [
|
|
292
542
|
// English — the pre-#1126 list minus what moved to STRUCTURAL_STEMS: the
|
|
@@ -295,17 +545,16 @@ const STRUCTURAL_WORDS = [
|
|
|
295
545
|
'how', 'where', 'tracing', 'flows?', 'paths?', 'reach(?:es|ed)?', 'wired?', 'breaks?', 'why does',
|
|
296
546
|
// French (où=where, flux=flow, chemin=path, casse=breaks)
|
|
297
547
|
'comment', 'où', 'flux', 'chemins?', 'casse',
|
|
298
|
-
// Spanish (cómo
|
|
548
|
+
// Spanish (cómo=how, dónde/donde=where, flujo=flow, ruta/camino=path,
|
|
299
549
|
// rompe=breaks, llaman / quién llama = call(s) — bare "llama" is excluded:
|
|
300
550
|
// it's also the animal/model name in English prompts)
|
|
301
551
|
'cómo', 'dónde', 'donde', 'flujos?', 'rutas?', 'caminos?', 'rompe', 'llaman', 'quién llama', 'quien llama',
|
|
302
|
-
// Portuguese (
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
// German (wie=how, wo/woher/wohin=where, Pfad=path, Fluss/Ablauf=flow,
|
|
552
|
+
// Portuguese (onde=where, fluxo=flow, caminho=path)
|
|
553
|
+
'onde', 'fluxos?', 'caminhos?',
|
|
554
|
+
// German (wo/woher/wohin=where, Pfad=path, Fluss/Ablauf=flow,
|
|
306
555
|
// bricht/kaputt=breaks, ruft=calls, hängt=depends — "hängt … von X ab"
|
|
307
556
|
// splits the separable verb "abhängen", so the "abhäng" stem can't catch it)
|
|
308
|
-
'
|
|
557
|
+
'wo', 'woher', 'wohin', 'pfade?', 'fluss', 'ablauf', 'bricht', 'kaputt', 'ruft', 'hängt',
|
|
309
558
|
// Italian (dove=where, flusso=flow, percorso/i=path)
|
|
310
559
|
'dove', 'flusso', 'percors[oi]',
|
|
311
560
|
// Russian (как=how, где=where, путь/пути=path, работает=works)
|
|
@@ -541,6 +790,30 @@ function extractCodeTokens(prompt) {
|
|
|
541
790
|
function isStructuralPrompt(prompt) {
|
|
542
791
|
return hasStructuralKeyword(prompt) || extractCodeTokens(prompt).length > 0;
|
|
543
792
|
}
|
|
793
|
+
/**
|
|
794
|
+
* Claude Code persists `UserPromptSubmit` hook stdout above this many
|
|
795
|
+
* characters to a file and shows the model a ~2 KB preview instead (#1694).
|
|
796
|
+
* Measured on Claude Code 2.1.261; documented in the hooks reference as a
|
|
797
|
+
* 10,000-character cap on hook output strings.
|
|
798
|
+
*/
|
|
799
|
+
exports.CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT = 10_000;
|
|
800
|
+
/**
|
|
801
|
+
* Max characters of explore text injected by `codegraph prompt-hook` before
|
|
802
|
+
* truncation. Must stay under {@link CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT} so
|
|
803
|
+
* the host delivers the payload inline. 9,000 leaves ~1k for the
|
|
804
|
+
* `<codegraph_context>` wrapper and the `projectPath` nudge lines appended
|
|
805
|
+
* after the cap is applied.
|
|
806
|
+
*/
|
|
807
|
+
exports.PROMPT_HOOK_INJECTION_MAX = 9_000;
|
|
808
|
+
/**
|
|
809
|
+
* Cap explore text for the prompt-hook injection, preserving the existing
|
|
810
|
+
* "call codegraph_explore for the rest" notice when truncated.
|
|
811
|
+
*/
|
|
812
|
+
function capPromptHookInjection(text, max = exports.PROMPT_HOOK_INJECTION_MAX) {
|
|
813
|
+
return text.length > max
|
|
814
|
+
? `${text.slice(0, max)}\n…(truncated; call codegraph_explore for the rest)`
|
|
815
|
+
: text;
|
|
816
|
+
}
|
|
544
817
|
/**
|
|
545
818
|
* Decide what the front-load hook injects for a `prompt` issued from `cwd`,
|
|
546
819
|
* shaped by where the `.codegraph/` index(es) actually are:
|
|
@@ -660,10 +933,10 @@ function ensureGitignore(gitignorePath) {
|
|
|
660
933
|
*/
|
|
661
934
|
function createDirectory(projectRoot) {
|
|
662
935
|
const codegraphDir = getCodeGraphDir(projectRoot);
|
|
663
|
-
|
|
664
|
-
//
|
|
665
|
-
//
|
|
666
|
-
if (
|
|
936
|
+
// Only throw if CodeGraph is actually initialized (db with a schema).
|
|
937
|
+
// .codegraph/ folder alone — or a schema-less codegraph.db left by an
|
|
938
|
+
// interrupted init (#1895) — is fine: initialize() adds the schema to it.
|
|
939
|
+
if (isInitialized(projectRoot)) {
|
|
667
940
|
throw new Error(`CodeGraph already initialized in ${projectRoot}`);
|
|
668
941
|
}
|
|
669
942
|
// Create main directory (if it doesn't exist)
|
|
@@ -794,4 +1067,14 @@ function validateDirectory(projectRoot) {
|
|
|
794
1067
|
errors,
|
|
795
1068
|
};
|
|
796
1069
|
}
|
|
1070
|
+
/**
|
|
1071
|
+
* Claude Code injects `<task-notification>…</task-notification>` blocks as
|
|
1072
|
+
* `user` messages when a background agent finishes, and UserPromptSubmit
|
|
1073
|
+
* hooks receive them exactly like typed prompts (#1832). The whole prompt
|
|
1074
|
+
* must be that single envelope; a user question that merely mentions the
|
|
1075
|
+
* marker is still a prompt.
|
|
1076
|
+
*/
|
|
1077
|
+
function isTaskNotification(prompt) {
|
|
1078
|
+
return /^\s*<task-notification>[\s\S]*<\/task-notification>\s*$/.test(prompt);
|
|
1079
|
+
}
|
|
797
1080
|
//# sourceMappingURL=directory.js.map
|