@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
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,48 @@ 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
|
+
* Canonicalize a project root for IDENTITY: hashing it into a rendezvous key
|
|
139
|
+
* (the daemon's named pipe / tmpdir socket, a registry record). Not for display
|
|
140
|
+
* — the caller-visible root keeps its own spelling.
|
|
141
|
+
*
|
|
142
|
+
* The contract is that two spellings of ONE directory yield ONE string, because
|
|
143
|
+
* a client that derives a different key silently fails to meet the daemon that
|
|
144
|
+
* is already running: it probes a socket nobody bound, spawns a redundant
|
|
145
|
+
* daemon, and that daemon dies on the lock the first one holds, so the session
|
|
146
|
+
* degrades to a single-process engine. `path.resolve` alone does NOT satisfy
|
|
147
|
+
* that contract — NTFS is case-insensitive, so `d:\work\codegraph` and
|
|
148
|
+
* `D:\work\codegraph` name one directory but two strings, and non-native
|
|
149
|
+
* `fs.realpathSync` keeps whichever casing the caller passed (only `.native`
|
|
150
|
+
* asks the filesystem for the on-disk name — the same reason
|
|
151
|
+
* {@link isSameIndexRoot} uses it). Both spellings really do occur: a
|
|
152
|
+
* cwd-derived root is the on-disk case, while a client-supplied
|
|
153
|
+
* `rootUri`/`workspaceFolders` path arrives as `file:///d%3A/…`.
|
|
154
|
+
*
|
|
155
|
+
* The Windows lowercase is belt-and-braces on top of the native realpath — NTFS
|
|
156
|
+
* can't hold two directories differing only by case, and it also absorbs a
|
|
157
|
+
* `\\?\`-prefixed native result diverging from a plain one.
|
|
158
|
+
*/
|
|
159
|
+
export declare function canonicalProjectRoot(projectRoot: string): string;
|
|
160
|
+
/**
|
|
161
|
+
* Whether two resolved index roots are one index spelled two ways — a symlinked
|
|
162
|
+
* checkout, or a case-variant on a case-insensitive mount (macOS, NTFS, WSL
|
|
163
|
+
* DrvFs `/mnt/c`), where `realpathSync` keeps the caller's casing (#1057).
|
|
164
|
+
* Compares the identity of both data directories as they are NOW, so an inode
|
|
165
|
+
* reused after a delete can't match: the deleted root no longer stats. Windows
|
|
166
|
+
* has no usable inode, so it compares the on-disk-cased native realpaths.
|
|
167
|
+
*/
|
|
168
|
+
export declare function isSameIndexRoot(a: string, b: string): boolean;
|
|
75
169
|
export declare function findNearestCodeGraphRoot(startPath: string): string | null;
|
|
76
170
|
/**
|
|
77
171
|
* Indexed sub-project roots beneath `root` (bounded breadth-first scan). For
|
|
@@ -150,6 +244,26 @@ export declare function extractCodeTokens(prompt: string): string[];
|
|
|
150
244
|
* non-candidate prompt ("fix this typo", in any language) stays a zero-cost no-op.
|
|
151
245
|
*/
|
|
152
246
|
export declare function isStructuralPrompt(prompt: string): boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Claude Code persists `UserPromptSubmit` hook stdout above this many
|
|
249
|
+
* characters to a file and shows the model a ~2 KB preview instead (#1694).
|
|
250
|
+
* Measured on Claude Code 2.1.261; documented in the hooks reference as a
|
|
251
|
+
* 10,000-character cap on hook output strings.
|
|
252
|
+
*/
|
|
253
|
+
export declare const CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT = 10000;
|
|
254
|
+
/**
|
|
255
|
+
* Max characters of explore text injected by `codegraph prompt-hook` before
|
|
256
|
+
* truncation. Must stay under {@link CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT} so
|
|
257
|
+
* the host delivers the payload inline. 9,000 leaves ~1k for the
|
|
258
|
+
* `<codegraph_context>` wrapper and the `projectPath` nudge lines appended
|
|
259
|
+
* after the cap is applied.
|
|
260
|
+
*/
|
|
261
|
+
export declare const PROMPT_HOOK_INJECTION_MAX = 9000;
|
|
262
|
+
/**
|
|
263
|
+
* Cap explore text for the prompt-hook injection, preserving the existing
|
|
264
|
+
* "call codegraph_explore for the rest" notice when truncated.
|
|
265
|
+
*/
|
|
266
|
+
export declare function capPromptHookInjection(text: string, max?: number): string;
|
|
153
267
|
/**
|
|
154
268
|
* What the front-load hook should do for a prompt issued from a directory.
|
|
155
269
|
*/
|
|
@@ -209,4 +323,19 @@ export declare function validateDirectory(projectRoot: string): {
|
|
|
209
323
|
valid: boolean;
|
|
210
324
|
errors: string[];
|
|
211
325
|
};
|
|
326
|
+
/**
|
|
327
|
+
* Claude Code injects `<task-notification>…</task-notification>` blocks as
|
|
328
|
+
* `user` messages when a background agent finishes, and UserPromptSubmit
|
|
329
|
+
* hooks receive them exactly like typed prompts (#1832). The whole prompt
|
|
330
|
+
* must be that single envelope; a user question that merely mentions the
|
|
331
|
+
* marker is still a prompt.
|
|
332
|
+
*/
|
|
333
|
+
export declare function isTaskNotification(prompt: string): boolean;
|
|
334
|
+
/**
|
|
335
|
+
* Claude Code hands a subagent's report back to the parent session as a
|
|
336
|
+
* `<agent-message from="…">…</agent-message>` prompt, which UserPromptSubmit
|
|
337
|
+
* hooks also receive (#2184). Same rule as {@link isTaskNotification}: only a
|
|
338
|
+
* prompt that is entirely that envelope is skipped.
|
|
339
|
+
*/
|
|
340
|
+
export declare function isAgentMessage(prompt: string): boolean;
|
|
212
341
|
//# 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;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAUhE;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;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEtD"}
|
package/lib/dist/directory.js
CHANGED
|
@@ -38,18 +38,25 @@ 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.canonicalProjectRoot = canonicalProjectRoot;
|
|
52
|
+
exports.isSameIndexRoot = isSameIndexRoot;
|
|
47
53
|
exports.findNearestCodeGraphRoot = findNearestCodeGraphRoot;
|
|
48
54
|
exports.findIndexedSubprojectRoots = findIndexedSubprojectRoots;
|
|
49
55
|
exports.resolveServerRoot = resolveServerRoot;
|
|
50
56
|
exports.hasStructuralKeyword = hasStructuralKeyword;
|
|
51
57
|
exports.extractCodeTokens = extractCodeTokens;
|
|
52
58
|
exports.isStructuralPrompt = isStructuralPrompt;
|
|
59
|
+
exports.capPromptHookInjection = capPromptHookInjection;
|
|
53
60
|
exports.planFrontload = planFrontload;
|
|
54
61
|
exports.createDirectory = createDirectory;
|
|
55
62
|
exports.removeDirectory = removeDirectory;
|
|
@@ -57,11 +64,20 @@ exports.listDirectoryContents = listDirectoryContents;
|
|
|
57
64
|
exports.getDirectorySize = getDirectorySize;
|
|
58
65
|
exports.ensureSubdirectory = ensureSubdirectory;
|
|
59
66
|
exports.validateDirectory = validateDirectory;
|
|
67
|
+
exports.isTaskNotification = isTaskNotification;
|
|
68
|
+
exports.isAgentMessage = isAgentMessage;
|
|
60
69
|
const fs = __importStar(require("fs"));
|
|
61
70
|
const os = __importStar(require("os"));
|
|
62
71
|
const path = __importStar(require("path"));
|
|
72
|
+
const watch_policy_1 = require("./sync/watch-policy");
|
|
63
73
|
/** The default per-project data directory name. */
|
|
64
|
-
|
|
74
|
+
exports.DEFAULT_CODEGRAPH_DIR = '.codegraph';
|
|
75
|
+
/**
|
|
76
|
+
* The data directory name WSL gives a fresh project on a Windows drive, so it
|
|
77
|
+
* never shares one index with CodeGraph on Windows (issue #995). Indexing and
|
|
78
|
+
* watching skip every `.codegraph-*` sibling on both sides (#636).
|
|
79
|
+
*/
|
|
80
|
+
exports.WSL_CODEGRAPH_DIR = '.codegraph-wsl';
|
|
65
81
|
let warnedBadDirName = false;
|
|
66
82
|
/**
|
|
67
83
|
* Resolve the per-project data directory name, honoring the `CODEGRAPH_DIR`
|
|
@@ -85,7 +101,7 @@ let warnedBadDirName = false;
|
|
|
85
101
|
function codeGraphDirName() {
|
|
86
102
|
const raw = process.env.CODEGRAPH_DIR?.trim();
|
|
87
103
|
if (!raw)
|
|
88
|
-
return DEFAULT_CODEGRAPH_DIR;
|
|
104
|
+
return exports.DEFAULT_CODEGRAPH_DIR;
|
|
89
105
|
const invalid = raw === '.' ||
|
|
90
106
|
raw.includes('..') ||
|
|
91
107
|
raw.includes('/') ||
|
|
@@ -96,9 +112,9 @@ function codeGraphDirName() {
|
|
|
96
112
|
warnedBadDirName = true;
|
|
97
113
|
// stderr only — stdout is the MCP protocol channel.
|
|
98
114
|
console.warn(`[codegraph] Ignoring invalid CODEGRAPH_DIR="${raw}" — it must be a plain ` +
|
|
99
|
-
`directory name (no path separators, no "..", not absolute). Using "${DEFAULT_CODEGRAPH_DIR}".`);
|
|
115
|
+
`directory name (no path separators, no "..", not absolute). Using "${exports.DEFAULT_CODEGRAPH_DIR}".`);
|
|
100
116
|
}
|
|
101
|
-
return DEFAULT_CODEGRAPH_DIR;
|
|
117
|
+
return exports.DEFAULT_CODEGRAPH_DIR;
|
|
102
118
|
}
|
|
103
119
|
return raw;
|
|
104
120
|
}
|
|
@@ -118,19 +134,62 @@ exports.CODEGRAPH_DIR = codeGraphDirName();
|
|
|
118
134
|
* neither indexes or watches the other's index directory.
|
|
119
135
|
*/
|
|
120
136
|
function isCodeGraphDataDir(name) {
|
|
121
|
-
return (name === DEFAULT_CODEGRAPH_DIR ||
|
|
137
|
+
return (name === exports.DEFAULT_CODEGRAPH_DIR ||
|
|
122
138
|
name === codeGraphDirName() ||
|
|
123
|
-
name.startsWith(DEFAULT_CODEGRAPH_DIR + '-'));
|
|
139
|
+
name.startsWith(exports.DEFAULT_CODEGRAPH_DIR + '-'));
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* The data directory name for one project: {@link codeGraphDirName}, except
|
|
143
|
+
* for a project on a Windows drive under WSL (`/mnt/c/...`) with no
|
|
144
|
+
* `CODEGRAPH_DIR` set. Windows-native CodeGraph opens `.codegraph` in that
|
|
145
|
+
* same tree, and SQLite's locking doesn't hold across the 9p/DrvFs bridge, so
|
|
146
|
+
* the two sharing one index fails with "disk I/O error" (issue #995). There:
|
|
147
|
+
*
|
|
148
|
+
* 1. `.codegraph-wsl/` exists → it. Once WSL has its own index it keeps it,
|
|
149
|
+
* even after Windows builds a `.codegraph` beside it.
|
|
150
|
+
* 2. `.codegraph/codegraph.db` exists → `.codegraph`. An index built before
|
|
151
|
+
* this default is kept rather than silently rebuilt somewhere else.
|
|
152
|
+
* 3. neither → `.codegraph-wsl`, so a fresh WSL index never shares.
|
|
153
|
+
*
|
|
154
|
+
* Every other host keeps the plain name without a stat: the WSL check is
|
|
155
|
+
* cached per process.
|
|
156
|
+
*/
|
|
157
|
+
function codeGraphDirNameFor(projectRoot) {
|
|
158
|
+
if (process.env.CODEGRAPH_DIR?.trim() || !(0, watch_policy_1.isWslWindowsDrive)(projectRoot))
|
|
159
|
+
return codeGraphDirName();
|
|
160
|
+
try {
|
|
161
|
+
if (fs.statSync(path.join(projectRoot, exports.WSL_CODEGRAPH_DIR)).isDirectory())
|
|
162
|
+
return exports.WSL_CODEGRAPH_DIR;
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
// absent — fall through
|
|
166
|
+
}
|
|
167
|
+
if (fs.existsSync(path.join(projectRoot, exports.DEFAULT_CODEGRAPH_DIR, 'codegraph.db')))
|
|
168
|
+
return exports.DEFAULT_CODEGRAPH_DIR;
|
|
169
|
+
return exports.WSL_CODEGRAPH_DIR;
|
|
124
170
|
}
|
|
125
171
|
/**
|
|
126
172
|
* Get the .codegraph directory path for a project
|
|
127
173
|
*/
|
|
128
174
|
function getCodeGraphDir(projectRoot) {
|
|
129
|
-
return path.join(projectRoot,
|
|
175
|
+
return path.join(projectRoot, codeGraphDirNameFor(projectRoot));
|
|
130
176
|
}
|
|
131
177
|
/**
|
|
132
|
-
* Check if a project has been initialized with CodeGraph
|
|
133
|
-
*
|
|
178
|
+
* Check if a project has been initialized with CodeGraph.
|
|
179
|
+
*
|
|
180
|
+
* Requires `.codegraph/codegraph.db` to exist AND to carry the codegraph
|
|
181
|
+
* schema. A file that merely exists — empty, or a SQLite database with no
|
|
182
|
+
* tables, as an interrupted `init` or a stray `touch` leaves behind — used to
|
|
183
|
+
* count as initialized, so one such file in an ANCESTOR directory (worst
|
|
184
|
+
* case: `$HOME`) captured the upward resolution of every project beneath it
|
|
185
|
+
* and made their real indexes unreachable (#1895).
|
|
186
|
+
*
|
|
187
|
+
* The probe is cheap and gated so hot callers (the prompt hook, MCP root
|
|
188
|
+
* resolution on every call) pay one `stat`: file size, then a read-only
|
|
189
|
+
* SQLite open with a single `sqlite_master` lookup — memoized per path +
|
|
190
|
+
* mtime + size so an unchanged db is never reopened. A database that cannot
|
|
191
|
+
* be inspected counts as initialized (see probeSchema) — only a proven-absent
|
|
192
|
+
* schema, or a file SQLite refuses as not a database, says no.
|
|
134
193
|
*/
|
|
135
194
|
function isInitialized(projectRoot) {
|
|
136
195
|
const codegraphDir = getCodeGraphDir(projectRoot);
|
|
@@ -139,7 +198,102 @@ function isInitialized(projectRoot) {
|
|
|
139
198
|
}
|
|
140
199
|
// Must have codegraph.db, not just .codegraph folder
|
|
141
200
|
const dbPath = path.join(codegraphDir, 'codegraph.db');
|
|
142
|
-
|
|
201
|
+
let st;
|
|
202
|
+
try {
|
|
203
|
+
st = fs.statSync(dbPath);
|
|
204
|
+
}
|
|
205
|
+
catch {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
return hasCodeGraphSchema(dbPath, st);
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* `codegraph.db` exists at `projectRoot` but does not carry the schema, and
|
|
212
|
+
* `init` can add it in place: an empty file, or a SQLite database without the
|
|
213
|
+
* codegraph tables (#1895). A file that is not SQLite at all is NOT this case —
|
|
214
|
+
* see {@link hasForeignDbFile}.
|
|
215
|
+
*/
|
|
216
|
+
function hasSchemalessDb(projectRoot) {
|
|
217
|
+
const dbPath = path.join(getCodeGraphDir(projectRoot), 'codegraph.db');
|
|
218
|
+
let st;
|
|
219
|
+
try {
|
|
220
|
+
st = fs.statSync(dbPath);
|
|
221
|
+
}
|
|
222
|
+
catch {
|
|
223
|
+
return false;
|
|
224
|
+
}
|
|
225
|
+
if (!st.isFile() || isInitialized(projectRoot))
|
|
226
|
+
return false;
|
|
227
|
+
return st.size === 0 || probeSchema(dbPath) === 'no-schema';
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* `codegraph.db` exists at `projectRoot` and is not a SQLite database (no
|
|
231
|
+
* header magic): SQLite refuses to open it, so `init` cannot rebuild it in
|
|
232
|
+
* place. The caller must say so rather than promise a repair; nothing here
|
|
233
|
+
* deletes the file.
|
|
234
|
+
*/
|
|
235
|
+
function hasForeignDbFile(projectRoot) {
|
|
236
|
+
const dbPath = path.join(getCodeGraphDir(projectRoot), 'codegraph.db');
|
|
237
|
+
let st;
|
|
238
|
+
try {
|
|
239
|
+
st = fs.statSync(dbPath);
|
|
240
|
+
}
|
|
241
|
+
catch {
|
|
242
|
+
return false;
|
|
243
|
+
}
|
|
244
|
+
return st.isFile() && st.size > 0 && probeSchema(dbPath) === 'not-sqlite';
|
|
245
|
+
}
|
|
246
|
+
/** A SQLite file header is 100 bytes; anything shorter cannot hold a schema. */
|
|
247
|
+
const SQLITE_HEADER_SIZE = 100;
|
|
248
|
+
/** SQLITE_NOTADB: SQLite read the file and it is not a database. */
|
|
249
|
+
const SQLITE_NOTADB = 26;
|
|
250
|
+
const schemaProbeCache = new Map();
|
|
251
|
+
function hasCodeGraphSchema(dbPath, st) {
|
|
252
|
+
if (!st.isFile() || st.size < SQLITE_HEADER_SIZE)
|
|
253
|
+
return false;
|
|
254
|
+
const cached = schemaProbeCache.get(dbPath);
|
|
255
|
+
if (cached && cached.mtimeMs === st.mtimeMs && cached.size === st.size)
|
|
256
|
+
return cached.ok;
|
|
257
|
+
const probe = probeSchema(dbPath);
|
|
258
|
+
const ok = probe === 'schema' || probe === 'unknown';
|
|
259
|
+
schemaProbeCache.set(dbPath, { mtimeMs: st.mtimeMs, size: st.size, ok });
|
|
260
|
+
return ok;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* What `codegraph.db` holds, asked of SQLite itself through a read-only
|
|
264
|
+
* connection: the codegraph schema, a database without it, not a database at
|
|
265
|
+
* all (SQLITE_NOTADB), or `unknown` — locked, busy, a WAL db in a directory we
|
|
266
|
+
* cannot create `-shm` in (read-only checkout, mount, another user's tree),
|
|
267
|
+
* disk I/O. Callers treat `unknown` as initialized: the pre-existing behaviour
|
|
268
|
+
* for a database we cannot inspect.
|
|
269
|
+
*
|
|
270
|
+
* The file is never read through a descriptor of our own, not even for its
|
|
271
|
+
* 16-byte header. Closing ANY descriptor on a database file drops every POSIX
|
|
272
|
+
* lock this process holds on it, including those of a connection it already
|
|
273
|
+
* has open (sqlite.org/howtocorrupt.html §2.2.1) — and the MCP server resolves
|
|
274
|
+
* projects through isInitialized on every call while it holds the index as
|
|
275
|
+
* its writer. SQLite's own connections share one lock table per file, so a
|
|
276
|
+
* second connection opened and closed here leaves the first one's locks alone.
|
|
277
|
+
*/
|
|
278
|
+
function probeSchema(dbPath) {
|
|
279
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
280
|
+
const { DatabaseSync } = require('node:sqlite');
|
|
281
|
+
let db = null;
|
|
282
|
+
try {
|
|
283
|
+
db = new DatabaseSync(dbPath, { readOnly: true });
|
|
284
|
+
const row = db.prepare("SELECT 1 AS ok FROM sqlite_master WHERE type = 'table' AND name = 'nodes'").get();
|
|
285
|
+
return row !== undefined ? 'schema' : 'no-schema';
|
|
286
|
+
}
|
|
287
|
+
catch (error) {
|
|
288
|
+
return error?.errcode === SQLITE_NOTADB ? 'not-sqlite' : 'unknown';
|
|
289
|
+
}
|
|
290
|
+
finally {
|
|
291
|
+
// Never hold the handle: Windows file locking would block the owner.
|
|
292
|
+
try {
|
|
293
|
+
db?.close();
|
|
294
|
+
}
|
|
295
|
+
catch { /* already closed */ }
|
|
296
|
+
}
|
|
143
297
|
}
|
|
144
298
|
/**
|
|
145
299
|
* Find the nearest parent directory containing .codegraph/
|
|
@@ -192,6 +346,82 @@ function unsafeIndexRootReason(projectRoot) {
|
|
|
192
346
|
}
|
|
193
347
|
return null;
|
|
194
348
|
}
|
|
349
|
+
/**
|
|
350
|
+
* `dev:ino` for a path, or null if it can't be stat'd or the platform doesn't
|
|
351
|
+
* report a usable inode. Read as bigints: WSL DrvFs (`/mnt/c`) reports inodes
|
|
352
|
+
* above 2^53, where a plain number rounds nearby inodes onto one value. Windows
|
|
353
|
+
* st_ino is unreliable across handle reopens, so we deliberately return null
|
|
354
|
+
* there — the deleted-but-open-inode hazard this guards (#925) is a POSIX
|
|
355
|
+
* file-semantics issue that doesn't arise on Windows (an open file can't be
|
|
356
|
+
* unlinked).
|
|
357
|
+
*/
|
|
358
|
+
function statInode(p) {
|
|
359
|
+
if (process.platform === 'win32')
|
|
360
|
+
return null;
|
|
361
|
+
try {
|
|
362
|
+
const s = fs.statSync(p, { bigint: true });
|
|
363
|
+
return `${s.dev}:${s.ino}`;
|
|
364
|
+
}
|
|
365
|
+
catch {
|
|
366
|
+
return null;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Canonicalize a project root for IDENTITY: hashing it into a rendezvous key
|
|
371
|
+
* (the daemon's named pipe / tmpdir socket, a registry record). Not for display
|
|
372
|
+
* — the caller-visible root keeps its own spelling.
|
|
373
|
+
*
|
|
374
|
+
* The contract is that two spellings of ONE directory yield ONE string, because
|
|
375
|
+
* a client that derives a different key silently fails to meet the daemon that
|
|
376
|
+
* is already running: it probes a socket nobody bound, spawns a redundant
|
|
377
|
+
* daemon, and that daemon dies on the lock the first one holds, so the session
|
|
378
|
+
* degrades to a single-process engine. `path.resolve` alone does NOT satisfy
|
|
379
|
+
* that contract — NTFS is case-insensitive, so `d:\work\codegraph` and
|
|
380
|
+
* `D:\work\codegraph` name one directory but two strings, and non-native
|
|
381
|
+
* `fs.realpathSync` keeps whichever casing the caller passed (only `.native`
|
|
382
|
+
* asks the filesystem for the on-disk name — the same reason
|
|
383
|
+
* {@link isSameIndexRoot} uses it). Both spellings really do occur: a
|
|
384
|
+
* cwd-derived root is the on-disk case, while a client-supplied
|
|
385
|
+
* `rootUri`/`workspaceFolders` path arrives as `file:///d%3A/…`.
|
|
386
|
+
*
|
|
387
|
+
* The Windows lowercase is belt-and-braces on top of the native realpath — NTFS
|
|
388
|
+
* can't hold two directories differing only by case, and it also absorbs a
|
|
389
|
+
* `\\?\`-prefixed native result diverging from a plain one.
|
|
390
|
+
*/
|
|
391
|
+
function canonicalProjectRoot(projectRoot) {
|
|
392
|
+
const resolved = path.resolve(projectRoot);
|
|
393
|
+
let canonical = resolved;
|
|
394
|
+
try {
|
|
395
|
+
canonical = fs.realpathSync.native(resolved);
|
|
396
|
+
}
|
|
397
|
+
catch {
|
|
398
|
+
// ENOENT/EACCES/ELOOP — the root is normally there (`.codegraph/` lives in
|
|
399
|
+
// it), so this is a fallback rather than a path we expect to take.
|
|
400
|
+
}
|
|
401
|
+
return process.platform === 'win32' ? canonical.toLowerCase() : canonical;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Whether two resolved index roots are one index spelled two ways — a symlinked
|
|
405
|
+
* checkout, or a case-variant on a case-insensitive mount (macOS, NTFS, WSL
|
|
406
|
+
* DrvFs `/mnt/c`), where `realpathSync` keeps the caller's casing (#1057).
|
|
407
|
+
* Compares the identity of both data directories as they are NOW, so an inode
|
|
408
|
+
* reused after a delete can't match: the deleted root no longer stats. Windows
|
|
409
|
+
* has no usable inode, so it compares the on-disk-cased native realpaths.
|
|
410
|
+
*/
|
|
411
|
+
function isSameIndexRoot(a, b) {
|
|
412
|
+
if (a === b)
|
|
413
|
+
return true;
|
|
414
|
+
if (process.platform === 'win32') {
|
|
415
|
+
try {
|
|
416
|
+
return fs.realpathSync.native(getCodeGraphDir(a)) === fs.realpathSync.native(getCodeGraphDir(b));
|
|
417
|
+
}
|
|
418
|
+
catch {
|
|
419
|
+
return false;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
const id = statInode(getCodeGraphDir(a));
|
|
423
|
+
return id !== null && id === statInode(getCodeGraphDir(b));
|
|
424
|
+
}
|
|
195
425
|
function findNearestCodeGraphRoot(startPath) {
|
|
196
426
|
let current = path.resolve(startPath);
|
|
197
427
|
const root = path.parse(current).root;
|
|
@@ -240,6 +470,9 @@ function escapeRegExp(s) {
|
|
|
240
470
|
* never turns into a full-tree crawl on a large repo.
|
|
241
471
|
*/
|
|
242
472
|
function findIndexedSubprojectRoots(root, opts = {}) {
|
|
473
|
+
// A stray workspace manifest must not enable scanning home or broader roots (#1454).
|
|
474
|
+
if (unsafeIndexRootReason(root) !== null)
|
|
475
|
+
return [];
|
|
243
476
|
const maxDepth = opts.maxDepth ?? 4;
|
|
244
477
|
const max = opts.max ?? 64;
|
|
245
478
|
const out = [];
|
|
@@ -337,8 +570,9 @@ const NOT_WORD_AFTER = /(?![\p{L}\p{N}_])/u.source;
|
|
|
337
570
|
* Structural keywords matched as EXACT words (boundary on both sides): short
|
|
338
571
|
* or ambiguous tokens where prefix matching would false-positive ("flow" in
|
|
339
572
|
* "flower", "path" in "pathological"). Grouped by language; a term appears once
|
|
340
|
-
* even when several languages share it
|
|
341
|
-
*
|
|
573
|
+
* even when several languages share it. Ambiguous everyday words like PT/ES
|
|
574
|
+
* "como" and DE "wie" are excluded: the hook instead requires another strong
|
|
575
|
+
* keyword, a verified code token, or indexed prose segments (#1654).
|
|
342
576
|
*/
|
|
343
577
|
const STRUCTURAL_WORDS = [
|
|
344
578
|
// English — the pre-#1126 list minus what moved to STRUCTURAL_STEMS: the
|
|
@@ -347,17 +581,16 @@ const STRUCTURAL_WORDS = [
|
|
|
347
581
|
'how', 'where', 'tracing', 'flows?', 'paths?', 'reach(?:es|ed)?', 'wired?', 'breaks?', 'why does',
|
|
348
582
|
// French (où=where, flux=flow, chemin=path, casse=breaks)
|
|
349
583
|
'comment', 'où', 'flux', 'chemins?', 'casse',
|
|
350
|
-
// Spanish (cómo
|
|
584
|
+
// Spanish (cómo=how, dónde/donde=where, flujo=flow, ruta/camino=path,
|
|
351
585
|
// rompe=breaks, llaman / quién llama = call(s) — bare "llama" is excluded:
|
|
352
586
|
// it's also the animal/model name in English prompts)
|
|
353
587
|
'cómo', 'dónde', 'donde', 'flujos?', 'rutas?', 'caminos?', 'rompe', 'llaman', 'quién llama', 'quien llama',
|
|
354
|
-
// Portuguese (
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
// German (wie=how, wo/woher/wohin=where, Pfad=path, Fluss/Ablauf=flow,
|
|
588
|
+
// Portuguese (onde=where, fluxo=flow, caminho=path)
|
|
589
|
+
'onde', 'fluxos?', 'caminhos?',
|
|
590
|
+
// German (wo/woher/wohin=where, Pfad=path, Fluss/Ablauf=flow,
|
|
358
591
|
// bricht/kaputt=breaks, ruft=calls, hängt=depends — "hängt … von X ab"
|
|
359
592
|
// splits the separable verb "abhängen", so the "abhäng" stem can't catch it)
|
|
360
|
-
'
|
|
593
|
+
'wo', 'woher', 'wohin', 'pfade?', 'fluss', 'ablauf', 'bricht', 'kaputt', 'ruft', 'hängt',
|
|
361
594
|
// Italian (dove=where, flusso=flow, percorso/i=path)
|
|
362
595
|
'dove', 'flusso', 'percors[oi]',
|
|
363
596
|
// Russian (как=how, где=where, путь/пути=path, работает=works)
|
|
@@ -593,6 +826,30 @@ function extractCodeTokens(prompt) {
|
|
|
593
826
|
function isStructuralPrompt(prompt) {
|
|
594
827
|
return hasStructuralKeyword(prompt) || extractCodeTokens(prompt).length > 0;
|
|
595
828
|
}
|
|
829
|
+
/**
|
|
830
|
+
* Claude Code persists `UserPromptSubmit` hook stdout above this many
|
|
831
|
+
* characters to a file and shows the model a ~2 KB preview instead (#1694).
|
|
832
|
+
* Measured on Claude Code 2.1.261; documented in the hooks reference as a
|
|
833
|
+
* 10,000-character cap on hook output strings.
|
|
834
|
+
*/
|
|
835
|
+
exports.CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT = 10_000;
|
|
836
|
+
/**
|
|
837
|
+
* Max characters of explore text injected by `codegraph prompt-hook` before
|
|
838
|
+
* truncation. Must stay under {@link CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT} so
|
|
839
|
+
* the host delivers the payload inline. 9,000 leaves ~1k for the
|
|
840
|
+
* `<codegraph_context>` wrapper and the `projectPath` nudge lines appended
|
|
841
|
+
* after the cap is applied.
|
|
842
|
+
*/
|
|
843
|
+
exports.PROMPT_HOOK_INJECTION_MAX = 9_000;
|
|
844
|
+
/**
|
|
845
|
+
* Cap explore text for the prompt-hook injection, preserving the existing
|
|
846
|
+
* "call codegraph_explore for the rest" notice when truncated.
|
|
847
|
+
*/
|
|
848
|
+
function capPromptHookInjection(text, max = exports.PROMPT_HOOK_INJECTION_MAX) {
|
|
849
|
+
return text.length > max
|
|
850
|
+
? `${text.slice(0, max)}\n…(truncated; call codegraph_explore for the rest)`
|
|
851
|
+
: text;
|
|
852
|
+
}
|
|
596
853
|
/**
|
|
597
854
|
* Decide what the front-load hook injects for a `prompt` issued from `cwd`,
|
|
598
855
|
* shaped by where the `.codegraph/` index(es) actually are:
|
|
@@ -712,10 +969,10 @@ function ensureGitignore(gitignorePath) {
|
|
|
712
969
|
*/
|
|
713
970
|
function createDirectory(projectRoot) {
|
|
714
971
|
const codegraphDir = getCodeGraphDir(projectRoot);
|
|
715
|
-
|
|
716
|
-
//
|
|
717
|
-
//
|
|
718
|
-
if (
|
|
972
|
+
// Only throw if CodeGraph is actually initialized (db with a schema).
|
|
973
|
+
// .codegraph/ folder alone — or a schema-less codegraph.db left by an
|
|
974
|
+
// interrupted init (#1895) — is fine: initialize() adds the schema to it.
|
|
975
|
+
if (isInitialized(projectRoot)) {
|
|
719
976
|
throw new Error(`CodeGraph already initialized in ${projectRoot}`);
|
|
720
977
|
}
|
|
721
978
|
// Create main directory (if it doesn't exist)
|
|
@@ -846,4 +1103,23 @@ function validateDirectory(projectRoot) {
|
|
|
846
1103
|
errors,
|
|
847
1104
|
};
|
|
848
1105
|
}
|
|
1106
|
+
/**
|
|
1107
|
+
* Claude Code injects `<task-notification>…</task-notification>` blocks as
|
|
1108
|
+
* `user` messages when a background agent finishes, and UserPromptSubmit
|
|
1109
|
+
* hooks receive them exactly like typed prompts (#1832). The whole prompt
|
|
1110
|
+
* must be that single envelope; a user question that merely mentions the
|
|
1111
|
+
* marker is still a prompt.
|
|
1112
|
+
*/
|
|
1113
|
+
function isTaskNotification(prompt) {
|
|
1114
|
+
return /^\s*<task-notification>[\s\S]*<\/task-notification>\s*$/.test(prompt);
|
|
1115
|
+
}
|
|
1116
|
+
/**
|
|
1117
|
+
* Claude Code hands a subagent's report back to the parent session as a
|
|
1118
|
+
* `<agent-message from="…">…</agent-message>` prompt, which UserPromptSubmit
|
|
1119
|
+
* hooks also receive (#2184). Same rule as {@link isTaskNotification}: only a
|
|
1120
|
+
* prompt that is entirely that envelope is skipped.
|
|
1121
|
+
*/
|
|
1122
|
+
function isAgentMessage(prompt) {
|
|
1123
|
+
return /^\s*<agent-message(?:\s[^>]*)?>[\s\S]*<\/agent-message>\s*$/.test(prompt);
|
|
1124
|
+
}
|
|
849
1125
|
//# sourceMappingURL=directory.js.map
|