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
|
@@ -1,6 +1,86 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
3
|
"servers": {
|
|
4
|
+
"vue-typescript-language-server": {
|
|
5
|
+
"command": ["typescript-language-server", "--stdio"],
|
|
6
|
+
"transport": "stdio",
|
|
7
|
+
"rootMarkers": ["tsconfig.json", "package.json"],
|
|
8
|
+
"languages": { "vue": { "extensions": [".vue"] } },
|
|
9
|
+
"capabilities": ["diagnostics"],
|
|
10
|
+
"initializationOptions": {
|
|
11
|
+
"plugins": [
|
|
12
|
+
{
|
|
13
|
+
"name": "@vue/typescript-plugin",
|
|
14
|
+
"location": "{project}/node_modules/@vue/typescript-plugin",
|
|
15
|
+
"languages": ["vue"]
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"elixir-ls": {
|
|
21
|
+
"command": ["elixir-ls"],
|
|
22
|
+
|
|
23
|
+
"settings": { "elixirLS": { "mcpEnabled": false } },
|
|
24
|
+
"transport": "stdio",
|
|
25
|
+
"rootMarkers": ["mix.exs"],
|
|
26
|
+
"languages": { "elixir": { "extensions": [".ex", ".exs"] } },
|
|
27
|
+
"capabilities": ["diagnostics"]
|
|
28
|
+
},
|
|
29
|
+
"metals": {
|
|
30
|
+
"command": ["metals"],
|
|
31
|
+
"transport": "stdio",
|
|
32
|
+
"rootMarkers": ["build.sbt", "project.scala", ".bsp"],
|
|
33
|
+
"languages": { "scala": { "extensions": [".scala", ".sc"] } },
|
|
34
|
+
"capabilities": ["diagnostics"]
|
|
35
|
+
},
|
|
36
|
+
"angular-language-server": {
|
|
37
|
+
"command": ["ngserver", "--stdio", "--tsProbeLocations", ".", "--ngProbeLocations", "."],
|
|
38
|
+
"transport": "stdio",
|
|
39
|
+
"rootMarkers": ["angular.json"],
|
|
40
|
+
"requireRootMarker": true,
|
|
41
|
+
"languages": { "typescript": { "extensions": [".ts"] }, "html": { "extensions": [".html"] } },
|
|
42
|
+
"capabilities": ["diagnostics"]
|
|
43
|
+
},
|
|
44
|
+
"svelte-language-server": {
|
|
45
|
+
"command": ["svelteserver", "--stdio"],
|
|
46
|
+
"transport": "stdio",
|
|
47
|
+
"rootMarkers": ["svelte.config.js", "package.json"],
|
|
48
|
+
"languages": { "svelte": { "extensions": [".svelte"] } },
|
|
49
|
+
"capabilities": ["diagnostics"]
|
|
50
|
+
},
|
|
51
|
+
"dart-language-server": {
|
|
52
|
+
"command": ["dart", "language-server", "--protocol=lsp"],
|
|
53
|
+
"transport": "stdio",
|
|
54
|
+
"rootMarkers": ["pubspec.yaml", "analysis_options.yaml"],
|
|
55
|
+
"languages": {
|
|
56
|
+
"dart": {
|
|
57
|
+
"extensions": [".dart"]
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"capabilities": ["diagnostics"]
|
|
61
|
+
},
|
|
62
|
+
"r-language-server": {
|
|
63
|
+
"command": ["Rscript", "-e", "languageserver::run()"],
|
|
64
|
+
"transport": "stdio",
|
|
65
|
+
"rootMarkers": ["DESCRIPTION", ".lintr", ".Rprofile"],
|
|
66
|
+
"languages": {
|
|
67
|
+
"r": {
|
|
68
|
+
"extensions": [".r"]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"capabilities": ["diagnostics"]
|
|
72
|
+
},
|
|
73
|
+
"zls": {
|
|
74
|
+
"command": ["zls"],
|
|
75
|
+
"transport": "stdio",
|
|
76
|
+
"rootMarkers": ["build.zig", "build.zig.zon", "zls.json"],
|
|
77
|
+
"languages": {
|
|
78
|
+
"zig": {
|
|
79
|
+
"extensions": [".zig", ".zon"]
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"capabilities": ["diagnostics"]
|
|
83
|
+
},
|
|
4
84
|
"clangd": {
|
|
5
85
|
"command": ["clangd"],
|
|
6
86
|
"transport": "stdio",
|
|
@@ -21,10 +101,16 @@
|
|
|
21
101
|
"rootMarkers": ["tsconfig.json", "jsconfig.json", "package.json"],
|
|
22
102
|
"languages": {
|
|
23
103
|
"javascript": {
|
|
24
|
-
"extensions": [".js", ".
|
|
104
|
+
"extensions": [".js", ".mjs", ".cjs"]
|
|
105
|
+
},
|
|
106
|
+
"javascriptreact": {
|
|
107
|
+
"extensions": [".jsx"]
|
|
25
108
|
},
|
|
26
109
|
"typescript": {
|
|
27
|
-
"extensions": [".ts", ".
|
|
110
|
+
"extensions": [".ts", ".mts", ".cts"]
|
|
111
|
+
},
|
|
112
|
+
"typescriptreact": {
|
|
113
|
+
"extensions": [".tsx"]
|
|
28
114
|
}
|
|
29
115
|
},
|
|
30
116
|
"capabilities": ["diagnostics"]
|
|
@@ -152,6 +238,8 @@
|
|
|
152
238
|
},
|
|
153
239
|
"vscode-css-language-server": {
|
|
154
240
|
"command": ["vscode-css-language-server", "--stdio"],
|
|
241
|
+
|
|
242
|
+
"settings": { "css": {}, "scss": {}, "less": {} },
|
|
155
243
|
"transport": "stdio",
|
|
156
244
|
"rootMarkers": ["package.json"],
|
|
157
245
|
"languages": {
|
|
@@ -216,13 +304,59 @@
|
|
|
216
304
|
},
|
|
217
305
|
"capabilities": ["diagnostics"]
|
|
218
306
|
},
|
|
219
|
-
"
|
|
220
|
-
"command": ["
|
|
307
|
+
"kotlin-lsp": {
|
|
308
|
+
"command": ["intellij-server", "--stdio"],
|
|
309
|
+
"transport": "stdio",
|
|
310
|
+
"rootMarkers": ["build.gradle.kts", "build.gradle", "pom.xml", "settings.gradle.kts"],
|
|
311
|
+
"languages": {
|
|
312
|
+
"kotlin": {
|
|
313
|
+
"extensions": [".kt", ".kts"]
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"capabilities": ["diagnostics"]
|
|
317
|
+
},
|
|
318
|
+
"julia-language-server": {
|
|
319
|
+
"command": [
|
|
320
|
+
"julia",
|
|
321
|
+
"--startup-file=no",
|
|
322
|
+
"--history-file=no",
|
|
323
|
+
"-e",
|
|
324
|
+
"using LanguageServer; runserver()"
|
|
325
|
+
],
|
|
326
|
+
"transport": "stdio",
|
|
327
|
+
"rootMarkers": ["Project.toml", "JuliaProject.toml"],
|
|
328
|
+
"languages": {
|
|
329
|
+
"julia": {
|
|
330
|
+
"extensions": [".jl"]
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"capabilities": ["diagnostics"]
|
|
334
|
+
},
|
|
335
|
+
"powershell-editor-services": {
|
|
336
|
+
"command": [
|
|
337
|
+
"pwsh",
|
|
338
|
+
"-NoProfile",
|
|
339
|
+
"-NonInteractive",
|
|
340
|
+
"-Command",
|
|
341
|
+
"$ErrorActionPreference=\"Stop\";Import-Module PowerShellEditorServices;$d=Join-Path (Get-Location) \".agents/tmp/powershell-lsp-$PID\";[IO.Directory]::CreateDirectory($d)|Out-Null;Start-EditorServices -HostName Pi -HostProfileId Pi -HostVersion 1.0.0 -Stdio -LanguageServiceOnly -LogPath (Join-Path $d \"server.log\") -SessionDetailsPath (Join-Path $d \"session.json\")"
|
|
342
|
+
],
|
|
343
|
+
"transport": "stdio",
|
|
344
|
+
"rootMarkers": ["PSScriptAnalyzerSettings.psd1"],
|
|
345
|
+
"languages": {
|
|
346
|
+
"powershell": {
|
|
347
|
+
"extensions": [".ps1", ".psm1", ".psd1"]
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"capabilities": ["diagnostics"]
|
|
351
|
+
},
|
|
352
|
+
"neocmakelsp": {
|
|
353
|
+
"command": ["neocmakelsp", "stdio"],
|
|
221
354
|
"transport": "stdio",
|
|
222
|
-
"rootMarkers": ["CMakeLists.txt"],
|
|
355
|
+
"rootMarkers": ["CMakeLists.txt", ".neocmake.toml", ".neocmakelint.toml"],
|
|
223
356
|
"languages": {
|
|
224
357
|
"cmake": {
|
|
225
|
-
"extensions": [".cmake"]
|
|
358
|
+
"extensions": [".cmake"],
|
|
359
|
+
"fileNames": ["CMakeLists.txt"]
|
|
226
360
|
}
|
|
227
361
|
},
|
|
228
362
|
"capabilities": ["diagnostics"]
|
|
@@ -266,7 +400,8 @@
|
|
|
266
400
|
"rootMarkers": ["Dockerfile"],
|
|
267
401
|
"languages": {
|
|
268
402
|
"dockerfile": {
|
|
269
|
-
"extensions": [".dockerfile"]
|
|
403
|
+
"extensions": [".dockerfile"],
|
|
404
|
+
"fileNames": ["Dockerfile", "Containerfile"]
|
|
270
405
|
}
|
|
271
406
|
},
|
|
272
407
|
"capabilities": ["diagnostics"]
|
package/src/api/tool-config.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import spawn from "cross-spawn";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
isExecutableAvailable,
|
|
5
|
+
normalizeProcessEnvironment,
|
|
6
|
+
projectProcessEnvironment,
|
|
7
|
+
} from "pi-agent-doctor/api/executable";
|
|
2
8
|
import { requiredValue } from "pi-agent-invariant";
|
|
3
|
-
import {
|
|
4
|
-
import { access, readFile, writeFile } from "node:fs/promises";
|
|
9
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
5
10
|
import os from "node:os";
|
|
6
11
|
import path from "node:path";
|
|
7
12
|
import { fileURLToPath } from "node:url";
|
|
@@ -10,6 +15,10 @@ import { fileURLToPath } from "node:url";
|
|
|
10
15
|
Current on-disk tool configuration version.
|
|
11
16
|
*/
|
|
12
17
|
export const TOOL_CONFIG_VERSION = 1 as const;
|
|
18
|
+
/** Executable name for user-facing tool provenance, without arguments or machine-specific paths. */
|
|
19
|
+
export function configuredExecutableName(command: readonly string[]): string {
|
|
20
|
+
return path.win32.basename(requiredValue(command[0]));
|
|
21
|
+
}
|
|
13
22
|
|
|
14
23
|
/**
|
|
15
24
|
A direct process invocation. Shell expansion is never implicit.
|
|
@@ -27,6 +36,9 @@ File selection shared by formatter and linter commands.
|
|
|
27
36
|
*/
|
|
28
37
|
export interface FileMatcherConfig {
|
|
29
38
|
readonly extensions: readonly string[];
|
|
39
|
+
|
|
40
|
+
/** Exact basenames accepted in addition to extensions, such as CMakeLists.txt. */
|
|
41
|
+
readonly fileNames?: readonly string[];
|
|
30
42
|
readonly include?: readonly string[];
|
|
31
43
|
readonly exclude?: readonly string[];
|
|
32
44
|
}
|
|
@@ -62,6 +74,9 @@ Describes how a linter's output becomes Pi Agent IDE diagnostics.
|
|
|
62
74
|
export interface DiagnosticParserConfig {
|
|
63
75
|
readonly format: DiagnosticFormat;
|
|
64
76
|
readonly pattern?: string;
|
|
77
|
+
|
|
78
|
+
/** Column numbering used by a regex reporter; IDE diagnostics are always one-based. */
|
|
79
|
+
readonly columnBase?: 0 | 1;
|
|
65
80
|
}
|
|
66
81
|
|
|
67
82
|
/**
|
|
@@ -218,6 +233,11 @@ export function matchesConfiguredFile(
|
|
|
218
233
|
if (
|
|
219
234
|
config.extensions.every(
|
|
220
235
|
(candidate) => !(normalizeExtension(candidate) === extension || candidate === "*"),
|
|
236
|
+
) &&
|
|
237
|
+
!config.fileNames?.some((name) =>
|
|
238
|
+
process.platform === "win32"
|
|
239
|
+
? name.toLowerCase() === path.basename(filePath).toLowerCase()
|
|
240
|
+
: name === path.basename(filePath),
|
|
221
241
|
)
|
|
222
242
|
) {
|
|
223
243
|
return false;
|
|
@@ -230,6 +250,29 @@ export function matchesConfiguredFile(
|
|
|
230
250
|
return (config.include === undefined || matches(config.include)) && !matches(config.exclude);
|
|
231
251
|
}
|
|
232
252
|
|
|
253
|
+
/**
|
|
254
|
+
Selects an explicit override first, then an available built-in with the strongest native evidence.
|
|
255
|
+
A missing native choice never falls back to an unrelated installed tool.
|
|
256
|
+
*/
|
|
257
|
+
export function selectConfiguredEntry<T extends FileMatcherConfig>(
|
|
258
|
+
entries: readonly EffectiveToolConfigEntry<T>[],
|
|
259
|
+
availableBuiltIns: ReadonlySet<string>,
|
|
260
|
+
evidence: ReadonlyMap<string, { readonly score: number }>,
|
|
261
|
+
filePath: string,
|
|
262
|
+
projectRoot: string,
|
|
263
|
+
): EffectiveToolConfigEntry<T> | undefined {
|
|
264
|
+
const absolute = path.resolve(projectRoot, filePath);
|
|
265
|
+
const matching = entries.filter((entry) =>
|
|
266
|
+
matchesConfiguredFile(entry.config, absolute, projectRoot),
|
|
267
|
+
);
|
|
268
|
+
const override = matching.find((entry) => entry.layer !== "built-in");
|
|
269
|
+
if (override !== undefined) return override;
|
|
270
|
+
const score = Math.max(0, ...matching.map((entry) => evidence.get(entry.id)?.score ?? 0));
|
|
271
|
+
return matching.find(
|
|
272
|
+
(entry) => availableBuiltIns.has(entry.id) && (evidence.get(entry.id)?.score ?? 0) === score,
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
|
|
233
276
|
/**
|
|
234
277
|
Returns whether a configured process executable can be launched from the project.
|
|
235
278
|
*/
|
|
@@ -241,24 +284,7 @@ export async function hasConfiguredExecutable(
|
|
|
241
284
|
assertProcessConfig(config, "process");
|
|
242
285
|
const executable = requiredValue(config.command[0]).replaceAll("{project}", projectRoot);
|
|
243
286
|
const effectiveEnvironment = createConfiguredProcessEnvironment(config, projectRoot, environment);
|
|
244
|
-
|
|
245
|
-
path.isAbsolute(executable) || path.dirname(executable) !== "."
|
|
246
|
-
? [path.resolve(projectRoot, executable)]
|
|
247
|
-
: (effectiveEnvironment.PATH ?? "")
|
|
248
|
-
.split(path.delimiter)
|
|
249
|
-
.filter(Boolean)
|
|
250
|
-
.map((directory) => path.join(directory, executable));
|
|
251
|
-
|
|
252
|
-
for (const candidate of candidates) {
|
|
253
|
-
try {
|
|
254
|
-
await access(candidate, constants.X_OK);
|
|
255
|
-
return true;
|
|
256
|
-
} catch {
|
|
257
|
-
// Try the next executable location.
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
return false;
|
|
287
|
+
return isExecutableAvailable(executable, projectRoot, effectiveEnvironment);
|
|
262
288
|
}
|
|
263
289
|
|
|
264
290
|
/**
|
|
@@ -408,6 +434,13 @@ export function parseLintersConfig(value: unknown): LintersConfig {
|
|
|
408
434
|
throw new Error(`linter ${name} has an unsupported diagnostics format`);
|
|
409
435
|
}
|
|
410
436
|
|
|
437
|
+
if (
|
|
438
|
+
diagnostics.columnBase !== undefined &&
|
|
439
|
+
(diagnostics.format !== "regex" ||
|
|
440
|
+
(diagnostics.columnBase !== 0 && diagnostics.columnBase !== 1))
|
|
441
|
+
) {
|
|
442
|
+
throw new Error(`linter ${name} columnBase must be 0 or 1 for regex diagnostics`);
|
|
443
|
+
}
|
|
411
444
|
if (diagnostics.format === "regex" && typeof diagnostics.pattern !== "string") {
|
|
412
445
|
throw new Error(`linter ${name} regex diagnostics require pattern`);
|
|
413
446
|
}
|
|
@@ -433,6 +466,9 @@ function configRoot(
|
|
|
433
466
|
function assertMatcher(record: Record<string, unknown>, label: string): void {
|
|
434
467
|
assertStringArray(record.extensions, `${label}.extensions`, false);
|
|
435
468
|
|
|
469
|
+
if (record.fileNames !== undefined)
|
|
470
|
+
assertStringArray(record.fileNames, `${label}.fileNames`, false);
|
|
471
|
+
|
|
436
472
|
if (record.include !== undefined) {
|
|
437
473
|
assertStringArray(record.include, `${label}.include`, false);
|
|
438
474
|
}
|
|
@@ -550,10 +586,10 @@ export function createConfiguredProcessEnvironment(
|
|
|
550
586
|
projectRoot: string,
|
|
551
587
|
environment: NodeJS.ProcessEnv,
|
|
552
588
|
): NodeJS.ProcessEnv {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
589
|
+
return projectProcessEnvironment(projectRoot, {
|
|
590
|
+
...normalizeProcessEnvironment(environment),
|
|
591
|
+
...normalizeProcessEnvironment(config.env ?? {}),
|
|
592
|
+
});
|
|
557
593
|
}
|
|
558
594
|
|
|
559
595
|
function expandPlaceholders(
|
|
@@ -100,12 +100,16 @@ export function createDiagnosticViewContent(
|
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
/**
|
|
103
|
+
/** Add annotations without changing source lines. EOF reports attach to the last line with their original coordinates. */
|
|
104
104
|
export function addDiagnosticAnnotations(
|
|
105
105
|
document: TextDocument,
|
|
106
106
|
sources: readonly DiagnosticSource[],
|
|
107
107
|
): TextDocument {
|
|
108
|
-
const diagnostics = diagnosticsByValidLine(
|
|
108
|
+
const diagnostics = diagnosticsByValidLine(
|
|
109
|
+
sources,
|
|
110
|
+
document.lines.length,
|
|
111
|
+
/[\r\n]$/u.test(document.content),
|
|
112
|
+
);
|
|
109
113
|
|
|
110
114
|
const lines = document.lines.map((line) => {
|
|
111
115
|
const annotations = diagnostics.get(line.lineNumber);
|
|
@@ -116,7 +120,8 @@ export function addDiagnosticAnnotations(
|
|
|
116
120
|
|
|
117
121
|
const suffix = annotations
|
|
118
122
|
.map(
|
|
119
|
-
({ diagnostic, source }) =>
|
|
123
|
+
({ diagnostic, source }) =>
|
|
124
|
+
`<!-- ${source}: ${formatDiagnostic(diagnostic, source)}${diagnostic.line === line.lineNumber ? "" : ` @${diagnostic.line}:${diagnostic.column}`} -->`,
|
|
120
125
|
)
|
|
121
126
|
.join(" ");
|
|
122
127
|
|
|
@@ -151,22 +156,21 @@ interface NamedDiagnostic {
|
|
|
151
156
|
function diagnosticsByValidLine(
|
|
152
157
|
sources: readonly DiagnosticSource[],
|
|
153
158
|
lineCount: number,
|
|
159
|
+
trailingNewline = false,
|
|
154
160
|
): Map<number, NamedDiagnostic[]> {
|
|
155
161
|
const diagnosticsByLine = new Map<number, NamedDiagnostic[]>();
|
|
156
162
|
|
|
157
163
|
for (const { diagnostics, source } of sources) {
|
|
158
164
|
for (const diagnostic of diagnostics) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
diagnostic.line > lineCount
|
|
163
|
-
) {
|
|
165
|
+
const renderedLine =
|
|
166
|
+
trailingNewline && diagnostic.line === lineCount + 1 ? lineCount : diagnostic.line;
|
|
167
|
+
if (!Number.isInteger(diagnostic.line) || renderedLine < 1 || renderedLine > lineCount) {
|
|
164
168
|
continue;
|
|
165
169
|
}
|
|
166
170
|
|
|
167
|
-
const lineDiagnostics = diagnosticsByLine.get(
|
|
171
|
+
const lineDiagnostics = diagnosticsByLine.get(renderedLine) ?? [];
|
|
168
172
|
lineDiagnostics.push({ diagnostic, source });
|
|
169
|
-
diagnosticsByLine.set(
|
|
173
|
+
diagnosticsByLine.set(renderedLine, lineDiagnostics);
|
|
170
174
|
}
|
|
171
175
|
}
|
|
172
176
|
|
|
@@ -1,78 +1,160 @@
|
|
|
1
|
-
import registerIdeCore from "#src/core/extension.js";
|
|
2
|
-
import registerTips from "#src/tips/extension.js";
|
|
3
|
-
import registerDoctor from "#src/doctor/index.js";
|
|
4
|
-
import registerFilesystem from "#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/index.js";
|
|
5
|
-
import registerFilesystemImage from "#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/index.js";
|
|
6
|
-
import registerFilesystemPdf from "#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/index.js";
|
|
7
|
-
import registerFilesystemText from "#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/index.js";
|
|
8
|
-
import registerWeb from "#src/extensions/pi-agent-read/extensions/pi-agent-web/index.js";
|
|
9
|
-
import registerWebHtml from "#src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/index.js";
|
|
10
|
-
import registerWebImage from "#src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/index.js";
|
|
11
|
-
import registerWebPdf from "#src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/index.js";
|
|
12
|
-
import registerWebText from "#src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/index.js";
|
|
13
|
-
import registerReadCore from "#src/extensions/pi-agent-read/index.js";
|
|
14
|
-
import registerSearchCore from "#src/extensions/pi-agent-search/index.js";
|
|
15
|
-
import registerTextSearch from "#src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.js";
|
|
16
|
-
import registerTextEditor from "#src/extensions/pi-agent-text-editor/index.js";
|
|
17
|
-
import registerConstantAnchors from "#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/index.js";
|
|
18
|
-
import registerLineHashAnchors from "#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/index.js";
|
|
19
|
-
import registerExactTextAnchors from "#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/index.js";
|
|
20
|
-
import registerArgumentOrder from "#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/index.js";
|
|
21
|
-
import registerOverwrite from "#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/index.js";
|
|
22
|
-
import registerTextEditorRenderer from "#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/index.js";
|
|
23
|
-
import registerStaleAnchorGuard from "#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/index.js";
|
|
24
|
-
import registerAst from "#src/plugins/pi-agent-ide-ast/index.js";
|
|
25
|
-
import registerChanges from "#src/plugins/pi-agent-ide-changes/index.js";
|
|
26
|
-
|
|
27
|
-
import registerDiagnostics from "#src/plugins/pi-agent-ide-diagnostics/index.js";
|
|
28
|
-
import registerFormatter from "#src/plugins/pi-agent-ide-formatter/index.js";
|
|
29
|
-
import registerLanguages from "#src/plugins/pi-agent-ide-languages/index.js";
|
|
30
|
-
import registerLint from "#src/plugins/pi-agent-ide-lint/index.js";
|
|
31
|
-
import registerLsp from "#src/plugins/pi-agent-ide-lsp/index.js";
|
|
32
|
-
|
|
33
1
|
import type { BuiltinExtension } from "#src/composite/selection.js";
|
|
34
2
|
|
|
35
3
|
/**
|
|
36
|
-
Built-ins in their established registration order.
|
|
37
|
-
|
|
4
|
+
* Built-ins in their established registration order. Loading the catalog does not
|
|
5
|
+
* import plugin code; only selected registrations load their modules.
|
|
6
|
+
*/
|
|
38
7
|
export const BUILTIN_EXTENSIONS: readonly BuiltinExtension[] = [
|
|
39
|
-
builtin("ide.core",
|
|
40
|
-
builtin("ide.tips",
|
|
41
|
-
builtin("ide.doctor",
|
|
42
|
-
builtin("ide.languages",
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
builtin("read.
|
|
46
|
-
builtin(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
builtin(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
builtin(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
builtin(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
8
|
+
builtin("ide.core", () => import("#src/core/extension.js")),
|
|
9
|
+
builtin("ide.tips", () => import("#src/tips/extension.js")),
|
|
10
|
+
builtin("ide.doctor", () => import("#src/doctor/index.js")),
|
|
11
|
+
builtin("ide.languages", () => import("#src/plugins/pi-agent-ide-languages/index.js"), [
|
|
12
|
+
"ide.doctor",
|
|
13
|
+
]),
|
|
14
|
+
builtin("read.core", () => import("#src/extensions/pi-agent-read/index.js")),
|
|
15
|
+
builtin(
|
|
16
|
+
"read.filesystem",
|
|
17
|
+
() => import("#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/index.js"),
|
|
18
|
+
["read.core", "editor.core"],
|
|
19
|
+
),
|
|
20
|
+
builtin(
|
|
21
|
+
"read.filesystem.image",
|
|
22
|
+
() =>
|
|
23
|
+
import("#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/index.js"),
|
|
24
|
+
["read.filesystem"],
|
|
25
|
+
),
|
|
26
|
+
builtin(
|
|
27
|
+
"read.filesystem.pdf",
|
|
28
|
+
() =>
|
|
29
|
+
import("#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/index.js"),
|
|
30
|
+
["read.filesystem"],
|
|
31
|
+
),
|
|
32
|
+
builtin(
|
|
33
|
+
"read.filesystem.text",
|
|
34
|
+
() =>
|
|
35
|
+
import("#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/index.js"),
|
|
36
|
+
["read.filesystem"],
|
|
37
|
+
),
|
|
38
|
+
builtin(
|
|
39
|
+
"read.web",
|
|
40
|
+
() => import("#src/extensions/pi-agent-read/extensions/pi-agent-web/index.js"),
|
|
41
|
+
["read.core"],
|
|
42
|
+
),
|
|
43
|
+
builtin(
|
|
44
|
+
"read.web.html",
|
|
45
|
+
() =>
|
|
46
|
+
import("#src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/index.js"),
|
|
47
|
+
["read.web"],
|
|
48
|
+
),
|
|
49
|
+
builtin(
|
|
50
|
+
"read.web.image",
|
|
51
|
+
() =>
|
|
52
|
+
import("#src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/index.js"),
|
|
53
|
+
["read.web"],
|
|
54
|
+
),
|
|
55
|
+
builtin(
|
|
56
|
+
"read.web.pdf",
|
|
57
|
+
() =>
|
|
58
|
+
import("#src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/index.js"),
|
|
59
|
+
["read.web"],
|
|
60
|
+
),
|
|
61
|
+
builtin(
|
|
62
|
+
"read.web.text",
|
|
63
|
+
() =>
|
|
64
|
+
import("#src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/index.js"),
|
|
65
|
+
["read.web"],
|
|
66
|
+
),
|
|
67
|
+
builtin("search.core", () => import("#src/extensions/pi-agent-search/index.js")),
|
|
68
|
+
builtin(
|
|
69
|
+
"search.text",
|
|
70
|
+
() => import("#src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.js"),
|
|
71
|
+
["search.core"],
|
|
72
|
+
),
|
|
73
|
+
builtin(
|
|
74
|
+
"editor.renderer",
|
|
75
|
+
() =>
|
|
76
|
+
import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/index.js"),
|
|
77
|
+
["editor.core"],
|
|
78
|
+
),
|
|
79
|
+
builtin("editor.core", () => import("#src/extensions/pi-agent-text-editor/index.js")),
|
|
80
|
+
builtin(
|
|
81
|
+
"editor.anchor.constant",
|
|
82
|
+
() =>
|
|
83
|
+
import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/index.js"),
|
|
84
|
+
["read.core", "editor.core"],
|
|
85
|
+
),
|
|
86
|
+
builtin(
|
|
87
|
+
"editor.anchor.line-hash",
|
|
88
|
+
() =>
|
|
89
|
+
import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/index.js"),
|
|
90
|
+
["read.core", "editor.core"],
|
|
91
|
+
),
|
|
92
|
+
builtin(
|
|
93
|
+
"editor.anchor.exact",
|
|
94
|
+
() =>
|
|
95
|
+
import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/index.js"),
|
|
96
|
+
["editor.core"],
|
|
97
|
+
),
|
|
98
|
+
builtin(
|
|
99
|
+
"editor.argument-order",
|
|
100
|
+
() =>
|
|
101
|
+
import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/index.js"),
|
|
102
|
+
["editor.core"],
|
|
103
|
+
false,
|
|
104
|
+
),
|
|
105
|
+
builtin(
|
|
106
|
+
"editor.overwrite",
|
|
107
|
+
() =>
|
|
108
|
+
import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/index.js"),
|
|
109
|
+
["editor.core"],
|
|
110
|
+
false,
|
|
111
|
+
),
|
|
112
|
+
builtin(
|
|
113
|
+
"editor.stale-anchor",
|
|
114
|
+
() =>
|
|
115
|
+
import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/index.js"),
|
|
116
|
+
["editor.core"],
|
|
117
|
+
),
|
|
118
|
+
builtin("ide.ast", () => import("#src/plugins/pi-agent-ide-ast/index.js"), [
|
|
119
|
+
"ide.core",
|
|
120
|
+
"read.core",
|
|
121
|
+
"search.core",
|
|
122
|
+
"editor.core",
|
|
123
|
+
]),
|
|
124
|
+
builtin("ide.formatter", () => import("#src/plugins/pi-agent-ide-formatter/index.js"), [
|
|
125
|
+
"ide.core",
|
|
126
|
+
]),
|
|
127
|
+
builtin("ide.lint", () => import("#src/plugins/pi-agent-ide-lint/index.js"), ["ide.core"]),
|
|
128
|
+
builtin("ide.changes", () => import("#src/plugins/pi-agent-ide-changes/index.js"), [
|
|
129
|
+
"ide.core",
|
|
130
|
+
"read.core",
|
|
131
|
+
"editor.core",
|
|
132
|
+
]),
|
|
133
|
+
builtin("ide.lsp", () => import("#src/plugins/pi-agent-ide-lsp/index.js"), [
|
|
134
|
+
"ide.core",
|
|
135
|
+
"read.core",
|
|
136
|
+
"search.core",
|
|
137
|
+
]),
|
|
138
|
+
builtin("ide.diagnostics", () => import("#src/plugins/pi-agent-ide-diagnostics/index.js"), [
|
|
139
|
+
"ide.core",
|
|
140
|
+
"read.core",
|
|
141
|
+
]),
|
|
69
142
|
];
|
|
70
143
|
|
|
144
|
+
/** Defer module loading until the selected built-in is registered. */
|
|
71
145
|
function builtin(
|
|
72
146
|
id: string,
|
|
73
|
-
|
|
147
|
+
load: () => Promise<{ default: BuiltinExtension["register"] }>,
|
|
74
148
|
dependencies: readonly string[] = [],
|
|
75
149
|
defaultEnabled = true,
|
|
76
150
|
): BuiltinExtension {
|
|
77
|
-
return {
|
|
151
|
+
return {
|
|
152
|
+
id,
|
|
153
|
+
dependencies,
|
|
154
|
+
async register(pi) {
|
|
155
|
+
const extension = await load();
|
|
156
|
+
await extension.default(pi);
|
|
157
|
+
},
|
|
158
|
+
...(defaultEnabled ? {} : { defaultEnabled: false }),
|
|
159
|
+
};
|
|
78
160
|
}
|
|
@@ -16,6 +16,10 @@ export interface PiAgentIdeExtensionsConfigPaths {
|
|
|
16
16
|
export interface PiAgentIdeExtensionsConfig {
|
|
17
17
|
readonly disabled: readonly string[];
|
|
18
18
|
readonly enabled: readonly string[];
|
|
19
|
+
/** Disable decorative mutation playback while keeping final results visible. */
|
|
20
|
+
readonly noAnimations?: boolean;
|
|
21
|
+
/** Skip automatic formatting and diagnostics triggered by edits. */
|
|
22
|
+
readonly noPostProcessing?: boolean;
|
|
19
23
|
}
|
|
20
24
|
|
|
21
25
|
/**
|
|
@@ -54,6 +58,8 @@ export async function readPiAgentIdeExtensionsConfig(
|
|
|
54
58
|
return {
|
|
55
59
|
disabled: [...new Set([...globalConfig.disabled, ...projectConfig.disabled])],
|
|
56
60
|
enabled: [...new Set([...globalConfig.enabled, ...projectConfig.enabled])],
|
|
61
|
+
noAnimations: projectConfig.noAnimations ?? globalConfig.noAnimations ?? false,
|
|
62
|
+
noPostProcessing: projectConfig.noPostProcessing ?? globalConfig.noPostProcessing ?? false,
|
|
57
63
|
};
|
|
58
64
|
}
|
|
59
65
|
|
|
@@ -91,9 +97,21 @@ async function readConfigExtensionIds(configPath: string): Promise<PiAgentIdeExt
|
|
|
91
97
|
return {
|
|
92
98
|
disabled: readIdField(value, "disabled", configPath),
|
|
93
99
|
enabled: readIdField(value, "enabled", configPath),
|
|
100
|
+
...(value.noAnimations === undefined
|
|
101
|
+
? {}
|
|
102
|
+
: { noAnimations: readBoolean(value, "noAnimations", configPath) }),
|
|
103
|
+
...(value.noPostProcessing === undefined
|
|
104
|
+
? {}
|
|
105
|
+
: { noPostProcessing: readBoolean(value, "noPostProcessing", configPath) }),
|
|
94
106
|
};
|
|
95
107
|
}
|
|
96
108
|
|
|
109
|
+
function readBoolean(value: Record<string, unknown>, field: string, configPath: string): boolean {
|
|
110
|
+
const setting = value[field];
|
|
111
|
+
if (typeof setting !== "boolean") throw new Error(`${field} in ${configPath} must be a boolean`);
|
|
112
|
+
return setting;
|
|
113
|
+
}
|
|
114
|
+
|
|
97
115
|
function readIdField(
|
|
98
116
|
value: Record<string, unknown>,
|
|
99
117
|
field: "disabled" | "enabled",
|