@colbymchenry/codegraph-win32-arm64 1.6.2 → 1.6.3
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/bin/codegraph +1 -1
- package/bin/codegraph.cmd +1 -1
- package/lib/dist/.test-build-engine.json +1 -1
- package/lib/dist/.test-build-viewer.json +1 -1
- package/lib/dist/bin/codegraph.d.ts +3 -0
- package/lib/dist/bin/codegraph.d.ts.map +1 -1
- package/lib/dist/bin/codegraph.js +425 -688
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/command-supervision.js +1 -57
- package/lib/dist/bin/command-supervision.js.map +1 -1
- package/lib/dist/bin/fatal-handler.js +0 -46
- package/lib/dist/bin/fatal-handler.js.map +1 -1
- package/lib/dist/bin/node-version-check.js +0 -33
- package/lib/dist/bin/node-version-check.js.map +1 -1
- package/lib/dist/bin/uninstall.js +0 -19
- package/lib/dist/bin/uninstall.js.map +1 -1
- package/lib/dist/bin/viewer-gate.js +0 -14
- package/lib/dist/bin/viewer-gate.js.map +1 -1
- package/lib/dist/compile-cache.d.ts +2 -0
- package/lib/dist/compile-cache.d.ts.map +1 -0
- package/lib/dist/compile-cache.js +45 -0
- package/lib/dist/compile-cache.js.map +1 -0
- package/lib/dist/context/formatter.js +3 -66
- package/lib/dist/context/formatter.js.map +1 -1
- package/lib/dist/context/index.d.ts +44 -1
- package/lib/dist/context/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +123 -430
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/context/markers.js +0 -17
- package/lib/dist/context/markers.js.map +1 -1
- package/lib/dist/db/index.d.ts +44 -1
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +123 -395
- package/lib/dist/db/index.js.map +1 -1
- package/lib/dist/db/migrations.d.ts +11 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +71 -79
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/name-substring-index.d.ts +63 -0
- package/lib/dist/db/name-substring-index.d.ts.map +1 -0
- package/lib/dist/db/name-substring-index.js +151 -0
- package/lib/dist/db/name-substring-index.js.map +1 -0
- package/lib/dist/db/node-sqlite.d.ts +19 -0
- package/lib/dist/db/node-sqlite.d.ts.map +1 -0
- package/lib/dist/db/node-sqlite.js +23 -0
- package/lib/dist/db/node-sqlite.js.map +1 -0
- package/lib/dist/db/open-error.d.ts +36 -0
- package/lib/dist/db/open-error.d.ts.map +1 -0
- package/lib/dist/db/open-error.js +63 -0
- package/lib/dist/db/open-error.js.map +1 -0
- package/lib/dist/db/parameter-flow-queries.d.ts +120 -0
- package/lib/dist/db/parameter-flow-queries.d.ts.map +1 -0
- package/lib/dist/db/parameter-flow-queries.js +168 -0
- package/lib/dist/db/parameter-flow-queries.js.map +1 -0
- package/lib/dist/db/queries.d.ts +610 -33
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +1345 -1419
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/reference-tail.d.ts +83 -0
- package/lib/dist/db/reference-tail.d.ts.map +1 -0
- package/lib/dist/db/reference-tail.js +68 -0
- package/lib/dist/db/reference-tail.js.map +1 -0
- package/lib/dist/db/schema.sql +18 -2
- package/lib/dist/db/sqlite-adapter.d.ts +18 -1
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/lib/dist/db/sqlite-adapter.js +12 -62
- package/lib/dist/db/sqlite-adapter.js.map +1 -1
- package/lib/dist/db/synthesis-stage.d.ts.map +1 -1
- package/lib/dist/db/synthesis-stage.js +2 -6
- package/lib/dist/db/synthesis-stage.js.map +1 -1
- package/lib/dist/db/wal-valve.js +1 -153
- package/lib/dist/db/wal-valve.js.map +1 -1
- package/lib/dist/db/wsl-shared-index.js +0 -37
- package/lib/dist/db/wsl-shared-index.js.map +1 -1
- package/lib/dist/directory.d.ts +51 -0
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +76 -530
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/engine.d.ts +15 -0
- package/lib/dist/engine.d.ts.map +1 -0
- package/lib/dist/engine.js +34 -0
- package/lib/dist/engine.js.map +1 -0
- package/lib/dist/errors.d.ts +10 -0
- package/lib/dist/errors.d.ts.map +1 -1
- package/lib/dist/errors.js +8 -101
- package/lib/dist/errors.js.map +1 -1
- package/lib/dist/extraction/astro-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/astro-extractor.js +11 -101
- package/lib/dist/extraction/astro-extractor.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +27 -1
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +66 -204
- package/lib/dist/extraction/cfml-extractor.js.map +1 -1
- package/lib/dist/extraction/commonjs-requires.js +0 -31
- package/lib/dist/extraction/commonjs-requires.js.map +1 -1
- package/lib/dist/extraction/dfm-extractor.js +0 -21
- package/lib/dist/extraction/dfm-extractor.js.map +1 -1
- package/lib/dist/extraction/extraction-version.d.ts +1 -1
- package/lib/dist/extraction/extraction-version.js +1 -24
- package/lib/dist/extraction/extraction-version.js.map +1 -1
- package/lib/dist/extraction/function-ref.d.ts +40 -0
- package/lib/dist/extraction/function-ref.d.ts.map +1 -1
- package/lib/dist/extraction/function-ref.js +145 -206
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/generated-detection.js +0 -165
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +45 -4
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +53 -430
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +197 -7
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +554 -1382
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/kernel/decode.js +0 -16
- package/lib/dist/extraction/kernel/decode.js.map +1 -1
- package/lib/dist/extraction/kernel/index.d.ts +3 -1
- package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
- package/lib/dist/extraction/kernel/index.js +25 -133
- package/lib/dist/extraction/kernel/index.js.map +1 -1
- package/lib/dist/extraction/kernel/layout.js +42 -76
- package/lib/dist/extraction/kernel/layout.js.map +1 -1
- package/lib/dist/extraction/kernel/loader.js +0 -37
- package/lib/dist/extraction/kernel/loader.js.map +1 -1
- package/lib/dist/extraction/languages/arkts.js +0 -59
- package/lib/dist/extraction/languages/arkts.js.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.d.ts +125 -28
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +789 -856
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/cfquery.js +0 -9
- package/lib/dist/extraction/languages/cfquery.js.map +1 -1
- package/lib/dist/extraction/languages/cfscript.d.ts +20 -0
- package/lib/dist/extraction/languages/cfscript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/cfscript.js +80 -9
- package/lib/dist/extraction/languages/cfscript.js.map +1 -1
- package/lib/dist/extraction/languages/cobol.js +0 -114
- package/lib/dist/extraction/languages/cobol.js.map +1 -1
- package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts +66 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.js +343 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.js.map +1 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.d.ts +41 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.js +487 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.js.map +1 -0
- package/lib/dist/extraction/languages/csharp.js +3 -55
- package/lib/dist/extraction/languages/csharp.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts +84 -0
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +329 -161
- package/lib/dist/extraction/languages/dart.js.map +1 -1
- package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
- package/lib/dist/extraction/languages/erlang.js +15 -102
- package/lib/dist/extraction/languages/erlang.js.map +1 -1
- package/lib/dist/extraction/languages/go.d.ts +48 -0
- package/lib/dist/extraction/languages/go.d.ts.map +1 -1
- package/lib/dist/extraction/languages/go.js +102 -31
- package/lib/dist/extraction/languages/go.js.map +1 -1
- package/lib/dist/extraction/languages/index.js +0 -6
- package/lib/dist/extraction/languages/index.js.map +1 -1
- package/lib/dist/extraction/languages/java.d.ts.map +1 -1
- package/lib/dist/extraction/languages/java.js +67 -78
- package/lib/dist/extraction/languages/java.js.map +1 -1
- package/lib/dist/extraction/languages/javascript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/javascript.js +2 -12
- package/lib/dist/extraction/languages/javascript.js.map +1 -1
- package/lib/dist/extraction/languages/kotlin.d.ts +11 -0
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +35 -184
- package/lib/dist/extraction/languages/kotlin.js.map +1 -1
- package/lib/dist/extraction/languages/lua.js +2 -39
- package/lib/dist/extraction/languages/lua.js.map +1 -1
- package/lib/dist/extraction/languages/luau.js +0 -14
- package/lib/dist/extraction/languages/luau.js.map +1 -1
- package/lib/dist/extraction/languages/nix.js +0 -16
- package/lib/dist/extraction/languages/nix.js.map +1 -1
- package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
- package/lib/dist/extraction/languages/objc.js +5 -16
- package/lib/dist/extraction/languages/objc.js.map +1 -1
- package/lib/dist/extraction/languages/pascal-preparse.d.ts +66 -0
- package/lib/dist/extraction/languages/pascal-preparse.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal-preparse.js +958 -0
- package/lib/dist/extraction/languages/pascal-preparse.js.map +1 -0
- package/lib/dist/extraction/languages/pascal-system.d.ts +11 -0
- package/lib/dist/extraction/languages/pascal-system.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal-system.js +23 -0
- package/lib/dist/extraction/languages/pascal-system.js.map +1 -0
- package/lib/dist/extraction/languages/pascal.d.ts.map +1 -1
- package/lib/dist/extraction/languages/pascal.js +3 -4
- package/lib/dist/extraction/languages/pascal.js.map +1 -1
- package/lib/dist/extraction/languages/php.js +5 -42
- package/lib/dist/extraction/languages/php.js.map +1 -1
- package/lib/dist/extraction/languages/python.js +2 -20
- package/lib/dist/extraction/languages/python.js.map +1 -1
- package/lib/dist/extraction/languages/r.js +8 -78
- package/lib/dist/extraction/languages/r.js.map +1 -1
- package/lib/dist/extraction/languages/ruby.d.ts.map +1 -1
- package/lib/dist/extraction/languages/ruby.js +17 -25
- package/lib/dist/extraction/languages/ruby.js.map +1 -1
- package/lib/dist/extraction/languages/rust.d.ts +10 -0
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
- package/lib/dist/extraction/languages/rust.js +15 -47
- package/lib/dist/extraction/languages/rust.js.map +1 -1
- package/lib/dist/extraction/languages/scala.js +5 -41
- package/lib/dist/extraction/languages/scala.js.map +1 -1
- package/lib/dist/extraction/languages/solidity.js +1 -82
- package/lib/dist/extraction/languages/solidity.js.map +1 -1
- package/lib/dist/extraction/languages/swift.js +3 -47
- package/lib/dist/extraction/languages/swift.js.map +1 -1
- package/lib/dist/extraction/languages/terraform.js +6 -152
- package/lib/dist/extraction/languages/terraform.js.map +1 -1
- package/lib/dist/extraction/languages/typescript.d.ts +64 -0
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/typescript.js +73 -49
- package/lib/dist/extraction/languages/typescript.js.map +1 -1
- package/lib/dist/extraction/languages/vbnet.d.ts.map +1 -1
- package/lib/dist/extraction/languages/vbnet.js +9 -42
- package/lib/dist/extraction/languages/vbnet.js.map +1 -1
- package/lib/dist/extraction/lazy-frameworks.d.ts +15 -0
- package/lib/dist/extraction/lazy-frameworks.d.ts.map +1 -0
- package/lib/dist/extraction/lazy-frameworks.js +8 -0
- package/lib/dist/extraction/lazy-frameworks.js.map +1 -0
- package/lib/dist/extraction/liquid-extractor.d.ts +29 -3
- package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/liquid-extractor.js +89 -148
- package/lib/dist/extraction/liquid-extractor.js.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.js +0 -78
- package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
- package/lib/dist/extraction/parse-budget.js +0 -13
- package/lib/dist/extraction/parse-budget.js.map +1 -1
- package/lib/dist/extraction/parse-pool.d.ts +29 -5
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +42 -174
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/parse-worker.d.ts +1 -1
- package/lib/dist/extraction/parse-worker.d.ts.map +1 -1
- package/lib/dist/extraction/parse-worker.js +5 -58
- package/lib/dist/extraction/parse-worker.js.map +1 -1
- package/lib/dist/extraction/razor-extractor.d.ts +9 -0
- package/lib/dist/extraction/razor-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/razor-extractor.js +45 -69
- package/lib/dist/extraction/razor-extractor.js.map +1 -1
- package/lib/dist/extraction/razor-script.d.ts +23 -0
- package/lib/dist/extraction/razor-script.d.ts.map +1 -0
- package/lib/dist/extraction/razor-script.js +244 -0
- package/lib/dist/extraction/razor-script.js.map +1 -0
- package/lib/dist/extraction/sfc-script.d.ts +42 -0
- package/lib/dist/extraction/sfc-script.d.ts.map +1 -1
- package/lib/dist/extraction/sfc-script.js +32 -31
- package/lib/dist/extraction/sfc-script.js.map +1 -1
- package/lib/dist/extraction/store-worker.d.ts +1 -1
- package/lib/dist/extraction/store-worker.d.ts.map +1 -1
- package/lib/dist/extraction/store-worker.js +1 -38
- package/lib/dist/extraction/store-worker.js.map +1 -1
- package/lib/dist/extraction/store-writer.js +2 -34
- package/lib/dist/extraction/store-writer.js.map +1 -1
- package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/svelte-extractor.js +11 -87
- package/lib/dist/extraction/svelte-extractor.js.map +1 -1
- package/lib/dist/extraction/syntax-tokens.d.ts +6 -5
- package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -1
- package/lib/dist/extraction/syntax-tokens.js +4 -152
- package/lib/dist/extraction/syntax-tokens.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.d.ts +37 -1
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.js +76 -68
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts +102 -22
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.js +0 -7
- package/lib/dist/extraction/tree-sitter-types.js.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +447 -9
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +1908 -2544
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/vue-extractor.d.ts +13 -0
- package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vue-extractor.js +52 -92
- package/lib/dist/extraction/vue-extractor.js.map +1 -1
- package/lib/dist/extraction/vue-options-api.js +0 -32
- package/lib/dist/extraction/vue-options-api.js.map +1 -1
- package/lib/dist/extraction/vue-template-calls.d.ts +37 -0
- package/lib/dist/extraction/vue-template-calls.d.ts.map +1 -0
- package/lib/dist/extraction/vue-template-calls.js +497 -0
- package/lib/dist/extraction/vue-template-calls.js.map +1 -0
- package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts +6 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
- package/lib/dist/extraction/wasm-runtime-flags.js +1 -88
- package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
- package/lib/dist/file-limits.d.ts +8 -0
- package/lib/dist/file-limits.d.ts.map +1 -1
- package/lib/dist/file-limits.js +13 -28
- package/lib/dist/file-limits.js.map +1 -1
- package/lib/dist/graph/branch-guards.d.ts.map +1 -1
- package/lib/dist/graph/branch-guards.js +4 -251
- package/lib/dist/graph/branch-guards.js.map +1 -1
- package/lib/dist/graph/call-sites.d.ts +12 -0
- package/lib/dist/graph/call-sites.d.ts.map +1 -0
- package/lib/dist/graph/call-sites.js +17 -0
- package/lib/dist/graph/call-sites.js.map +1 -0
- package/lib/dist/graph/cobol-copybooks.d.ts +75 -0
- package/lib/dist/graph/cobol-copybooks.d.ts.map +1 -0
- package/lib/dist/graph/cobol-copybooks.js +45 -0
- package/lib/dist/graph/cobol-copybooks.js.map +1 -0
- package/lib/dist/graph/dead-code.d.ts +26 -4
- package/lib/dist/graph/dead-code.d.ts.map +1 -1
- package/lib/dist/graph/dead-code.js +157 -311
- package/lib/dist/graph/dead-code.js.map +1 -1
- package/lib/dist/graph/dynamic-boundary-report.js +1 -88
- package/lib/dist/graph/dynamic-boundary-report.js.map +1 -1
- package/lib/dist/graph/file-cycles.d.ts +20 -0
- package/lib/dist/graph/file-cycles.d.ts.map +1 -0
- package/lib/dist/graph/file-cycles.js +79 -0
- package/lib/dist/graph/file-cycles.js.map +1 -0
- package/lib/dist/graph/go-package.d.ts +27 -0
- package/lib/dist/graph/go-package.d.ts.map +1 -0
- package/lib/dist/graph/go-package.js +49 -0
- package/lib/dist/graph/go-package.js.map +1 -0
- package/lib/dist/graph/index.d.ts +2 -0
- package/lib/dist/graph/index.d.ts.map +1 -1
- package/lib/dist/graph/index.js +4 -6
- package/lib/dist/graph/index.js.map +1 -1
- package/lib/dist/graph/named-symbol-flow.d.ts +5 -1
- package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -1
- package/lib/dist/graph/named-symbol-flow.js +82 -223
- package/lib/dist/graph/named-symbol-flow.js.map +1 -1
- package/lib/dist/graph/owning-package.d.ts +59 -0
- package/lib/dist/graph/owning-package.d.ts.map +1 -0
- package/lib/dist/graph/owning-package.js +120 -0
- package/lib/dist/graph/owning-package.js.map +1 -0
- package/lib/dist/graph/queries.d.ts +2 -2
- package/lib/dist/graph/queries.d.ts.map +1 -1
- package/lib/dist/graph/queries.js +2 -135
- package/lib/dist/graph/queries.js.map +1 -1
- package/lib/dist/graph/symbol-lookup.d.ts +15 -3
- package/lib/dist/graph/symbol-lookup.d.ts.map +1 -1
- package/lib/dist/graph/symbol-lookup.js +47 -89
- package/lib/dist/graph/symbol-lookup.js.map +1 -1
- package/lib/dist/graph/synthesized-hop.d.ts +37 -0
- package/lib/dist/graph/synthesized-hop.d.ts.map +1 -0
- package/lib/dist/graph/synthesized-hop.js +62 -0
- package/lib/dist/graph/synthesized-hop.js.map +1 -0
- package/lib/dist/graph/test-code.d.ts +21 -0
- package/lib/dist/graph/test-code.d.ts.map +1 -0
- package/lib/dist/graph/test-code.js +50 -0
- package/lib/dist/graph/test-code.js.map +1 -0
- package/lib/dist/graph/traversal.d.ts +31 -2
- package/lib/dist/graph/traversal.d.ts.map +1 -1
- package/lib/dist/graph/traversal.js +98 -226
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/graph/type-hierarchy.js +0 -138
- package/lib/dist/graph/type-hierarchy.js.map +1 -1
- package/lib/dist/index.d.ts +190 -25
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +694 -1109
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/beta-signup.js +0 -39
- package/lib/dist/installer/beta-signup.js.map +1 -1
- package/lib/dist/installer/config-writer.js +0 -24
- package/lib/dist/installer/config-writer.js.map +1 -1
- package/lib/dist/installer/index.d.ts +9 -5
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +25 -159
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/instructions-template.d.ts +1 -1
- package/lib/dist/installer/instructions-template.js +0 -37
- package/lib/dist/installer/instructions-template.js.map +1 -1
- package/lib/dist/installer/targets/antigravity.js +0 -113
- package/lib/dist/installer/targets/antigravity.js.map +1 -1
- package/lib/dist/installer/targets/bob.d.ts +20 -0
- package/lib/dist/installer/targets/bob.d.ts.map +1 -0
- package/lib/dist/installer/targets/bob.js +83 -0
- package/lib/dist/installer/targets/bob.js.map +1 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +1 -185
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/codex.d.ts.map +1 -1
- package/lib/dist/installer/targets/codex.js +17 -109
- package/lib/dist/installer/targets/codex.js.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.js +2 -54
- package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
- package/lib/dist/installer/targets/copilot-jetbrains.js +0 -57
- package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -1
- package/lib/dist/installer/targets/copilot-vscode.js +0 -58
- package/lib/dist/installer/targets/copilot-vscode.js.map +1 -1
- package/lib/dist/installer/targets/cursor.js +7 -88
- package/lib/dist/installer/targets/cursor.js.map +1 -1
- package/lib/dist/installer/targets/droid.d.ts +18 -0
- package/lib/dist/installer/targets/droid.d.ts.map +1 -0
- package/lib/dist/installer/targets/droid.js +92 -0
- package/lib/dist/installer/targets/droid.js.map +1 -0
- package/lib/dist/installer/targets/dsh.d.ts +35 -0
- package/lib/dist/installer/targets/dsh.d.ts.map +1 -0
- package/lib/dist/installer/targets/dsh.js +267 -0
- package/lib/dist/installer/targets/dsh.js.map +1 -0
- package/lib/dist/installer/targets/gemini.js +0 -37
- package/lib/dist/installer/targets/gemini.js.map +1 -1
- package/lib/dist/installer/targets/grok.d.ts +25 -0
- package/lib/dist/installer/targets/grok.d.ts.map +1 -0
- package/lib/dist/installer/targets/grok.js +96 -0
- package/lib/dist/installer/targets/grok.js.map +1 -0
- package/lib/dist/installer/targets/hermes.d.ts +19 -7
- package/lib/dist/installer/targets/hermes.d.ts.map +1 -1
- package/lib/dist/installer/targets/hermes.js +218 -214
- package/lib/dist/installer/targets/hermes.js.map +1 -1
- package/lib/dist/installer/targets/json-config.d.ts +45 -0
- package/lib/dist/installer/targets/json-config.d.ts.map +1 -0
- package/lib/dist/installer/targets/json-config.js +128 -0
- package/lib/dist/installer/targets/json-config.js.map +1 -0
- package/lib/dist/installer/targets/kimi.d.ts +21 -0
- package/lib/dist/installer/targets/kimi.d.ts.map +1 -0
- package/lib/dist/installer/targets/kimi.js +97 -0
- package/lib/dist/installer/targets/kimi.js.map +1 -0
- package/lib/dist/installer/targets/kiro.js +1 -41
- package/lib/dist/installer/targets/kiro.js.map +1 -1
- package/lib/dist/installer/targets/opencode.js +0 -102
- package/lib/dist/installer/targets/opencode.js.map +1 -1
- package/lib/dist/installer/targets/pi.d.ts +24 -0
- package/lib/dist/installer/targets/pi.d.ts.map +1 -0
- package/lib/dist/installer/targets/pi.js +100 -0
- package/lib/dist/installer/targets/pi.js.map +1 -0
- package/lib/dist/installer/targets/qoder.d.ts +23 -0
- package/lib/dist/installer/targets/qoder.d.ts.map +1 -0
- package/lib/dist/installer/targets/qoder.js +83 -0
- package/lib/dist/installer/targets/qoder.js.map +1 -0
- package/lib/dist/installer/targets/qwen.d.ts +21 -0
- package/lib/dist/installer/targets/qwen.d.ts.map +1 -0
- package/lib/dist/installer/targets/qwen.js +115 -0
- package/lib/dist/installer/targets/qwen.js.map +1 -0
- package/lib/dist/installer/targets/registry.d.ts.map +1 -1
- package/lib/dist/installer/targets/registry.js +18 -25
- package/lib/dist/installer/targets/registry.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +81 -11
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +183 -129
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/toml.d.ts +82 -6
- package/lib/dist/installer/targets/toml.d.ts.map +1 -1
- package/lib/dist/installer/targets/toml.js +318 -112
- package/lib/dist/installer/targets/toml.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +1 -1
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/installer/targets/types.js +0 -13
- package/lib/dist/installer/targets/types.js.map +1 -1
- package/lib/dist/installer/targets/windsurf.d.ts +22 -0
- package/lib/dist/installer/targets/windsurf.d.ts.map +1 -0
- package/lib/dist/installer/targets/windsurf.js +90 -0
- package/lib/dist/installer/targets/windsurf.js.map +1 -0
- package/lib/dist/lazy-engine.d.ts +22 -0
- package/lib/dist/lazy-engine.d.ts.map +1 -0
- package/lib/dist/lazy-engine.js +16 -0
- package/lib/dist/lazy-engine.js.map +1 -0
- package/lib/dist/mcp/answer-freshness.js +0 -6
- package/lib/dist/mcp/answer-freshness.js.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +2 -23
- package/lib/dist/mcp/daemon-manager.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +2 -85
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +40 -0
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +174 -137
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +23 -0
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +89 -373
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.js +4 -78
- package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
- package/lib/dist/mcp/early-ppid.js +0 -24
- package/lib/dist/mcp/early-ppid.js.map +1 -1
- package/lib/dist/mcp/engine.d.ts +8 -0
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +33 -152
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-dedup.js +0 -108
- package/lib/dist/mcp/explore-dedup.js.map +1 -1
- package/lib/dist/mcp/explore-diagnostics.js +0 -116
- package/lib/dist/mcp/explore-diagnostics.js.map +1 -1
- package/lib/dist/mcp/explore-session-state.js +0 -129
- package/lib/dist/mcp/explore-session-state.js.map +1 -1
- package/lib/dist/mcp/index-freshness-worker.js +1 -6
- package/lib/dist/mcp/index-freshness-worker.js.map +1 -1
- package/lib/dist/mcp/index-freshness.js +0 -15
- package/lib/dist/mcp/index-freshness.js.map +1 -1
- package/lib/dist/mcp/index-version-warning.d.ts +21 -0
- package/lib/dist/mcp/index-version-warning.d.ts.map +1 -0
- package/lib/dist/mcp/index-version-warning.js +38 -0
- package/lib/dist/mcp/index-version-warning.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +19 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +118 -293
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts +13 -3
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +106 -121
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/ppid-watchdog.js +0 -24
- package/lib/dist/mcp/ppid-watchdog.js.map +1 -1
- package/lib/dist/mcp/process-identity.d.ts +42 -0
- package/lib/dist/mcp/process-identity.d.ts.map +1 -0
- package/lib/dist/mcp/process-identity.js +130 -0
- package/lib/dist/mcp/process-identity.js.map +1 -0
- package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -1
- package/lib/dist/mcp/project-lifecycle.js +50 -17
- package/lib/dist/mcp/project-lifecycle.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts +17 -6
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +74 -248
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +43 -3
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +109 -123
- package/lib/dist/mcp/query-pool.js.map +1 -1
- package/lib/dist/mcp/query-worker.js +24 -36
- package/lib/dist/mcp/query-worker.js.map +1 -1
- package/lib/dist/mcp/server-instructions.js +0 -31
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +27 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +29 -130
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/startup-handshake.js +1 -48
- package/lib/dist/mcp/startup-handshake.js.map +1 -1
- package/lib/dist/mcp/stdin-teardown.js +0 -28
- package/lib/dist/mcp/stdin-teardown.js.map +1 -1
- package/lib/dist/mcp/stdout-teardown.d.ts +26 -0
- package/lib/dist/mcp/stdout-teardown.d.ts.map +1 -0
- package/lib/dist/mcp/stdout-teardown.js +20 -0
- package/lib/dist/mcp/stdout-teardown.js.map +1 -0
- package/lib/dist/mcp/tools.d.ts +127 -18
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +661 -3590
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/mcp/transport.d.ts.map +1 -1
- package/lib/dist/mcp/transport.js +4 -96
- package/lib/dist/mcp/transport.js.map +1 -1
- package/lib/dist/mcp/version.d.ts +13 -1
- package/lib/dist/mcp/version.d.ts.map +1 -1
- package/lib/dist/mcp/version.js +19 -21
- package/lib/dist/mcp/version.js.map +1 -1
- package/lib/dist/mcp/writer-lock.d.ts +11 -0
- package/lib/dist/mcp/writer-lock.d.ts.map +1 -1
- package/lib/dist/mcp/writer-lock.js +49 -46
- package/lib/dist/mcp/writer-lock.js.map +1 -1
- package/lib/dist/project-config.js +1 -138
- package/lib/dist/project-config.js.map +1 -1
- package/lib/dist/resolution/alias-binding.d.ts +7 -0
- package/lib/dist/resolution/alias-binding.d.ts.map +1 -1
- package/lib/dist/resolution/alias-binding.js +7 -56
- package/lib/dist/resolution/alias-binding.js.map +1 -1
- package/lib/dist/resolution/ambient-modules.d.ts +185 -0
- package/lib/dist/resolution/ambient-modules.d.ts.map +1 -0
- package/lib/dist/resolution/ambient-modules.js +732 -0
- package/lib/dist/resolution/ambient-modules.js.map +1 -0
- package/lib/dist/resolution/angular-template-synthesizer.d.ts +48 -1
- package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/angular-template-synthesizer.js +401 -65
- package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -1
- package/lib/dist/resolution/c-feature-variants.d.ts +40 -0
- package/lib/dist/resolution/c-feature-variants.d.ts.map +1 -0
- package/lib/dist/resolution/c-feature-variants.js +249 -0
- package/lib/dist/resolution/c-feature-variants.js.map +1 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.js +23 -391
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
- package/lib/dist/resolution/c-macro-renames.d.ts +25 -0
- package/lib/dist/resolution/c-macro-renames.d.ts.map +1 -0
- package/lib/dist/resolution/c-macro-renames.js +95 -0
- package/lib/dist/resolution/c-macro-renames.js.map +1 -0
- package/lib/dist/resolution/callback-synthesizer.d.ts +15 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +1355 -1270
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/const-alias-synthesizer.d.ts +48 -0
- package/lib/dist/resolution/const-alias-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/const-alias-synthesizer.js +234 -0
- package/lib/dist/resolution/const-alias-synthesizer.js.map +1 -0
- package/lib/dist/resolution/cooperative-yield.js +0 -27
- package/lib/dist/resolution/cooperative-yield.js.map +1 -1
- package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -1
- package/lib/dist/resolution/cpp-constructor.js +15 -17
- package/lib/dist/resolution/cpp-constructor.js.map +1 -1
- package/lib/dist/resolution/cpp-includers.d.ts +46 -0
- package/lib/dist/resolution/cpp-includers.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-includers.js +153 -0
- package/lib/dist/resolution/cpp-includers.js.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts +16 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -1
- package/lib/dist/resolution/cpp-macro-visibility.js +17 -68
- package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -1
- package/lib/dist/resolution/cpp-namespaces.d.ts +54 -0
- package/lib/dist/resolution/cpp-namespaces.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-namespaces.js +151 -0
- package/lib/dist/resolution/cpp-namespaces.js.map +1 -0
- package/lib/dist/resolution/cpp-raw-strings.d.ts +33 -0
- package/lib/dist/resolution/cpp-raw-strings.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-raw-strings.js +167 -0
- package/lib/dist/resolution/cpp-raw-strings.js.map +1 -0
- package/lib/dist/resolution/cpp-supertypes.d.ts +118 -0
- package/lib/dist/resolution/cpp-supertypes.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-supertypes.js +322 -0
- package/lib/dist/resolution/cpp-supertypes.js.map +1 -0
- package/lib/dist/resolution/cpp-template-instantiations.d.ts +83 -0
- package/lib/dist/resolution/cpp-template-instantiations.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-template-instantiations.js +983 -0
- package/lib/dist/resolution/cpp-template-instantiations.js.map +1 -0
- package/lib/dist/resolution/cpp-type-aliases.d.ts +194 -0
- package/lib/dist/resolution/cpp-type-aliases.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-type-aliases.js +648 -0
- package/lib/dist/resolution/cpp-type-aliases.js.map +1 -0
- package/lib/dist/resolution/dart-libraries.d.ts +75 -0
- package/lib/dist/resolution/dart-libraries.d.ts.map +1 -0
- package/lib/dist/resolution/dart-libraries.js +721 -0
- package/lib/dist/resolution/dart-libraries.js.map +1 -0
- package/lib/dist/resolution/dart-local-scope.d.ts +41 -0
- package/lib/dist/resolution/dart-local-scope.d.ts.map +1 -0
- package/lib/dist/resolution/dart-local-scope.js +565 -0
- package/lib/dist/resolution/dart-local-scope.js.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.js +0 -52
- package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/angular-router.js +41 -208
- package/lib/dist/resolution/frameworks/angular-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/astro.js +4 -60
- package/lib/dist/resolution/frameworks/astro.js.map +1 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts +18 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.js +65 -15
- package/lib/dist/resolution/frameworks/cargo-workspace.js.map +1 -1
- package/lib/dist/resolution/frameworks/cics.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/cics.js +7 -33
- package/lib/dist/resolution/frameworks/cics.js.map +1 -1
- package/lib/dist/resolution/frameworks/codeigniter.d.ts +23 -0
- package/lib/dist/resolution/frameworks/codeigniter.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/codeigniter.js +271 -0
- package/lib/dist/resolution/frameworks/codeigniter.js.map +1 -0
- package/lib/dist/resolution/frameworks/component-folder.d.ts +17 -0
- package/lib/dist/resolution/frameworks/component-folder.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/component-folder.js +11 -0
- package/lib/dist/resolution/frameworks/component-folder.js.map +1 -0
- package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.js +5 -68
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
- package/lib/dist/resolution/frameworks/drupal.d.ts +17 -8
- package/lib/dist/resolution/frameworks/drupal.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/drupal.js +377 -142
- package/lib/dist/resolution/frameworks/drupal.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.js +8 -88
- package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.js +9 -190
- package/lib/dist/resolution/frameworks/expo-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/express.js +182 -199
- package/lib/dist/resolution/frameworks/express.js.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.js +1 -104
- package/lib/dist/resolution/frameworks/fabric.js.map +1 -1
- package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/go.js +14 -43
- package/lib/dist/resolution/frameworks/go.js.map +1 -1
- package/lib/dist/resolution/frameworks/goframe.js +1 -55
- package/lib/dist/resolution/frameworks/goframe.js.map +1 -1
- package/lib/dist/resolution/frameworks/index.d.ts +13 -0
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +12 -50
- package/lib/dist/resolution/frameworks/index.js.map +1 -1
- package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/java.js +203 -129
- package/lib/dist/resolution/frameworks/java.js.map +1 -1
- package/lib/dist/resolution/frameworks/laravel.js +2 -125
- package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
- package/lib/dist/resolution/frameworks/name-heuristic.js +0 -12
- package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.js +2 -199
- package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/next-proxy.d.ts +67 -0
- package/lib/dist/resolution/frameworks/next-proxy.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/next-proxy.js +239 -0
- package/lib/dist/resolution/frameworks/next-proxy.js.map +1 -0
- package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nextjs.js +10 -66
- package/lib/dist/resolution/frameworks/nextjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/object-literal.js +0 -21
- package/lib/dist/resolution/frameworks/object-literal.js.map +1 -1
- package/lib/dist/resolution/frameworks/package-deps.d.ts +11 -7
- package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/package-deps.js +35 -26
- package/lib/dist/resolution/frameworks/package-deps.js.map +1 -1
- package/lib/dist/resolution/frameworks/page-component.js +0 -14
- package/lib/dist/resolution/frameworks/page-component.js.map +1 -1
- package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/play.js +26 -34
- package/lib/dist/resolution/frameworks/play.js.map +1 -1
- package/lib/dist/resolution/frameworks/python.js +5 -102
- package/lib/dist/resolution/frameworks/python.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.js +1 -166
- package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.d.ts +13 -4
- package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.js +10 -82
- package/lib/dist/resolution/frameworks/react-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/react.d.ts +57 -0
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react.js +1449 -191
- package/lib/dist/resolution/frameworks/react.js.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.js +1 -61
- package/lib/dist/resolution/frameworks/ruby.js.map +1 -1
- package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/rust.js +35 -56
- package/lib/dist/resolution/frameworks/rust.js.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.js +7 -75
- package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.js +8 -46
- package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/swift-objc.js +0 -97
- package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -1
- package/lib/dist/resolution/frameworks/swift.js +0 -97
- package/lib/dist/resolution/frameworks/swift.js.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.js +9 -130
- package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/terraform.js +1 -85
- package/lib/dist/resolution/frameworks/terraform.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.js +11 -134
- package/lib/dist/resolution/frameworks/vue-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue.js +42 -114
- package/lib/dist/resolution/frameworks/vue.js.map +1 -1
- package/lib/dist/resolution/go-func-field-synthesizer.d.ts +58 -0
- package/lib/dist/resolution/go-func-field-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/go-func-field-synthesizer.js +696 -0
- package/lib/dist/resolution/go-func-field-synthesizer.js.map +1 -0
- package/lib/dist/resolution/go-module.d.ts +23 -7
- package/lib/dist/resolution/go-module.d.ts.map +1 -1
- package/lib/dist/resolution/go-module.js +21 -24
- package/lib/dist/resolution/go-module.js.map +1 -1
- package/lib/dist/resolution/go-stdlib-methods.d.ts +9 -0
- package/lib/dist/resolution/go-stdlib-methods.d.ts.map +1 -0
- package/lib/dist/resolution/go-stdlib-methods.js +224 -0
- package/lib/dist/resolution/go-stdlib-methods.js.map +1 -0
- package/lib/dist/resolution/goframe-synthesizer.js +2 -53
- package/lib/dist/resolution/goframe-synthesizer.js.map +1 -1
- package/lib/dist/resolution/import-resolver.d.ts +276 -29
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +1670 -1380
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +415 -6
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +1323 -1037
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/js-builtins.d.ts +14 -0
- package/lib/dist/resolution/js-builtins.d.ts.map +1 -1
- package/lib/dist/resolution/js-builtins.js +14 -14
- package/lib/dist/resolution/js-builtins.js.map +1 -1
- package/lib/dist/resolution/js-class-expressions.d.ts +48 -0
- package/lib/dist/resolution/js-class-expressions.d.ts.map +1 -0
- package/lib/dist/resolution/js-class-expressions.js +25 -0
- package/lib/dist/resolution/js-class-expressions.js.map +1 -0
- package/lib/dist/resolution/js-super-calls.d.ts +18 -0
- package/lib/dist/resolution/js-super-calls.d.ts.map +1 -0
- package/lib/dist/resolution/js-super-calls.js +94 -0
- package/lib/dist/resolution/js-super-calls.js.map +1 -0
- package/lib/dist/resolution/jsx-code.d.ts +28 -0
- package/lib/dist/resolution/jsx-code.d.ts.map +1 -0
- package/lib/dist/resolution/jsx-code.js +459 -0
- package/lib/dist/resolution/jsx-code.js.map +1 -0
- package/lib/dist/resolution/lru-cache.d.ts +5 -13
- package/lib/dist/resolution/lru-cache.d.ts.map +1 -1
- package/lib/dist/resolution/lru-cache.js +43 -32
- package/lib/dist/resolution/lru-cache.js.map +1 -1
- package/lib/dist/resolution/memory-budget.js +0 -52
- package/lib/dist/resolution/memory-budget.js.map +1 -1
- package/lib/dist/resolution/module-importers.d.ts +185 -0
- package/lib/dist/resolution/module-importers.d.ts.map +1 -0
- package/lib/dist/resolution/module-importers.js +588 -0
- package/lib/dist/resolution/module-importers.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +858 -7
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +21030 -5110
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.d.ts +19 -0
- package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.js +46 -28
- package/lib/dist/resolution/next-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/override-parameters.d.ts +40 -0
- package/lib/dist/resolution/override-parameters.d.ts.map +1 -0
- package/lib/dist/resolution/override-parameters.js +339 -0
- package/lib/dist/resolution/override-parameters.js.map +1 -0
- package/lib/dist/resolution/parameter-flow.d.ts +218 -0
- package/lib/dist/resolution/parameter-flow.d.ts.map +1 -0
- package/lib/dist/resolution/parameter-flow.js +474 -0
- package/lib/dist/resolution/parameter-flow.js.map +1 -0
- package/lib/dist/resolution/pascal-scope.d.ts +91 -0
- package/lib/dist/resolution/pascal-scope.d.ts.map +1 -0
- package/lib/dist/resolution/pascal-scope.js +961 -0
- package/lib/dist/resolution/pascal-scope.js.map +1 -0
- package/lib/dist/resolution/path-aliases.d.ts +32 -4
- package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
- package/lib/dist/resolution/path-aliases.js +43 -110
- package/lib/dist/resolution/path-aliases.js.map +1 -1
- package/lib/dist/resolution/project-scans.d.ts +38 -0
- package/lib/dist/resolution/project-scans.d.ts.map +1 -0
- package/lib/dist/resolution/project-scans.js +30 -0
- package/lib/dist/resolution/project-scans.js.map +1 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/react-router-synthesizer.js +3 -55
- package/lib/dist/resolution/react-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/resolver-pool.d.ts +23 -2
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-pool.js +43 -111
- package/lib/dist/resolution/resolver-pool.js.map +1 -1
- package/lib/dist/resolution/resolver-worker.d.ts +1 -1
- package/lib/dist/resolution/resolver-worker.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-worker.js +8 -37
- package/lib/dist/resolution/resolver-worker.js.map +1 -1
- package/lib/dist/resolution/resurrect-ref.d.ts +25 -0
- package/lib/dist/resolution/resurrect-ref.d.ts.map +1 -0
- package/lib/dist/resolution/resurrect-ref.js +19 -0
- package/lib/dist/resolution/resurrect-ref.js.map +1 -0
- package/lib/dist/resolution/ruby-constant-paths.d.ts +56 -0
- package/lib/dist/resolution/ruby-constant-paths.d.ts.map +1 -0
- package/lib/dist/resolution/ruby-constant-paths.js +255 -0
- package/lib/dist/resolution/ruby-constant-paths.js.map +1 -0
- package/lib/dist/resolution/ruby-parameter-flow.d.ts +10 -0
- package/lib/dist/resolution/ruby-parameter-flow.d.ts.map +1 -0
- package/lib/dist/resolution/ruby-parameter-flow.js +801 -0
- package/lib/dist/resolution/ruby-parameter-flow.js.map +1 -0
- package/lib/dist/resolution/rust-scopes.d.ts +120 -0
- package/lib/dist/resolution/rust-scopes.d.ts.map +1 -0
- package/lib/dist/resolution/rust-scopes.js +730 -0
- package/lib/dist/resolution/rust-scopes.js.map +1 -0
- package/lib/dist/resolution/shopify-themes.d.ts +10 -0
- package/lib/dist/resolution/shopify-themes.d.ts.map +1 -0
- package/lib/dist/resolution/shopify-themes.js +19 -0
- package/lib/dist/resolution/shopify-themes.js.map +1 -0
- package/lib/dist/resolution/strip-comments.d.ts +20 -1
- package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
- package/lib/dist/resolution/strip-comments.js +164 -119
- package/lib/dist/resolution/strip-comments.js.map +1 -1
- package/lib/dist/resolution/sveltekit-synthesizer.js +0 -64
- package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -1
- package/lib/dist/resolution/swift-objc-bridge.js +0 -160
- package/lib/dist/resolution/swift-objc-bridge.js.map +1 -1
- package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -1
- package/lib/dist/resolution/swift-type-visibility.js +2 -101
- package/lib/dist/resolution/swift-type-visibility.js.map +1 -1
- package/lib/dist/resolution/synth-utils.js +1 -22
- package/lib/dist/resolution/synth-utils.js.map +1 -1
- package/lib/dist/resolution/tanstack-router-synthesizer.js +0 -32
- package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/tauri-synthesizer.d.ts +37 -0
- package/lib/dist/resolution/tauri-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tauri-synthesizer.js +1038 -0
- package/lib/dist/resolution/tauri-synthesizer.js.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.js +4 -170
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -1
- package/lib/dist/resolution/type-parameters.d.ts +23 -0
- package/lib/dist/resolution/type-parameters.d.ts.map +1 -1
- package/lib/dist/resolution/type-parameters.js +52 -54
- package/lib/dist/resolution/type-parameters.js.map +1 -1
- package/lib/dist/resolution/types.d.ts +183 -11
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/resolution/types.js +0 -47
- package/lib/dist/resolution/types.js.map +1 -1
- package/lib/dist/resolution/vbnet-receivers.d.ts +92 -0
- package/lib/dist/resolution/vbnet-receivers.d.ts.map +1 -0
- package/lib/dist/resolution/vbnet-receivers.js +1482 -0
- package/lib/dist/resolution/vbnet-receivers.js.map +1 -0
- package/lib/dist/resolution/vue-router-synthesizer.js +0 -31
- package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/workspace-packages.d.ts +206 -15
- package/lib/dist/resolution/workspace-packages.d.ts.map +1 -1
- package/lib/dist/resolution/workspace-packages.js +570 -152
- package/lib/dist/resolution/workspace-packages.js.map +1 -1
- package/lib/dist/search/identifier-segments.js +2 -93
- package/lib/dist/search/identifier-segments.js.map +1 -1
- package/lib/dist/search/query-parser.js +0 -54
- package/lib/dist/search/query-parser.js.map +1 -1
- package/lib/dist/search/query-paths.js +0 -167
- package/lib/dist/search/query-paths.js.map +1 -1
- package/lib/dist/search/query-utils.d.ts +44 -0
- package/lib/dist/search/query-utils.d.ts.map +1 -1
- package/lib/dist/search/query-utils.js +120 -198
- package/lib/dist/search/query-utils.js.map +1 -1
- package/lib/dist/sync/git-hooks.d.ts +14 -5
- package/lib/dist/sync/git-hooks.d.ts.map +1 -1
- package/lib/dist/sync/git-hooks.js +118 -65
- package/lib/dist/sync/git-hooks.js.map +1 -1
- package/lib/dist/sync/index.js +0 -14
- package/lib/dist/sync/index.js.map +1 -1
- package/lib/dist/sync/watch-policy.js +0 -45
- package/lib/dist/sync/watch-policy.js.map +1 -1
- package/lib/dist/sync/watcher.d.ts +29 -11
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +83 -487
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/sync/worktree.d.ts +7 -2
- package/lib/dist/sync/worktree.d.ts.map +1 -1
- package/lib/dist/sync/worktree.js +24 -97
- package/lib/dist/sync/worktree.js.map +1 -1
- package/lib/dist/telemetry/index.d.ts.map +1 -1
- package/lib/dist/telemetry/index.js +15 -135
- package/lib/dist/telemetry/index.js.map +1 -1
- package/lib/dist/types.d.ts +46 -0
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +15 -44
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/ui/color.js +0 -19
- package/lib/dist/ui/color.js.map +1 -1
- package/lib/dist/ui/glyphs.js +2 -45
- package/lib/dist/ui/glyphs.js.map +1 -1
- package/lib/dist/ui/shimmer-progress.js +0 -21
- package/lib/dist/ui/shimmer-progress.js.map +1 -1
- package/lib/dist/ui/shimmer-worker.js +0 -22
- package/lib/dist/ui/shimmer-worker.js.map +1 -1
- package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -1
- package/lib/dist/ui-server/api/deadcode.js +2 -31
- package/lib/dist/ui-server/api/deadcode.js.map +1 -1
- package/lib/dist/ui-server/api/effects.js +0 -111
- package/lib/dist/ui-server/api/effects.js.map +1 -1
- package/lib/dist/ui-server/api/entrypoints.js +0 -142
- package/lib/dist/ui-server/api/entrypoints.js.map +1 -1
- package/lib/dist/ui-server/api/events.js +0 -145
- package/lib/dist/ui-server/api/events.js.map +1 -1
- package/lib/dist/ui-server/api/file.js +0 -80
- package/lib/dist/ui-server/api/file.js.map +1 -1
- package/lib/dist/ui-server/api/filecode.js +0 -95
- package/lib/dist/ui-server/api/filecode.js.map +1 -1
- package/lib/dist/ui-server/api/flow.js +0 -149
- package/lib/dist/ui-server/api/flow.js.map +1 -1
- package/lib/dist/ui-server/api/hierarchy.js +0 -28
- package/lib/dist/ui-server/api/hierarchy.js.map +1 -1
- package/lib/dist/ui-server/api/index.js +0 -88
- package/lib/dist/ui-server/api/index.js.map +1 -1
- package/lib/dist/ui-server/api/map.d.ts.map +1 -1
- package/lib/dist/ui-server/api/map.js +4 -317
- package/lib/dist/ui-server/api/map.js.map +1 -1
- package/lib/dist/ui-server/api/node.js +0 -111
- package/lib/dist/ui-server/api/node.js.map +1 -1
- package/lib/dist/ui-server/api/nodes.js +0 -16
- package/lib/dist/ui-server/api/nodes.js.map +1 -1
- package/lib/dist/ui-server/api/program.js +0 -90
- package/lib/dist/ui-server/api/program.js.map +1 -1
- package/lib/dist/ui-server/api/respond.js +0 -60
- package/lib/dist/ui-server/api/respond.js.map +1 -1
- package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -1
- package/lib/dist/ui-server/api/route-roots.js +2 -44
- package/lib/dist/ui-server/api/route-roots.js.map +1 -1
- package/lib/dist/ui-server/api/routes.d.ts.map +1 -1
- package/lib/dist/ui-server/api/routes.js +4 -60
- package/lib/dist/ui-server/api/routes.js.map +1 -1
- package/lib/dist/ui-server/api/screens.d.ts.map +1 -1
- package/lib/dist/ui-server/api/screens.js +4 -174
- package/lib/dist/ui-server/api/screens.js.map +1 -1
- package/lib/dist/ui-server/api/search.js +0 -62
- package/lib/dist/ui-server/api/search.js.map +1 -1
- package/lib/dist/ui-server/api/session.js +0 -58
- package/lib/dist/ui-server/api/session.js.map +1 -1
- package/lib/dist/ui-server/api/source.d.ts.map +1 -1
- package/lib/dist/ui-server/api/source.js +0 -161
- package/lib/dist/ui-server/api/source.js.map +1 -1
- package/lib/dist/ui-server/api/stats.js +0 -58
- package/lib/dist/ui-server/api/stats.js.map +1 -1
- package/lib/dist/ui-server/api/steps.d.ts.map +1 -1
- package/lib/dist/ui-server/api/steps.js +5 -381
- package/lib/dist/ui-server/api/steps.js.map +1 -1
- package/lib/dist/ui-server/api/trail-store.d.ts +3 -3
- package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -1
- package/lib/dist/ui-server/api/trail-store.js +24 -106
- package/lib/dist/ui-server/api/trail-store.js.map +1 -1
- package/lib/dist/ui-server/api/trails.d.ts.map +1 -1
- package/lib/dist/ui-server/api/trails.js +19 -94
- package/lib/dist/ui-server/api/trails.js.map +1 -1
- package/lib/dist/ui-server/api/when.js +0 -36
- package/lib/dist/ui-server/api/when.js.map +1 -1
- package/lib/dist/ui-server/api/wire.js +0 -58
- package/lib/dist/ui-server/api/wire.js.map +1 -1
- package/lib/dist/ui-server/assets.js +0 -35
- package/lib/dist/ui-server/assets.js.map +1 -1
- package/lib/dist/ui-server/constants.js +0 -26
- package/lib/dist/ui-server/constants.js.map +1 -1
- package/lib/dist/ui-server/highlight/bounded-tokenize.js +0 -25
- package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -1
- package/lib/dist/ui-server/highlight/index.js +1 -132
- package/lib/dist/ui-server/highlight/index.js.map +1 -1
- package/lib/dist/ui-server/highlight/languages.d.ts +3 -3
- package/lib/dist/ui-server/highlight/languages.js +0 -31
- package/lib/dist/ui-server/highlight/languages.js.map +1 -1
- package/lib/dist/ui-server/highlight/tokenize-worker.js +0 -5
- package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -1
- package/lib/dist/ui-server/index.d.ts +25 -0
- package/lib/dist/ui-server/index.d.ts.map +1 -1
- package/lib/dist/ui-server/index.js +35 -103
- package/lib/dist/ui-server/index.js.map +1 -1
- package/lib/dist/ui-server/open-browser.js +0 -34
- package/lib/dist/ui-server/open-browser.js.map +1 -1
- package/lib/dist/ui-server/security.d.ts +5 -0
- package/lib/dist/ui-server/security.d.ts.map +1 -1
- package/lib/dist/ui-server/security.js +11 -147
- package/lib/dist/ui-server/security.js.map +1 -1
- package/lib/dist/ui-server/static.js +0 -41
- package/lib/dist/ui-server/static.js.map +1 -1
- package/lib/dist/upgrade/index.d.ts +18 -5
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +73 -229
- package/lib/dist/upgrade/index.js.map +1 -1
- package/lib/dist/upgrade/remove-binary.js +2 -67
- package/lib/dist/upgrade/remove-binary.js.map +1 -1
- package/lib/dist/upgrade/update-check.js +1 -81
- package/lib/dist/upgrade/update-check.js.map +1 -1
- package/lib/dist/utils.d.ts +69 -1
- package/lib/dist/utils.d.ts.map +1 -1
- package/lib/dist/utils.js +224 -266
- package/lib/dist/utils.js.map +1 -1
- package/lib/dist/worker-teardown.js +0 -47
- package/lib/dist/worker-teardown.js.map +1 -1
- package/lib/kernel/codegraph-kernel.node +2 -2
- package/lib/node_modules/.package-lock.json +4 -4
- package/lib/node_modules/ignore/README.md +138 -8
- package/lib/node_modules/ignore/index.d.ts +56 -20
- package/lib/node_modules/ignore/index.js +1033 -221
- package/lib/node_modules/ignore/legacy.js +871 -178
- package/lib/node_modules/ignore/package.json +10 -4
- package/lib/package.json +14 -8
- package/node.exe +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mcpServers.codegraph` in an agent's JSON config, for the targets whose file
|
|
3
|
+
* has that shape.
|
|
4
|
+
*
|
|
5
|
+
* The file is edited in place with `jsonc-parser`, not rewritten: it keeps its
|
|
6
|
+
* indent and line breaks, and comments survive in the agents that allow them
|
|
7
|
+
* (Qwen Code, Qoder). A file that can't be parsed is backed up before it is
|
|
8
|
+
* replaced, as `writeJsonFile` does (#1870).
|
|
9
|
+
*
|
|
10
|
+
* An entry already in the file is the user's. Agents write into it themselves:
|
|
11
|
+
* a disabled switch, an `alwaysAllow` list, Pi's `exposure`. Users pin a
|
|
12
|
+
* `command` or a `cwd` there. So a re-install or the `install --refresh` that
|
|
13
|
+
* `codegraph upgrade` runs only fills in a key that is missing, and never
|
|
14
|
+
* changes one that is set.
|
|
15
|
+
*/
|
|
16
|
+
import type { WriteResult } from './types';
|
|
17
|
+
type FileResult = WriteResult['files'][number];
|
|
18
|
+
type Edit = (text: string) => string;
|
|
19
|
+
/** The object in `text`, or `{}` when it holds none. */
|
|
20
|
+
export declare function parseJsonConfig(text: string): Record<string, any>;
|
|
21
|
+
/** `text` with the value at `jsonPath` set, or removed when `value` is undefined. Everything else stays. */
|
|
22
|
+
export declare function editJson(text: string, jsonPath: Array<string | number>, value: unknown, options?: {
|
|
23
|
+
isArrayInsertion?: boolean;
|
|
24
|
+
}): string;
|
|
25
|
+
/**
|
|
26
|
+
* Whether `file` defines CodeGraph's server. Read-only and quiet: `detect()`
|
|
27
|
+
* runs this for every agent on every install (#1870).
|
|
28
|
+
*/
|
|
29
|
+
export declare function hasCodegraphServer(file: string): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Add CodeGraph's server to `file`, or the keys of `entry` an existing one is
|
|
32
|
+
* missing. `alsoEdit` runs on the same text, for a target with more to write in
|
|
33
|
+
* this file, so the file is written once and reported once.
|
|
34
|
+
*/
|
|
35
|
+
export declare function upsertCodegraphServer(file: string, entry: Record<string, unknown>, alsoEdit?: Edit): FileResult;
|
|
36
|
+
/**
|
|
37
|
+
* Inverse of `upsertCodegraphServer`: take out CodeGraph's server, its
|
|
38
|
+
* `mcpServers` wrapper when that held nothing else, and whatever `alsoEdit`
|
|
39
|
+
* takes out. A file with nothing left in it is deleted, so uninstall reverses a
|
|
40
|
+
* from-scratch install. A symbolic link is the user's, so it is kept, with `{}`
|
|
41
|
+
* written through it (#2721).
|
|
42
|
+
*/
|
|
43
|
+
export declare function removeCodegraphServer(file: string, alsoEdit?: Edit): FileResult;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=json-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-config.d.ts","sourceRoot":"","sources":["../../../src/installer/targets/json-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG3C,KAAK,UAAU,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/C,KAAK,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;AAiBrC,wDAAwD;AACxD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAEjE;AAED,4GAA4G;AAC5G,wBAAgB,QAAQ,CACtB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,EAChC,KAAK,EAAE,OAAO,EACd,OAAO,GAAE;IAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAO,GAC3C,MAAM,CAQR;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMxD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,QAAQ,GAAE,IAAa,GACtB,UAAU,CA2BZ;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,IAAa,GAAG,UAAU,CAkBvF"}
|
|
@@ -0,0 +1,128 @@
|
|
|
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.parseJsonConfig = parseJsonConfig;
|
|
37
|
+
exports.editJson = editJson;
|
|
38
|
+
exports.hasCodegraphServer = hasCodegraphServer;
|
|
39
|
+
exports.upsertCodegraphServer = upsertCodegraphServer;
|
|
40
|
+
exports.removeCodegraphServer = removeCodegraphServer;
|
|
41
|
+
const fs = __importStar(require("fs"));
|
|
42
|
+
const jsonc_parser_1 = require("jsonc-parser");
|
|
43
|
+
const shared_1 = require("./shared");
|
|
44
|
+
const SERVER_PATH = ['mcpServers', 'codegraph'];
|
|
45
|
+
const noEdit = (text) => text;
|
|
46
|
+
function isObject(value) {
|
|
47
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
48
|
+
}
|
|
49
|
+
function parseConfig(text) {
|
|
50
|
+
const body = text.replace(/^\uFEFF/, '');
|
|
51
|
+
if (body.trim() === '')
|
|
52
|
+
return { config: {}, valid: true };
|
|
53
|
+
const errors = [];
|
|
54
|
+
const value = (0, jsonc_parser_1.parse)(body, errors, { allowTrailingComma: true });
|
|
55
|
+
return isObject(value) && errors.length === 0 ? { config: value, valid: true } : { config: {}, valid: false };
|
|
56
|
+
}
|
|
57
|
+
function parseJsonConfig(text) {
|
|
58
|
+
return parseConfig(text).config;
|
|
59
|
+
}
|
|
60
|
+
function editJson(text, jsonPath, value, options = {}) {
|
|
61
|
+
const eol = text.includes('\r\n') ? '\r\n' : '\n';
|
|
62
|
+
const indent = /^([ \t]+)\S/m.exec(text)?.[1] ?? ' ';
|
|
63
|
+
const insertSpaces = !indent.startsWith('\t');
|
|
64
|
+
return (0, jsonc_parser_1.applyEdits)(text, (0, jsonc_parser_1.modify)(text, jsonPath, value, {
|
|
65
|
+
...options,
|
|
66
|
+
formattingOptions: { tabSize: insertSpaces ? indent.length : 1, insertSpaces, eol },
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
function hasCodegraphServer(file) {
|
|
70
|
+
try {
|
|
71
|
+
return !!parseConfig(fs.readFileSync(file, 'utf-8')).config.mcpServers?.codegraph;
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function upsertCodegraphServer(file, entry, alsoEdit = noEdit) {
|
|
78
|
+
const existed = fs.existsSync(file);
|
|
79
|
+
const before = existed ? fs.readFileSync(file, 'utf-8') : '';
|
|
80
|
+
const { config, valid } = parseConfig(before);
|
|
81
|
+
const servers = config.mcpServers;
|
|
82
|
+
if (servers !== undefined && !isObject(servers)) {
|
|
83
|
+
throw new Error(`${file} sets mcpServers to something other than an object, so CodeGraph can't add its server. ` +
|
|
84
|
+
'Nothing was changed: make mcpServers an object, then run this again.');
|
|
85
|
+
}
|
|
86
|
+
if (!valid)
|
|
87
|
+
(0, shared_1.backupUnparseableJson)(file);
|
|
88
|
+
let text = valid && before.trim() !== '' ? before : '{\n}\n';
|
|
89
|
+
const current = servers?.codegraph;
|
|
90
|
+
if (isObject(current)) {
|
|
91
|
+
for (const [key, value] of Object.entries(entry)) {
|
|
92
|
+
if (!(key in current))
|
|
93
|
+
text = editJson(text, [...SERVER_PATH, key], value);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
text = editJson(text, SERVER_PATH, entry);
|
|
98
|
+
}
|
|
99
|
+
text = alsoEdit(text);
|
|
100
|
+
if (text === before)
|
|
101
|
+
return { path: file, action: 'unchanged' };
|
|
102
|
+
(0, shared_1.atomicWriteFileSync)(file, text);
|
|
103
|
+
return { path: file, action: existed ? 'updated' : 'created' };
|
|
104
|
+
}
|
|
105
|
+
function removeCodegraphServer(file, alsoEdit = noEdit) {
|
|
106
|
+
if (!fs.existsSync(file))
|
|
107
|
+
return { path: file, action: 'not-found' };
|
|
108
|
+
const before = fs.readFileSync(file, 'utf-8');
|
|
109
|
+
const { config, valid } = parseConfig(before);
|
|
110
|
+
if (!valid)
|
|
111
|
+
return { path: file, action: 'not-found' };
|
|
112
|
+
let text = before;
|
|
113
|
+
const servers = config.mcpServers;
|
|
114
|
+
if (isObject(servers) && 'codegraph' in servers) {
|
|
115
|
+
text = editJson(text, SERVER_PATH, undefined);
|
|
116
|
+
if (Object.keys(servers).length === 1)
|
|
117
|
+
text = editJson(text, ['mcpServers'], undefined);
|
|
118
|
+
}
|
|
119
|
+
text = alsoEdit(text);
|
|
120
|
+
if (text === before)
|
|
121
|
+
return { path: file, action: 'not-found' };
|
|
122
|
+
if (/^\s*\{\s*\}\s*$/.test(text))
|
|
123
|
+
(0, shared_1.removeFileUnlessLinked)(file, '{}\n');
|
|
124
|
+
else
|
|
125
|
+
(0, shared_1.atomicWriteFileSync)(file, text);
|
|
126
|
+
return { path: file, action: 'removed' };
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=json-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-config.js","sourceRoot":"","sources":["../../../src/installer/targets/json-config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,0CAEC;AAGD,4BAaC;AAMD,gDAMC;AAOD,sDA+BC;AASD,sDAkBC;AAvHD,uCAAyB;AACzB,+CAA0E;AAE1E,qCAA8F;AAK9F,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;AAChD,MAAM,MAAM,GAAS,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC;AAEpC,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,WAAW,CAAC,IAAY;IAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IACzC,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,E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AAO,CAAC,CAAC,MAAM,KAAK,CAAC;YAAE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC,CAAC;IAC1F,CAAC;IACD,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEtB,IAAI,IAAI,KAAK,MAAM;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IAChE,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,IAAA,+BAAsB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;;QAClE,IAAA,4BAAmB,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACrC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kimi Code target.
|
|
3
|
+
*
|
|
4
|
+
* - MCP server entry under `mcpServers` in `mcp.json`: `$KIMI_CODE_HOME`
|
|
5
|
+
* (default `~/.kimi-code`) when global, `./.kimi-code` when local. Kimi
|
|
6
|
+
* reads an entry with `command` as a stdio server and documents no `type`
|
|
7
|
+
* key. A project-level server runs only once the folder is trusted, so a
|
|
8
|
+
* local install says so.
|
|
9
|
+
* - Instructions to `AGENTS.md`: in `$KIMI_CODE_HOME` when global, at the
|
|
10
|
+
* project root when local.
|
|
11
|
+
*
|
|
12
|
+
* `autoAllow` is a no-op: Kimi keeps its approval rules in its own
|
|
13
|
+
* `config.toml`, as `[[permission.rules]]`.
|
|
14
|
+
*
|
|
15
|
+
* Docs: https://moonshotai.github.io/kimi-code/en/customization/mcp.html
|
|
16
|
+
* https://moonshotai.github.io/kimi-code/en/configuration/data-locations.html
|
|
17
|
+
* https://moonshotai.github.io/kimi-code/en/customization/agents.html
|
|
18
|
+
*/
|
|
19
|
+
import { AgentTarget } from './types';
|
|
20
|
+
export declare const kimiTarget: AgentTarget;
|
|
21
|
+
//# sourceMappingURL=kimi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kimi.d.ts","sourceRoot":"","sources":["../../../src/installer/targets/kimi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EAAE,WAAW,EAA0D,MAAM,SAAS,CAAC;AAwE9F,eAAO,MAAM,UAAU,EAAE,WAA8B,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
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.kimiTarget = void 0;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const os = __importStar(require("os"));
|
|
39
|
+
const path = __importStar(require("path"));
|
|
40
|
+
const json_config_1 = require("./json-config");
|
|
41
|
+
const shared_1 = require("./shared");
|
|
42
|
+
function configDir(loc) {
|
|
43
|
+
return loc === 'global'
|
|
44
|
+
? (0, shared_1.configDirFromEnv)('KIMI_CODE_HOME', path.join(os.homedir(), '.kimi-code'))
|
|
45
|
+
: path.join(process.cwd(), '.kimi-code');
|
|
46
|
+
}
|
|
47
|
+
function mcpJsonPath(loc) {
|
|
48
|
+
return path.join(configDir(loc), 'mcp.json');
|
|
49
|
+
}
|
|
50
|
+
function instructionsPath(loc) {
|
|
51
|
+
return loc === 'global' ? path.join(configDir('global'), 'AGENTS.md') : path.join(process.cwd(), 'AGENTS.md');
|
|
52
|
+
}
|
|
53
|
+
class KimiTarget {
|
|
54
|
+
id = 'kimi';
|
|
55
|
+
displayName = 'Kimi Code';
|
|
56
|
+
docsUrl = 'https://moonshotai.github.io/kimi-code/en/customization/mcp.html';
|
|
57
|
+
supportsLocation(_loc) {
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
detect(loc) {
|
|
61
|
+
const file = mcpJsonPath(loc);
|
|
62
|
+
return {
|
|
63
|
+
installed: fs.existsSync(configDir(loc)),
|
|
64
|
+
alreadyConfigured: (0, json_config_1.hasCodegraphServer)(file),
|
|
65
|
+
configPath: file,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
install(loc, _opts) {
|
|
69
|
+
const notes = ['Start a new Kimi Code session: a server added mid-session only joins later ones.'];
|
|
70
|
+
if (loc === 'local')
|
|
71
|
+
notes.push(`Kimi Code runs ${mcpJsonPath('local')} only in a trusted folder: trust this folder when Kimi Code asks.`);
|
|
72
|
+
return {
|
|
73
|
+
files: [
|
|
74
|
+
(0, json_config_1.upsertCodegraphServer)(mcpJsonPath(loc), (0, shared_1.getStdioServerConfig)()),
|
|
75
|
+
(0, shared_1.upsertInstructionsEntry)(instructionsPath(loc)),
|
|
76
|
+
],
|
|
77
|
+
notes,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
uninstall(loc) {
|
|
81
|
+
return {
|
|
82
|
+
files: [
|
|
83
|
+
(0, json_config_1.removeCodegraphServer)(mcpJsonPath(loc)),
|
|
84
|
+
(0, shared_1.removeInstructionsEntry)(instructionsPath(loc)),
|
|
85
|
+
],
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
printConfig(loc) {
|
|
89
|
+
const snippet = JSON.stringify({ mcpServers: { codegraph: (0, shared_1.getStdioServerConfig)() } }, null, 2);
|
|
90
|
+
return `# Add to ${mcpJsonPath(loc)}\n\n${snippet}\n`;
|
|
91
|
+
}
|
|
92
|
+
describePaths(loc) {
|
|
93
|
+
return [mcpJsonPath(loc), instructionsPath(loc)];
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.kimiTarget = new KimiTarget();
|
|
97
|
+
//# sourceMappingURL=kimi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kimi.js","sourceRoot":"","sources":["../../../src/installer/targets/kimi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAE7B,+CAAiG;AACjG,qCAKkB;AAElB,SAAS,SAAS,CAAC,GAAa;IAC9B,OAAO,GAAG,KAAK,QAAQ;QACrB,CAAC,CAAC,IAAA,yBAAgB,EAAC,gBAAgB,EAAE,IAAI,C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B,EAAC,WAAW,CAAC,GAAG,CAAC,EAAE,IAAA,6BAAoB,GAAE,CAAC;gBAC/D,IAAA,gCAAuB,EAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;aAC/C;YACD,KAAK;SACN,CAAC;IACJ,CAAC;IAED,SAAS,CAAC,GAAa;QACrB,OAAO;YACL,KAAK,EAAE;gBACL,IAAA,mCAAqB,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC;gBACvC,IAAA,gCAAuB,EAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;aAC/C;SACF,CAAC;IACJ,CAAC;IAED,WAAW,CAAC,GAAa;QACvB,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,IAAA,6BAAoB,GAAE,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAC/F,OAAO,YAAY,WAAW,CAAC,GAAG,CAAC,OAAO,OAAO,IAAI,CAAC;IACxD,CAAC;IAED,aAAa,CAAC,GAAa;QACzB,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;IACnD,CAAC;CACF;AAEY,QAAA,UAAU,GAAgB,IAAI,UAAU,EAAE,CAAC"}
|
|
@@ -1,28 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Kiro CLI / IDE target. Writes:
|
|
4
|
-
*
|
|
5
|
-
* - MCP server entry to `~/.kiro/settings/mcp.json` (global) or
|
|
6
|
-
* `./.kiro/settings/mcp.json` (local). Standard `mcpServers.codegraph`
|
|
7
|
-
* shape, same as Claude / Cursor / Gemini.
|
|
8
|
-
* - Instructions to `~/.kiro/steering/codegraph.md` (global) or
|
|
9
|
-
* `./.kiro/steering/codegraph.md` (local). Kiro's "steering" system
|
|
10
|
-
* loads every `*.md` file in the steering dir as agent context, so
|
|
11
|
-
* a dedicated `codegraph.md` is the natural surface — we own the
|
|
12
|
-
* whole file outright (no marker-based merging needed) and delete
|
|
13
|
-
* it on uninstall.
|
|
14
|
-
*
|
|
15
|
-
* No permissions concept — Kiro gates tool invocations through its own
|
|
16
|
-
* UI prompts rather than an external allowlist. `autoAllow` is silently
|
|
17
|
-
* ignored.
|
|
18
|
-
*
|
|
19
|
-
* Paths are identical on macOS / Linux / Windows because Kiro resolves
|
|
20
|
-
* its config root from `os.homedir()` on all three (Windows `~` →
|
|
21
|
-
* `%USERPROFILE%\.kiro`).
|
|
22
|
-
*
|
|
23
|
-
* Docs: https://kiro.dev/docs/cli/mcp/
|
|
24
|
-
* https://kiro.dev/docs/cli/steering/
|
|
25
|
-
*/
|
|
26
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
27
3
|
if (k2 === undefined) k2 = k;
|
|
28
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -92,20 +68,11 @@ class KiroTarget {
|
|
|
92
68
|
install(loc, _opts) {
|
|
93
69
|
const files = [];
|
|
94
70
|
files.push(writeMcpEntry(loc));
|
|
95
|
-
// The steering doc is no longer written — the codegraph usage
|
|
96
|
-
// guidance ships in the MCP server's `initialize` response (issue
|
|
97
|
-
// #529). Delete a `codegraph.md` a previous install created so an
|
|
98
|
-
// upgrade self-heals.
|
|
99
71
|
const steeringCleanup = removeSteeringEntry(loc);
|
|
100
72
|
if (steeringCleanup.action === 'removed')
|
|
101
73
|
files.push(steeringCleanup);
|
|
102
74
|
return {
|
|
103
75
|
files,
|
|
104
|
-
// The IDE-only enable-MCP step is load-bearing: Kiro IDE ships
|
|
105
|
-
// with MCP support disabled by default, so even a valid
|
|
106
|
-
// `~/.kiro/settings/mcp.json` at the documented path is ignored
|
|
107
|
-
// until the user flips the toggle. Kiro CLI reads the same file
|
|
108
|
-
// without a gate, so we call out which audience this applies to.
|
|
109
76
|
notes: [
|
|
110
77
|
'Restart Kiro for MCP changes to take effect.',
|
|
111
78
|
'Kiro IDE: also enable MCP in Settings (search "MCP" → "Enabled"). Kiro CLI users can skip this step.',
|
|
@@ -157,13 +124,6 @@ function writeMcpEntry(loc) {
|
|
|
157
124
|
(0, shared_1.writeJsonFile)(file, existing);
|
|
158
125
|
return { path: file, action };
|
|
159
126
|
}
|
|
160
|
-
/**
|
|
161
|
-
* Delete the steering file we own. If a user has hand-edited the file
|
|
162
|
-
* out of recognition we still remove it — codegraph.md is a name we
|
|
163
|
-
* claim, and a partial install leaving the file behind is worse than
|
|
164
|
-
* a clean delete. Used by both install (self-heal on upgrade — see
|
|
165
|
-
* issue #529) and uninstall.
|
|
166
|
-
*/
|
|
167
127
|
function removeSteeringEntry(loc) {
|
|
168
128
|
const file = steeringPath(loc);
|
|
169
129
|
if (!fs.existsSync(file))
|
|
@@ -171,7 +131,7 @@ function removeSteeringEntry(loc) {
|
|
|
171
131
|
try {
|
|
172
132
|
fs.unlinkSync(file);
|
|
173
133
|
}
|
|
174
|
-
catch {
|
|
134
|
+
catch { }
|
|
175
135
|
return { path: file, action: 'removed' };
|
|
176
136
|
}
|
|
177
137
|
exports.kiroTarget = new KiroTarget();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kiro.js","sourceRoot":"","sources":["../../../src/installer/targets/kiro.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"kiro.js","sourceRoot":"","sources":["../../../src/installer/targets/kiro.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AAQzB,qCAKkB;AAElB,SAAS,SAAS,CAAC,GAAa;IAC9B,OAAO,GAAG,KAAK,QAAQ;QACrB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC;QAClC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC;AACxC,CAA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MAAM,EAAE,CAAC;AAChC,CAAC;AASD,SAAS,mBAAmB,CAAC,GAAa;IACxC,MAAM,IAAI,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IACrE,IAAI,CAAC;QAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC,CAAc,CAAC;IACnD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC3C,CAAC;AAEY,QAAA,UAAU,GAAgB,IAAI,UAAU,EAAE,CAAC"}
|
|
@@ -1,50 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* opencode target.
|
|
4
|
-
*
|
|
5
|
-
* - MCP server entry to `~/.config/opencode/opencode.jsonc` (global,
|
|
6
|
-
* XDG-style on EVERY platform, Windows included — see below) or
|
|
7
|
-
* `./opencode.jsonc` (local). Falls back to `opencode.json` when a
|
|
8
|
-
* `.json` file already exists; defaults new installs to `.jsonc`
|
|
9
|
-
* because that's what opencode itself creates on first run.
|
|
10
|
-
*
|
|
11
|
-
* opencode resolves its config dir with the `xdg-basedir` package
|
|
12
|
-
* (sst/opencode `packages/core/src/global.ts`): `XDG_CONFIG_HOME`
|
|
13
|
-
* if set, else `~/.config` — unconditionally, on all platforms. It
|
|
14
|
-
* never reads `%APPDATA%`; that layout belonged to the discontinued
|
|
15
|
-
* Go fork. We previously wrote there on Windows, so opencode never
|
|
16
|
-
* saw the entry (#535) — install/uninstall now also sweep a stale
|
|
17
|
-
* codegraph entry out of the legacy `%APPDATA%/opencode` location.
|
|
18
|
-
* - Instructions to `~/.config/opencode/AGENTS.md` (global) or
|
|
19
|
-
* `./AGENTS.md` (local). opencode reads AGENTS.md for agent
|
|
20
|
-
* instructions — same convention Codex CLI uses.
|
|
21
|
-
* - No permissions concept.
|
|
22
|
-
*
|
|
23
|
-
* Config shape uses OpenCode 2's native wrapper (also read by 1.18+):
|
|
24
|
-
* {
|
|
25
|
-
* "$schema": "https://opencode.ai/config.json",
|
|
26
|
-
* "mcp": {
|
|
27
|
-
* "servers": {
|
|
28
|
-
* "codegraph": {
|
|
29
|
-
* "type": "local",
|
|
30
|
-
* "command": [...],
|
|
31
|
-
* "disabled": false,
|
|
32
|
-
* "codemode": false
|
|
33
|
-
* }
|
|
34
|
-
* }
|
|
35
|
-
* }
|
|
36
|
-
* }
|
|
37
|
-
*
|
|
38
|
-
* OpenCode 2 puts servers under `mcp.servers` (not `mcp.<name>`), uses
|
|
39
|
-
* `disabled` instead of `enabled`, and defaults tools through Code Mode —
|
|
40
|
-
* `codemode: false` keeps `codegraph_explore` on the provider's native
|
|
41
|
-
* tool list (#1698). Pre-#1698 installs wrote the v1 `mcp.codegraph` +
|
|
42
|
-
* `enabled` shape; re-install migrates, uninstall removes either.
|
|
43
|
-
*
|
|
44
|
-
* Reads + writes go through `jsonc-parser` so any `//` and `/* *\/`
|
|
45
|
-
* comments the user has added to their `.jsonc` survive idempotent
|
|
46
|
-
* re-runs.
|
|
47
|
-
*/
|
|
48
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
49
3
|
if (k2 === undefined) k2 = k;
|
|
50
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -87,21 +41,11 @@ const jsonc_parser_1 = require("jsonc-parser");
|
|
|
87
41
|
const shared_1 = require("./shared");
|
|
88
42
|
const instructions_template_1 = require("../instructions-template");
|
|
89
43
|
function globalConfigDir() {
|
|
90
|
-
// XDG_CONFIG_HOME if set, else ~/.config — on every platform, matching
|
|
91
|
-
// opencode's own `xdg-basedir` resolution (no Windows special case; #535).
|
|
92
44
|
const xdg = process.env.XDG_CONFIG_HOME && process.env.XDG_CONFIG_HOME.trim().length > 0
|
|
93
45
|
? process.env.XDG_CONFIG_HOME
|
|
94
46
|
: path.join(os.homedir(), '.config');
|
|
95
47
|
return path.join(xdg, 'opencode');
|
|
96
48
|
}
|
|
97
|
-
/**
|
|
98
|
-
* Pre-#535 installs wrote the global entry to `%APPDATA%/opencode` — a dir
|
|
99
|
-
* today's opencode never reads. Returns that legacy dir when it could hold
|
|
100
|
-
* stale state (APPDATA set and resolving somewhere other than the real config
|
|
101
|
-
* dir). Gated on the env var rather than `process.platform` so the cleanup
|
|
102
|
-
* logic runs under the cross-platform test suite; on POSIX, APPDATA is unset
|
|
103
|
-
* in real life and this is a no-op.
|
|
104
|
-
*/
|
|
105
49
|
function legacyWindowsConfigDir() {
|
|
106
50
|
const appData = process.env.APPDATA;
|
|
107
51
|
if (!appData || !appData.trim())
|
|
@@ -112,9 +56,6 @@ function legacyWindowsConfigDir() {
|
|
|
112
56
|
function configBaseDir(loc) {
|
|
113
57
|
return loc === 'global' ? globalConfigDir() : process.cwd();
|
|
114
58
|
}
|
|
115
|
-
// Pick existing .jsonc, then .json, default to .jsonc for new files.
|
|
116
|
-
// opencode auto-creates .jsonc on first run, so that's the dominant
|
|
117
|
-
// real-world case and the sensible default for greenfield installs.
|
|
118
59
|
function configPath(loc) {
|
|
119
60
|
const dir = configBaseDir(loc);
|
|
120
61
|
const jsonc = path.join(dir, 'opencode.jsonc');
|
|
@@ -148,12 +89,9 @@ function getOpencodeServerEntry() {
|
|
|
148
89
|
type: 'local',
|
|
149
90
|
command: ['codegraph', 'serve', '--mcp'],
|
|
150
91
|
disabled: false,
|
|
151
|
-
// Keep codegraph_explore on the native tool list — OpenCode 2's
|
|
152
|
-
// default Code Mode would otherwise hide the one-tool server (#1698).
|
|
153
92
|
codemode: false,
|
|
154
93
|
};
|
|
155
94
|
}
|
|
156
|
-
/** True when either the OpenCode 2 native entry or a pre-#1698 v1 entry is present. */
|
|
157
95
|
function hasCodegraphEntry(config) {
|
|
158
96
|
return !!(config.mcp?.servers?.codegraph || config.mcp?.codegraph);
|
|
159
97
|
}
|
|
@@ -169,9 +107,6 @@ class OpencodeTarget {
|
|
|
169
107
|
const file = configPath(loc);
|
|
170
108
|
const config = parseConfig(readConfigText(file));
|
|
171
109
|
const alreadyConfigured = hasCodegraphEntry(config);
|
|
172
|
-
// Global: the XDG dir is what current opencode creates on first run; the
|
|
173
|
-
// legacy %APPDATA% dir still counts as "opencode present" so a re-install
|
|
174
|
-
// can sweep the stale pre-#535 entry out of it.
|
|
175
110
|
const legacy = legacyWindowsConfigDir();
|
|
176
111
|
const installed = loc === 'global'
|
|
177
112
|
? fs.existsSync(globalConfigDir()) || (!!legacy && fs.existsSync(legacy))
|
|
@@ -181,12 +116,7 @@ class OpencodeTarget {
|
|
|
181
116
|
install(loc, _opts) {
|
|
182
117
|
const files = [];
|
|
183
118
|
files.push(writeMcpEntry(loc));
|
|
184
|
-
// AGENTS.md gets the short marker-fenced CodeGraph block (#704):
|
|
185
|
-
// subagents and non-MCP harnesses read AGENTS.md but never the MCP
|
|
186
|
-
// initialize instructions. Upsert self-heals a stale pre-#529 block.
|
|
187
119
|
files.push((0, shared_1.upsertInstructionsEntry)(instructionsPath(loc)));
|
|
188
|
-
// Self-heal a pre-#535 install that wrote to %APPDATA%/opencode —
|
|
189
|
-
// opencode never reads it, so anything of ours there is stale.
|
|
190
120
|
if (loc === 'global')
|
|
191
121
|
files.push(...cleanupLegacyWindowsState());
|
|
192
122
|
return { files };
|
|
@@ -215,9 +145,6 @@ function writeMcpEntry(loc) {
|
|
|
215
145
|
const file = configPath(loc);
|
|
216
146
|
const existed = fs.existsSync(file);
|
|
217
147
|
let text = readConfigText(file);
|
|
218
|
-
// Seed a minimal opencode config when the file is brand-new so
|
|
219
|
-
// the result is a complete, schema-tagged file (not just a bare
|
|
220
|
-
// `{ "mcp": {...} }`).
|
|
221
148
|
if (!text.trim()) {
|
|
222
149
|
text = '{\n "$schema": "https://opencode.ai/config.json"\n}\n';
|
|
223
150
|
}
|
|
@@ -225,27 +152,21 @@ function writeMcpEntry(loc) {
|
|
|
225
152
|
const before = config.mcp?.servers?.codegraph;
|
|
226
153
|
const after = getOpencodeServerEntry();
|
|
227
154
|
const hasLegacy = !!config.mcp?.codegraph;
|
|
228
|
-
// Native entry already matches and no v1 leftover → nothing to do.
|
|
229
155
|
if ((0, shared_1.jsonDeepEqual)(before, after) && !hasLegacy) {
|
|
230
156
|
return { path: file, action: 'unchanged' };
|
|
231
157
|
}
|
|
232
|
-
// Add $schema if the user's existing file is missing it.
|
|
233
158
|
if (!config.$schema) {
|
|
234
159
|
const schemaEdits = (0, jsonc_parser_1.modify)(text, ['$schema'], 'https://opencode.ai/config.json', {
|
|
235
160
|
formattingOptions: FORMATTING,
|
|
236
161
|
});
|
|
237
162
|
text = (0, jsonc_parser_1.applyEdits)(text, schemaEdits);
|
|
238
163
|
}
|
|
239
|
-
// Migrate pre-#1698 `mcp.codegraph` (+ enabled) off the file so OpenCode 2
|
|
240
|
-
// keeps only the native entry where `codemode` survives normalization.
|
|
241
164
|
if (hasLegacy) {
|
|
242
165
|
const legacyEdits = (0, jsonc_parser_1.modify)(text, ['mcp', 'codegraph'], undefined, {
|
|
243
166
|
formattingOptions: FORMATTING,
|
|
244
167
|
});
|
|
245
168
|
text = (0, jsonc_parser_1.applyEdits)(text, legacyEdits);
|
|
246
169
|
}
|
|
247
|
-
// Surgical edit — preserves comments, formatting, and order of
|
|
248
|
-
// every key we don't touch.
|
|
249
170
|
const edits = (0, jsonc_parser_1.modify)(text, ['mcp', 'servers', 'codegraph'], after, {
|
|
250
171
|
formattingOptions: FORMATTING,
|
|
251
172
|
});
|
|
@@ -253,13 +174,6 @@ function writeMcpEntry(loc) {
|
|
|
253
174
|
(0, shared_1.atomicWriteFileSync)(file, updated);
|
|
254
175
|
return { path: file, action: existed ? 'updated' : 'created' };
|
|
255
176
|
}
|
|
256
|
-
/**
|
|
257
|
-
* Surgically drop our CodeGraph entry from one config file — either the
|
|
258
|
-
* OpenCode 2 native `mcp.servers.codegraph` or a pre-#1698 `mcp.codegraph`.
|
|
259
|
-
* Leaves sibling servers, comments, and formatting untouched; drops emptied
|
|
260
|
-
* `mcp.servers` / `mcp` wrappers too. Shared by uninstall and the
|
|
261
|
-
* legacy-%APPDATA% sweep.
|
|
262
|
-
*/
|
|
263
177
|
function removeMcpEntryAt(file) {
|
|
264
178
|
if (!fs.existsSync(file))
|
|
265
179
|
return { path: file, action: 'not-found' };
|
|
@@ -274,8 +188,6 @@ function removeMcpEntryAt(file) {
|
|
|
274
188
|
});
|
|
275
189
|
updated = (0, jsonc_parser_1.applyEdits)(updated, edits);
|
|
276
190
|
}
|
|
277
|
-
// Re-parse after the native removal so a file that held BOTH shapes
|
|
278
|
-
// (unusual, but possible mid-migration) still drops the v1 leftover.
|
|
279
191
|
const mid = parseConfig(updated);
|
|
280
192
|
if (mid.mcp?.codegraph) {
|
|
281
193
|
const edits = (0, jsonc_parser_1.modify)(updated, ['mcp', 'codegraph'], undefined, {
|
|
@@ -283,7 +195,6 @@ function removeMcpEntryAt(file) {
|
|
|
283
195
|
});
|
|
284
196
|
updated = (0, jsonc_parser_1.applyEdits)(updated, edits);
|
|
285
197
|
}
|
|
286
|
-
// If `mcp.servers` is now an empty object, drop that wrapper.
|
|
287
198
|
let afterParsed = parseConfig(updated);
|
|
288
199
|
if (afterParsed.mcp?.servers && typeof afterParsed.mcp.servers === 'object' &&
|
|
289
200
|
Object.keys(afterParsed.mcp.servers).length === 0) {
|
|
@@ -293,7 +204,6 @@ function removeMcpEntryAt(file) {
|
|
|
293
204
|
updated = (0, jsonc_parser_1.applyEdits)(updated, edits);
|
|
294
205
|
afterParsed = parseConfig(updated);
|
|
295
206
|
}
|
|
296
|
-
// If `mcp` is now an empty object, drop the wrapper too.
|
|
297
207
|
if (afterParsed.mcp && typeof afterParsed.mcp === 'object' &&
|
|
298
208
|
Object.keys(afterParsed.mcp).length === 0) {
|
|
299
209
|
const edits = (0, jsonc_parser_1.modify)(updated, ['mcp'], undefined, { formattingOptions: FORMATTING });
|
|
@@ -302,13 +212,6 @@ function removeMcpEntryAt(file) {
|
|
|
302
212
|
(0, shared_1.atomicWriteFileSync)(file, updated);
|
|
303
213
|
return { path: file, action: 'removed' };
|
|
304
214
|
}
|
|
305
|
-
/**
|
|
306
|
-
* Remove whatever a pre-#535 install left in `%APPDATA%/opencode` — an MCP
|
|
307
|
-
* entry opencode never reads, plus our marker-fenced AGENTS.md block. Returns
|
|
308
|
-
* only files actually changed, so install output stays quiet when there is
|
|
309
|
-
* nothing to heal. Never touches anything else in the legacy dir: a user may
|
|
310
|
-
* genuinely keep other tools' state under %APPDATA%.
|
|
311
|
-
*/
|
|
312
215
|
function cleanupLegacyWindowsState() {
|
|
313
216
|
const dir = legacyWindowsConfigDir();
|
|
314
217
|
if (!dir || !fs.existsSync(dir))
|
|
@@ -325,11 +228,6 @@ function cleanupLegacyWindowsState() {
|
|
|
325
228
|
out.push({ path: agents, action });
|
|
326
229
|
return out;
|
|
327
230
|
}
|
|
328
|
-
/**
|
|
329
|
-
* Strip the marker-delimited CodeGraph block from AGENTS.md if a prior
|
|
330
|
-
* install wrote one. Used by both install (self-heal on upgrade) and
|
|
331
|
-
* uninstall — see issue #529.
|
|
332
|
-
*/
|
|
333
231
|
function removeInstructionsEntry(loc) {
|
|
334
232
|
const file = instructionsPath(loc);
|
|
335
233
|
const action = (0, shared_1.removeMarkedSection)(file, instructions_template_1.CODEGRAPH_SECTION_START, instructions_template_1.CODEGRAPH_SECTION_END);
|