@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,130 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Parse the newest Claude Code session log for a project + its subagent logs,
|
|
3
|
+
// and report the tool-call breakdown (main + subagents). Works for interactive
|
|
4
|
+
// runs (driven via itrun.sh) — Claude Code writes full transcripts to
|
|
5
|
+
// ~/.claude/projects/<escaped-cwd>/<session>.jsonl with subagents/ alongside.
|
|
6
|
+
import { readFileSync, readdirSync, statSync, existsSync, realpathSync } from 'fs';
|
|
7
|
+
import { join } from 'path';
|
|
8
|
+
import { homedir } from 'os';
|
|
9
|
+
import {
|
|
10
|
+
classifySufficiency, formatSufficiency,
|
|
11
|
+
collectExploreTexts, computeAllocation, finalAnswerText, formatAllocation,
|
|
12
|
+
} from './parse-run.mjs';
|
|
13
|
+
|
|
14
|
+
const projectArg = process.argv[2];
|
|
15
|
+
if (!projectArg) { console.error('usage: parse-session.mjs <project-dir>'); process.exit(1); }
|
|
16
|
+
|
|
17
|
+
// Claude Code escapes the (real) cwd by replacing every "/" with "-".
|
|
18
|
+
const real = realpathSync(projectArg);
|
|
19
|
+
const escaped = real.replace(/\//g, '-');
|
|
20
|
+
const projDir = join(homedir(), '.claude', 'projects', escaped);
|
|
21
|
+
if (!existsSync(projDir)) { console.error('no session logs at', projDir); process.exit(1); }
|
|
22
|
+
|
|
23
|
+
// Newest top-level session .jsonl
|
|
24
|
+
const sessions = readdirSync(projDir)
|
|
25
|
+
.filter(f => f.endsWith('.jsonl'))
|
|
26
|
+
.map(f => ({ f, m: statSync(join(projDir, f)).mtimeMs }))
|
|
27
|
+
.sort((a, b) => b.m - a.m);
|
|
28
|
+
if (sessions.length === 0) { console.error('no .jsonl sessions in', projDir); process.exit(1); }
|
|
29
|
+
const sessionId = sessions[0].f.replace('.jsonl', '');
|
|
30
|
+
|
|
31
|
+
function tally(file) {
|
|
32
|
+
const counts = {};
|
|
33
|
+
for (const line of readFileSync(file, 'utf8').split('\n')) {
|
|
34
|
+
if (!line) continue;
|
|
35
|
+
let ev; try { ev = JSON.parse(line); } catch { continue; }
|
|
36
|
+
const content = ev.message?.content;
|
|
37
|
+
if (!Array.isArray(content)) continue;
|
|
38
|
+
for (const b of content) {
|
|
39
|
+
if (b.type === 'tool_use') counts[b.name] = (counts[b.name] || 0) + 1;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return counts;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Sum token usage from a transcript. The TUI's "Done (…Xk tokens…)" line only
|
|
46
|
+
// covers a subagent's throughput; this works for main-thread runs too and is
|
|
47
|
+
// consistent across both paths. `gen` = output, `fresh` = uncached input
|
|
48
|
+
// (input + cache_creation), `cached` = cache reads (≈free), `total` = all.
|
|
49
|
+
function sumTokens(file) {
|
|
50
|
+
const t = { gen: 0, fresh: 0, cached: 0 };
|
|
51
|
+
for (const line of readFileSync(file, 'utf8').split('\n')) {
|
|
52
|
+
if (!line) continue;
|
|
53
|
+
let ev; try { ev = JSON.parse(line); } catch { continue; }
|
|
54
|
+
const u = ev.message?.usage;
|
|
55
|
+
if (!u) continue;
|
|
56
|
+
t.gen += u.output_tokens || 0;
|
|
57
|
+
t.fresh += (u.input_tokens || 0) + (u.cache_creation_input_tokens || 0);
|
|
58
|
+
t.cached += u.cache_read_input_tokens || 0;
|
|
59
|
+
}
|
|
60
|
+
return t;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const mainCounts = tally(join(projDir, sessionId + '.jsonl'));
|
|
64
|
+
|
|
65
|
+
// Subagent transcripts live under <session>/subagents/*.jsonl
|
|
66
|
+
const subDir = join(projDir, sessionId, 'subagents');
|
|
67
|
+
const subCounts = {};
|
|
68
|
+
let subAgentFiles = 0;
|
|
69
|
+
if (existsSync(subDir)) {
|
|
70
|
+
for (const f of readdirSync(subDir).filter(f => f.endsWith('.jsonl'))) {
|
|
71
|
+
subAgentFiles++;
|
|
72
|
+
const c = tally(join(subDir, f));
|
|
73
|
+
for (const [k, v] of Object.entries(c)) subCounts[k] = (subCounts[k] || 0) + v;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const fmt = (counts) => Object.entries(counts).sort((a, b) => b[1] - a[1])
|
|
78
|
+
.map(([k, v]) => ` ${String(v).padStart(3)} ${k}`).join('\n') || ' (none)';
|
|
79
|
+
|
|
80
|
+
console.log(`session: ${sessionId}`);
|
|
81
|
+
console.log(`\nMAIN thread tools:\n${fmt(mainCounts)}`);
|
|
82
|
+
console.log(`\nSUBAGENT tools (${subAgentFiles} subagent transcript${subAgentFiles === 1 ? '' : 's'}):\n${fmt(subCounts)}`);
|
|
83
|
+
|
|
84
|
+
const explore = subCounts['mcp__codegraph__codegraph_explore'] || mainCounts['mcp__codegraph__codegraph_explore'] || 0;
|
|
85
|
+
const reads = (subCounts['Read'] || 0) + (mainCounts['Read'] || 0);
|
|
86
|
+
const greps = (subCounts['Grep'] || 0) + (mainCounts['Grep'] || 0) + (subCounts['Bash'] || 0) + (mainCounts['Bash'] || 0);
|
|
87
|
+
console.log(`\nVERDICT: codegraph_explore used ${explore}x | Read ${reads} | Grep/Bash ${greps}`);
|
|
88
|
+
|
|
89
|
+
// Token totals (main + subagents), consistent across main-thread and subagent runs.
|
|
90
|
+
const tok = { gen: 0, fresh: 0, cached: 0 };
|
|
91
|
+
const addTok = (t) => { tok.gen += t.gen; tok.fresh += t.fresh; tok.cached += t.cached; };
|
|
92
|
+
addTok(sumTokens(join(projDir, sessionId + '.jsonl')));
|
|
93
|
+
if (existsSync(subDir)) {
|
|
94
|
+
for (const f of readdirSync(subDir).filter(f => f.endsWith('.jsonl'))) addTok(sumTokens(join(subDir, f)));
|
|
95
|
+
}
|
|
96
|
+
const k = (n) => (n / 1000).toFixed(1) + 'k';
|
|
97
|
+
console.log(`TOKENS: gen ${k(tok.gen)} | fresh-in ${k(tok.fresh)} | cached-in ${k(tok.cached)} | billable≈ ${k(tok.gen + tok.fresh)}`);
|
|
98
|
+
|
|
99
|
+
// What the agent did after each codegraph_explore (CG-8) — the same classifier
|
|
100
|
+
// the headless A/B uses, over the interactive transcript.
|
|
101
|
+
//
|
|
102
|
+
// A subagent's calls live in their OWN file here (headless stream-json
|
|
103
|
+
// interleaves them into one stream instead), so they are stitched back in:
|
|
104
|
+
// each `agent-*.meta.json` carries the `toolUseId` of the Task that spawned it,
|
|
105
|
+
// which is exactly the `parent_tool_use_id` the classifier keys threads on.
|
|
106
|
+
// Without that, a delegated search would score as "the agent moved on".
|
|
107
|
+
const parseLines = (file, parentToolUseId) => readFileSync(file, 'utf8').split('\n')
|
|
108
|
+
.filter(Boolean)
|
|
109
|
+
.map((l) => { try { return JSON.parse(l); } catch { return null; } })
|
|
110
|
+
.filter(Boolean)
|
|
111
|
+
.map((ev) => (parentToolUseId ? { ...ev, parent_tool_use_id: parentToolUseId } : ev));
|
|
112
|
+
|
|
113
|
+
const events = parseLines(join(projDir, sessionId + '.jsonl'));
|
|
114
|
+
if (existsSync(subDir)) {
|
|
115
|
+
for (const f of readdirSync(subDir).filter((f) => f.endsWith('.jsonl'))) {
|
|
116
|
+
let parent = null;
|
|
117
|
+
const meta = join(subDir, f.replace(/\.jsonl$/, '.meta.json'));
|
|
118
|
+
if (existsSync(meta)) { try { parent = JSON.parse(readFileSync(meta, 'utf8')).toolUseId ?? null; } catch { /* unreadable */ } }
|
|
119
|
+
events.push(...parseLines(join(subDir, f), parent ?? `subagent:${f}`));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
console.log('');
|
|
123
|
+
console.log(formatSufficiency({ sufficiency: classifySufficiency(events) }, ''));
|
|
124
|
+
|
|
125
|
+
// How much of what explore returned the answer drew on (CG-9). An interactive
|
|
126
|
+
// transcript has no `result` event, so the answer is the last main-thread
|
|
127
|
+
// assistant text — finalAnswerText already falls back to it.
|
|
128
|
+
console.log('');
|
|
129
|
+
console.log(formatAllocation(
|
|
130
|
+
{ allocation: computeAllocation(collectExploreTexts(events), finalAnswerText(events)) }, ''));
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Deterministic per-file budget-share probe for `codegraph_explore` (CG-6).
|
|
4
|
+
*
|
|
5
|
+
* `probe-explore.mjs` prints what explore returned. This prints how the response
|
|
6
|
+
* was DIVIDED — which files won the byte envelope and in what proportion — and
|
|
7
|
+
* checks that division against a declared expectation. It is the regression gate
|
|
8
|
+
* for GitHub issue #1500 / epic CG-1: an architecture question that doesn't name
|
|
9
|
+
* the exact use-case must concentrate the budget on the code that answers it, not
|
|
10
|
+
* on a generated CRUD layer (or an eval script) that merely name-collides.
|
|
11
|
+
*
|
|
12
|
+
* The numbers come from the CG-4 diagnostic (`CODEGRAPH_EXPLORE_DEBUG`), read back
|
|
13
|
+
* from a JSONL sidecar, so the probe measures the shipping allocator rather than
|
|
14
|
+
* re-deriving shares from the markdown.
|
|
15
|
+
*
|
|
16
|
+
* Fixtures are declared in `allocation-fixtures.json`. A `kind: "fixture"` entry is
|
|
17
|
+
* hermetic — the fixture tree is copied to a fresh temp dir and indexed per run, so
|
|
18
|
+
* two runs on one build give identical numbers. A `kind: "self"` entry reads this
|
|
19
|
+
* repo's live index and therefore moves as the repo changes; its assertions are
|
|
20
|
+
* relative for that reason.
|
|
21
|
+
*
|
|
22
|
+
* Usage (needs a current `npm run build`):
|
|
23
|
+
* node scripts/agent-eval/probe-allocation.mjs # every fixture
|
|
24
|
+
* node scripts/agent-eval/probe-allocation.mjs payroll-go # one fixture
|
|
25
|
+
* node scripts/agent-eval/probe-allocation.mjs --json # machine-readable
|
|
26
|
+
* node scripts/agent-eval/probe-allocation.mjs --keep # keep the temp index
|
|
27
|
+
*
|
|
28
|
+
* Exit code: 0 if every assertion holds, 1 if any fails, 2 on a setup error.
|
|
29
|
+
* BOTH FIXTURES ARE EXPECTED TO FAIL until CG-10/CG-12 land — that failure is the
|
|
30
|
+
* documented bug. Use --expect-fail to invert the exit code while it is the state
|
|
31
|
+
* of the world (0 = still broken, 1 = fixed, go flip the gate).
|
|
32
|
+
*/
|
|
33
|
+
import { cpSync, mkdtempSync, mkdirSync, readFileSync, rmSync, existsSync } from 'node:fs';
|
|
34
|
+
import { tmpdir } from 'node:os';
|
|
35
|
+
import { dirname, join, resolve } from 'node:path';
|
|
36
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
37
|
+
|
|
38
|
+
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
39
|
+
const REPO_ROOT = resolve(HERE, '../..');
|
|
40
|
+
const SPEC_PATH = join(HERE, 'allocation-fixtures.json');
|
|
41
|
+
|
|
42
|
+
const argv = process.argv.slice(2);
|
|
43
|
+
const flags = new Set(argv.filter((a) => a.startsWith('--')));
|
|
44
|
+
const wanted = argv.filter((a) => !a.startsWith('--'));
|
|
45
|
+
const asJson = flags.has('--json');
|
|
46
|
+
const keepTemp = flags.has('--keep');
|
|
47
|
+
const expectFail = flags.has('--expect-fail');
|
|
48
|
+
|
|
49
|
+
const say = (line = '') => { if (!asJson) console.log(line); };
|
|
50
|
+
const pct = (f) => `${(f * 100).toFixed(1)}%`;
|
|
51
|
+
const num = (n) => Math.round(n).toLocaleString('en-US');
|
|
52
|
+
|
|
53
|
+
/** Load the built dist — the probe measures the shipping allocator, not src. */
|
|
54
|
+
async function loadDist() {
|
|
55
|
+
const distIndex = join(REPO_ROOT, 'dist/index.js');
|
|
56
|
+
if (!existsSync(distIndex)) {
|
|
57
|
+
console.error('dist/ not built — run `npm run build` first.');
|
|
58
|
+
process.exit(2);
|
|
59
|
+
}
|
|
60
|
+
const idx = await import(pathToFileURL(distIndex).href);
|
|
61
|
+
const tools = await import(pathToFileURL(join(REPO_ROOT, 'dist/mcp/tools.js')).href);
|
|
62
|
+
// esModuleInterop: dynamic import of CJS yields { default: module.exports, ...named }
|
|
63
|
+
const CodeGraph = idx.default?.default ?? idx.default ?? idx.CodeGraph;
|
|
64
|
+
const ToolHandler = tools.ToolHandler ?? tools.default?.ToolHandler;
|
|
65
|
+
if (typeof CodeGraph?.openSync !== 'function' || typeof ToolHandler !== 'function') {
|
|
66
|
+
console.error('could not resolve CodeGraph/ToolHandler from dist/');
|
|
67
|
+
process.exit(2);
|
|
68
|
+
}
|
|
69
|
+
return { CodeGraph, ToolHandler };
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** `internal/gen/**` → /^internal\/gen\/.*$/ . Supports `**`, `*` and literals. */
|
|
73
|
+
function globToRegExp(glob) {
|
|
74
|
+
// Park `**` on a sentinel no path can contain, so the `*` pass cannot eat it.
|
|
75
|
+
// Written as an escape, not a literal byte — a raw NUL makes git treat this
|
|
76
|
+
// whole script as binary, which costs every future diff of it.
|
|
77
|
+
const DOUBLE_STAR = '\u0000';
|
|
78
|
+
const escaped = glob.replace(/[.+^${}()|[\]\\]/g, '\\$&');
|
|
79
|
+
const body = escaped
|
|
80
|
+
.replace(/\*\*/g, DOUBLE_STAR)
|
|
81
|
+
.replace(/\*/g, '[^/]*')
|
|
82
|
+
.replaceAll(DOUBLE_STAR, '.*');
|
|
83
|
+
return new RegExp(`^${body}$`);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const groupOf = (path, groups) => {
|
|
87
|
+
for (const [name, globs] of Object.entries(groups)) {
|
|
88
|
+
if (globs.some((g) => globToRegExp(g).test(path))) return name;
|
|
89
|
+
}
|
|
90
|
+
return 'other';
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Run one explore call with the diagnostic pointed at a sidecar, and return the
|
|
95
|
+
* report plus the response text.
|
|
96
|
+
*/
|
|
97
|
+
async function runExplore({ CodeGraph, ToolHandler }, repoPath, query, sidecar) {
|
|
98
|
+
const cg = CodeGraph.openSync(repoPath);
|
|
99
|
+
const prior = process.env.CODEGRAPH_EXPLORE_DEBUG;
|
|
100
|
+
process.env.CODEGRAPH_EXPLORE_DEBUG = sidecar;
|
|
101
|
+
try {
|
|
102
|
+
const res = await new ToolHandler(cg).execute('codegraph_explore', { query });
|
|
103
|
+
const text = res.content?.[0]?.text ?? '';
|
|
104
|
+
const lines = readFileSync(sidecar, 'utf-8').trim().split('\n').filter(Boolean);
|
|
105
|
+
if (lines.length === 0) throw new Error('diagnostic produced no report');
|
|
106
|
+
return { report: JSON.parse(lines[lines.length - 1]), text };
|
|
107
|
+
} finally {
|
|
108
|
+
if (prior === undefined) delete process.env.CODEGRAPH_EXPLORE_DEBUG;
|
|
109
|
+
else process.env.CODEGRAPH_EXPLORE_DEBUG = prior;
|
|
110
|
+
try { cg.close?.(); } catch {}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** Copy a fixture tree to a fresh temp dir and index it — hermetic per run. */
|
|
115
|
+
async function materializeFixture({ CodeGraph }, fixturePath) {
|
|
116
|
+
const src = resolve(REPO_ROOT, fixturePath);
|
|
117
|
+
if (!existsSync(src)) throw new Error(`fixture tree not found: ${src}`);
|
|
118
|
+
const dir = mkdtempSync(join(tmpdir(), 'cg-alloc-'));
|
|
119
|
+
cpSync(src, dir, { recursive: true });
|
|
120
|
+
// A stray index inside the checked-in tree would be copied in and reused.
|
|
121
|
+
rmSync(join(dir, '.codegraph'), { recursive: true, force: true });
|
|
122
|
+
const cg = CodeGraph.initSync(dir);
|
|
123
|
+
await cg.indexAll();
|
|
124
|
+
cg.close?.();
|
|
125
|
+
return dir;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** Evaluate one fixture's assertions against its report. Returns check rows. */
|
|
129
|
+
function evaluate(fixture, report, text) {
|
|
130
|
+
const { groups, assert: want } = fixture;
|
|
131
|
+
const delivered = new Map();
|
|
132
|
+
const allocated = new Map();
|
|
133
|
+
for (const f of report.files) {
|
|
134
|
+
const g = groupOf(f.path, groups);
|
|
135
|
+
delivered.set(g, (delivered.get(g) ?? 0) + f.share);
|
|
136
|
+
allocated.set(g, (allocated.get(g) ?? 0) + f.allocatedShare);
|
|
137
|
+
}
|
|
138
|
+
const share = (g) => delivered.get(g) ?? 0;
|
|
139
|
+
const top = report.files
|
|
140
|
+
.filter((f) => f.finalChars > 0)
|
|
141
|
+
.sort((a, b) => b.finalChars - a.finalChars)[0];
|
|
142
|
+
|
|
143
|
+
const checks = [];
|
|
144
|
+
const add = (name, pass, detail) => checks.push({ name, pass, detail });
|
|
145
|
+
|
|
146
|
+
if (want.answerShareAtLeast !== undefined) {
|
|
147
|
+
add(
|
|
148
|
+
`answer group takes >= ${pct(want.answerShareAtLeast)} of the envelope`,
|
|
149
|
+
share('answer') >= want.answerShareAtLeast,
|
|
150
|
+
`answer ${pct(share('answer'))} delivered (${pct(allocated.get('answer') ?? 0)} allocated)`,
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
// Same question against the SOURCE the response delivered rather than the
|
|
154
|
+
// whole envelope (CG-26). The envelope-denominated gate above moves whenever
|
|
155
|
+
// the response's prose does — the epilogue surviving instead of being
|
|
156
|
+
// discarded costs it a point, and every additional admitted file that gets
|
|
157
|
+
// paid dilutes it further — so it cannot tell "the answer was starved" from
|
|
158
|
+
// "everything else was also delivered". Allocation is about source bytes;
|
|
159
|
+
// measure it in source bytes.
|
|
160
|
+
if (want.answerShareOfSourceAtLeast !== undefined) {
|
|
161
|
+
const sourceBy = new Map();
|
|
162
|
+
let totalSource = 0;
|
|
163
|
+
for (const f of report.files) {
|
|
164
|
+
const g = groupOf(f.path, groups);
|
|
165
|
+
sourceBy.set(g, (sourceBy.get(g) ?? 0) + f.finalChars);
|
|
166
|
+
totalSource += f.finalChars;
|
|
167
|
+
}
|
|
168
|
+
const answerSource = totalSource > 0 ? (sourceBy.get('answer') ?? 0) / totalSource : 0;
|
|
169
|
+
add(
|
|
170
|
+
`answer group takes >= ${pct(want.answerShareOfSourceAtLeast)} of DELIVERED SOURCE`,
|
|
171
|
+
answerSource >= want.answerShareOfSourceAtLeast,
|
|
172
|
+
`answer ${num(sourceBy.get('answer') ?? 0)} of ${num(totalSource)} source chars (${pct(answerSource)})`,
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
if (want.incidentalShareAtMost !== undefined) {
|
|
176
|
+
add(
|
|
177
|
+
`incidental group takes <= ${pct(want.incidentalShareAtMost)} of the envelope`,
|
|
178
|
+
share('incidental') <= want.incidentalShareAtMost,
|
|
179
|
+
`incidental ${pct(share('incidental'))} delivered (${pct(allocated.get('incidental') ?? 0)} allocated)`,
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
if (want.topFileGroup) {
|
|
183
|
+
const actual = top ? groupOf(top.path, groups) : '(nothing delivered)';
|
|
184
|
+
add(
|
|
185
|
+
`largest delivered file is in "${want.topFileGroup}"`,
|
|
186
|
+
actual === want.topFileGroup,
|
|
187
|
+
top ? `${top.path} (${pct(top.share)}, group "${actual}")` : 'no file delivered any source',
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
for (const path of want.mustDeliverBytes ?? []) {
|
|
191
|
+
const rec = report.files.find((f) => f.path === path);
|
|
192
|
+
add(
|
|
193
|
+
`${path} delivers source`,
|
|
194
|
+
!!rec && rec.finalChars > 0,
|
|
195
|
+
rec
|
|
196
|
+
? `${num(rec.finalChars)} delivered of ${num(rec.emittedChars)} allocated` +
|
|
197
|
+
(rec.finalChars === 0 && rec.emittedChars > 0 ? ' — hard ceiling dropped the whole section' : '') +
|
|
198
|
+
(rec.emittedChars === 0 ? ` — never rendered (${rec.skipped ?? 'not reached'}, rank #${rec.rank})` : '')
|
|
199
|
+
: 'not among the ranked candidates',
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
// Reservation-vs-delivered, per file (CG-36). The share gates above ask which
|
|
203
|
+
// files won the envelope; this asks whether a file that WON its share then
|
|
204
|
+
// actually spent it. A file can rank #1, be reserved the largest slice, and
|
|
205
|
+
// still deliver a quarter of it because the cluster carrying the answer was
|
|
206
|
+
// dropped whole instead of shrunk — and the share gates read that as a pass,
|
|
207
|
+
// since the unspent bytes carry forward and the envelope stays full.
|
|
208
|
+
for (const [path, floor] of Object.entries(want.spendShareAtLeast ?? {})) {
|
|
209
|
+
const rec = report.files.find((f) => f.path === path);
|
|
210
|
+
const spent = rec && rec.allowance ? rec.finalChars / rec.allowance : 0;
|
|
211
|
+
add(
|
|
212
|
+
`${path} spends >= ${pct(floor)} of its reservation`,
|
|
213
|
+
!!rec && rec.allowance > 0 && spent >= floor,
|
|
214
|
+
rec
|
|
215
|
+
? `${num(rec.finalChars)} delivered of a ${num(rec.allowance ?? 0)} reservation (${pct(spent)})`
|
|
216
|
+
: 'not among the ranked candidates',
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
for (const needle of want.mustContain ?? []) {
|
|
220
|
+
add(`response contains "${needle}"`, text.includes(needle), text.includes(needle) ? 'present' : 'absent');
|
|
221
|
+
}
|
|
222
|
+
return { checks, delivered, allocated, top };
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function printReport(fixture, report, evaluated) {
|
|
226
|
+
const { checks, delivered, allocated } = evaluated;
|
|
227
|
+
const env = report.envelope;
|
|
228
|
+
say('');
|
|
229
|
+
say(`── ${fixture.id} — ${fixture.title}`);
|
|
230
|
+
say(` query "${report.query}"`);
|
|
231
|
+
say(` project ${report.projectRoot} · ${num(report.indexedFileCount)} files indexed`);
|
|
232
|
+
say(
|
|
233
|
+
` envelope ${num(env.chars)} delivered · ${num(env.allocatedChars)} allocated` +
|
|
234
|
+
` of ${num(report.budget.maxOutputChars)} budget (hard ceiling ${num(report.budget.hardCeiling)})` +
|
|
235
|
+
`${env.overBudget ? ' [over budget]' : ''}${env.truncated ? ' [TRUNCATED]' : ''}`,
|
|
236
|
+
);
|
|
237
|
+
say('');
|
|
238
|
+
say(' group alloc% deliv%');
|
|
239
|
+
for (const g of ['answer', 'incidental', 'other']) {
|
|
240
|
+
if (!delivered.has(g) && !allocated.has(g)) continue;
|
|
241
|
+
say(` ${g.padEnd(12)} ${pct(allocated.get(g) ?? 0).padStart(6)} ${pct(delivered.get(g) ?? 0).padStart(6)}`);
|
|
242
|
+
}
|
|
243
|
+
say('');
|
|
244
|
+
say(' # alloc% deliv% bytes score graph hits gen render file');
|
|
245
|
+
for (const f of report.files.filter((f) => f.emittedChars > 0 || f.finalChars > 0)) {
|
|
246
|
+
say(
|
|
247
|
+
' ' + String(f.rank).padStart(2) + ' ' +
|
|
248
|
+
pct(f.allocatedShare).padStart(6) + ' ' +
|
|
249
|
+
pct(f.share).padStart(6) + ' ' +
|
|
250
|
+
num(f.emittedChars).padStart(7) + ' ' +
|
|
251
|
+
String(f.score).padStart(5) + ' ' +
|
|
252
|
+
f.graphScore.toFixed(5).padStart(7) + ' ' +
|
|
253
|
+
String(f.termHits).padStart(4) + ' ' +
|
|
254
|
+
(f.generated ? ' ✓ ' : ' ') + ' ' +
|
|
255
|
+
((f.render ?? '-') + (f.clipped ? '*' : '')).padEnd(9) + ' ' +
|
|
256
|
+
f.path,
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
say('');
|
|
260
|
+
for (const c of checks) say(` ${c.pass ? 'PASS' : 'FAIL'} ${c.name}\n ${c.detail}`);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
async function main() {
|
|
264
|
+
const spec = JSON.parse(readFileSync(SPEC_PATH, 'utf-8'));
|
|
265
|
+
const fixtures = spec.fixtures.filter((f) => wanted.length === 0 || wanted.includes(f.id));
|
|
266
|
+
if (fixtures.length === 0) {
|
|
267
|
+
console.error(`no fixture matched ${JSON.stringify(wanted)}; known: ${spec.fixtures.map((f) => f.id).join(', ')}`);
|
|
268
|
+
process.exit(2);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
const dist = await loadDist();
|
|
272
|
+
const sidecarDir = mkdtempSync(join(tmpdir(), 'cg-alloc-diag-'));
|
|
273
|
+
const results = [];
|
|
274
|
+
const temps = [];
|
|
275
|
+
|
|
276
|
+
for (const fixture of fixtures) {
|
|
277
|
+
let repoPath;
|
|
278
|
+
if (fixture.kind === 'fixture') {
|
|
279
|
+
repoPath = await materializeFixture(dist, fixture.path);
|
|
280
|
+
temps.push(repoPath);
|
|
281
|
+
} else {
|
|
282
|
+
repoPath = resolve(REPO_ROOT, fixture.path);
|
|
283
|
+
if (!existsSync(join(repoPath, '.codegraph'))) {
|
|
284
|
+
console.error(`${fixture.id}: ${repoPath} has no .codegraph index — run \`codegraph init\` there first.`);
|
|
285
|
+
process.exit(2);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
const sidecar = join(sidecarDir, `${fixture.id}.jsonl`);
|
|
290
|
+
mkdirSync(dirname(sidecar), { recursive: true });
|
|
291
|
+
const { report, text } = await runExplore(dist, repoPath, fixture.query, sidecar);
|
|
292
|
+
const evaluated = evaluate(fixture, report, text);
|
|
293
|
+
printReport(fixture, report, evaluated);
|
|
294
|
+
results.push({
|
|
295
|
+
id: fixture.id,
|
|
296
|
+
kind: fixture.kind,
|
|
297
|
+
query: fixture.query,
|
|
298
|
+
passed: evaluated.checks.every((c) => c.pass),
|
|
299
|
+
checks: evaluated.checks,
|
|
300
|
+
shares: {
|
|
301
|
+
delivered: Object.fromEntries(evaluated.delivered),
|
|
302
|
+
allocated: Object.fromEntries(evaluated.allocated),
|
|
303
|
+
},
|
|
304
|
+
envelope: report.envelope,
|
|
305
|
+
files: report.files.filter((f) => f.emittedChars > 0 || f.finalChars > 0),
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
if (!keepTemp) {
|
|
310
|
+
for (const dir of temps) rmSync(dir, { recursive: true, force: true });
|
|
311
|
+
rmSync(sidecarDir, { recursive: true, force: true });
|
|
312
|
+
} else {
|
|
313
|
+
say('');
|
|
314
|
+
say(` kept: ${[...temps, sidecarDir].join(' ')}`);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
const allPassed = results.every((r) => r.passed);
|
|
318
|
+
if (asJson) {
|
|
319
|
+
console.log(JSON.stringify({ passed: allPassed, fixtures: results }, null, 2));
|
|
320
|
+
} else {
|
|
321
|
+
say('');
|
|
322
|
+
for (const r of results) say(`${r.passed ? 'PASS' : 'FAIL'} ${r.id}`);
|
|
323
|
+
if (!allPassed) {
|
|
324
|
+
say('');
|
|
325
|
+
say('Failures here are the DOCUMENTED #1500 bug — the budget goes to files that merely');
|
|
326
|
+
say('name-collide with the query. They become the pass gate once CG-10/CG-12 land.');
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
process.exit(expectFail ? (allPassed ? 1 : 0) : (allPassed ? 0 : 1));
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
main().catch((err) => {
|
|
333
|
+
console.error(err?.stack ?? String(err));
|
|
334
|
+
process.exit(2);
|
|
335
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Probe codegraph_context (with call-paths) against an index using the built dist.
|
|
3
|
+
// Usage: node probe-context.mjs <repo-with-.codegraph> <task words...>
|
|
4
|
+
import { pathToFileURL } from 'node:url';
|
|
5
|
+
import { resolve } from 'node:path';
|
|
6
|
+
|
|
7
|
+
const [, , repo, ...taskParts] = process.argv;
|
|
8
|
+
const task = taskParts.join(' ');
|
|
9
|
+
if (!repo || !task) { console.error('usage: probe-context.mjs <repo> <task...>'); process.exit(1); }
|
|
10
|
+
|
|
11
|
+
const load = async (rel) => import(pathToFileURL(resolve(rel)).href);
|
|
12
|
+
const idx = await load('dist/index.js');
|
|
13
|
+
const tools = await load('dist/mcp/tools.js');
|
|
14
|
+
const CodeGraph = idx.default?.default ?? idx.default ?? idx.CodeGraph;
|
|
15
|
+
const ToolHandler = tools.ToolHandler ?? tools.default?.ToolHandler;
|
|
16
|
+
|
|
17
|
+
const cg = CodeGraph.openSync(repo);
|
|
18
|
+
const h = new ToolHandler(cg);
|
|
19
|
+
const res = await h.execute('codegraph_context', { task });
|
|
20
|
+
console.log(res.content?.[0]?.text ?? '(no text)');
|
|
21
|
+
try { cg.close?.(); } catch {}
|