@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,87 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# Build the native extraction kernel (codegraph-kernel) and stage the .node
|
|
4
|
+
# where the TS loader (src/extraction/kernel/loader.ts) finds it for
|
|
5
|
+
# from-source runs and tests:
|
|
6
|
+
#
|
|
7
|
+
# codegraph-kernel/prebuilds/<platform>-<arch>/codegraph-kernel.node
|
|
8
|
+
#
|
|
9
|
+
# The kernel is OPTIONAL everywhere: when the .node is absent the extraction
|
|
10
|
+
# path falls back to the wasm pipeline. This script needs a Rust toolchain
|
|
11
|
+
# (rustup.rs); nothing else in the repo does.
|
|
12
|
+
#
|
|
13
|
+
# Usage:
|
|
14
|
+
# scripts/build-kernel.sh # host platform
|
|
15
|
+
# scripts/build-kernel.sh --target <rust-triple> [--platform <plat-arch>]
|
|
16
|
+
#
|
|
17
|
+
# The cross-compile form is what the release workflow uses (e.g.
|
|
18
|
+
# --target x86_64-apple-darwin --platform darwin-x64 on a macos-arm runner).
|
|
19
|
+
set -euo pipefail
|
|
20
|
+
|
|
21
|
+
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
22
|
+
CRATE="$ROOT/codegraph-kernel"
|
|
23
|
+
|
|
24
|
+
TARGET=""
|
|
25
|
+
PLATFORM=""
|
|
26
|
+
while [ $# -gt 0 ]; do
|
|
27
|
+
case "$1" in
|
|
28
|
+
--target) TARGET="$2"; shift 2 ;;
|
|
29
|
+
--platform) PLATFORM="$2"; shift 2 ;;
|
|
30
|
+
*) echo "unknown arg: $1" >&2; exit 1 ;;
|
|
31
|
+
esac
|
|
32
|
+
done
|
|
33
|
+
|
|
34
|
+
# Map a rust triple (or the host) to the bundle-target naming used across the
|
|
35
|
+
# release pipeline (darwin-arm64, linux-x64, win32-arm64, ...).
|
|
36
|
+
if [ -z "$PLATFORM" ]; then
|
|
37
|
+
if [ -n "$TARGET" ]; then
|
|
38
|
+
case "$TARGET" in
|
|
39
|
+
aarch64-apple-darwin) PLATFORM="darwin-arm64" ;;
|
|
40
|
+
x86_64-apple-darwin) PLATFORM="darwin-x64" ;;
|
|
41
|
+
x86_64-unknown-linux-gnu) PLATFORM="linux-x64" ;;
|
|
42
|
+
aarch64-unknown-linux-gnu) PLATFORM="linux-arm64" ;;
|
|
43
|
+
x86_64-pc-windows-msvc) PLATFORM="win32-x64" ;;
|
|
44
|
+
aarch64-pc-windows-msvc) PLATFORM="win32-arm64" ;;
|
|
45
|
+
*) echo "cannot map rust target '$TARGET' to a platform name; pass --platform" >&2; exit 1 ;;
|
|
46
|
+
esac
|
|
47
|
+
else
|
|
48
|
+
case "$(uname -s)-$(uname -m)" in
|
|
49
|
+
Darwin-arm64) PLATFORM="darwin-arm64" ;;
|
|
50
|
+
Darwin-x86_64) PLATFORM="darwin-x64" ;;
|
|
51
|
+
Linux-x86_64) PLATFORM="linux-x64" ;;
|
|
52
|
+
Linux-aarch64) PLATFORM="linux-arm64" ;;
|
|
53
|
+
MINGW*-x86_64|MSYS*-x86_64) PLATFORM="win32-x64" ;;
|
|
54
|
+
MINGW*-aarch64|MSYS*-aarch64) PLATFORM="win32-arm64" ;;
|
|
55
|
+
*) echo "unrecognized host $(uname -s)-$(uname -m); pass --platform" >&2; exit 1 ;;
|
|
56
|
+
esac
|
|
57
|
+
fi
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
echo "[kernel] building codegraph-kernel for ${PLATFORM}${TARGET:+ (target $TARGET)}"
|
|
61
|
+
cd "$CRATE"
|
|
62
|
+
if [ -n "$TARGET" ]; then
|
|
63
|
+
rustup target add "$TARGET" >/dev/null 2>&1 || true
|
|
64
|
+
cargo build --release --target "$TARGET"
|
|
65
|
+
OUTDIR="$CRATE/target/$TARGET/release"
|
|
66
|
+
else
|
|
67
|
+
cargo build --release
|
|
68
|
+
OUTDIR="$CRATE/target/release"
|
|
69
|
+
fi
|
|
70
|
+
|
|
71
|
+
# cdylib name differs per OS; the staged name is always codegraph-kernel.node.
|
|
72
|
+
case "$PLATFORM" in
|
|
73
|
+
darwin-*) LIB="$OUTDIR/libcodegraph_kernel.dylib" ;;
|
|
74
|
+
linux-*) LIB="$OUTDIR/libcodegraph_kernel.so" ;;
|
|
75
|
+
win32-*) LIB="$OUTDIR/codegraph_kernel.dll" ;;
|
|
76
|
+
esac
|
|
77
|
+
[ -f "$LIB" ] || { echo "[kernel] error: built library not found at $LIB" >&2; exit 1; }
|
|
78
|
+
|
|
79
|
+
DEST="$CRATE/prebuilds/$PLATFORM"
|
|
80
|
+
mkdir -p "$DEST"
|
|
81
|
+
# rm first so the copy lands on a FRESH inode: overwriting a signed dylib in
|
|
82
|
+
# place leaves macOS's per-inode signature cache stale, and every process
|
|
83
|
+
# that then dlopens the staged .node is SIGKILLed at load (the on-disk
|
|
84
|
+
# signature still verifies, which makes it maddening to diagnose).
|
|
85
|
+
rm -f "$DEST/codegraph-kernel.node"
|
|
86
|
+
cp "$LIB" "$DEST/codegraph-kernel.node"
|
|
87
|
+
echo "[kernel] staged $DEST/codegraph-kernel.node ($(du -h "$DEST/codegraph-kernel.node" | cut -f1))"
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Dump a .codegraph/codegraph.db graph by NATURAL KEYS (no rowids, no
|
|
4
|
+
* timestamps), sorted — two dumps diff clean iff the graphs are semantically
|
|
5
|
+
* identical. The byte-identical gate used by every perf/kernel PR:
|
|
6
|
+
*
|
|
7
|
+
* node scripts/dump-graph.mjs <repo-or-db> > a.dump
|
|
8
|
+
* node scripts/dump-graph.mjs <repo-or-db> > b.dump
|
|
9
|
+
* diff a.dump b.dump
|
|
10
|
+
*
|
|
11
|
+
* Volatile fields excluded: nodes.updated_at, files.modified_at/indexed_at/
|
|
12
|
+
* content_hash+size (environment-dependent), edges.id / unresolved_refs.id
|
|
13
|
+
* (insertion rowids), and unresolved_refs.status (resolution bookkeeping —
|
|
14
|
+
* kept, actually: status is deterministic given the same input; excluded only
|
|
15
|
+
* if it proves flaky. We keep status.)
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { DatabaseSync } from 'node:sqlite';
|
|
19
|
+
import * as fs from 'node:fs';
|
|
20
|
+
import * as path from 'node:path';
|
|
21
|
+
|
|
22
|
+
const arg = process.argv[2];
|
|
23
|
+
if (!arg) {
|
|
24
|
+
console.error('usage: dump-graph.mjs <repo-root-or-db-path>');
|
|
25
|
+
process.exit(2);
|
|
26
|
+
}
|
|
27
|
+
let dbPath = arg;
|
|
28
|
+
if (fs.statSync(arg).isDirectory()) {
|
|
29
|
+
dbPath = path.join(arg, '.codegraph', 'codegraph.db');
|
|
30
|
+
}
|
|
31
|
+
const db = new DatabaseSync(dbPath, { readOnly: true });
|
|
32
|
+
|
|
33
|
+
function dump(title, sql) {
|
|
34
|
+
const rows = db.prepare(sql).all();
|
|
35
|
+
const lines = rows.map((r) => JSON.stringify(r)).sort();
|
|
36
|
+
process.stdout.write(`== ${title} (${lines.length})\n`);
|
|
37
|
+
for (const l of lines) process.stdout.write(l + '\n');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
dump(
|
|
41
|
+
'nodes',
|
|
42
|
+
`SELECT id, kind, name, qualified_name, file_path, language, start_line, end_line,
|
|
43
|
+
start_column, end_column, docstring, signature, visibility, is_exported,
|
|
44
|
+
is_async, is_static, is_abstract, decorators, type_parameters, return_type
|
|
45
|
+
FROM nodes`
|
|
46
|
+
);
|
|
47
|
+
dump(
|
|
48
|
+
'edges',
|
|
49
|
+
`SELECT source, target, kind, metadata, line, col, provenance FROM edges`
|
|
50
|
+
);
|
|
51
|
+
dump(
|
|
52
|
+
'refs',
|
|
53
|
+
`SELECT from_node_id, reference_name, reference_kind, line, col, candidates,
|
|
54
|
+
file_path, language, status, name_tail
|
|
55
|
+
FROM unresolved_refs`
|
|
56
|
+
);
|
|
57
|
+
dump('files', `SELECT path, language, node_count FROM files`);
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Extract a release-notes block from CHANGELOG.md for a given version
|
|
4
|
+
* (or unwrap text supplied on stdin), then join hard-wrapped paragraphs.
|
|
5
|
+
*
|
|
6
|
+
* Why: GitHub renders release-note Markdown with GFM hard breaks, so
|
|
7
|
+
* every `\n` becomes `<br>`. The CHANGELOG is hard-wrapped at ~75
|
|
8
|
+
* chars for readable diffs, which then renders as awkward visible
|
|
9
|
+
* line breaks on the release page. This script joins indented
|
|
10
|
+
* continuation lines into a single line per bullet so the GFM
|
|
11
|
+
* renderer produces clean paragraphs.
|
|
12
|
+
*
|
|
13
|
+
* Repo-level CHANGELOG.md viewing is unaffected (CommonMark treats
|
|
14
|
+
* newlines as spaces there).
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* extract-release-notes.mjs <version> # read CHANGELOG.md
|
|
18
|
+
* extract-release-notes.mjs --stdin # read from stdin (any text)
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { readFileSync } from 'fs';
|
|
22
|
+
|
|
23
|
+
const arg = process.argv[2];
|
|
24
|
+
if (!arg) {
|
|
25
|
+
console.error('usage: extract-release-notes.mjs <version> | --stdin');
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
let block;
|
|
30
|
+
if (arg === '--stdin') {
|
|
31
|
+
block = readFileSync(0, 'utf8').replace(/\r\n?/g, '\n').split('\n');
|
|
32
|
+
} else {
|
|
33
|
+
const version = arg;
|
|
34
|
+
const escaped = version.replace(/\./g, '\\.');
|
|
35
|
+
const headerRe = new RegExp(`^## \\[${escaped}\\]`);
|
|
36
|
+
const anyHeaderRe = /^## \[/;
|
|
37
|
+
const lines = readFileSync('CHANGELOG.md', 'utf8').split('\n');
|
|
38
|
+
const start = lines.findIndex((l) => headerRe.test(l));
|
|
39
|
+
if (start === -1) {
|
|
40
|
+
console.error(`no '## [${version}]' entry found in CHANGELOG.md`);
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
const after = lines.findIndex((l, i) => i > start && anyHeaderRe.test(l));
|
|
44
|
+
block = lines.slice(start, after === -1 ? lines.length : after);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Track a stack of `{ indent: number }` frames so a continuation line
|
|
48
|
+
// can attach to the right ancestor. Handles the post-nested-list
|
|
49
|
+
// continuation pattern:
|
|
50
|
+
//
|
|
51
|
+
// - top-level
|
|
52
|
+
// - nested
|
|
53
|
+
// back to top-level <- 2-space indent, joins the top-level bullet
|
|
54
|
+
const out = [];
|
|
55
|
+
let buf = '';
|
|
56
|
+
let stack = [];
|
|
57
|
+
|
|
58
|
+
function flushBuf() {
|
|
59
|
+
if (buf !== '') {
|
|
60
|
+
out.push(buf);
|
|
61
|
+
buf = '';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function leadingSpaces(s) {
|
|
66
|
+
const m = s.match(/^(\s*)/);
|
|
67
|
+
return m ? m[1].length : 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Bullets: `-`, `*`, `digit.` only. `+` is intentionally excluded — the
|
|
71
|
+
// CHANGELOG uses literal `+` inline (`config + instructions`) and we
|
|
72
|
+
// don't want to misread those as nested bullets.
|
|
73
|
+
const listItemRe = /^(\s*)([-*]|\d+\.)\s+/;
|
|
74
|
+
const fenceRe = /^\s*```/;
|
|
75
|
+
|
|
76
|
+
let inFence = false;
|
|
77
|
+
|
|
78
|
+
for (const line of block) {
|
|
79
|
+
// Fenced code blocks: pass through verbatim, no joining.
|
|
80
|
+
if (fenceRe.test(line)) {
|
|
81
|
+
flushBuf();
|
|
82
|
+
stack = [];
|
|
83
|
+
out.push(line);
|
|
84
|
+
inFence = !inFence;
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
if (inFence) {
|
|
88
|
+
out.push(line);
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
if (/^\s*$/.test(line)) {
|
|
92
|
+
flushBuf();
|
|
93
|
+
out.push('');
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
if (/^#/.test(line)) {
|
|
97
|
+
flushBuf();
|
|
98
|
+
stack = [];
|
|
99
|
+
out.push(line);
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
const itemMatch = line.match(listItemRe);
|
|
103
|
+
if (itemMatch) {
|
|
104
|
+
flushBuf();
|
|
105
|
+
const indent = itemMatch[1].length;
|
|
106
|
+
while (stack.length > 0 && stack[stack.length - 1].indent >= indent) {
|
|
107
|
+
stack.pop();
|
|
108
|
+
}
|
|
109
|
+
stack.push({ indent });
|
|
110
|
+
buf = line;
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
if (/^\s/.test(line)) {
|
|
114
|
+
const indent = leadingSpaces(line);
|
|
115
|
+
while (stack.length > 1 && stack[stack.length - 1].indent >= indent) {
|
|
116
|
+
flushBuf();
|
|
117
|
+
stack.pop();
|
|
118
|
+
}
|
|
119
|
+
const trimmed = line.replace(/^\s+/, '');
|
|
120
|
+
buf = buf === '' ? trimmed : `${buf} ${trimmed}`;
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
flushBuf();
|
|
124
|
+
stack = [];
|
|
125
|
+
out.push(line);
|
|
126
|
+
}
|
|
127
|
+
flushBuf();
|
|
128
|
+
|
|
129
|
+
process.stdout.write(out.join('\n'));
|
|
130
|
+
if (!out[out.length - 1]?.endsWith('\n')) process.stdout.write('\n');
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Kernel↔wasm extraction parity harness (R2/R3 of the kernel migration).
|
|
4
|
+
*
|
|
5
|
+
* Runs BOTH extraction paths over the given files/directories and diffs the
|
|
6
|
+
* per-file ExtractionResults as sets (nodes/edges/refs, canonicalized), so a
|
|
7
|
+
* behavioral gap in the native kernel shows up as a categorized diff instead
|
|
8
|
+
* of a graph-dump surprise later. This is the fast inner loop; the §5 gate's
|
|
9
|
+
* full-repo dump-diff still runs before any default-on.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* node scripts/kernel-parity.mjs <file-or-dir>... [--lang typescript,tsx]
|
|
13
|
+
* [--max-samples N] [--list-files] [--max-deferral 0.1]
|
|
14
|
+
*
|
|
15
|
+
* --max-deferral: the broken-kernel backstop (default 0.1). For C/C++ pass
|
|
16
|
+
* 0.5: macro-heavy C/C++ trees genuinely parse with errors at 10–40% file
|
|
17
|
+
* rates even after the preParse blanking family (git 19%, protobuf 26%, fmt
|
|
18
|
+
* 42% — measured 2026-07-17), and every erroring file defers BY POLICY, so
|
|
19
|
+
* the 10% bar calibrated on the 0–0.4% incidence of ts/java/py/go would fail
|
|
20
|
+
* healthy sweeps. A broken walker still trips 0.5 (it defers ~everything).
|
|
21
|
+
*
|
|
22
|
+
* Requires: npm run build (dist/) and a staged kernel (npm run build:kernel).
|
|
23
|
+
* Exit code: 0 = parity, 1 = diffs found, 2 = setup error.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import * as fs from 'node:fs';
|
|
27
|
+
import * as path from 'node:path';
|
|
28
|
+
import { fileURLToPath } from 'node:url';
|
|
29
|
+
|
|
30
|
+
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
31
|
+
const dist = (p) => path.join(ROOT, 'dist', p);
|
|
32
|
+
|
|
33
|
+
const args = process.argv.slice(2);
|
|
34
|
+
const paths = [];
|
|
35
|
+
let langFilter = null;
|
|
36
|
+
let maxSamples = 5;
|
|
37
|
+
let listFiles = false;
|
|
38
|
+
let maxDeferral = 0.1;
|
|
39
|
+
for (let i = 0; i < args.length; i++) {
|
|
40
|
+
if (args[i] === '--lang') langFilter = new Set(args[++i].split(','));
|
|
41
|
+
else if (args[i] === '--max-samples') maxSamples = Number(args[++i]);
|
|
42
|
+
else if (args[i] === '--list-files') listFiles = true;
|
|
43
|
+
else if (args[i] === '--max-deferral') maxDeferral = Number(args[++i]);
|
|
44
|
+
else paths.push(args[i]);
|
|
45
|
+
}
|
|
46
|
+
if (paths.length === 0) {
|
|
47
|
+
console.error('usage: kernel-parity.mjs <file-or-dir>... [--lang ts,tsx] [--max-samples N]');
|
|
48
|
+
process.exit(2);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const KERNEL_LANGS = new Set(['typescript', 'tsx', 'javascript', 'jsx', 'java', 'python', 'go', 'c', 'cpp', 'rust', 'csharp', 'ruby', 'php', 'swift', 'kotlin', 'r', 'lua', 'luau', 'scala', 'dart']);
|
|
52
|
+
const EXTS = new Map([
|
|
53
|
+
['.ts', 'typescript'], ['.mts', 'typescript'], ['.cts', 'typescript'],
|
|
54
|
+
['.tsx', 'tsx'], ['.js', 'javascript'], ['.mjs', 'javascript'],
|
|
55
|
+
['.cjs', 'javascript'], ['.jsx', 'jsx'], ['.java', 'java'], ['.py', 'python'], ['.pyw', 'python'], ['.go', 'go'],
|
|
56
|
+
// C/C++ (R7a). `.h` needs CONTENT sniffing (C vs C++) — resolved per file
|
|
57
|
+
// in the run loop via detectLanguage, matching the real indexer's routing.
|
|
58
|
+
['.c', 'c'], ['.h', 'detect'],
|
|
59
|
+
['.cpp', 'cpp'], ['.cc', 'cpp'], ['.cxx', 'cpp'], ['.hpp', 'cpp'], ['.hxx', 'cpp'],
|
|
60
|
+
['.metal', 'cpp'], ['.cu', 'cpp'], ['.cuh', 'cpp'],
|
|
61
|
+
['.rs', 'rust'], // R7b
|
|
62
|
+
['.cs', 'csharp'], // R7b
|
|
63
|
+
['.rb', 'ruby'], ['.rake', 'ruby'], // R7b
|
|
64
|
+
['.php', 'php'], ['.module', 'php'], ['.install', 'php'], ['.theme', 'php'], ['.inc', 'php'], // R7b
|
|
65
|
+
['.swift', 'swift'], // R7b
|
|
66
|
+
['.kt', 'kotlin'], ['.kts', 'kotlin'], // R7b
|
|
67
|
+
['.r', 'r'], // R7b batch 4 — real-world casing is `.R`; extname lowercased below
|
|
68
|
+
['.lua', 'lua'], ['.luau', 'luau'], // R7b batch 4
|
|
69
|
+
['.scala', 'scala'], ['.sc', 'scala'], // R7b batch 4
|
|
70
|
+
['.dart', 'dart'], // R7b batch 4
|
|
71
|
+
]);
|
|
72
|
+
|
|
73
|
+
/** Collect candidate files. */
|
|
74
|
+
function collect(p, out) {
|
|
75
|
+
let st;
|
|
76
|
+
try {
|
|
77
|
+
st = fs.statSync(p); // dangling symlinks (Linux-tree dtc fixtures) throw
|
|
78
|
+
} catch {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (st.isDirectory()) {
|
|
82
|
+
const base = path.basename(p);
|
|
83
|
+
if (base === 'node_modules' || base === '.git' || base === 'dist' || base === '.codegraph') return;
|
|
84
|
+
for (const e of fs.readdirSync(p)) collect(path.join(p, e), out);
|
|
85
|
+
} else if (EXTS.has(path.extname(p).toLowerCase())) {
|
|
86
|
+
// Lowercased to match the real indexer's routing (detectLanguage
|
|
87
|
+
// lowercases the extension — `.R` is the dominant real-world casing).
|
|
88
|
+
const lang = EXTS.get(path.extname(p).toLowerCase());
|
|
89
|
+
// 'detect' (.h) resolves per file in the run loop; under --lang it rides
|
|
90
|
+
// along whenever either C-family language is requested.
|
|
91
|
+
const passes =
|
|
92
|
+
!langFilter ||
|
|
93
|
+
(lang === 'detect' ? langFilter.has('c') || langFilter.has('cpp') : langFilter.has(lang));
|
|
94
|
+
if (passes) out.push({ file: p, lang });
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const files = [];
|
|
99
|
+
for (const p of paths) collect(path.resolve(p), files);
|
|
100
|
+
if (files.length === 0) {
|
|
101
|
+
console.error('no matching files');
|
|
102
|
+
process.exit(2);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// --- load the built engine ---------------------------------------------------
|
|
106
|
+
const { extractFromSource } = await import(dist('extraction/tree-sitter.js'));
|
|
107
|
+
const { initGrammars, loadGrammarsForLanguages, detectLanguage } = await import(dist('extraction/grammars.js'));
|
|
108
|
+
const kernel = await import(dist('extraction/kernel/index.js'));
|
|
109
|
+
|
|
110
|
+
await initGrammars();
|
|
111
|
+
await loadGrammarsForLanguages([...KERNEL_LANGS]);
|
|
112
|
+
|
|
113
|
+
if (!kernel.getKernel()) {
|
|
114
|
+
console.error('kernel .node not found — run: npm run build:kernel');
|
|
115
|
+
process.exit(2);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// --- canonicalization ---------------------------------------------------------
|
|
119
|
+
/**
|
|
120
|
+
* Node identity for cross-referencing edges/refs: the node id itself (both
|
|
121
|
+
* paths compute the same deterministic ids, and id embeds kind+name+line).
|
|
122
|
+
*/
|
|
123
|
+
function canonNode(n) {
|
|
124
|
+
const out = {
|
|
125
|
+
id: n.id, kind: n.kind, name: n.name, qualifiedName: n.qualifiedName,
|
|
126
|
+
filePath: n.filePath, language: n.language,
|
|
127
|
+
startLine: n.startLine, endLine: n.endLine,
|
|
128
|
+
startColumn: n.startColumn, endColumn: n.endColumn,
|
|
129
|
+
};
|
|
130
|
+
for (const k of ['docstring', 'signature', 'visibility', 'isExported', 'isAsync', 'isStatic', 'isAbstract', 'returnType']) {
|
|
131
|
+
if (n[k] !== undefined) out[k] = n[k];
|
|
132
|
+
}
|
|
133
|
+
if (n.decorators !== undefined) out.decorators = n.decorators;
|
|
134
|
+
if (n.typeParameters !== undefined) out.typeParameters = n.typeParameters;
|
|
135
|
+
return JSON.stringify(out);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function canonEdge(e) {
|
|
139
|
+
const out = { source: e.source, target: e.target, kind: e.kind };
|
|
140
|
+
if (e.line !== undefined) out.line = e.line;
|
|
141
|
+
if (e.column !== undefined) out.column = e.column;
|
|
142
|
+
if (e.provenance !== undefined) out.provenance = e.provenance;
|
|
143
|
+
if (e.metadata !== undefined) out.metadata = e.metadata;
|
|
144
|
+
return JSON.stringify(out);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function canonRef(r) {
|
|
148
|
+
// FULL object — a field only one path sets is a parity bug (the vitest
|
|
149
|
+
// parity suite caught decode.ts pre-filling filePath/language this way).
|
|
150
|
+
const out = {
|
|
151
|
+
from: r.fromNodeId, name: r.referenceName, kind: r.referenceKind,
|
|
152
|
+
line: r.line, column: r.column,
|
|
153
|
+
};
|
|
154
|
+
for (const k of ['filePath', 'language', 'candidates', 'rowId']) {
|
|
155
|
+
if (r[k] !== undefined) out[k] = r[k];
|
|
156
|
+
}
|
|
157
|
+
return JSON.stringify(out);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function diffSets(aList, bList) {
|
|
161
|
+
const a = new Map(); // canon -> count (multiset — duplicates matter)
|
|
162
|
+
const b = new Map();
|
|
163
|
+
for (const x of aList) a.set(x, (a.get(x) ?? 0) + 1);
|
|
164
|
+
for (const x of bList) b.set(x, (b.get(x) ?? 0) + 1);
|
|
165
|
+
const onlyA = [];
|
|
166
|
+
const onlyB = [];
|
|
167
|
+
for (const [k, c] of a) {
|
|
168
|
+
const d = c - (b.get(k) ?? 0);
|
|
169
|
+
for (let i = 0; i < d; i++) onlyA.push(k);
|
|
170
|
+
}
|
|
171
|
+
for (const [k, c] of b) {
|
|
172
|
+
const d = c - (a.get(k) ?? 0);
|
|
173
|
+
for (let i = 0; i < d; i++) onlyB.push(k);
|
|
174
|
+
}
|
|
175
|
+
return { onlyA, onlyB };
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// --- run ----------------------------------------------------------------------
|
|
179
|
+
const buckets = new Map(); // category -> {count, samples[]}
|
|
180
|
+
function report(category, sample) {
|
|
181
|
+
let b = buckets.get(category);
|
|
182
|
+
if (!b) buckets.set(category, (b = { count: 0, samples: [] }));
|
|
183
|
+
b.count++;
|
|
184
|
+
if (b.samples.length < maxSamples) b.samples.push(sample);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
let filesWithDiffs = 0;
|
|
188
|
+
let filesOk = 0;
|
|
189
|
+
let deferred = 0;
|
|
190
|
+
let processed = 0; // collected files minus content-detect skips
|
|
191
|
+
let totals = { nodes: 0, edges: 0, refs: 0 };
|
|
192
|
+
|
|
193
|
+
process.env.CODEGRAPH_KERNEL_LANGS = 'all';
|
|
194
|
+
|
|
195
|
+
for (const { file, lang: extLang } of files) {
|
|
196
|
+
const source = fs.readFileSync(file, 'utf8');
|
|
197
|
+
const rel = path.relative(ROOT, file);
|
|
198
|
+
// `.h` resolves C vs C++ by content — the same call the indexer makes.
|
|
199
|
+
const lang = extLang === 'detect' ? detectLanguage(rel, source) : extLang;
|
|
200
|
+
if (!KERNEL_LANGS.has(lang)) continue;
|
|
201
|
+
if (langFilter && !langFilter.has(lang)) continue;
|
|
202
|
+
processed++;
|
|
203
|
+
|
|
204
|
+
delete process.env.CODEGRAPH_KERNEL; // kernel path on
|
|
205
|
+
const kres = kernel.tryKernelExtract(rel, source, lang);
|
|
206
|
+
if (!kres) {
|
|
207
|
+
// Expected: files with parse errors defer to wasm (parity by
|
|
208
|
+
// construction — both arms run the same extractor). Counted, and
|
|
209
|
+
// guarded below so a broken kernel can't silently defer everything.
|
|
210
|
+
deferred++;
|
|
211
|
+
report('kernel-deferred', rel);
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
process.env.CODEGRAPH_KERNEL = '0'; // wasm path
|
|
215
|
+
const wres = extractFromSource(rel, source, lang);
|
|
216
|
+
delete process.env.CODEGRAPH_KERNEL;
|
|
217
|
+
|
|
218
|
+
totals.nodes += wres.nodes.length;
|
|
219
|
+
totals.edges += wres.edges.length;
|
|
220
|
+
totals.refs += wres.unresolvedReferences.length;
|
|
221
|
+
|
|
222
|
+
let fileHasDiff = false;
|
|
223
|
+
const tables = [
|
|
224
|
+
['node', wres.nodes.map(canonNode), kres.nodes.map(canonNode)],
|
|
225
|
+
['edge', wres.edges.map(canonEdge), kres.edges.map(canonEdge)],
|
|
226
|
+
['ref', wres.unresolvedReferences.map(canonRef), kres.unresolvedReferences.map(canonRef)],
|
|
227
|
+
];
|
|
228
|
+
for (const [table, wasm, kern] of tables) {
|
|
229
|
+
const { onlyA, onlyB } = diffSets(wasm, kern);
|
|
230
|
+
for (const x of onlyA) {
|
|
231
|
+
fileHasDiff = true;
|
|
232
|
+
const o = JSON.parse(x);
|
|
233
|
+
report(`${table}:missing-in-kernel:${o.kind ?? ''}`, `${rel}: ${x}`);
|
|
234
|
+
}
|
|
235
|
+
for (const x of onlyB) {
|
|
236
|
+
fileHasDiff = true;
|
|
237
|
+
const o = JSON.parse(x);
|
|
238
|
+
report(`${table}:extra-in-kernel:${o.kind ?? ''}`, `${rel}: ${x}`);
|
|
239
|
+
}
|
|
240
|
+
// ORDER matters too: identical multisets in a different emission order
|
|
241
|
+
// change DB rowids, and resolution iterates refs in rowid order — the
|
|
242
|
+
// full-index dump-diff would surface it as a downstream mystery. Catch it
|
|
243
|
+
// here instead.
|
|
244
|
+
if (onlyA.length === 0 && onlyB.length === 0) {
|
|
245
|
+
for (let i = 0; i < wasm.length; i++) {
|
|
246
|
+
if (wasm[i] !== kern[i]) {
|
|
247
|
+
fileHasDiff = true;
|
|
248
|
+
report(`${table}:order-mismatch`, `${rel}: index ${i}: wasm=${wasm[i]} kernel=${kern[i]}`);
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
if (fileHasDiff) {
|
|
255
|
+
filesWithDiffs++;
|
|
256
|
+
if (listFiles) console.log(`DIFF ${rel}`);
|
|
257
|
+
} else {
|
|
258
|
+
filesOk++;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
console.log(`\n=== kernel parity: ${filesOk}/${processed} files byte-parity` +
|
|
263
|
+
` (${filesWithDiffs} with diffs, ${deferred} deferred-to-wasm)` +
|
|
264
|
+
` | wasm totals: ${totals.nodes} nodes / ${totals.edges} edges / ${totals.refs} refs ===\n`);
|
|
265
|
+
|
|
266
|
+
const sorted = [...buckets.entries()].sort((a, b) => b[1].count - a[1].count);
|
|
267
|
+
for (const [cat, { count, samples }] of sorted) {
|
|
268
|
+
console.log(`--- ${cat}: ${count}`);
|
|
269
|
+
for (const s of samples) console.log(` ${s.length > 400 ? s.slice(0, 400) + '…' : s}`);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// Deferrals are per-file parse-error routing (expected; rare for most
|
|
273
|
+
// languages, routine for macro-heavy C/C++ — see --max-deferral above). A
|
|
274
|
+
// rate past the threshold means the kernel is broken and hiding behind the
|
|
275
|
+
// fallback — fail loudly.
|
|
276
|
+
const deferralRate = deferred / Math.max(processed, 1);
|
|
277
|
+
if (deferralRate > maxDeferral) {
|
|
278
|
+
console.error(
|
|
279
|
+
`deferral rate ${(deferralRate * 100).toFixed(1)}% exceeds ${(maxDeferral * 100).toFixed(0)}% — kernel likely broken`
|
|
280
|
+
);
|
|
281
|
+
process.exit(1);
|
|
282
|
+
}
|
|
283
|
+
process.exit(filesWithDiffs > 0 ? 1 : 0);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Build the current branch and link it as the global `codegraph` for
|
|
3
|
+
# hands-on testing. Replaces any existing global install for as long
|
|
4
|
+
# as the symlink is in place.
|
|
5
|
+
#
|
|
6
|
+
# Usage:
|
|
7
|
+
# ./scripts/local-install.sh # build + link
|
|
8
|
+
# ./scripts/local-install.sh --undo # unlink + restore the published version
|
|
9
|
+
|
|
10
|
+
set -euo pipefail
|
|
11
|
+
|
|
12
|
+
cd "$(dirname "$0")/.."
|
|
13
|
+
|
|
14
|
+
PKG=$(node -p "require('./package.json').name")
|
|
15
|
+
VERSION=$(node -p "require('./package.json').version")
|
|
16
|
+
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
17
|
+
|
|
18
|
+
if [ "${1:-}" = "--undo" ]; then
|
|
19
|
+
echo "→ unlinking ${PKG}"
|
|
20
|
+
npm unlink -g "${PKG}" >/dev/null 2>&1 || true
|
|
21
|
+
echo "→ reinstalling published ${PKG}"
|
|
22
|
+
npm install -g "${PKG}"
|
|
23
|
+
echo "done: global codegraph -> $(command -v codegraph)"
|
|
24
|
+
exit 0
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
echo "→ building ${PKG} ${VERSION} (${BRANCH})"
|
|
28
|
+
npm run build
|
|
29
|
+
|
|
30
|
+
echo "→ linking globally"
|
|
31
|
+
npm link
|
|
32
|
+
|
|
33
|
+
LINKED=$(command -v codegraph || echo "(not on PATH)")
|
|
34
|
+
echo
|
|
35
|
+
echo "✓ global codegraph now points to this branch"
|
|
36
|
+
echo " binary: ${LINKED}"
|
|
37
|
+
echo " branch: ${BRANCH}"
|
|
38
|
+
echo " version: ${VERSION}"
|
|
39
|
+
echo
|
|
40
|
+
echo "To restore the published version:"
|
|
41
|
+
echo " ./scripts/local-install.sh --undo"
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
//
|
|
3
|
+
// Programmatic / embedded SDK entry for @colbymchenry/codegraph (issue #354).
|
|
4
|
+
//
|
|
5
|
+
// The CLI/MCP `bin` (npm-shim.js) execs the per-platform bundle's OWN Node 24 so
|
|
6
|
+
// the tool never depends on the user's runtime. Embedded library consumers are
|
|
7
|
+
// the opposite case: they already run their own Node and just want the compiled
|
|
8
|
+
// API — `require("@colbymchenry/codegraph")` returning the CodeGraph class et al.
|
|
9
|
+
//
|
|
10
|
+
// The compiled library + its production dependencies (web-tree-sitter,
|
|
11
|
+
// tree-sitter-wasms, …) ship INSIDE the per-platform bundle, at
|
|
12
|
+
// @colbymchenry/codegraph-<platform>-<arch>/lib/dist/index.js
|
|
13
|
+
// (with the deps in the sibling lib/node_modules). Re-exporting that bundle keeps
|
|
14
|
+
// the main package thin — no second 50 MB copy of the grammars — while making the
|
|
15
|
+
// SDK work in the consumer's process. Types are a separate concern: the main
|
|
16
|
+
// package ships its own dist/**/*.d.ts tree (pointed at by `types`), built from
|
|
17
|
+
// the same release so it can never skew from the runtime it re-exports.
|
|
18
|
+
//
|
|
19
|
+
// node:sqlite (Node >= 22.5) is required to OPEN a graph, but only lazily inside
|
|
20
|
+
// the SQLite adapter — so loading this module is safe on older Node, and the
|
|
21
|
+
// node:sqlite requirement surfaces with an actionable error only when a DB is
|
|
22
|
+
// actually opened. Heavy extraction additionally wants the bundled launcher's
|
|
23
|
+
// --liftoff-only flag (the WASM Zone-OOM guard, issues #293/#298); an embedded
|
|
24
|
+
// host that drives large indexing should pass that flag to its own Node.
|
|
25
|
+
|
|
26
|
+
var path = require('path');
|
|
27
|
+
var os = require('os');
|
|
28
|
+
var fs = require('fs');
|
|
29
|
+
|
|
30
|
+
var target = process.platform + '-' + process.arch; // e.g. darwin-arm64, linux-x64
|
|
31
|
+
var pkg = '@colbymchenry/codegraph-' + target;
|
|
32
|
+
|
|
33
|
+
module.exports = require(resolveLibrary());
|
|
34
|
+
|
|
35
|
+
// Locate the compiled library entry inside the installed per-platform bundle.
|
|
36
|
+
// Throws an actionable error (rather than a bare MODULE_NOT_FOUND) when no bundle
|
|
37
|
+
// is present, so an embedded consumer knows exactly what to install.
|
|
38
|
+
function resolveLibrary() {
|
|
39
|
+
// 1) The npm-installed optional dependency — the normal case.
|
|
40
|
+
try {
|
|
41
|
+
return require.resolve(pkg + '/lib/dist/index.js');
|
|
42
|
+
} catch (e) {
|
|
43
|
+
/* fall through to the self-healed cache */
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// 2) A bundle the CLI shim self-healed from GitHub Releases into the cache
|
|
47
|
+
// (issue #303). Same node/lib/bin layout as the npm package. We only REUSE a
|
|
48
|
+
// cached bundle here — unlike the CLI shim we never trigger a network
|
|
49
|
+
// download from inside require(), which must stay synchronous and cheap.
|
|
50
|
+
var cached = cachedLibrary();
|
|
51
|
+
if (cached) return cached;
|
|
52
|
+
|
|
53
|
+
throw new Error(
|
|
54
|
+
'codegraph: the programmatic API is unavailable because the platform bundle\n' +
|
|
55
|
+
'(' + pkg + ') is not installed.\n' +
|
|
56
|
+
'The compiled library ships inside that per-platform optional dependency.\n' +
|
|
57
|
+
'Fixes:\n' +
|
|
58
|
+
' - install from the official npm registry so the matching bundle is fetched:\n' +
|
|
59
|
+
' npm i @colbymchenry/codegraph --registry=https://registry.npmjs.org\n' +
|
|
60
|
+
' - or run the CLI once (e.g. `npx @colbymchenry/codegraph status`) to\n' +
|
|
61
|
+
' self-heal the bundle into ~/.codegraph, then require() will find it.'
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function cachedLibrary() {
|
|
66
|
+
try {
|
|
67
|
+
var version = require(path.join(__dirname, 'package.json')).version;
|
|
68
|
+
var base = process.env.CODEGRAPH_INSTALL_DIR || path.join(os.homedir(), '.codegraph');
|
|
69
|
+
var lib = path.join(base, 'bundles', target + '-' + version, 'lib', 'dist', 'index.js');
|
|
70
|
+
if (fs.existsSync(lib)) return lib;
|
|
71
|
+
} catch (e) {
|
|
72
|
+
/* no readable cache → caller reports the install guidance */
|
|
73
|
+
}
|
|
74
|
+
return null;
|
|
75
|
+
}
|