@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,451 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ZCode target. Writes:
|
|
4
|
+
*
|
|
5
|
+
* - MCP server entry to `~/.zcode/cli/config.json` (global) or
|
|
6
|
+
* `./.zcode/config.json` (local) under the NESTED `mcp.servers.codegraph`
|
|
7
|
+
* key — NOT Claude/Cursor's top-level `mcpServers`. Plain stdio shape
|
|
8
|
+
* `{ type: 'stdio', command, args: ['serve', '--mcp'] }` that does not
|
|
9
|
+
* proactively write `enabled` (absent means enabled). A user-set
|
|
10
|
+
* `enabled` value (e.g. a manual `enabled: false` disable) is preserved
|
|
11
|
+
* when an install rewrites the entry — see writeMcpEntry.
|
|
12
|
+
* - Instructions to `~/.zcode/AGENTS.md` (global) or `./AGENTS.md`
|
|
13
|
+
* (local — ZCode reads the project root file directly, not one under
|
|
14
|
+
* `.zcode/`).
|
|
15
|
+
* - Front-load prompt hook (global only) into the same config.json under
|
|
16
|
+
* `hooks.events.UserPromptSubmit` (phase two, §7.1): a `process` hook
|
|
17
|
+
* running `<node> <CLI entry js> prompt-hook --context-json`. ZCode is
|
|
18
|
+
* the second client in the ecosystem with a UserPromptSubmit event, but
|
|
19
|
+
* it parses hook stdout as STRICT JSON — hence the `--context-json`
|
|
20
|
+
* envelope flag (see src/prompt-hook-output.ts). Workspace-level hooks
|
|
21
|
+
* are IGNORED by the current ZCode (logged, never run), so a local
|
|
22
|
+
* install with promptHook skips the hook and says so. The evidence is
|
|
23
|
+
* mixed: the official web docs (zcode.z.ai/en/docs/hooks) state the
|
|
24
|
+
* current version ignores workspace-level hooks, while the locally
|
|
25
|
+
* installed zcode-guide documentation lists workspace config as a
|
|
26
|
+
* legitimate hook source. Not verified empirically — global-only is
|
|
27
|
+
* the conservative correct choice; if workspace hooks are ever
|
|
28
|
+
* confirmed to run, extend this target with a local hook write.
|
|
29
|
+
*
|
|
30
|
+
* ZCode launches the MCP server with the correct project cwd (verified),
|
|
31
|
+
* so no `--path` correction is injected (Claude/Codex class, not Cursor).
|
|
32
|
+
* No permissions concept — a no-op like Codex.
|
|
33
|
+
*
|
|
34
|
+
* The config file is NEVER deleted on uninstall: it can carry `plugins` /
|
|
35
|
+
* `skills` / sibling servers. Uninstall only prunes `mcp.servers.codegraph`,
|
|
36
|
+
* any container (`mcp.servers`, `mcp`) that becomes empty, and our prompt
|
|
37
|
+
* hook entry — `hooks.enabled` is left alone (it may serve the user's own
|
|
38
|
+
* hooks), so even a fully emptied `hooks: { enabled: true }` survives.
|
|
39
|
+
*/
|
|
40
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
41
|
+
if (k2 === undefined) k2 = k;
|
|
42
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
43
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
44
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
45
|
+
}
|
|
46
|
+
Object.defineProperty(o, k2, desc);
|
|
47
|
+
}) : (function(o, m, k, k2) {
|
|
48
|
+
if (k2 === undefined) k2 = k;
|
|
49
|
+
o[k2] = m[k];
|
|
50
|
+
}));
|
|
51
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
52
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
53
|
+
}) : function(o, v) {
|
|
54
|
+
o["default"] = v;
|
|
55
|
+
});
|
|
56
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
57
|
+
var ownKeys = function(o) {
|
|
58
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
59
|
+
var ar = [];
|
|
60
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
61
|
+
return ar;
|
|
62
|
+
};
|
|
63
|
+
return ownKeys(o);
|
|
64
|
+
};
|
|
65
|
+
return function (mod) {
|
|
66
|
+
if (mod && mod.__esModule) return mod;
|
|
67
|
+
var result = {};
|
|
68
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
69
|
+
__setModuleDefault(result, mod);
|
|
70
|
+
return result;
|
|
71
|
+
};
|
|
72
|
+
})();
|
|
73
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
74
|
+
exports.zcodeTarget = exports.resolveZcodeCliEntry = void 0;
|
|
75
|
+
exports.resolveZcodeMcpCommand = resolveZcodeMcpCommand;
|
|
76
|
+
exports.buildZcodePromptHook = buildZcodePromptHook;
|
|
77
|
+
exports.writeZcodePromptHookEntry = writeZcodePromptHookEntry;
|
|
78
|
+
exports.removeZcodePromptHookEntry = removeZcodePromptHookEntry;
|
|
79
|
+
const fs = __importStar(require("fs"));
|
|
80
|
+
const path = __importStar(require("path"));
|
|
81
|
+
const os = __importStar(require("os"));
|
|
82
|
+
const shared_1 = require("./shared");
|
|
83
|
+
Object.defineProperty(exports, "resolveZcodeCliEntry", { enumerable: true, get: function () { return shared_1.resolveCodegraphCliEntry; } });
|
|
84
|
+
const instructions_template_1 = require("../instructions-template");
|
|
85
|
+
function configDir(loc) {
|
|
86
|
+
return loc === 'global'
|
|
87
|
+
? path.join(os.homedir(), '.zcode')
|
|
88
|
+
: path.join(process.cwd(), '.zcode');
|
|
89
|
+
}
|
|
90
|
+
function configJsonPath(loc) {
|
|
91
|
+
// global → ~/.zcode/cli/config.json; local → ./.zcode/config.json.
|
|
92
|
+
return loc === 'global'
|
|
93
|
+
? path.join(configDir('global'), 'cli', 'config.json')
|
|
94
|
+
: path.join(configDir('local'), 'config.json');
|
|
95
|
+
}
|
|
96
|
+
function instructionsPath(loc) {
|
|
97
|
+
// Global AGENTS.md lives under ~/.zcode/; project-local AGENTS.md lives
|
|
98
|
+
// at the project root (NOT under .zcode/), matching how ZCode's
|
|
99
|
+
// hierarchical context loader searches.
|
|
100
|
+
return loc === 'global'
|
|
101
|
+
? path.join(configDir('global'), 'AGENTS.md')
|
|
102
|
+
: path.join(process.cwd(), 'AGENTS.md');
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Resolve the `command` for the ZCode MCP entry (D1).
|
|
106
|
+
*
|
|
107
|
+
* On Windows the launcher on PATH is `codegraph.cmd`, and Node spawns `.cmd`
|
|
108
|
+
* shims only through a shell — a bare `codegraph` fails (the same lesson the
|
|
109
|
+
* Claude prompt hook learned, #1466). We scan PATH for `codegraph.cmd` and
|
|
110
|
+
* return its absolute path (the form already validated on this machine's
|
|
111
|
+
* hand-written ZCode entry); when it isn't found we fall back to the
|
|
112
|
+
* `codegraph.cmd` spelling. Other platforms use the bare `codegraph`.
|
|
113
|
+
*
|
|
114
|
+
* The absolute path is normalized to forward slashes: the hand-written entry
|
|
115
|
+
* form validated on this machine uses them, and ZCode/Node spawn both forms
|
|
116
|
+
* identically on Windows — but `jsonDeepEqual` does NOT, so keeping
|
|
117
|
+
* `path.join`'s backslashes would flag a byte-identical existing entry as
|
|
118
|
+
* `updated` instead of `unchanged` on first run.
|
|
119
|
+
*
|
|
120
|
+
* Exported so the unit tests can pin the PATH-scan and fallback behavior.
|
|
121
|
+
*/
|
|
122
|
+
function resolveZcodeMcpCommand() {
|
|
123
|
+
if (process.platform !== 'win32')
|
|
124
|
+
return 'codegraph';
|
|
125
|
+
const pathVar = process.env.PATH || '';
|
|
126
|
+
for (const dir of pathVar.split(path.delimiter)) {
|
|
127
|
+
if (!dir)
|
|
128
|
+
continue;
|
|
129
|
+
const candidate = path.join(dir, 'codegraph.cmd');
|
|
130
|
+
try {
|
|
131
|
+
if (fs.existsSync(candidate))
|
|
132
|
+
return candidate.replace(/\\/g, '/');
|
|
133
|
+
}
|
|
134
|
+
catch { /* ignore unreadable PATH entries */ }
|
|
135
|
+
}
|
|
136
|
+
return 'codegraph.cmd';
|
|
137
|
+
}
|
|
138
|
+
function buildZcodeMcpConfig() {
|
|
139
|
+
const base = (0, shared_1.getMcpServerConfig)();
|
|
140
|
+
return { ...base, command: resolveZcodeMcpCommand() };
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* The ZCode prompt hook the installer writes (see
|
|
144
|
+
* writeZcodePromptHookEntry): `node <entry js> prompt-hook --context-json`.
|
|
145
|
+
* `type: "process"` (argv-direct execution, no shell — ZCode's documented
|
|
146
|
+
* recommendation). No matcher (it is meaningless for UserPromptSubmit) and
|
|
147
|
+
* no timeout (the 60s default is ample).
|
|
148
|
+
*/
|
|
149
|
+
function buildZcodePromptHook() {
|
|
150
|
+
return {
|
|
151
|
+
type: 'process',
|
|
152
|
+
command: process.execPath.replace(/\\/g, '/'),
|
|
153
|
+
args: [(0, shared_1.resolveCodegraphCliEntry)(), 'prompt-hook', '--context-json'],
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* True when a ZCode hook entry (a `{type, command, args}` object) is the
|
|
158
|
+
* prompt hook this installer writes. Matched on ARGS only — the joined
|
|
159
|
+
* array must contain both `prompt-hook` and `--context-json` — because
|
|
160
|
+
* `command`/`args[0]` are re-derived at every install (node upgrades, CLI
|
|
161
|
+
* moves) and must not break identity. The pair is codegraph-specific
|
|
162
|
+
* enough that a user's unrelated hooks never match, while a hand-copied
|
|
163
|
+
* variant of ours still does.
|
|
164
|
+
*/
|
|
165
|
+
function isZcodePromptHook(h) {
|
|
166
|
+
if (!h || typeof h !== 'object' || Array.isArray(h))
|
|
167
|
+
return false;
|
|
168
|
+
const args = h.args;
|
|
169
|
+
if (!Array.isArray(args))
|
|
170
|
+
return false;
|
|
171
|
+
const joined = args.map(String).join(' ');
|
|
172
|
+
return joined.includes('prompt-hook') && joined.includes('--context-json');
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Write the front-load `UserPromptSubmit` hook into the GLOBAL
|
|
176
|
+
* `~/.zcode/cli/config.json` — `hooks.enabled: true` (config-file hooks
|
|
177
|
+
* are disabled by default in ZCode) plus one matcher-group under
|
|
178
|
+
* `hooks.events.UserPromptSubmit`. Idempotent: an entry of ours already
|
|
179
|
+
* present (matched by args) gets command/args rewritten in place — a node
|
|
180
|
+
* or CLI-location change self-heals on the next install — and a
|
|
181
|
+
* byte-identical file is left untouched (`unchanged`). Sibling events,
|
|
182
|
+
* sibling hooks, and every other key (`mcp`, `plugins`, `skills`, ...) are
|
|
183
|
+
* preserved. Never called for `local`: ZCode ignores workspace-level hooks
|
|
184
|
+
* in the current version.
|
|
185
|
+
*/
|
|
186
|
+
function writeZcodePromptHookEntry() {
|
|
187
|
+
const file = configJsonPath('global');
|
|
188
|
+
const dir = path.dirname(file);
|
|
189
|
+
if (!fs.existsSync(dir))
|
|
190
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
191
|
+
const created = !fs.existsSync(file);
|
|
192
|
+
const config = (0, shared_1.readJsonFile)(file);
|
|
193
|
+
if (!config.hooks || typeof config.hooks !== 'object' || Array.isArray(config.hooks)) {
|
|
194
|
+
config.hooks = {};
|
|
195
|
+
}
|
|
196
|
+
if (!config.hooks.events || typeof config.hooks.events !== 'object' || Array.isArray(config.hooks.events)) {
|
|
197
|
+
config.hooks.events = {};
|
|
198
|
+
}
|
|
199
|
+
if (!Array.isArray(config.hooks.events.UserPromptSubmit)) {
|
|
200
|
+
config.hooks.events.UserPromptSubmit = [];
|
|
201
|
+
}
|
|
202
|
+
const want = buildZcodePromptHook();
|
|
203
|
+
// Self-heal: rewrite an installer-written entry's command/args to the
|
|
204
|
+
// current node/entry paths instead of appending a duplicate.
|
|
205
|
+
let found = false;
|
|
206
|
+
let changed = false;
|
|
207
|
+
for (const group of config.hooks.events.UserPromptSubmit) {
|
|
208
|
+
if (!group || !Array.isArray(group.hooks))
|
|
209
|
+
continue;
|
|
210
|
+
for (const h of group.hooks) {
|
|
211
|
+
if (!isZcodePromptHook(h))
|
|
212
|
+
continue;
|
|
213
|
+
found = true;
|
|
214
|
+
if (h.command !== want.command || !(0, shared_1.jsonDeepEqual)(h.args, want.args)) {
|
|
215
|
+
h.command = want.command;
|
|
216
|
+
h.args = want.args;
|
|
217
|
+
changed = true;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (!found) {
|
|
222
|
+
config.hooks.events.UserPromptSubmit.push({ hooks: [want] });
|
|
223
|
+
}
|
|
224
|
+
// Only an install of the hook may set `enabled` — a user who disabled
|
|
225
|
+
// hooks has no working hooks at all, and ours cannot run without it.
|
|
226
|
+
if (found && !changed && config.hooks.enabled === true) {
|
|
227
|
+
return { path: file, action: 'unchanged' };
|
|
228
|
+
}
|
|
229
|
+
config.hooks.enabled = true;
|
|
230
|
+
(0, shared_1.writeJsonFile)(file, config);
|
|
231
|
+
return { path: file, action: created ? 'created' : 'updated' };
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Remove the front-load `UserPromptSubmit` hook this installer may have
|
|
235
|
+
* written (see writeZcodePromptHookEntry). Used by `uninstall` and by
|
|
236
|
+
* `install` when the user opts out, so the choice round-trips. Surgical at
|
|
237
|
+
* the entry level: only args matching ours are dropped, so the user's own
|
|
238
|
+
* hooks — even in the same event/group — survive. Empty groups are pruned,
|
|
239
|
+
* then events left with no groups; `hooks.enabled` is deliberately left
|
|
240
|
+
* untouched (it may serve the user's remaining hooks), so a config whose
|
|
241
|
+
* hooks we emptied keeps `hooks: { enabled: true }`. Global file only — we
|
|
242
|
+
* never write hooks at workspace scope.
|
|
243
|
+
*/
|
|
244
|
+
function removeZcodePromptHookEntry() {
|
|
245
|
+
const file = configJsonPath('global');
|
|
246
|
+
if (!fs.existsSync(file))
|
|
247
|
+
return { path: file, action: 'not-found' };
|
|
248
|
+
const config = (0, shared_1.readJsonFile)(file);
|
|
249
|
+
const hooks = config.hooks;
|
|
250
|
+
if (!hooks || typeof hooks !== 'object' || Array.isArray(hooks)) {
|
|
251
|
+
return { path: file, action: 'unchanged' };
|
|
252
|
+
}
|
|
253
|
+
const events = hooks.events;
|
|
254
|
+
if (!events || typeof events !== 'object' || Array.isArray(events)) {
|
|
255
|
+
return { path: file, action: 'unchanged' };
|
|
256
|
+
}
|
|
257
|
+
// Pass 1: drop our hook entries from inside every event group.
|
|
258
|
+
let removedAny = false;
|
|
259
|
+
for (const name of Object.keys(events)) {
|
|
260
|
+
const groups = events[name];
|
|
261
|
+
if (!Array.isArray(groups))
|
|
262
|
+
continue;
|
|
263
|
+
for (const group of groups) {
|
|
264
|
+
if (!group || !Array.isArray(group.hooks))
|
|
265
|
+
continue;
|
|
266
|
+
const before = group.hooks.length;
|
|
267
|
+
group.hooks = group.hooks.filter((h) => !isZcodePromptHook(h));
|
|
268
|
+
if (group.hooks.length !== before)
|
|
269
|
+
removedAny = true;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
if (!removedAny)
|
|
273
|
+
return { path: file, action: 'unchanged' };
|
|
274
|
+
// Pass 2: prune groups with no hooks left, then events with no groups,
|
|
275
|
+
// then an emptied `events` object. Guarded by removedAny so a config
|
|
276
|
+
// with no hook of ours is left byte-for-byte untouched.
|
|
277
|
+
for (const name of Object.keys(events)) {
|
|
278
|
+
const groups = events[name];
|
|
279
|
+
if (!Array.isArray(groups))
|
|
280
|
+
continue;
|
|
281
|
+
events[name] = groups.filter((g) => !(g && Array.isArray(g.hooks) && g.hooks.length === 0));
|
|
282
|
+
if (events[name].length === 0)
|
|
283
|
+
delete events[name];
|
|
284
|
+
}
|
|
285
|
+
if (Object.keys(events).length === 0)
|
|
286
|
+
delete hooks.events;
|
|
287
|
+
(0, shared_1.writeJsonFile)(file, config);
|
|
288
|
+
return { path: file, action: 'removed' };
|
|
289
|
+
}
|
|
290
|
+
class ZcodeTarget {
|
|
291
|
+
id = 'zcode';
|
|
292
|
+
displayName = 'ZCode';
|
|
293
|
+
docsUrl = 'https://zcode.z.ai/en/docs/hooks';
|
|
294
|
+
supportsLocation(_loc) {
|
|
295
|
+
return true;
|
|
296
|
+
}
|
|
297
|
+
detect(loc) {
|
|
298
|
+
const file = configJsonPath(loc);
|
|
299
|
+
let alreadyConfigured = !!(0, shared_1.readJsonFile)(file).mcp?.servers?.codegraph;
|
|
300
|
+
// D3 — read-only fallbacks. We only ever WRITE the main
|
|
301
|
+
// `.zcode/config.json`, but a project may already be wired through
|
|
302
|
+
// ZCode's alternate `./zcode.json` or the standard `./.agents/mcp.json`
|
|
303
|
+
// (both use the top-level `mcpServers` key). Reading them keeps
|
|
304
|
+
// `alreadyConfigured` honest so reinstall reports unchanged instead of
|
|
305
|
+
// double-writing. LOCAL checks both alternate files; GLOBAL checks the
|
|
306
|
+
// user-level `~/.agents/mcp.json` (same top-level `mcpServers` shape).
|
|
307
|
+
if (loc === 'local' && !alreadyConfigured) {
|
|
308
|
+
alreadyConfigured =
|
|
309
|
+
!!(0, shared_1.readJsonFile)(path.join(process.cwd(), 'zcode.json')).mcpServers?.codegraph ||
|
|
310
|
+
!!(0, shared_1.readJsonFile)(path.join(process.cwd(), '.agents', 'mcp.json')).mcpServers?.codegraph;
|
|
311
|
+
}
|
|
312
|
+
else if (loc === 'global' && !alreadyConfigured) {
|
|
313
|
+
alreadyConfigured =
|
|
314
|
+
!!(0, shared_1.readJsonFile)(path.join(os.homedir(), '.agents', 'mcp.json')).mcpServers?.codegraph;
|
|
315
|
+
}
|
|
316
|
+
const installed = loc === 'global'
|
|
317
|
+
? fs.existsSync(configDir('global')) || fs.existsSync(file)
|
|
318
|
+
: fs.existsSync(file);
|
|
319
|
+
return { installed, alreadyConfigured, configPath: file };
|
|
320
|
+
}
|
|
321
|
+
install(loc, opts) {
|
|
322
|
+
const files = [];
|
|
323
|
+
const notes = [];
|
|
324
|
+
// 0. Front-load prompt hook (§7.1), tri-state like Claude's:
|
|
325
|
+
// true → write it (global only — ZCode ignores workspace hooks)
|
|
326
|
+
// false → strip any a prior install wrote (opt-out round-trips)
|
|
327
|
+
// undefined → leave untouched (refresh / unmanaged callers)
|
|
328
|
+
// Local + true is not an error, just a no-op with a note: the current
|
|
329
|
+
// ZCode logs-and-ignores project-level hooks (per the official web
|
|
330
|
+
// docs, zcode.z.ai/en/docs/hooks — see the file-header note for why
|
|
331
|
+
// this is the conservative choice), so the hook is user-scope only.
|
|
332
|
+
if (loc === 'global') {
|
|
333
|
+
if (opts.promptHook === true) {
|
|
334
|
+
files.push(writeZcodePromptHookEntry());
|
|
335
|
+
}
|
|
336
|
+
else if (opts.promptHook === false) {
|
|
337
|
+
const removed = removeZcodePromptHookEntry();
|
|
338
|
+
if (removed.action === 'removed')
|
|
339
|
+
files.push(removed);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
else if (opts.promptHook === true) {
|
|
343
|
+
notes.push('ZCode currently ignores project-level hooks — the prompt hook is user-scope only; re-run with --location=global.');
|
|
344
|
+
}
|
|
345
|
+
// 1. MCP server entry
|
|
346
|
+
// Shadowing warning (global only): once ANY server exists under
|
|
347
|
+
// `~/.zcode/cli/config.json`'s `mcp.servers`, ZCode stops reading
|
|
348
|
+
// servers from the same-scope user-level `~/.agents/mcp.json` (the
|
|
349
|
+
// `.zcode` file takes precedence). If we are about to create the
|
|
350
|
+
// first entry there while `~/.agents/mcp.json` already carries
|
|
351
|
+
// servers, the user is about to silently lose them — say so.
|
|
352
|
+
if (loc === 'global') {
|
|
353
|
+
const current = (0, shared_1.readJsonFile)(configJsonPath('global'));
|
|
354
|
+
const serversEmpty = !current.mcp?.servers || Object.keys(current.mcp.servers).length === 0;
|
|
355
|
+
const agentsServers = (0, shared_1.readJsonFile)(path.join(os.homedir(), '.agents', 'mcp.json')).mcpServers;
|
|
356
|
+
if (serversEmpty && agentsServers && Object.keys(agentsServers).length > 0) {
|
|
357
|
+
notes.push('Note: adding a server to ~/.zcode/cli/config.json makes ZCode ignore servers in ~/.agents/mcp.json (same-scope .zcode takes precedence) — move them over if you rely on them.');
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
files.push(writeMcpEntry(loc));
|
|
361
|
+
// AGENTS.md gets the short marker-fenced CodeGraph block (#704):
|
|
362
|
+
// subagents and non-MCP harnesses read AGENTS.md but never the MCP
|
|
363
|
+
// initialize instructions. Upsert self-heals a stale pre-#529 block.
|
|
364
|
+
files.push((0, shared_1.upsertInstructionsEntry)(instructionsPath(loc)));
|
|
365
|
+
notes.push('Restart ZCode for MCP changes to take effect.');
|
|
366
|
+
return { files, notes };
|
|
367
|
+
}
|
|
368
|
+
uninstall(loc) {
|
|
369
|
+
const files = [];
|
|
370
|
+
// 0. Remove the prompt hook this installer may have written (global
|
|
371
|
+
// only — the local scope never carries one). `hooks.enabled` stays
|
|
372
|
+
// put: it may serve the user's own remaining hooks.
|
|
373
|
+
if (loc === 'global') {
|
|
374
|
+
const hookCleanup = removeZcodePromptHookEntry();
|
|
375
|
+
if (hookCleanup.action === 'removed')
|
|
376
|
+
files.push(hookCleanup);
|
|
377
|
+
}
|
|
378
|
+
const file = configJsonPath(loc);
|
|
379
|
+
const config = (0, shared_1.readJsonFile)(file);
|
|
380
|
+
if (config.mcp?.servers?.codegraph) {
|
|
381
|
+
delete config.mcp.servers.codegraph;
|
|
382
|
+
if (Object.keys(config.mcp.servers).length === 0) {
|
|
383
|
+
delete config.mcp.servers;
|
|
384
|
+
}
|
|
385
|
+
if (Object.keys(config.mcp).length === 0) {
|
|
386
|
+
delete config.mcp;
|
|
387
|
+
}
|
|
388
|
+
// D2 — never delete config.json itself. It can carry plugins/skills/
|
|
389
|
+
// sibling servers; even an emptied `{}` is left in place.
|
|
390
|
+
(0, shared_1.writeJsonFile)(file, config);
|
|
391
|
+
files.push({ path: file, action: 'removed' });
|
|
392
|
+
}
|
|
393
|
+
else {
|
|
394
|
+
files.push({ path: file, action: 'not-found' });
|
|
395
|
+
}
|
|
396
|
+
files.push(removeInstructionsEntry(loc));
|
|
397
|
+
return { files };
|
|
398
|
+
}
|
|
399
|
+
printConfig(loc) {
|
|
400
|
+
const target = configJsonPath(loc);
|
|
401
|
+
const snippet = JSON.stringify({ mcp: { servers: { codegraph: buildZcodeMcpConfig() } } }, null, 2);
|
|
402
|
+
return `# Add to ${target}\n\n${snippet}\n`;
|
|
403
|
+
}
|
|
404
|
+
describePaths(loc) {
|
|
405
|
+
return [configJsonPath(loc), instructionsPath(loc)];
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
function writeMcpEntry(loc) {
|
|
409
|
+
const file = configJsonPath(loc);
|
|
410
|
+
const dir = path.dirname(file);
|
|
411
|
+
if (!fs.existsSync(dir))
|
|
412
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
413
|
+
const existing = (0, shared_1.readJsonFile)(file);
|
|
414
|
+
const before = existing.mcp?.servers?.codegraph;
|
|
415
|
+
// We never add `enabled` ourselves — absent means enabled in ZCode, so
|
|
416
|
+
// writing `true` would be redundant and writing anything could clobber
|
|
417
|
+
// intent. But when a rewrite is unavoidable, a user-set `enabled` (most
|
|
418
|
+
// importantly a manual `enabled: false` disable) must survive it: carry
|
|
419
|
+
// the value into `after`. The synthesized `after` is also what the
|
|
420
|
+
// idempotency comparison uses, so a re-run over an already-preserved
|
|
421
|
+
// entry still reports `unchanged`.
|
|
422
|
+
const userEnabled = before && typeof before === 'object' && !Array.isArray(before)
|
|
423
|
+
? before.enabled
|
|
424
|
+
: undefined;
|
|
425
|
+
const after = userEnabled === undefined
|
|
426
|
+
? buildZcodeMcpConfig()
|
|
427
|
+
: { ...buildZcodeMcpConfig(), enabled: userEnabled };
|
|
428
|
+
if ((0, shared_1.jsonDeepEqual)(before, after)) {
|
|
429
|
+
return { path: file, action: 'unchanged' };
|
|
430
|
+
}
|
|
431
|
+
const action = before ? 'updated' : (fs.existsSync(file) ? 'updated' : 'created');
|
|
432
|
+
if (!existing.mcp)
|
|
433
|
+
existing.mcp = {};
|
|
434
|
+
if (!existing.mcp.servers)
|
|
435
|
+
existing.mcp.servers = {};
|
|
436
|
+
existing.mcp.servers.codegraph = after;
|
|
437
|
+
(0, shared_1.writeJsonFile)(file, existing);
|
|
438
|
+
return { path: file, action };
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Strip the marker-delimited CodeGraph block from the ZCode instructions
|
|
442
|
+
* file if a prior install wrote one. Used by both install (self-heal on
|
|
443
|
+
* upgrade) and uninstall — see issue #529.
|
|
444
|
+
*/
|
|
445
|
+
function removeInstructionsEntry(loc) {
|
|
446
|
+
const file = instructionsPath(loc);
|
|
447
|
+
const action = (0, shared_1.removeMarkedSection)(file, instructions_template_1.CODEGRAPH_SECTION_START, instructions_template_1.CODEGRAPH_SECTION_END);
|
|
448
|
+
return { path: file, action };
|
|
449
|
+
}
|
|
450
|
+
exports.zcodeTarget = new ZcodeTarget();
|
|
451
|
+
//# sourceMappingURL=zcode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zcode.js","sourceRoot":"","sources":["../../../src/installer/targets/zcode.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEH,wDAWC;AAuBD,oDAMC;AA+BD,8DAgDC;AAaD,gEA2CC;AA/OD,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AAQzB,qCAQkB;AAuEmB,qGA1EnC,iCAAwB,OA0E+B;AAtEzD,oEAGkC;AAElC,SAAS,SAAS,CAAC,GAAa;IAC9B,OAAO,GAAG,KAAK,QAAQ;QACrB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC;QACnC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,QAAQ,CAAC,CAAC;AACzC,CAAC;AAED,SAAS,cAAc,CAAC,GAAa;IACnC,mEAAmE;IACnE,OAAO,GAAG,KAAK,QAAQ;QACrB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC;QACtD,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,gBAAgB,CAAC,GAAa;IACrC,wEAAwE;IACxE,gEAAgE;IAChE,wCAAwC;IACxC,OAAO,GAAG,KAAK,QAAQ;QACrB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC;QAC7C,CAAC,CAA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,KAAK,CAAC,EAAE,CAAC;QACjC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IAC7C,CAAC;IACD,MAAM,MAAM,GACV,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACrE,IAAI,CAAC,QAAQ,CAAC,GAAG;QAAE,QAAQ,CAAC,GAAG,GAAG,EAAE,CAAC;IACrC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO;QAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,GAAG,EAAE,CAAC;IACrD,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC;IACvC,IAAA,sBAAa,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC9B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAChC,CAAC;AAED;;;;GAIG;AACH,SAAS,uBAAuB,CAAC,GAAa;IAC5C,MAAM,IAAI,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,IAAA,4BAAmB,EAAC,IAAI,EAAE,+CAAuB,EAAE,6CAAqB,CAAC,CAAC;IACzF,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAChC,CAAC;AAEY,QAAA,WAAW,GAAgB,IAAI,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { DaemonRecord, StopResult } from './daemon-registry';
|
|
2
|
+
/** Sentinel option values (not real roots, so they can't collide with a project path). */
|
|
3
|
+
export declare const STOP_ALL = "__stop_all__";
|
|
4
|
+
export declare const CANCEL = "__cancel__";
|
|
5
|
+
export interface PickItem {
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
hint?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Compact uptime: `45s`, `12m`, `3h 5m`. */
|
|
11
|
+
export declare function formatUptime(ms: number): string;
|
|
12
|
+
/**
|
|
13
|
+
* Build the ordered, UI-ready option list: the current project's daemon first
|
|
14
|
+
* (so it's the auto-selected default), the rest newest-first, then "Stop all"
|
|
15
|
+
* (only when there's more than one) and "Cancel".
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildPickItems(daemons: DaemonRecord[], cwdRoot: string | null, now: number): PickItem[];
|
|
18
|
+
export interface PickerDeps {
|
|
19
|
+
list: () => DaemonRecord[];
|
|
20
|
+
stop: (root: string) => Promise<StopResult>;
|
|
21
|
+
stopAll: () => Promise<StopResult[]>;
|
|
22
|
+
/** Realpath'd root of the current project's daemon, or null. */
|
|
23
|
+
cwdRoot: string | null;
|
|
24
|
+
now: () => number;
|
|
25
|
+
/** Render the picker; returns the chosen value or a cancel sentinel. */
|
|
26
|
+
select: (opts: {
|
|
27
|
+
message: string;
|
|
28
|
+
options: PickItem[];
|
|
29
|
+
initialValue: string;
|
|
30
|
+
}) => Promise<unknown>;
|
|
31
|
+
isCancel: (v: unknown) => boolean;
|
|
32
|
+
/** Per-action note (e.g. "Stopped daemon …"). */
|
|
33
|
+
note: (msg: string) => void;
|
|
34
|
+
/** Final line + teardown (clack outro). */
|
|
35
|
+
done: (msg: string) => void;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Pick a daemon → stop it → re-prompt with what's left, until the user cancels
|
|
39
|
+
* (Esc / Ctrl-C / "Cancel"), picks "Stop all", or nothing remains.
|
|
40
|
+
*/
|
|
41
|
+
export declare function runDaemonPicker(deps: PickerDeps): Promise<void>;
|
|
42
|
+
//# sourceMappingURL=daemon-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daemon-manager.d.ts","sourceRoot":"","sources":["../../src/mcp/daemon-manager.ts"],"names":[],"mappings":"AASA,OAAO,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AAsB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAkCrE"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.CANCEL = exports.STOP_ALL = void 0;
|
|
37
|
+
exports.formatUptime = formatUptime;
|
|
38
|
+
exports.buildPickItems = buildPickItems;
|
|
39
|
+
exports.runDaemonPicker = runDaemonPicker;
|
|
40
|
+
/**
|
|
41
|
+
* Interactive daemon manager — the logic behind `codegraph daemon` / `daemons`.
|
|
42
|
+
*
|
|
43
|
+
* Kept separate from the CLI (which owns the @clack/prompts wiring) so the
|
|
44
|
+
* selection/stop loop is unit-testable with a fake `select`: no TTY, no clack,
|
|
45
|
+
* no real daemons. The CLI passes the real clack `select`/`isCancel` plus the
|
|
46
|
+
* registry's list/stop functions.
|
|
47
|
+
*/
|
|
48
|
+
const path = __importStar(require("path"));
|
|
49
|
+
/** Sentinel option values (not real roots, so they can't collide with a project path). */
|
|
50
|
+
exports.STOP_ALL = '__stop_all__';
|
|
51
|
+
exports.CANCEL = '__cancel__';
|
|
52
|
+
/** Compact uptime: `45s`, `12m`, `3h 5m`. */
|
|
53
|
+
function formatUptime(ms) {
|
|
54
|
+
const s = Math.max(0, Math.floor(ms / 1000));
|
|
55
|
+
if (s < 60)
|
|
56
|
+
return `${s}s`;
|
|
57
|
+
const m = Math.floor(s / 60);
|
|
58
|
+
if (m < 60)
|
|
59
|
+
return `${m}m`;
|
|
60
|
+
const h = Math.floor(m / 60);
|
|
61
|
+
return `${h}h ${m % 60}m`;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Build the ordered, UI-ready option list: the current project's daemon first
|
|
65
|
+
* (so it's the auto-selected default), the rest newest-first, then "Stop all"
|
|
66
|
+
* (only when there's more than one) and "Cancel".
|
|
67
|
+
*/
|
|
68
|
+
function buildPickItems(daemons, cwdRoot, now) {
|
|
69
|
+
const cwd = cwdRoot != null ? path.resolve(cwdRoot) : null;
|
|
70
|
+
const ordered = [...daemons].sort((a, b) => {
|
|
71
|
+
if (cwd) {
|
|
72
|
+
const aCur = path.resolve(a.root) === cwd;
|
|
73
|
+
const bCur = path.resolve(b.root) === cwd;
|
|
74
|
+
if (aCur && !bCur)
|
|
75
|
+
return -1;
|
|
76
|
+
if (bCur && !aCur)
|
|
77
|
+
return 1;
|
|
78
|
+
}
|
|
79
|
+
return b.startedAt - a.startedAt; // newest first
|
|
80
|
+
});
|
|
81
|
+
const items = ordered.map((d) => {
|
|
82
|
+
const current = cwd != null && path.resolve(d.root) === cwd;
|
|
83
|
+
return {
|
|
84
|
+
value: d.root,
|
|
85
|
+
label: current ? `${d.root} (current project)` : d.root,
|
|
86
|
+
hint: `pid ${d.pid} · up ${formatUptime(now - d.startedAt)} · Running`,
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
if (items.length > 1)
|
|
90
|
+
items.push({ value: exports.STOP_ALL, label: 'Stop all', hint: '' });
|
|
91
|
+
items.push({ value: exports.CANCEL, label: 'Cancel', hint: '' });
|
|
92
|
+
return items;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Pick a daemon → stop it → re-prompt with what's left, until the user cancels
|
|
96
|
+
* (Esc / Ctrl-C / "Cancel"), picks "Stop all", or nothing remains.
|
|
97
|
+
*/
|
|
98
|
+
async function runDaemonPicker(deps) {
|
|
99
|
+
for (;;) {
|
|
100
|
+
const daemons = deps.list();
|
|
101
|
+
if (daemons.length === 0) {
|
|
102
|
+
deps.done('All daemons stopped.');
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const items = buildPickItems(daemons, deps.cwdRoot, deps.now());
|
|
106
|
+
const choice = await deps.select({
|
|
107
|
+
message: 'Select a daemon to stop',
|
|
108
|
+
options: items,
|
|
109
|
+
initialValue: items[0]?.value ?? exports.CANCEL, // daemons.length > 0 here, so items[0] is a daemon
|
|
110
|
+
});
|
|
111
|
+
if (deps.isCancel(choice) || choice === exports.CANCEL) {
|
|
112
|
+
deps.done('Cancelled.');
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (choice === exports.STOP_ALL) {
|
|
116
|
+
const results = await deps.stopAll();
|
|
117
|
+
const n = results.filter((r) => r.outcome === 'term' || r.outcome === 'kill').length;
|
|
118
|
+
deps.note(`Stopped ${n} daemon${n === 1 ? '' : 's'}.`);
|
|
119
|
+
deps.done('Done.');
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const result = await deps.stop(String(choice));
|
|
123
|
+
const forced = result.outcome === 'kill' ? ', forced' : '';
|
|
124
|
+
deps.note(`Stopped daemon (pid ${result.pid}${forced}) — ${choice}`);
|
|
125
|
+
// Loop: the next iteration re-lists; if more remain it re-prompts, otherwise
|
|
126
|
+
// the top-of-loop empty check prints "All daemons stopped."
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=daemon-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daemon-manager.js","sourceRoot":"","sources":["../../src/mcp/daemon-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,oCAOC;AAOD,wCAwBC;AAsBD,0CAkCC;AApHD;;;;;;;GAOG;AACH,2CAA6B;AAG7B,0FAA0F;AAC7E,QAAA,QAAQ,GAAG,cAAc,CAAC;AAC1B,QAAA,MAAM,GAAG,YAAY,CAAC;AAQnC,6CAA6C;AAC7C,SAAgB,YAAY,CAAC,EAAU;IACrC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IAC7C,IAAI,CAAC,GAAG,EAAE;QAAE,OAAO,GAAG,CAAC,GAAG,CAAC;IAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7B,IAAI,CAAC,GAAG,EAAE;QAAE,OAAO,GAAG,CAAC,GAAG,CAAC;IAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC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