@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,198 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* CG-28 measurement probe — what a DECLARATION-ONLY file takes from an explore
|
|
4
|
+
* envelope, with and without a generated banner.
|
|
5
|
+
*
|
|
6
|
+
* The issue was filed because a Wrangler `worker-configuration.d.ts` scored 49
|
|
7
|
+
* at `pen 1.00` and took 60.7% of an envelope on generic identifier overlap
|
|
8
|
+
* (`ReadableStream`, `Body`, `ImageMetadata`, `Message`, …) with a prose query.
|
|
9
|
+
* CG-25 has since taught `GENERATED_CONTENT_PATTERNS` the Wrangler banner, so
|
|
10
|
+
* the first thing to measure is whether that alone settles it — it does, and
|
|
11
|
+
* this probe quantifies it. What CG-25 does NOT cover is a declaration-only file
|
|
12
|
+
* that carries no banner at all: a hand-maintained ambient `.d.ts`, vendored
|
|
13
|
+
* typings, module augmentation. This probe puts both shapes in ONE fixture
|
|
14
|
+
* against ONE envelope so the banner is the only difference between them.
|
|
15
|
+
* (`.pyi` is not an indexed extension, so Python stubs never enter the graph.)
|
|
16
|
+
*
|
|
17
|
+
* Findings and the full regression evidence:
|
|
18
|
+
* `docs/benchmarks/explore-declaration-only-cg28.md`.
|
|
19
|
+
*
|
|
20
|
+
* Fixture: `__tests__/fixtures/ambient-decls-ts/` — an upload path (route →
|
|
21
|
+
* stream → metadata → queue) competing with:
|
|
22
|
+
* types/worker-configuration.d.ts declaration-only, Wrangler banner (CG-25)
|
|
23
|
+
* types/platform-shims.d.ts declaration-only, hand-written, NO banner
|
|
24
|
+
* src/storage/types.ts declaration-only but IMPORTED — the control
|
|
25
|
+
* that must never be damped
|
|
26
|
+
*
|
|
27
|
+
* Variants (`--variant`):
|
|
28
|
+
* both as committed — the controlled comparison
|
|
29
|
+
* strip-banner the banner is deleted from worker-configuration.d.ts, so the
|
|
30
|
+
* two declaration files differ in NOTHING the ranker can see;
|
|
31
|
+
* the delta against `both` is exactly what CG-25 buys
|
|
32
|
+
*
|
|
33
|
+
* Usage (needs a current `npm run build`):
|
|
34
|
+
* node scripts/agent-eval/probe-decl-only.mjs
|
|
35
|
+
* node scripts/agent-eval/probe-decl-only.mjs --variant strip-banner
|
|
36
|
+
* node scripts/agent-eval/probe-decl-only.mjs --json
|
|
37
|
+
* node scripts/agent-eval/probe-decl-only.mjs --query "..."
|
|
38
|
+
*/
|
|
39
|
+
import { cpSync, mkdtempSync, readFileSync, writeFileSync, rmSync, existsSync } from 'node:fs';
|
|
40
|
+
import { tmpdir } from 'node:os';
|
|
41
|
+
import { dirname, join, resolve } from 'node:path';
|
|
42
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
43
|
+
|
|
44
|
+
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
45
|
+
const REPO_ROOT = resolve(HERE, '../..');
|
|
46
|
+
const FIXTURE = join(REPO_ROOT, '__tests__/fixtures/ambient-decls-ts');
|
|
47
|
+
|
|
48
|
+
const GENERATED_DECL = 'types/worker-configuration.d.ts';
|
|
49
|
+
const HANDWRITTEN_DECL = 'types/platform-shims.d.ts';
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The query shapes. The flow ones are prose and name no symbol — the shape that
|
|
53
|
+
* let the original file in. The last one is the counter-case the issue requires:
|
|
54
|
+
* a question genuinely ABOUT a declared type must still reach the declaration.
|
|
55
|
+
*/
|
|
56
|
+
const QUERIES = [
|
|
57
|
+
{ id: 'flow-upload', kind: 'flow', text: 'how does an upload request stream the file body to storage and record image metadata' },
|
|
58
|
+
{ id: 'flow-pipe', kind: 'flow', text: 'where does the upload body get piped into the bucket and the metadata written' },
|
|
59
|
+
{ id: 'flow-generic', kind: 'flow', text: 'how are streams and messages and image metadata handled for uploads' },
|
|
60
|
+
{ id: 'flow-queue', kind: 'flow', text: 'what happens after an object is stored and the follow-up message is queued' },
|
|
61
|
+
{ id: 'type-shim', kind: 'type', text: 'UploadStorage StoredUploadObject ImageMetadataShim' },
|
|
62
|
+
{ id: 'type-prose', kind: 'type', text: 'what does the UploadStorage interface declare for putting an object' },
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
const argv = process.argv.slice(2);
|
|
66
|
+
const asJson = argv.includes('--json');
|
|
67
|
+
const at = (flag) => { const i = argv.indexOf(flag); return i >= 0 ? argv[i + 1] : undefined; };
|
|
68
|
+
const VARIANT = at('--variant') ?? 'both';
|
|
69
|
+
const ONE_QUERY = at('--query');
|
|
70
|
+
const ONE_ID = at('--only');
|
|
71
|
+
|
|
72
|
+
const say = (s = '') => { if (!asJson) console.log(s); };
|
|
73
|
+
const num = (n) => Math.round(n).toLocaleString('en-US');
|
|
74
|
+
const pct = (f) => `${(f * 100).toFixed(1)}%`;
|
|
75
|
+
|
|
76
|
+
if (!existsSync(join(REPO_ROOT, 'dist/index.js'))) {
|
|
77
|
+
console.error('dist/ not built — run `npm run build` first.');
|
|
78
|
+
process.exit(2);
|
|
79
|
+
}
|
|
80
|
+
const load = (rel) => import(pathToFileURL(resolve(REPO_ROOT, rel)).href);
|
|
81
|
+
const idxMod = await load('dist/index.js');
|
|
82
|
+
const toolsMod = await load('dist/mcp/tools.js');
|
|
83
|
+
const CodeGraph = idxMod.default?.default ?? idxMod.default ?? idxMod.CodeGraph;
|
|
84
|
+
const ToolHandler = toolsMod.ToolHandler ?? toolsMod.default?.ToolHandler;
|
|
85
|
+
|
|
86
|
+
/** Copy the fixture, apply the variant, index it. Hermetic per run. */
|
|
87
|
+
function materialize(variant) {
|
|
88
|
+
const dir = mkdtempSync(join(tmpdir(), 'cg-decl-'));
|
|
89
|
+
cpSync(FIXTURE, dir, { recursive: true });
|
|
90
|
+
rmSync(join(dir, '.codegraph'), { recursive: true, force: true });
|
|
91
|
+
if (variant === 'strip-banner') {
|
|
92
|
+
const p = join(dir, GENERATED_DECL);
|
|
93
|
+
// Drop only the banner comment lines; every declaration stays.
|
|
94
|
+
const kept = readFileSync(p, 'utf8').split('\n').filter((l) => !/^\/\/ .*(Generated by Wrangler|Runtime types generated)/.test(l));
|
|
95
|
+
writeFileSync(p, kept.join('\n'));
|
|
96
|
+
} else if (variant !== 'both') {
|
|
97
|
+
rmSync(dir, { recursive: true, force: true });
|
|
98
|
+
throw new Error(`unknown --variant ${variant} (both | strip-banner)`);
|
|
99
|
+
}
|
|
100
|
+
return dir;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const queries = ONE_QUERY
|
|
104
|
+
? [{ id: 'custom', kind: 'flow', text: ONE_QUERY }]
|
|
105
|
+
: QUERIES.filter((q) => !ONE_ID || q.id === ONE_ID);
|
|
106
|
+
|
|
107
|
+
const dir = materialize(VARIANT);
|
|
108
|
+
let rows;
|
|
109
|
+
try {
|
|
110
|
+
let cg = CodeGraph.initSync(dir);
|
|
111
|
+
await cg.indexAll();
|
|
112
|
+
cg.close?.();
|
|
113
|
+
|
|
114
|
+
const sidecar = join(dir, 'diag.jsonl');
|
|
115
|
+
rows = [];
|
|
116
|
+
for (const q of queries) {
|
|
117
|
+
rmSync(sidecar, { force: true });
|
|
118
|
+
process.env.CODEGRAPH_EXPLORE_DEBUG = sidecar;
|
|
119
|
+
cg = CodeGraph.openSync(dir);
|
|
120
|
+
const res = await new ToolHandler(cg).execute('codegraph_explore', { query: q.text });
|
|
121
|
+
const text = res.content?.[0]?.text ?? '';
|
|
122
|
+
cg.close?.();
|
|
123
|
+
delete process.env.CODEGRAPH_EXPLORE_DEBUG;
|
|
124
|
+
const report = JSON.parse(readFileSync(sidecar, 'utf8').trim().split('\n').pop());
|
|
125
|
+
|
|
126
|
+
const pick = (path) => {
|
|
127
|
+
const f = report.files.find((x) => x.path === path);
|
|
128
|
+
if (!f) return null;
|
|
129
|
+
return {
|
|
130
|
+
path, rank: f.rank, score: f.score, graph: f.graphScore, hits: f.termHits,
|
|
131
|
+
penalty: f.penalty, generated: f.generated, render: f.render,
|
|
132
|
+
named: f.named, entry: f.entry, central: f.central,
|
|
133
|
+
allocatedShare: f.allocatedShare, share: f.share,
|
|
134
|
+
emitted: f.emittedChars, final: f.finalChars, skipped: f.skipped,
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
const declPaths = new Set([GENERATED_DECL, HANDWRITTEN_DECL]);
|
|
138
|
+
const totalSource = report.files.reduce((a, f) => a + f.finalChars, 0);
|
|
139
|
+
const declSource = report.files
|
|
140
|
+
.filter((f) => declPaths.has(f.path))
|
|
141
|
+
.reduce((a, f) => a + f.finalChars, 0);
|
|
142
|
+
// "Named in the response but carrying no source" is the correct outcome for
|
|
143
|
+
// a cliffed declaration file — the agent can still fetch it in one call.
|
|
144
|
+
const namedInResponse = (p) => text.includes(p);
|
|
145
|
+
|
|
146
|
+
rows.push({
|
|
147
|
+
query: q.id, kind: q.kind, text: q.text,
|
|
148
|
+
envelope: report.envelope,
|
|
149
|
+
generatedDecl: pick(GENERATED_DECL),
|
|
150
|
+
handwrittenDecl: pick(HANDWRITTEN_DECL),
|
|
151
|
+
declSourceShare: totalSource > 0 ? declSource / totalSource : 0,
|
|
152
|
+
implSourceShare: totalSource > 0 ? (totalSource - declSource) / totalSource : 0,
|
|
153
|
+
topFile: report.files.filter((f) => f.finalChars > 0).sort((a, b) => b.finalChars - a.finalChars)[0]?.path ?? null,
|
|
154
|
+
generatedNamed: namedInResponse(GENERATED_DECL),
|
|
155
|
+
handwrittenNamed: namedInResponse(HANDWRITTEN_DECL),
|
|
156
|
+
files: report.files
|
|
157
|
+
.filter((f) => f.emittedChars > 0 || f.finalChars > 0)
|
|
158
|
+
.map((f) => ({ rank: f.rank, path: f.path, score: f.score, graph: f.graphScore, hits: f.termHits, penalty: f.penalty, generated: f.generated, declOnly: f.ambientDeclaration, named: f.named, entry: f.entry, central: f.central, render: f.render, final: f.finalChars, share: f.share })),
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
} finally {
|
|
162
|
+
rmSync(dir, { recursive: true, force: true });
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (asJson) {
|
|
166
|
+
console.log(JSON.stringify({ variant: VARIANT, rows }, null, 2));
|
|
167
|
+
} else {
|
|
168
|
+
say(`variant ${VARIANT}`);
|
|
169
|
+
say('');
|
|
170
|
+
for (const r of rows) {
|
|
171
|
+
say(`── ${r.query} [${r.kind}] "${r.text}"`);
|
|
172
|
+
say(` envelope ${num(r.envelope.chars)} chars · decl-only files hold ${pct(r.declSourceShare)} of delivered source`);
|
|
173
|
+
say(' # deliv% bytes score graph hits pen gen flags render file');
|
|
174
|
+
for (const f of r.files) {
|
|
175
|
+
const flags = [f.named && "named", f.entry && "entry", f.central && "central", f.declOnly && "decl-only"].filter(Boolean).join(" ") || "-";
|
|
176
|
+
say(
|
|
177
|
+
' ' + String(f.rank).padStart(2) + ' ' +
|
|
178
|
+
pct(f.share).padStart(6) + ' ' +
|
|
179
|
+
num(f.final).padStart(7) + ' ' +
|
|
180
|
+
Number(f.score).toFixed(1).padStart(5) + ' ' +
|
|
181
|
+
f.graph.toFixed(5).padStart(7) + ' ' +
|
|
182
|
+
String(f.hits).padStart(4) + ' ' +
|
|
183
|
+
f.penalty.toFixed(2).padStart(4) + ' ' +
|
|
184
|
+
(f.generated ? ' ✓ ' : ' ') + ' ' +
|
|
185
|
+
flags.padEnd(18) + ' ' +
|
|
186
|
+
(f.render ?? '-').padEnd(9) + ' ' +
|
|
187
|
+
f.path,
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
for (const [label, d, named] of [
|
|
191
|
+
['generated ', r.generatedDecl, r.generatedNamed],
|
|
192
|
+
['handwritten', r.handwrittenDecl, r.handwrittenNamed],
|
|
193
|
+
]) {
|
|
194
|
+
say(` ${label} ${d ? `rank #${d.rank}, score ${Number(d.score).toFixed(1)}, pen ${d.penalty.toFixed(2)}, ${num(d.final)} chars (${pct(d.share)})${d.final === 0 ? ` — ${d.skipped ?? d.render ?? 'not rendered'}` : ''}` : 'not a candidate'}${named ? ' · named in response' : ''}`);
|
|
195
|
+
}
|
|
196
|
+
say('');
|
|
197
|
+
}
|
|
198
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// One-shot probe: run handleExplore against an existing index using the built
|
|
3
|
+
// dist, print the output + a few stats. Lets us verify explore's coverage fix
|
|
4
|
+
// without a full agent run. Usage: node probe-explore.mjs <repo-with-.codegraph> "<query>"
|
|
5
|
+
import { pathToFileURL } from 'node:url';
|
|
6
|
+
import { resolve } from 'node:path';
|
|
7
|
+
|
|
8
|
+
const [, , repo, query] = process.argv;
|
|
9
|
+
if (!repo || !query) {
|
|
10
|
+
console.error('usage: probe-explore.mjs <repo> "<query>"');
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const load = async (rel) => import(pathToFileURL(resolve(rel)).href);
|
|
15
|
+
const idx = await load('dist/index.js');
|
|
16
|
+
const tools = await load('dist/mcp/tools.js');
|
|
17
|
+
|
|
18
|
+
// esModuleInterop: dynamic import of CJS yields { default: module.exports, ...named }
|
|
19
|
+
const CodeGraph = idx.default?.default ?? idx.default ?? idx.CodeGraph;
|
|
20
|
+
const ToolHandler = tools.ToolHandler ?? tools.default?.ToolHandler;
|
|
21
|
+
|
|
22
|
+
if (typeof CodeGraph?.openSync !== 'function') {
|
|
23
|
+
console.error('could not resolve CodeGraph.openSync; index keys:', Object.keys(idx), 'default keys:', idx.default && Object.keys(idx.default));
|
|
24
|
+
process.exit(2);
|
|
25
|
+
}
|
|
26
|
+
if (typeof ToolHandler !== 'function') {
|
|
27
|
+
console.error('could not resolve ToolHandler; tools keys:', Object.keys(tools));
|
|
28
|
+
process.exit(2);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const cg = CodeGraph.openSync(repo);
|
|
32
|
+
const h = new ToolHandler(cg);
|
|
33
|
+
const res = await h.execute('codegraph_explore', { query });
|
|
34
|
+
const text = res.content?.[0]?.text ?? '(no text)';
|
|
35
|
+
console.log(text);
|
|
36
|
+
console.error('\n--- PROBE STATS ---');
|
|
37
|
+
console.error('output chars:', text.length);
|
|
38
|
+
console.error('triggerRender body present (-> setState({})):', /triggerRender[\s\S]{0,400}setState\(\{\}\)/.test(text));
|
|
39
|
+
console.error('App.tsx in source section:', /\*\*`.*App\.tsx`\*\* —/.test(text));
|
|
40
|
+
try { cg.close?.(); } catch {}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* CG-27 measurement probe — what a factory-closure file actually delivers.
|
|
4
|
+
*
|
|
5
|
+
* `probe-allocation.mjs` measures how the envelope is split BETWEEN files. This
|
|
6
|
+
* one measures what comes back from WITHIN one file whose top-level symbol spans
|
|
7
|
+
* almost all of it: a `createFoo()` factory returning an object of closures
|
|
8
|
+
* (Svelte 5 rune stores, React hook modules, Zustand `create((set,get)=>({…}))`,
|
|
9
|
+
* IIFE module-pattern JS). The claim under test is a ranking one, not a byte one
|
|
10
|
+
* — CG-30 already bounds the bytes — so the number that matters is WHICH inner
|
|
11
|
+
* symbols reach the agent, not how many chars did.
|
|
12
|
+
*
|
|
13
|
+
* Prints, for the factory file: every line range the response delivered, and for
|
|
14
|
+
* each inner function whether its DEFINITION LINE is inside one of them.
|
|
15
|
+
*
|
|
16
|
+
* Usage (needs a current `npm run build`):
|
|
17
|
+
* node scripts/agent-eval/probe-factory-closure.mjs
|
|
18
|
+
* node scripts/agent-eval/probe-factory-closure.mjs --json
|
|
19
|
+
* node scripts/agent-eval/probe-factory-closure.mjs --query "..."
|
|
20
|
+
*/
|
|
21
|
+
import { cpSync, mkdtempSync, readFileSync, rmSync, existsSync } from 'node:fs';
|
|
22
|
+
import { tmpdir } from 'node:os';
|
|
23
|
+
import { dirname, join, resolve } from 'node:path';
|
|
24
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
25
|
+
|
|
26
|
+
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
27
|
+
const REPO_ROOT = resolve(HERE, '../..');
|
|
28
|
+
const FIXTURE = join(REPO_ROOT, '__tests__/fixtures/factory-closure-ts');
|
|
29
|
+
const targetAt = process.argv.indexOf('--target');
|
|
30
|
+
const TARGET = targetAt >= 0 ? process.argv[targetAt + 1] : 'src/stores/dashboard-store.ts';
|
|
31
|
+
const factoryAt = process.argv.indexOf('--factory');
|
|
32
|
+
const FACTORY = factoryAt >= 0 ? process.argv[factoryAt + 1] : 'createDashboardStore';
|
|
33
|
+
|
|
34
|
+
const argv = process.argv.slice(2);
|
|
35
|
+
const asJson = argv.includes('--json');
|
|
36
|
+
const queryAt = argv.indexOf('--query');
|
|
37
|
+
const QUERY = queryAt >= 0
|
|
38
|
+
? argv[queryAt + 1]
|
|
39
|
+
: 'how does the dashboard store refresh its metrics and apply a filter';
|
|
40
|
+
|
|
41
|
+
const say = (s = '') => { if (!asJson) console.log(s); };
|
|
42
|
+
const num = (n) => Math.round(n).toLocaleString('en-US');
|
|
43
|
+
|
|
44
|
+
const load = (rel) => import(pathToFileURL(resolve(REPO_ROOT, rel)).href);
|
|
45
|
+
if (!existsSync(join(REPO_ROOT, 'dist/index.js'))) {
|
|
46
|
+
console.error('dist/ not built — run `npm run build` first.');
|
|
47
|
+
process.exit(2);
|
|
48
|
+
}
|
|
49
|
+
const idxMod = await load('dist/index.js');
|
|
50
|
+
const toolsMod = await load('dist/mcp/tools.js');
|
|
51
|
+
const CodeGraph = idxMod.default?.default ?? idxMod.default ?? idxMod.CodeGraph;
|
|
52
|
+
const ToolHandler = toolsMod.ToolHandler ?? toolsMod.default?.ToolHandler;
|
|
53
|
+
|
|
54
|
+
const dir = mkdtempSync(join(tmpdir(), 'cg-factory-'));
|
|
55
|
+
cpSync(FIXTURE, dir, { recursive: true });
|
|
56
|
+
rmSync(join(dir, '.codegraph'), { recursive: true, force: true });
|
|
57
|
+
|
|
58
|
+
let out;
|
|
59
|
+
try {
|
|
60
|
+
let cg = CodeGraph.initSync(dir);
|
|
61
|
+
await cg.indexAll();
|
|
62
|
+
|
|
63
|
+
// Inner function definitions, straight from the index — the symbols the file's
|
|
64
|
+
// enclosing factory range would otherwise swallow.
|
|
65
|
+
const nodes = cg.getNodesInFile(TARGET);
|
|
66
|
+
const factory = nodes.find((n) => n.name === FACTORY);
|
|
67
|
+
const inner = nodes
|
|
68
|
+
.filter((n) => (n.kind === 'function' || n.kind === 'method')
|
|
69
|
+
&& n.name !== FACTORY
|
|
70
|
+
&& factory && n.startLine > factory.startLine && n.endLine <= factory.endLine)
|
|
71
|
+
.sort((a, b) => a.startLine - b.startLine);
|
|
72
|
+
cg.close?.();
|
|
73
|
+
|
|
74
|
+
const sidecar = join(dir, 'diag.jsonl');
|
|
75
|
+
process.env.CODEGRAPH_EXPLORE_DEBUG = sidecar;
|
|
76
|
+
cg = CodeGraph.openSync(dir);
|
|
77
|
+
const res = await new ToolHandler(cg).execute('codegraph_explore', { query: QUERY });
|
|
78
|
+
const text = res.content?.[0]?.text ?? '';
|
|
79
|
+
cg.close?.();
|
|
80
|
+
delete process.env.CODEGRAPH_EXPLORE_DEBUG;
|
|
81
|
+
const report = JSON.parse(readFileSync(sidecar, 'utf8').trim().split('\n').pop());
|
|
82
|
+
|
|
83
|
+
// Which source lines of the target file the response actually carries. The
|
|
84
|
+
// response numbers every delivered line `<n>\t<text>`; match them back against
|
|
85
|
+
// the file so a line number that merely appears in prose can't count.
|
|
86
|
+
const source = readFileSync(join(dir, TARGET), 'utf8').split('\n');
|
|
87
|
+
const delivered = new Set();
|
|
88
|
+
for (const line of text.split('\n')) {
|
|
89
|
+
const m = /^(\d+)\t(.*)$/.exec(line);
|
|
90
|
+
if (!m) continue;
|
|
91
|
+
const n = Number(m[1]);
|
|
92
|
+
if (n >= 1 && n <= source.length && source[n - 1] === m[2]) delivered.add(n);
|
|
93
|
+
}
|
|
94
|
+
// Collapse to ranges for display.
|
|
95
|
+
const ranges = [];
|
|
96
|
+
for (const n of [...delivered].sort((a, b) => a - b)) {
|
|
97
|
+
const last = ranges[ranges.length - 1];
|
|
98
|
+
if (last && n === last.end + 1) last.end = n;
|
|
99
|
+
else ranges.push({ start: n, end: n });
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const covered = (n) => delivered.has(n.startLine);
|
|
103
|
+
const rec = report.files.find((f) => f.path === TARGET) ?? null;
|
|
104
|
+
|
|
105
|
+
out = {
|
|
106
|
+
query: QUERY,
|
|
107
|
+
target: TARGET,
|
|
108
|
+
fileLines: source.length,
|
|
109
|
+
factory: factory ? { name: factory.name, start: factory.startLine, end: factory.endLine } : null,
|
|
110
|
+
file: rec && {
|
|
111
|
+
rank: rec.rank, render: rec.render, clipped: rec.clipped,
|
|
112
|
+
emittedChars: rec.emittedChars, finalChars: rec.finalChars,
|
|
113
|
+
allowance: rec.allowance, spendable: rec.spendable, skipped: rec.skipped,
|
|
114
|
+
},
|
|
115
|
+
deliveredRanges: ranges,
|
|
116
|
+
deliveredLines: delivered.size,
|
|
117
|
+
inner: inner.map((n) => ({ name: n.name, start: n.startLine, end: n.endLine, delivered: covered(n) })),
|
|
118
|
+
innerDelivered: inner.filter(covered).length,
|
|
119
|
+
innerTotal: inner.length,
|
|
120
|
+
envelope: report.envelope,
|
|
121
|
+
allFiles: report.files
|
|
122
|
+
.filter((f) => f.emittedChars > 0 || f.finalChars > 0)
|
|
123
|
+
.map((f) => ({ rank: f.rank, path: f.path, render: f.render, emitted: f.emittedChars, final: f.finalChars })),
|
|
124
|
+
};
|
|
125
|
+
} finally {
|
|
126
|
+
rmSync(dir, { recursive: true, force: true });
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (asJson) {
|
|
130
|
+
console.log(JSON.stringify(out, null, 2));
|
|
131
|
+
} else {
|
|
132
|
+
say(`query "${out.query}"`);
|
|
133
|
+
say(`target ${out.target} — ${out.fileLines} lines, factory ${out.factory?.name} spans ${out.factory?.start}–${out.factory?.end}`);
|
|
134
|
+
say('');
|
|
135
|
+
say(' # render emitted final file');
|
|
136
|
+
for (const f of out.allFiles) {
|
|
137
|
+
say(` ${String(f.rank).padStart(2)} ${(f.render ?? '-').padEnd(10)} ${num(f.emitted).padStart(7)} ${num(f.final).padStart(7)} ${f.path}`);
|
|
138
|
+
}
|
|
139
|
+
say('');
|
|
140
|
+
say(`delivered lines of ${out.target}: ${out.deliveredLines}`);
|
|
141
|
+
say(` ranges: ${out.deliveredRanges.map((r) => `${r.start}-${r.end}`).join(', ') || '(none)'}`);
|
|
142
|
+
say('');
|
|
143
|
+
say(`inner symbols whose definition reached the agent: ${out.innerDelivered}/${out.innerTotal}`);
|
|
144
|
+
for (const n of out.inner) {
|
|
145
|
+
say(` ${n.delivered ? '✓' : '·'} ${n.name} (${n.start}–${n.end})`);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Per-file reservation-vs-delivered sweep for `codegraph_explore` (CG-36).
|
|
4
|
+
*
|
|
5
|
+
* `probe-suite-envelope.mjs` answers "how much source did the response deliver";
|
|
6
|
+
* this answers the question one level down — "did the bytes go to the files that
|
|
7
|
+
* earned them". The CG-36 defect was invisible to the envelope probe because the
|
|
8
|
+
* envelope stayed full: a rank-#3 file spent 24% of its reservation, the slack
|
|
9
|
+
* carried forward exactly as designed, and a far weaker file spent 3.5x its own.
|
|
10
|
+
* The response looked healthy; the ANSWER-bearing file had been starved.
|
|
11
|
+
*
|
|
12
|
+
* So the flag here is a PAIR, not a per-file threshold: a file that leaves a
|
|
13
|
+
* large share of its reservation unspent WHILE a materially lower-scoring file
|
|
14
|
+
* spends well over its own. Either alone is legitimate — a small file simply has
|
|
15
|
+
* less to say, and carry-forward is the mechanism that hands its slack down.
|
|
16
|
+
*
|
|
17
|
+
* Numbers come from the CG-4 diagnostic (`CODEGRAPH_EXPLORE_DEBUG`), so this
|
|
18
|
+
* measures the shipping allocator rather than re-deriving shares from markdown.
|
|
19
|
+
*
|
|
20
|
+
* Usage (needs a current `npm run build`, and full-REBUILT indexes — CG-33):
|
|
21
|
+
* node scripts/agent-eval/probe-file-spend.mjs
|
|
22
|
+
* node scripts/agent-eval/probe-file-spend.mjs --json > /tmp/new.json
|
|
23
|
+
* node scripts/agent-eval/probe-file-spend.mjs --baseline /tmp/base.json
|
|
24
|
+
* node scripts/agent-eval/probe-file-spend.mjs django --all # every file, not just flags
|
|
25
|
+
* CORPUS=/tmp/codegraph-corpus node scripts/agent-eval/probe-file-spend.mjs
|
|
26
|
+
*
|
|
27
|
+
* Exit code is 1 when any repo carries a starvation flag, so this can gate.
|
|
28
|
+
*/
|
|
29
|
+
import { mkdtempSync, readFileSync, rmSync, existsSync } from 'node:fs';
|
|
30
|
+
import { tmpdir } from 'node:os';
|
|
31
|
+
import { join, resolve } from 'node:path';
|
|
32
|
+
import { pathToFileURL } from 'node:url';
|
|
33
|
+
|
|
34
|
+
const CORPUS = process.env.CORPUS ?? '/tmp/codegraph-corpus';
|
|
35
|
+
|
|
36
|
+
/** Same six repos and queries the CG-30/CG-31/CG-26 envelope tables use. */
|
|
37
|
+
const SUITE = [
|
|
38
|
+
{ id: 'django', q: 'How does a QuerySet turn into SQL and fetch rows from the database?' },
|
|
39
|
+
{ id: 'excalidraw', q: 'How does updating an element re-render the canvas on screen?' },
|
|
40
|
+
{ id: 'okhttp', q: 'How does a call go through the interceptor chain to the network?' },
|
|
41
|
+
{ id: 'tokio', q: 'How does a spawned task get scheduled and run by a worker?' },
|
|
42
|
+
{ id: 'gin', q: 'How does a registered route handler get invoked for an incoming HTTP request?' },
|
|
43
|
+
{ id: 'alamofire', q: 'How does a request get built and sent through the session?' },
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Starvation thresholds. A flag needs BOTH sides — the starved file and the
|
|
48
|
+
* overspending one it lost the bytes to.
|
|
49
|
+
*
|
|
50
|
+
* `MIN_RESERVED` keeps the noise out: under it, "80% unspent" is a few hundred
|
|
51
|
+
* chars and means nothing. `SCORE_RATIO` is what makes the pair meaningful —
|
|
52
|
+
* a higher-scoring file underspending while a *comparable* one overspends is
|
|
53
|
+
* ordinary; the defect is a materially weaker file taking the bytes.
|
|
54
|
+
*/
|
|
55
|
+
const STARVED_SHARE = 0.5; // spent < half its reservation
|
|
56
|
+
const OVERSPEND_RATIO = 1.5; // spent > 1.5x its own reservation
|
|
57
|
+
const SCORE_RATIO = 2; // ...while scoring less than half the starved file
|
|
58
|
+
const MIN_RESERVED = 2000; // ignore files whose reservation is too small to matter
|
|
59
|
+
|
|
60
|
+
const argv = process.argv.slice(2);
|
|
61
|
+
const asJson = argv.includes('--json');
|
|
62
|
+
const showAll = argv.includes('--all');
|
|
63
|
+
const baselineAt = argv.includes('--baseline') ? argv[argv.indexOf('--baseline') + 1] : null;
|
|
64
|
+
const only = argv.filter((a) => !a.startsWith('--') && a !== baselineAt);
|
|
65
|
+
|
|
66
|
+
const say = (s = '') => { if (!asJson) console.log(s); };
|
|
67
|
+
const num = (n) => Math.round(n).toLocaleString('en-US');
|
|
68
|
+
const pct = (f) => `${(f * 100).toFixed(1)}%`;
|
|
69
|
+
|
|
70
|
+
const load = (rel) => import(pathToFileURL(resolve(rel)).href);
|
|
71
|
+
const idx = await load('dist/index.js');
|
|
72
|
+
const toolsMod = await load('dist/mcp/tools.js');
|
|
73
|
+
const CodeGraph = idx.default?.default ?? idx.default ?? idx.CodeGraph;
|
|
74
|
+
const ToolHandler = toolsMod.ToolHandler ?? toolsMod.default?.ToolHandler;
|
|
75
|
+
if (typeof CodeGraph?.openSync !== 'function' || typeof ToolHandler !== 'function') {
|
|
76
|
+
console.error('could not resolve CodeGraph/ToolHandler from dist/ — run `npm run build`');
|
|
77
|
+
process.exit(2);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Pair up the starved with the overspenders they lost bytes to. Only files the
|
|
82
|
+
* render loop actually reached (a reservation and a render mode) take part —
|
|
83
|
+
* a cliffed or max-files file never had bytes to spend.
|
|
84
|
+
*/
|
|
85
|
+
function findStarvation(files) {
|
|
86
|
+
const spenders = files.filter(
|
|
87
|
+
(f) => f.allowance !== null && f.allowance > 0 && f.render && f.render !== 'backref',
|
|
88
|
+
);
|
|
89
|
+
const flags = [];
|
|
90
|
+
for (const s of spenders) {
|
|
91
|
+
if (s.allowance < MIN_RESERVED) continue;
|
|
92
|
+
if (s.finalChars >= s.allowance * STARVED_SHARE) continue;
|
|
93
|
+
for (const o of spenders) {
|
|
94
|
+
if (o.path === s.path) continue;
|
|
95
|
+
if (o.finalChars <= o.allowance * OVERSPEND_RATIO) continue;
|
|
96
|
+
if (o.score * SCORE_RATIO > s.score) continue;
|
|
97
|
+
flags.push({
|
|
98
|
+
starved: s.path,
|
|
99
|
+
starvedScore: s.score,
|
|
100
|
+
starvedReserved: s.allowance,
|
|
101
|
+
starvedSpent: s.finalChars,
|
|
102
|
+
overspent: o.path,
|
|
103
|
+
overspentScore: o.score,
|
|
104
|
+
overspentReserved: o.allowance,
|
|
105
|
+
overspentSpent: o.finalChars,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return flags;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const tmp = mkdtempSync(join(tmpdir(), 'cg-spend-'));
|
|
113
|
+
const results = [];
|
|
114
|
+
try {
|
|
115
|
+
for (const { id, q } of SUITE) {
|
|
116
|
+
if (only.length > 0 && !only.includes(id)) continue;
|
|
117
|
+
const repo = join(CORPUS, id);
|
|
118
|
+
if (!existsSync(join(repo, '.codegraph', 'codegraph.db'))) {
|
|
119
|
+
say(`${id}: no index at ${repo} — skipped`);
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
const sidecar = join(tmp, `${id}.jsonl`);
|
|
123
|
+
process.env.CODEGRAPH_EXPLORE_DEBUG = sidecar;
|
|
124
|
+
const cg = CodeGraph.openSync(repo);
|
|
125
|
+
const h = new ToolHandler(cg);
|
|
126
|
+
await h.execute('codegraph_explore', { query: q });
|
|
127
|
+
try { cg.close?.(); } catch { /* best effort */ }
|
|
128
|
+
const report = JSON.parse(readFileSync(sidecar, 'utf8').trim().split('\n').pop());
|
|
129
|
+
const files = report.files.map((f) => ({
|
|
130
|
+
path: f.path,
|
|
131
|
+
rank: f.rank,
|
|
132
|
+
score: f.score,
|
|
133
|
+
allowance: f.allowance,
|
|
134
|
+
spendable: f.spendable,
|
|
135
|
+
finalChars: f.finalChars,
|
|
136
|
+
render: f.render,
|
|
137
|
+
skipped: f.skipped,
|
|
138
|
+
spent: f.allowance ? f.finalChars / f.allowance : null,
|
|
139
|
+
}));
|
|
140
|
+
results.push({
|
|
141
|
+
repo: id,
|
|
142
|
+
sourceChars: report.envelope.sourceChars,
|
|
143
|
+
files,
|
|
144
|
+
flags: findStarvation(files),
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
} finally {
|
|
148
|
+
rmSync(tmp, { recursive: true, force: true });
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (asJson) {
|
|
152
|
+
console.log(JSON.stringify(results, null, 2));
|
|
153
|
+
} else {
|
|
154
|
+
const base = baselineAt ? JSON.parse(readFileSync(baselineAt, 'utf8')) : null;
|
|
155
|
+
const byRepo = new Map((base ?? []).map((r) => [r.repo, r]));
|
|
156
|
+
for (const r of results) {
|
|
157
|
+
const b = byRepo.get(r.repo);
|
|
158
|
+
say(`\n${r.repo} — ${num(r.sourceChars)} source chars`
|
|
159
|
+
+ (b ? ` (baseline ${num(b.sourceChars)})` : ''));
|
|
160
|
+
say(' # score reserved spent spent% render file');
|
|
161
|
+
say('-'.repeat(96));
|
|
162
|
+
const flagged = new Set(r.flags.flatMap((f) => [f.starved, f.overspent]));
|
|
163
|
+
for (const f of r.files) {
|
|
164
|
+
if (f.allowance === null || f.allowance === 0) continue;
|
|
165
|
+
if (!showAll && !flagged.has(f.path) && f.spent > STARVED_SHARE && f.spent < OVERSPEND_RATIO) continue;
|
|
166
|
+
const mark = flagged.has(f.path) ? '*' : ' ';
|
|
167
|
+
say(
|
|
168
|
+
`${String(f.rank).padStart(2)}${mark} ${String(Math.round(f.score)).padStart(6)} `
|
|
169
|
+
+ `${num(f.allowance).padStart(9)} ${num(f.finalChars).padStart(7)} `
|
|
170
|
+
+ `${pct(f.spent).padStart(7)} ${(f.render ?? f.skipped ?? '—').padEnd(13)} ${f.path}`,
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
for (const f of r.flags) {
|
|
174
|
+
say(` FLAG: ${f.starved} (score ${Math.round(f.starvedScore)}) spent `
|
|
175
|
+
+ `${num(f.starvedSpent)}/${num(f.starvedReserved)} while ${f.overspent} `
|
|
176
|
+
+ `(score ${Math.round(f.overspentScore)}) spent ${num(f.overspentSpent)}/${num(f.overspentReserved)}`);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
const total = results.reduce((n, r) => n + r.flags.length, 0);
|
|
180
|
+
say('');
|
|
181
|
+
say(total === 0
|
|
182
|
+
? 'No file leaves a large share of its reservation unspent while a weaker file overspends.'
|
|
183
|
+
: `STARVATION: ${total} flag(s) across `
|
|
184
|
+
+ `${results.filter((r) => r.flags.length > 0).map((r) => r.repo).join(', ')}.`);
|
|
185
|
+
if (base) {
|
|
186
|
+
const worse = results.filter((r) => {
|
|
187
|
+
const b = byRepo.get(r.repo);
|
|
188
|
+
return b && (r.flags.length > b.flags.length || r.sourceChars < b.sourceChars);
|
|
189
|
+
});
|
|
190
|
+
say(worse.length === 0
|
|
191
|
+
? 'No repo flags more or delivers less than the baseline.'
|
|
192
|
+
: `REGRESSION vs baseline: ${worse.map((r) => r.repo).join(', ')}.`);
|
|
193
|
+
}
|
|
194
|
+
if (total > 0) process.exitCode = 1;
|
|
195
|
+
}
|