@vizalice/codegraph 1.5.0
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/LICENSE +21 -0
- package/README.md +872 -0
- package/dist/bin/codegraph.d.ts +26 -0
- package/dist/bin/codegraph.d.ts.map +1 -0
- package/dist/bin/codegraph.js +2324 -0
- package/dist/bin/codegraph.js.map +1 -0
- package/dist/bin/command-supervision.d.ts +49 -0
- package/dist/bin/command-supervision.d.ts.map +1 -0
- package/dist/bin/command-supervision.js +95 -0
- package/dist/bin/command-supervision.js.map +1 -0
- package/dist/bin/fatal-handler.d.ts +20 -0
- package/dist/bin/fatal-handler.d.ts.map +1 -0
- package/dist/bin/fatal-handler.js +118 -0
- package/dist/bin/fatal-handler.js.map +1 -0
- package/dist/bin/node-version-check.d.ts +37 -0
- package/dist/bin/node-version-check.d.ts.map +1 -0
- package/dist/bin/node-version-check.js +79 -0
- package/dist/bin/node-version-check.js.map +1 -0
- package/dist/bin/uninstall.d.ts +14 -0
- package/dist/bin/uninstall.d.ts.map +1 -0
- package/dist/bin/uninstall.js +36 -0
- package/dist/bin/uninstall.js.map +1 -0
- package/dist/context/formatter.d.ts +36 -0
- package/dist/context/formatter.d.ts.map +1 -0
- package/dist/context/formatter.js +269 -0
- package/dist/context/formatter.js.map +1 -0
- package/dist/context/index.d.ts +119 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +1333 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/markers.d.ts +19 -0
- package/dist/context/markers.d.ts.map +1 -0
- package/dist/context/markers.js +22 -0
- package/dist/context/markers.js.map +1 -0
- package/dist/db/index.d.ts +378 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +831 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/migrations.d.ts +44 -0
- package/dist/db/migrations.d.ts.map +1 -0
- package/dist/db/migrations.js +236 -0
- package/dist/db/migrations.js.map +1 -0
- package/dist/db/queries.d.ts +705 -0
- package/dist/db/queries.d.ts.map +1 -0
- package/dist/db/queries.js +2435 -0
- package/dist/db/queries.js.map +1 -0
- package/dist/db/schema.sql +207 -0
- package/dist/db/sqlite-adapter.d.ts +55 -0
- package/dist/db/sqlite-adapter.d.ts.map +1 -0
- package/dist/db/sqlite-adapter.js +135 -0
- package/dist/db/sqlite-adapter.js.map +1 -0
- package/dist/db/wal-valve.d.ts +119 -0
- package/dist/db/wal-valve.d.ts.map +1 -0
- package/dist/db/wal-valve.js +290 -0
- package/dist/db/wal-valve.js.map +1 -0
- package/dist/directory.d.ts +183 -0
- package/dist/directory.d.ts.map +1 -0
- package/dist/directory.js +797 -0
- package/dist/directory.js.map +1 -0
- package/dist/errors.d.ts +136 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +219 -0
- package/dist/errors.js.map +1 -0
- package/dist/extraction/astro-extractor.d.ts +79 -0
- package/dist/extraction/astro-extractor.d.ts.map +1 -0
- package/dist/extraction/astro-extractor.js +320 -0
- package/dist/extraction/astro-extractor.js.map +1 -0
- package/dist/extraction/cfml-extractor.d.ts +107 -0
- package/dist/extraction/cfml-extractor.d.ts.map +1 -0
- package/dist/extraction/cfml-extractor.js +494 -0
- package/dist/extraction/cfml-extractor.js.map +1 -0
- package/dist/extraction/dfm-extractor.d.ts +31 -0
- package/dist/extraction/dfm-extractor.d.ts.map +1 -0
- package/dist/extraction/dfm-extractor.js +151 -0
- package/dist/extraction/dfm-extractor.js.map +1 -0
- package/dist/extraction/extraction-version.d.ts +25 -0
- package/dist/extraction/extraction-version.d.ts.map +1 -0
- package/dist/extraction/extraction-version.js +28 -0
- package/dist/extraction/extraction-version.js.map +1 -0
- package/dist/extraction/function-ref.d.ts +118 -0
- package/dist/extraction/function-ref.d.ts.map +1 -0
- package/dist/extraction/function-ref.js +733 -0
- package/dist/extraction/function-ref.js.map +1 -0
- package/dist/extraction/generated-detection.d.ts +66 -0
- package/dist/extraction/generated-detection.d.ts.map +1 -0
- package/dist/extraction/generated-detection.js +248 -0
- package/dist/extraction/generated-detection.js.map +1 -0
- package/dist/extraction/grammars.d.ts +138 -0
- package/dist/extraction/grammars.d.ts.map +1 -0
- package/dist/extraction/grammars.js +694 -0
- package/dist/extraction/grammars.js.map +1 -0
- package/dist/extraction/index.d.ts +308 -0
- package/dist/extraction/index.d.ts.map +1 -0
- package/dist/extraction/index.js +2711 -0
- package/dist/extraction/index.js.map +1 -0
- package/dist/extraction/kernel/decode.d.ts +9 -0
- package/dist/extraction/kernel/decode.d.ts.map +1 -0
- package/dist/extraction/kernel/decode.js +162 -0
- package/dist/extraction/kernel/decode.js.map +1 -0
- package/dist/extraction/kernel/index.d.ts +64 -0
- package/dist/extraction/kernel/index.d.ts.map +1 -0
- package/dist/extraction/kernel/index.js +279 -0
- package/dist/extraction/kernel/index.js.map +1 -0
- package/dist/extraction/kernel/layout.d.ts +101 -0
- package/dist/extraction/kernel/layout.d.ts.map +1 -0
- package/dist/extraction/kernel/layout.js +104 -0
- package/dist/extraction/kernel/layout.js.map +1 -0
- package/dist/extraction/kernel/loader.d.ts +103 -0
- package/dist/extraction/kernel/loader.d.ts.map +1 -0
- package/dist/extraction/kernel/loader.js +146 -0
- package/dist/extraction/kernel/loader.js.map +1 -0
- package/dist/extraction/languages/arkts.d.ts +3 -0
- package/dist/extraction/languages/arkts.d.ts.map +1 -0
- package/dist/extraction/languages/arkts.js +127 -0
- package/dist/extraction/languages/arkts.js.map +1 -0
- package/dist/extraction/languages/c-cpp.d.ts +124 -0
- package/dist/extraction/languages/c-cpp.d.ts.map +1 -0
- package/dist/extraction/languages/c-cpp.js +1689 -0
- package/dist/extraction/languages/c-cpp.js.map +1 -0
- package/dist/extraction/languages/cfquery.d.ts +12 -0
- package/dist/extraction/languages/cfquery.d.ts.map +1 -0
- package/dist/extraction/languages/cfquery.js +28 -0
- package/dist/extraction/languages/cfquery.js.map +1 -0
- package/dist/extraction/languages/cfscript.d.ts +3 -0
- package/dist/extraction/languages/cfscript.d.ts.map +1 -0
- package/dist/extraction/languages/cfscript.js +73 -0
- package/dist/extraction/languages/cfscript.js.map +1 -0
- package/dist/extraction/languages/cobol.d.ts +33 -0
- package/dist/extraction/languages/cobol.d.ts.map +1 -0
- package/dist/extraction/languages/cobol.js +499 -0
- package/dist/extraction/languages/cobol.js.map +1 -0
- package/dist/extraction/languages/csharp.d.ts +25 -0
- package/dist/extraction/languages/csharp.d.ts.map +1 -0
- package/dist/extraction/languages/csharp.js +175 -0
- package/dist/extraction/languages/csharp.js.map +1 -0
- package/dist/extraction/languages/dart.d.ts +3 -0
- package/dist/extraction/languages/dart.d.ts.map +1 -0
- package/dist/extraction/languages/dart.js +374 -0
- package/dist/extraction/languages/dart.js.map +1 -0
- package/dist/extraction/languages/erlang.d.ts +3 -0
- package/dist/extraction/languages/erlang.d.ts.map +1 -0
- package/dist/extraction/languages/erlang.js +350 -0
- package/dist/extraction/languages/erlang.js.map +1 -0
- package/dist/extraction/languages/go.d.ts +3 -0
- package/dist/extraction/languages/go.d.ts.map +1 -0
- package/dist/extraction/languages/go.js +111 -0
- package/dist/extraction/languages/go.js.map +1 -0
- package/dist/extraction/languages/index.d.ts +10 -0
- package/dist/extraction/languages/index.d.ts.map +1 -0
- package/dist/extraction/languages/index.js +71 -0
- package/dist/extraction/languages/index.js.map +1 -0
- package/dist/extraction/languages/java.d.ts +3 -0
- package/dist/extraction/languages/java.d.ts.map +1 -0
- package/dist/extraction/languages/java.js +315 -0
- package/dist/extraction/languages/java.js.map +1 -0
- package/dist/extraction/languages/javascript.d.ts +3 -0
- package/dist/extraction/languages/javascript.d.ts.map +1 -0
- package/dist/extraction/languages/javascript.js +106 -0
- package/dist/extraction/languages/javascript.js.map +1 -0
- package/dist/extraction/languages/kotlin.d.ts +3 -0
- package/dist/extraction/languages/kotlin.d.ts.map +1 -0
- package/dist/extraction/languages/kotlin.js +379 -0
- package/dist/extraction/languages/kotlin.js.map +1 -0
- package/dist/extraction/languages/lua.d.ts +3 -0
- package/dist/extraction/languages/lua.d.ts.map +1 -0
- package/dist/extraction/languages/lua.js +150 -0
- package/dist/extraction/languages/lua.js.map +1 -0
- package/dist/extraction/languages/luau.d.ts +3 -0
- package/dist/extraction/languages/luau.d.ts.map +1 -0
- package/dist/extraction/languages/luau.js +37 -0
- package/dist/extraction/languages/luau.js.map +1 -0
- package/dist/extraction/languages/nix.d.ts +3 -0
- package/dist/extraction/languages/nix.d.ts.map +1 -0
- package/dist/extraction/languages/nix.js +294 -0
- package/dist/extraction/languages/nix.js.map +1 -0
- package/dist/extraction/languages/objc.d.ts +3 -0
- package/dist/extraction/languages/objc.d.ts.map +1 -0
- package/dist/extraction/languages/objc.js +179 -0
- package/dist/extraction/languages/objc.js.map +1 -0
- package/dist/extraction/languages/pascal.d.ts +3 -0
- package/dist/extraction/languages/pascal.d.ts.map +1 -0
- package/dist/extraction/languages/pascal.js +77 -0
- package/dist/extraction/languages/pascal.js.map +1 -0
- package/dist/extraction/languages/php.d.ts +3 -0
- package/dist/extraction/languages/php.d.ts.map +1 -0
- package/dist/extraction/languages/php.js +196 -0
- package/dist/extraction/languages/php.js.map +1 -0
- package/dist/extraction/languages/python.d.ts +3 -0
- package/dist/extraction/languages/python.d.ts.map +1 -0
- package/dist/extraction/languages/python.js +56 -0
- package/dist/extraction/languages/python.js.map +1 -0
- package/dist/extraction/languages/r.d.ts +3 -0
- package/dist/extraction/languages/r.d.ts.map +1 -0
- package/dist/extraction/languages/r.js +314 -0
- package/dist/extraction/languages/r.js.map +1 -0
- package/dist/extraction/languages/ruby.d.ts +3 -0
- package/dist/extraction/languages/ruby.d.ts.map +1 -0
- package/dist/extraction/languages/ruby.js +149 -0
- package/dist/extraction/languages/ruby.js.map +1 -0
- package/dist/extraction/languages/rust.d.ts +3 -0
- package/dist/extraction/languages/rust.d.ts.map +1 -0
- package/dist/extraction/languages/rust.js +145 -0
- package/dist/extraction/languages/rust.js.map +1 -0
- package/dist/extraction/languages/scala.d.ts +3 -0
- package/dist/extraction/languages/scala.d.ts.map +1 -0
- package/dist/extraction/languages/scala.js +209 -0
- package/dist/extraction/languages/scala.js.map +1 -0
- package/dist/extraction/languages/solidity.d.ts +3 -0
- package/dist/extraction/languages/solidity.d.ts.map +1 -0
- package/dist/extraction/languages/solidity.js +293 -0
- package/dist/extraction/languages/solidity.js.map +1 -0
- package/dist/extraction/languages/swift.d.ts +3 -0
- package/dist/extraction/languages/swift.d.ts.map +1 -0
- package/dist/extraction/languages/swift.js +152 -0
- package/dist/extraction/languages/swift.js.map +1 -0
- package/dist/extraction/languages/terraform.d.ts +3 -0
- package/dist/extraction/languages/terraform.d.ts.map +1 -0
- package/dist/extraction/languages/terraform.js +641 -0
- package/dist/extraction/languages/terraform.js.map +1 -0
- package/dist/extraction/languages/typescript.d.ts +16 -0
- package/dist/extraction/languages/typescript.d.ts.map +1 -0
- package/dist/extraction/languages/typescript.js +167 -0
- package/dist/extraction/languages/typescript.js.map +1 -0
- package/dist/extraction/languages/vbnet.d.ts +11 -0
- package/dist/extraction/languages/vbnet.d.ts.map +1 -0
- package/dist/extraction/languages/vbnet.js +141 -0
- package/dist/extraction/languages/vbnet.js.map +1 -0
- package/dist/extraction/liquid-extractor.d.ts +59 -0
- package/dist/extraction/liquid-extractor.d.ts.map +1 -0
- package/dist/extraction/liquid-extractor.js +357 -0
- package/dist/extraction/liquid-extractor.js.map +1 -0
- package/dist/extraction/mybatis-extractor.d.ts +68 -0
- package/dist/extraction/mybatis-extractor.d.ts.map +1 -0
- package/dist/extraction/mybatis-extractor.js +300 -0
- package/dist/extraction/mybatis-extractor.js.map +1 -0
- package/dist/extraction/parse-pool.d.ts +160 -0
- package/dist/extraction/parse-pool.d.ts.map +1 -0
- package/dist/extraction/parse-pool.js +402 -0
- package/dist/extraction/parse-pool.js.map +1 -0
- package/dist/extraction/parse-worker.d.ts +8 -0
- package/dist/extraction/parse-worker.d.ts.map +1 -0
- package/dist/extraction/parse-worker.js +138 -0
- package/dist/extraction/parse-worker.js.map +1 -0
- package/dist/extraction/razor-extractor.d.ts +42 -0
- package/dist/extraction/razor-extractor.d.ts.map +1 -0
- package/dist/extraction/razor-extractor.js +285 -0
- package/dist/extraction/razor-extractor.js.map +1 -0
- package/dist/extraction/store-worker.d.ts +24 -0
- package/dist/extraction/store-worker.d.ts.map +1 -0
- package/dist/extraction/store-worker.js +139 -0
- package/dist/extraction/store-worker.js.map +1 -0
- package/dist/extraction/store-writer.d.ts +63 -0
- package/dist/extraction/store-writer.d.ts.map +1 -0
- package/dist/extraction/store-writer.js +174 -0
- package/dist/extraction/store-writer.js.map +1 -0
- package/dist/extraction/svelte-extractor.d.ts +56 -0
- package/dist/extraction/svelte-extractor.d.ts.map +1 -0
- package/dist/extraction/svelte-extractor.js +275 -0
- package/dist/extraction/svelte-extractor.js.map +1 -0
- package/dist/extraction/tree-sitter-helpers.d.ts +28 -0
- package/dist/extraction/tree-sitter-helpers.d.ts.map +1 -0
- package/dist/extraction/tree-sitter-helpers.js +153 -0
- package/dist/extraction/tree-sitter-helpers.js.map +1 -0
- package/dist/extraction/tree-sitter-types.d.ts +260 -0
- package/dist/extraction/tree-sitter-types.d.ts.map +1 -0
- package/dist/extraction/tree-sitter-types.js +10 -0
- package/dist/extraction/tree-sitter-types.js.map +1 -0
- package/dist/extraction/tree-sitter.d.ts +728 -0
- package/dist/extraction/tree-sitter.d.ts.map +1 -0
- package/dist/extraction/tree-sitter.js +6676 -0
- package/dist/extraction/tree-sitter.js.map +1 -0
- package/dist/extraction/vue-extractor.d.ts +51 -0
- package/dist/extraction/vue-extractor.d.ts.map +1 -0
- package/dist/extraction/vue-extractor.js +254 -0
- package/dist/extraction/vue-extractor.js.map +1 -0
- package/dist/extraction/wasm/tree-sitter-arkts.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-c.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cfml.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cfquery.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cfscript.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-cpp.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-dart.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-erlang.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-go.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-javascript.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-luau.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-php.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-python.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-r.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-ruby.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-rust.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-swift.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-terraform.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-tsx.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-typescript.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/dist/extraction/wasm-runtime-flags.d.ts +53 -0
- package/dist/extraction/wasm-runtime-flags.d.ts.map +1 -0
- package/dist/extraction/wasm-runtime-flags.js +130 -0
- package/dist/extraction/wasm-runtime-flags.js.map +1 -0
- package/dist/graph/index.d.ts +8 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +13 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/queries.d.ts +106 -0
- package/dist/graph/queries.d.ts.map +1 -0
- package/dist/graph/queries.js +341 -0
- package/dist/graph/queries.js.map +1 -0
- package/dist/graph/traversal.d.ts +127 -0
- package/dist/graph/traversal.d.ts.map +1 -0
- package/dist/graph/traversal.js +599 -0
- package/dist/graph/traversal.js.map +1 -0
- package/dist/index.d.ts +677 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1718 -0
- package/dist/index.js.map +1 -0
- package/dist/installer/beta-signup.d.ts +54 -0
- package/dist/installer/beta-signup.d.ts.map +1 -0
- package/dist/installer/beta-signup.js +178 -0
- package/dist/installer/beta-signup.js.map +1 -0
- package/dist/installer/config-writer.d.ts +28 -0
- package/dist/installer/config-writer.d.ts.map +1 -0
- package/dist/installer/config-writer.js +91 -0
- package/dist/installer/config-writer.js.map +1 -0
- package/dist/installer/index.d.ts +144 -0
- package/dist/installer/index.d.ts.map +1 -0
- package/dist/installer/index.js +634 -0
- package/dist/installer/index.js.map +1 -0
- package/dist/installer/instructions-template.d.ts +41 -0
- package/dist/installer/instructions-template.d.ts.map +1 -0
- package/dist/installer/instructions-template.js +53 -0
- package/dist/installer/instructions-template.js.map +1 -0
- package/dist/installer/targets/antigravity.d.ts +57 -0
- package/dist/installer/targets/antigravity.d.ts.map +1 -0
- package/dist/installer/targets/antigravity.js +308 -0
- package/dist/installer/targets/antigravity.js.map +1 -0
- package/dist/installer/targets/claude.d.ts +62 -0
- package/dist/installer/targets/claude.d.ts.map +1 -0
- package/dist/installer/targets/claude.js +486 -0
- package/dist/installer/targets/claude.js.map +1 -0
- package/dist/installer/targets/codex.d.ts +18 -0
- package/dist/installer/targets/codex.d.ts.map +1 -0
- package/dist/installer/targets/codex.js +185 -0
- package/dist/installer/targets/codex.js.map +1 -0
- package/dist/installer/targets/copilot-cli.d.ts +32 -0
- package/dist/installer/targets/copilot-cli.d.ts.map +1 -0
- package/dist/installer/targets/copilot-cli.js +209 -0
- package/dist/installer/targets/copilot-cli.js.map +1 -0
- package/dist/installer/targets/copilot-jetbrains.d.ts +42 -0
- package/dist/installer/targets/copilot-jetbrains.d.ts.map +1 -0
- package/dist/installer/targets/copilot-jetbrains.js +238 -0
- package/dist/installer/targets/copilot-jetbrains.js.map +1 -0
- package/dist/installer/targets/copilot-vscode.d.ts +47 -0
- package/dist/installer/targets/copilot-vscode.d.ts.map +1 -0
- package/dist/installer/targets/copilot-vscode.js +219 -0
- package/dist/installer/targets/copilot-vscode.js.map +1 -0
- package/dist/installer/targets/cursor.d.ts +35 -0
- package/dist/installer/targets/cursor.d.ts.map +1 -0
- package/dist/installer/targets/cursor.js +254 -0
- package/dist/installer/targets/cursor.js.map +1 -0
- package/dist/installer/targets/dsh.d.ts +97 -0
- package/dist/installer/targets/dsh.d.ts.map +1 -0
- package/dist/installer/targets/dsh.js +358 -0
- package/dist/installer/targets/dsh.js.map +1 -0
- package/dist/installer/targets/gemini.d.ts +26 -0
- package/dist/installer/targets/gemini.d.ts.map +1 -0
- package/dist/installer/targets/gemini.js +165 -0
- package/dist/installer/targets/gemini.js.map +1 -0
- package/dist/installer/targets/hermes.d.ts +18 -0
- package/dist/installer/targets/hermes.d.ts.map +1 -0
- package/dist/installer/targets/hermes.js +359 -0
- package/dist/installer/targets/hermes.js.map +1 -0
- package/dist/installer/targets/kiro.d.ts +27 -0
- package/dist/installer/targets/kiro.d.ts.map +1 -0
- package/dist/installer/targets/kiro.js +178 -0
- package/dist/installer/targets/kiro.js.map +1 -0
- package/dist/installer/targets/opencode.d.ts +38 -0
- package/dist/installer/targets/opencode.d.ts.map +1 -0
- package/dist/installer/targets/opencode.js +288 -0
- package/dist/installer/targets/opencode.js.map +1 -0
- package/dist/installer/targets/registry.d.ts +35 -0
- package/dist/installer/targets/registry.d.ts.map +1 -0
- package/dist/installer/targets/registry.js +101 -0
- package/dist/installer/targets/registry.js.map +1 -0
- package/dist/installer/targets/shared.d.ts +132 -0
- package/dist/installer/targets/shared.d.ts.map +1 -0
- package/dist/installer/targets/shared.js +314 -0
- package/dist/installer/targets/shared.js.map +1 -0
- package/dist/installer/targets/toml.d.ts +53 -0
- package/dist/installer/targets/toml.d.ts.map +1 -0
- package/dist/installer/targets/toml.js +226 -0
- package/dist/installer/targets/toml.js.map +1 -0
- package/dist/installer/targets/types.d.ts +109 -0
- package/dist/installer/targets/types.d.ts.map +1 -0
- package/dist/installer/targets/types.js +16 -0
- package/dist/installer/targets/types.js.map +1 -0
- package/dist/installer/targets/zcode.d.ts +106 -0
- package/dist/installer/targets/zcode.d.ts.map +1 -0
- package/dist/installer/targets/zcode.js +451 -0
- package/dist/installer/targets/zcode.js.map +1 -0
- package/dist/mcp/daemon-manager.d.ts +42 -0
- package/dist/mcp/daemon-manager.d.ts.map +1 -0
- package/dist/mcp/daemon-manager.js +129 -0
- package/dist/mcp/daemon-manager.js.map +1 -0
- package/dist/mcp/daemon-paths.d.ts +73 -0
- package/dist/mcp/daemon-paths.d.ts.map +1 -0
- package/dist/mcp/daemon-paths.js +165 -0
- package/dist/mcp/daemon-paths.js.map +1 -0
- package/dist/mcp/daemon-registry.d.ts +47 -0
- package/dist/mcp/daemon-registry.d.ts.map +1 -0
- package/dist/mcp/daemon-registry.js +233 -0
- package/dist/mcp/daemon-registry.js.map +1 -0
- package/dist/mcp/daemon.d.ts +290 -0
- package/dist/mcp/daemon.d.ts.map +1 -0
- package/dist/mcp/daemon.js +862 -0
- package/dist/mcp/daemon.js.map +1 -0
- package/dist/mcp/dynamic-boundaries.d.ts +41 -0
- package/dist/mcp/dynamic-boundaries.d.ts.map +1 -0
- package/dist/mcp/dynamic-boundaries.js +360 -0
- package/dist/mcp/dynamic-boundaries.js.map +1 -0
- package/dist/mcp/early-ppid.d.ts +26 -0
- package/dist/mcp/early-ppid.d.ts.map +1 -0
- package/dist/mcp/early-ppid.js +29 -0
- package/dist/mcp/early-ppid.js.map +1 -0
- package/dist/mcp/engine.d.ts +122 -0
- package/dist/mcp/engine.d.ts.map +1 -0
- package/dist/mcp/engine.js +350 -0
- package/dist/mcp/engine.js.map +1 -0
- package/dist/mcp/explore-dedup.d.ts +137 -0
- package/dist/mcp/explore-dedup.d.ts.map +1 -0
- package/dist/mcp/explore-dedup.js +236 -0
- package/dist/mcp/explore-dedup.js.map +1 -0
- package/dist/mcp/explore-diagnostics.d.ts +287 -0
- package/dist/mcp/explore-diagnostics.d.ts.map +1 -0
- package/dist/mcp/explore-diagnostics.js +555 -0
- package/dist/mcp/explore-diagnostics.js.map +1 -0
- package/dist/mcp/explore-session-state.d.ts +217 -0
- package/dist/mcp/explore-session-state.d.ts.map +1 -0
- package/dist/mcp/explore-session-state.js +322 -0
- package/dist/mcp/explore-session-state.js.map +1 -0
- package/dist/mcp/index.d.ts +137 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +554 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/liveness-watchdog.d.ts +35 -0
- package/dist/mcp/liveness-watchdog.d.ts.map +1 -0
- package/dist/mcp/liveness-watchdog.js +269 -0
- package/dist/mcp/liveness-watchdog.js.map +1 -0
- package/dist/mcp/ppid-watchdog.d.ts +62 -0
- package/dist/mcp/ppid-watchdog.d.ts.map +1 -0
- package/dist/mcp/ppid-watchdog.js +64 -0
- package/dist/mcp/ppid-watchdog.js.map +1 -0
- package/dist/mcp/proxy.d.ts +87 -0
- package/dist/mcp/proxy.d.ts.map +1 -0
- package/dist/mcp/proxy.js +672 -0
- package/dist/mcp/proxy.js.map +1 -0
- package/dist/mcp/query-pool.d.ts +108 -0
- package/dist/mcp/query-pool.d.ts.map +1 -0
- package/dist/mcp/query-pool.js +315 -0
- package/dist/mcp/query-pool.js.map +1 -0
- package/dist/mcp/query-worker.d.ts +24 -0
- package/dist/mcp/query-worker.d.ts.map +1 -0
- package/dist/mcp/query-worker.js +87 -0
- package/dist/mcp/query-worker.js.map +1 -0
- package/dist/mcp/server-instructions.d.ts +34 -0
- package/dist/mcp/server-instructions.d.ts.map +1 -0
- package/dist/mcp/server-instructions.js +111 -0
- package/dist/mcp/server-instructions.js.map +1 -0
- package/dist/mcp/session.d.ts +109 -0
- package/dist/mcp/session.d.ts.map +1 -0
- package/dist/mcp/session.js +375 -0
- package/dist/mcp/session.js.map +1 -0
- package/dist/mcp/startup-handshake.d.ts +44 -0
- package/dist/mcp/startup-handshake.d.ts.map +1 -0
- package/dist/mcp/startup-handshake.js +73 -0
- package/dist/mcp/startup-handshake.js.map +1 -0
- package/dist/mcp/stdin-teardown.d.ts +27 -0
- package/dist/mcp/stdin-teardown.d.ts.map +1 -0
- package/dist/mcp/stdin-teardown.js +49 -0
- package/dist/mcp/stdin-teardown.js.map +1 -0
- package/dist/mcp/tools.d.ts +862 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +6526 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/mcp/transport.d.ts +188 -0
- package/dist/mcp/transport.d.ts.map +1 -0
- package/dist/mcp/transport.js +377 -0
- package/dist/mcp/transport.js.map +1 -0
- package/dist/mcp/version.d.ts +19 -0
- package/dist/mcp/version.d.ts.map +1 -0
- package/dist/mcp/version.js +71 -0
- package/dist/mcp/version.js.map +1 -0
- package/dist/project-config.d.ts +94 -0
- package/dist/project-config.d.ts.map +1 -0
- package/dist/project-config.js +374 -0
- package/dist/project-config.js.map +1 -0
- package/dist/prompt-hook-output.d.ts +23 -0
- package/dist/prompt-hook-output.d.ts.map +1 -0
- package/dist/prompt-hook-output.js +35 -0
- package/dist/prompt-hook-output.js.map +1 -0
- package/dist/resolution/c-fnptr-synthesizer.d.ts +6 -0
- package/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -0
- package/dist/resolution/c-fnptr-synthesizer.js +1506 -0
- package/dist/resolution/c-fnptr-synthesizer.js.map +1 -0
- package/dist/resolution/callback-synthesizer.d.ts +59 -0
- package/dist/resolution/callback-synthesizer.d.ts.map +1 -0
- package/dist/resolution/callback-synthesizer.js +4030 -0
- package/dist/resolution/callback-synthesizer.js.map +1 -0
- package/dist/resolution/cooperative-yield.d.ts +40 -0
- package/dist/resolution/cooperative-yield.d.ts.map +1 -0
- package/dist/resolution/cooperative-yield.js +44 -0
- package/dist/resolution/cooperative-yield.js.map +1 -0
- package/dist/resolution/frameworks/astro.d.ts +9 -0
- package/dist/resolution/frameworks/astro.d.ts.map +1 -0
- package/dist/resolution/frameworks/astro.js +169 -0
- package/dist/resolution/frameworks/astro.js.map +1 -0
- package/dist/resolution/frameworks/cargo-workspace.d.ts +18 -0
- package/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -0
- package/dist/resolution/frameworks/cargo-workspace.js +225 -0
- package/dist/resolution/frameworks/cargo-workspace.js.map +1 -0
- package/dist/resolution/frameworks/cics.d.ts +20 -0
- package/dist/resolution/frameworks/cics.d.ts.map +1 -0
- package/dist/resolution/frameworks/cics.js +90 -0
- package/dist/resolution/frameworks/cics.js.map +1 -0
- package/dist/resolution/frameworks/csharp.d.ts +8 -0
- package/dist/resolution/frameworks/csharp.d.ts.map +1 -0
- package/dist/resolution/frameworks/csharp.js +241 -0
- package/dist/resolution/frameworks/csharp.js.map +1 -0
- package/dist/resolution/frameworks/drupal.d.ts +51 -0
- package/dist/resolution/frameworks/drupal.d.ts.map +1 -0
- package/dist/resolution/frameworks/drupal.js +367 -0
- package/dist/resolution/frameworks/drupal.js.map +1 -0
- package/dist/resolution/frameworks/expo-modules.d.ts +3 -0
- package/dist/resolution/frameworks/expo-modules.d.ts.map +1 -0
- package/dist/resolution/frameworks/expo-modules.js +148 -0
- package/dist/resolution/frameworks/expo-modules.js.map +1 -0
- package/dist/resolution/frameworks/express.d.ts +8 -0
- package/dist/resolution/frameworks/express.d.ts.map +1 -0
- package/dist/resolution/frameworks/express.js +308 -0
- package/dist/resolution/frameworks/express.js.map +1 -0
- package/dist/resolution/frameworks/fabric.d.ts +3 -0
- package/dist/resolution/frameworks/fabric.d.ts.map +1 -0
- package/dist/resolution/frameworks/fabric.js +354 -0
- package/dist/resolution/frameworks/fabric.js.map +1 -0
- package/dist/resolution/frameworks/go.d.ts +8 -0
- package/dist/resolution/frameworks/go.d.ts.map +1 -0
- package/dist/resolution/frameworks/go.js +184 -0
- package/dist/resolution/frameworks/go.js.map +1 -0
- package/dist/resolution/frameworks/goframe.d.ts +41 -0
- package/dist/resolution/frameworks/goframe.d.ts.map +1 -0
- package/dist/resolution/frameworks/goframe.js +112 -0
- package/dist/resolution/frameworks/goframe.js.map +1 -0
- package/dist/resolution/frameworks/index.d.ts +50 -0
- package/dist/resolution/frameworks/index.d.ts.map +1 -0
- package/dist/resolution/frameworks/index.js +175 -0
- package/dist/resolution/frameworks/index.js.map +1 -0
- package/dist/resolution/frameworks/java.d.ts +8 -0
- package/dist/resolution/frameworks/java.d.ts.map +1 -0
- package/dist/resolution/frameworks/java.js +517 -0
- package/dist/resolution/frameworks/java.js.map +1 -0
- package/dist/resolution/frameworks/laravel.d.ts +13 -0
- package/dist/resolution/frameworks/laravel.d.ts.map +1 -0
- package/dist/resolution/frameworks/laravel.js +257 -0
- package/dist/resolution/frameworks/laravel.js.map +1 -0
- package/dist/resolution/frameworks/nestjs.d.ts +26 -0
- package/dist/resolution/frameworks/nestjs.d.ts.map +1 -0
- package/dist/resolution/frameworks/nestjs.js +698 -0
- package/dist/resolution/frameworks/nestjs.js.map +1 -0
- package/dist/resolution/frameworks/play.d.ts +19 -0
- package/dist/resolution/frameworks/play.d.ts.map +1 -0
- package/dist/resolution/frameworks/play.js +111 -0
- package/dist/resolution/frameworks/play.js.map +1 -0
- package/dist/resolution/frameworks/python.d.ts +10 -0
- package/dist/resolution/frameworks/python.d.ts.map +1 -0
- package/dist/resolution/frameworks/python.js +400 -0
- package/dist/resolution/frameworks/python.js.map +1 -0
- package/dist/resolution/frameworks/react-native.d.ts +3 -0
- package/dist/resolution/frameworks/react-native.d.ts.map +1 -0
- package/dist/resolution/frameworks/react-native.js +410 -0
- package/dist/resolution/frameworks/react-native.js.map +1 -0
- package/dist/resolution/frameworks/react.d.ts +8 -0
- package/dist/resolution/frameworks/react.d.ts.map +1 -0
- package/dist/resolution/frameworks/react.js +334 -0
- package/dist/resolution/frameworks/react.js.map +1 -0
- package/dist/resolution/frameworks/ruby.d.ts +8 -0
- package/dist/resolution/frameworks/ruby.d.ts.map +1 -0
- package/dist/resolution/frameworks/ruby.js +302 -0
- package/dist/resolution/frameworks/ruby.js.map +1 -0
- package/dist/resolution/frameworks/rust.d.ts +8 -0
- package/dist/resolution/frameworks/rust.d.ts.map +1 -0
- package/dist/resolution/frameworks/rust.js +304 -0
- package/dist/resolution/frameworks/rust.js.map +1 -0
- package/dist/resolution/frameworks/svelte.d.ts +9 -0
- package/dist/resolution/frameworks/svelte.d.ts.map +1 -0
- package/dist/resolution/frameworks/svelte.js +253 -0
- package/dist/resolution/frameworks/svelte.js.map +1 -0
- package/dist/resolution/frameworks/swift-objc.d.ts +37 -0
- package/dist/resolution/frameworks/swift-objc.d.ts.map +1 -0
- package/dist/resolution/frameworks/swift-objc.js +252 -0
- package/dist/resolution/frameworks/swift-objc.js.map +1 -0
- package/dist/resolution/frameworks/swift.d.ts +10 -0
- package/dist/resolution/frameworks/swift.d.ts.map +1 -0
- package/dist/resolution/frameworks/swift.js +400 -0
- package/dist/resolution/frameworks/swift.js.map +1 -0
- package/dist/resolution/frameworks/terraform.d.ts +38 -0
- package/dist/resolution/frameworks/terraform.d.ts.map +1 -0
- package/dist/resolution/frameworks/terraform.js +277 -0
- package/dist/resolution/frameworks/terraform.js.map +1 -0
- package/dist/resolution/frameworks/vue.d.ts +9 -0
- package/dist/resolution/frameworks/vue.d.ts.map +1 -0
- package/dist/resolution/frameworks/vue.js +303 -0
- package/dist/resolution/frameworks/vue.js.map +1 -0
- package/dist/resolution/go-module.d.ts +26 -0
- package/dist/resolution/go-module.d.ts.map +1 -0
- package/dist/resolution/go-module.js +78 -0
- package/dist/resolution/go-module.js.map +1 -0
- package/dist/resolution/goframe-synthesizer.d.ts +29 -0
- package/dist/resolution/goframe-synthesizer.d.ts.map +1 -0
- package/dist/resolution/goframe-synthesizer.js +163 -0
- package/dist/resolution/goframe-synthesizer.js.map +1 -0
- package/dist/resolution/import-resolver.d.ts +84 -0
- package/dist/resolution/import-resolver.d.ts.map +1 -0
- package/dist/resolution/import-resolver.js +2134 -0
- package/dist/resolution/import-resolver.js.map +1 -0
- package/dist/resolution/index.d.ts +343 -0
- package/dist/resolution/index.d.ts.map +1 -0
- package/dist/resolution/index.js +2339 -0
- package/dist/resolution/index.js.map +1 -0
- package/dist/resolution/lru-cache.d.ts +24 -0
- package/dist/resolution/lru-cache.d.ts.map +1 -0
- package/dist/resolution/lru-cache.js +62 -0
- package/dist/resolution/lru-cache.js.map +1 -0
- package/dist/resolution/memory-budget.d.ts +48 -0
- package/dist/resolution/memory-budget.d.ts.map +1 -0
- package/dist/resolution/memory-budget.js +162 -0
- package/dist/resolution/memory-budget.js.map +1 -0
- package/dist/resolution/name-matcher.d.ts +123 -0
- package/dist/resolution/name-matcher.d.ts.map +1 -0
- package/dist/resolution/name-matcher.js +2134 -0
- package/dist/resolution/name-matcher.js.map +1 -0
- package/dist/resolution/path-aliases.d.ts +68 -0
- package/dist/resolution/path-aliases.d.ts.map +1 -0
- package/dist/resolution/path-aliases.js +238 -0
- package/dist/resolution/path-aliases.js.map +1 -0
- package/dist/resolution/resolver-pool.d.ts +106 -0
- package/dist/resolution/resolver-pool.d.ts.map +1 -0
- package/dist/resolution/resolver-pool.js +344 -0
- package/dist/resolution/resolver-pool.js.map +1 -0
- package/dist/resolution/resolver-worker.d.ts +17 -0
- package/dist/resolution/resolver-worker.d.ts.map +1 -0
- package/dist/resolution/resolver-worker.js +141 -0
- package/dist/resolution/resolver-worker.js.map +1 -0
- package/dist/resolution/strip-comments.d.ts +27 -0
- package/dist/resolution/strip-comments.d.ts.map +1 -0
- package/dist/resolution/strip-comments.js +492 -0
- package/dist/resolution/strip-comments.js.map +1 -0
- package/dist/resolution/swift-objc-bridge.d.ts +134 -0
- package/dist/resolution/swift-objc-bridge.d.ts.map +1 -0
- package/dist/resolution/swift-objc-bridge.js +256 -0
- package/dist/resolution/swift-objc-bridge.js.map +1 -0
- package/dist/resolution/types.d.ts +265 -0
- package/dist/resolution/types.d.ts.map +1 -0
- package/dist/resolution/types.js +8 -0
- package/dist/resolution/types.js.map +1 -0
- package/dist/resolution/workspace-packages.d.ts +58 -0
- package/dist/resolution/workspace-packages.d.ts.map +1 -0
- package/dist/resolution/workspace-packages.js +346 -0
- package/dist/resolution/workspace-packages.js.map +1 -0
- package/dist/search/identifier-segments.d.ts +60 -0
- package/dist/search/identifier-segments.d.ts.map +1 -0
- package/dist/search/identifier-segments.js +176 -0
- package/dist/search/identifier-segments.js.map +1 -0
- package/dist/search/query-parser.d.ts +57 -0
- package/dist/search/query-parser.d.ts.map +1 -0
- package/dist/search/query-parser.js +177 -0
- package/dist/search/query-parser.js.map +1 -0
- package/dist/search/query-utils.d.ts +87 -0
- package/dist/search/query-utils.d.ts.map +1 -0
- package/dist/search/query-utils.js +450 -0
- package/dist/search/query-utils.js.map +1 -0
- package/dist/sync/git-hooks.d.ts +45 -0
- package/dist/sync/git-hooks.d.ts.map +1 -0
- package/dist/sync/git-hooks.js +227 -0
- package/dist/sync/git-hooks.js.map +1 -0
- package/dist/sync/index.d.ts +19 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +35 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/watch-policy.d.ts +48 -0
- package/dist/sync/watch-policy.d.ts.map +1 -0
- package/dist/sync/watch-policy.js +124 -0
- package/dist/sync/watch-policy.js.map +1 -0
- package/dist/sync/watcher.d.ts +379 -0
- package/dist/sync/watcher.d.ts.map +1 -0
- package/dist/sync/watcher.js +921 -0
- package/dist/sync/watcher.js.map +1 -0
- package/dist/sync/worktree.d.ts +63 -0
- package/dist/sync/worktree.d.ts.map +1 -0
- package/dist/sync/worktree.js +182 -0
- package/dist/sync/worktree.js.map +1 -0
- package/dist/telemetry/index.d.ts +143 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +541 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/types.d.ts +465 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +117 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/color.d.ts +21 -0
- package/dist/ui/color.d.ts.map +1 -0
- package/dist/ui/color.js +42 -0
- package/dist/ui/color.js.map +1 -0
- package/dist/ui/glyphs.d.ts +67 -0
- package/dist/ui/glyphs.d.ts.map +1 -0
- package/dist/ui/glyphs.js +125 -0
- package/dist/ui/glyphs.js.map +1 -0
- package/dist/ui/shimmer-progress.d.ts +11 -0
- package/dist/ui/shimmer-progress.d.ts.map +1 -0
- package/dist/ui/shimmer-progress.js +164 -0
- package/dist/ui/shimmer-progress.js.map +1 -0
- package/dist/ui/shimmer-worker.d.ts +2 -0
- package/dist/ui/shimmer-worker.d.ts.map +1 -0
- package/dist/ui/shimmer-worker.js +126 -0
- package/dist/ui/shimmer-worker.js.map +1 -0
- package/dist/ui/types.d.ts +15 -0
- package/dist/ui/types.d.ts.map +1 -0
- package/dist/ui/types.js +3 -0
- package/dist/ui/types.js.map +1 -0
- package/dist/upgrade/index.d.ts +171 -0
- package/dist/upgrade/index.d.ts.map +1 -0
- package/dist/upgrade/index.js +659 -0
- package/dist/upgrade/index.js.map +1 -0
- package/dist/upgrade/remove-binary.d.ts +87 -0
- package/dist/upgrade/remove-binary.d.ts.map +1 -0
- package/dist/upgrade/remove-binary.js +289 -0
- package/dist/upgrade/remove-binary.js.map +1 -0
- package/dist/upgrade/update-check.d.ts +92 -0
- package/dist/upgrade/update-check.d.ts.map +1 -0
- package/dist/upgrade/update-check.js +258 -0
- package/dist/upgrade/update-check.js.map +1 -0
- package/dist/utils.d.ts +224 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +583 -0
- package/dist/utils.js.map +1 -0
- package/package.json +61 -0
- package/scripts/add-lang/bench.sh +60 -0
- package/scripts/add-lang/check-grammar.mjs +75 -0
- package/scripts/add-lang/dump-ast.mjs +103 -0
- package/scripts/add-lang/verify-extraction.mjs +70 -0
- package/scripts/agent-eval/ab-adoption.sh +91 -0
- package/scripts/agent-eval/ab-hook.sh +86 -0
- package/scripts/agent-eval/ab-impl.sh +78 -0
- package/scripts/agent-eval/ab-new-vs-baseline.sh +161 -0
- package/scripts/agent-eval/ab-sufficiency.sh +78 -0
- package/scripts/agent-eval/allocation-fixtures.json +344 -0
- package/scripts/agent-eval/arms-F.sh +21 -0
- package/scripts/agent-eval/arms-matrix.sh +37 -0
- package/scripts/agent-eval/audit.sh +68 -0
- package/scripts/agent-eval/bench-readme.sh +48 -0
- package/scripts/agent-eval/bench-why-repo.sh +22 -0
- package/scripts/agent-eval/block-read-hook.sh +19 -0
- package/scripts/agent-eval/compare-arms.mjs +209 -0
- package/scripts/agent-eval/diff-index-drift.mjs +102 -0
- package/scripts/agent-eval/hook-settings.json +15 -0
- package/scripts/agent-eval/itrun.sh +120 -0
- package/scripts/agent-eval/no-cli-shim.sh +96 -0
- package/scripts/agent-eval/offload-eval-3arm.sh +72 -0
- package/scripts/agent-eval/offload-eval-cost.mjs +133 -0
- package/scripts/agent-eval/offload-eval-effort.mjs +108 -0
- package/scripts/agent-eval/offload-eval-frontload-matrix.sh +25 -0
- package/scripts/agent-eval/offload-eval-frontload.sh +47 -0
- package/scripts/agent-eval/offload-eval-ground-truth.json +18 -0
- package/scripts/agent-eval/offload-eval-hook.mjs +84 -0
- package/scripts/agent-eval/offload-eval-judge.mjs +103 -0
- package/scripts/agent-eval/offload-eval-matrix.sh +20 -0
- package/scripts/agent-eval/offload-eval-metrics.mjs +94 -0
- package/scripts/agent-eval/offload-eval-refs1.sh +50 -0
- package/scripts/agent-eval/offload-eval-setup.sh +24 -0
- package/scripts/agent-eval/offload-eval-styles.sh +72 -0
- package/scripts/agent-eval/offload-eval-summarize.mjs +68 -0
- package/scripts/agent-eval/offload-eval.md +76 -0
- package/scripts/agent-eval/parse-arms.mjs +116 -0
- package/scripts/agent-eval/parse-bench-readme.mjs +238 -0
- package/scripts/agent-eval/parse-run.mjs +1401 -0
- package/scripts/agent-eval/parse-session.mjs +130 -0
- package/scripts/agent-eval/probe-allocation.mjs +335 -0
- package/scripts/agent-eval/probe-context.mjs +21 -0
- package/scripts/agent-eval/probe-decl-only.mjs +198 -0
- package/scripts/agent-eval/probe-explore.mjs +40 -0
- package/scripts/agent-eval/probe-factory-closure.mjs +147 -0
- package/scripts/agent-eval/probe-file-spend.mjs +195 -0
- package/scripts/agent-eval/probe-named-symbol.mjs +163 -0
- package/scripts/agent-eval/probe-node.mjs +20 -0
- package/scripts/agent-eval/probe-suite-envelope.mjs +124 -0
- package/scripts/agent-eval/probe-sweep.mjs +119 -0
- package/scripts/agent-eval/probe-trace.mjs +20 -0
- package/scripts/agent-eval/redirect-read-hook.sh +38 -0
- package/scripts/agent-eval/repro-concurrent-explore.mjs +119 -0
- package/scripts/agent-eval/repro-daemon-clients.mjs +125 -0
- package/scripts/agent-eval/run-agent.sh +34 -0
- package/scripts/agent-eval/run-all.sh +149 -0
- package/scripts/agent-eval/run-arms.sh +56 -0
- package/scripts/agent-eval/seq-matrix.mjs +137 -0
- package/scripts/build-bundle.sh +145 -0
- package/scripts/build-kernel.sh +87 -0
- package/scripts/dump-graph.mjs +57 -0
- package/scripts/extract-release-notes.mjs +130 -0
- package/scripts/kernel-parity.mjs +283 -0
- package/scripts/local-install.sh +41 -0
- package/scripts/npm-sdk.js +75 -0
- package/scripts/npm-shim.js +279 -0
- package/scripts/pack-npm.sh +123 -0
- package/scripts/prepare-release.mjs +270 -0
|
@@ -0,0 +1,862 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tool Definitions
|
|
3
|
+
*
|
|
4
|
+
* Defines the tools exposed by the CodeGraph MCP server.
|
|
5
|
+
*/
|
|
6
|
+
import type CodeGraph from '../index';
|
|
7
|
+
import type { QueryPool } from './query-pool';
|
|
8
|
+
export declare function __setLoadCodeGraphForTests(cls: typeof import('../index').default | null): void;
|
|
9
|
+
import type { PendingFile } from '../sync';
|
|
10
|
+
import { ExploreSessionState, type ExploreEmission } from './explore-session-state';
|
|
11
|
+
/**
|
|
12
|
+
* An expected, recoverable "codegraph can't serve this" condition — most
|
|
13
|
+
* importantly a project with no index. The dispatch catch converts these to
|
|
14
|
+
* SUCCESS-shaped responses (guidance text, NO isError): an `isError: true`
|
|
15
|
+
* early in a session teaches the agent the toolset is broken and it stops
|
|
16
|
+
* calling codegraph entirely (observed repeatedly), which is exactly wrong
|
|
17
|
+
* for conditions the agent can simply work around (use built-in tools for
|
|
18
|
+
* that codebase / pass projectPath). isError is reserved for "stop trying"
|
|
19
|
+
* cases: security refusals ({@link PathRefusalError}) and genuine
|
|
20
|
+
* malfunctions.
|
|
21
|
+
*/
|
|
22
|
+
export declare class NotIndexedError extends Error {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A security refusal (sensitive system path). Stays `isError: true` WITHOUT
|
|
26
|
+
* retry guidance — abandoning this path is the desired agent reaction.
|
|
27
|
+
*/
|
|
28
|
+
export declare class PathRefusalError extends Error {
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Normalize Erlang-native symbol spellings in an explore query into the shapes
|
|
32
|
+
* the rest of the pipeline already understands. Agents working Erlang code
|
|
33
|
+
* name symbols the way the language spells them — `mod:fn/3`, `init/2` — and
|
|
34
|
+
* those tokens previously died in both consumers: the flow-builder's token
|
|
35
|
+
* filter rejects `:` and `/arity` outright, and the search-side field parser
|
|
36
|
+
* eats `mod:fn` as an unknown `field:value`. Measured on cowboy: the agent
|
|
37
|
+
* named `cowboy_stream_h:request_process/3` in two queries, got no body back
|
|
38
|
+
* either time, and fell back to Read.
|
|
39
|
+
*
|
|
40
|
+
* - `fn/3` → `fn` (arity tail after an identifier; a path segment like
|
|
41
|
+
* `src/2fa` doesn't match because the tail must be all digits)
|
|
42
|
+
* - `mod:fn` → `mod.fn` (exactly one colon between identifiers, so it rides
|
|
43
|
+
* the existing Class.method qualified handling; `::`, URLs, drive letters,
|
|
44
|
+
* and times don't match, and the query language's own field prefixes —
|
|
45
|
+
* kind:/lang:/language:/path:/name: — are left alone)
|
|
46
|
+
*
|
|
47
|
+
* Safe cross-language: Lua's `t:m` spelling maps to the same `t.m` its
|
|
48
|
+
* qualified names use, and no other supported spelling contains a bare
|
|
49
|
+
* single-colon identifier pair.
|
|
50
|
+
*/
|
|
51
|
+
export declare function normalizeQuerySpelling(query: string): string;
|
|
52
|
+
/**
|
|
53
|
+
* Calculate the recommended number of codegraph_explore calls based on project size.
|
|
54
|
+
* Larger codebases need more exploration calls to cover their surface area,
|
|
55
|
+
* but smaller ones should use fewer to avoid unnecessary overhead.
|
|
56
|
+
*/
|
|
57
|
+
export declare function getExploreBudget(fileCount: number): number;
|
|
58
|
+
/**
|
|
59
|
+
* Adaptive output budget for `codegraph_explore`, scaled to project size.
|
|
60
|
+
*
|
|
61
|
+
* Smaller codebases get a tighter total cap, fewer default files, smaller
|
|
62
|
+
* per-file cap, and tighter clustering — so a focused query on a 100-file
|
|
63
|
+
* project doesn't dump a whole file's worth of source into the agent's
|
|
64
|
+
* context. Larger codebases keep the generous defaults because the
|
|
65
|
+
* agent's native discovery cost (grep + find + many Reads) genuinely
|
|
66
|
+
* dwarfs a fat explore call at that scale.
|
|
67
|
+
*
|
|
68
|
+
* Meta-text (relationships map, "additional relevant files" list,
|
|
69
|
+
* completeness signal, budget note) is gated off for tiny projects
|
|
70
|
+
* where one rich call is the whole story and the extra prose is just
|
|
71
|
+
* overhead.
|
|
72
|
+
*
|
|
73
|
+
* Tier breakpoints mirror `getExploreBudget` so a project sits in the
|
|
74
|
+
* same tier across both knobs.
|
|
75
|
+
*/
|
|
76
|
+
export interface ExploreOutputBudget {
|
|
77
|
+
/** Hard cap on total output characters. */
|
|
78
|
+
maxOutputChars: number;
|
|
79
|
+
/** Default `maxFiles` when the caller didn't specify one. */
|
|
80
|
+
defaultMaxFiles: number;
|
|
81
|
+
/** Cap on contiguous source returned per file (across all its clusters). */
|
|
82
|
+
maxCharsPerFile: number;
|
|
83
|
+
/** Cluster gap threshold in lines — tighter clustering on small projects. */
|
|
84
|
+
gapThreshold: number;
|
|
85
|
+
/** Max symbols listed in the per-file header (``**`path`** — sym(kind), ...``). */
|
|
86
|
+
maxSymbolsInFileHeader: number;
|
|
87
|
+
/** Max edges shown per relationship kind in the Relationships section. */
|
|
88
|
+
maxEdgesPerRelationshipKind: number;
|
|
89
|
+
/** Include the "Relationships" section. */
|
|
90
|
+
includeRelationships: boolean;
|
|
91
|
+
/** Include the "Additional relevant files (not shown)" trailing list. */
|
|
92
|
+
includeAdditionalFiles: boolean;
|
|
93
|
+
/** Include the "Complete source code is included above…" reminder. */
|
|
94
|
+
includeCompletenessSignal: boolean;
|
|
95
|
+
/** Include the explore-budget reminder at the end. */
|
|
96
|
+
includeBudgetNote: boolean;
|
|
97
|
+
}
|
|
98
|
+
export declare function getExploreOutputBudget(fileCount: number): ExploreOutputBudget;
|
|
99
|
+
/**
|
|
100
|
+
* How strongly a match on a symbol of this kind corroborates that its FILE is
|
|
101
|
+
* what the query is about.
|
|
102
|
+
*
|
|
103
|
+
* 1.0 a callable or a type — the unit an architecture question is about
|
|
104
|
+
* ~0.5 a member of a type, or the file node itself (a path match, not a
|
|
105
|
+
* symbol match)
|
|
106
|
+
* ~0.3 a variable / constant — as often a name collision as a definition
|
|
107
|
+
* 0.15 a parameter — essentially never the subject of a question
|
|
108
|
+
*
|
|
109
|
+
* Unlisted kinds fall back to `DEFAULT_RELEVANCE_KIND_WEIGHT`, so a NodeKind
|
|
110
|
+
* added later is neither free nor fatal.
|
|
111
|
+
*/
|
|
112
|
+
export declare const RELEVANCE_KIND_WEIGHT: Readonly<Record<string, number>>;
|
|
113
|
+
export declare const EXPLORE_ALLOCATION: {
|
|
114
|
+
/**
|
|
115
|
+
* A file whose weight is under this fraction of the top file's gets no source.
|
|
116
|
+
*
|
|
117
|
+
* Calibrated between the two shapes the fixtures pin: the #1500 generated CRUD
|
|
118
|
+
* lands at 10–11% of the top weight (penalised twice — once into the score by
|
|
119
|
+
* `rankPenalty`, once again here) and must cliff; a genuinely peripheral but
|
|
120
|
+
* hand-written flow file — `payslip_builder.go`, the direct callee of the
|
|
121
|
+
* workflow entry — lands at 25% and must NOT. Everything in between is a
|
|
122
|
+
* judgement call the agent can undo for ~0 cost, because a cliffed file is
|
|
123
|
+
* still NAMED in the response and one follow-up explore fetches it.
|
|
124
|
+
*/
|
|
125
|
+
readonly CLIFF_FRACTION: 0.15;
|
|
126
|
+
/**
|
|
127
|
+
* Ceiling on the cliff, in the same units as `SCORE_FLOOR_MAX` — and for the
|
|
128
|
+
* same reason. A file whose weight clears a full-strength direct match is never
|
|
129
|
+
* incidental, so no amount of concentration elsewhere may zero it: one
|
|
130
|
+
* overwhelming top file (a 99-scoring god-file among score-10 peers) otherwise
|
|
131
|
+
* puts the cliff at 14.9 and silences every peer the score floor had just
|
|
132
|
+
* deliberately admitted. The cliff is a RELATIVE prune of weak evidence, not a
|
|
133
|
+
* second admission gate — the score floor already owns admission.
|
|
134
|
+
*/
|
|
135
|
+
readonly CLIFF_MAX: 10;
|
|
136
|
+
/**
|
|
137
|
+
* Floor on a useful reservation — every admitted file gets this much before
|
|
138
|
+
* the proportional split divides the rest. Under it a slice can't hold one
|
|
139
|
+
* complete method, and a fragment is strictly worse than a pointer: it forces
|
|
140
|
+
* the Read this tool exists to prevent.
|
|
141
|
+
*
|
|
142
|
+
* It is a FLOOR, not a second cliff. Cliffing the starved file instead
|
|
143
|
+
* cascades: removing the smallest raises everyone else's share by so little
|
|
144
|
+
* that the next-smallest starves too, and a query with two dominant files ate
|
|
145
|
+
* six legitimately-ranked peers one at a time. Concentration is the relative
|
|
146
|
+
* cliff's job; this only keeps a served file's slice usable.
|
|
147
|
+
*/
|
|
148
|
+
readonly MIN_CHARS: 700;
|
|
149
|
+
/**
|
|
150
|
+
* Safety valve, as a fraction of the envelope. Not the primary guard any more —
|
|
151
|
+
* the proportional split is — so this only has to stop a pathological
|
|
152
|
+
* single-file response.
|
|
153
|
+
*/
|
|
154
|
+
readonly MAX_SHARE: 0.7;
|
|
155
|
+
/**
|
|
156
|
+
* Markdown overhead charged per rendered file (header + fences + blank lines),
|
|
157
|
+
* matching the render loop's own `+ 200` accounting. Held out of the pool
|
|
158
|
+
* before the split so the reservations plus their overhead fit the envelope —
|
|
159
|
+
* without this the last file's reservation is always the one that doesn't fit.
|
|
160
|
+
*/
|
|
161
|
+
readonly FILE_OVERHEAD: 200;
|
|
162
|
+
/**
|
|
163
|
+
* Flow-spine files are weighted up and are exempt from the cliff. Clipping the
|
|
164
|
+
* spine causes the Read fallback (it IS the answer to a flow question);
|
|
165
|
+
* clipping a peripheral file does not. This makes the existing advisory spine
|
|
166
|
+
* handling — `hasSpine`, `SPINE_CEILING` — strict at the allocation layer.
|
|
167
|
+
*/
|
|
168
|
+
readonly SPINE_WEIGHT_BOOST: 2;
|
|
169
|
+
/**
|
|
170
|
+
* Slack allowed on the whole-file rule: a file a little over its reservation
|
|
171
|
+
* still ships WHOLE rather than as clusters, because slicing off that last
|
|
172
|
+
* sliver saves ~1% of the envelope and costs a Read — the trade the whole-file
|
|
173
|
+
* rule exists to refuse. Proportional (with an absolute ceiling) because a
|
|
174
|
+
* "sliver" is relative: a flat 800 is 15% of a 5K reservation but 31% of a 2.5K
|
|
175
|
+
* one, and at the small end that overshoot is exactly what the file below then
|
|
176
|
+
* loses.
|
|
177
|
+
*/
|
|
178
|
+
readonly WHOLE_FILE_GRACE_FRACTION: 0.15;
|
|
179
|
+
readonly WHOLE_FILE_GRACE_MAX: 800;
|
|
180
|
+
/**
|
|
181
|
+
* A reservation that already covers this fraction of a file BUYS THE WHOLE
|
|
182
|
+
* FILE (CG-21), even though the file is bigger than the reservation.
|
|
183
|
+
*
|
|
184
|
+
* The grace above is calibrated as a *sliver* — it only rescues a file that
|
|
185
|
+
* essentially fits. Below it there is a hole the render loop cannot fill:
|
|
186
|
+
* express's `lib/utils.js` (5,293 B) was the TOP-ranked file, reserved 3,870,
|
|
187
|
+
* declined the whole-file render at a 4,450 grace bound, and then spent 583 on
|
|
188
|
+
* a three-symbol cluster render. The other 3,287 chars of its reservation were
|
|
189
|
+
* neither redistributed nor delivered — the envelope shrank by a third against
|
|
190
|
+
* an unchanged budget and the agent Read the file back four times.
|
|
191
|
+
*
|
|
192
|
+
* So the rule is not "does the file fit the reservation" but "has the
|
|
193
|
+
* reservation already bought most of the file": at 0.6 the loop pays at most
|
|
194
|
+
* two-thirds of a reservation extra to avoid losing the whole thing, and it
|
|
195
|
+
* spends bytes it was going to spend anyway on a file that already earned
|
|
196
|
+
* them. Below the fraction the shortfall is real — the file is several times
|
|
197
|
+
* its reservation, clustering is the right answer, and the carry-forward
|
|
198
|
+
* (`reservedSoFar`/`sourceSpent` in the render loop) hands whatever it cannot
|
|
199
|
+
* spend to the next file down.
|
|
200
|
+
*/
|
|
201
|
+
readonly WHOLE_FILE_BUY_FRACTION: 0.6;
|
|
202
|
+
/**
|
|
203
|
+
* The buy rule's overshoot is funded from ONE pool for the whole response,
|
|
204
|
+
* sized as this fraction of the envelope — deliberately the same 15% as
|
|
205
|
+
* `WHOLE_FILE_GRACE_FRACTION`, one level up: the grace is a sliver of a
|
|
206
|
+
* FILE's reservation, this is a sliver of the RESPONSE's envelope.
|
|
207
|
+
*
|
|
208
|
+
* Per-file funding is the version that fails, and it fails the same way the
|
|
209
|
+
* bug being fixed does. The merit test is a RATIO, so wherever several files
|
|
210
|
+
* sit near it they all qualify, and N independent overshoots inflate the
|
|
211
|
+
* response until the render ceiling drops whatever is last. Measured on the
|
|
212
|
+
* #1500 payroll fixture: three files bought whole and `payslip_builder.go` —
|
|
213
|
+
* the file that computes the payslip the question asks about, rank #6 — was
|
|
214
|
+
* dropped entirely so three higher-ranked files could each ship their final
|
|
215
|
+
* sliver. A dropped section is strictly worse than a clustered one, so one
|
|
216
|
+
* shared pool, spent in rank order, is the bound that matters.
|
|
217
|
+
*/
|
|
218
|
+
readonly WHOLE_FILE_BUY_OVERSHOOT_FRACTION: 0.15;
|
|
219
|
+
};
|
|
220
|
+
/** One candidate file's allocation inputs, in final rank order. */
|
|
221
|
+
export interface ExploreAllocationCandidate {
|
|
222
|
+
path: string;
|
|
223
|
+
/** Post-`rankPenalty` relevance score from the ranking pass. */
|
|
224
|
+
score: number;
|
|
225
|
+
/**
|
|
226
|
+
* How much this file's BYTES are worth, independent of how well it matched.
|
|
227
|
+
* Ranking answers "is this file about the query"; allocation answers "will
|
|
228
|
+
* these bytes teach the agent anything". Generated CRUD can legitimately rank
|
|
229
|
+
* (it name-collides on every domain word) while its bytes stay mechanical
|
|
230
|
+
* boilerplate the agent gains nothing from reading — so `rankPenalty` is
|
|
231
|
+
* applied a SECOND time here. That is what finally sinks the #1500 generated
|
|
232
|
+
* layer below the cliff: it survived CG-10's single penalty because the sort's
|
|
233
|
+
* leading keys (entry-point, graph mass) are structural, and a big densely
|
|
234
|
+
* self-referential generated file scores well on both.
|
|
235
|
+
*/
|
|
236
|
+
worth: number;
|
|
237
|
+
/** Carries a symbol on the rendered flow spine. */
|
|
238
|
+
spine: boolean;
|
|
239
|
+
}
|
|
240
|
+
export interface ExploreAllocation {
|
|
241
|
+
/** path → chars of source it may render. Only holds admitted files. */
|
|
242
|
+
allowances: Map<string, number>;
|
|
243
|
+
/** Files the cliff zeroed, in rank order — pointers, not bytes. */
|
|
244
|
+
cliffed: string[];
|
|
245
|
+
/** The weight threshold the cliff fired at (0 when nothing was cliffed). */
|
|
246
|
+
cliffAt: number;
|
|
247
|
+
/** Chars actually split among the admitted files. */
|
|
248
|
+
pool: number;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Split `budget.maxOutputChars` across ranked candidates in proportion to
|
|
252
|
+
* relevance, with a hard relative cliff.
|
|
253
|
+
*
|
|
254
|
+
* `candidates` must arrive in FINAL RANK ORDER — `maxFiles` is applied to the
|
|
255
|
+
* survivors of the cliff, in that order, so cliffing genuinely hands a slot to
|
|
256
|
+
* the next file down rather than leaving it unused.
|
|
257
|
+
*
|
|
258
|
+
* Tier invariant (`getExploreOutputBudget`): a larger tier must never allow less
|
|
259
|
+
* per file than a smaller one. It holds here by construction — every bound is a
|
|
260
|
+
* fraction of `maxOutputChars` or of `maxCharsPerFile`, both monotonic across
|
|
261
|
+
* tiers — except `MIN_CHARS`, which is an absolute floor and so identical at
|
|
262
|
+
* every tier.
|
|
263
|
+
*/
|
|
264
|
+
export declare function allocateExploreBudget(candidates: readonly ExploreAllocationCandidate[], budget: ExploreOutputBudget, maxFiles: number): ExploreAllocation;
|
|
265
|
+
/**
|
|
266
|
+
* Per-file staleness banner emitted at the top of a tool response when the
|
|
267
|
+
* file watcher has pending events for files referenced by the response.
|
|
268
|
+
* The agent uses this to fall back to Read for those specific files
|
|
269
|
+
* without waiting for the debounced sync (issue #403).
|
|
270
|
+
*/
|
|
271
|
+
export declare function formatStaleBanner(stale: PendingFile[]): string;
|
|
272
|
+
/**
|
|
273
|
+
* Compact footer listing pending files that are NOT referenced in this
|
|
274
|
+
* response. Gives the agent a complete project-wide freshness picture
|
|
275
|
+
* without bloating the main banner.
|
|
276
|
+
*/
|
|
277
|
+
export declare function formatStaleFooter(stale: PendingFile[]): string;
|
|
278
|
+
/**
|
|
279
|
+
* Whole-index degradation banner (issue #876). Emitted at the top of a read
|
|
280
|
+
* tool response when live watching has permanently stopped — at which point
|
|
281
|
+
* `getPendingFiles()` is empty, so the per-file banner above can't fire even
|
|
282
|
+
* though the index is now FROZEN and silently drifting stale. Leads with the
|
|
283
|
+
* agent-actionable instruction (Read directly) and carries the reason, which
|
|
284
|
+
* already names the operator remedy (`codegraph sync` / git hooks).
|
|
285
|
+
*/
|
|
286
|
+
export declare function formatDegradedBanner(reason: string | null): string;
|
|
287
|
+
/**
|
|
288
|
+
* MCP Tool definition
|
|
289
|
+
*/
|
|
290
|
+
export interface ToolDefinition {
|
|
291
|
+
name: string;
|
|
292
|
+
description: string;
|
|
293
|
+
inputSchema: {
|
|
294
|
+
type: 'object';
|
|
295
|
+
properties: Record<string, PropertySchema>;
|
|
296
|
+
required?: string[];
|
|
297
|
+
};
|
|
298
|
+
/** Behavioral hints for clients (see {@link ToolAnnotations}). */
|
|
299
|
+
annotations?: ToolAnnotations;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* MCP ToolAnnotations — behavioral hints a client MAY use to decide how, or
|
|
303
|
+
* whether, to run a tool (introduced in the 2025-03-26 spec, carried in
|
|
304
|
+
* 2025-06-18). They are advisory and never to be trusted for security, but
|
|
305
|
+
* clients gate on them: Cursor's Ask mode, for one, refuses any MCP tool that
|
|
306
|
+
* doesn't advertise `readOnlyHint: true` (issue #1018).
|
|
307
|
+
*
|
|
308
|
+
* The field is purely additive — a client that predates annotations ignores it
|
|
309
|
+
* — so codegraph advertises these even though `initialize` still negotiates the
|
|
310
|
+
* 2024-11-05 protocol version.
|
|
311
|
+
*
|
|
312
|
+
* https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations
|
|
313
|
+
*/
|
|
314
|
+
export interface ToolAnnotations {
|
|
315
|
+
/** Human-readable title for the tool. */
|
|
316
|
+
title?: string;
|
|
317
|
+
/** If true, the tool does not modify its environment. Default (unset): false. */
|
|
318
|
+
readOnlyHint?: boolean;
|
|
319
|
+
/** Meaningful only when NOT read-only: may the tool perform destructive updates? */
|
|
320
|
+
destructiveHint?: boolean;
|
|
321
|
+
/** If true, repeat calls with the same arguments have no additional effect. */
|
|
322
|
+
idempotentHint?: boolean;
|
|
323
|
+
/** If true, the tool interacts with an open world of external entities. */
|
|
324
|
+
openWorldHint?: boolean;
|
|
325
|
+
}
|
|
326
|
+
interface PropertySchema {
|
|
327
|
+
type: string;
|
|
328
|
+
description: string;
|
|
329
|
+
enum?: string[];
|
|
330
|
+
default?: unknown;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Tool execution result
|
|
334
|
+
*/
|
|
335
|
+
export interface ToolResult {
|
|
336
|
+
content: Array<{
|
|
337
|
+
type: 'text';
|
|
338
|
+
text: string;
|
|
339
|
+
}>;
|
|
340
|
+
isError?: boolean;
|
|
341
|
+
/**
|
|
342
|
+
* INTERNAL side-channel (CG-17): what a `codegraph_explore` call actually put
|
|
343
|
+
* on the wire — files, line ranges, bytes. It rides the result because the
|
|
344
|
+
* call may have run on a query-pool worker, while the session state it feeds
|
|
345
|
+
* lives on the main thread. {@link ToolHandler.execute} records it and DELETES
|
|
346
|
+
* it, so nothing here ever reaches the client. Keyed by
|
|
347
|
+
* {@link EXPLORE_EMISSION_KEY}; the two must stay in sync.
|
|
348
|
+
*/
|
|
349
|
+
_cgExploreEmission?: ExploreEmission;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* All CodeGraph MCP tools
|
|
353
|
+
*
|
|
354
|
+
* Designed for minimal context usage - use codegraph_explore as the primary tool
|
|
355
|
+
* (one call usually answers the whole question), and only use other tools for
|
|
356
|
+
* targeted follow-up queries.
|
|
357
|
+
*
|
|
358
|
+
* All tools support cross-project queries via the optional `projectPath` parameter.
|
|
359
|
+
*/
|
|
360
|
+
export declare const tools: ToolDefinition[];
|
|
361
|
+
/**
|
|
362
|
+
* Allowlist-filtered tool definitions WITHOUT an engine — the static surface the
|
|
363
|
+
* proxy answers `tools/list` with before any project is open. Mirrors
|
|
364
|
+
* `ToolHandler.getTools()` in the no-CodeGraph case (the dynamic per-repo budget
|
|
365
|
+
* note in a description only adds once `cg` is loaded; the schemas are static).
|
|
366
|
+
*/
|
|
367
|
+
export declare function getStaticTools(): ToolDefinition[];
|
|
368
|
+
/**
|
|
369
|
+
* Tool handler that executes tools against a CodeGraph instance
|
|
370
|
+
*
|
|
371
|
+
* Supports cross-project queries via the projectPath parameter.
|
|
372
|
+
* Other projects are opened on-demand and cached for performance.
|
|
373
|
+
*/
|
|
374
|
+
export declare class ToolHandler {
|
|
375
|
+
private cg;
|
|
376
|
+
private projectCache;
|
|
377
|
+
private defaultProjectHint;
|
|
378
|
+
private worktreeMismatchCache;
|
|
379
|
+
private catchUpGate;
|
|
380
|
+
private queryPool;
|
|
381
|
+
constructor(cg: CodeGraph | null);
|
|
382
|
+
/**
|
|
383
|
+
* Engine-only: attach (or detach with null) the worker-thread query pool. The
|
|
384
|
+
* shared daemon sets this once its default project is open; the workers each
|
|
385
|
+
* hold their own WAL read connection and run {@link executeReadTool}. A
|
|
386
|
+
* worker's own ToolHandler never has a pool, so there is no nested off-loading.
|
|
387
|
+
*/
|
|
388
|
+
setQueryPool(pool: QueryPool | null): void;
|
|
389
|
+
/**
|
|
390
|
+
* Update the default CodeGraph instance (e.g. after lazy initialization)
|
|
391
|
+
*/
|
|
392
|
+
setDefaultCodeGraph(cg: CodeGraph): void;
|
|
393
|
+
/**
|
|
394
|
+
* Engine-only: register the catch-up sync promise so the next `execute()`
|
|
395
|
+
* call awaits it before serving. The handler swallows rejections (the
|
|
396
|
+
* engine logs them) so a sync failure never propagates as a tool error;
|
|
397
|
+
* we still want to serve a best-effort result over the same potentially-
|
|
398
|
+
* stale data, which is what would have happened without the gate.
|
|
399
|
+
*/
|
|
400
|
+
setCatchUpGate(p: Promise<void> | null): void;
|
|
401
|
+
/**
|
|
402
|
+
* Await the catch-up gate, but no longer than the configured timeout (#905).
|
|
403
|
+
* If the reconcile settles first, we got the fully-reconciled answer. If the
|
|
404
|
+
* timeout wins, we serve the call now and let the reconcile finish in the
|
|
405
|
+
* background — it yields to the event loop (see SYNC_RECONCILE_YIELD_INTERVAL),
|
|
406
|
+
* so a concurrent read still runs against the same connection. Never throws:
|
|
407
|
+
* a failed reconcile is logged by the engine, and we serve best-effort over
|
|
408
|
+
* the same potentially-stale data the un-gated path would have.
|
|
409
|
+
*/
|
|
410
|
+
private awaitCatchUpGate;
|
|
411
|
+
/**
|
|
412
|
+
* Record the directory the server tried to resolve the default project from.
|
|
413
|
+
* Used only to make the "no default project" error actionable.
|
|
414
|
+
*/
|
|
415
|
+
setDefaultProjectHint(searchedPath: string): void;
|
|
416
|
+
/**
|
|
417
|
+
* Whether a default CodeGraph instance is available
|
|
418
|
+
*/
|
|
419
|
+
hasDefaultCodeGraph(): boolean;
|
|
420
|
+
/**
|
|
421
|
+
* Optional allowlist of exposed tools, parsed from the CODEGRAPH_MCP_TOOLS
|
|
422
|
+
* env var (comma-separated short names, e.g. "trace,search,node,context").
|
|
423
|
+
* Unset/empty → every tool is exposed. Lets an operator (or an A/B harness)
|
|
424
|
+
* trim the tool surface without rebuilding the client config; the ablated
|
|
425
|
+
* tool is then truly absent from ListTools rather than merely denied on call.
|
|
426
|
+
* Matching is on the short form, so "node" and "codegraph_node" both work.
|
|
427
|
+
*/
|
|
428
|
+
private toolAllowlist;
|
|
429
|
+
/** Whether a tool name passes the CODEGRAPH_MCP_TOOLS allowlist (if any). */
|
|
430
|
+
private isToolAllowed;
|
|
431
|
+
/**
|
|
432
|
+
* Get tool definitions with dynamic descriptions based on project size.
|
|
433
|
+
* The codegraph_explore tool description includes a budget recommendation
|
|
434
|
+
* scaled to the number of indexed files. Honors the CODEGRAPH_MCP_TOOLS
|
|
435
|
+
* allowlist so a trimmed surface is reflected in ListTools.
|
|
436
|
+
*/
|
|
437
|
+
getTools(): ToolDefinition[];
|
|
438
|
+
/**
|
|
439
|
+
* Get CodeGraph instance for a project
|
|
440
|
+
*
|
|
441
|
+
* If projectPath is provided, opens that project's CodeGraph (cached).
|
|
442
|
+
* Otherwise returns the default CodeGraph instance.
|
|
443
|
+
*
|
|
444
|
+
* Walks up parent directories to find the nearest .codegraph/ folder,
|
|
445
|
+
* similar to how git finds .git/ directories.
|
|
446
|
+
*/
|
|
447
|
+
private getCodeGraph;
|
|
448
|
+
/**
|
|
449
|
+
* Heal a long-lived connection whose `.codegraph/` was removed and recreated
|
|
450
|
+
* at the same path (a worktree recreated, or `rm -rf .codegraph` + re-init)
|
|
451
|
+
* before handing it to a tool. Otherwise the daemon keeps serving the
|
|
452
|
+
* pre-removal snapshot from its now-unlinked file handle until restart — and
|
|
453
|
+
* because the daemon registry is keyed by path, a same-path recreate routes
|
|
454
|
+
* new clients straight back to this same stale daemon (#925). The check is one
|
|
455
|
+
* stat() and a no-op unless the inode actually changed; it never throws into a
|
|
456
|
+
* tool call.
|
|
457
|
+
*/
|
|
458
|
+
private freshen;
|
|
459
|
+
/**
|
|
460
|
+
* Close all cached project connections
|
|
461
|
+
*/
|
|
462
|
+
closeAll(): void;
|
|
463
|
+
/**
|
|
464
|
+
* Validate that a value is a non-empty string within length bounds.
|
|
465
|
+
*
|
|
466
|
+
* The `maxLength` cap protects against MCP clients that ship huge
|
|
467
|
+
* payloads (10MB+ query strings either by accident or maliciously).
|
|
468
|
+
* Without this, a single oversized input can pin the FTS5 index or
|
|
469
|
+
* exhaust memory before any real work runs.
|
|
470
|
+
*/
|
|
471
|
+
private validateString;
|
|
472
|
+
/**
|
|
473
|
+
* Validate an optional path-like string input. Returns the value if
|
|
474
|
+
* valid (or undefined), or a ToolResult with the error.
|
|
475
|
+
*/
|
|
476
|
+
private validateOptionalPath;
|
|
477
|
+
/**
|
|
478
|
+
* Cached git worktree/index mismatch for a tool call's effective project.
|
|
479
|
+
*
|
|
480
|
+
* The "effective project" is what the request targets: an explicit
|
|
481
|
+
* `projectPath` arg, else the directory the server resolved its default
|
|
482
|
+
* project from (`defaultProjectHint`), else cwd. Memoized per start path —
|
|
483
|
+
* see `worktreeMismatchCache`. Best-effort: if the project can't be resolved
|
|
484
|
+
* (e.g. nothing initialized yet), it reports "no mismatch" so a tool is never
|
|
485
|
+
* broken by this check.
|
|
486
|
+
*/
|
|
487
|
+
private worktreeMismatchFor;
|
|
488
|
+
/**
|
|
489
|
+
* Prefix a successful read-tool result with a compact worktree-mismatch
|
|
490
|
+
* notice when the resolved index belongs to a different git working tree than
|
|
491
|
+
* the caller's (issue #155). Without this, an agent in a nested worktree
|
|
492
|
+
* silently trusts main-branch results. No-op on error results and when there
|
|
493
|
+
* is no mismatch. `codegraph_status` is excluded — it embeds its own verbose
|
|
494
|
+
* warning — so it stays out of this path.
|
|
495
|
+
*/
|
|
496
|
+
private withWorktreeNotice;
|
|
497
|
+
/**
|
|
498
|
+
* Annotate a successful read-tool result with per-file staleness — the
|
|
499
|
+
* non-blocking answer to issue #403. The file watcher tracks every event
|
|
500
|
+
* it sees per path; here we intersect "files referenced in this response"
|
|
501
|
+
* against that pending set and prepend a compact banner so the agent can
|
|
502
|
+
* fall back to Read for those *specific* files without waiting for the
|
|
503
|
+
* debounced sync to fire. Other pending files in the project (not
|
|
504
|
+
* referenced by this response) get a small footer so the agent has a
|
|
505
|
+
* complete picture without bloating the banner.
|
|
506
|
+
*
|
|
507
|
+
* Cost when nothing is pending — the common case — is one boolean check.
|
|
508
|
+
* No I/O, no parsing of markdown beyond a per-pending-file substring scan.
|
|
509
|
+
*/
|
|
510
|
+
private driftCache;
|
|
511
|
+
private static readonly DRIFT_TTL_MS;
|
|
512
|
+
/**
|
|
513
|
+
* On-disk drift check for a single indexed file (issue #1474). The code
|
|
514
|
+
* renderers slice CURRENT bytes at INDEXED line ranges; when the file
|
|
515
|
+
* changed after its last index sync those ranges can point at a DIFFERENT
|
|
516
|
+
* symbol's code — served under the requested name with `isError: false`.
|
|
517
|
+
* The watcher-based pending/degraded banners can't cover this for a
|
|
518
|
+
* project reached via `projectPath` (cross-project instances have no
|
|
519
|
+
* watcher, by construction), so freshness is verified here, at the point
|
|
520
|
+
* of emission, from data the index already stores.
|
|
521
|
+
*
|
|
522
|
+
* Cheap and precise: one stat() per file (size + mtime, the same
|
|
523
|
+
* comparison the sync fast path uses); only on a stat mismatch is the
|
|
524
|
+
* content hashed (sha256, matching extraction's `hashContent`) so a
|
|
525
|
+
* touch/checkout that rewrote identical bytes never false-positives.
|
|
526
|
+
* Results are memoized briefly so one response rendering the same file in
|
|
527
|
+
* several sections pays for the check once.
|
|
528
|
+
*
|
|
529
|
+
* Returns true when the on-disk file differs from what was indexed —
|
|
530
|
+
* i.e. indexed line ranges for it are NOT trustworthy. Any failure
|
|
531
|
+
* (missing files-table row, stat/read error) reports false: those cases
|
|
532
|
+
* are handled by the existing not-found paths, and a wrong "stale" flag
|
|
533
|
+
* would needlessly push the agent back to Read.
|
|
534
|
+
*/
|
|
535
|
+
private isFileStaleOnDisk;
|
|
536
|
+
private withStalenessNotice;
|
|
537
|
+
/**
|
|
538
|
+
* Execute a tool by name.
|
|
539
|
+
*
|
|
540
|
+
* `sessionState` is the CALLER's per-session explore history (CG-17). The
|
|
541
|
+
* daemon shares one ToolHandler across every connected session, so this state
|
|
542
|
+
* cannot live on the handler — each session owns one and hands it in, which is
|
|
543
|
+
* what keeps two sessions on one daemon from ever seeing each other's calls.
|
|
544
|
+
* Omit it (the CLI does) and explore behaves exactly as before, untracked.
|
|
545
|
+
*/
|
|
546
|
+
execute(toolName: string, args: Record<string, unknown>, sessionState?: ExploreSessionState): Promise<ToolResult>;
|
|
547
|
+
/**
|
|
548
|
+
* Attach the caller's session view to an explore call's args (CG-17), on a
|
|
549
|
+
* COPY so the caller's object is never mutated. Nothing else sees it: a
|
|
550
|
+
* non-explore tool, or a caller with no session state, gets the args
|
|
551
|
+
* unchanged and pays nothing.
|
|
552
|
+
*
|
|
553
|
+
* A client that spells the internal key itself is stripped rather than
|
|
554
|
+
* trusted — the view decides what source a later call may withhold, so it has
|
|
555
|
+
* to come from the server's own record, never from the wire.
|
|
556
|
+
*/
|
|
557
|
+
private withSessionView;
|
|
558
|
+
/**
|
|
559
|
+
* Record an explore call's emission into the caller's session state and strip
|
|
560
|
+
* it from the result (CG-17).
|
|
561
|
+
*
|
|
562
|
+
* Unconditional strip: the property is internal, so it comes off even when
|
|
563
|
+
* there is no session state to record it into (the CLI path) — that is what
|
|
564
|
+
* keeps the agent-facing response byte-identical. Recording is wrapped
|
|
565
|
+
* because a bookkeeping bug must never fail a tool call that already
|
|
566
|
+
* succeeded.
|
|
567
|
+
*/
|
|
568
|
+
private takeExploreEmission;
|
|
569
|
+
/**
|
|
570
|
+
* Run a single read tool to completion and return its raw {@link ToolResult},
|
|
571
|
+
* classifying expected failures the same way {@link execute}'s catch does so
|
|
572
|
+
* the SHAPE is identical whether dispatch runs in-process or on a worker:
|
|
573
|
+
* NotIndexed → success-shaped guidance, PathRefusal → clean error, anything
|
|
574
|
+
* else → internal-error-with-retry. Never throws.
|
|
575
|
+
*
|
|
576
|
+
* This is the worker thread's entry point (see {@link ./query-worker}) and the
|
|
577
|
+
* in-process fallback for {@link execute}. It deliberately does NOT run the
|
|
578
|
+
* catch-up gate or the staleness/worktree notices — those need the daemon's
|
|
579
|
+
* watched main instance and stay on the main thread. Cross-cutting allowlist +
|
|
580
|
+
* path validation already ran in {@link execute} before routing here.
|
|
581
|
+
*/
|
|
582
|
+
executeReadTool(toolName: string, args: Record<string, unknown>): Promise<ToolResult>;
|
|
583
|
+
/**
|
|
584
|
+
* Pure dispatch over the read tools — the switch, with no gate, no notices, no
|
|
585
|
+
* allowlist/validation (the caller owns those). `codegraph_status` is handled
|
|
586
|
+
* on the main thread in {@link execute} and never reaches here. May throw
|
|
587
|
+
* NotIndexed/PathRefusal, which {@link executeReadTool} classifies.
|
|
588
|
+
*/
|
|
589
|
+
private dispatchTool;
|
|
590
|
+
/**
|
|
591
|
+
* Handle codegraph_search
|
|
592
|
+
*/
|
|
593
|
+
private handleSearch;
|
|
594
|
+
/**
|
|
595
|
+
* Group symbol matches into DISTINCT DEFINITIONS — one group per
|
|
596
|
+
* (filePath, qualifiedName), so same-file overloads stay together while
|
|
597
|
+
* unrelated same-named classes across a monorepo's apps (#764: one
|
|
598
|
+
* `UserService` per NestJS app) are kept apart. Optionally narrowed by a
|
|
599
|
+
* `file` path/suffix first.
|
|
600
|
+
*/
|
|
601
|
+
private groupDefinitions;
|
|
602
|
+
/** Section heading for one distinct definition in grouped output. */
|
|
603
|
+
private definitionHeading;
|
|
604
|
+
/**
|
|
605
|
+
* Handle codegraph_callers
|
|
606
|
+
*/
|
|
607
|
+
private handleCallers;
|
|
608
|
+
/**
|
|
609
|
+
* Handle codegraph_callees
|
|
610
|
+
*/
|
|
611
|
+
private handleCallees;
|
|
612
|
+
/**
|
|
613
|
+
* Handle codegraph_impact
|
|
614
|
+
*/
|
|
615
|
+
private handleImpact;
|
|
616
|
+
/**
|
|
617
|
+
* Describe a synthesized (dynamic-dispatch) edge for human output: how the
|
|
618
|
+
* callback was wired up — the bridge static parsing can't see. Returns null
|
|
619
|
+
* for ordinary static edges. Used by trace + the node trail so a synthesized
|
|
620
|
+
* hop reads as "registered via onUpdate at App.tsx:3148", not a bare arrow.
|
|
621
|
+
*/
|
|
622
|
+
private synthEdgeNote;
|
|
623
|
+
/**
|
|
624
|
+
* Flow-from-named-symbols: an agent's codegraph_explore query is a bag of
|
|
625
|
+
* symbol names that usually spans the flow it's investigating (e.g.
|
|
626
|
+
* "PmsProductController getList PmsProductService list PmsProductServiceImpl").
|
|
627
|
+
* Surface the longest call chain AMONG those named symbols — scoped to what the
|
|
628
|
+
* agent explicitly named, so (unlike a fuzzy relevance set) there's no
|
|
629
|
+
* wrong-feature wandering. Rides synthesized edges, so controller→service-
|
|
630
|
+
* interface→impl shows up. Returns '' if no chain of >=3 nodes exists.
|
|
631
|
+
*
|
|
632
|
+
* Ambiguous tokens (Java `list` → dozens of nodes) are disambiguated by
|
|
633
|
+
* CO-NAMING: the agent names the class too, so we keep only `list` candidates
|
|
634
|
+
* whose qualifiedName contains another named token (`PmsProductServiceImpl::list`),
|
|
635
|
+
* dropping unrelated `OmsOrderService::list`.
|
|
636
|
+
*/
|
|
637
|
+
private buildFlowFromNamedSymbols;
|
|
638
|
+
/**
|
|
639
|
+
* Dynamic-boundary surfacing (#687): when the flow among the agent's named
|
|
640
|
+
* symbols does not fully connect, scan the disconnected symbols' bodies for
|
|
641
|
+
* dynamic-dispatch sites (computed member calls, getattr, reflection, typed
|
|
642
|
+
* message buses, runtime-keyed emits) and ANNOUNCE the boundary — the exact
|
|
643
|
+
* site, the form, and (when a key is statically visible) candidate targets —
|
|
644
|
+
* instead of guessing edges. The answer to "how does A reach B" when no
|
|
645
|
+
* static path exists IS the dispatch site: that's where the flow continues
|
|
646
|
+
* at runtime. Query-time, deterministic, zero graph mutation; a fully
|
|
647
|
+
* connected flow never reaches this method.
|
|
648
|
+
*/
|
|
649
|
+
private buildDynamicBoundaries;
|
|
650
|
+
/**
|
|
651
|
+
* Interface/registry-dispatch announcement — #687 extended to GRAPH-visible
|
|
652
|
+
* polymorphism (the body-scan can't see it: `nodeType.execute()` is textually
|
|
653
|
+
* an ordinary call; the polymorphism lives in the `implements`/`extends` edges).
|
|
654
|
+
*
|
|
655
|
+
* A method the agent named that resolves to a large same-name family whose
|
|
656
|
+
* definers overwhelmingly implement/extend ONE supertype is a runtime dispatch:
|
|
657
|
+
* the concrete target is chosen at runtime from N implementations, so no single
|
|
658
|
+
* static edge is "the answer" — the implementations ARE the continuations. We
|
|
659
|
+
* announce the supertype, its TRUE implementer count, and a few concrete targets,
|
|
660
|
+
* then steer to codegraph_explore. Graph-only, query-time, zero mutation; the
|
|
661
|
+
* caller fires it ONLY for an UNCOVERED named token, so a connected flow is silent.
|
|
662
|
+
*
|
|
663
|
+
* Robust to FTS sampling bias: the same-name family is a capped FTS sample that
|
|
664
|
+
* over-represents whatever FTS ranks first (n8n: DB `TableOperation.execute`
|
|
665
|
+
* outnumbered `INodeType.execute` in the sample 7:6 even though INodeType has
|
|
666
|
+
* 611 implementers vs a handful). So candidate supertypes are ranked by their
|
|
667
|
+
* TRUE graph-wide implementer count, NOT their frequency in the sample.
|
|
668
|
+
*/
|
|
669
|
+
private buildPolymorphicBoundaries;
|
|
670
|
+
/**
|
|
671
|
+
* Shortlist candidate runtime targets for a dispatch key surfaced by
|
|
672
|
+
* {@link buildDynamicBoundaries}. Exact conventional names first (`save` →
|
|
673
|
+
* `onSave`/`handleSave`; `CreateCmd` → `CreateCmdHandler`), then FTS, with a
|
|
674
|
+
* normalized-containment post-filter (FTS camel-splitting is fuzzier than a
|
|
675
|
+
* candidate list should be). Symbols the agent already named sort first and
|
|
676
|
+
* are marked — that's the "you were right, here's the wiring" case.
|
|
677
|
+
*/
|
|
678
|
+
private boundaryCandidates;
|
|
679
|
+
/**
|
|
680
|
+
* Compact "blast radius" for the entry symbols of an explore result: who
|
|
681
|
+
* depends on each (callers) and which test files cover it — LOCATIONS ONLY,
|
|
682
|
+
* no source, so the agent knows what to update / re-verify before editing
|
|
683
|
+
* without reaching for a separate impact call. Always-on, but skips symbols
|
|
684
|
+
* that have no dependents (nothing to warn about), and returns '' when none
|
|
685
|
+
* qualify so a leaf-only exploration stays clean.
|
|
686
|
+
*/
|
|
687
|
+
private buildBlastRadiusSection;
|
|
688
|
+
/**
|
|
689
|
+
* Test-coverage note for a blast-radius entry whose DIRECT callers include no
|
|
690
|
+
* test file. A helper called only by production code can still be exercised
|
|
691
|
+
* by tests further up the caller chain (#1475: 40% of directly-unflagged
|
|
692
|
+
* symbols had a test within 2-3 hops), so walk up to 2 more hops before
|
|
693
|
+
* claiming anything — and even then claim only what was measured.
|
|
694
|
+
*/
|
|
695
|
+
private indirectTestNote;
|
|
696
|
+
/**
|
|
697
|
+
* Graph-connectivity relevance via Random-Walk-with-Restart (personalized
|
|
698
|
+
* PageRank) from the query's matched SEED nodes over the call/reference graph.
|
|
699
|
+
*
|
|
700
|
+
* This is the ranking signal text search (FTS/bm25) CANNOT provide, and it's
|
|
701
|
+
* codegraph's home turf: relevance by STRUCTURE, not words. A file whose
|
|
702
|
+
* symbols are call-connected to the matched cluster accrues walk mass and
|
|
703
|
+
* ranks high; a lone TEXT match — e.g. `LensSwitcher.swift` matched the word
|
|
704
|
+
* "switch" from `switchOrganization`, but calls none of `setUser`/`fetchUser`
|
|
705
|
+
* — gets only its own restart probability and ranks ~0. Immune to the
|
|
706
|
+
* tokenization trap that fools term matching, deterministic, no embeddings.
|
|
707
|
+
*
|
|
708
|
+
* Undirected adjacency (reachability both ways), restart α=0.25 to the seeds,
|
|
709
|
+
* power iteration to convergence. Bounded to the already-relevant subgraph, so
|
|
710
|
+
* it's a few hundred nodes × ~25 iterations — negligible cost.
|
|
711
|
+
*/
|
|
712
|
+
private computeGraphRelevance;
|
|
713
|
+
/**
|
|
714
|
+
* Handle codegraph_explore — deep exploration in a single call
|
|
715
|
+
*
|
|
716
|
+
* Strategy: find relevant symbols via graph traversal, group by file,
|
|
717
|
+
* then read contiguous file sections covering all symbols per file.
|
|
718
|
+
* This replaces multiple codegraph_node + Read calls.
|
|
719
|
+
*
|
|
720
|
+
* Output size is adaptive to project file count via
|
|
721
|
+
* `getExploreOutputBudget` — see #185 for why a fixed 35k cap was a
|
|
722
|
+
* tax on small projects while earning its keep on large ones.
|
|
723
|
+
*/
|
|
724
|
+
private handleExplore;
|
|
725
|
+
/**
|
|
726
|
+
* An explore response plus the record of what it emitted (CG-17). The record
|
|
727
|
+
* rides the result only as far as {@link execute}, which files it into the
|
|
728
|
+
* calling session's state and deletes it — see {@link EXPLORE_EMISSION_KEY}.
|
|
729
|
+
*/
|
|
730
|
+
private exploreResult;
|
|
731
|
+
/**
|
|
732
|
+
* Handle codegraph_node
|
|
733
|
+
*/
|
|
734
|
+
private handleNode;
|
|
735
|
+
/**
|
|
736
|
+
* FILE READ MODE: resolve `fileArg` (path or basename) to an indexed file and
|
|
737
|
+
* read it like the Read tool — its current on-disk source with line numbers,
|
|
738
|
+
* narrowable with `offset`/`limit` exactly as Read's are — preceded by a
|
|
739
|
+
* one-line blast-radius header (which files depend on it). `symbolsOnly`
|
|
740
|
+
* returns just the structural map (symbols + dependents) instead of source.
|
|
741
|
+
*
|
|
742
|
+
* Parity goal: the numbered source block is byte-for-byte the shape Read
|
|
743
|
+
* returns (`<n>\t<line>`, no padding), so the agent treats it as a Read — only
|
|
744
|
+
* faster (served from the index) and with the blast radius attached. Security:
|
|
745
|
+
* yaml/properties files are summarized by key, never dumped (#383); reads go
|
|
746
|
+
* through validatePathWithinRoot (#527).
|
|
747
|
+
*/
|
|
748
|
+
private handleFileView;
|
|
749
|
+
/** Render one symbol: details + (optional) body/outline + its caller/callee trail. */
|
|
750
|
+
private renderNodeSection;
|
|
751
|
+
private static readonly STALE_WHOLE_FILE_MAX_LINES;
|
|
752
|
+
private static readonly STALE_WHOLE_FILE_MAX_CHARS;
|
|
753
|
+
/**
|
|
754
|
+
* codegraph_node render for a symbol whose file changed on disk after the
|
|
755
|
+
* last index sync (issue #1474). The indexed line range is no longer
|
|
756
|
+
* trustworthy, so no slice is emitted: a small file gets its full CURRENT
|
|
757
|
+
* source (Read-parity — sufficiency preserved, the agent still doesn't need
|
|
758
|
+
* Read); a large one gets an explicit notice steering to the tool's own
|
|
759
|
+
* file-read mode (or Read) — honest absence instead of confident wrongness.
|
|
760
|
+
* Location/signature stay (they're the index's answer) but are flagged as
|
|
761
|
+
* possibly shifted.
|
|
762
|
+
*/
|
|
763
|
+
private renderStaleNodeSection;
|
|
764
|
+
/**
|
|
765
|
+
* Build the "trail" for a symbol: its direct callees (what it calls) and
|
|
766
|
+
* callers (what calls it), each with file:line — so codegraph_node doubles as
|
|
767
|
+
* the structural Grep→Read→expand primitive: a spot PLUS where to go next.
|
|
768
|
+
* Capped to stay cheap. Walk the graph by calling codegraph_node on a trail
|
|
769
|
+
* entry; no Read needed for covered hops. Empty edges on a non-leaf often mean
|
|
770
|
+
* dynamic dispatch the static graph couldn't resolve — that absence is itself
|
|
771
|
+
* a signal (read that one hop) rather than a dead end.
|
|
772
|
+
*/
|
|
773
|
+
private formatTrail;
|
|
774
|
+
/**
|
|
775
|
+
* Handle codegraph_status
|
|
776
|
+
*/
|
|
777
|
+
private handleStatus;
|
|
778
|
+
/**
|
|
779
|
+
* Handle codegraph_files - get project file structure from the index
|
|
780
|
+
*/
|
|
781
|
+
private handleFiles;
|
|
782
|
+
/**
|
|
783
|
+
* Convert glob pattern to regex
|
|
784
|
+
*/
|
|
785
|
+
private globToRegex;
|
|
786
|
+
/**
|
|
787
|
+
* Format files as a flat list
|
|
788
|
+
*/
|
|
789
|
+
private formatFilesFlat;
|
|
790
|
+
/**
|
|
791
|
+
* Format files grouped by language
|
|
792
|
+
*/
|
|
793
|
+
private formatFilesGrouped;
|
|
794
|
+
/**
|
|
795
|
+
* Format files as a tree structure
|
|
796
|
+
*/
|
|
797
|
+
private formatFilesTree;
|
|
798
|
+
/**
|
|
799
|
+
* Find a symbol by name, handling disambiguation when multiple matches exist.
|
|
800
|
+
* Returns the best match and a note about alternatives if any.
|
|
801
|
+
*/
|
|
802
|
+
/**
|
|
803
|
+
* Check if a node matches a symbol query.
|
|
804
|
+
*
|
|
805
|
+
* Accepts simple names (`run`) and three flavors of qualifier:
|
|
806
|
+
* - dotted `Session.request` (TS/JS/Python)
|
|
807
|
+
* - colon-pair `stage_apply::run` (Rust, C++, Ruby)
|
|
808
|
+
* - slash `configurator/stage_apply` (path-ish)
|
|
809
|
+
*
|
|
810
|
+
* Multi-level qualifiers compose: `crate::configurator::stage_apply::run`
|
|
811
|
+
* works. Rust path prefixes (`crate`, `super`, `self`) are stripped so
|
|
812
|
+
* the canonical `crate::module::symbol` form resolves.
|
|
813
|
+
*
|
|
814
|
+
* Resolution order, last part must always equal `node.name`:
|
|
815
|
+
* 1. Suffix-match against `qualifiedName` (handles class-scoped methods
|
|
816
|
+
* where the extractor builds the qualified name from the AST stack)
|
|
817
|
+
* 2. File-path containment (handles file-derived modules in Rust/
|
|
818
|
+
* Python — `stage_apply::run` matches a `run` in `stage_apply.rs`)
|
|
819
|
+
*/
|
|
820
|
+
private matchesSymbol;
|
|
821
|
+
/**
|
|
822
|
+
* Find ALL definitions matching a name, ranked, so codegraph_node can return
|
|
823
|
+
* every overload instead of guessing one (the wrong guess → a Read). Keepers
|
|
824
|
+
* rank before generated stubs (.pb.go etc.); stable within a group preserves
|
|
825
|
+
* FTS order. Returns [] when nothing matches; a qualified lookup that finds no
|
|
826
|
+
* exact match returns [] rather than a misleading fuzzy file hit (#173); a
|
|
827
|
+
* bare name with no exact match falls back to the single top fuzzy result.
|
|
828
|
+
*/
|
|
829
|
+
private findSymbolMatches;
|
|
830
|
+
/**
|
|
831
|
+
* Find ALL symbols matching a name. Used by callers/callees/impact to aggregate
|
|
832
|
+
* results across all matching symbols (e.g., multiple classes with an `execute` method).
|
|
833
|
+
*/
|
|
834
|
+
private findAllSymbols;
|
|
835
|
+
/**
|
|
836
|
+
* Truncate output if it exceeds the maximum length
|
|
837
|
+
*/
|
|
838
|
+
private truncateOutput;
|
|
839
|
+
private formatSearchResults;
|
|
840
|
+
private formatNodeList;
|
|
841
|
+
/**
|
|
842
|
+
* Relationship label for a non-`calls` edge in callers/callees lists. A
|
|
843
|
+
* function-as-value edge (#756) is the high-signal one: `callers(cb)`
|
|
844
|
+
* showing "via callback registration" tells the agent this is where the
|
|
845
|
+
* callback is WIRED, not where it's invoked.
|
|
846
|
+
*/
|
|
847
|
+
private edgeLabel;
|
|
848
|
+
private formatImpact;
|
|
849
|
+
/**
|
|
850
|
+
* Build a compact structural outline of a container symbol from its
|
|
851
|
+
* indexed children (methods, fields, properties, …) — name, kind,
|
|
852
|
+
* line number, and signature — so the agent gets the shape of a class
|
|
853
|
+
* without the full source of every method. Returns '' when the container
|
|
854
|
+
* has no indexed children, so the caller can fall back to full source.
|
|
855
|
+
*/
|
|
856
|
+
private buildContainerOutline;
|
|
857
|
+
private formatNodeDetails;
|
|
858
|
+
private textResult;
|
|
859
|
+
private errorResult;
|
|
860
|
+
}
|
|
861
|
+
export {};
|
|
862
|
+
//# sourceMappingURL=tools.d.ts.map
|