pi-agent-ide 0.2.0 → 0.2.1
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/CHANGELOG.md +26 -0
- package/dist/chunk-2XYXV5HS.js +4 -0
- package/dist/{chunk-YQTLJ5ZV.js → chunk-6XQQBKPE.js} +1 -1
- package/dist/{chunk-VUNCBASK.js → chunk-KH5KPBCR.js} +3 -3
- package/dist/chunk-L4FA6OD4.js +1 -0
- package/dist/chunk-LGN7EJYR.js +13 -0
- package/dist/chunk-MTQSGWZJ.js +1 -0
- package/dist/chunk-N34ATN52.js +1 -0
- package/dist/{chunk-52BM6J6I.js → chunk-NXHPO7ER.js} +3 -3
- package/dist/{chunk-QW5O42QJ.js → chunk-OFHVDY4Q.js} +1 -1
- package/dist/{chunk-E4SECPF4.js → chunk-ONWUJXUR.js} +1 -1
- package/dist/chunk-QZANC2IG.js +1 -0
- package/dist/{chunk-QNZVPFSP.js → chunk-SMSIT3CE.js} +1 -1
- package/dist/{chunk-KP37XTDI.js → chunk-UTTW55S2.js} +1 -1
- package/dist/chunk-VEJGSURY.js +8 -0
- package/dist/chunk-WZI4YC2O.js +1 -0
- package/dist/{chunk-5A25RATC.js → chunk-ZIHEF6K3.js} +3 -3
- package/dist/entry-0.js +1 -1
- package/dist/entry-18.js +1 -1
- package/dist/entry-19.js +1 -1
- package/dist/entry-20.js +1 -1
- package/dist/entry-21.js +1 -1
- package/dist/entry-22.js +1 -1
- package/dist/entry-23.js +1 -1
- package/dist/entry-24.js +1 -1
- package/dist/entry-25.js +1 -1
- package/dist/entry-26.js +1 -1
- package/dist/entry-27.js +1 -1
- package/dist/entry-28.js +1 -1
- package/dist/entry-29.js +1 -1
- package/dist/entry-30.js +1 -1
- package/dist/entry-31.js +1 -1
- package/dist/entry-32.js +1 -1
- package/dist/entry-33.js +1 -1
- package/dist/entry-34.js +1 -1
- package/dist/entry-35.js +1 -1
- package/dist/entry-36.js +1 -1
- package/dist/entry-37.js +1 -1
- package/dist/entry-38.js +1 -1
- package/dist/entry-39.js +1 -1
- package/dist/entry-4.js +1 -1
- package/dist/entry-40.js +1 -1
- package/dist/entry-41.js +1 -1
- package/dist/entry-42.js +1 -1
- package/dist/entry-43.js +1 -1
- package/dist/entry-44.js +1 -1
- package/dist/entry-45.js +1 -1
- package/dist/entry-46.js +1 -1
- package/dist/entry-47.js +1 -1
- package/dist/entry-48.js +1 -1
- package/dist/entry-49.js +1 -1
- package/dist/entry-50.js +1 -1
- package/dist/entry-51.js +1 -1
- package/dist/entry-52.js +1 -1
- package/dist/entry-53.js +1 -0
- package/dist/entry-54.js +0 -1
- package/dist/entry-55.js +1 -0
- package/dist/entry-56.js +0 -1
- package/dist/entry-57.js +1 -1
- package/dist/entry-58.js +1 -1
- package/dist/entry-59.js +1 -1
- package/dist/entry-60.js +1 -1
- package/dist/entry-61.js +1 -1
- package/dist/entry-62.js +1 -0
- package/dist/entry-63.js +0 -1
- package/dist/entry-64.js +1 -0
- package/dist/entry-65.js +0 -1
- package/dist/entry-66.js +1 -1
- package/dist/entry-67.js +1 -1
- package/dist/entry-68.js +1 -1
- package/dist/entry-69.js +1 -1
- package/dist/entry-70.js +1 -1
- package/dist/entry-71.js +1 -1
- package/dist/entry-72.js +1 -1
- package/dist/entry-73.js +1 -1
- package/dist/entry-74.js +1 -1
- package/dist/entry-75.js +1 -1
- package/dist/entry-76.js +1 -1
- package/dist/entry-77.js +1 -1
- package/dist/entry-78.js +1 -1
- package/dist/entry-79.js +1 -1
- package/dist/entry-80.js +1 -0
- package/dist/pi-agent-ide.js +12 -12
- package/docs/configuration.md +32 -1
- package/docs/generated/tool-catalog/cmake.md +5 -5
- package/docs/generated/tool-catalog/csharp.md +5 -5
- package/docs/generated/tool-catalog/css.md +7 -7
- package/docs/generated/tool-catalog/dart.md +9 -0
- package/docs/generated/tool-catalog/dockerfile.md +5 -5
- package/docs/generated/tool-catalog/elixir.md +9 -0
- package/docs/generated/tool-catalog/html.md +7 -6
- package/docs/generated/tool-catalog/index.md +9 -0
- package/docs/generated/tool-catalog/javascript.md +8 -8
- package/docs/generated/tool-catalog/json.md +7 -7
- package/docs/generated/tool-catalog/julia.md +8 -0
- package/docs/generated/tool-catalog/kotlin.md +6 -5
- package/docs/generated/tool-catalog/markdown.md +6 -6
- package/docs/generated/tool-catalog/powershell.md +9 -0
- package/docs/generated/tool-catalog/python.md +6 -6
- package/docs/generated/tool-catalog/r.md +9 -0
- package/docs/generated/tool-catalog/scala.md +9 -0
- package/docs/generated/tool-catalog/svelte.md +9 -0
- package/docs/generated/tool-catalog/typescript.md +9 -8
- package/docs/generated/tool-catalog/vue.md +9 -0
- package/docs/generated/tool-catalog/yaml.md +6 -6
- package/docs/generated/tool-catalog/zig.md +9 -0
- package/node_modules/pi-agent-doctor/package.json +10 -3
- package/node_modules/pi-agent-doctor/runtime/entry-20.js +1 -0
- package/node_modules/pi-agent-doctor/src/catalog.ts +27 -1
- package/node_modules/pi-agent-doctor/src/evidence.ts +118 -0
- package/node_modules/pi-agent-doctor/src/executable.ts +63 -17
- package/node_modules/pi-agent-filesystem/package.json +7 -7
- package/node_modules/pi-agent-filesystem-image/package.json +4 -4
- package/node_modules/pi-agent-filesystem-pdf/package.json +4 -4
- package/node_modules/pi-agent-filesystem-text/package.json +4 -4
- package/node_modules/pi-agent-filesystem-text/runtime/entry-24.js +2 -0
- package/node_modules/pi-agent-ide-ast/package.json +11 -11
- package/node_modules/pi-agent-ide-ast/runtime/entry-25.js +0 -1
- package/node_modules/pi-agent-ide-ast/runtime/entry-26.js +2 -0
- package/node_modules/pi-agent-ide-ast/src/ast/manager.ts +3 -0
- package/node_modules/pi-agent-ide-ast/src/ast/outline.ts +3 -0
- package/node_modules/pi-agent-ide-changes/package.json +8 -8
- package/node_modules/pi-agent-ide-changes/runtime/entry-27.js +0 -1
- package/node_modules/pi-agent-ide-formatter/package.json +4 -4
- package/node_modules/pi-agent-ide-formatter/src/catalog.ts +131 -13
- package/node_modules/pi-agent-ide-formatter/src/registry.ts +20 -8
- package/node_modules/pi-agent-ide-languages/package.json +3 -3
- package/node_modules/pi-agent-ide-languages/src/languages.ts +15 -0
- package/node_modules/pi-agent-ide-lint/package.json +8 -8
- package/node_modules/pi-agent-ide-lint/src/catalog.ts +196 -39
- package/node_modules/pi-agent-ide-lint/src/command-linter.ts +23 -3
- package/node_modules/pi-agent-ide-lint/src/diagnostics.ts +73 -33
- package/node_modules/pi-agent-ide-lint/src/registry.ts +20 -8
- package/node_modules/pi-agent-ide-lsp/package.json +9 -9
- package/node_modules/pi-agent-ide-lsp/runtime/entry-32.js +2 -0
- package/node_modules/pi-agent-ide-lsp/src/catalog.ts +161 -7
- package/node_modules/pi-agent-ide-lsp/src/diagnostic-source.ts +3 -6
- package/node_modules/pi-agent-ide-lsp/src/doctor-plugin.ts +2 -4
- package/node_modules/pi-agent-ide-lsp/src/lsp/client.ts +154 -11
- package/node_modules/pi-agent-ide-lsp/src/lsp/file-watchers.ts +88 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/initialization-options.ts +14 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/manager.ts +8 -4
- package/node_modules/pi-agent-ide-lsp/src/lsp/registry.ts +69 -34
- package/node_modules/pi-agent-ide-lsp/src/lsp/transport-writer.ts +24 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/types.ts +5 -0
- package/node_modules/pi-agent-image/package.json +3 -3
- package/node_modules/pi-agent-invariant/package.json +2 -2
- package/node_modules/pi-agent-pdf/package.json +3 -3
- package/node_modules/pi-agent-read/package.json +11 -11
- package/node_modules/pi-agent-read/runtime/entry-39.js +0 -1
- package/node_modules/pi-agent-read/runtime/entry-40.js +2 -0
- package/node_modules/pi-agent-resource/package.json +2 -2
- package/node_modules/pi-agent-search/package.json +7 -7
- package/node_modules/pi-agent-search/runtime/entry-44.js +0 -1
- package/node_modules/pi-agent-search-text/package.json +9 -9
- package/node_modules/pi-agent-search-text/runtime/entry-46.js +1 -0
- package/node_modules/pi-agent-text/package.json +3 -3
- package/node_modules/pi-agent-text/runtime/entry-48.js +1 -0
- package/node_modules/pi-agent-text-anchor-constant/package.json +4 -4
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-49.js +2 -0
- package/node_modules/pi-agent-text-anchor-exact/package.json +5 -5
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-50.js +0 -1
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-51.js +2 -0
- package/node_modules/pi-agent-text-anchor-line-hash/package.json +7 -7
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-52.js +0 -1
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-53.js +2 -0
- package/node_modules/pi-agent-text-editor/package.json +22 -22
- package/node_modules/pi-agent-text-editor/runtime/entry-68.js +0 -1
- package/node_modules/pi-agent-text-editor-argument-order/package.json +3 -3
- package/node_modules/pi-agent-text-editor-overwrite/package.json +4 -4
- package/node_modules/pi-agent-text-editor-renderer/package.json +6 -6
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +5 -5
- package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-73.js +2 -0
- package/node_modules/pi-agent-tool-call-interception/package.json +3 -3
- package/node_modules/pi-agent-tool-ui/package.json +2 -2
- package/node_modules/pi-agent-tool-ui/runtime/entry-75.js +1 -0
- package/node_modules/pi-agent-web/package.json +7 -7
- package/node_modules/pi-agent-web-html/package.json +3 -3
- package/node_modules/pi-agent-web-image/package.json +4 -4
- package/node_modules/pi-agent-web-pdf/package.json +4 -4
- package/node_modules/pi-agent-web-text/package.json +4 -4
- package/node_modules/pi-agent-web-text/runtime/entry-80.js +2 -0
- package/package.json +35 -35
- package/src/api/tool-config/formatters.json +70 -12
- package/src/api/tool-config/linters.json +148 -66
- package/src/api/tool-config/lsp-servers.json +142 -7
- package/src/api/tool-config.ts +56 -24
- package/src/code-view/diagnostic-view.ts +14 -10
- package/src/doctor/config-writer.ts +14 -1
- package/src/doctor/discovery.ts +13 -68
- package/src/doctor/run.ts +33 -1
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +7 -7
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/runtime/entry-24.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-21.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +7 -7
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-80.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-76.js +2 -0
- package/src/extensions/pi-agent-read/package.json +11 -11
- package/src/extensions/pi-agent-read/runtime/entry-39.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-40.js +2 -0
- package/src/extensions/pi-agent-search/package.json +7 -7
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +9 -9
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-46.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-47.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-44.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-45.js +2 -0
- package/src/extensions/pi-agent-text-editor/package.json +22 -22
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +4 -4
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-49.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +5 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-50.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-51.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +7 -7
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-52.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-53.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/package.json +3 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/package.json +4 -4
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +6 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +5 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-73.js +2 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-68.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-69.js +2 -0
- package/src/plugins/pi-agent-ide-ast/package.json +11 -11
- package/src/plugins/pi-agent-ide-ast/runtime/entry-25.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-26.js +2 -0
- package/src/plugins/pi-agent-ide-ast/src/ast/manager.ts +3 -0
- package/src/plugins/pi-agent-ide-ast/src/ast/outline.ts +3 -0
- package/src/plugins/pi-agent-ide-changes/package.json +8 -8
- package/src/plugins/pi-agent-ide-changes/runtime/entry-27.js +0 -1
- package/src/plugins/pi-agent-ide-diagnostics/src/extension.ts +8 -0
- package/src/plugins/pi-agent-ide-formatter/package.json +4 -4
- package/src/plugins/pi-agent-ide-formatter/src/catalog.ts +131 -13
- package/src/plugins/pi-agent-ide-formatter/src/registry.ts +20 -8
- package/src/plugins/pi-agent-ide-languages/package.json +3 -3
- package/src/plugins/pi-agent-ide-languages/src/languages.ts +15 -0
- package/src/plugins/pi-agent-ide-lint/package.json +8 -8
- package/src/plugins/pi-agent-ide-lint/src/catalog.ts +196 -39
- package/src/plugins/pi-agent-ide-lint/src/command-linter.ts +23 -3
- package/src/plugins/pi-agent-ide-lint/src/diagnostics.ts +73 -33
- package/src/plugins/pi-agent-ide-lint/src/registry.ts +20 -8
- package/src/plugins/pi-agent-ide-lsp/package.json +9 -9
- package/src/plugins/pi-agent-ide-lsp/runtime/entry-32.js +2 -0
- package/src/plugins/pi-agent-ide-lsp/src/catalog.ts +161 -7
- package/src/plugins/pi-agent-ide-lsp/src/diagnostic-source.ts +3 -6
- package/src/plugins/pi-agent-ide-lsp/src/doctor-plugin.ts +2 -4
- package/src/plugins/pi-agent-ide-lsp/src/lsp/client.ts +154 -11
- package/src/plugins/pi-agent-ide-lsp/src/lsp/file-watchers.ts +88 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/initialization-options.ts +14 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/manager.ts +8 -4
- package/src/plugins/pi-agent-ide-lsp/src/lsp/registry.ts +69 -34
- package/src/plugins/pi-agent-ide-lsp/src/lsp/transport-writer.ts +24 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/types.ts +5 -0
- package/src/toolchain/types.ts +2 -0
- package/dist/chunk-476MR2QB.js +0 -1
- package/dist/chunk-4KQOODGE.js +0 -13
- package/dist/chunk-7NDBZ4WX.js +0 -1
- package/dist/chunk-AP7Z3VWC.js +0 -1
- package/dist/chunk-TNWYEXFG.js +0 -1
- package/dist/chunk-U4D6FT66.js +0 -1
- package/dist/chunk-VWVLBOMU.js +0 -8
- package/node_modules/pi-agent-filesystem/runtime/entry-20.js +0 -2
- package/node_modules/pi-agent-ide-ast/runtime/entry-24.js +0 -1
- package/node_modules/pi-agent-ide-changes/runtime/entry-26.js +0 -1
- package/node_modules/pi-agent-image/runtime/entry-32.js +0 -1
- package/node_modules/pi-agent-resource/runtime/entry-40.js +0 -1
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-48.js +0 -2
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-49.js +0 -1
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-51.js +0 -1
- package/node_modules/pi-agent-text-editor/runtime/entry-53.js +0 -1
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-73.js +0 -1
- package/node_modules/pi-agent-web/runtime/entry-75.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-21.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-20.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-76.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-75.js +0 -2
- package/src/extensions/pi-agent-read/runtime/entry-35.js +0 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-45.js +0 -2
- package/src/extensions/pi-agent-search/runtime/entry-41.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-48.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-49.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-51.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/runtime/entry-69.js +0 -2
- package/src/extensions/pi-agent-text-editor/runtime/entry-53.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-24.js +0 -1
- package/src/plugins/pi-agent-ide-changes/runtime/entry-26.js +0 -1
- /package/node_modules/{pi-agent-filesystem-image → pi-agent-filesystem}/runtime/entry-21.js +0 -0
- /package/node_modules/{pi-agent-filesystem-pdf → pi-agent-filesystem-image}/runtime/entry-22.js +0 -0
- /package/node_modules/{pi-agent-filesystem-text → pi-agent-filesystem-pdf}/runtime/entry-23.js +0 -0
- /package/node_modules/{pi-agent-ide-formatter → pi-agent-ide-changes}/runtime/entry-28.js +0 -0
- /package/node_modules/{pi-agent-ide-languages → pi-agent-ide-formatter}/runtime/entry-29.js +0 -0
- /package/node_modules/{pi-agent-ide-lint → pi-agent-ide-languages}/runtime/entry-30.js +0 -0
- /package/node_modules/{pi-agent-ide-lsp → pi-agent-ide-lint}/runtime/entry-31.js +0 -0
- /package/node_modules/{pi-agent-invariant → pi-agent-image}/runtime/entry-33.js +0 -0
- /package/node_modules/{pi-agent-pdf → pi-agent-invariant}/runtime/entry-34.js +0 -0
- /package/node_modules/{pi-agent-read → pi-agent-pdf}/runtime/entry-35.js +0 -0
- /package/node_modules/{pi-agent-search → pi-agent-resource}/runtime/entry-41.js +0 -0
- /package/node_modules/{pi-agent-search-text → pi-agent-search}/runtime/entry-45.js +0 -0
- /package/node_modules/{pi-agent-text → pi-agent-search-text}/runtime/entry-47.js +0 -0
- /package/node_modules/{pi-agent-text-editor-argument-order → pi-agent-text-editor}/runtime/entry-69.js +0 -0
- /package/node_modules/{pi-agent-text-editor-overwrite → pi-agent-text-editor-argument-order}/runtime/entry-70.js +0 -0
- /package/node_modules/{pi-agent-text-editor-renderer → pi-agent-text-editor-overwrite}/runtime/entry-71.js +0 -0
- /package/node_modules/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor-renderer}/runtime/entry-72.js +0 -0
- /package/node_modules/{pi-agent-tool-ui → pi-agent-tool-call-interception}/runtime/entry-74.js +0 -0
- /package/node_modules/{pi-agent-web-html → pi-agent-web}/runtime/entry-76.js +0 -0
- /package/node_modules/{pi-agent-web-image → pi-agent-web-html}/runtime/entry-77.js +0 -0
- /package/node_modules/{pi-agent-web-pdf → pi-agent-web-image}/runtime/entry-78.js +0 -0
- /package/node_modules/{pi-agent-web-text → pi-agent-web-pdf}/runtime/entry-79.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-pdf → pi-agent-filesystem-image}/runtime/entry-22.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-text → pi-agent-filesystem-pdf}/runtime/entry-23.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-image → pi-agent-web-html}/runtime/entry-77.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-pdf → pi-agent-web-image}/runtime/entry-78.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-text → pi-agent-web-pdf}/runtime/entry-79.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-overwrite → pi-agent-text-editor-argument-order}/runtime/entry-70.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-renderer → pi-agent-text-editor-overwrite}/runtime/entry-71.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor-renderer}/runtime/entry-72.js +0 -0
- /package/src/plugins/{pi-agent-ide-formatter → pi-agent-ide-changes}/runtime/entry-28.js +0 -0
- /package/src/plugins/{pi-agent-ide-languages → pi-agent-ide-formatter}/runtime/entry-29.js +0 -0
- /package/src/plugins/{pi-agent-ide-lint → pi-agent-ide-languages}/runtime/entry-30.js +0 -0
- /package/src/plugins/{pi-agent-ide-lsp → pi-agent-ide-lint}/runtime/entry-31.js +0 -0
package/dist/pi-agent-ide.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{a as tt}from"./chunk-QW5O42QJ.js";import{a as Ve}from"./chunk-KP37XTDI.js";import{a as Ue}from"./chunk-IMVCVPMP.js";import{a as Be}from"./chunk-LFV6G5Z3.js";import{a as Je}from"./chunk-IOCABSRL.js";import{a as qe}from"./chunk-6DN7NO7L.js";import{a as He}from"./chunk-YQTLJ5ZV.js";import"./chunk-YPHXLAQF.js";import"./chunk-VCCMVQXU.js";import{a as Qe}from"./chunk-F6SESI3P.js";import{a as Ze}from"./chunk-KYVOMBO5.js";import"./chunk-XNXQYPVT.js";import{a as et}from"./chunk-OIL6BB2S.js";import"./chunk-STUZZM5B.js";import"./chunk-MBUXFKIW.js";import{e as _e}from"./chunk-TG6H6EOI.js";import"./chunk-KNMWCDDK.js";import"./chunk-OVUYPHDE.js";import{a as Ye}from"./chunk-5BWUVAR4.js";import{a as Ke}from"./chunk-HOBTFFQR.js";import"./chunk-SJYDLHEF.js";import{a as Xe}from"./chunk-6SMFVLTY.js";import"./chunk-PETQCA7G.js";import{a as We}from"./chunk-BYWAG6X3.js";import{a as ze}from"./chunk-VUNCBASK.js";import"./chunk-34ZQTTU2.js";import"./chunk-MTTKFJV6.js";import{a as Ge}from"./chunk-4SQQKEVD.js";import"./chunk-VSP2QQPQ.js";import{a as nt}from"./chunk-52BM6J6I.js";import"./chunk-QNZVPFSP.js";import{a as it}from"./chunk-E4SECPF4.js";import"./chunk-DEP55R35.js";import{a as ot}from"./chunk-TNWYEXFG.js";import{a as rt}from"./chunk-AP7Z3VWC.js";import{a as st}from"./chunk-476MR2QB.js";import{a as at}from"./chunk-VWVLBOMU.js";import"./chunk-U4D6FT66.js";import{a as Ne}from"./chunk-MB6VVVAF.js";import{a as Le}from"./chunk-NI2NK4JU.js";import"./chunk-GTK5AREE.js";import{a as Fe}from"./chunk-W3XYKJ5H.js";import"./chunk-PODWLGNO.js";import{a as Me}from"./chunk-XGUAL3CA.js";import"./chunk-3YK4XMWB.js";import"./chunk-ERVMDQGX.js";import{a as Te,b as De,c as Ee,d as Se,f as xe}from"./chunk-VFBLX4TG.js";import"./chunk-2ZMYT6ZC.js";import"./chunk-NNCZYO4Q.js";import{c as Ae}from"./chunk-SSZB66C3.js";import"./chunk-YHUTTZC6.js";import{a as ke}from"./chunk-ORAPGW7W.js";import{a as Re,b as Ce}from"./chunk-JASLOB2X.js";import"./chunk-E2RESHYR.js";import"./chunk-T2RPMEM2.js";import{a as Oe}from"./chunk-EEH4WYI7.js";import{a as je,b as $e}from"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import{e as ae,f as ce,g as de,h as le,i as ue,l as ge}from"./chunk-5A25RATC.js";import"./chunk-2SKAED2I.js";import{a as ye}from"./chunk-OBWZ5RYN.js";import{a as D,b as E,c as fe,d as me,g as he}from"./chunk-KZBAJFCV.js";import"./chunk-KINKBPPX.js";import{b as we,c as P}from"./chunk-7NDBZ4WX.js";import{a as pe}from"./chunk-ZC65Z3CK.js";import{a as Pe,b as S,c as x,d as be,e as ve,g as Ie}from"./chunk-JMVDFOTQ.js";import{a}from"./chunk-EI7MMDWY.js";var R=[],C=[],J=[];function B(n,e,t){if(e.some(i=>i.name===t))throw new Error(`[pi-agent-ide] ${n} "${t}" is already registered. Use a unique name.`)}a(B,"assertUniqueName");function dt(n){let e=new Set;for(let t of n){let i=`${t.kind}:${t.name}`;if(e.has(i))throw new Error(`[pi-agent-ide] ${t.kind} "${t.name}" is registered twice by one plugin.`);switch(e.add(i),t.kind){case"compiler":{B(t.kind,C,t.name);break}case"formatter":{B(t.kind,R,t.name);break}case"linter":{B(t.kind,J,t.name);break}}}for(let t of n)switch(t.kind){case"compiler":{C.push(t);break}case"formatter":{R.push(t);break}case"linter":{J.push(t);break}}}a(dt,"registerTools");async function ct(n,e){let t=[];for(let i of n)try{await i.detect(e)&&t.push(i)}catch(o){console.error(`[pi-agent-ide] detect failed for "${i.name}":`,o)}return t.sort((i,o)=>o.priority-i.priority),Vt(t),t}a(ct,"filterActive");function Vt(n){let e=new Map;for(let t of n)for(let i of t.extensions){let o=`${i}@${t.priority}`,r=e.get(o);if(r!==void 0)throw new Error(`[pi-agent-ide] priority conflict: tools "${r}" and "${t.name}" both claim "${i}" at priority ${t.priority}.`);e.set(o,t.name)}}a(Vt,"assertNoPriorityConflicts");async function lt(n){let[e,t]=await Promise.all([ct(R,n),ct(C.filter(i=>i.syntaxOnly===!0),n)]);return{ctx:n,formatters:e,compilers:t,linters:[]}}a(lt,"warmupFormatting");function q(){R.length=0,C.length=0,J.length=0}a(q,"resetRegistry");import{readFile as G}from"node:fs/promises";import y from"node:path";var k=class{constructor(e,t={}){this.sources=e;this.options=t}static{a(this,"DiagnosticStore")}files=new Map;dirty=new Set;sent=new Map;queue=[];running=0;disposed=!1;schedule(e,t,{cwd:i}){this.disposed||this.ensure(e,t,i)}async read(e,{cwd:t}){this.assertActive();let i=y.resolve(t,e),o=await G(i,"utf8");this.assertActive();let r=this.ensure(i,o,t);await Ut(Promise.all(r.jobs),this.options.readWaitMs??5e3),this.assertActive();let s=await G(i,"utf8");this.assertActive();let c=this.ensure(i,s,t);return{filePath:i,content:c.content,results:[...c.results.values()]}}async takeNotifications(e){let t=[];for(let i of[...this.dirty]){if(i.cwd!==y.resolve(e)||(this.dirty.delete(i),!await this.isCurrent(i)))continue;let o=[...i.results.values()],r=o.map(d=>{if(d.status==="pending"||d.status==="unavailable")return`${d.source} ${d.status}`;let l=["error","warning","info","hint"].map(u=>`${d.diagnostics.filter(g=>g.severity===u).length} ${u}`);return`${d.source} ${l.join(", ")}${d.status==="snapshot"?" (snapshot; completion unknown)":d.status==="unversioned"?" (unversioned)":""}`}).join("; "),s=this.key(i.filePath,i.cwd),c=JSON.stringify(o);this.sent.get(s)!==c&&(this.sent.set(s,c),t.push(`${JSON.stringify(y.relative(e,i.filePath))}: ${r||"no diagnostic sources"}.`))}return t}dispose(){this.disposed=!0;for(let e of this.files.values())e.controller.abort();this.files.clear(),this.dirty.clear(),this.sent.clear(),this.pump()}key(e,t){return JSON.stringify([y.resolve(t),y.resolve(t,e)])}ensure(e,t,i){let o=this.key(e,i),r=this.files.get(o);if(r?.content===t)return r;r?.controller.abort(),r&&this.dirty.delete(r);let s={cwd:y.resolve(i),filePath:y.resolve(i,e),content:t,controller:new AbortController,results:new Map,jobs:[],publications:new Map};this.files.set(o,s),this.sources.length===0&&s.results.set("diagnostics",{source:"diagnostics",status:"unavailable",diagnostics:[],reason:"No diagnostic sources registered"}),this.dirty.add(s);for(let c of this.sources){s.results.set(c.id,{source:c.id,status:"pending",diagnostics:[]});let d=new Promise(l=>{this.queue.push(async()=>{try{await this.check(s,c)}finally{l()}})});s.jobs.push(d)}return queueMicrotask(()=>this.pump()),s}pump(){for(;this.running<(this.options.concurrency??4)&&this.queue.length>0;){let e=this.queue.shift();if(!e)break;this.running++,e().finally(()=>{this.running--,this.pump()})}}active(e){return!this.disposed&&!e.controller.signal.aborted}assertActive(){if(this.disposed)throw new Error("Diagnostics session has ended")}async isCurrent(e){if(!this.active(e))return!1;let t=await G(e.filePath,"utf8").catch(()=>{});return this.active(e)&&t===e.content}async publish(e,t,i){let o=(e.publications.get(t)??0)+1;if(e.publications.set(t,o),!await this.isCurrent(e)||e.publications.get(t)!==o)return;let r={source:t,...i};JSON.stringify(e.results.get(t))!==JSON.stringify(r)&&(e.results.set(t,r),this.dirty.add(e))}async check(e,t){if(!await this.isCurrent(e))return;let i=new AbortController,o=AbortSignal.any([i.signal,e.controller.signal]);if(o.aborted)return;let r,s;try{let c=new Promise((l,u)=>{s=a(()=>u(o.reason),"onAbort"),o.addEventListener("abort",s,{once:!0}),r=setTimeout(()=>i.abort(new Error("Diagnostic check timed out")),this.options.checkTimeoutMs??3e4)}),d=await Promise.race([t.diagnose(e.filePath,{cwd:e.cwd,content:e.content,signal:o,publish:a(l=>{o.aborted||this.publish(e,t.id,l)},"publish")}),c]);await this.publish(e,t.id,d)}catch(c){await this.publish(e,t.id,{status:"unavailable",diagnostics:[],reason:c instanceof Error?c.message:String(c)})}finally{clearTimeout(r),s&&o.removeEventListener("abort",s)}}};async function Ut(n,e){let t;try{await Promise.race([n,new Promise(i=>{t=setTimeout(i,e)})])}finally{clearTimeout(t)}}a(Ut,"waitAtMost");function ut(){let n=new Map,e=[],t=new k(e),i=Promise.resolve();return{diagnostics:t,registerPlugin(o){if(o.id.trim().length===0)return Promise.reject(new Error("Plugin ID must not be empty"));let r=n.get(o.id);if(r!==void 0)return r;let s=i.then(async()=>{let c=[],d=[],l=!0,u={addTool(g){if(!l)throw new Error(`Plugin ${o.id} setup is already complete`);Jt(g),c.push(g)},addDiagnosticSource(g){if(!l)throw new Error(`Plugin ${o.id} setup is already complete`);qt(g),d.push(g)},readDiagnostics(g,f){return t.read(g,f)}};try{await o.setup(u)}catch(g){throw l=!1,g}l=!1,Bt(e,d),dt(c),e.push(...d)});return n.set(o.id,s),i=s.catch(()=>{}),s.catch(()=>{n.delete(o.id)}),s},async waitForPendingPlugins(){await Promise.all(n.values())}}}a(ut,"createIdeCore");function Bt(n,e){let t=new Set(n.map(i=>i.id));for(let i of e){if(t.has(i.id))throw new Error(`Diagnostic source ${i.id} is already registered`);t.add(i.id)}}a(Bt,"assertUniqueDiagnosticSources");function Jt(n){if(!pt(n))throw new TypeError("IDE tool must be an object");let e=n.kind,t=e==="compiler"?n.compile:e==="formatter"?n.format:e==="linter"?n.lint:void 0;if(t===void 0||typeof t!="function"||typeof n.detect!="function"||typeof n.name!="string"||n.name.trim().length===0||typeof n.priority!="number"||!Number.isFinite(n.priority)||!Array.isArray(n.extensions)||n.extensions.length===0||n.extensions.some(i=>typeof i!="string"||i.length===0))throw new TypeError("Invalid pi-agent-ide tool contribution")}a(Jt,"assertIdeTool");function qt(n){if(!pt(n)||typeof n.id!="string"||n.id.trim().length===0||typeof n.diagnose!="function")throw new TypeError("Invalid pi-agent-ide diagnostic source contribution")}a(qt,"assertDiagnosticSource");function pt(n){return typeof n=="object"&&n!==null}a(pt,"isRecord");import gt from"node:path";async function ft(n){if(!gt.isAbsolute(n.resourceSource))return;let e=await lt({cwd:n.cwd}),t=gt.extname(n.resourceSource).toLowerCase(),i=a(s=>s.extensions.includes(t)||s.extensions.includes("*"),"matches"),o=e.compilers.find(i);if(o&&(await o.compile({filePath:n.resourceSource},e.ctx)).syntaxErrors.length>0)return;await e.formatters.find(i)?.format({filePath:n.resourceSource},e.ctx)}a(ft,"runIdePostEditGate");import Gt from"node:path";async function W(n){n.registerFlag("old-tools",{description:"Use the old IDE and text editor tools",type:"boolean",default:!1}),q();let e=ut(),t=n.events.on(me,i=>{if(!he(i))throw new Error("Invalid pi-agent-ide plugin registration request");i.accept(e.registerPlugin(i.plugin))});n.on("session_shutdown",()=>{t(),e.diagnostics.dispose(),q()}),_e(n,{id:"pi-agent-ide",handler:ft}),n.events.emit(fe,{protocol:D,apiVersion:3}),await Oe(n,{protocol:je,apiVersion:$e,id:"ide-diagnostics",setup(i){i.onDidEdit(o=>{Gt.isAbsolute(o.resourceSource)&&e.diagnostics.schedule(o.resourceSource,o.after.content,{cwd:o.cwd})})}}),n.on("context",async(i,o)=>{let r=await e.diagnostics.takeNotifications(o.cwd);if(r.length!==0)return{messages:[...i.messages,{role:"custom",customType:"ide-diagnostics",display:!1,content:`File diagnostics:
|
|
2
|
-
${
|
|
3
|
-
`)}`,timestamp:Date.now()}]}}),await e.waitForPendingPlugins()}a(W,"registerPiAgentIde");import{truncateToWidth as
|
|
4
|
-
`).map(l=>l.length===0?"":
|
|
5
|
-
`,"utf8"),await
|
|
6
|
-
`;return await
|
|
7
|
-
`).trimEnd()}a(
|
|
8
|
-
`)}a(
|
|
9
|
-
`)}}}}a(
|
|
1
|
+
import{a as We}from"./chunk-6DN7NO7L.js";import{a as it}from"./chunk-OIL6BB2S.js";import{a as ot}from"./chunk-OFHVDY4Q.js";import{a as qe}from"./chunk-UTTW55S2.js";import{a as Je}from"./chunk-IMVCVPMP.js";import{a as Ge}from"./chunk-LFV6G5Z3.js";import{a as ze}from"./chunk-IOCABSRL.js";import{a as Ke}from"./chunk-6XQQBKPE.js";import"./chunk-OVUYPHDE.js";import"./chunk-YPHXLAQF.js";import"./chunk-VCCMVQXU.js";import{a as tt}from"./chunk-F6SESI3P.js";import{a as nt}from"./chunk-KYVOMBO5.js";import"./chunk-XNXQYPVT.js";import"./chunk-STUZZM5B.js";import"./chunk-MBUXFKIW.js";import{e as Le}from"./chunk-TG6H6EOI.js";import"./chunk-KNMWCDDK.js";import{a as Qe}from"./chunk-5BWUVAR4.js";import{a as et}from"./chunk-HOBTFFQR.js";import"./chunk-SJYDLHEF.js";import{a as Ze}from"./chunk-6SMFVLTY.js";import"./chunk-PETQCA7G.js";import{a as He}from"./chunk-4SQQKEVD.js";import{a as Xe}from"./chunk-BYWAG6X3.js";import"./chunk-VSP2QQPQ.js";import{a as Ye}from"./chunk-KH5KPBCR.js";import"./chunk-34ZQTTU2.js";import"./chunk-MTTKFJV6.js";import{a as lt}from"./chunk-VEJGSURY.js";import{a as Be}from"./chunk-XGUAL3CA.js";import{a as rt}from"./chunk-NXHPO7ER.js";import"./chunk-SMSIT3CE.js";import{a as st}from"./chunk-ONWUJXUR.js";import"./chunk-DEP55R35.js";import{a as at}from"./chunk-MTQSGWZJ.js";import{a as ct}from"./chunk-QZANC2IG.js";import{a as dt}from"./chunk-2XYXV5HS.js";import{a as Fe}from"./chunk-WZI4YC2O.js";import{a as Me}from"./chunk-MB6VVVAF.js";import{a as Ve}from"./chunk-NI2NK4JU.js";import"./chunk-GTK5AREE.js";import{a as Ue}from"./chunk-W3XYKJ5H.js";import"./chunk-PODWLGNO.js";import"./chunk-3YK4XMWB.js";import"./chunk-ERVMDQGX.js";import{a as xe,b as De,c as Se,d as Re,f as Ce}from"./chunk-VFBLX4TG.js";import"./chunk-2ZMYT6ZC.js";import"./chunk-NNCZYO4Q.js";import{c as je}from"./chunk-SSZB66C3.js";import"./chunk-YHUTTZC6.js";import{a as $e}from"./chunk-ORAPGW7W.js";import{a as ke,b as Ae}from"./chunk-JASLOB2X.js";import"./chunk-E2RESHYR.js";import"./chunk-T2RPMEM2.js";import{a as Ne}from"./chunk-EEH4WYI7.js";import{a as Oe,b as _e}from"./chunk-266RH77Z.js";import"./chunk-EW2KVKCN.js";import{e as ce,f as de,g as le,h as ue,i as pe,l as fe}from"./chunk-ZIHEF6K3.js";import"./chunk-2SKAED2I.js";import{a as we}from"./chunk-OBWZ5RYN.js";import{a as D,b as S,c as me,d as he,g as ye}from"./chunk-KZBAJFCV.js";import"./chunk-KINKBPPX.js";import{b as Pe,c as P}from"./chunk-L4FA6OD4.js";import{d as be}from"./chunk-N34ATN52.js";import{a as ge}from"./chunk-ZC65Z3CK.js";import{a as ve,b as R,c as C,d as Ie,e as Te,g as Ee}from"./chunk-JMVDFOTQ.js";import{a}from"./chunk-EI7MMDWY.js";var k=[],A=[],J=[];function q(n,e,t){if(e.some(i=>i.name===t))throw new Error(`[pi-agent-ide] ${n} "${t}" is already registered. Use a unique name.`)}a(q,"assertUniqueName");function pt(n){let e=new Set;for(let t of n){let i=`${t.kind}:${t.name}`;if(e.has(i))throw new Error(`[pi-agent-ide] ${t.kind} "${t.name}" is registered twice by one plugin.`);switch(e.add(i),t.kind){case"compiler":{q(t.kind,A,t.name);break}case"formatter":{q(t.kind,k,t.name);break}case"linter":{q(t.kind,J,t.name);break}}}for(let t of n)switch(t.kind){case"compiler":{A.push(t);break}case"formatter":{k.push(t);break}case"linter":{J.push(t);break}}}a(pt,"registerTools");async function ut(n,e){let t=[];for(let i of n)try{await i.detect(e)&&t.push(i)}catch(o){console.error(`[pi-agent-ide] detect failed for "${i.name}":`,o)}return t.sort((i,o)=>o.priority-i.priority),Bt(t),t}a(ut,"filterActive");function Bt(n){let e=new Map;for(let t of n)for(let i of t.extensions){let o=`${i}@${t.priority}`,s=e.get(o);if(s!==void 0)throw new Error(`[pi-agent-ide] priority conflict: tools "${s}" and "${t.name}" both claim "${i}" at priority ${t.priority}.`);e.set(o,t.name)}}a(Bt,"assertNoPriorityConflicts");async function gt(n){let[e,t]=await Promise.all([ut(k,n),ut(A.filter(i=>i.syntaxOnly===!0),n)]);return{ctx:n,formatters:e,compilers:t,linters:[]}}a(gt,"warmupFormatting");function G(){k.length=0,A.length=0,J.length=0}a(G,"resetRegistry");import{readFile as z}from"node:fs/promises";import b from"node:path";var $=class{constructor(e,t={}){this.sources=e;this.options=t}static{a(this,"DiagnosticStore")}files=new Map;dirty=new Set;sent=new Map;queue=[];running=0;disposed=!1;schedule(e,t,{cwd:i}){this.disposed||this.ensure(e,t,i)}async read(e,{cwd:t}){this.assertActive();let i=b.resolve(t,e),o=await z(i,"utf8");this.assertActive();let s=this.ensure(i,o,t);await qt(Promise.all(s.jobs),this.options.readWaitMs??5e3),this.assertActive();let r=await z(i,"utf8");this.assertActive();let c=this.ensure(i,r,t);return{filePath:i,content:c.content,results:[...c.results.values()]}}async takeNotifications(e){let t=[];for(let i of[...this.dirty]){if(i.cwd!==b.resolve(e)||(this.dirty.delete(i),!await this.isCurrent(i)))continue;let o=[...i.results.values()],s=o.map(d=>{if(d.status==="pending"||d.status==="unavailable")return`${d.source} ${d.status}`;let l=["error","warning","info","hint"].map(u=>`${d.diagnostics.filter(p=>p.severity===u).length} ${u}`);return`${d.source} ${l.join(", ")}${d.status==="snapshot"?" (snapshot; completion unknown)":d.status==="unversioned"?" (unversioned)":""}`}).join("; "),r=this.key(i.filePath,i.cwd),c=JSON.stringify(o);this.sent.get(r)!==c&&(this.sent.set(r,c),t.push(`${JSON.stringify(b.relative(e,i.filePath))}: ${s||"no diagnostic sources"}.`))}return t}dispose(){this.disposed=!0;for(let e of this.files.values())e.controller.abort();this.files.clear(),this.dirty.clear(),this.sent.clear(),this.pump()}key(e,t){return JSON.stringify([b.resolve(t),b.resolve(t,e)])}ensure(e,t,i){let o=this.key(e,i),s=this.files.get(o);if(s?.content===t)return s;s?.controller.abort(),s&&this.dirty.delete(s);let r={cwd:b.resolve(i),filePath:b.resolve(i,e),content:t,controller:new AbortController,results:new Map,jobs:[],publications:new Map};this.files.set(o,r),this.sources.length===0&&r.results.set("diagnostics",{source:"diagnostics",status:"unavailable",diagnostics:[],reason:"No diagnostic sources registered"}),this.dirty.add(r);for(let c of this.sources){r.results.set(c.id,{source:c.id,status:"pending",diagnostics:[]});let d=new Promise(l=>{this.queue.push(async()=>{try{await this.check(r,c)}finally{l()}})});r.jobs.push(d)}return queueMicrotask(()=>this.pump()),r}pump(){for(;this.running<(this.options.concurrency??4)&&this.queue.length>0;){let e=this.queue.shift();if(!e)break;this.running++,e().finally(()=>{this.running--,this.pump()})}}active(e){return!this.disposed&&!e.controller.signal.aborted}assertActive(){if(this.disposed)throw new Error("Diagnostics session has ended")}async isCurrent(e){if(!this.active(e))return!1;let t=await z(e.filePath,"utf8").catch(()=>{});return this.active(e)&&t===e.content}async publish(e,t,i){let o=(e.publications.get(t)??0)+1;if(e.publications.set(t,o),!await this.isCurrent(e)||e.publications.get(t)!==o)return;let s={source:t,...i};JSON.stringify(e.results.get(t))!==JSON.stringify(s)&&(e.results.set(t,s),this.dirty.add(e))}async check(e,t){if(!await this.isCurrent(e))return;let i=new AbortController,o=AbortSignal.any([i.signal,e.controller.signal]);if(o.aborted)return;let s,r;try{let c=new Promise((l,u)=>{r=a(()=>u(o.reason),"onAbort"),o.addEventListener("abort",r,{once:!0}),s=setTimeout(()=>i.abort(new Error("Diagnostic check timed out")),this.options.checkTimeoutMs??3e4)}),d=await Promise.race([t.diagnose(e.filePath,{cwd:e.cwd,content:e.content,signal:o,publish:a(l=>{o.aborted||this.publish(e,t.id,l)},"publish")}),c]);await this.publish(e,t.id,d)}catch(c){await this.publish(e,t.id,{status:"unavailable",diagnostics:[],reason:c instanceof Error?c.message:String(c)})}finally{clearTimeout(s),r&&o.removeEventListener("abort",r)}}};async function qt(n,e){let t;try{await Promise.race([n,new Promise(i=>{t=setTimeout(i,e)})])}finally{clearTimeout(t)}}a(qt,"waitAtMost");function ft(){let n=new Map,e=[],t=new $(e),i=Promise.resolve();return{diagnostics:t,registerPlugin(o){if(o.id.trim().length===0)return Promise.reject(new Error("Plugin ID must not be empty"));let s=n.get(o.id);if(s!==void 0)return s;let r=i.then(async()=>{let c=[],d=[],l=!0,u={addTool(p){if(!l)throw new Error(`Plugin ${o.id} setup is already complete`);Gt(p),c.push(p)},addDiagnosticSource(p){if(!l)throw new Error(`Plugin ${o.id} setup is already complete`);zt(p),d.push(p)},readDiagnostics(p,f){return t.read(p,f)}};try{await o.setup(u)}catch(p){throw l=!1,p}l=!1,Jt(e,d),pt(c),e.push(...d)});return n.set(o.id,r),i=r.catch(()=>{}),r.catch(()=>{n.delete(o.id)}),r},async waitForPendingPlugins(){await Promise.all(n.values())}}}a(ft,"createIdeCore");function Jt(n,e){let t=new Set(n.map(i=>i.id));for(let i of e){if(t.has(i.id))throw new Error(`Diagnostic source ${i.id} is already registered`);t.add(i.id)}}a(Jt,"assertUniqueDiagnosticSources");function Gt(n){if(!mt(n))throw new TypeError("IDE tool must be an object");let e=n.kind,t=e==="compiler"?n.compile:e==="formatter"?n.format:e==="linter"?n.lint:void 0;if(t===void 0||typeof t!="function"||typeof n.detect!="function"||typeof n.name!="string"||n.name.trim().length===0||typeof n.priority!="number"||!Number.isFinite(n.priority)||!Array.isArray(n.extensions)||n.extensions.length===0||n.extensions.some(i=>typeof i!="string"||i.length===0))throw new TypeError("Invalid pi-agent-ide tool contribution")}a(Gt,"assertIdeTool");function zt(n){if(!mt(n)||typeof n.id!="string"||n.id.trim().length===0||typeof n.diagnose!="function")throw new TypeError("Invalid pi-agent-ide diagnostic source contribution")}a(zt,"assertDiagnosticSource");function mt(n){return typeof n=="object"&&n!==null}a(mt,"isRecord");import ht from"node:path";async function yt(n){if(!ht.isAbsolute(n.resourceSource))return;let e=await gt({cwd:n.cwd}),t=ht.extname(n.resourceSource).toLowerCase(),i=a(r=>r.extensions.includes(t)||r.extensions.includes("*"),"matches"),o=e.compilers.find(i);if(o&&(await o.compile({filePath:n.resourceSource},e.ctx)).syntaxErrors.length>0)return;await e.formatters.find(i)?.format({filePath:n.resourceSource},e.ctx)}a(yt,"runIdePostEditGate");import Wt from"node:path";async function W(n){n.registerFlag("old-tools",{description:"Use the old IDE and text editor tools",type:"boolean",default:!1}),G();let e=ft(),t=n.events.on(he,i=>{if(!ye(i))throw new Error("Invalid pi-agent-ide plugin registration request");i.accept(e.registerPlugin(i.plugin))});n.on("session_shutdown",()=>{t(),e.diagnostics.dispose(),G()}),Le(n,{id:"pi-agent-ide",handler:yt}),n.events.emit(me,{protocol:D,apiVersion:3}),await Ne(n,{protocol:Oe,apiVersion:_e,id:"ide-diagnostics",setup(i){i.onDidEdit(o=>{Wt.isAbsolute(o.resourceSource)&&e.diagnostics.schedule(o.resourceSource,o.after.content,{cwd:o.cwd})})}}),n.on("context",async(i,o)=>{let s=await e.diagnostics.takeNotifications(o.cwd);if(s.length!==0)return{messages:[...i.messages,{role:"custom",customType:"ide-diagnostics",display:!1,content:`File diagnostics:
|
|
2
|
+
${s.join(`
|
|
3
|
+
`)}`,timestamp:Date.now()}]}}),await e.waitForPendingPlugins()}a(W,"registerPiAgentIde");import{truncateToWidth as Ht,wrapTextWithAnsi as Xt}from"@earendil-works/pi-tui";var Yt="PI AGENT IDE",Kt=/\/[a-z][\w-]*/giu,j=class{constructor(e,t){this.tip=e;this.theme=t}static{a(this,"TipCallout")}cached;render(e){if(this.cached?.width===e)return this.cached.lines;let t=Qt(this.tip,this.theme,e);return this.cached={width:e,lines:t},t}invalidate(){this.cached=void 0}};function Qt(n,e,t){if(t<=0)return[];if(t<=2)return[e.fg("accent",t===1?"\u2502":"\u2502 ")];let i=t-2,o=e.fg("accent",e.bold(Yt))+e.fg("dim"," \xB7 ")+e.bold(n.title),s=n.body.split(`
|
|
4
|
+
`).map(l=>l.length===0?"":en(l,e)),r=[o,...s].flatMap(l=>Zt(l,i)),c=e.fg("accent","\u2502");return r.map(l=>Ht(`${c} ${l}`,t))}a(Qt,"renderTip");function Zt(n,e){return n.length===0?[""]:Xt(n,e)}a(Zt,"wrapLine");function en(n,e){let t="",i=0;for(let o of n.matchAll(Kt)){let s=o.index;t+=e.fg("muted",n.slice(i,s)),t+=e.fg("accent",e.bold(o[0])),i=s+o[0].length}return t+e.fg("muted",n.slice(i))}a(en,"styleBodyLine");var O=class{static{a(this,"TipCore")}providers=new Map;registerProvider(e){if(!/^[a-z0-9][a-z0-9.-]*$/u.test(e.id))return Promise.reject(new Error(`Invalid tip provider ID: ${e.id}`));let t=this.providers.get(e.id);return t!==void 0?t===e?Promise.resolve():Promise.reject(new Error(`Tip provider ${e.id} is already registered`)):(this.providers.set(e.id,e),Promise.resolve())}get isEmpty(){return this.providers.size===0}async collectTips(e){let t=[];for(let i of this.providers.values()){if(e.signal?.aborted)break;try{let o=await tn(i,e);o!==void 0&&nn(o)&&t.push({providerId:i.id,tip:o})}catch{}}return t}};async function tn(n,e){let t=e.signal;if(t===void 0)return n.getTip(e);if(t.aborted)return;let i=a(()=>{},"abort"),o=new Promise(s=>{i=a(()=>s(void 0),"abort"),t.addEventListener("abort",i,{once:!0})});try{return await Promise.race([n.getTip(e),o])}finally{t.removeEventListener("abort",i)}}a(tn,"collectTip");function nn(n){return typeof n.id=="string"&&/^[a-z0-9][a-z0-9.-]*$/u.test(n.id)&&typeof n.title=="string"&&n.title.trim().length>0&&typeof n.body=="string"&&n.body.trim().length>0}a(nn,"isTip");import{randomUUID as on}from"node:crypto";import{mkdir as Y,readFile as rn,rename as sn,rm as K,stat as an,writeFile as cn}from"node:fs/promises";import{setTimeout as dn}from"node:timers/promises";import{homedir as ln}from"node:os";import T from"node:path";var I=1,un=10,pn=5e3,gn=6e4,y=Promise.resolve();function fn(n=process.env){let e=n.PI_CODING_AGENT_DIR??T.join(ln(),".pi","agent");return T.join(e,"pi-agent-ide","tips.json")}a(fn,"resolveTipStatePath");var N=class{constructor(e=fn()){this.statePath=e}static{a(this,"TipStateStore")}async shownFor(e){let t=await _(this.statePath);return new Set(t.projects[e]??[])}async claimIfUnseen(e,t,i){let o=y.then(async()=>{try{return await H(this.statePath,async()=>{let s=await _(this.statePath),r=new Set(s.projects[e]??[]);if(r.has(t)||i!==void 0&&r.has(i))return!1;r.add(t);let c={version:I,projects:{...s.projects,[e]:[...r]}};return await X(this.statePath,c),!0})}catch{return!0}});return y=o.then(()=>{},()=>{}),o}async markShown(e,t){if(t.length===0)return;y=y.then(async()=>{await H(this.statePath,async()=>{let o=await _(this.statePath),s=new Set(o.projects[e]??[]);for(let c of t)s.add(c);let r={version:I,projects:{...o.projects,[e]:[...s]}};await X(this.statePath,r)})}).catch(()=>{}),await y}async unmarkShown(e,t){y=y.then(async()=>{try{await H(this.statePath,async()=>{let o=await _(this.statePath),s=new Set(o.projects[e]??[]);if(!s.delete(t))return;let r={version:I,projects:{...o.projects,[e]:[...s]}};await X(this.statePath,r)})}catch{}}).catch(()=>{}),await y}};function bt(n){return T.resolve(n)}a(bt,"normalizeProjectPath");async function _(n){try{let e=JSON.parse(await rn(n,"utf8"));return hn(e)?e:wt()}catch{return wt()}}a(_,"readState");async function H(n,e){let t=`${n}.lock`;await Y(T.dirname(n),{recursive:!0});let i=Date.now();for(;;)try{await Y(t);break}catch(o){if(mn(o)!=="EEXIST")throw o;try{if(Date.now()-(await an(t)).mtimeMs>gn){await K(t,{recursive:!0,force:!0});continue}}catch{}if(Date.now()-i>=pn)throw new Error(`Timed out waiting for startup-tip state lock: ${t}`,{cause:o});await dn(un)}try{return await e()}finally{await K(t,{recursive:!0,force:!0})}}a(H,"withStateLock");function mn(n){return typeof n=="object"&&n!==null&&"code"in n?String(n.code):void 0}a(mn,"errorCode");async function X(n,e){try{await Y(T.dirname(n),{recursive:!0});let t=`${n}.${process.pid}.${on()}.tmp`;try{await cn(t,`${JSON.stringify(e,null,2)}
|
|
5
|
+
`,"utf8"),await sn(t,n)}finally{await K(t,{force:!0})}}catch{}}a(X,"writeState");function wt(){return{version:I,projects:{}}}a(wt,"emptyState");function hn(n){if(typeof n!="object"||n===null||Array.isArray(n))return!1;let e=n;return e.version!==I||typeof e.projects!="object"||e.projects===null?!1:Object.values(e.projects).every(t=>Array.isArray(t)&&t.every(i=>typeof i=="string"))}a(hn,"isState");var Pt="pi-agent-ide-startup-tip";function Q(n){let e=new O,t=new N;n.registerEntryRenderer(Pt,(r,c,d)=>{let l=r.data;if(!(typeof l.title!="string"||typeof l.body!="string"))return new j({title:l.title,body:l.body},d)});let i=n.events.on(Te,r=>{if(!Ee(r))throw new Error("Invalid tip provider registration request");r.accept(e.registerProvider(r.provider))});n.on("session_shutdown",i);let o,s=Promise.resolve();n.on("session_start",(r,c)=>{o?.abort(),o=new AbortController;let d=o.signal;s=s.then(()=>yn(n,e,t,r.reason,c,d)).catch(()=>{})}),n.on("session_shutdown",async()=>{o?.abort(),await s}),n.events.emit(Ie,{protocol:R,apiVersion:C})}a(Q,"registerTips");async function yn(n,e,t,i,o,s){if(o.mode!=="tui"||(s.throwIfAborted(),e.isEmpty))return;let r=await e.collectTips({cwd:o.cwd,mode:o.mode,hasUI:o.hasUI,signal:s,reason:i});if(s.throwIfAborted(),r.length===0)return;let c=bt(o.cwd);for(let d of r){let l=wn(d.providerId,d.tip.id);if(await t.claimIfUnseen(c,l,d.tip.id)){if(s.aborted){await t.unmarkShown(c,l);return}try{n.appendEntry(Pt,d.tip);return}catch(u){throw await t.unmarkShown(c,l),u}}}}a(yn,"displayTip");function wn(n,e){return JSON.stringify([n,e])}a(wn,"tipIdentity");import{mkdir as bn,readFile as vt,writeFile as Pn}from"node:fs/promises";async function It(n,e){await bn(Pe(n),{recursive:!0});let t=[],i=e.filter(r=>r.recipe.formatter!==void 0),o=e.filter(r=>r.recipe.linter!==void 0),s=e.filter(r=>r.recipe.lsp!==void 0);if(i.length>0){let r=P(n,"formatters"),c=await Z(r,{version:1,formatters:{}}),d=ee(c,"formatters");for(let l of i)d[l.recipe.id]??=l.recipe.formatter;await te(r,c)&&t.push(r)}if(o.length>0){let r=P(n,"linters"),c=await Z(r,{version:1,linters:{}}),d=ee(c,"linters");for(let l of o)d[l.recipe.id]??=l.recipe.linter;await te(r,c)&&t.push(r)}if(s.length>0){let r=P(n,"lsp-servers"),c=await Z(r,{version:1,servers:{}}),d=ee(c,"servers");for(let l of s){let u=ge(l.recipe.lsp);d[l.recipe.id]??={command:u.command,transport:"stdio",rootMarkers:u.rootMarkers,...u.initializationOptions!==void 0&&{initializationOptions:u.initializationOptions},...u.settings!==void 0&&{settings:u.settings},...u.requireRootMarker!==void 0&&{requireRootMarker:u.requireRootMarker},languages:Object.fromEntries(Object.entries(u.languageIds).map(([p,f])=>[p,{extensions:f,...u.fileNames?.[p]&&{fileNames:u.fileNames[p]}}])),capabilities:["diagnostics"]}}await te(r,c)&&t.push(r)}return t}a(It,"writeSuggestedConfigs");async function Z(n,e){try{let t=JSON.parse(await vt(n,"utf8"));if(typeof t!="object"||t===null||Array.isArray(t))throw new Error(`${n} must contain an object`);return t}catch(t){if(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ENOENT")return e;throw t}}a(Z,"readObject");function ee(n,e){let t=n[e];if(typeof t!="object"||t===null||Array.isArray(t))throw new Error(`${e} must be an object`);return t}a(ee,"objectMember");async function te(n,e){let t=`${JSON.stringify(e,null,2)}
|
|
6
|
+
`;return await vt(n,"utf8").catch(()=>{})===t?!1:(await Pn(n,t,"utf8"),!0)}a(te,"writeJson");var F=class{static{a(this,"DoctorCore")}plugins=new Map;languages=[];recipes=[];setupChecks=[];checks=[];queue=Promise.resolve();registerPlugin(e){let t=this.plugins.get(e.id);if(t!==void 0)return t;let i=this.queue.then(async()=>{let o=!0,s=[],r=[],c=[],d=[],l={addLanguage:a(u=>{L(u,s,e.id,"language",()=>o)},"addLanguage"),addToolRecipe:a(u=>{L(u,r,e.id,"tool recipe",()=>o)},"addToolRecipe"),addSetupCheck:a(u=>{L(u,c,e.id,"setup check",()=>o)},"addSetupCheck"),addCheck:a(u=>{L(u,d,e.id,"check",()=>o)},"addCheck")};try{await e.setup(l)}finally{o=!1}Tt(this.languages,s,"language"),Tt(this.recipes,r,"tool recipe"),this.languages.push(...s),this.recipes.push(...r),this.setupChecks.push(...c),this.checks.push(...d)});return this.plugins.set(e.id,i),this.queue=i.catch(()=>{}),i.catch(()=>{this.plugins.delete(e.id)}),i}async waitForPlugins(){await Promise.all(this.plugins.values())}snapshot(){return{languages:[...this.languages],recipes:[...this.recipes],setupChecks:[...this.setupChecks],checks:[...this.checks]}}};async function Et(n,e){let t=[],i=[];for(let o of n.setupChecks)try{let s=await o.value.inspect(e);t.push(...(s.selections??[]).map(r=>({...r,pluginId:o.pluginId}))),i.push(...(s.actions??[]).map(r=>({...r,pluginId:o.pluginId})))}catch{}return{selections:t,actions:i}}a(Et,"runContributedSetupChecks");async function xt(n,e){let t=[];for(let i of n.checks)try{t.push({pluginId:i.pluginId,title:i.value.title,findings:await i.value.run(e)})}catch(o){t.push({pluginId:i.pluginId,title:i.value.title,findings:[{status:"fail",message:o instanceof Error?o.message:String(o)}]})}return t}a(xt,"runContributedChecks");function Tt(n,e,t){for(let i of e){let o=n.find(s=>s.value.id===i.value.id)?.pluginId;if(o!==void 0)throw new Error(`${t} ${i.value.id} is already owned by doctor plugin ${o}`)}}a(Tt,"assertAvailable");function L(n,e,t,i,o){if(!o())throw new Error(`Doctor plugin ${t} setup is complete`);if(!/^[a-z0-9][a-z0-9.-]*$/u.test(n.id))throw new Error(`Invalid ${i} ID: ${n.id}`);if(e.some(s=>s.value.id===n.id))throw new Error(`Doctor plugin ${t} registered ${i} ${n.id} twice`);e.push({pluginId:t,value:n})}a(L,"add");import Cn from"node:path";import{readFile as vn}from"node:fs/promises";async function Dt(n,e,t,i=process.env){let o=await Fe(n,t.map(c=>c.value)),s=await Tn(n),r=[];for(let c of t){let d=c.value;if(d.languages.every(x=>!e.has(x)))continue;let l=[],u=1,p=o.get(d.id),f=p?.config;f!==void 0&&(u+=6,l.push(`project config: ${f}`)),s.has(`${d.kind}:${d.id}`)&&(u+=6,l.push("Pi Agent IDE config"));let h=p?.dependency;h!==void 0&&(u+=4,l.push(`project dependency: ${h}`));let w=await In(n,d.executables,i);w!==void 0&&(u+=3,l.push(`executable: ${w}`)),r.push({pluginId:c.pluginId,recipe:d,score:u,evidence:l,...w&&{executable:w}})}return r.sort((c,d)=>d.score-c.score||c.recipe.id.localeCompare(d.recipe.id))}a(Dt,"discoverRecipeCandidates");function St(n,e,t=[]){let i=new Map,o=new Map(t.map(s=>[`${s.kind}:${s.languageId}`,s.toolId]));for(let s of e)for(let r of["formatter","linter","lsp"]){let c=o.get(`${r}:${s}`),d=c===void 0?4:7,l=n.filter(p=>p.recipe.kind===r&&p.recipe.languages.includes(s)&&p.executable!==void 0&&p.recipe.id!==c&&p.score>=d),u=l[0];u!==void 0&&(l.filter(p=>p.score===u.score).length>1||i.set(`${u.recipe.kind}:${u.recipe.id}`,u))}return[...i.values()]}a(St,"selectSuggestedRecipes");async function In(n,e,t){for(let i of e)if(await be(i,n,t))return i}a(In,"firstExecutable");async function Tn(n){let e=new Set;for(let[t,i,o]of[["formatters","formatters","formatter"],["linters","linters","linter"],["lsp-servers","servers","lsp"]])try{let s=JSON.parse(await vn(P(n,t),"utf8"));if(typeof s!="object"||s===null||Array.isArray(s))continue;let c=s[i];if(typeof c=="object"&&c!==null&&!Array.isArray(c))for(let d of Object.keys(c))e.add(`${o}:${d}`)}catch{}return e}a(Tn,"managedRecipeIds");import{execFile as En}from"node:child_process";import{readdir as xn}from"node:fs/promises";import v from"node:path";import{promisify as Dn}from"node:util";var Sn=Dn(En),Rn=new Set([".git",".hg",".svn","node_modules","vendor","build","dist","coverage",".cache",".next","target"]);async function Rt(n,e){e?.throwIfAborted();try{let i=(await Sn("git",["ls-files","--cached","--others","--exclude-standard","-z"],{cwd:n,encoding:"utf8",maxBuffer:16777216,signal:e})).stdout.split("\0").filter(Boolean).map(o=>v.resolve(n,o)).filter(o=>!kt(o));return e?.throwIfAborted(),i.length>0?i:await ne(n,e)}catch{return e?.throwIfAborted(),ne(n,e)}}a(Rt,"collectProjectFiles");function Ct(n,e){let t=new Map;for(let i of e){let o=new Set(i.extensions.map(c=>c.toLowerCase())),s=new Set(i.fileNames),r=n.filter(c=>!c.split(v.sep).join("/").includes("/.pi/pi-agent-ide/")&&(o.has(v.extname(c).toLowerCase())||s.has(v.basename(c))));r.length>0&&t.set(i.id,r)}return t}a(Ct,"detectProjectLanguages");async function ne(n,e){e?.throwIfAborted();let t=[];for(let i of await xn(n,{withFileTypes:!0})){if(i.isDirectory()&&Rn.has(i.name))continue;let o=v.join(n,i.name);kt(o)||(i.isDirectory()?t.push(...await ne(o,e)):i.isFile()&&t.push(o))}return t}a(ne,"walk");function kt(n){return n.split(v.sep).join("/").includes("/.pi/pi-agent-ide/")}a(kt,"isManagedIdeConfig");async function ie(n,e,t=process.env,i){i?.throwIfAborted();let o=await Rt(e,i);i?.throwIfAborted();let s=Ct(o,n.languages.map(p=>p.value)),r=new Set(s.keys()),c={cwd:e,files:o,detectedLanguageIds:r,detectedLanguages:s,env:t},[d,l]=await Promise.all([Dt(e,r,n.recipes,t),Et(n,c)]),u=new Map;for(let p of r)for(let f of["formatter","linter","lsp"]){if(l.selections.some(m=>m.languageId===p&&m.kind===f))continue;let h=d.filter(m=>m.recipe.kind===f&&m.recipe.languages.includes(p)),w=a(m=>m.score-(m.executable===void 0?0:3),"nativeScore"),x=Math.max(1,...h.map(w));for(let m of h){if(m.executable!==void 0||w(m)!==x||x<=1)continue;let ae=`${f}-${m.recipe.id}-unavailable`;u.set(ae,{id:ae,pluginId:m.pluginId,message:`Native project setup selects ${m.recipe.id}, but its executable is unavailable. Install ${m.recipe.executables.join(" or ")} and run Doctor again.`})}}return{cwd:e,files:o,detectedLanguages:s,candidates:d,selections:l.selections,actions:[...l.actions,...u.values()],suggestions:St(d,r,l.selections)}}a(ie,"inspectDoctorSetup");async function M(n,e,t=process.env){let i=await ie(n,e,t),o=new Set(i.detectedLanguages.keys()),s={cwd:e,files:i.files,detectedLanguageIds:o,detectedLanguages:i.detectedLanguages,env:t},r=await xt(n,s),c=[{status:"pass",message:`Project: ${e}`},i.files.length>0?{status:"pass",message:`${i.files.length} project files inspected`}:{status:"warn",message:"No project files found"},o.size>0?{status:"pass",message:`Detected: ${[...o].join(", ")}`}:{status:"warn",message:"No registered project languages detected"}];return{...i,sections:[{title:"Project",pluginId:"doctor",findings:c},...r]}}a(M,"runDoctor");function E(n){let e=["Pi Agent IDE doctor",""];for(let t of n.sections){e.push(`${t.title} (${t.pluginId})`);for(let i of t.findings)e.push(` ${i.status.toUpperCase().padEnd(4)} ${i.message}`),i.detail!==void 0&&e.push(` \`${i.detail}\``);e.push("")}if(n.actions.length>0){e.push("Setup needs attention");for(let t of n.actions)e.push(` ${t.message} [${t.pluginId}]`);e.push("")}if(n.suggestions.length>0){e.push("Suggested configuration");for(let t of n.suggestions){let i=t.evidence.length>0?` \u2014 ${t.evidence.join(", ")}`:"";e.push(` ${t.recipe.kind.padEnd(9)} ${t.recipe.id} [${t.pluginId}]${i}`)}e.push("")}return e.join(`
|
|
7
|
+
`).trimEnd()}a(E,"formatDoctorReport");function oe(n){return n.actions.length>0||n.suggestions.length>0||n.sections.some(e=>e.findings.some(t=>t.status==="fail"))}a(oe,"doctorNeedsWork");function At(n){let e=n.candidates.map(t=>({owner:t.pluginId,id:t.recipe.id,kind:t.recipe.kind,languages:t.recipe.languages,evidence:t.evidence,documentation:t.recipe.documentation}));return["Finish configuring Pi Agent IDE for this project.","Preserve existing formatter, linter, compiler, and style rules. Do not invent or replace native project settings.","Do not install packages, write credentials, or change source files without the user's normal confirmation.","Pi Agent IDE project configs live in .pi/pi-agent-ide/.","Use only the relevant plugin contributions listed below; each owner remains responsible for its own scope.","",E(n),"","Relevant registered recipes:",JSON.stringify(e,null,2),"",`Project root: ${Cn.resolve(n.cwd)}`].join(`
|
|
8
|
+
`)}a(At,"buildDoctorAgentPrompt");import{createHash as kn}from"node:crypto";var An="doctor",re=3;function $t(n,e){let t=ve(n,$n(e));t!==void 0&&t.catch(()=>{})}a($t,"registerDoctorTipProvider");function $n(n){return{protocol:R,apiVersion:C,id:An,async getTip(e){let t=await n(e),i=jn(t);if(i.length===0)return;let o=i.slice(0,re).map(s=>`\u2022 ${s.message}`);return i.length>re&&o.push(`\u2022 ${i.length-re} more`),{id:`doctor-setup-${On(i)}`,title:i.length===1?"Project setup needs attention":`${i.length} project setup items`,body:[...o,"Run /pi-agent-ide-doctor"].join(`
|
|
9
|
+
`)}}}}a($n,"createDoctorTipProvider");function jn(n){let e=n.actions.map(i=>({id:`action:${i.pluginId}:${i.id}`,message:i.message})),t=n.suggestions.map(i=>{let o=i.recipe.languages.filter(r=>n.detectedLanguages.has(r)).join(", "),s={formatter:"formatting",linter:"linting",lsp:"language support"}[i.recipe.kind];return{id:`suggestion:${i.pluginId}:${i.recipe.kind}:${i.recipe.id}`,message:`Use ${i.recipe.name} for ${o} ${s}`}});return[...e,...t].sort((i,o)=>i.id.localeCompare(o.id))}a(jn,"setupItems");function On(n){return kn("sha256").update(n.map(e=>`${e.id}\0${e.message}`).join("\0")).digest("hex").slice(0,12)}a(On,"fingerprint");async function V(n){let e=new F;$t(n,async o=>(await e.waitForPlugins(),ie(e.snapshot(),o.cwd,process.env,o.signal)));let t,i=n.events.on(Re,o=>{if(!Ce(o))throw new Error("Invalid doctor plugin registration request");o.accept(e.registerPlugin(o.plugin))});n.on("session_shutdown",i),n.registerCommand("pi-agent-ide-doctor",{description:"Check and configure Pi Agent IDE for this project",handler:a(async(o,s)=>{await e.waitForPlugins();let r=await M(e.snapshot(),s.cwd);se(n,E(r));let c=new Set(o.trim().split(/\s+/u).filter(Boolean));if(r.suggestions.length>0&&!c.has("--no-apply")&&(c.has("--apply")||s.hasUI&&await s.ui.confirm("Apply suggested configuration?","Add detected tools to .pi/pi-agent-ide/. Existing entries and native tool settings are kept."))){let u=await It(s.cwd,r.suggestions),p=u.length===0?"Pi Agent IDE configs are already up to date":`Updated ${u.length} Pi Agent IDE config ${u.length===1?"file":"files"}`;s.ui.notify(p,"info"),r=await M(e.snapshot(),s.cwd),se(n,E(r))}if(!oe(r)&&!c.has("--agent"))return;(c.has("--agent")||s.hasUI&&await s.ui.confirm("Ask the agent to finish setup?","The agent will receive this redacted report and relevant plugin recipes."))&&(t=s.cwd,n.sendUserMessage(At(r)))},"handler")}),n.on("agent_end",async(o,s)=>{let r=t;if(r===void 0)return;t=void 0;let c=await M(e.snapshot(),r,process.env);se(n,`Doctor recheck after agent setup
|
|
10
10
|
|
|
11
|
-
${
|
|
12
|
-
${
|
|
13
|
-
`,"");return o===i.systemPrompt?void 0:{systemPrompt:o}});let e=await
|
|
11
|
+
${E(c)}`),oe(c)?s.ui.notify("Pi Agent IDE setup still needs attention","warning"):s.ui.notify("Pi Agent IDE setup is ready","info")}),n.events.emit(Se,{protocol:xe,apiVersion:1}),await e.waitForPlugins()}a(V,"registerDoctor");function se(n,e){n.sendMessage({customType:"pi-agent-ide-doctor",content:e,display:!0},{triggerTurn:!1})}a(se,"sendReport");import _n from"node:path";var jt="diagnostics",Nn=je({kind:"code-view",label:"Diagnostics"});async function U(n){let e,t=a((c,d)=>{if(e===void 0)throw new Error("IDE diagnostics are not connected");return e(c,{cwd:d})},"collect"),i={protocol:D,apiVersion:3,id:"diagnostics",setup(c){e=c.readDiagnostics}},o=new WeakMap,s=new WeakMap,r={protocol:ke,apiVersion:Ae,id:"diagnostics",setup(c){c.addResolver({resolver:Ln(t),renderResult:Nn});let d=fe();c.addView({view:"diagnostics",priority:100,presenter:Mn(t,s)}),c.addHandler({stage:"read",when:{resolvedBy:"any",contentKind:"text"},handler(l){return l.state?.resolvedBy==="diagnostics"?d(l):(l.state?.contentKind==="text"&&l.request.views?.includes("diagnostics")&&o.set(l.request,l.state.text),{kind:"continue",context:l})}}),c.addHandler({stage:"post-read",handler(l){let u=o.get(l.request),p=u&&s.get(u),f=l.result,h=f?.content[0];return!p||!f||h?.type!=="text"?{kind:"continue",context:l}:{kind:"continue",context:{...l,result:{...f,content:[{...h,text:`${p}
|
|
12
|
+
${h.text}`},...f.content.slice(1)]}}}}}),c.describe("`diagnostics:<path>` returns lint and LSP diagnostics with five lines of source context on each side. The `diagnostics` view adds the same diagnostics alongside a normal file read. Both reuse background results, wait briefly for current checks, and report pending, unavailable, snapshot, or unversioned sources explicitly. A snapshot is the latest push update, not a completed check; an empty snapshot does not mean the file is clean."),c.addPromptGuideline("Use read with `diagnostics:<path>` or the `diagnostics` view for per-file diagnostics instead of running equivalent checks through Bash. Project builds and tests remain separate verification."),c.addPromptGuideline('You can use read with `views: ["diagnostics"]` to add lint and LSP diagnostics alongside file content.'),c.addPromptGuideline("Treat diagnostic snapshots as incomplete observations, not completed checks; an empty snapshot is not evidence that the file is clean."),c.addPromptGuideline("Explicit formatter, linter, and LSP overrides can match exact basenames with fileNames, such as Dockerfile or CMakeLists.txt. LSP requireRootMarker limits a server to files below one of its rootMarkers inside the project, keeping framework servers from claiming unrelated files. LSP initializationOptions can use {project} in string values for project-local plugin paths. Regex diagnostic parsers support multiline output and columnBase: 0 for zero-based tool columns."),c.addPromptGuideline("For missing formatting or diagnostics, check native project configuration and installed executables before adding IDE overrides. Built-ins find tools in node_modules/.bin, Python virtualenv bin directories (Scripts on Windows), and vendor/bin; Windows executable suffixes follow PATHEXT. /pi-agent-ide-doctor reports detected tools and missing dependencies. A detected runtime does not prove its formatter modules or language server can run.")}};await Promise.all([we(n,i),$e(n,r)])}a(U,"registerDiagnostics");function Ln(n){return{id:"diagnostics",tryResolve(e,t){return Promise.resolve(Fn(e,t.cwd,n))}}}a(Ln,"createDiagnosticResolver");function Fn(n,e,t){let i;try{i=ce(n,jt,e)}catch(o){return{kind:"failed",error:o}}return i===void 0?{kind:"not-handled"}:{kind:"resolved",resource:{source:de(jt,i),async read(){let o=await t(i,e);return[le(i,o.content,o.results)]}}}}a(Fn,"resolveDiagnosticSource");function Mn(n,e){return{id:"diagnostics",async present(t,i){if(i.purpose!=="read"||!_n.isAbsolute(t.source))return t;let o=await n(t.source,i.cwd);if(o.content!==t.content)throw new Error("File changed during diagnostic read; read it again for current source lines.");return e.set(t,pe(o.results)),ue(t,o.results)}}}a(Mn,"createDiagnosticPresenter");var Ot=[g("ide.core",W),g("ide.tips",Q),g("ide.doctor",V),g("ide.languages",ct,["ide.doctor"]),g("read.core",He),g("read.filesystem",Me,["read.core","editor.core"]),g("read.filesystem.image",Ve,["read.filesystem"]),g("read.filesystem.pdf",Ue,["read.filesystem"]),g("read.filesystem.text",Be,["read.filesystem"]),g("read.web",qe,["read.core"]),g("read.web.html",Je,["read.web"]),g("read.web.image",Ge,["read.web"]),g("read.web.pdf",ze,["read.web"]),g("read.web.text",We,["read.web"]),g("search.core",Xe),g("search.text",Ye,["search.core"]),g("editor.renderer",it,["editor.core"]),g("editor.core",Ke),g("editor.anchor.constant",Qe,["read.core","editor.core"]),g("editor.anchor.line-hash",Ze,["read.core","editor.core"]),g("editor.anchor.exact",et,["editor.core"]),g("editor.argument-order",tt,["editor.core"],!1),g("editor.overwrite",nt,["editor.core"],!1),g("editor.stale-anchor",ot,["editor.core"]),g("ide.ast",rt,["ide.core","read.core","search.core","editor.core"]),g("ide.formatter",at,["ide.core"]),g("ide.lint",dt,["ide.core"]),g("ide.changes",st,["ide.core","read.core","editor.core"]),g("ide.lsp",lt,["ide.core","read.core","search.core"]),g("ide.diagnostics",U,["ide.core","read.core"])];function g(n,e,t=[],i=!0){return{id:n,dependencies:t,register:e,...i?{}:{defaultEnabled:!1}}}a(g,"builtin");import{readFile as Vn}from"node:fs/promises";import Un from"node:os";import B from"node:path";function Ft(n=process.env,e=Un.homedir(),t=process.cwd()){let i=n.PI_CODING_AGENT_DIR?.trim(),o=i===void 0||i.length===0?B.join(e,".pi","agent"):B.resolve(i);return{globalPath:B.join(o,"pi-agent-ide","extensions.json"),projectPath:B.resolve(t,".pi","pi-agent-ide","extensions.json")}}a(Ft,"resolvePiAgentIdeExtensionsConfigPaths");async function Mt(n){let e=await _t(n.globalPath),t=await _t(n.projectPath);return{disabled:[...new Set([...e.disabled,...t.disabled])],enabled:[...new Set([...e.enabled,...t.enabled])]}}a(Mt,"readPiAgentIdeExtensionsConfig");async function _t(n){let e;try{e=await Vn(n,"utf8")}catch(i){if(Bn(i))return{disabled:[],enabled:[]};throw new Error(`Cannot read Pi Agent IDE extension config at ${n}: ${Lt(i)}`,{cause:i})}let t;try{t=JSON.parse(e)}catch(i){throw new Error(`Invalid JSON in Pi Agent IDE extension config at ${n}: ${Lt(i)}`,{cause:i})}if(!Vt(t))throw new Error(`Pi Agent IDE extension config at ${n} must be a JSON object`);return{disabled:Nt(t,"disabled",n),enabled:Nt(t,"enabled",n)}}a(_t,"readConfigExtensionIds");function Nt(n,e,t){let i=n[e];if(i===void 0)return[];if(!Array.isArray(i))throw new Error(`${e} in ${t} must be an array of non-empty strings`);let o=i.filter(r=>typeof r=="string");if(o.length!==i.length||o.some(r=>r.length===0))throw new Error(`${e} in ${t} must be an array of non-empty strings`);if(new Set(o).size!==o.length)throw new Error(`${e} in ${t} must not contain duplicate IDs`);return o}a(Nt,"readIdField");function Bn(n){return Vt(n)&&n.code==="ENOENT"}a(Bn,"isMissingFile");function Vt(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}a(Vt,"isRecord");function Lt(n){return n instanceof Error?n.message:String(n)}a(Lt,"errorMessage");function Ut(n,e,t=[]){let i=new Map;for(let d of n){if(i.has(d.id))throw new Error(`Duplicate Pi Agent IDE extension ID: ${d.id}`);i.set(d.id,d)}for(let d of n)for(let l of d.dependencies)if(!i.has(l))throw new Error(`Pi Agent IDE extension ${d.id} has unknown dependency ${l}`);let o=new Set;for(let d of e){if(!i.has(d))throw new Error(`Unknown Pi Agent IDE extension ID in disabled: ${d}`);o.add(d)}for(let d of t)if(!i.has(d))throw new Error(`Unknown Pi Agent IDE extension ID in enabled: ${d}`);let s=qn(i,t,o),r=new Set;for(let d of n)(d.defaultEnabled===!1&&!s.has(d.id)||o.has(d.id))&&r.add(d.id);let c=!0;for(;c;){c=!1;for(let d of n)r.has(d.id)||d.dependencies.every(l=>!r.has(l))||(r.add(d.id),c=!0)}return{enabled:n.filter(d=>!r.has(d.id)),disabled:r}}a(Ut,"selectBuiltinExtensions");function qn(n,e,t){let i=new Set,o=[...e];for(;o.length>0;){let s=o.pop();if(!(i.has(s)||t.has(s))){i.add(s);for(let r of n.get(s)?.dependencies??[])i.has(r)||o.push(r)}}return i}a(qn,"collectForcedOn");async function Jn(n){n.on("before_agent_start",i=>{let o=i.systemPrompt.replace("- bash: Execute bash commands (ls, grep, find, etc.)","- bash: Execute Bash commands").replace(`- Use bash for file operations like ls, rg, find
|
|
13
|
+
`,"");return o===i.systemPrompt?void 0:{systemPrompt:o}});let e=await Mt(Ft()),{enabled:t}=Ut(Ot,e.disabled,e.enabled);for(let i of t)await i.register(n)}a(Jn,"registerUnifiedPiAgentIde");export{Jn as default};
|
package/docs/configuration.md
CHANGED
|
@@ -54,7 +54,7 @@ A project can override it in `<project>/.pi/pi-agent-ide/search.json`. Set `time
|
|
|
54
54
|
|
|
55
55
|
## Tool configuration
|
|
56
56
|
|
|
57
|
-
Pi Agent IDE ships
|
|
57
|
+
Pi Agent IDE ships formatter, linter, and LSP mappings. You do not need to copy them into each project. Install the tools and their required modules separately. Pi looks in project `node_modules/.bin`, Python `.venv` and `venv` executable directories, `vendor/bin`, and `PATH`. Python environments use `Scripts` on Windows and `bin` elsewhere. Windows command lookup respects `PATHEXT`, including `.cmd` launchers.
|
|
58
58
|
|
|
59
59
|
You can replace built-in entries or add custom entries in either of these directories:
|
|
60
60
|
|
|
@@ -77,6 +77,37 @@ Use direct argument arrays in tool commands. Available placeholders are `{file}`
|
|
|
77
77
|
|
|
78
78
|
When `PI_CODING_AGENT_DIR` is set, the global directory follows it as `<PI_CODING_AGENT_DIR>/extensions/pi-agent-ide/`. Restart Pi or use `/reload` after changing a configuration file.
|
|
79
79
|
|
|
80
|
+
### Files without a language extension
|
|
81
|
+
|
|
82
|
+
Formatter and linter `fileNames` entries match exact basenames, such as `Dockerfile` or `CMakeLists.txt`. A file can match either `extensions` or `fileNames`; existing `include` and `exclude` rules still apply. LSP entries put `fileNames` beside `extensions` inside each language. Basenames are case-insensitive on Windows.
|
|
83
|
+
|
|
84
|
+
### Framework language servers
|
|
85
|
+
|
|
86
|
+
An LSP entry can set `requireRootMarker: true`. It then applies only when one of its `rootMarkers` exists in the file's directory or an ancestor inside the project. Markers are relative paths, not globs. The Angular built-in uses `angular.json`, so installing Angular's server does not make it claim ordinary TypeScript or HTML projects. A single-file server can leave this option unset.
|
|
87
|
+
|
|
88
|
+
JSX and TSX use the LSP language IDs `javascriptreact` and `typescriptreact`, not plain JavaScript and TypeScript.
|
|
89
|
+
|
|
90
|
+
LSP `initializationOptions` can use `{project}` inside string values, including nested plugin locations. Pi expands it to the absolute project path before starting the server. `settings` values are sent through the LSP configuration protocol.
|
|
91
|
+
|
|
92
|
+
Vue diagnostics use `typescript-language-server` with the project-local `@vue/typescript-plugin`. Install both, along with TypeScript, and enable the Vue plugin in the native `tsconfig.json`:
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"compilerOptions": {
|
|
97
|
+
"plugins": [{ "name": "@vue/typescript-plugin" }]
|
|
98
|
+
},
|
|
99
|
+
"include": ["src/**/*.vue"]
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The Vue mapping is separate from ordinary TypeScript, so other projects do not load the Vue plugin. This setup does not claim the extra custom commands of `@vue/language-server`.
|
|
104
|
+
|
|
105
|
+
### Custom diagnostic reporters
|
|
106
|
+
|
|
107
|
+
Regex diagnostic parsers run with multiline matching. Set `columnBase: 0` when a reporter counts columns from zero; the default is one. Returned diagnostic positions remain one-based. This setting applies only to `format: "regex"` parsers.
|
|
108
|
+
|
|
109
|
+
A runtime being installed does not prove its modules or language-server features are installed. For example, Taplo's npm build can format TOML but does not include its LSP. Use an LSP-enabled Taplo build for language-server diagnostics. Doctor reports the actual startup failure rather than treating that file as clean.
|
|
110
|
+
|
|
80
111
|
## Doctor
|
|
81
112
|
|
|
82
113
|
Run `/pi-agent-ide-doctor` to check the effective tools for the current project. Doctor uses the same layered entries as runtime. For each applicable entry it shows the stable ID, source layer, command, and real probe result. A missing or failing command is reported instead of falling back to a lower layer.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Detected extensions: `.cmake`.
|
|
4
4
|
|
|
5
|
-
| Kind | Tool
|
|
6
|
-
| --------- |
|
|
7
|
-
| formatter | `cmake-format`
|
|
8
|
-
| linter | `cmake-lint`
|
|
9
|
-
| lsp | `
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | -------------- | -------------------------------------------------------- | ----------------------------------------------------------- |
|
|
7
|
+
| formatter | `cmake-format` | `.cmake-format.py`, `CMakeLists.txt` | [Official docs](https://cmake-format.readthedocs.io/) |
|
|
8
|
+
| linter | `cmake-lint` | `.cmake-format.py`, `CMakeLists.txt` | [Official docs](https://cmake-format.readthedocs.io/) |
|
|
9
|
+
| lsp | `neocmakelsp` | `CMakeLists.txt`, `.neocmake.toml`, `.neocmakelint.toml` | [Official docs](https://github.com/neocmakelsp/neocmakelsp) |
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Detected extensions: `.cs`.
|
|
4
4
|
|
|
5
|
-
| Kind | Tool | Detection
|
|
6
|
-
| --------- | --------------- |
|
|
7
|
-
| formatter | `csharpier` | `.csharpierrc`, `.csharpierrc.json` | [Official docs](https://csharpier.com/) |
|
|
8
|
-
| linter | `dotnet-format` | `.editorconfig`, `global.json`
|
|
9
|
-
| lsp | `csharp-ls` | `.sln`, `.csproj`
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | --------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
7
|
+
| formatter | `csharpier` | `.csharpierrc`, `.csharpierrc.json`, `.csharpierrc.yaml`, `.csharpierrc.yml` | [Official docs](https://csharpier.com/) |
|
|
8
|
+
| linter | `dotnet-format` | `.editorconfig`, `global.json` | [Official docs](https://learn.microsoft.com/dotnet/core/tools/dotnet-format) |
|
|
9
|
+
| lsp | `csharp-ls` | `.sln`, `.csproj` | [Official docs](https://github.com/razzmatazz/csharp-language-server) |
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Detected extensions: `.css`, `.scss`, `.sass`, `.less`.
|
|
4
4
|
|
|
5
|
-
| Kind | Tool | Detection
|
|
6
|
-
| --------- | ---------------------------- |
|
|
7
|
-
| formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `prettier.config.js`
|
|
8
|
-
| formatter | `biome` | `biome.json`, `biome.jsonc`
|
|
9
|
-
| formatter | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts`
|
|
10
|
-
| linter | `stylelint` | `stylelint.config.js`, `.stylelintrc.json`
|
|
11
|
-
| lsp | `vscode-css-language-server` | `package.json`
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
7
|
+
| formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `.prettierrc.json5`, `.prettierrc.yaml`, `.prettierrc.yml`, `.prettierrc.toml`, `.prettierrc.js`, `.prettierrc.cjs`, `.prettierrc.mjs`, `prettier.config.js`, `prettier.config.cjs`, `prettier.config.mjs`, `prettier.config.ts`, `prettier.config.mts`, `prettier.config.cts`, `package.json: prettier` | [Official docs](https://prettier.io/docs/) |
|
|
8
|
+
| formatter | `biome` | `biome.json`, `biome.jsonc` | [Official docs](https://biomejs.dev/) |
|
|
9
|
+
| formatter | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts` | [Official docs](https://oxc.rs/docs/guide/usage/formatter.html) |
|
|
10
|
+
| linter | `stylelint` | `stylelint.config.js`, `.stylelintrc.json` | [Official docs](https://stylelint.io/) |
|
|
11
|
+
| lsp | `vscode-css-language-server` | `package.json` | [Official docs](https://github.com/microsoft/vscode-css-languageservice) |
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Dart
|
|
2
|
+
|
|
3
|
+
Detected extensions: `.dart`.
|
|
4
|
+
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | ---------------------- | --------------------------------------- | ------------------------------------------------------------ |
|
|
7
|
+
| formatter | `dart-format` | `pubspec.yaml`, `analysis_options.yaml` | [Official docs](https://dart.dev/tools/dart-format) |
|
|
8
|
+
| linter | `dart-analyze` | `analysis_options.yaml`, `pubspec.yaml` | [Official docs](https://dart.dev/tools/dart-analyze) |
|
|
9
|
+
| lsp | `dart-language-server` | `pubspec.yaml`, `analysis_options.yaml` | [Official docs](https://dart.dev/tools/dart-language-server) |
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Detected extensions: file names only.
|
|
4
4
|
|
|
5
|
-
| Kind | Tool | Detection
|
|
6
|
-
| --------- | ------------------- |
|
|
7
|
-
| formatter | `dockfmt` | `Dockerfile`
|
|
8
|
-
| linter | `hadolint` | `.hadolint.yaml`
|
|
9
|
-
| lsp | `docker-langserver` | `Dockerfile`
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | ------------------- | ----------------------------- | ----------------------------------------------------------------------------- |
|
|
7
|
+
| formatter | `dockfmt` | `Dockerfile`, `Containerfile` | [Official docs](https://github.com/jessfraz/dockfmt) |
|
|
8
|
+
| linter | `hadolint` | `.hadolint.yaml` | [Official docs](https://github.com/hadolint/hadolint) |
|
|
9
|
+
| lsp | `docker-langserver` | `Dockerfile` | [Official docs](https://github.com/rcjsuen/dockerfile-language-server-nodejs) |
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Elixir
|
|
2
|
+
|
|
3
|
+
Detected extensions: `.ex`, `.exs`.
|
|
4
|
+
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | ------------ | --------------------------- | ------------------------------------------------------------- |
|
|
7
|
+
| formatter | `mix-format` | `mix.exs`, `.formatter.exs` | [Official docs](https://hexdocs.pm/mix/Mix.Tasks.Format.html) |
|
|
8
|
+
| linter | `credo` | `mix.exs`, `.credo.exs` | [Official docs](https://hexdocs.pm/credo/) |
|
|
9
|
+
| lsp | `elixir-ls` | `mix.exs` | [Official docs](https://github.com/elixir-lsp/elixir-ls) |
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Detected extensions: `.html`, `.htm`.
|
|
4
4
|
|
|
5
|
-
| Kind | Tool | Detection
|
|
6
|
-
| --------- | ----------------------------- |
|
|
7
|
-
| formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `prettier.config.js`
|
|
8
|
-
| formatter | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts`
|
|
9
|
-
| linter | `htmlhint` | `.htmlhintrc`
|
|
10
|
-
| lsp | `
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
7
|
+
| formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `.prettierrc.json5`, `.prettierrc.yaml`, `.prettierrc.yml`, `.prettierrc.toml`, `.prettierrc.js`, `.prettierrc.cjs`, `.prettierrc.mjs`, `prettier.config.js`, `prettier.config.cjs`, `prettier.config.mjs`, `prettier.config.ts`, `prettier.config.mts`, `prettier.config.cts`, `package.json: prettier` | [Official docs](https://prettier.io/docs/) |
|
|
8
|
+
| formatter | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts` | [Official docs](https://oxc.rs/docs/guide/usage/formatter.html) |
|
|
9
|
+
| linter | `htmlhint` | `.htmlhintrc` | [Official docs](https://htmlhint.com/) |
|
|
10
|
+
| lsp | `angular-language-server` | `angular.json` | [Official docs](https://github.com/angular/vscode-ng-language-service) |
|
|
11
|
+
| lsp | `vscode-html-language-server` | `package.json` | [Official docs](https://github.com/microsoft/vscode-html-languageservice) |
|
|
@@ -16,6 +16,15 @@ This reference is generated from doctor contributions. Edit the owning plugin ca
|
|
|
16
16
|
- [PHP](./php.md)
|
|
17
17
|
- [Swift](./swift.md)
|
|
18
18
|
- [Lua](./lua.md)
|
|
19
|
+
- [Dart](./dart.md)
|
|
20
|
+
- [PowerShell](./powershell.md)
|
|
21
|
+
- [R](./r.md)
|
|
22
|
+
- [Scala](./scala.md)
|
|
23
|
+
- [Elixir](./elixir.md)
|
|
24
|
+
- [Zig](./zig.md)
|
|
25
|
+
- [Julia](./julia.md)
|
|
26
|
+
- [Vue](./vue.md)
|
|
27
|
+
- [Svelte](./svelte.md)
|
|
19
28
|
- [Shell](./shell.md)
|
|
20
29
|
- [HTML](./html.md)
|
|
21
30
|
- [CSS](./css.md)
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Detected extensions: `.js`, `.jsx`, `.mjs`, `.cjs`.
|
|
4
4
|
|
|
5
|
-
| Kind | Tool | Detection
|
|
6
|
-
| --------- | ---------------------------- |
|
|
7
|
-
| formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `prettier.config.js`
|
|
8
|
-
| formatter | `biome` | `biome.json`, `biome.jsonc`
|
|
9
|
-
| formatter | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts`
|
|
10
|
-
| linter | `eslint` | `eslint.config.js`, `eslint.config.mjs`, `.eslintrc.json`
|
|
11
|
-
| linter | `oxlint` | `.oxlintrc.json`, `.oxlintrc.jsonc`, `oxlint.config.ts`, `oxlint.config.mts`
|
|
12
|
-
| lsp | `typescript-language-server` | `tsconfig.json`, `jsconfig.json`, `package.json`
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
7
|
+
| formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `.prettierrc.json5`, `.prettierrc.yaml`, `.prettierrc.yml`, `.prettierrc.toml`, `.prettierrc.js`, `.prettierrc.cjs`, `.prettierrc.mjs`, `prettier.config.js`, `prettier.config.cjs`, `prettier.config.mjs`, `prettier.config.ts`, `prettier.config.mts`, `prettier.config.cts`, `package.json: prettier` | [Official docs](https://prettier.io/docs/) |
|
|
8
|
+
| formatter | `biome` | `biome.json`, `biome.jsonc` | [Official docs](https://biomejs.dev/) |
|
|
9
|
+
| formatter | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts` | [Official docs](https://oxc.rs/docs/guide/usage/formatter.html) |
|
|
10
|
+
| linter | `eslint` | `eslint.config.js`, `eslint.config.mjs`, `eslint.config.cjs`, `eslint.config.ts`, `eslint.config.mts`, `eslint.config.cts`, `.eslintrc`, `.eslintrc.json`, `.eslintrc.js`, `.eslintrc.cjs`, `.eslintrc.yaml`, `.eslintrc.yml` | [Official docs](https://eslint.org/docs/latest/) |
|
|
11
|
+
| linter | `oxlint` | `.oxlintrc.json`, `.oxlintrc.jsonc`, `oxlint.config.ts`, `oxlint.config.mts` | [Official docs](https://oxc.rs/docs/guide/usage/linter.html) |
|
|
12
|
+
| lsp | `typescript-language-server` | `tsconfig.json`, `jsconfig.json`, `package.json` | [Official docs](https://github.com/typescript-language-server/typescript-language-server) |
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Detected extensions: `.json`, `.jsonc`.
|
|
4
4
|
|
|
5
|
-
| Kind | Tool | Detection
|
|
6
|
-
| --------- | ----------------------------- |
|
|
7
|
-
| formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `prettier.config.js`
|
|
8
|
-
| formatter | `biome` | `biome.json`, `biome.jsonc`
|
|
9
|
-
| formatter | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts`
|
|
10
|
-
| linter | `jsonlint` |
|
|
11
|
-
| lsp | `vscode-json-language-server` | `package.json`
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
7
|
+
| formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `.prettierrc.json5`, `.prettierrc.yaml`, `.prettierrc.yml`, `.prettierrc.toml`, `.prettierrc.js`, `.prettierrc.cjs`, `.prettierrc.mjs`, `prettier.config.js`, `prettier.config.cjs`, `prettier.config.mjs`, `prettier.config.ts`, `prettier.config.mts`, `prettier.config.cts`, `package.json: prettier` | [Official docs](https://prettier.io/docs/) |
|
|
8
|
+
| formatter | `biome` | `biome.json`, `biome.jsonc` | [Official docs](https://biomejs.dev/) |
|
|
9
|
+
| formatter | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts` | [Official docs](https://oxc.rs/docs/guide/usage/formatter.html) |
|
|
10
|
+
| linter | `jsonlint` | `.jsonlintrc`, `.jsonlintrc.json`, `.jsonlintrc.yaml`, `.jsonlintrc.yml`, `.jsonlintrc.js`, `.jsonlintrc.cjs`, `jsonlint.config.js`, `jsonlint.config.cjs` | [Official docs](https://github.com/prantlf/jsonlint) |
|
|
11
|
+
| lsp | `vscode-json-language-server` | `package.json` | [Official docs](https://github.com/microsoft/vscode-json-languageservice) |
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Julia
|
|
2
|
+
|
|
3
|
+
Detected extensions: `.jl`.
|
|
4
|
+
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | ----------------------- | -------------------------------------- | ------------------------------------------------------------------ |
|
|
7
|
+
| formatter | `julia-format` | `.JuliaFormatter.toml`, `Project.toml` | [Official docs](https://github.com/domluna/JuliaFormatter.jl) |
|
|
8
|
+
| lsp | `julia-language-server` | `Project.toml`, `JuliaProject.toml` | [Official docs](https://github.com/julia-vscode/LanguageServer.jl) |
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Detected extensions: `.kt`, `.kts`.
|
|
4
4
|
|
|
5
|
-
| Kind | Tool | Detection
|
|
6
|
-
| --------- | ------------------------ |
|
|
7
|
-
| formatter | `ktlint-format` | `.editorconfig`, `build.gradle.kts`
|
|
8
|
-
| linter | `detekt` | `detekt.yml`, `build.gradle.kts`
|
|
9
|
-
| lsp | `kotlin-language-server` | `build.gradle.kts`, `pom.xml`
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | ------------------------ | -------------------------------------------------------------------- | --------------------------------------------------------------- |
|
|
7
|
+
| formatter | `ktlint-format` | `.editorconfig`, `build.gradle.kts` | [Official docs](https://pinterest.github.io/ktlint/) |
|
|
8
|
+
| linter | `detekt` | `detekt.yml`, `build.gradle.kts` | [Official docs](https://detekt.dev/) |
|
|
9
|
+
| lsp | `kotlin-language-server` | `build.gradle.kts`, `pom.xml` | [Official docs](https://github.com/fwcd/kotlin-language-server) |
|
|
10
|
+
| lsp | `kotlin-lsp` | `build.gradle.kts`, `build.gradle`, `pom.xml`, `settings.gradle.kts` | [Official docs](https://github.com/Kotlin/kotlin-lsp) |
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Detected extensions: `.md`, `.mdx`.
|
|
4
4
|
|
|
5
|
-
| Kind | Tool | Detection
|
|
6
|
-
| --------- | -------------- |
|
|
7
|
-
| formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `prettier.config.js`
|
|
8
|
-
| formatter | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts`
|
|
9
|
-
| linter | `markdownlint` | `.markdownlint.json`, `.markdownlint.yaml`
|
|
10
|
-
| lsp | `marksman` | `.marksman.toml`
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
|
|
7
|
+
| formatter | `prettier` | `.prettierrc`, `.prettierrc.json`, `.prettierrc.json5`, `.prettierrc.yaml`, `.prettierrc.yml`, `.prettierrc.toml`, `.prettierrc.js`, `.prettierrc.cjs`, `.prettierrc.mjs`, `prettier.config.js`, `prettier.config.cjs`, `prettier.config.mjs`, `prettier.config.ts`, `prettier.config.mts`, `prettier.config.cts`, `package.json: prettier` | [Official docs](https://prettier.io/docs/) |
|
|
8
|
+
| formatter | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts` | [Official docs](https://oxc.rs/docs/guide/usage/formatter.html) |
|
|
9
|
+
| linter | `markdownlint` | `.markdownlint.json`, `.markdownlint.yaml` | [Official docs](https://github.com/DavidAnson/markdownlint) |
|
|
10
|
+
| lsp | `marksman` | `.marksman.toml` | [Official docs](https://github.com/artempyanykh/marksman) |
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# PowerShell
|
|
2
|
+
|
|
3
|
+
Detected extensions: `.ps1`, `.psm1`, `.psd1`.
|
|
4
|
+
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | ---------------------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
7
|
+
| formatter | `powershell-format` | `PSScriptAnalyzerSettings.psd1` | [Official docs](https://learn.microsoft.com/powershell/module/psscriptanalyzer/invoke-formatter) |
|
|
8
|
+
| linter | `psscriptanalyzer` | `PSScriptAnalyzerSettings.psd1` | [Official docs](https://learn.microsoft.com/powershell/module/psscriptanalyzer/invoke-scriptanalyzer) |
|
|
9
|
+
| lsp | `powershell-editor-services` | `PSScriptAnalyzerSettings.psd1` | [Official docs](https://github.com/PowerShell/PowerShellEditorServices) |
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Detected extensions: `.py`, `.pyi`.
|
|
4
4
|
|
|
5
|
-
| Kind | Tool | Detection
|
|
6
|
-
| --------- | -------------- |
|
|
7
|
-
| formatter | `ruff-format` | `
|
|
8
|
-
| formatter | `black` | `pyproject.toml`
|
|
9
|
-
| linter | `ruff` | `pyproject.toml`, `ruff.toml`, `.ruff.toml`
|
|
10
|
-
| lsp | `basedpyright` | `pyproject.toml`, `pyrightconfig.json`
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | -------------- | ------------------------------------------------------ | ------------------------------------------------------- |
|
|
7
|
+
| formatter | `ruff-format` | `ruff.toml`, `.ruff.toml`, `pyproject.toml: tool.ruff` | [Official docs](https://docs.astral.sh/ruff/formatter/) |
|
|
8
|
+
| formatter | `black` | `pyproject.toml: tool.black` | [Official docs](https://black.readthedocs.io/) |
|
|
9
|
+
| linter | `ruff` | `pyproject.toml`, `ruff.toml`, `.ruff.toml` | [Official docs](https://docs.astral.sh/ruff/) |
|
|
10
|
+
| lsp | `basedpyright` | `pyproject.toml`, `pyrightconfig.json` | [Official docs](https://docs.basedpyright.com/) |
|