pi-agent-ide 0.2.0 → 0.2.2
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 +57 -0
- package/dist/{chunk-XNXQYPVT.js → chunk-4LUW26BX.js} +1 -1
- package/dist/{chunk-2ZMYT6ZC.js → chunk-4U6KGABH.js} +1 -1
- package/dist/chunk-4ZTEPMJO.js +14 -0
- package/dist/{chunk-KNMWCDDK.js → chunk-6ACQQBUY.js} +1 -1
- package/dist/chunk-76WHES5H.js +7 -0
- package/dist/chunk-BHSO2MDK.js +6 -0
- package/dist/chunk-BMOJTJJJ.js +3 -0
- package/dist/chunk-GFWDXTOB.js +4 -0
- package/dist/{chunk-VSP2QQPQ.js → chunk-GIRAEVUJ.js} +1 -1
- package/dist/chunk-JJVXUL5U.js +2 -0
- package/dist/chunk-KCEOTU5Z.js +3 -0
- package/dist/chunk-KVGQG43U.js +1 -0
- package/dist/{chunk-MTTKFJV6.js → chunk-LQYZG62K.js} +1 -1
- package/dist/chunk-N34ATN52.js +1 -0
- package/dist/{chunk-PETQCA7G.js → chunk-P6T3Q7LB.js} +1 -1
- package/dist/chunk-QIJMV2P2.js +2 -0
- package/dist/chunk-QJFRAMK7.js +2 -0
- package/dist/{chunk-2SKAED2I.js → chunk-RAZOACDD.js} +2 -2
- package/dist/chunk-RIGRP3FD.js +1 -0
- package/dist/chunk-S3ZPXWX7.js +2 -0
- package/dist/{chunk-266RH77Z.js → chunk-THSCUT2L.js} +1 -1
- package/dist/{chunk-EEH4WYI7.js → chunk-WNMGUALD.js} +1 -1
- package/dist/chunk-WZI4YC2O.js +1 -0
- package/dist/{chunk-5A25RATC.js → chunk-X6MPU7UO.js} +3 -3
- package/dist/{chunk-QNZVPFSP.js → chunk-XF5PVZOS.js} +1 -1
- package/dist/{chunk-SJYDLHEF.js → chunk-ZXN3TWWW.js} +1 -1
- package/dist/entry-0.js +1 -1
- package/dist/entry-10.js +1 -1
- package/dist/entry-11.js +1 -1
- package/dist/entry-13.js +1 -1
- package/dist/entry-14.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 +2 -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 +7 -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 +4 -1
- package/dist/entry-32.js +8 -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 +14 -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 +7 -1
- package/dist/entry-46.js +11 -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 +59 -1
- package/dist/entry-70.js +4 -1
- package/dist/entry-71.js +1 -1
- package/dist/entry-72.js +29 -1
- package/dist/entry-73.js +2 -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 +3 -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 +2 -13
- package/docs/configuration.md +57 -1
- package/docs/extensions.md +4 -2
- 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/docs/tools.md +1 -1
- 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/index.ts +2 -2
- 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 +92 -19
- package/node_modules/pi-agent-ide-ast/src/extension.ts +9 -14
- package/node_modules/pi-agent-ide-ast/src/overflow-handler.ts +60 -0
- package/node_modules/pi-agent-ide-ast/src/scope-resolver.ts +1 -1
- package/node_modules/pi-agent-ide-changes/index.ts +1 -5
- 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-changes/src/tool-index-change.ts +1 -7
- package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +1 -5
- 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/formatter.ts +12 -7
- 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/index.ts +4 -1
- 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/index.ts +1 -12
- 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 +10 -10
- package/node_modules/pi-agent-ide-lsp/src/doctor-plugin.ts +2 -4
- package/node_modules/pi-agent-ide-lsp/src/lsp/client.ts +162 -12
- 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-image/src/image-converter.ts +1 -1
- 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-pdf/src/pdf-converter.ts +1 -1
- 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-read/src/api/rendering.ts +3 -0
- package/node_modules/pi-agent-read/src/core/read-core.ts +6 -26
- package/node_modules/pi-agent-read/src/core/tools/read/native-resource-renderer.ts +74 -0
- package/node_modules/pi-agent-read/src/core/tools/read/read-renderer.ts +28 -7
- package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +35 -30
- package/node_modules/pi-agent-resource/package.json +2 -2
- package/node_modules/pi-agent-resource/src/content-conversion/content-description.ts +1 -8
- 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/src/core/extension.ts +7 -5
- package/node_modules/pi-agent-search/src/core/search-core.ts +10 -0
- package/node_modules/pi-agent-search-text/index.ts +42 -33
- 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-search-text/src/file-search.ts +9 -1
- package/node_modules/pi-agent-search-text/src/resolvers.ts +1 -1
- package/node_modules/pi-agent-search-text/src/search-recipe.ts +2 -0
- package/node_modules/pi-agent-search-text/src/search-session.ts +48 -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/src/text-converter.ts +1 -1
- 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/index.ts +2 -6
- 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/src/api/mutation-result.ts +3 -0
- package/node_modules/pi-agent-text-editor/src/api/post-edit.ts +71 -1
- package/node_modules/pi-agent-text-editor/src/core/builtin-edit-filter.ts +4 -12
- package/node_modules/pi-agent-text-editor/src/core/extension.ts +7 -9
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +27 -2
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +38 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/final-state-fragment.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/grouped-replacements.ts +81 -0
- package/node_modules/pi-agent-text-editor/src/core/text-anchor-registry.ts +5 -2
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +23 -0
- package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +5 -9
- package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +54 -14
- package/node_modules/pi-agent-text-editor/src/tools/text-selection.ts +45 -43
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-copy.ts +18 -8
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-delete.ts +7 -4
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-insert.ts +13 -5
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-move.ts +18 -8
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +9 -5
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-write.ts +2 -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/index.ts +5 -1
- package/node_modules/pi-agent-text-editor-renderer/package.json +6 -6
- package/node_modules/pi-agent-text-editor-renderer/src/diff-model.ts +7 -0
- package/node_modules/pi-agent-text-editor-renderer/src/diff-renderer.ts +1 -1
- package/node_modules/pi-agent-text-editor-renderer/src/diff-viewport.ts +11 -2
- package/node_modules/pi-agent-text-editor-renderer/src/frozen-viewport.ts +140 -52
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-panel.ts +52 -4
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-result.ts +53 -1
- package/node_modules/pi-agent-text-editor-renderer/src/persisted-result.ts +8 -2
- package/node_modules/pi-agent-text-editor-renderer/src/render-resource.ts +10 -0
- package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +5 -3
- 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-call-interception/src/index.ts +3 -0
- 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/index.ts +1 -6
- 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-html/src/html-converter.ts +1 -1
- 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/plugin-protocol.ts +2 -0
- package/src/api/text-editor.ts +7 -0
- 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 +60 -24
- package/src/code-view/diagnostic-view.ts +14 -10
- package/src/composite/builtin-extensions.ts +148 -66
- package/src/composite/extensions-config.ts +18 -0
- package/src/core/diagnostic-entry.ts +94 -0
- package/src/core/diagnostic-store.ts +43 -21
- package/src/core/extension.ts +39 -17
- 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/index.ts +2 -2
- 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/index.ts +1 -6
- 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-html/src/html-converter.ts +1 -1
- 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-read/src/api/rendering.ts +3 -0
- package/src/extensions/pi-agent-read/src/core/read-core.ts +6 -26
- package/src/extensions/pi-agent-read/src/core/tools/read/native-resource-renderer.ts +74 -0
- package/src/extensions/pi-agent-read/src/core/tools/read/read-renderer.ts +28 -7
- package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +35 -30
- package/src/extensions/pi-agent-search/package.json +7 -7
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +42 -33
- 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/plugins/pi-agent-search-text/src/file-search.ts +9 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/resolvers.ts +1 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-recipe.ts +2 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-session.ts +48 -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-search/src/core/extension.ts +7 -5
- package/src/extensions/pi-agent-search/src/core/search-core.ts +10 -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/index.ts +2 -6
- 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/index.ts +5 -1
- 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-renderer/src/diff-model.ts +7 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-renderer.ts +1 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-viewport.ts +11 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/frozen-viewport.ts +140 -52
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-panel.ts +52 -4
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-result.ts +53 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/persisted-result.ts +8 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/render-resource.ts +10 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +5 -3
- 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/extensions/pi-agent-text-editor/src/api/mutation-result.ts +3 -0
- package/src/extensions/pi-agent-text-editor/src/api/post-edit.ts +71 -1
- package/src/extensions/pi-agent-text-editor/src/core/builtin-edit-filter.ts +4 -12
- package/src/extensions/pi-agent-text-editor/src/core/extension.ts +7 -9
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +27 -2
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +38 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/final-state-fragment.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/grouped-replacements.ts +81 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-anchor-registry.ts +5 -2
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +23 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +5 -9
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +54 -14
- package/src/extensions/pi-agent-text-editor/src/tools/text-selection.ts +45 -43
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-copy.ts +18 -8
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-delete.ts +7 -4
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-insert.ts +13 -5
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-move.ts +18 -8
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +9 -5
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-write.ts +2 -1
- package/src/pi-agent-ide.ts +11 -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 +92 -19
- package/src/plugins/pi-agent-ide-ast/src/extension.ts +9 -14
- package/src/plugins/pi-agent-ide-ast/src/overflow-handler.ts +60 -0
- package/src/plugins/pi-agent-ide-ast/src/scope-resolver.ts +1 -1
- package/src/plugins/pi-agent-ide-changes/index.ts +1 -5
- 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-changes/src/tool-index-change.ts +1 -7
- package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +1 -5
- package/src/plugins/pi-agent-ide-diagnostics/src/extension.ts +1 -8
- 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/formatter.ts +12 -7
- 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/index.ts +4 -1
- 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/index.ts +1 -12
- 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 +10 -10
- package/src/plugins/pi-agent-ide-lsp/src/doctor-plugin.ts +2 -4
- package/src/plugins/pi-agent-ide-lsp/src/lsp/client.ts +162 -12
- 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/post-edit/gate.ts +44 -15
- package/src/toolchain/types.ts +4 -0
- package/dist/chunk-34ZQTTU2.js +0 -2
- package/dist/chunk-476MR2QB.js +0 -1
- package/dist/chunk-4KQOODGE.js +0 -13
- package/dist/chunk-4SQQKEVD.js +0 -16
- package/dist/chunk-52BM6J6I.js +0 -6
- package/dist/chunk-5BWUVAR4.js +0 -1
- package/dist/chunk-6DN7NO7L.js +0 -1
- package/dist/chunk-6SMFVLTY.js +0 -1
- package/dist/chunk-7NDBZ4WX.js +0 -1
- package/dist/chunk-AP7Z3VWC.js +0 -1
- package/dist/chunk-BYWAG6X3.js +0 -6
- package/dist/chunk-E4SECPF4.js +0 -1
- package/dist/chunk-EW2KVKCN.js +0 -2
- package/dist/chunk-F6SESI3P.js +0 -4
- package/dist/chunk-GTK5AREE.js +0 -2
- package/dist/chunk-HOBTFFQR.js +0 -1
- package/dist/chunk-IMVCVPMP.js +0 -3
- package/dist/chunk-IOCABSRL.js +0 -1
- package/dist/chunk-KP37XTDI.js +0 -1
- package/dist/chunk-KYVOMBO5.js +0 -1
- package/dist/chunk-LFV6G5Z3.js +0 -1
- package/dist/chunk-MB6VVVAF.js +0 -2
- package/dist/chunk-NI2NK4JU.js +0 -1
- package/dist/chunk-OIL6BB2S.js +0 -33
- package/dist/chunk-PODWLGNO.js +0 -6
- package/dist/chunk-QW5O42QJ.js +0 -2
- package/dist/chunk-SSZB66C3.js +0 -3
- package/dist/chunk-TG6H6EOI.js +0 -1
- package/dist/chunk-TNWYEXFG.js +0 -1
- package/dist/chunk-U4D6FT66.js +0 -1
- package/dist/chunk-VUNCBASK.js +0 -10
- package/dist/chunk-VWVLBOMU.js +0 -8
- package/dist/chunk-W3XYKJ5H.js +0 -1
- package/dist/chunk-XGUAL3CA.js +0 -1
- package/dist/chunk-YQTLJ5ZV.js +0 -58
- 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-read/src/core/tools/read/views.ts +0 -29
- 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-read/src/core/tools/read/views.ts +0 -29
- 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
|
@@ -7,12 +7,18 @@ const web = [
|
|
|
7
7
|
".cjs",
|
|
8
8
|
".ts",
|
|
9
9
|
".tsx",
|
|
10
|
+
".mts",
|
|
11
|
+
".cts",
|
|
10
12
|
".json",
|
|
11
13
|
".jsonc",
|
|
12
14
|
".css",
|
|
13
15
|
".scss",
|
|
14
16
|
".html",
|
|
15
17
|
".md",
|
|
18
|
+
".yaml",
|
|
19
|
+
".yml",
|
|
20
|
+
".vue",
|
|
21
|
+
".svelte",
|
|
16
22
|
];
|
|
17
23
|
|
|
18
24
|
const oxfmtExtensions = [
|
|
@@ -43,6 +49,33 @@ const oxfmtExtensions = [
|
|
|
43
49
|
Formatter recipes owned by the formatter plugin.
|
|
44
50
|
*/
|
|
45
51
|
export const FORMATTER_RECIPES: readonly ToolRecipe[] = [
|
|
52
|
+
recipe(
|
|
53
|
+
"dart-format",
|
|
54
|
+
["dart"],
|
|
55
|
+
["dart"],
|
|
56
|
+
["pubspec.yaml", "analysis_options.yaml"],
|
|
57
|
+
[".dart"],
|
|
58
|
+
["dart", "format", "{file}"],
|
|
59
|
+
"https://dart.dev/tools/dart-format",
|
|
60
|
+
),
|
|
61
|
+
recipe(
|
|
62
|
+
"zig-format",
|
|
63
|
+
["zig"],
|
|
64
|
+
["zig"],
|
|
65
|
+
["build.zig", "build.zig.zon", "zls.json"],
|
|
66
|
+
[".zig", ".zon"],
|
|
67
|
+
["zig", "fmt", "{file}"],
|
|
68
|
+
"https://ziglang.org/documentation/master/",
|
|
69
|
+
),
|
|
70
|
+
recipe(
|
|
71
|
+
"styler",
|
|
72
|
+
["r"],
|
|
73
|
+
["Rscript"],
|
|
74
|
+
[".Rprofile", "DESCRIPTION"],
|
|
75
|
+
[".r"],
|
|
76
|
+
["Rscript", "-e", "styler::style_file(commandArgs(TRUE)[1])", "{file}"],
|
|
77
|
+
"https://styler.r-lib.org/",
|
|
78
|
+
),
|
|
46
79
|
recipe(
|
|
47
80
|
"clang-format",
|
|
48
81
|
["c", "cpp"],
|
|
@@ -54,20 +87,37 @@ export const FORMATTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
54
87
|
),
|
|
55
88
|
recipe(
|
|
56
89
|
"prettier",
|
|
57
|
-
["javascript", "typescript", "html", "css", "json", "yaml", "markdown"],
|
|
90
|
+
["javascript", "typescript", "html", "css", "json", "yaml", "markdown", "vue", "svelte"],
|
|
58
91
|
["prettier"],
|
|
59
|
-
[
|
|
92
|
+
[
|
|
93
|
+
".prettierrc",
|
|
94
|
+
".prettierrc.json",
|
|
95
|
+
".prettierrc.json5",
|
|
96
|
+
".prettierrc.yaml",
|
|
97
|
+
".prettierrc.yml",
|
|
98
|
+
".prettierrc.toml",
|
|
99
|
+
".prettierrc.js",
|
|
100
|
+
".prettierrc.cjs",
|
|
101
|
+
".prettierrc.mjs",
|
|
102
|
+
"prettier.config.js",
|
|
103
|
+
"prettier.config.cjs",
|
|
104
|
+
"prettier.config.mjs",
|
|
105
|
+
"prettier.config.ts",
|
|
106
|
+
"prettier.config.mts",
|
|
107
|
+
"prettier.config.cts",
|
|
108
|
+
],
|
|
60
109
|
web,
|
|
61
110
|
["prettier", "--write", "{file}"],
|
|
62
111
|
"https://prettier.io/docs/",
|
|
63
112
|
["prettier"],
|
|
113
|
+
{ "package.json": ["prettier"] },
|
|
64
114
|
),
|
|
65
115
|
recipe(
|
|
66
116
|
"biome",
|
|
67
117
|
["javascript", "typescript", "json", "css"],
|
|
68
118
|
["biome"],
|
|
69
119
|
["biome.json", "biome.jsonc"],
|
|
70
|
-
|
|
120
|
+
[".js", ".jsx", ".mjs", ".cjs", ".ts", ".tsx", ".mts", ".cts", ".json", ".jsonc", ".css"],
|
|
71
121
|
["biome", "format", "--write", "{file}"],
|
|
72
122
|
"https://biomejs.dev/",
|
|
73
123
|
["@biomejs/biome"],
|
|
@@ -86,21 +136,23 @@ export const FORMATTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
86
136
|
"ruff-format",
|
|
87
137
|
["python"],
|
|
88
138
|
["ruff"],
|
|
89
|
-
["
|
|
139
|
+
["ruff.toml", ".ruff.toml"],
|
|
90
140
|
[".py", ".pyi"],
|
|
91
141
|
["ruff", "format", "{file}"],
|
|
92
142
|
"https://docs.astral.sh/ruff/formatter/",
|
|
93
143
|
["ruff"],
|
|
144
|
+
{ "pyproject.toml": ["tool.ruff"] },
|
|
94
145
|
),
|
|
95
146
|
recipe(
|
|
96
147
|
"black",
|
|
97
148
|
["python"],
|
|
98
149
|
["black"],
|
|
99
|
-
[
|
|
150
|
+
[],
|
|
100
151
|
[".py", ".pyi"],
|
|
101
152
|
["black", "--quiet", "{file}"],
|
|
102
153
|
"https://black.readthedocs.io/",
|
|
103
154
|
["black"],
|
|
155
|
+
{ "pyproject.toml": ["tool.black"] },
|
|
104
156
|
),
|
|
105
157
|
recipe(
|
|
106
158
|
"gofmt",
|
|
@@ -132,10 +184,10 @@ export const FORMATTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
132
184
|
recipe(
|
|
133
185
|
"csharpier",
|
|
134
186
|
["csharp"],
|
|
135
|
-
["
|
|
136
|
-
[".csharpierrc", ".csharpierrc.json"],
|
|
187
|
+
["csharpier"],
|
|
188
|
+
[".csharpierrc", ".csharpierrc.json", ".csharpierrc.yaml", ".csharpierrc.yml"],
|
|
137
189
|
[".cs"],
|
|
138
|
-
["
|
|
190
|
+
["csharpier", "format", "{file}"],
|
|
139
191
|
"https://csharpier.com/",
|
|
140
192
|
),
|
|
141
193
|
recipe(
|
|
@@ -162,7 +214,7 @@ export const FORMATTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
162
214
|
["rubocop"],
|
|
163
215
|
[".rubocop.yml", "Gemfile"],
|
|
164
216
|
[".rb", ".rake"],
|
|
165
|
-
["rubocop", "-
|
|
217
|
+
["rubocop", "--fix-layout", "{file}"],
|
|
166
218
|
"https://docs.rubocop.org/",
|
|
167
219
|
),
|
|
168
220
|
recipe(
|
|
@@ -236,6 +288,9 @@ export const FORMATTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
236
288
|
[".cmake"],
|
|
237
289
|
["cmake-format", "-i", "{file}"],
|
|
238
290
|
"https://cmake-format.readthedocs.io/",
|
|
291
|
+
undefined,
|
|
292
|
+
undefined,
|
|
293
|
+
["CMakeLists.txt"],
|
|
239
294
|
),
|
|
240
295
|
recipe(
|
|
241
296
|
"xmlformat",
|
|
@@ -246,14 +301,67 @@ export const FORMATTER_RECIPES: readonly ToolRecipe[] = [
|
|
|
246
301
|
["xmlformat", "--overwrite", "{file}"],
|
|
247
302
|
"https://github.com/pamoller/xmlformatter",
|
|
248
303
|
),
|
|
304
|
+
recipe(
|
|
305
|
+
"mix-format",
|
|
306
|
+
["elixir"],
|
|
307
|
+
["mix"],
|
|
308
|
+
["mix.exs", ".formatter.exs"],
|
|
309
|
+
[".ex", ".exs"],
|
|
310
|
+
["mix", "format", "{file}"],
|
|
311
|
+
"https://hexdocs.pm/mix/Mix.Tasks.Format.html",
|
|
312
|
+
),
|
|
313
|
+
recipe(
|
|
314
|
+
"scalafmt",
|
|
315
|
+
["scala"],
|
|
316
|
+
["scalafmt"],
|
|
317
|
+
[".scalafmt.conf"],
|
|
318
|
+
[".scala", ".sc", ".sbt"],
|
|
319
|
+
["scalafmt", "{file}"],
|
|
320
|
+
"https://scalameta.org/scalafmt/",
|
|
321
|
+
),
|
|
322
|
+
recipe(
|
|
323
|
+
"julia-format",
|
|
324
|
+
["julia"],
|
|
325
|
+
["julia"],
|
|
326
|
+
[".JuliaFormatter.toml", "Project.toml"],
|
|
327
|
+
[".jl"],
|
|
328
|
+
[
|
|
329
|
+
"julia",
|
|
330
|
+
"--startup-file=no",
|
|
331
|
+
"--history-file=no",
|
|
332
|
+
"-e",
|
|
333
|
+
"using JuliaFormatter; format_file(ARGS[1])",
|
|
334
|
+
"{file}",
|
|
335
|
+
],
|
|
336
|
+
"https://github.com/domluna/JuliaFormatter.jl",
|
|
337
|
+
),
|
|
338
|
+
recipe(
|
|
339
|
+
"powershell-format",
|
|
340
|
+
["powershell"],
|
|
341
|
+
["pwsh"],
|
|
342
|
+
["PSScriptAnalyzerSettings.psd1"],
|
|
343
|
+
[".ps1", ".psm1", ".psd1"],
|
|
344
|
+
[
|
|
345
|
+
"pwsh",
|
|
346
|
+
"-NoProfile",
|
|
347
|
+
"-NonInteractive",
|
|
348
|
+
"-CommandWithArgs",
|
|
349
|
+
'$ErrorActionPreference="Stop";$p=$args[0];$options=@{};if(Test-Path -LiteralPath PSScriptAnalyzerSettings.psd1){$options.Settings="PSScriptAnalyzerSettings.psd1"};[IO.File]::WriteAllText($p,(Invoke-Formatter -ScriptDefinition ([IO.File]::ReadAllText($p)) @options))',
|
|
350
|
+
"{file}",
|
|
351
|
+
],
|
|
352
|
+
"https://learn.microsoft.com/powershell/module/psscriptanalyzer/invoke-formatter",
|
|
353
|
+
),
|
|
249
354
|
recipe(
|
|
250
355
|
"dockfmt",
|
|
251
356
|
["dockerfile"],
|
|
252
357
|
["dockfmt"],
|
|
253
|
-
["Dockerfile"],
|
|
254
|
-
["
|
|
255
|
-
["dockfmt", "fmt", "{file}"],
|
|
358
|
+
["Dockerfile", "Containerfile"],
|
|
359
|
+
[".dockerfile"],
|
|
360
|
+
["dockfmt", "fmt", "--write", "{file}"],
|
|
256
361
|
"https://github.com/jessfraz/dockfmt",
|
|
362
|
+
undefined,
|
|
363
|
+
undefined,
|
|
364
|
+
["Dockerfile", "Containerfile"],
|
|
257
365
|
),
|
|
258
366
|
];
|
|
259
367
|
|
|
@@ -266,6 +374,9 @@ function recipe(
|
|
|
266
374
|
command: readonly string[],
|
|
267
375
|
documentation: string,
|
|
268
376
|
dependencies?: readonly string[],
|
|
377
|
+
configSections?: Readonly<Record<string, readonly string[]>>,
|
|
378
|
+
|
|
379
|
+
fileNames?: readonly string[],
|
|
269
380
|
): ToolRecipe {
|
|
270
381
|
return {
|
|
271
382
|
id,
|
|
@@ -276,6 +387,13 @@ function recipe(
|
|
|
276
387
|
configFiles,
|
|
277
388
|
documentation,
|
|
278
389
|
...(dependencies && { dependencies }),
|
|
279
|
-
|
|
390
|
+
|
|
391
|
+
...(configSections && { configSections }),
|
|
392
|
+
formatter: {
|
|
393
|
+
extensions,
|
|
394
|
+
...(fileNames && { fileNames }),
|
|
395
|
+
run: { command },
|
|
396
|
+
output: "in-place",
|
|
397
|
+
},
|
|
280
398
|
};
|
|
281
399
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { runConfiguredFormatter } from "pi-agent-ide/api/tool-config";
|
|
1
|
+
import { configuredExecutableName, runConfiguredFormatter } from "pi-agent-ide/api/tool-config";
|
|
2
2
|
|
|
3
3
|
import { FormatterCommandRegistry } from "./registry.js";
|
|
4
4
|
|
|
@@ -24,14 +24,19 @@ export function createFormatter(): Formatter {
|
|
|
24
24
|
const formatter = registry.resolve(filePath, context.cwd);
|
|
25
25
|
|
|
26
26
|
if (formatter === undefined) {
|
|
27
|
-
return { ok: true, edits: 0 };
|
|
27
|
+
return { ok: true, edits: 0, formatter: null };
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
const name = configuredExecutableName(formatter.run.command);
|
|
31
|
+
try {
|
|
32
|
+
const result = await runConfiguredFormatter(formatter, {
|
|
33
|
+
projectRoot: context.cwd,
|
|
34
|
+
filePath,
|
|
35
|
+
});
|
|
36
|
+
return { ok: result.ok, edits: result.changed ? 1 : 0, formatter: name };
|
|
37
|
+
} catch {
|
|
38
|
+
return { ok: false, edits: 0, formatter: name };
|
|
39
|
+
}
|
|
35
40
|
},
|
|
36
41
|
};
|
|
37
42
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { inspectRecipeEvidence } from "pi-agent-doctor/api/evidence";
|
|
2
|
+
import { FORMATTER_RECIPES } from "./catalog.js";
|
|
2
3
|
|
|
3
4
|
import {
|
|
4
5
|
hasConfiguredExecutable,
|
|
5
6
|
loadLayeredToolConfig,
|
|
6
|
-
|
|
7
|
+
selectConfiguredEntry,
|
|
7
8
|
parseFormattersConfig,
|
|
8
9
|
} from "pi-agent-ide/api/tool-config";
|
|
9
10
|
|
|
@@ -21,6 +22,8 @@ export class FormatterCommandRegistry {
|
|
|
21
22
|
private constructor(
|
|
22
23
|
private readonly formatters: readonly EffectiveToolConfigEntry<FormatterCommandConfig>[],
|
|
23
24
|
private readonly availableBuiltIns: ReadonlySet<string>,
|
|
25
|
+
|
|
26
|
+
private readonly evidence: ReadonlyMap<string, { readonly score: number }> = new Map(),
|
|
24
27
|
) {}
|
|
25
28
|
|
|
26
29
|
/**
|
|
@@ -45,9 +48,17 @@ export class FormatterCommandRegistry {
|
|
|
45
48
|
available: await hasConfiguredExecutable(entry.config.run, directory, environment),
|
|
46
49
|
})),
|
|
47
50
|
);
|
|
51
|
+
const evidence = await inspectRecipeEvidence(directory, FORMATTER_RECIPES);
|
|
52
|
+
const entries = [...effective.entries].sort((left, right) =>
|
|
53
|
+
left.layer === "built-in" && right.layer === "built-in"
|
|
54
|
+
? (evidence.get(right.id)?.score ?? 0) - (evidence.get(left.id)?.score ?? 0)
|
|
55
|
+
: 0,
|
|
56
|
+
);
|
|
48
57
|
return new FormatterCommandRegistry(
|
|
49
|
-
|
|
58
|
+
entries,
|
|
50
59
|
new Set(available.filter((entry) => entry.available).map((entry) => entry.id)),
|
|
60
|
+
|
|
61
|
+
evidence,
|
|
51
62
|
);
|
|
52
63
|
}
|
|
53
64
|
|
|
@@ -80,11 +91,12 @@ export class FormatterCommandRegistry {
|
|
|
80
91
|
filePath: string,
|
|
81
92
|
projectRoot: string,
|
|
82
93
|
): EffectiveToolConfigEntry<FormatterCommandConfig> | undefined {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
94
|
+
return selectConfiguredEntry(
|
|
95
|
+
this.formatters,
|
|
96
|
+
this.availableBuiltIns,
|
|
97
|
+
this.evidence,
|
|
98
|
+
filePath,
|
|
99
|
+
projectRoot,
|
|
88
100
|
);
|
|
89
101
|
}
|
|
90
102
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-languages",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-doctor": "0.2.
|
|
6
|
+
"pi-agent-doctor": "0.2.2"
|
|
7
7
|
},
|
|
8
8
|
"pi": {
|
|
9
9
|
"extensions": [
|
|
10
|
-
"./runtime/entry-
|
|
10
|
+
"./runtime/entry-30.js"
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
@@ -48,6 +48,21 @@ export const LANGUAGES: readonly LanguageDefinition[] = [
|
|
|
48
48
|
language("php", "PHP", [".php"], ["composer.json"]),
|
|
49
49
|
language("swift", "Swift", [".swift"], ["Package.swift"]),
|
|
50
50
|
language("lua", "Lua", [".lua"], [".luarc.json", "stylua.toml"]),
|
|
51
|
+
|
|
52
|
+
language("dart", "Dart", [".dart"], ["pubspec.yaml", "analysis_options.yaml"]),
|
|
53
|
+
language(
|
|
54
|
+
"powershell",
|
|
55
|
+
"PowerShell",
|
|
56
|
+
[".ps1", ".psm1", ".psd1"],
|
|
57
|
+
["PSScriptAnalyzerSettings.psd1"],
|
|
58
|
+
),
|
|
59
|
+
language("r", "R", [".r"], ["DESCRIPTION", ".lintr", ".Rprofile"]),
|
|
60
|
+
language("scala", "Scala", [".scala", ".sc"], ["build.sbt", "project.scala", ".scalafmt.conf"]),
|
|
61
|
+
language("elixir", "Elixir", [".ex", ".exs"], ["mix.exs", ".formatter.exs"]),
|
|
62
|
+
language("zig", "Zig", [".zig", ".zon"], ["build.zig", "build.zig.zon", "zls.json"]),
|
|
63
|
+
language("julia", "Julia", [".jl"], ["Project.toml", ".JuliaFormatter.toml"]),
|
|
64
|
+
language("vue", "Vue", [".vue"], ["package.json"]),
|
|
65
|
+
language("svelte", "Svelte", [".svelte"], ["svelte.config.js", "svelte.config.ts"]),
|
|
51
66
|
language("shell", "Shell", [".sh", ".bash", ".zsh"], [".shellcheckrc"]),
|
|
52
67
|
language("html", "HTML", [".html", ".htm"], []),
|
|
53
68
|
language("css", "CSS", [".css", ".scss", ".sass", ".less"], ["stylelint.config.js"]),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { configuredExecutableName } from "pi-agent-ide/api/tool-config";
|
|
1
2
|
import { connectDoctorPlugin } from "pi-agent-doctor/api/connect-plugin";
|
|
2
3
|
import { connectIdePlugin } from "pi-agent-ide/api/connect-plugin";
|
|
3
4
|
import { IDE_API_VERSION, IDE_PROTOCOL, type IdePlugin } from "pi-agent-ide/api/plugin-protocol";
|
|
@@ -52,6 +53,7 @@ export default async function registerLint(pi: ExtensionAPI): Promise<void> {
|
|
|
52
53
|
diagnostics: [],
|
|
53
54
|
reason: "No linter configured for this file",
|
|
54
55
|
};
|
|
56
|
+
const source = configuredExecutableName(config.check.command);
|
|
55
57
|
const result = await runConfiguredLinter(config, {
|
|
56
58
|
projectRoot: context.cwd,
|
|
57
59
|
filePath,
|
|
@@ -62,8 +64,9 @@ export default async function registerLint(pi: ExtensionAPI): Promise<void> {
|
|
|
62
64
|
status: "unavailable",
|
|
63
65
|
diagnostics: [],
|
|
64
66
|
reason: result.failure ?? "Lint check failed",
|
|
67
|
+
source,
|
|
65
68
|
}
|
|
66
|
-
: { status: "ready", diagnostics: result.diagnostics };
|
|
69
|
+
: { status: "ready", diagnostics: result.diagnostics, source };
|
|
67
70
|
},
|
|
68
71
|
});
|
|
69
72
|
},
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-lint",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-doctor": "0.2.
|
|
7
|
-
"pi-agent-invariant": "0.2.
|
|
8
|
-
"pi-agent-read": "0.2.
|
|
9
|
-
"pi-agent-resource": "0.2.
|
|
10
|
-
"pi-agent-text": "0.2.
|
|
6
|
+
"pi-agent-doctor": "0.2.2",
|
|
7
|
+
"pi-agent-invariant": "0.2.2",
|
|
8
|
+
"pi-agent-read": "0.2.2",
|
|
9
|
+
"pi-agent-resource": "0.2.2",
|
|
10
|
+
"pi-agent-text": "0.2.2"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
14
|
-
"./runtime/entry-
|
|
14
|
+
"./runtime/entry-31.js"
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"@earendil-works/pi-coding-agent": "*",
|
|
19
|
-
"pi-agent-ide": "0.2.
|
|
19
|
+
"pi-agent-ide": "0.2.2"
|
|
20
20
|
}
|
|
21
21
|
}
|