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
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { requiredValue } from "pi-agent-invariant";
|
|
2
|
+
import type { ExtensionAPI, Theme } from "@earendil-works/pi-coding-agent";
|
|
3
|
+
import { Text, type Component } from "@earendil-works/pi-tui";
|
|
4
|
+
import type { IdeDiagnosticResult } from "#src/api/plugin-protocol.js";
|
|
5
|
+
import type { DiagnosticNotification } from "#src/core/diagnostic-store.js";
|
|
6
|
+
|
|
7
|
+
export const DIAGNOSTIC_ENTRY_TYPE = "ide-diagnostic-summary";
|
|
8
|
+
|
|
9
|
+
/** Display-only counts. Provider messages and source excerpts stay out of this entry. */
|
|
10
|
+
export interface DiagnosticEntryData {
|
|
11
|
+
readonly filePath: string;
|
|
12
|
+
readonly sources: readonly {
|
|
13
|
+
readonly source: string;
|
|
14
|
+
readonly status: IdeDiagnosticResult["status"];
|
|
15
|
+
readonly counts: Readonly<Record<"error" | "warning" | "info" | "hint", number>>;
|
|
16
|
+
}[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Derive visible data from the exact report delivered to the model. */
|
|
20
|
+
export function diagnosticEntryData(notification: DiagnosticNotification): DiagnosticEntryData {
|
|
21
|
+
return {
|
|
22
|
+
filePath: notification.filePath,
|
|
23
|
+
sources: notification.results.map((result) => {
|
|
24
|
+
const counts = { error: 0, warning: 0, info: 0, hint: 0 };
|
|
25
|
+
for (const item of result.diagnostics) counts[item.severity]++;
|
|
26
|
+
return { source: result.source, status: result.status, counts };
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Render nonempty counts with their tool names; expanded entries also show completion state. */
|
|
32
|
+
export function renderDiagnosticEntry(
|
|
33
|
+
data: DiagnosticEntryData,
|
|
34
|
+
theme: Theme,
|
|
35
|
+
expanded = false,
|
|
36
|
+
): Component {
|
|
37
|
+
return {
|
|
38
|
+
render(width) {
|
|
39
|
+
const sources = data.sources.filter(
|
|
40
|
+
(source) =>
|
|
41
|
+
source.status !== "pending" &&
|
|
42
|
+
source.status !== "unavailable" &&
|
|
43
|
+
Object.values(source.counts).some((count) => count > 0),
|
|
44
|
+
);
|
|
45
|
+
if (sources.length === 0) return [];
|
|
46
|
+
const summary = sources
|
|
47
|
+
.map(
|
|
48
|
+
(source) =>
|
|
49
|
+
`${renderCounts(source.counts, theme)} ${theme.fg("dim", `(${plain(source.source)})`)}` +
|
|
50
|
+
(source.status === "ready" ? "" : ` · ${theme.fg("dim", source.status)}`),
|
|
51
|
+
)
|
|
52
|
+
.join(" · ");
|
|
53
|
+
const lines = [
|
|
54
|
+
`${theme.fg("accent", "Diagnostics")} ${theme.fg("toolTitle", plain(data.filePath))} · ${summary}`,
|
|
55
|
+
];
|
|
56
|
+
if (expanded) {
|
|
57
|
+
for (const source of sources) {
|
|
58
|
+
lines.push(
|
|
59
|
+
` ${theme.fg("dim", plain(source.source))} · ${renderCounts(source.counts, theme)} · ${theme.fg("dim", source.status)}`,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return new Text(lines.join("\n"), 0, 0).render(width);
|
|
64
|
+
},
|
|
65
|
+
invalidate() {},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** Register durable UI-only entries; appending one never adds model context or starts a turn. */
|
|
70
|
+
export function registerDiagnosticEntryRenderer(pi: ExtensionAPI): void {
|
|
71
|
+
pi.registerEntryRenderer<DiagnosticEntryData>(DIAGNOSTIC_ENTRY_TYPE, (entry, options, theme) =>
|
|
72
|
+
renderDiagnosticEntry(requiredValue(entry.data), theme, options.expanded),
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function renderCounts(
|
|
77
|
+
counts: DiagnosticEntryData["sources"][number]["counts"],
|
|
78
|
+
theme: Theme,
|
|
79
|
+
): string {
|
|
80
|
+
return (["error", "warning", "info", "hint"] as const)
|
|
81
|
+
.filter((severity) => counts[severity] > 0)
|
|
82
|
+
.map((severity) => {
|
|
83
|
+
const count = counts[severity];
|
|
84
|
+
const label = severity === "info" || count === 1 ? severity : `${severity}s`;
|
|
85
|
+
const color =
|
|
86
|
+
count > 0 && (severity === "error" || severity === "warning") ? severity : "muted";
|
|
87
|
+
return theme.fg(color, `${count} ${label}`);
|
|
88
|
+
})
|
|
89
|
+
.join(", ");
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function plain(value: string): string {
|
|
93
|
+
return value.replace(/[\u0000-\u001f\u007f-\u009f]/g, " ");
|
|
94
|
+
}
|
|
@@ -9,6 +9,13 @@ import type {
|
|
|
9
9
|
} from "#src/api/plugin-protocol.js";
|
|
10
10
|
import type { ToolContext } from "#src/toolchain/types.js";
|
|
11
11
|
|
|
12
|
+
/** Nonempty findings shared by hidden model delivery and a separate UI summary. */
|
|
13
|
+
export interface DiagnosticNotification {
|
|
14
|
+
readonly filePath: string;
|
|
15
|
+
readonly results: readonly IdeDiagnosticResult[];
|
|
16
|
+
readonly text: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
12
19
|
interface FileState {
|
|
13
20
|
readonly cwd: string;
|
|
14
21
|
readonly filePath: string;
|
|
@@ -27,6 +34,13 @@ export class DiagnosticStore {
|
|
|
27
34
|
private readonly queue: (() => Promise<void>)[] = [];
|
|
28
35
|
private running = 0;
|
|
29
36
|
private disposed = false;
|
|
37
|
+
private readonly changeListeners = new Set<(cwd: string) => void>();
|
|
38
|
+
|
|
39
|
+
/** Observe published reports immediately, independently of agent turns. */
|
|
40
|
+
onDidChange(listener: (cwd: string) => void): () => void {
|
|
41
|
+
this.changeListeners.add(listener);
|
|
42
|
+
return () => this.changeListeners.delete(listener);
|
|
43
|
+
}
|
|
30
44
|
|
|
31
45
|
constructor(
|
|
32
46
|
private readonly sources: readonly IdeDiagnosticSource[],
|
|
@@ -57,41 +71,48 @@ export class DiagnosticStore {
|
|
|
57
71
|
return { filePath: absolute, content: current.content, results: [...current.results.values()] };
|
|
58
72
|
}
|
|
59
73
|
|
|
60
|
-
/** Drain
|
|
61
|
-
async takeNotifications(cwd: string): Promise<
|
|
62
|
-
const
|
|
74
|
+
/** Drain current findings for delivery; pending, unavailable and empty reports stay silent. */
|
|
75
|
+
async takeNotifications(cwd: string): Promise<DiagnosticNotification[]> {
|
|
76
|
+
const notifications: DiagnosticNotification[] = [];
|
|
63
77
|
for (const state of [...this.dirty]) {
|
|
64
78
|
if (state.cwd !== path.resolve(cwd)) continue;
|
|
65
79
|
this.dirty.delete(state);
|
|
66
80
|
if (!(await this.isCurrent(state))) continue;
|
|
67
|
-
const results = [...state.results.values()]
|
|
81
|
+
const results = [...state.results.values()].filter(
|
|
82
|
+
(result) =>
|
|
83
|
+
result.status !== "pending" &&
|
|
84
|
+
result.status !== "unavailable" &&
|
|
85
|
+
result.diagnostics.length > 0,
|
|
86
|
+
);
|
|
87
|
+
const key = this.key(state.filePath, state.cwd);
|
|
88
|
+
// Fingerprint only findings: empty provider updates must not resend the same report.
|
|
89
|
+
const fingerprint = JSON.stringify(results);
|
|
90
|
+
if (this.sent.get(key) === fingerprint) continue;
|
|
91
|
+
this.sent.set(key, fingerprint);
|
|
92
|
+
// Remember the empty state so a later recurrence can notify again.
|
|
93
|
+
if (results.length === 0) continue;
|
|
68
94
|
const summary = results
|
|
69
95
|
.map((result) => {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
(severity) =>
|
|
75
|
-
`${result.diagnostics.filter((item) => item.severity === severity).length} ${severity}`,
|
|
76
|
-
);
|
|
96
|
+
const counts = ["error", "warning", "info", "hint"].flatMap((severity) => {
|
|
97
|
+
const count = result.diagnostics.filter((item) => item.severity === severity).length;
|
|
98
|
+
return count > 0 ? [`${count} ${severity}`] : [];
|
|
99
|
+
});
|
|
77
100
|
return `${result.source} ${counts.join(", ")}${result.status === "snapshot" ? " (snapshot; completion unknown)" : result.status === "unversioned" ? " (unversioned)" : ""}`;
|
|
78
101
|
})
|
|
79
102
|
.join("; ");
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
lines.push(
|
|
86
|
-
`${JSON.stringify(path.relative(cwd, state.filePath))}: ${summary || "no diagnostic sources"}.`,
|
|
87
|
-
);
|
|
103
|
+
notifications.push({
|
|
104
|
+
filePath: path.relative(cwd, state.filePath),
|
|
105
|
+
results,
|
|
106
|
+
text: `${JSON.stringify(path.relative(cwd, state.filePath))}: ${summary}.`,
|
|
107
|
+
});
|
|
88
108
|
}
|
|
89
|
-
return
|
|
109
|
+
return notifications;
|
|
90
110
|
}
|
|
91
111
|
|
|
92
112
|
/** Invalidate all revision-bound callbacks and cancel session-owned work. */
|
|
93
113
|
dispose(): void {
|
|
94
114
|
this.disposed = true;
|
|
115
|
+
this.changeListeners.clear();
|
|
95
116
|
for (const state of this.files.values()) state.controller.abort();
|
|
96
117
|
this.files.clear();
|
|
97
118
|
this.dirty.clear();
|
|
@@ -181,10 +202,11 @@ export class DiagnosticStore {
|
|
|
181
202
|
const publication = (state.publications.get(source) ?? 0) + 1;
|
|
182
203
|
state.publications.set(source, publication);
|
|
183
204
|
if (!(await this.isCurrent(state)) || state.publications.get(source) !== publication) return;
|
|
184
|
-
const result: IdeDiagnosticResult = {
|
|
205
|
+
const result: IdeDiagnosticResult = { ...report, source: report.source ?? source };
|
|
185
206
|
if (JSON.stringify(state.results.get(source)) === JSON.stringify(result)) return;
|
|
186
207
|
state.results.set(source, result);
|
|
187
208
|
this.dirty.add(state);
|
|
209
|
+
for (const listener of this.changeListeners) listener(state.cwd);
|
|
188
210
|
}
|
|
189
211
|
|
|
190
212
|
private async check(state: FileState, source: IdeDiagnosticSource): Promise<void> {
|
package/src/core/extension.ts
CHANGED
|
@@ -6,6 +6,11 @@ import {
|
|
|
6
6
|
isIdePluginRegistrationRequest,
|
|
7
7
|
} from "#src/api/plugin-protocol.js";
|
|
8
8
|
import { createIdeCore } from "#src/core/ide-core.js";
|
|
9
|
+
import {
|
|
10
|
+
diagnosticEntryData,
|
|
11
|
+
DIAGNOSTIC_ENTRY_TYPE,
|
|
12
|
+
registerDiagnosticEntryRenderer,
|
|
13
|
+
} from "#src/core/diagnostic-entry.js";
|
|
9
14
|
import { runIdePostEditGate } from "#src/post-edit/gate.js";
|
|
10
15
|
import { resetRegistry } from "#src/toolchain/registry.js";
|
|
11
16
|
import { connectTextEditorPostEditHandler } from "pi-agent-text-editor/api/post-edit";
|
|
@@ -27,6 +32,7 @@ export default async function registerPiAgentIde(pi: ExtensionAPI): Promise<void
|
|
|
27
32
|
});
|
|
28
33
|
resetRegistry();
|
|
29
34
|
const core = createIdeCore();
|
|
35
|
+
registerDiagnosticEntryRenderer(pi);
|
|
30
36
|
const unsubscribePlugins = pi.events.on(IDE_PLUGIN_REGISTER_EVENT, (request) => {
|
|
31
37
|
if (!isIdePluginRegistrationRequest(request)) {
|
|
32
38
|
throw new Error("Invalid pi-agent-ide plugin registration request");
|
|
@@ -41,7 +47,10 @@ export default async function registerPiAgentIde(pi: ExtensionAPI): Promise<void
|
|
|
41
47
|
});
|
|
42
48
|
connectTextEditorPostEditHandler(pi, {
|
|
43
49
|
id: "pi-agent-ide",
|
|
44
|
-
handler:
|
|
50
|
+
handler: (transaction) =>
|
|
51
|
+
pi.getFlag("pi-agent-ide-no-post-processing") === true
|
|
52
|
+
? Promise.resolve({ formatting: { status: "disabled" } })
|
|
53
|
+
: runIdePostEditGate(transaction),
|
|
45
54
|
});
|
|
46
55
|
pi.events.emit(IDE_CORE_READY_EVENT, {
|
|
47
56
|
protocol: IDE_PROTOCOL,
|
|
@@ -54,6 +63,7 @@ export default async function registerPiAgentIde(pi: ExtensionAPI): Promise<void
|
|
|
54
63
|
id: "ide-diagnostics",
|
|
55
64
|
setup(api) {
|
|
56
65
|
api.onDidEdit((completion) => {
|
|
66
|
+
if (pi.getFlag("pi-agent-ide-no-post-processing") === true) return;
|
|
57
67
|
if (path.isAbsolute(completion.resourceSource)) {
|
|
58
68
|
core.diagnostics.schedule(completion.resourceSource, completion.after.content, {
|
|
59
69
|
cwd: completion.cwd,
|
|
@@ -62,22 +72,34 @@ export default async function registerPiAgentIde(pi: ExtensionAPI): Promise<void
|
|
|
62
72
|
});
|
|
63
73
|
},
|
|
64
74
|
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
let delivery = Promise.resolve();
|
|
76
|
+
let closed = false;
|
|
77
|
+
const isClosed = () => closed;
|
|
78
|
+
const unsubscribeDiagnostics = core.diagnostics.onDidChange((cwd) => {
|
|
79
|
+
delivery = delivery
|
|
80
|
+
.then(async () => {
|
|
81
|
+
if (closed) return;
|
|
82
|
+
const notifications = await core.diagnostics.takeNotifications(cwd);
|
|
83
|
+
if (isClosed() || notifications.length === 0) return;
|
|
84
|
+
pi.sendMessage(
|
|
85
|
+
{
|
|
86
|
+
customType: "ide-diagnostics",
|
|
87
|
+
display: false,
|
|
88
|
+
content: `File diagnostics:\n${notifications.map((item) => item.text).join("\n")}`,
|
|
89
|
+
},
|
|
90
|
+
{ triggerTurn: true, deliverAs: "steer" },
|
|
91
|
+
);
|
|
92
|
+
for (const notification of notifications) {
|
|
93
|
+
pi.appendEntry(DIAGNOSTIC_ENTRY_TYPE, diagnosticEntryData(notification));
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
.catch((error: unknown) => {
|
|
97
|
+
console.error("Diagnostic delivery failed", error);
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
pi.on("session_shutdown", () => {
|
|
101
|
+
closed = true;
|
|
102
|
+
unsubscribeDiagnostics();
|
|
81
103
|
});
|
|
82
104
|
|
|
83
105
|
await core.waitForPendingPlugins();
|
|
@@ -57,8 +57,21 @@ export async function writeSuggestedConfigs(
|
|
|
57
57
|
command: recipe.command,
|
|
58
58
|
transport: "stdio",
|
|
59
59
|
rootMarkers: recipe.rootMarkers,
|
|
60
|
+
|
|
61
|
+
...(recipe.initializationOptions !== undefined && {
|
|
62
|
+
initializationOptions: recipe.initializationOptions,
|
|
63
|
+
}),
|
|
64
|
+
|
|
65
|
+
...(recipe.settings !== undefined && { settings: recipe.settings }),
|
|
66
|
+
|
|
67
|
+
...(recipe.requireRootMarker !== undefined && {
|
|
68
|
+
requireRootMarker: recipe.requireRootMarker,
|
|
69
|
+
}),
|
|
60
70
|
languages: Object.fromEntries(
|
|
61
|
-
Object.entries(recipe.languageIds).map(([id, extensions]) => [
|
|
71
|
+
Object.entries(recipe.languageIds).map(([id, extensions]) => [
|
|
72
|
+
id,
|
|
73
|
+
{ extensions, ...(recipe.fileNames?.[id] && { fileNames: recipe.fileNames[id] }) },
|
|
74
|
+
]),
|
|
62
75
|
),
|
|
63
76
|
capabilities: ["diagnostics"],
|
|
64
77
|
};
|
package/src/doctor/discovery.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
|
|
3
|
+
import { inspectRecipeEvidence } from "pi-agent-doctor/api/evidence";
|
|
4
|
+
|
|
5
|
+
import { isExecutableAvailable } from "pi-agent-doctor/api/executable";
|
|
3
6
|
|
|
4
7
|
import { projectIdeConfigPath } from "#src/api/tool-config.js";
|
|
5
8
|
import type { DoctorToolSelection } from "#src/api/doctor.js";
|
|
@@ -23,7 +26,10 @@ export async function discoverRecipeCandidates(
|
|
|
23
26
|
recipes: readonly OwnedContribution<ToolRecipe>[],
|
|
24
27
|
environment: NodeJS.ProcessEnv = process.env,
|
|
25
28
|
): Promise<readonly RecipeCandidate[]> {
|
|
26
|
-
const
|
|
29
|
+
const nativeEvidence = await inspectRecipeEvidence(
|
|
30
|
+
cwd,
|
|
31
|
+
recipes.map((entry) => entry.value),
|
|
32
|
+
);
|
|
27
33
|
const managedRecipes = await managedRecipeIds(cwd);
|
|
28
34
|
const candidates: RecipeCandidate[] = [];
|
|
29
35
|
|
|
@@ -36,7 +42,8 @@ export async function discoverRecipeCandidates(
|
|
|
36
42
|
|
|
37
43
|
const evidence: string[] = [];
|
|
38
44
|
let score = 1;
|
|
39
|
-
const
|
|
45
|
+
const native = nativeEvidence.get(recipe.id);
|
|
46
|
+
const nativeConfig = native?.config;
|
|
40
47
|
|
|
41
48
|
if (nativeConfig !== undefined) {
|
|
42
49
|
score += 6;
|
|
@@ -48,7 +55,7 @@ export async function discoverRecipeCandidates(
|
|
|
48
55
|
evidence.push("Pi Agent IDE config");
|
|
49
56
|
}
|
|
50
57
|
|
|
51
|
-
const dependency =
|
|
58
|
+
const dependency = native?.dependency;
|
|
52
59
|
|
|
53
60
|
if (dependency !== undefined) {
|
|
54
61
|
score += 4;
|
|
@@ -118,47 +125,14 @@ export function selectSuggestedRecipes(
|
|
|
118
125
|
return [...selected.values()];
|
|
119
126
|
}
|
|
120
127
|
|
|
121
|
-
async function firstExisting(cwd: string, names: readonly string[]): Promise<string | undefined> {
|
|
122
|
-
for (const name of names) {
|
|
123
|
-
try {
|
|
124
|
-
await access(path.join(cwd, name));
|
|
125
|
-
return name;
|
|
126
|
-
} catch {
|
|
127
|
-
// Try the next project marker.
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return undefined;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
128
|
async function firstExecutable(
|
|
135
129
|
cwd: string,
|
|
136
130
|
names: readonly string[],
|
|
137
131
|
environment: NodeJS.ProcessEnv,
|
|
138
132
|
): Promise<string | undefined> {
|
|
139
|
-
const pathDirectories = (environment.PATH ?? "").split(path.delimiter).filter(Boolean);
|
|
140
|
-
const directories = [path.join(cwd, "node_modules", ".bin"), ...pathDirectories];
|
|
141
|
-
|
|
142
133
|
for (const name of names) {
|
|
143
|
-
if (name
|
|
144
|
-
try {
|
|
145
|
-
await access(path.resolve(cwd, name));
|
|
146
|
-
return name;
|
|
147
|
-
} catch {
|
|
148
|
-
continue;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
for (const directory of directories) {
|
|
153
|
-
try {
|
|
154
|
-
await access(path.join(directory, name));
|
|
155
|
-
return name;
|
|
156
|
-
} catch {
|
|
157
|
-
// Try the next executable location.
|
|
158
|
-
}
|
|
159
|
-
}
|
|
134
|
+
if (await isExecutableAvailable(name, cwd, environment)) return name;
|
|
160
135
|
}
|
|
161
|
-
|
|
162
136
|
return undefined;
|
|
163
137
|
}
|
|
164
138
|
|
|
@@ -192,32 +166,3 @@ async function managedRecipeIds(cwd: string): Promise<ReadonlySet<string>> {
|
|
|
192
166
|
|
|
193
167
|
return ids;
|
|
194
168
|
}
|
|
195
|
-
|
|
196
|
-
async function packageDependencies(cwd: string): Promise<ReadonlySet<string>> {
|
|
197
|
-
try {
|
|
198
|
-
const value = JSON.parse(await readFile(path.join(cwd, "package.json"), "utf8")) as Record<
|
|
199
|
-
string,
|
|
200
|
-
unknown
|
|
201
|
-
>;
|
|
202
|
-
const names = new Set<string>();
|
|
203
|
-
|
|
204
|
-
for (const key of [
|
|
205
|
-
"dependencies",
|
|
206
|
-
"devDependencies",
|
|
207
|
-
"peerDependencies",
|
|
208
|
-
"optionalDependencies",
|
|
209
|
-
]) {
|
|
210
|
-
const section = value[key];
|
|
211
|
-
|
|
212
|
-
if (typeof section === "object" && section !== null && !Array.isArray(section)) {
|
|
213
|
-
for (const name of Object.keys(section)) {
|
|
214
|
-
names.add(name);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
return names;
|
|
220
|
-
} catch {
|
|
221
|
-
return new Set();
|
|
222
|
-
}
|
|
223
|
-
}
|
package/src/doctor/run.ts
CHANGED
|
@@ -49,13 +49,45 @@ export async function inspectDoctorSetup(
|
|
|
49
49
|
runContributedSetupChecks(snapshot, context),
|
|
50
50
|
]);
|
|
51
51
|
|
|
52
|
+
const missingActions = new Map<string, DoctorSetupAction & { readonly pluginId: string }>();
|
|
53
|
+
for (const language of detectedLanguageIds) {
|
|
54
|
+
for (const kind of ["formatter", "linter", "lsp"] as const) {
|
|
55
|
+
if (
|
|
56
|
+
setup.selections.some(
|
|
57
|
+
(selection) => selection.languageId === language && selection.kind === kind,
|
|
58
|
+
)
|
|
59
|
+
)
|
|
60
|
+
continue;
|
|
61
|
+
const relevant = candidates.filter(
|
|
62
|
+
(candidate) =>
|
|
63
|
+
candidate.recipe.kind === kind && candidate.recipe.languages.includes(language),
|
|
64
|
+
);
|
|
65
|
+
const nativeScore = (candidate: RecipeCandidate) =>
|
|
66
|
+
candidate.score - (candidate.executable === undefined ? 0 : 3);
|
|
67
|
+
const bestScore = Math.max(1, ...relevant.map(nativeScore));
|
|
68
|
+
for (const candidate of relevant) {
|
|
69
|
+
if (
|
|
70
|
+
candidate.executable !== undefined ||
|
|
71
|
+
nativeScore(candidate) !== bestScore ||
|
|
72
|
+
bestScore <= 1
|
|
73
|
+
)
|
|
74
|
+
continue;
|
|
75
|
+
const id = `${kind}-${candidate.recipe.id}-unavailable`;
|
|
76
|
+
missingActions.set(id, {
|
|
77
|
+
id,
|
|
78
|
+
pluginId: candidate.pluginId,
|
|
79
|
+
message: `Native project setup selects ${candidate.recipe.id}, but its executable is unavailable. Install ${candidate.recipe.executables.join(" or ")} and run Doctor again.`,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
52
84
|
return {
|
|
53
85
|
cwd,
|
|
54
86
|
files,
|
|
55
87
|
detectedLanguages,
|
|
56
88
|
candidates,
|
|
57
89
|
selections: setup.selections,
|
|
58
|
-
actions: setup.actions,
|
|
90
|
+
actions: [...setup.actions, ...missingActions.values()],
|
|
59
91
|
suggestions: selectSuggestedRecipes(candidates, detectedLanguageIds, setup.selections),
|
|
60
92
|
};
|
|
61
93
|
}
|
|
@@ -18,7 +18,7 @@ import { createFilesystemReadResolver, createFilesystemWriteResolver } from "#sr
|
|
|
18
18
|
|
|
19
19
|
const readTarget = { provider: "filesystem", capability: "read" } satisfies ContentTarget;
|
|
20
20
|
const writeTarget = { provider: "filesystem", capability: "write" } satisfies ContentTarget;
|
|
21
|
-
const renderReadResult = createReadResultRenderer({ kind: "source" });
|
|
21
|
+
const renderReadResult = createReadResultRenderer({ kind: "source", nativeResources: true });
|
|
22
22
|
|
|
23
23
|
export default async function registerFilesystemPlugin(pi: ExtensionAPI): Promise<void> {
|
|
24
24
|
const readHost = createContentHost(pi, readTarget);
|
|
@@ -33,7 +33,7 @@ export default async function registerFilesystemPlugin(pi: ExtensionAPI): Promis
|
|
|
33
33
|
api.addResolver({ resolver: readResolver, renderResult: renderReadResult });
|
|
34
34
|
api.describe(() =>
|
|
35
35
|
renderContentDescription(
|
|
36
|
-
"
|
|
36
|
+
"File path — file content; directory path — entry listing. Relative, absolute and file:// paths accepted.",
|
|
37
37
|
readHost.listDescriptions(),
|
|
38
38
|
),
|
|
39
39
|
);
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-image": "0.2.
|
|
10
|
-
"pi-agent-read": "0.2.
|
|
11
|
-
"pi-agent-resource": "0.2.
|
|
12
|
-
"pi-agent-text": "0.2.
|
|
13
|
-
"pi-agent-text-editor": "0.2.
|
|
9
|
+
"pi-agent-image": "0.2.2",
|
|
10
|
+
"pi-agent-read": "0.2.2",
|
|
11
|
+
"pi-agent-resource": "0.2.2",
|
|
12
|
+
"pi-agent-text": "0.2.2",
|
|
13
|
+
"pi-agent-text-editor": "0.2.2"
|
|
14
14
|
},
|
|
15
15
|
"pi": {
|
|
16
16
|
"extensions": [
|
|
17
|
-
"./runtime/entry-
|
|
17
|
+
"./runtime/entry-21.js"
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-image",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#extension": "./index.ts"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-image": "0.2.
|
|
10
|
-
"pi-agent-resource": "0.2.
|
|
9
|
+
"pi-agent-image": "0.2.2",
|
|
10
|
+
"pi-agent-resource": "0.2.2"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
14
|
-
"./runtime/entry-
|
|
14
|
+
"./runtime/entry-22.js"
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-pdf",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-pdf": "0.2.
|
|
7
|
-
"pi-agent-resource": "0.2.
|
|
6
|
+
"pi-agent-pdf": "0.2.2",
|
|
7
|
+
"pi-agent-resource": "0.2.2"
|
|
8
8
|
},
|
|
9
9
|
"pi": {
|
|
10
10
|
"extensions": [
|
|
11
|
-
"./runtime/entry-
|
|
11
|
+
"./runtime/entry-23.js"
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-text",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#extension": "./index.ts"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-resource": "0.2.
|
|
10
|
-
"pi-agent-text": "0.2.
|
|
9
|
+
"pi-agent-resource": "0.2.2",
|
|
10
|
+
"pi-agent-text": "0.2.2"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
14
|
-
"./runtime/entry-
|
|
14
|
+
"./runtime/entry-24.js"
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
@@ -29,13 +29,8 @@ export default async function registerWeb(pi: ExtensionAPI): Promise<void> {
|
|
|
29
29
|
preserveTruncatedOutput: true,
|
|
30
30
|
});
|
|
31
31
|
api.describe(() =>
|
|
32
|
-
renderContentDescription(
|
|
33
|
-
"Reads HTTP(S) URLs, automatically retrying failed reads or empty HTML in a local browser.",
|
|
34
|
-
readHost.listDescriptions(),
|
|
35
|
-
),
|
|
32
|
+
renderContentDescription("HTTP(S) URL — remote content.", readHost.listDescriptions()),
|
|
36
33
|
);
|
|
37
|
-
|
|
38
|
-
api.addPromptGuideline("Use read with the plain HTTP(S) URL; browser fallback is automatic.");
|
|
39
34
|
},
|
|
40
35
|
} satisfies ReadPlugin;
|
|
41
36
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-web",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"defuddle": "^0.19.1",
|
|
10
10
|
"linkedom": "^0.18.12",
|
|
11
|
-
"pi-agent-doctor": "0.2.
|
|
12
|
-
"pi-agent-image": "0.2.
|
|
13
|
-
"pi-agent-read": "0.2.
|
|
14
|
-
"pi-agent-resource": "0.2.
|
|
15
|
-
"pi-agent-text": "0.2.
|
|
11
|
+
"pi-agent-doctor": "0.2.2",
|
|
12
|
+
"pi-agent-image": "0.2.2",
|
|
13
|
+
"pi-agent-read": "0.2.2",
|
|
14
|
+
"pi-agent-resource": "0.2.2",
|
|
15
|
+
"pi-agent-text": "0.2.2",
|
|
16
16
|
"playwright-core": "^1.62.1"
|
|
17
17
|
},
|
|
18
18
|
"pi": {
|
|
19
19
|
"extensions": [
|
|
20
|
-
"./runtime/entry-
|
|
20
|
+
"./runtime/entry-76.js"
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|