pi-agent-ide 0.1.1 → 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 +53 -0
- package/README.md +11 -5
- package/dist/chunk-266RH77Z.js +1 -0
- package/dist/chunk-2SKAED2I.js +2 -0
- package/dist/chunk-2XYXV5HS.js +4 -0
- package/dist/chunk-2ZMYT6ZC.js +1 -0
- package/dist/chunk-34ZQTTU2.js +2 -0
- package/dist/chunk-3H2EU7VQ.js +0 -0
- package/dist/chunk-3YK4XMWB.js +0 -0
- package/dist/chunk-4SQQKEVD.js +16 -0
- package/dist/chunk-5BWUVAR4.js +1 -0
- package/dist/chunk-6DN7NO7L.js +1 -0
- package/dist/chunk-6SMFVLTY.js +1 -0
- package/dist/chunk-6XQQBKPE.js +58 -0
- package/dist/chunk-BYWAG6X3.js +6 -0
- package/dist/chunk-DEP55R35.js +1 -0
- package/dist/chunk-E2RESHYR.js +1 -0
- package/dist/chunk-EEH4WYI7.js +1 -0
- package/dist/chunk-EI7MMDWY.js +1 -0
- package/dist/chunk-ERVMDQGX.js +1 -0
- package/dist/chunk-EW2KVKCN.js +2 -0
- package/dist/chunk-F6SESI3P.js +4 -0
- package/dist/chunk-GTK5AREE.js +2 -0
- package/dist/chunk-HOBTFFQR.js +1 -0
- package/dist/chunk-IMVCVPMP.js +3 -0
- package/dist/chunk-IOCABSRL.js +1 -0
- package/dist/chunk-JASLOB2X.js +1 -0
- package/dist/chunk-JMVDFOTQ.js +1 -0
- package/dist/chunk-K4ZMRDEI.js +0 -0
- package/dist/chunk-KH5KPBCR.js +10 -0
- package/dist/chunk-KINKBPPX.js +1 -0
- package/dist/chunk-KNMWCDDK.js +7 -0
- package/dist/chunk-KYVOMBO5.js +1 -0
- package/dist/chunk-KZBAJFCV.js +1 -0
- package/dist/chunk-L4FA6OD4.js +1 -0
- package/dist/chunk-LFV6G5Z3.js +1 -0
- package/dist/chunk-LGN7EJYR.js +13 -0
- package/dist/chunk-MB6VVVAF.js +2 -0
- package/dist/chunk-MBUXFKIW.js +3 -0
- package/dist/chunk-MTQSGWZJ.js +1 -0
- package/dist/chunk-MTTKFJV6.js +1 -0
- package/dist/chunk-N34ATN52.js +1 -0
- package/dist/chunk-NI2NK4JU.js +1 -0
- package/dist/chunk-NNCZYO4Q.js +0 -0
- package/dist/chunk-NXHPO7ER.js +6 -0
- package/dist/chunk-OBWZ5RYN.js +1 -0
- package/dist/chunk-OFHVDY4Q.js +2 -0
- package/dist/chunk-OIL6BB2S.js +33 -0
- package/dist/chunk-ONWUJXUR.js +1 -0
- package/dist/chunk-ORAPGW7W.js +1 -0
- package/dist/chunk-OVUYPHDE.js +1 -0
- package/dist/chunk-PETQCA7G.js +1 -0
- package/dist/chunk-PODWLGNO.js +6 -0
- package/dist/chunk-QZANC2IG.js +1 -0
- package/dist/chunk-SJYDLHEF.js +108 -0
- package/dist/chunk-SMSIT3CE.js +3 -0
- package/dist/chunk-SSZB66C3.js +3 -0
- package/dist/chunk-STUZZM5B.js +1 -0
- package/dist/chunk-T2RPMEM2.js +1 -0
- package/dist/chunk-TG6H6EOI.js +1 -0
- package/dist/chunk-UTTW55S2.js +1 -0
- package/dist/chunk-VCCMVQXU.js +1 -0
- package/dist/chunk-VEJGSURY.js +8 -0
- package/dist/chunk-VFBLX4TG.js +1 -0
- package/dist/chunk-VSP2QQPQ.js +2 -0
- package/dist/chunk-W3XYKJ5H.js +1 -0
- package/dist/chunk-WZI4YC2O.js +1 -0
- package/dist/chunk-XGUAL3CA.js +1 -0
- package/dist/chunk-XNXQYPVT.js +10 -0
- package/dist/chunk-YHUTTZC6.js +2 -0
- package/dist/chunk-YPHXLAQF.js +1 -0
- package/dist/chunk-ZC65Z3CK.js +1 -0
- package/dist/chunk-ZIHEF6K3.js +3 -0
- package/dist/entry-0.js +1 -0
- package/dist/entry-1.js +1 -0
- package/dist/entry-10.js +1 -0
- package/dist/entry-11.js +1 -0
- package/dist/entry-12.js +1 -0
- package/dist/entry-13.js +1 -0
- package/dist/entry-14.js +1 -0
- package/dist/entry-16.js +1 -0
- package/dist/entry-17.js +1 -0
- package/dist/entry-18.js +1 -0
- package/dist/entry-19.js +1 -0
- package/dist/entry-2.js +1 -0
- package/dist/entry-20.js +1 -0
- package/dist/entry-21.js +1 -0
- package/dist/entry-22.js +1 -0
- package/dist/entry-23.js +1 -0
- package/dist/entry-24.js +1 -0
- package/dist/entry-25.js +1 -0
- package/dist/entry-26.js +1 -0
- package/dist/entry-27.js +1 -0
- package/dist/entry-28.js +1 -0
- package/dist/entry-29.js +1 -0
- package/dist/entry-3.js +1 -0
- package/dist/entry-30.js +1 -0
- package/dist/entry-31.js +1 -0
- package/dist/entry-32.js +1 -0
- package/dist/entry-33.js +1 -0
- package/dist/entry-34.js +1 -0
- package/dist/entry-35.js +1 -0
- package/dist/entry-36.js +1 -0
- package/dist/entry-37.js +1 -0
- package/dist/entry-38.js +1 -0
- package/dist/entry-39.js +1 -0
- package/dist/entry-4.js +1 -0
- package/dist/entry-40.js +1 -0
- package/dist/entry-41.js +1 -0
- package/dist/entry-42.js +1 -0
- package/dist/entry-43.js +1 -0
- package/dist/entry-44.js +1 -0
- package/dist/entry-45.js +1 -0
- package/dist/entry-46.js +1 -0
- package/dist/entry-47.js +1 -0
- package/dist/entry-48.js +1 -0
- package/dist/entry-49.js +1 -0
- package/dist/entry-5.js +1 -0
- package/dist/entry-50.js +1 -0
- package/dist/entry-51.js +1 -0
- package/dist/entry-52.js +1 -0
- package/dist/entry-53.js +1 -0
- package/dist/entry-54.js +0 -0
- package/dist/entry-55.js +1 -0
- package/dist/entry-56.js +0 -0
- package/dist/entry-57.js +1 -0
- package/dist/entry-58.js +1 -0
- package/dist/entry-59.js +1 -0
- package/dist/entry-6.js +1 -0
- package/dist/entry-60.js +1 -0
- package/dist/entry-61.js +1 -0
- package/dist/entry-62.js +1 -0
- package/dist/entry-63.js +0 -0
- package/dist/entry-64.js +1 -0
- package/dist/entry-65.js +0 -0
- package/dist/entry-66.js +1 -0
- package/dist/entry-67.js +1 -0
- package/dist/entry-68.js +1 -0
- package/dist/entry-69.js +1 -0
- package/dist/entry-7.js +1 -0
- package/dist/entry-70.js +1 -0
- package/dist/entry-71.js +1 -0
- package/dist/entry-72.js +1 -0
- package/dist/entry-73.js +1 -0
- package/dist/entry-74.js +1 -0
- package/dist/entry-75.js +1 -0
- package/dist/entry-76.js +1 -0
- package/dist/entry-77.js +1 -0
- package/dist/entry-78.js +1 -0
- package/dist/entry-79.js +1 -0
- package/dist/entry-8.js +1 -0
- package/dist/entry-80.js +1 -0
- package/dist/entry-9.js +1 -0
- package/dist/pi-agent-ide.js +13 -0
- package/docs/architecture.md +21 -17
- package/docs/configuration.md +180 -52
- package/docs/development.md +105 -5
- package/docs/extensions.md +64 -4
- 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 -6
- 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 -5
- package/docs/generated/tool-catalog/index.md +9 -0
- package/docs/generated/tool-catalog/javascript.md +8 -6
- package/docs/generated/tool-catalog/json.md +7 -6
- 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 -5
- 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/toml.md +6 -5
- package/docs/generated/tool-catalog/typescript.md +9 -6
- package/docs/generated/tool-catalog/vue.md +9 -0
- package/docs/generated/tool-catalog/yaml.md +6 -5
- package/docs/generated/tool-catalog/zig.md +9 -0
- package/docs/tools.md +88 -6
- package/node_modules/pi-agent-doctor/package.json +15 -5
- package/node_modules/pi-agent-doctor/runtime/entry-16.js +1 -0
- package/node_modules/pi-agent-doctor/runtime/entry-17.js +1 -0
- package/node_modules/pi-agent-doctor/runtime/entry-18.js +1 -0
- package/node_modules/pi-agent-doctor/runtime/entry-19.js +1 -0
- 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 +85 -6
- package/node_modules/pi-agent-doctor/src/plugin-protocol.ts +30 -4
- package/node_modules/pi-agent-filesystem/index.ts +4 -3
- package/node_modules/pi-agent-filesystem/package.json +7 -7
- package/node_modules/pi-agent-filesystem/runtime/entry-21.js +2 -0
- package/node_modules/pi-agent-filesystem-image/package.json +4 -4
- package/node_modules/pi-agent-filesystem-image/runtime/entry-22.js +2 -0
- package/node_modules/pi-agent-filesystem-pdf/package.json +4 -4
- package/node_modules/pi-agent-filesystem-pdf/runtime/entry-23.js +2 -0
- 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 -10
- package/node_modules/pi-agent-ide-ast/runtime/entry-25.js +1 -0
- package/node_modules/pi-agent-ide-ast/runtime/entry-26.js +2 -0
- package/node_modules/pi-agent-ide-ast/src/api/scope.ts +1 -1
- package/node_modules/pi-agent-ide-ast/src/ast/manager.ts +3 -0
- package/node_modules/pi-agent-ide-ast/src/ast/outline.ts +4 -1
- package/node_modules/pi-agent-ide-ast/src/doctor-plugin.ts +25 -0
- package/node_modules/pi-agent-ide-ast/src/extension.ts +13 -5
- package/node_modules/pi-agent-ide-ast/src/scope-resolver.ts +6 -0
- package/node_modules/pi-agent-ide-changes/index.ts +6 -2
- package/node_modules/pi-agent-ide-changes/package.json +8 -7
- package/node_modules/pi-agent-ide-changes/runtime/entry-27.js +1 -0
- package/node_modules/pi-agent-ide-changes/runtime/entry-28.js +2 -0
- package/node_modules/pi-agent-ide-changes/src/change-anchor.ts +6 -0
- package/node_modules/pi-agent-ide-changes/src/changes/change-groups.ts +1 -1
- package/node_modules/pi-agent-ide-changes/src/changes/change-service.ts +1 -1
- package/node_modules/pi-agent-ide-changes/src/changes/git-changes-backend.ts +1 -0
- package/node_modules/pi-agent-ide-changes/src/current-change-presenter.ts +1 -1
- package/node_modules/pi-agent-ide-changes/src/doctor-plugin.ts +31 -1
- package/node_modules/pi-agent-ide-changes/src/tool-index-change.ts +5 -0
- package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +7 -0
- package/node_modules/pi-agent-ide-formatter/package.json +4 -4
- package/node_modules/pi-agent-ide-formatter/runtime/entry-29.js +2 -0
- package/node_modules/pi-agent-ide-formatter/src/catalog.ts +165 -13
- package/node_modules/pi-agent-ide-formatter/src/doctor-plugin.ts +115 -63
- package/node_modules/pi-agent-ide-formatter/src/registry.ts +86 -31
- package/node_modules/pi-agent-ide-languages/package.json +3 -3
- package/node_modules/pi-agent-ide-languages/runtime/entry-30.js +2 -0
- package/node_modules/pi-agent-ide-languages/src/languages.ts +15 -0
- package/node_modules/pi-agent-ide-lint/index.ts +30 -155
- package/node_modules/pi-agent-ide-lint/package.json +8 -7
- package/node_modules/pi-agent-ide-lint/runtime/entry-31.js +2 -0
- package/node_modules/pi-agent-ide-lint/src/catalog.ts +210 -41
- package/node_modules/pi-agent-ide-lint/src/command-linter.ts +80 -4
- package/node_modules/pi-agent-ide-lint/src/diagnostics.ts +76 -34
- package/node_modules/pi-agent-ide-lint/src/doctor-plugin.ts +115 -64
- package/node_modules/pi-agent-ide-lint/src/registry.ts +87 -30
- package/node_modules/pi-agent-ide-lsp/index.ts +35 -134
- package/node_modules/pi-agent-ide-lsp/package.json +9 -8
- 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/code-view-resolvers.ts +1 -1
- package/node_modules/pi-agent-ide-lsp/src/diagnostic-source.ts +110 -0
- package/node_modules/pi-agent-ide-lsp/src/doctor-plugin.ts +108 -55
- package/node_modules/pi-agent-ide-lsp/src/lsp/client.ts +248 -38
- package/node_modules/pi-agent-ide-lsp/src/lsp/code-views.ts +2 -1
- package/node_modules/pi-agent-ide-lsp/src/lsp/diagnostic-adapters.ts +76 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/diagnostics.ts +137 -144
- 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/lsp-compiler.ts +2 -2
- package/node_modules/pi-agent-ide-lsp/src/lsp/manager.ts +17 -36
- package/node_modules/pi-agent-ide-lsp/src/lsp/registry.ts +139 -68
- package/node_modules/pi-agent-ide-lsp/src/lsp/symbol-search.ts +1 -0
- 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 +13 -6
- package/node_modules/pi-agent-ide-lsp/src/search-resolver.ts +5 -5
- package/node_modules/pi-agent-image/package.json +3 -3
- package/node_modules/pi-agent-image/runtime/entry-33.js +1 -0
- package/node_modules/pi-agent-invariant/package.json +12 -0
- package/node_modules/pi-agent-invariant/runtime/entry-34.js +1 -0
- package/node_modules/pi-agent-pdf/package.json +3 -3
- package/node_modules/pi-agent-pdf/runtime/entry-35.js +1 -0
- package/node_modules/pi-agent-pdf/src/pdf-converter.ts +3 -2
- package/node_modules/pi-agent-read/package.json +11 -9
- package/node_modules/pi-agent-read/runtime/entry-36.js +1 -0
- package/node_modules/pi-agent-read/runtime/entry-37.js +1 -0
- package/node_modules/pi-agent-read/runtime/entry-38.js +1 -0
- package/node_modules/pi-agent-read/runtime/entry-39.js +1 -0
- package/node_modules/pi-agent-read/runtime/entry-40.js +2 -0
- package/node_modules/pi-agent-read/src/api/plugin-protocol.ts +1 -1
- package/node_modules/pi-agent-read/src/api/tools/read.ts +113 -2
- package/node_modules/pi-agent-read/src/core/extension.ts +19 -0
- package/node_modules/pi-agent-read/src/core/read-core.ts +85 -13
- package/node_modules/pi-agent-read/src/core/tools/read/output-truncation.ts +26 -10
- package/node_modules/pi-agent-read/src/core/tools/read/persisted-result.ts +72 -0
- package/node_modules/pi-agent-read/src/core/tools/read/read-renderer.ts +102 -12
- package/node_modules/pi-agent-read/src/core/tools/read/read-result.ts +27 -3
- package/node_modules/pi-agent-read/src/core/tools/read/views.ts +29 -0
- package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +532 -46
- package/node_modules/pi-agent-resource/package.json +5 -2
- package/node_modules/pi-agent-resource/runtime/entry-41.js +1 -0
- package/node_modules/pi-agent-resource/src/content-conversion/content-converter.ts +1 -1
- package/node_modules/pi-agent-resource/src/content-conversion/content-host.ts +1 -1
- package/node_modules/pi-agent-resource/src/content-conversion/content-runner.ts +1 -1
- package/node_modules/pi-agent-resource/src/content-conversion/validation.ts +1 -1
- package/node_modules/pi-agent-search/package.json +7 -6
- package/node_modules/pi-agent-search/runtime/entry-42.js +1 -0
- package/node_modules/pi-agent-search/runtime/entry-43.js +1 -0
- package/node_modules/pi-agent-search/runtime/entry-44.js +1 -0
- package/node_modules/pi-agent-search/runtime/entry-45.js +2 -0
- package/node_modules/pi-agent-search/src/api/search.ts +4 -0
- package/node_modules/pi-agent-search/src/core/extension.ts +99 -27
- package/node_modules/pi-agent-search/src/core/search-config.ts +98 -0
- package/node_modules/pi-agent-search/src/core/search-core.ts +32 -28
- package/node_modules/pi-agent-search/src/core/search-timeout.ts +54 -0
- package/node_modules/pi-agent-search-text/index.ts +53 -3
- package/node_modules/pi-agent-search-text/package.json +9 -9
- package/node_modules/pi-agent-search-text/runtime/entry-46.js +2 -0
- package/node_modules/pi-agent-search-text/runtime/entry-47.js +1 -0
- package/node_modules/pi-agent-search-text/src/doctor-plugin.ts +20 -1
- package/node_modules/pi-agent-search-text/src/persisted-result.ts +56 -0
- package/node_modules/pi-agent-search-text/src/resolvers.ts +36 -34
- package/node_modules/pi-agent-search-text/src/search-query.ts +254 -71
- package/node_modules/pi-agent-search-text/src/search-recipe.ts +68 -0
- package/node_modules/pi-agent-search-text/src/search-renderer.ts +71 -117
- package/node_modules/pi-agent-search-text/src/search-result.ts +1 -0
- package/node_modules/pi-agent-search-text/src/search-session.ts +276 -110
- package/node_modules/pi-agent-text/package.json +6 -3
- package/node_modules/pi-agent-text/runtime/entry-48.js +1 -0
- package/node_modules/pi-agent-text/src/index.ts +23 -0
- package/node_modules/pi-agent-text/src/stored-text.ts +14 -0
- package/node_modules/pi-agent-text/src/text-anchor.ts +160 -16
- package/node_modules/pi-agent-text/src/text-document.ts +26 -5
- package/node_modules/pi-agent-text/src/text-target.ts +105 -0
- package/node_modules/pi-agent-text-anchor-constant/package.json +7 -4
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-49.js +2 -0
- package/node_modules/pi-agent-text-anchor-constant/src/resolver.ts +6 -0
- package/node_modules/pi-agent-text-anchor-exact/index.ts +34 -0
- package/node_modules/pi-agent-text-anchor-exact/package.json +27 -0
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-50.js +1 -0
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-51.js +2 -0
- package/node_modules/pi-agent-text-anchor-exact/src/anchor.ts +230 -0
- package/node_modules/pi-agent-text-anchor-exact/src/config.ts +159 -0
- package/node_modules/pi-agent-text-anchor-exact/src/fuzzy-worker.ts +100 -0
- package/node_modules/pi-agent-text-anchor-exact/src/recovery.ts +151 -0
- package/node_modules/pi-agent-text-anchor-line-hash/index.ts +8 -2
- package/node_modules/pi-agent-text-anchor-line-hash/package.json +10 -6
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-52.js +1 -0
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-53.js +2 -0
- package/node_modules/pi-agent-text-anchor-line-hash/src/anchor.ts +32 -1
- package/node_modules/pi-agent-text-anchor-line-hash/src/read-handler.ts +20 -12
- package/node_modules/pi-agent-text-editor/package.json +22 -21
- package/node_modules/pi-agent-text-editor/runtime/entry-54.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-55.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-56.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-57.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-58.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-59.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-60.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-61.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-62.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-63.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-64.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-65.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-66.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-67.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-68.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-69.js +2 -0
- package/node_modules/pi-agent-text-editor/src/api/anchor-inspection.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/api/mutation-result.ts +1 -0
- package/node_modules/pi-agent-text-editor/src/api/mutation-tool.ts +38 -0
- package/node_modules/pi-agent-text-editor/src/api/plugin-protocol.ts +30 -15
- package/node_modules/pi-agent-text-editor/src/api/text-selection-anchor.ts +10 -13
- package/node_modules/pi-agent-text-editor/src/api/tool-call-interceptor.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/builtin-edit-filter.ts +12 -5
- package/node_modules/pi-agent-text-editor/src/core/extension.ts +15 -1
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/agent-diff.ts +14 -10
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/diff.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +3 -2
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +19 -2
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/final-state-fragment.ts +64 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/inline-hints.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/read-fragment-resolver.ts +83 -0
- package/node_modules/pi-agent-text-editor/src/core/text-anchor-registry.ts +96 -8
- package/node_modules/pi-agent-text-editor/src/core/text-change-engine.ts +4 -1
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +194 -35
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch.ts +43 -13
- package/node_modules/pi-agent-text-editor/src/core/text-editor-config.ts +95 -0
- package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +75 -5
- package/node_modules/pi-agent-text-editor/src/core/text-mutation-anchor-error.ts +7 -0
- package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +541 -130
- package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +5 -9
- package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/rendering.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/tools/text-selection.ts +228 -6
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-copy.ts +50 -70
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-delete.ts +25 -26
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-insert.ts +30 -21
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-move.ts +57 -71
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +30 -27
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-write.ts +2 -0
- package/node_modules/pi-agent-text-editor-argument-order/package.json +3 -3
- package/node_modules/pi-agent-text-editor-argument-order/runtime/entry-70.js +2 -0
- package/node_modules/pi-agent-text-editor-overwrite/index.ts +1 -1
- package/node_modules/pi-agent-text-editor-overwrite/package.json +4 -3
- package/node_modules/pi-agent-text-editor-overwrite/runtime/entry-71.js +2 -0
- package/node_modules/pi-agent-text-editor-renderer/index.ts +21 -1
- package/node_modules/pi-agent-text-editor-renderer/package.json +6 -3
- package/node_modules/pi-agent-text-editor-renderer/runtime/entry-72.js +2 -0
- package/node_modules/pi-agent-text-editor-renderer/src/animation-pressure.ts +50 -0
- package/node_modules/pi-agent-text-editor-renderer/src/config.ts +73 -0
- package/node_modules/pi-agent-text-editor-renderer/src/diff-model.ts +1 -1
- package/node_modules/pi-agent-text-editor-renderer/src/diff-renderer.ts +77 -22
- package/node_modules/pi-agent-text-editor-renderer/src/diff-theme.ts +1 -1
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-panel.ts +140 -24
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-projection.ts +274 -43
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-result.ts +33 -6
- package/node_modules/pi-agent-text-editor-renderer/src/persisted-result.ts +47 -0
- package/node_modules/pi-agent-text-editor-renderer/src/render-resource.ts +7 -0
- package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +265 -105
- package/node_modules/pi-agent-text-editor-renderer/src/typing-interpolation.ts +96 -15
- package/node_modules/pi-agent-text-editor-stale-anchor/index.ts +22 -6
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +5 -4
- 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 +5 -2
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-74.js +1 -0
- package/node_modules/pi-agent-tool-call-interception/src/index.ts +175 -32
- package/node_modules/pi-agent-tool-ui/package.json +15 -0
- package/node_modules/pi-agent-tool-ui/runtime/entry-75.js +1 -0
- package/node_modules/pi-agent-tool-ui/src/index.ts +318 -0
- package/node_modules/pi-agent-web/index.ts +16 -6
- package/node_modules/pi-agent-web/package.json +8 -6
- package/node_modules/pi-agent-web/runtime/entry-76.js +2 -0
- package/node_modules/pi-agent-web/src/browser-loader.ts +180 -0
- package/node_modules/pi-agent-web/src/doctor-plugin.ts +41 -0
- package/node_modules/pi-agent-web/src/resolver.ts +128 -24
- package/node_modules/pi-agent-web-html/package.json +6 -3
- package/node_modules/pi-agent-web-html/runtime/entry-77.js +2 -0
- package/node_modules/pi-agent-web-html/src/extract-readable-html.ts +19 -6
- package/node_modules/pi-agent-web-image/package.json +4 -4
- package/node_modules/pi-agent-web-image/runtime/entry-78.js +2 -0
- package/node_modules/pi-agent-web-pdf/package.json +4 -4
- package/node_modules/pi-agent-web-pdf/runtime/entry-79.js +2 -0
- 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 +68 -54
- package/src/api/code-view.ts +4 -0
- package/src/api/connect-tip-provider.ts +49 -0
- package/src/api/plugin-protocol.ts +41 -2
- package/src/api/tips.ts +77 -0
- package/src/api/tool-config/formatters.json +273 -0
- package/src/api/tool-config/linters.json +339 -0
- package/src/api/tool-config/lsp-servers.json +410 -0
- package/src/api/tool-config.ts +248 -12
- package/src/api/toolchain.ts +0 -5
- package/src/code-view/diagnostic-view.ts +121 -26
- package/src/code-view/source-view.ts +1 -1
- package/src/composite/builtin-extensions.ts +12 -6
- package/src/composite/extensions-config.ts +137 -0
- package/src/composite/selection.ts +58 -3
- package/src/core/diagnostic-store.ts +244 -0
- package/src/core/extension.ts +40 -0
- package/src/core/ide-core.ts +48 -3
- package/src/doctor/config-writer.ts +15 -2
- package/src/doctor/core.ts +47 -0
- package/src/doctor/discovery.ts +23 -70
- package/src/doctor/extension.ts +12 -1
- package/src/doctor/inventory.ts +24 -6
- package/src/doctor/run.ts +100 -87
- package/src/doctor/tip-provider.ts +92 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/index.ts +4 -3
- 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-image/runtime/entry-22.js +2 -0
- 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-pdf/runtime/entry-23.js +2 -0
- 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/index.ts +16 -6
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +8 -6
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +6 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-77.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/src/extract-readable-html.ts +19 -6
- 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-image/runtime/entry-78.js +2 -0
- 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-pdf/runtime/entry-79.js +2 -0
- 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/extensions/pi-agent-web/src/browser-loader.ts +180 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/doctor-plugin.ts +41 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/resolver.ts +128 -24
- package/src/extensions/pi-agent-read/package.json +11 -9
- package/src/extensions/pi-agent-read/runtime/entry-36.js +1 -0
- package/src/extensions/pi-agent-read/runtime/entry-37.js +1 -0
- package/src/extensions/pi-agent-read/runtime/entry-38.js +1 -0
- package/src/extensions/pi-agent-read/runtime/entry-39.js +1 -0
- package/src/extensions/pi-agent-read/runtime/entry-40.js +2 -0
- package/src/extensions/pi-agent-read/src/api/plugin-protocol.ts +1 -1
- package/src/extensions/pi-agent-read/src/api/tools/read.ts +113 -2
- package/src/extensions/pi-agent-read/src/core/extension.ts +19 -0
- package/src/extensions/pi-agent-read/src/core/read-core.ts +85 -13
- package/src/extensions/pi-agent-read/src/core/tools/read/output-truncation.ts +26 -10
- package/src/extensions/pi-agent-read/src/core/tools/read/persisted-result.ts +72 -0
- package/src/extensions/pi-agent-read/src/core/tools/read/read-renderer.ts +102 -12
- package/src/extensions/pi-agent-read/src/core/tools/read/read-result.ts +27 -3
- package/src/extensions/pi-agent-read/src/core/tools/read/views.ts +29 -0
- package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +532 -46
- package/src/extensions/pi-agent-search/package.json +7 -6
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +53 -3
- 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 +2 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-47.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/doctor-plugin.ts +20 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/persisted-result.ts +56 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/resolvers.ts +36 -34
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-query.ts +254 -71
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-recipe.ts +68 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-renderer.ts +71 -117
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-result.ts +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-session.ts +276 -110
- package/src/extensions/pi-agent-search/runtime/entry-42.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-43.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-44.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-45.js +2 -0
- package/src/extensions/pi-agent-search/src/api/search.ts +4 -0
- package/src/extensions/pi-agent-search/src/core/extension.ts +99 -27
- package/src/extensions/pi-agent-search/src/core/search-config.ts +98 -0
- package/src/extensions/pi-agent-search/src/core/search-core.ts +32 -28
- package/src/extensions/pi-agent-search/src/core/search-timeout.ts +54 -0
- package/src/extensions/pi-agent-text-editor/package.json +22 -21
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +7 -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-constant/src/resolver.ts +6 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/index.ts +34 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +27 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-50.js +1 -0
- 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-exact/src/anchor.ts +230 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/config.ts +159 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/fuzzy-worker.ts +100 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/recovery.ts +151 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/index.ts +8 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +10 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-52.js +1 -0
- 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-anchor-line-hash/src/anchor.ts +32 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/src/read-handler.ts +20 -12
- 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-argument-order/runtime/entry-70.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/index.ts +1 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/package.json +4 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/runtime/entry-71.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/index.ts +21 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +6 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-72.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/animation-pressure.ts +50 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/config.ts +73 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-model.ts +1 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-renderer.ts +77 -22
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-theme.ts +1 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-panel.ts +140 -24
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-projection.ts +274 -43
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-result.ts +33 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/persisted-result.ts +47 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/render-resource.ts +7 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +265 -105
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/typing-interpolation.ts +96 -15
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/index.ts +22 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +5 -4
- 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-54.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-55.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-56.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-57.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-58.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-59.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-60.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-61.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-62.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-63.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-64.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-65.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-66.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-67.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-68.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-69.js +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/anchor-inspection.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/mutation-result.ts +1 -0
- package/src/extensions/pi-agent-text-editor/src/api/mutation-tool.ts +38 -0
- package/src/extensions/pi-agent-text-editor/src/api/plugin-protocol.ts +30 -15
- package/src/extensions/pi-agent-text-editor/src/api/text-selection-anchor.ts +10 -13
- package/src/extensions/pi-agent-text-editor/src/api/tool-call-interceptor.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/builtin-edit-filter.ts +12 -5
- package/src/extensions/pi-agent-text-editor/src/core/extension.ts +15 -1
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/agent-diff.ts +14 -10
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/diff.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +3 -2
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +19 -2
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/final-state-fragment.ts +64 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/inline-hints.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/read-fragment-resolver.ts +83 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-anchor-registry.ts +96 -8
- package/src/extensions/pi-agent-text-editor/src/core/text-change-engine.ts +4 -1
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +194 -35
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch.ts +43 -13
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-config.ts +95 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +75 -5
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation-anchor-error.ts +7 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +541 -130
- package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +5 -9
- package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/rendering.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/tools/text-selection.ts +228 -6
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-copy.ts +50 -70
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-delete.ts +25 -26
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-insert.ts +30 -21
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-move.ts +57 -71
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +30 -27
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-write.ts +2 -0
- package/src/pi-agent-ide.ts +15 -3
- package/src/plugins/pi-agent-ide-ast/package.json +11 -10
- package/src/plugins/pi-agent-ide-ast/runtime/entry-25.js +1 -0
- package/src/plugins/pi-agent-ide-ast/runtime/entry-26.js +2 -0
- package/src/plugins/pi-agent-ide-ast/src/api/scope.ts +1 -1
- package/src/plugins/pi-agent-ide-ast/src/ast/manager.ts +3 -0
- package/src/plugins/pi-agent-ide-ast/src/ast/outline.ts +4 -1
- package/src/plugins/pi-agent-ide-ast/src/doctor-plugin.ts +25 -0
- package/src/plugins/pi-agent-ide-ast/src/extension.ts +13 -5
- package/src/plugins/pi-agent-ide-ast/src/scope-resolver.ts +6 -0
- package/src/plugins/pi-agent-ide-changes/index.ts +6 -2
- package/src/plugins/pi-agent-ide-changes/package.json +8 -7
- package/src/plugins/pi-agent-ide-changes/runtime/entry-27.js +1 -0
- package/src/plugins/pi-agent-ide-changes/runtime/entry-28.js +2 -0
- package/src/plugins/pi-agent-ide-changes/src/change-anchor.ts +6 -0
- package/src/plugins/pi-agent-ide-changes/src/changes/change-groups.ts +1 -1
- package/src/plugins/pi-agent-ide-changes/src/changes/change-service.ts +1 -1
- package/src/plugins/pi-agent-ide-changes/src/changes/git-changes-backend.ts +1 -0
- package/src/plugins/pi-agent-ide-changes/src/current-change-presenter.ts +1 -1
- package/src/plugins/pi-agent-ide-changes/src/doctor-plugin.ts +31 -1
- package/src/plugins/pi-agent-ide-changes/src/tool-index-change.ts +5 -0
- package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +7 -0
- package/src/plugins/pi-agent-ide-diagnostics/index.ts +1 -0
- package/src/plugins/pi-agent-ide-diagnostics/src/extension.ts +199 -0
- package/src/plugins/pi-agent-ide-formatter/package.json +4 -4
- package/src/plugins/pi-agent-ide-formatter/runtime/entry-29.js +2 -0
- package/src/plugins/pi-agent-ide-formatter/src/catalog.ts +165 -13
- package/src/plugins/pi-agent-ide-formatter/src/doctor-plugin.ts +115 -63
- package/src/plugins/pi-agent-ide-formatter/src/registry.ts +86 -31
- package/src/plugins/pi-agent-ide-languages/package.json +3 -3
- package/src/plugins/pi-agent-ide-languages/runtime/entry-30.js +2 -0
- package/src/plugins/pi-agent-ide-languages/src/languages.ts +15 -0
- package/src/plugins/pi-agent-ide-lint/index.ts +30 -155
- package/src/plugins/pi-agent-ide-lint/package.json +8 -7
- package/src/plugins/pi-agent-ide-lint/runtime/entry-31.js +2 -0
- package/src/plugins/pi-agent-ide-lint/src/catalog.ts +210 -41
- package/src/plugins/pi-agent-ide-lint/src/command-linter.ts +80 -4
- package/src/plugins/pi-agent-ide-lint/src/diagnostics.ts +76 -34
- package/src/plugins/pi-agent-ide-lint/src/doctor-plugin.ts +115 -64
- package/src/plugins/pi-agent-ide-lint/src/registry.ts +87 -30
- package/src/plugins/pi-agent-ide-lsp/index.ts +35 -134
- package/src/plugins/pi-agent-ide-lsp/package.json +9 -8
- 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/code-view-resolvers.ts +1 -1
- package/src/plugins/pi-agent-ide-lsp/src/diagnostic-source.ts +110 -0
- package/src/plugins/pi-agent-ide-lsp/src/doctor-plugin.ts +108 -55
- package/src/plugins/pi-agent-ide-lsp/src/lsp/client.ts +248 -38
- package/src/plugins/pi-agent-ide-lsp/src/lsp/code-views.ts +2 -1
- package/src/plugins/pi-agent-ide-lsp/src/lsp/diagnostic-adapters.ts +76 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/diagnostics.ts +137 -144
- 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/lsp-compiler.ts +2 -2
- package/src/plugins/pi-agent-ide-lsp/src/lsp/manager.ts +17 -36
- package/src/plugins/pi-agent-ide-lsp/src/lsp/registry.ts +139 -68
- package/src/plugins/pi-agent-ide-lsp/src/lsp/symbol-search.ts +1 -0
- 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 +13 -6
- package/src/plugins/pi-agent-ide-lsp/src/search-resolver.ts +5 -5
- package/src/post-edit/gate.ts +17 -141
- package/src/tips/core.ts +86 -0
- package/src/tips/extension.ts +115 -0
- package/src/tips/persistence.ts +225 -0
- package/src/tips/tip-callout.ts +77 -0
- package/src/toolchain/registry.ts +8 -23
- package/src/toolchain/types.ts +8 -74
- package/node_modules/pi-agent-search-semantic/index.ts +0 -97
- package/node_modules/pi-agent-search-semantic/package.json +0 -17
- package/node_modules/pi-agent-search-text/src/lucene-query-parser.d.ts +0 -20
- package/node_modules/pi-agent-search-web/index.ts +0 -82
- package/node_modules/pi-agent-search-web/package.json +0 -20
- package/node_modules/pi-agent-search-web/src/config.ts +0 -560
- package/node_modules/pi-agent-search-web/src/doctor-plugin.ts +0 -40
- package/node_modules/pi-agent-search-web/src/providers/duckduckgo-html.ts +0 -74
- package/node_modules/pi-agent-search-web/src/providers/endpoints.ts +0 -81
- package/node_modules/pi-agent-search-web/src/providers/request.ts +0 -427
- package/node_modules/pi-agent-search-web/src/providers/response.ts +0 -353
- package/node_modules/pi-agent-search-web/src/search-format.ts +0 -24
- package/node_modules/pi-agent-search-web/src/search.ts +0 -376
- package/node_modules/pi-agent-search-web/src/types.ts +0 -141
- package/src/composite/config.ts +0 -100
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-semantic/index.ts +0 -97
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-semantic/package.json +0 -17
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/lucene-query-parser.d.ts +0 -20
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/index.ts +0 -82
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/package.json +0 -20
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/config.ts +0 -560
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/doctor-plugin.ts +0 -40
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/providers/duckduckgo-html.ts +0 -74
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/providers/endpoints.ts +0 -81
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/providers/request.ts +0 -427
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/providers/response.ts +0 -353
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/search-format.ts +0 -24
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/search.ts +0 -376
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-web/src/types.ts +0 -141
- package/src/toolchain/gate.ts +0 -305
- /package/{src/utils/required-value.ts → node_modules/pi-agent-invariant/src/index.ts} +0 -0
|
@@ -5,28 +5,87 @@ import type { DiagnosticFormat } from "pi-agent-ide/api/tool-config";
|
|
|
5
5
|
Linter recipes owned by the lint plugin.
|
|
6
6
|
*/
|
|
7
7
|
export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
8
|
+
recipe(
|
|
9
|
+
"dart-analyze",
|
|
10
|
+
["dart"],
|
|
11
|
+
["dart"],
|
|
12
|
+
["analysis_options.yaml", "pubspec.yaml"],
|
|
13
|
+
[".dart"],
|
|
14
|
+
["dart", "analyze", "--format", "machine", "{file}"],
|
|
15
|
+
"regex",
|
|
16
|
+
"https://dart.dev/tools/dart-analyze",
|
|
17
|
+
"^(?<severity>[^|]+)\\|[^|]+\\|(?<code>[^|]+)\\|(?<file>[^|]+)\\|(?<line>\\d+)\\|(?<column>\\d+)\\|\\d+\\|(?<message>.*)$",
|
|
18
|
+
undefined,
|
|
19
|
+
[0, 1, 2, 3],
|
|
20
|
+
),
|
|
21
|
+
recipe(
|
|
22
|
+
"zig-ast-check",
|
|
23
|
+
["zig"],
|
|
24
|
+
["zig"],
|
|
25
|
+
["build.zig", "build.zig.zon", "zls.json"],
|
|
26
|
+
[".zig", ".zon"],
|
|
27
|
+
["zig", "ast-check", "{file}"],
|
|
28
|
+
"gcc",
|
|
29
|
+
"https://ziglang.org/documentation/master/",
|
|
30
|
+
),
|
|
31
|
+
recipe(
|
|
32
|
+
"lintr",
|
|
33
|
+
["r"],
|
|
34
|
+
["Rscript"],
|
|
35
|
+
[".lintr", "DESCRIPTION"],
|
|
36
|
+
[".r"],
|
|
37
|
+
["Rscript", "-e", "print(lintr::lint(commandArgs(TRUE)[1]))", "{file}"],
|
|
38
|
+
"regex",
|
|
39
|
+
"https://lintr.r-lib.org/",
|
|
40
|
+
"^(?<file>.+?):(?<line>\\d+):(?<column>\\d+): (?<severity>[^:]+): \\[(?<code>[^\\]]+)\\] (?<message>.*)$",
|
|
41
|
+
),
|
|
8
42
|
recipe(
|
|
9
43
|
"clang-tidy",
|
|
10
44
|
["c", "cpp"],
|
|
11
45
|
["clang-tidy"],
|
|
12
46
|
[".clang-tidy", "compile_commands.json"],
|
|
13
|
-
[".c", ".h", ".cc", ".cpp", ".cxx", ".hpp"],
|
|
47
|
+
[".c", ".h", ".cc", ".cpp", ".cxx", ".hh", ".hpp", ".hxx"],
|
|
14
48
|
["clang-tidy", "{file}"],
|
|
15
49
|
"clang",
|
|
16
50
|
"https://clang.llvm.org/extra/clang-tidy/",
|
|
17
51
|
),
|
|
18
52
|
recipe(
|
|
19
53
|
"eslint",
|
|
20
|
-
["javascript", "typescript"],
|
|
54
|
+
["javascript", "typescript", "vue", "svelte"],
|
|
21
55
|
["eslint"],
|
|
22
|
-
[
|
|
23
|
-
|
|
56
|
+
[
|
|
57
|
+
"eslint.config.js",
|
|
58
|
+
"eslint.config.mjs",
|
|
59
|
+
"eslint.config.cjs",
|
|
60
|
+
"eslint.config.ts",
|
|
61
|
+
"eslint.config.mts",
|
|
62
|
+
"eslint.config.cts",
|
|
63
|
+
".eslintrc",
|
|
64
|
+
".eslintrc.json",
|
|
65
|
+
".eslintrc.js",
|
|
66
|
+
".eslintrc.cjs",
|
|
67
|
+
".eslintrc.yaml",
|
|
68
|
+
".eslintrc.yml",
|
|
69
|
+
],
|
|
70
|
+
[".js", ".jsx", ".mjs", ".cjs", ".ts", ".tsx", ".mts", ".cts", ".vue", ".svelte"],
|
|
24
71
|
["eslint", "--format", "json", "{file}"],
|
|
25
72
|
"eslint-json",
|
|
26
73
|
"https://eslint.org/docs/latest/",
|
|
27
74
|
undefined,
|
|
28
75
|
["eslint"],
|
|
29
76
|
),
|
|
77
|
+
recipe(
|
|
78
|
+
"oxlint",
|
|
79
|
+
["javascript", "typescript"],
|
|
80
|
+
["oxlint"],
|
|
81
|
+
[".oxlintrc.json", ".oxlintrc.jsonc", "oxlint.config.ts", "oxlint.config.mts"],
|
|
82
|
+
[".js", ".jsx", ".mjs", ".cjs", ".ts", ".tsx", ".mts", ".cts"],
|
|
83
|
+
["oxlint", "--format", "sarif", "{file}"],
|
|
84
|
+
"sarif",
|
|
85
|
+
"https://oxc.rs/docs/guide/usage/linter.html",
|
|
86
|
+
undefined,
|
|
87
|
+
["oxlint"],
|
|
88
|
+
),
|
|
30
89
|
recipe(
|
|
31
90
|
"ruff",
|
|
32
91
|
["python"],
|
|
@@ -45,8 +104,15 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
45
104
|
["golangci-lint"],
|
|
46
105
|
[".golangci.yml", ".golangci.yaml", "go.mod"],
|
|
47
106
|
[".go"],
|
|
48
|
-
[
|
|
49
|
-
|
|
107
|
+
[
|
|
108
|
+
"golangci-lint",
|
|
109
|
+
"run",
|
|
110
|
+
"--output.text.path=",
|
|
111
|
+
"--output.checkstyle.path=stdout",
|
|
112
|
+
"--show-stats=false",
|
|
113
|
+
"./...",
|
|
114
|
+
],
|
|
115
|
+
"checkstyle",
|
|
50
116
|
"https://golangci-lint.run/",
|
|
51
117
|
),
|
|
52
118
|
recipe(
|
|
@@ -65,9 +131,12 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
65
131
|
["dotnet"],
|
|
66
132
|
[".editorconfig", "global.json"],
|
|
67
133
|
[".cs"],
|
|
68
|
-
["dotnet", "format", "--verify-no-changes"],
|
|
69
|
-
"
|
|
134
|
+
["dotnet", "format", "--verify-no-changes", "--include", "{relativeFile}"],
|
|
135
|
+
"regex",
|
|
70
136
|
"https://learn.microsoft.com/dotnet/core/tools/dotnet-format",
|
|
137
|
+
"^(?<file>.+)\\((?<line>\\d+),(?<column>\\d+)\\): (?<severity>error|warning) (?<code>[^:]+): (?<message>.*?)(?: \\[.*\\])?$",
|
|
138
|
+
undefined,
|
|
139
|
+
[0, 2],
|
|
71
140
|
),
|
|
72
141
|
recipe(
|
|
73
142
|
"checkstyle",
|
|
@@ -75,7 +144,7 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
75
144
|
["checkstyle"],
|
|
76
145
|
["checkstyle.xml", "pom.xml"],
|
|
77
146
|
[".java"],
|
|
78
|
-
["checkstyle", "-f", "xml", "{file}"],
|
|
147
|
+
["checkstyle", "-c", "checkstyle.xml", "-f", "xml", "{file}"],
|
|
79
148
|
"checkstyle",
|
|
80
149
|
"https://checkstyle.org/",
|
|
81
150
|
),
|
|
@@ -85,9 +154,12 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
85
154
|
["detekt"],
|
|
86
155
|
["detekt.yml", "build.gradle.kts"],
|
|
87
156
|
[".kt", ".kts"],
|
|
88
|
-
["detekt", "--input", "{file}"],
|
|
89
|
-
"
|
|
157
|
+
["detekt", "--input", "{file}", "--config", "detekt.yml"],
|
|
158
|
+
"regex",
|
|
90
159
|
"https://detekt.dev/",
|
|
160
|
+
"^(?<file>.+?):(?<line>\\d+):(?<column>\\d+): (?<message>.*?) \\[(?<code>[^\\]]+)\\]$",
|
|
161
|
+
undefined,
|
|
162
|
+
[0, 2],
|
|
91
163
|
),
|
|
92
164
|
recipe(
|
|
93
165
|
"rubocop",
|
|
@@ -96,8 +168,9 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
96
168
|
[".rubocop.yml", "Gemfile"],
|
|
97
169
|
[".rb", ".rake"],
|
|
98
170
|
["rubocop", "--format", "clang", "{file}"],
|
|
99
|
-
"
|
|
171
|
+
"regex",
|
|
100
172
|
"https://docs.rubocop.org/",
|
|
173
|
+
"^(?<file>.+?):(?<line>\\d+):(?<column>\\d+): (?<severity>[A-Z]): (?:\\[Correctable\\] )?(?<code>[^:]+): (?<message>.*)$",
|
|
101
174
|
),
|
|
102
175
|
recipe(
|
|
103
176
|
"phpcs",
|
|
@@ -105,9 +178,12 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
105
178
|
["phpcs"],
|
|
106
179
|
["phpcs.xml", "phpcs.xml.dist", "composer.json"],
|
|
107
180
|
[".php"],
|
|
108
|
-
["phpcs", "--report=
|
|
109
|
-
"
|
|
181
|
+
["phpcs", "--report=checkstyle", "{file}"],
|
|
182
|
+
"checkstyle",
|
|
110
183
|
"https://github.com/PHPCSStandards/PHP_CodeSniffer",
|
|
184
|
+
undefined,
|
|
185
|
+
undefined,
|
|
186
|
+
[0, 1, 2, 3],
|
|
111
187
|
),
|
|
112
188
|
recipe(
|
|
113
189
|
"swiftlint",
|
|
@@ -115,9 +191,58 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
115
191
|
["swiftlint"],
|
|
116
192
|
[".swiftlint.yml", "Package.swift"],
|
|
117
193
|
[".swift"],
|
|
118
|
-
["swiftlint", "lint", "--
|
|
119
|
-
"
|
|
194
|
+
["swiftlint", "lint", "--quiet", "--reporter", "checkstyle", "{file}"],
|
|
195
|
+
"checkstyle",
|
|
120
196
|
"https://github.com/realm/SwiftLint",
|
|
197
|
+
undefined,
|
|
198
|
+
undefined,
|
|
199
|
+
[0, 2],
|
|
200
|
+
),
|
|
201
|
+
recipe(
|
|
202
|
+
"scalafix",
|
|
203
|
+
["scala"],
|
|
204
|
+
["scalafix"],
|
|
205
|
+
[".scalafix.conf"],
|
|
206
|
+
[".scala", ".sc"],
|
|
207
|
+
["scalafix", "--check", "--files", "{file}"],
|
|
208
|
+
"gcc",
|
|
209
|
+
"https://scalacenter.github.io/scalafix/",
|
|
210
|
+
undefined,
|
|
211
|
+
undefined,
|
|
212
|
+
[0, 2, 64, 66],
|
|
213
|
+
),
|
|
214
|
+
recipe(
|
|
215
|
+
"credo",
|
|
216
|
+
["elixir"],
|
|
217
|
+
["mix"],
|
|
218
|
+
["mix.exs", ".credo.exs"],
|
|
219
|
+
[".ex", ".exs"],
|
|
220
|
+
["mix", "credo", "--strict", "--format", "flycheck", "--files-included", "{file}"],
|
|
221
|
+
"regex",
|
|
222
|
+
"https://hexdocs.pm/credo/",
|
|
223
|
+
"^(?<file>.+):(?<line>\\d+):(?<column>\\d+): (?<severity>[A-Z]): (?<message>.+)$",
|
|
224
|
+
undefined,
|
|
225
|
+
Array.from({ length: 32 }, (_value, index) => index),
|
|
226
|
+
),
|
|
227
|
+
recipe(
|
|
228
|
+
"psscriptanalyzer",
|
|
229
|
+
["powershell"],
|
|
230
|
+
["pwsh"],
|
|
231
|
+
["PSScriptAnalyzerSettings.psd1"],
|
|
232
|
+
[".ps1", ".psm1", ".psd1"],
|
|
233
|
+
[
|
|
234
|
+
"pwsh",
|
|
235
|
+
"-NoProfile",
|
|
236
|
+
"-NonInteractive",
|
|
237
|
+
"-CommandWithArgs",
|
|
238
|
+
'$ErrorActionPreference="Stop";$options=@{};if(Test-Path -LiteralPath PSScriptAnalyzerSettings.psd1){$options.Settings="PSScriptAnalyzerSettings.psd1"};Invoke-ScriptAnalyzer -Path $args[0] @options | ForEach-Object {"$($_.ScriptPath):$($_.Line):$($_.Column): $($_.Severity): $($_.Message) [$($_.RuleName)]"}',
|
|
239
|
+
"{file}",
|
|
240
|
+
],
|
|
241
|
+
"regex",
|
|
242
|
+
"https://learn.microsoft.com/powershell/module/psscriptanalyzer/invoke-scriptanalyzer",
|
|
243
|
+
"^(?<file>.+):(?<line>\\d+):(?<column>\\d+): (?<severity>\\w+): (?<message>.+) \\[(?<code>[^\\]]+)\\]$",
|
|
244
|
+
undefined,
|
|
245
|
+
[0],
|
|
121
246
|
),
|
|
122
247
|
recipe(
|
|
123
248
|
"luacheck",
|
|
@@ -125,9 +250,12 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
125
250
|
["luacheck"],
|
|
126
251
|
[".luacheckrc"],
|
|
127
252
|
[".lua"],
|
|
128
|
-
["luacheck", "--formatter", "plain", "{file}"],
|
|
129
|
-
"
|
|
253
|
+
["luacheck", "--formatter", "plain", "--codes", "--no-color", "{file}"],
|
|
254
|
+
"regex",
|
|
130
255
|
"https://github.com/lunarmodules/luacheck",
|
|
256
|
+
"^(?<file>.+):(?<line>\\d+):(?<column>\\d+): \\((?<code>(?<severity>[WE])\\d+)\\) (?<message>.+)$",
|
|
257
|
+
undefined,
|
|
258
|
+
[0, 1, 2],
|
|
131
259
|
),
|
|
132
260
|
recipe(
|
|
133
261
|
"shellcheck",
|
|
@@ -146,10 +274,11 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
146
274
|
["stylelint.config.js", ".stylelintrc.json"],
|
|
147
275
|
[".css", ".scss", ".sass", ".less"],
|
|
148
276
|
["stylelint", "--formatter", "compact", "{file}"],
|
|
149
|
-
"
|
|
277
|
+
"regex",
|
|
150
278
|
"https://stylelint.io/",
|
|
151
|
-
|
|
279
|
+
"^(?<file>.+): line (?<line>\\d+), col (?<column>\\d+), (?<severity>error|warning) - (?<message>.+) \\((?<code>[^)]+)\\)$",
|
|
152
280
|
["stylelint"],
|
|
281
|
+
[0, 2],
|
|
153
282
|
),
|
|
154
283
|
recipe(
|
|
155
284
|
"yamllint",
|
|
@@ -158,8 +287,9 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
158
287
|
[".yamllint", ".yamllint.yml"],
|
|
159
288
|
[".yaml", ".yml"],
|
|
160
289
|
["yamllint", "-f", "parsable", "{file}"],
|
|
161
|
-
"
|
|
290
|
+
"regex",
|
|
162
291
|
"https://yamllint.readthedocs.io/",
|
|
292
|
+
"^(?<file>.+?):(?<line>\\d+):(?<column>\\d+): \\[(?<severity>[^\\]]+)\\] (?<message>.*?) \\((?<code>[^)]+)\\)$",
|
|
163
293
|
),
|
|
164
294
|
recipe(
|
|
165
295
|
"markdownlint",
|
|
@@ -168,8 +298,9 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
168
298
|
[".markdownlint.json", ".markdownlint.yaml"],
|
|
169
299
|
[".md", ".mdx"],
|
|
170
300
|
["markdownlint", "{file}"],
|
|
171
|
-
"
|
|
301
|
+
"regex",
|
|
172
302
|
"https://github.com/DavidAnson/markdownlint",
|
|
303
|
+
"^(?<file>.+?):(?<line>\\d+)(?::(?<column>\\d+))? (?<severity>error|warning) (?<code>MD\\d+)(?:/\\S+)? (?<message>.*)$",
|
|
173
304
|
),
|
|
174
305
|
recipe(
|
|
175
306
|
"sqlfluff",
|
|
@@ -177,8 +308,8 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
177
308
|
["sqlfluff"],
|
|
178
309
|
[".sqlfluff", "pyproject.toml"],
|
|
179
310
|
[".sql"],
|
|
180
|
-
["sqlfluff", "lint", "--format", "
|
|
181
|
-
"
|
|
311
|
+
["sqlfluff", "lint", "--format", "sarif", "{file}"],
|
|
312
|
+
"sarif",
|
|
182
313
|
"https://docs.sqlfluff.com/",
|
|
183
314
|
),
|
|
184
315
|
recipe(
|
|
@@ -186,10 +317,15 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
186
317
|
["dockerfile"],
|
|
187
318
|
["hadolint"],
|
|
188
319
|
[".hadolint.yaml"],
|
|
189
|
-
["
|
|
190
|
-
["hadolint", "--format", "
|
|
191
|
-
"
|
|
320
|
+
[".dockerfile"],
|
|
321
|
+
["hadolint", "--format", "checkstyle", "{file}"],
|
|
322
|
+
"checkstyle",
|
|
192
323
|
"https://github.com/hadolint/hadolint",
|
|
324
|
+
undefined,
|
|
325
|
+
undefined,
|
|
326
|
+
[0, 1],
|
|
327
|
+
undefined,
|
|
328
|
+
["Dockerfile", "Containerfile"],
|
|
193
329
|
),
|
|
194
330
|
recipe(
|
|
195
331
|
"tflint",
|
|
@@ -197,9 +333,12 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
197
333
|
["tflint"],
|
|
198
334
|
[".tflint.hcl"],
|
|
199
335
|
[".tf"],
|
|
200
|
-
["tflint", "--format", "
|
|
201
|
-
"
|
|
336
|
+
["tflint", "--format", "checkstyle"],
|
|
337
|
+
"checkstyle",
|
|
202
338
|
"https://github.com/terraform-linters/tflint",
|
|
339
|
+
undefined,
|
|
340
|
+
undefined,
|
|
341
|
+
[0, 2],
|
|
203
342
|
),
|
|
204
343
|
recipe(
|
|
205
344
|
"cmake-lint",
|
|
@@ -208,8 +347,13 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
208
347
|
[".cmake-format.py", "CMakeLists.txt"],
|
|
209
348
|
[".cmake"],
|
|
210
349
|
["cmake-lint", "{file}"],
|
|
211
|
-
"
|
|
350
|
+
"regex",
|
|
212
351
|
"https://cmake-format.readthedocs.io/",
|
|
352
|
+
"^(?<file>.+?):(?<line>\\d+),(?<column>\\d+): \\[(?<code>(?<severity>[A-Z])\\d+)\\] (?<message>.*)$",
|
|
353
|
+
undefined,
|
|
354
|
+
[0, 1],
|
|
355
|
+
0,
|
|
356
|
+
["CMakeLists.txt"],
|
|
213
357
|
),
|
|
214
358
|
recipe(
|
|
215
359
|
"htmlhint",
|
|
@@ -217,19 +361,31 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
217
361
|
["htmlhint"],
|
|
218
362
|
[".htmlhintrc"],
|
|
219
363
|
[".html", ".htm"],
|
|
220
|
-
["htmlhint", "--format", "
|
|
221
|
-
"
|
|
364
|
+
["htmlhint", "--format", "checkstyle", "--nocolor", "{file}"],
|
|
365
|
+
"checkstyle",
|
|
222
366
|
"https://htmlhint.com/",
|
|
223
367
|
),
|
|
224
368
|
recipe(
|
|
225
369
|
"jsonlint",
|
|
226
370
|
["json"],
|
|
227
371
|
["jsonlint"],
|
|
228
|
-
[
|
|
229
|
-
|
|
372
|
+
[
|
|
373
|
+
".jsonlintrc",
|
|
374
|
+
".jsonlintrc.json",
|
|
375
|
+
".jsonlintrc.yaml",
|
|
376
|
+
".jsonlintrc.yml",
|
|
377
|
+
".jsonlintrc.js",
|
|
378
|
+
".jsonlintrc.cjs",
|
|
379
|
+
"jsonlint.config.js",
|
|
380
|
+
"jsonlint.config.cjs",
|
|
381
|
+
],
|
|
382
|
+
[".json"],
|
|
230
383
|
["jsonlint", "-q", "{file}"],
|
|
231
|
-
"
|
|
232
|
-
"https://github.com/
|
|
384
|
+
"regex",
|
|
385
|
+
"https://github.com/prantlf/jsonlint",
|
|
386
|
+
"^(?:Error: )?(?<message>Parse (?<severity>error) on line (?<line>\\d+)(?:, column (?<column>\\d+))?:[^\\n]*)$",
|
|
387
|
+
|
|
388
|
+
["@prantlf/jsonlint", "jsonlint"],
|
|
233
389
|
),
|
|
234
390
|
recipe(
|
|
235
391
|
"taplo-check",
|
|
@@ -237,9 +393,10 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
237
393
|
["taplo"],
|
|
238
394
|
["taplo.toml"],
|
|
239
395
|
[".toml"],
|
|
240
|
-
["taplo", "check", "{file}"],
|
|
241
|
-
"
|
|
396
|
+
["taplo", "check", "--colors", "never", "{file}"],
|
|
397
|
+
"regex",
|
|
242
398
|
"https://taplo.tamasfe.dev/",
|
|
399
|
+
"^(?<severity>error): (?<message>[^\\n]+)\\n\\s*┌─ (?<file>.+):(?<line>\\d+):(?<column>\\d+)",
|
|
243
400
|
),
|
|
244
401
|
recipe(
|
|
245
402
|
"xmllint",
|
|
@@ -248,8 +405,11 @@ export const LINTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
248
405
|
[".xmllintrc"],
|
|
249
406
|
[".xml", ".xsd", ".xsl"],
|
|
250
407
|
["xmllint", "--noout", "{file}"],
|
|
251
|
-
"
|
|
408
|
+
"regex",
|
|
252
409
|
"https://gnome.pages.gitlab.gnome.org/libxml2/xmllint.html",
|
|
410
|
+
"^(?<file>.+?):(?<line>\\d+): (?<severity>(?:parser |validity )?(?:error|warning)) : (?<message>.*)$",
|
|
411
|
+
undefined,
|
|
412
|
+
[0, 1, 2, 3, 4],
|
|
253
413
|
),
|
|
254
414
|
];
|
|
255
415
|
|
|
@@ -264,6 +424,10 @@ function recipe(
|
|
|
264
424
|
documentation: string,
|
|
265
425
|
pattern?: string,
|
|
266
426
|
dependencies?: readonly string[],
|
|
427
|
+
successExitCodes: readonly number[] = [0, 1],
|
|
428
|
+
|
|
429
|
+
columnBase?: 0 | 1,
|
|
430
|
+
fileNames?: readonly string[],
|
|
267
431
|
): ToolRecipe {
|
|
268
432
|
return {
|
|
269
433
|
id,
|
|
@@ -276,8 +440,13 @@ function recipe(
|
|
|
276
440
|
...(dependencies && { dependencies }),
|
|
277
441
|
linter: {
|
|
278
442
|
extensions,
|
|
279
|
-
|
|
280
|
-
|
|
443
|
+
...(fileNames && { fileNames }),
|
|
444
|
+
check: { command, successExitCodes },
|
|
445
|
+
diagnostics: {
|
|
446
|
+
format,
|
|
447
|
+
...(pattern && { pattern }),
|
|
448
|
+
...(columnBase !== undefined && { columnBase }),
|
|
449
|
+
},
|
|
281
450
|
},
|
|
282
451
|
};
|
|
283
452
|
}
|
|
@@ -1,9 +1,83 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
1
3
|
import { runConfiguredProcess } from "pi-agent-ide/api/tool-config";
|
|
2
4
|
|
|
3
5
|
import { parseDiagnostics } from "./diagnostics.js";
|
|
4
6
|
import { LintCommandRegistry } from "./registry.js";
|
|
5
7
|
|
|
6
|
-
import type {
|
|
8
|
+
import type { LinterCommandConfig, ProcessResult } from "pi-agent-ide/api/tool-config";
|
|
9
|
+
import type { Diagnostic, Linter, LintResult } from "pi-agent-ide/api/toolchain";
|
|
10
|
+
|
|
11
|
+
/** A lint result with a short failure reason for doctor reports. */
|
|
12
|
+
export interface ConfiguredLintResult extends LintResult {
|
|
13
|
+
readonly failure?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Runs one configured linter and turns launch or parser errors into a normal failed result.
|
|
18
|
+
*/
|
|
19
|
+
export async function runConfiguredLinter(
|
|
20
|
+
config: LinterCommandConfig,
|
|
21
|
+
context: {
|
|
22
|
+
readonly projectRoot: string;
|
|
23
|
+
readonly filePath: string;
|
|
24
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
25
|
+
|
|
26
|
+
readonly signal?: AbortSignal;
|
|
27
|
+
},
|
|
28
|
+
): Promise<ConfiguredLintResult> {
|
|
29
|
+
let result: ProcessResult;
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
result = await runConfiguredProcess(config.check, context);
|
|
33
|
+
} catch (error) {
|
|
34
|
+
return {
|
|
35
|
+
ok: false,
|
|
36
|
+
diagnostics: [],
|
|
37
|
+
failure: `command could not start: ${error instanceof Error ? error.message : String(error)}`,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const output =
|
|
42
|
+
config.diagnostics.format === "regex" || config.diagnostics.format === "clang"
|
|
43
|
+
? [result.stdout, result.stderr].filter((stream) => stream.trim().length > 0).join("\n")
|
|
44
|
+
: result.stdout.trim().length > 0
|
|
45
|
+
? result.stdout
|
|
46
|
+
: result.stderr;
|
|
47
|
+
let diagnostics: Diagnostic[];
|
|
48
|
+
|
|
49
|
+
try {
|
|
50
|
+
diagnostics = parseDiagnostics(output, config.diagnostics);
|
|
51
|
+
} catch {
|
|
52
|
+
return {
|
|
53
|
+
ok: false,
|
|
54
|
+
diagnostics: [],
|
|
55
|
+
failure: `invalid ${config.diagnostics.format} diagnostics: ${output.trim().slice(0, 200) || "empty command output"}`,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const ok = result.ok && (result.exitCode === 0 || diagnostics.length > 0);
|
|
60
|
+
|
|
61
|
+
const workingDirectory =
|
|
62
|
+
config.check.cwd === "file" ? path.dirname(context.filePath) : context.projectRoot;
|
|
63
|
+
diagnostics = diagnostics
|
|
64
|
+
.filter((diagnostic) => {
|
|
65
|
+
if (diagnostic.file === undefined) return true;
|
|
66
|
+
const file = diagnostic.file.startsWith("file:")
|
|
67
|
+
? fileURLToPath(diagnostic.file)
|
|
68
|
+
: diagnostic.file;
|
|
69
|
+
return path.resolve(workingDirectory, file) === path.resolve(context.filePath);
|
|
70
|
+
})
|
|
71
|
+
.map(({ file: _file, ...diagnostic }) => diagnostic);
|
|
72
|
+
return {
|
|
73
|
+
ok,
|
|
74
|
+
diagnostics,
|
|
75
|
+
...(!ok && {
|
|
76
|
+
failure:
|
|
77
|
+
result.stderr.trim().slice(0, 200) || `command exited with code ${String(result.exitCode)}`,
|
|
78
|
+
}),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
7
81
|
|
|
8
82
|
/**
|
|
9
83
|
Creates a linter backed by validated project commands.
|
|
@@ -24,9 +98,11 @@ export function createCommandLinter(registry: LintCommandRegistry): Linter {
|
|
|
24
98
|
|
|
25
99
|
const command =
|
|
26
100
|
fix === true && configured.fix !== undefined ? configured.fix : configured.check;
|
|
27
|
-
const result = await
|
|
28
|
-
|
|
29
|
-
|
|
101
|
+
const result = await runConfiguredLinter(
|
|
102
|
+
{ ...configured, check: command },
|
|
103
|
+
{ projectRoot: context.cwd, filePath },
|
|
104
|
+
);
|
|
105
|
+
return { ok: result.ok, diagnostics: result.diagnostics };
|
|
30
106
|
},
|
|
31
107
|
};
|
|
32
108
|
}
|