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
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# R
|
|
2
|
+
|
|
3
|
+
Detected extensions: `.r`.
|
|
4
|
+
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | ------------------- | ------------------------------------ | ----------------------------------------------------------------- |
|
|
7
|
+
| formatter | `styler` | `.Rprofile`, `DESCRIPTION` | [Official docs](https://styler.r-lib.org/) |
|
|
8
|
+
| linter | `lintr` | `.lintr`, `DESCRIPTION` | [Official docs](https://lintr.r-lib.org/) |
|
|
9
|
+
| lsp | `r-language-server` | `DESCRIPTION`, `.lintr`, `.Rprofile` | [Official docs](https://github.com/REditorSupport/languageserver) |
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Scala
|
|
2
|
+
|
|
3
|
+
Detected extensions: `.scala`, `.sc`.
|
|
4
|
+
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | ---------- | ------------------------------------ | -------------------------------------------------------- |
|
|
7
|
+
| formatter | `scalafmt` | `.scalafmt.conf` | [Official docs](https://scalameta.org/scalafmt/) |
|
|
8
|
+
| linter | `scalafix` | `.scalafix.conf` | [Official docs](https://scalacenter.github.io/scalafix/) |
|
|
9
|
+
| lsp | `metals` | `build.sbt`, `project.scala`, `.bsp` | [Official docs](https://scalameta.org/metals/) |
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Svelte
|
|
2
|
+
|
|
3
|
+
Detected extensions: `.svelte`.
|
|
4
|
+
|
|
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
|
+
| 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/) |
|
|
9
|
+
| lsp | `svelte-language-server` | `svelte.config.js`, `package.json` | [Official docs](https://github.com/sveltejs/language-tools/tree/master/packages/language-server) |
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Detected extensions: `.ts`, `.tsx`, `.mts`, `.cts`.
|
|
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 | `
|
|
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 | `angular-language-server` | `angular.json` | [Official docs](https://github.com/angular/vscode-ng-language-service) |
|
|
13
|
+
| lsp | `typescript-language-server` | `tsconfig.json`, `jsconfig.json`, `package.json` | [Official docs](https://github.com/typescript-language-server/typescript-language-server) |
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Vue
|
|
2
|
+
|
|
3
|
+
Detected extensions: `.vue`.
|
|
4
|
+
|
|
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
|
+
| 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/) |
|
|
9
|
+
| lsp | `vue-typescript-language-server` | `tsconfig.json` | [Official docs](https://github.com/vuejs/language-tools/tree/master/packages/typescript-plugin) |
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Detected extensions: `.yaml`, `.yml`.
|
|
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 | `yamllint` | `.yamllint`, `.yamllint.yml`
|
|
10
|
-
| lsp | `yaml-language-server` | `.yamllint`, `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 | `oxfmt` | `.oxfmtrc.json`, `.oxfmtrc.jsonc`, `oxfmt.config.ts`, `oxfmt.config.mts` | [Official docs](https://oxc.rs/docs/guide/usage/formatter.html) |
|
|
9
|
+
| linter | `yamllint` | `.yamllint`, `.yamllint.yml` | [Official docs](https://yamllint.readthedocs.io/) |
|
|
10
|
+
| lsp | `yaml-language-server` | `.yamllint`, `package.json` | [Official docs](https://github.com/redhat-developer/yaml-language-server) |
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Zig
|
|
2
|
+
|
|
3
|
+
Detected extensions: `.zig`, `.zon`.
|
|
4
|
+
|
|
5
|
+
| Kind | Tool | Detection | Documentation |
|
|
6
|
+
| --------- | --------------- | ---------------------------------------- | ---------------------------------------------------------- |
|
|
7
|
+
| formatter | `zig-format` | `build.zig`, `build.zig.zon`, `zls.json` | [Official docs](https://ziglang.org/documentation/master/) |
|
|
8
|
+
| linter | `zig-ast-check` | `build.zig`, `build.zig.zon`, `zls.json` | [Official docs](https://ziglang.org/documentation/master/) |
|
|
9
|
+
| lsp | `zls` | `build.zig`, `build.zig.zon`, `zls.json` | [Official docs](https://zigtools.org/zls/) |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-doctor",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -14,15 +14,22 @@
|
|
|
14
14
|
"types": "./src/connect-plugin.ts",
|
|
15
15
|
"default": "./runtime/entry-17.js"
|
|
16
16
|
},
|
|
17
|
+
"./api/evidence": {
|
|
18
|
+
"types": "./src/evidence.ts",
|
|
19
|
+
"default": "./runtime/entry-18.js"
|
|
20
|
+
},
|
|
17
21
|
"./api/executable": {
|
|
18
22
|
"types": "./src/executable.ts",
|
|
19
|
-
"default": "./runtime/entry-
|
|
23
|
+
"default": "./runtime/entry-19.js"
|
|
20
24
|
},
|
|
21
25
|
"./api/plugin-protocol": {
|
|
22
26
|
"types": "./src/plugin-protocol.ts",
|
|
23
|
-
"default": "./runtime/entry-
|
|
27
|
+
"default": "./runtime/entry-20.js"
|
|
24
28
|
}
|
|
25
29
|
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"cross-spawn": "^7.0.6"
|
|
32
|
+
},
|
|
26
33
|
"peerDependencies": {
|
|
27
34
|
"@earendil-works/pi-coding-agent": "*"
|
|
28
35
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../dist/entry-20.js";
|
|
@@ -33,23 +33,49 @@ export interface ToolRecipe {
|
|
|
33
33
|
readonly languages: readonly string[];
|
|
34
34
|
readonly executables: readonly string[];
|
|
35
35
|
readonly configFiles?: readonly string[];
|
|
36
|
+
|
|
37
|
+
/** Named TOML tables or JSON paths that identify a tool inside a shared config file. */
|
|
38
|
+
readonly configSections?: Readonly<Record<string, readonly string[]>>;
|
|
36
39
|
readonly dependencies?: readonly string[];
|
|
37
40
|
readonly documentation: string;
|
|
38
41
|
readonly conflicts?: readonly string[];
|
|
39
42
|
readonly formatter?: {
|
|
40
43
|
readonly extensions: readonly string[];
|
|
44
|
+
|
|
45
|
+
/** Exact basenames accepted in addition to the file extensions. */
|
|
46
|
+
readonly fileNames?: readonly string[];
|
|
41
47
|
readonly run: ProcessRecipe;
|
|
42
48
|
readonly output: "in-place" | "stdout";
|
|
43
49
|
};
|
|
44
50
|
readonly linter?: {
|
|
45
51
|
readonly extensions: readonly string[];
|
|
52
|
+
|
|
53
|
+
/** Exact basenames accepted in addition to the file extensions. */
|
|
54
|
+
readonly fileNames?: readonly string[];
|
|
46
55
|
readonly check: ProcessRecipe;
|
|
47
56
|
readonly fix?: ProcessRecipe;
|
|
48
|
-
readonly diagnostics: {
|
|
57
|
+
readonly diagnostics: {
|
|
58
|
+
readonly format: string;
|
|
59
|
+
readonly pattern?: string;
|
|
60
|
+
/** Native regex reporter column numbering, converted to one-based IDE positions. */
|
|
61
|
+
readonly columnBase?: 0 | 1;
|
|
62
|
+
};
|
|
49
63
|
};
|
|
50
64
|
readonly lsp?: {
|
|
51
65
|
readonly command: readonly string[];
|
|
52
66
|
readonly rootMarkers: readonly string[];
|
|
67
|
+
|
|
68
|
+
/** Limit selection to files below a matching native project marker. */
|
|
69
|
+
readonly requireRootMarker?: boolean;
|
|
70
|
+
|
|
71
|
+
/** Default language-server settings, sent through the LSP configuration protocol. */
|
|
72
|
+
readonly settings?: Readonly<Record<string, unknown>>;
|
|
73
|
+
|
|
74
|
+
/** Initialization data; string values can contain the {project} path placeholder. */
|
|
75
|
+
readonly initializationOptions?: Readonly<Record<string, unknown>>;
|
|
53
76
|
readonly languageIds: Readonly<Record<string, readonly string[]>>;
|
|
77
|
+
|
|
78
|
+
/** Exact basenames grouped by LSP language ID. */
|
|
79
|
+
readonly fileNames?: Readonly<Record<string, readonly string[]>>;
|
|
54
80
|
};
|
|
55
81
|
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { access, readFile, readdir } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
|
|
4
|
+
import type { ToolRecipe } from "./catalog.js";
|
|
5
|
+
|
|
6
|
+
/** Native project evidence shared by Doctor and runtime tool selection. */
|
|
7
|
+
export interface RecipeEvidence {
|
|
8
|
+
readonly score: number;
|
|
9
|
+
readonly config?: string;
|
|
10
|
+
readonly dependency?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Reads native config and declared dependencies without executing project code. */
|
|
14
|
+
export async function inspectRecipeEvidence(
|
|
15
|
+
cwd: string,
|
|
16
|
+
recipes: readonly ToolRecipe[],
|
|
17
|
+
): Promise<ReadonlyMap<string, RecipeEvidence>> {
|
|
18
|
+
const cache = new Map<string, Promise<string | undefined>>();
|
|
19
|
+
const content = (file: string): Promise<string | undefined> => {
|
|
20
|
+
let pending = cache.get(file);
|
|
21
|
+
if (pending === undefined) {
|
|
22
|
+
pending = readFile(path.join(cwd, file), "utf8").catch(() => undefined);
|
|
23
|
+
cache.set(file, pending);
|
|
24
|
+
}
|
|
25
|
+
return pending;
|
|
26
|
+
};
|
|
27
|
+
const manifest = parseJson(await content("package.json"));
|
|
28
|
+
const dependencies = new Set<string>();
|
|
29
|
+
for (const key of [
|
|
30
|
+
"dependencies",
|
|
31
|
+
"devDependencies",
|
|
32
|
+
"peerDependencies",
|
|
33
|
+
"optionalDependencies",
|
|
34
|
+
]) {
|
|
35
|
+
const section = manifest?.[key];
|
|
36
|
+
if (isRecord(section)) {
|
|
37
|
+
for (const name of Object.keys(section)) dependencies.add(name);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const entries = await Promise.all(
|
|
41
|
+
recipes.map(async (recipe) => {
|
|
42
|
+
let config: string | undefined;
|
|
43
|
+
for (const file of recipe.configFiles ?? []) {
|
|
44
|
+
if (await hasProjectMarker(cwd, file)) {
|
|
45
|
+
config = file;
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (config === undefined) {
|
|
50
|
+
for (const [file, sections] of Object.entries(recipe.configSections ?? {})) {
|
|
51
|
+
const raw = await content(file);
|
|
52
|
+
if (raw === undefined) continue;
|
|
53
|
+
const json = file.endsWith(".json") ? parseJson(raw) : undefined;
|
|
54
|
+
if (
|
|
55
|
+
sections.some((section) =>
|
|
56
|
+
json === undefined
|
|
57
|
+
? raw.split(/\r?\n/).some((line) => {
|
|
58
|
+
const table = /^\s*\[([^\]]+)\]/.exec(line)?.[1]?.trim();
|
|
59
|
+
return table === section || table?.startsWith(`${section}.`) === true;
|
|
60
|
+
})
|
|
61
|
+
: jsonSection(json, section) !== undefined,
|
|
62
|
+
)
|
|
63
|
+
) {
|
|
64
|
+
config = file;
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const dependency = recipe.dependencies?.find((name) => dependencies.has(name));
|
|
70
|
+
return [
|
|
71
|
+
recipe.id,
|
|
72
|
+
{
|
|
73
|
+
score: (config === undefined ? 0 : 6) + (dependency === undefined ? 0 : 4),
|
|
74
|
+
...(config !== undefined && { config }),
|
|
75
|
+
...(dependency !== undefined && { dependency }),
|
|
76
|
+
},
|
|
77
|
+
] as const;
|
|
78
|
+
}),
|
|
79
|
+
);
|
|
80
|
+
return new Map(entries);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Matches a root-relative native filename or glob, including named project files. */
|
|
84
|
+
export async function hasProjectMarker(cwd: string, marker: string): Promise<boolean> {
|
|
85
|
+
if (!marker.includes("*")) {
|
|
86
|
+
try {
|
|
87
|
+
await access(path.join(cwd, marker));
|
|
88
|
+
return true;
|
|
89
|
+
} catch {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
try {
|
|
94
|
+
const names = await readdir(cwd);
|
|
95
|
+
return names.some((name) => path.matchesGlob(name, marker));
|
|
96
|
+
} catch {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
102
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function parseJson(raw: string | undefined): Record<string, unknown> | undefined {
|
|
106
|
+
try {
|
|
107
|
+
const value: unknown = JSON.parse(raw ?? "");
|
|
108
|
+
return isRecord(value) ? value : undefined;
|
|
109
|
+
} catch {
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function jsonSection(value: Record<string, unknown>, section: string): unknown {
|
|
115
|
+
let current: unknown = value;
|
|
116
|
+
for (const key of section.split(".")) current = isRecord(current) ? current[key] : undefined;
|
|
117
|
+
return current;
|
|
118
|
+
}
|
|
@@ -1,35 +1,81 @@
|
|
|
1
|
-
import
|
|
1
|
+
import spawn from "cross-spawn";
|
|
2
2
|
|
|
3
3
|
import { constants } from "node:fs";
|
|
4
|
-
import { access } from "node:fs/promises";
|
|
4
|
+
import { access, stat } from "node:fs/promises";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
|
|
7
|
+
/** Common native project tool directories, in launch priority order. */
|
|
8
|
+
export function projectExecutableDirectories(cwd: string): readonly string[] {
|
|
9
|
+
const pythonBin = process.platform === "win32" ? "Scripts" : "bin";
|
|
10
|
+
return ["node_modules/.bin", `.venv/${pythonBin}`, `venv/${pythonBin}`, "vendor/bin"].map(
|
|
11
|
+
(directory) => path.resolve(cwd, directory),
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Normalize case-insensitive Windows environment keys before merging launch overrides. */
|
|
16
|
+
export function normalizeProcessEnvironment(environment: NodeJS.ProcessEnv): NodeJS.ProcessEnv {
|
|
17
|
+
if (process.platform !== "win32") return { ...environment };
|
|
18
|
+
return Object.fromEntries(
|
|
19
|
+
Object.entries(environment).map(([key, value]) => [key.toUpperCase(), value]),
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Prepend native project tools while preserving the platform's PATH key rules. */
|
|
24
|
+
export function projectProcessEnvironment(
|
|
25
|
+
cwd: string,
|
|
26
|
+
environment: NodeJS.ProcessEnv,
|
|
27
|
+
): NodeJS.ProcessEnv {
|
|
28
|
+
const effective = normalizeProcessEnvironment(environment);
|
|
29
|
+
effective.PATH = [...projectExecutableDirectories(cwd), effective.PATH]
|
|
30
|
+
.filter(Boolean)
|
|
31
|
+
.join(path.delimiter);
|
|
32
|
+
return effective;
|
|
33
|
+
}
|
|
34
|
+
|
|
7
35
|
/** Returns whether an executable is available without starting it. */
|
|
8
36
|
export async function isExecutableAvailable(
|
|
9
37
|
command: string,
|
|
10
38
|
cwd: string,
|
|
11
39
|
environment: NodeJS.ProcessEnv,
|
|
12
40
|
): Promise<boolean> {
|
|
13
|
-
const
|
|
41
|
+
const effective = projectProcessEnvironment(cwd, environment);
|
|
42
|
+
const locations =
|
|
14
43
|
path.isAbsolute(command) || path.dirname(command) !== "."
|
|
15
44
|
? [path.resolve(cwd, command)]
|
|
16
|
-
:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
45
|
+
: (effective.PATH ?? "")
|
|
46
|
+
.split(path.delimiter)
|
|
47
|
+
.filter(Boolean)
|
|
48
|
+
.map((directory) =>
|
|
49
|
+
path.join(
|
|
50
|
+
process.platform === "win32" ? directory.replace(/^"|"$/gu, "") : directory,
|
|
51
|
+
command,
|
|
52
|
+
),
|
|
53
|
+
);
|
|
54
|
+
const suffixes =
|
|
55
|
+
process.platform === "win32"
|
|
56
|
+
? [
|
|
57
|
+
...new Set(
|
|
58
|
+
(effective.PATHEXT ?? ".COM;.EXE;.BAT;.CMD")
|
|
59
|
+
.split(";")
|
|
60
|
+
.filter(Boolean)
|
|
61
|
+
.flatMap((suffix) => [suffix, suffix.toLowerCase()]),
|
|
62
|
+
),
|
|
63
|
+
]
|
|
64
|
+
: [];
|
|
65
|
+
const candidates = locations.flatMap((location) => [
|
|
66
|
+
location,
|
|
67
|
+
...suffixes.map((suffix) => `${location}${suffix}`),
|
|
68
|
+
]);
|
|
24
69
|
for (const candidate of candidates) {
|
|
25
70
|
try {
|
|
26
71
|
await access(candidate, constants.X_OK);
|
|
72
|
+
|
|
73
|
+
if (!(await stat(candidate)).isFile()) continue;
|
|
27
74
|
return true;
|
|
28
75
|
} catch {
|
|
29
76
|
// Try the next executable location.
|
|
30
77
|
}
|
|
31
78
|
}
|
|
32
|
-
|
|
33
79
|
return false;
|
|
34
80
|
}
|
|
35
81
|
|
|
@@ -48,7 +94,7 @@ export function probeExecutable(
|
|
|
48
94
|
return new Promise((resolve) => {
|
|
49
95
|
const child = spawn(command, arguments_, {
|
|
50
96
|
cwd,
|
|
51
|
-
env: environment,
|
|
97
|
+
env: projectProcessEnvironment(cwd, environment),
|
|
52
98
|
stdio: ["ignore", "pipe", "pipe"],
|
|
53
99
|
windowsHide: true,
|
|
54
100
|
});
|
|
@@ -66,10 +112,10 @@ export function probeExecutable(
|
|
|
66
112
|
resolve(ok ? { ok: true, detail } : { ok: false, detail });
|
|
67
113
|
};
|
|
68
114
|
|
|
69
|
-
child.stdout
|
|
70
|
-
child.stderr
|
|
71
|
-
child.stdout
|
|
72
|
-
child.stderr
|
|
115
|
+
child.stdout?.setEncoding("utf8");
|
|
116
|
+
child.stderr?.setEncoding("utf8");
|
|
117
|
+
child.stdout?.on("data", (chunk: string) => (stdout += chunk));
|
|
118
|
+
child.stderr?.on("data", (chunk: string) => (stderr += chunk));
|
|
73
119
|
child.once("error", (error) => finish(false, error.message));
|
|
74
120
|
child.once("close", (code) => {
|
|
75
121
|
const output = (stdout.trim() || stderr.trim()).split(/\r?\n/u)[0];
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-image": "0.2.
|
|
10
|
-
"pi-agent-read": "0.2.
|
|
11
|
-
"pi-agent-resource": "0.2.
|
|
12
|
-
"pi-agent-text": "0.2.
|
|
13
|
-
"pi-agent-text-editor": "0.2.
|
|
9
|
+
"pi-agent-image": "0.2.1",
|
|
10
|
+
"pi-agent-read": "0.2.1",
|
|
11
|
+
"pi-agent-resource": "0.2.1",
|
|
12
|
+
"pi-agent-text": "0.2.1",
|
|
13
|
+
"pi-agent-text-editor": "0.2.1"
|
|
14
14
|
},
|
|
15
15
|
"pi": {
|
|
16
16
|
"extensions": [
|
|
17
|
-
"./runtime/entry-
|
|
17
|
+
"./runtime/entry-21.js"
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-image",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#extension": "./index.ts"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-image": "0.2.
|
|
10
|
-
"pi-agent-resource": "0.2.
|
|
9
|
+
"pi-agent-image": "0.2.1",
|
|
10
|
+
"pi-agent-resource": "0.2.1"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
14
|
-
"./runtime/entry-
|
|
14
|
+
"./runtime/entry-22.js"
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-pdf",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-pdf": "0.2.
|
|
7
|
-
"pi-agent-resource": "0.2.
|
|
6
|
+
"pi-agent-pdf": "0.2.1",
|
|
7
|
+
"pi-agent-resource": "0.2.1"
|
|
8
8
|
},
|
|
9
9
|
"pi": {
|
|
10
10
|
"extensions": [
|
|
11
|
-
"./runtime/entry-
|
|
11
|
+
"./runtime/entry-23.js"
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-text",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#extension": "./index.ts"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-resource": "0.2.
|
|
10
|
-
"pi-agent-text": "0.2.
|
|
9
|
+
"pi-agent-resource": "0.2.1",
|
|
10
|
+
"pi-agent-text": "0.2.1"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
14
|
-
"./runtime/entry-
|
|
14
|
+
"./runtime/entry-24.js"
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-ast",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
"./api/scope": {
|
|
10
10
|
"types": "./src/api/scope.ts",
|
|
11
|
-
"default": "./runtime/entry-
|
|
11
|
+
"default": "./runtime/entry-25.js"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@tree-sitter-grammars/tree-sitter-toml": "^0.7.0",
|
|
16
16
|
"@tree-sitter-grammars/tree-sitter-yaml": "^0.7.1",
|
|
17
|
-
"pi-agent-doctor": "0.2.
|
|
18
|
-
"pi-agent-invariant": "0.2.
|
|
19
|
-
"pi-agent-read": "0.2.
|
|
20
|
-
"pi-agent-resource": "0.2.
|
|
21
|
-
"pi-agent-search": "0.2.
|
|
22
|
-
"pi-agent-text": "0.2.
|
|
23
|
-
"pi-agent-text-editor": "0.2.
|
|
17
|
+
"pi-agent-doctor": "0.2.1",
|
|
18
|
+
"pi-agent-invariant": "0.2.1",
|
|
19
|
+
"pi-agent-read": "0.2.1",
|
|
20
|
+
"pi-agent-resource": "0.2.1",
|
|
21
|
+
"pi-agent-search": "0.2.1",
|
|
22
|
+
"pi-agent-text": "0.2.1",
|
|
23
|
+
"pi-agent-text-editor": "0.2.1",
|
|
24
24
|
"tree-sitter-cpp": "^0.23.4",
|
|
25
25
|
"tree-sitter-javascript": "^0.25.0",
|
|
26
26
|
"tree-sitter-json": "^0.24.8",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
},
|
|
32
32
|
"pi": {
|
|
33
33
|
"extensions": [
|
|
34
|
-
"./runtime/entry-
|
|
34
|
+
"./runtime/entry-26.js"
|
|
35
35
|
]
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@earendil-works/pi-coding-agent": "*",
|
|
39
|
-
"pi-agent-ide": "0.2.
|
|
39
|
+
"pi-agent-ide": "0.2.1"
|
|
40
40
|
}
|
|
41
41
|
}
|