pi-agent-ide 0.2.1 → 0.3.0
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 +56 -0
- package/README.md +12 -8
- package/dist/{chunk-XNXQYPVT.js → chunk-4LUW26BX.js} +1 -1
- package/dist/chunk-5MSNYFDE.js +1 -0
- package/dist/chunk-5VSE5X5R.js +2 -0
- package/dist/chunk-6EYWFBNG.js +0 -0
- package/dist/{chunk-ORAPGW7W.js → chunk-72EEL2DW.js} +1 -1
- package/dist/{chunk-T2RPMEM2.js → chunk-7UGNGK7Y.js} +1 -1
- package/dist/{chunk-STUZZM5B.js → chunk-AADJ2KIB.js} +1 -1
- package/dist/{chunk-SMSIT3CE.js → chunk-B5KB2I7J.js} +1 -1
- package/dist/chunk-BHSO2MDK.js +6 -0
- package/dist/chunk-BMOJTJJJ.js +3 -0
- package/dist/{chunk-EEH4WYI7.js → chunk-CEKXBS55.js} +1 -1
- package/dist/chunk-CW53ZTU3.js +2 -0
- package/dist/chunk-EWNWKDMP.js +4 -0
- package/dist/{chunk-VSP2QQPQ.js → chunk-GIRAEVUJ.js} +1 -1
- package/dist/{chunk-MTTKFJV6.js → chunk-GUTQ3PWL.js} +1 -1
- package/dist/chunk-HGPUI7F3.js +1 -0
- package/dist/{chunk-OBWZ5RYN.js → chunk-HKMBQLEK.js} +1 -1
- package/dist/chunk-ITSNK5YG.js +7 -0
- package/dist/chunk-KAB3AYA2.js +1 -0
- package/dist/{chunk-266RH77Z.js → chunk-LRYE2WCN.js} +1 -1
- package/dist/chunk-M5L42DWE.js +7 -0
- package/dist/chunk-M5MJP7Z2.js +1 -0
- package/dist/chunk-NMFQGKPE.js +2 -0
- package/dist/chunk-NTYXZ3EL.js +3 -0
- package/dist/{chunk-PETQCA7G.js → chunk-QDST6VIU.js} +1 -1
- package/dist/chunk-QIJMV2P2.js +2 -0
- package/dist/chunk-RHV5STR3.js +3 -0
- package/dist/chunk-ROXXK6TW.js +0 -0
- package/dist/chunk-S3ZPXWX7.js +2 -0
- package/dist/chunk-SSHZEWWV.js +1 -0
- package/dist/chunk-TPIHQYK2.js +14 -0
- package/dist/chunk-VZJIZXSH.js +14 -0
- package/dist/chunk-YHADTHQM.js +1 -0
- package/dist/{chunk-KZBAJFCV.js → chunk-Z3VC3S2T.js} +1 -1
- package/dist/{chunk-SJYDLHEF.js → chunk-ZM4L5AGN.js} +1 -1
- package/dist/{chunk-E2RESHYR.js → chunk-ZTYWHL2F.js} +1 -1
- package/dist/entry-0.js +1 -1
- package/dist/entry-1.js +1 -1
- package/dist/entry-10.js +1 -1
- package/dist/entry-11.js +1 -1
- package/dist/entry-12.js +1 -1
- package/dist/entry-13.js +1 -1
- package/dist/entry-14.js +1 -1
- package/dist/entry-2.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 +12 -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 +9 -1
- package/dist/entry-33.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 +18 -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 -1
- package/dist/entry-54.js +1 -0
- package/dist/entry-55.js +0 -1
- package/dist/entry-56.js +1 -0
- package/dist/entry-57.js +0 -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 -1
- package/dist/entry-63.js +1 -0
- package/dist/entry-64.js +0 -1
- package/dist/entry-65.js +1 -0
- package/dist/entry-66.js +0 -1
- package/dist/entry-67.js +1 -1
- package/dist/entry-68.js +1 -1
- package/dist/entry-69.js +1 -1
- package/dist/entry-70.js +123 -1
- package/dist/entry-71.js +30 -1
- package/dist/entry-72.js +2 -1
- package/dist/entry-73.js +1 -1
- package/dist/entry-74.js +1 -1
- package/dist/entry-75.js +1 -1
- package/dist/entry-76.js +3 -1
- package/dist/entry-77.js +1 -1
- package/dist/entry-78.js +1 -1
- package/dist/entry-79.js +1 -1
- package/dist/pi-agent-ide.js +3 -13
- package/docs/configuration.md +57 -11
- package/docs/extensions.md +4 -2
- package/docs/tools.md +7 -1
- package/node_modules/pi-agent-doctor/package.json +1 -1
- package/node_modules/pi-agent-filesystem/index.ts +2 -2
- package/node_modules/pi-agent-filesystem/package.json +6 -6
- package/node_modules/pi-agent-filesystem-image/package.json +3 -3
- package/node_modules/pi-agent-filesystem-pdf/package.json +3 -3
- package/node_modules/pi-agent-filesystem-text/package.json +3 -3
- package/node_modules/pi-agent-ide-ast/package.json +9 -9
- package/node_modules/pi-agent-ide-ast/src/ast/outline.ts +89 -19
- package/node_modules/pi-agent-ide-ast/src/extension.ts +11 -15
- package/node_modules/pi-agent-ide-ast/src/overflow-handler.ts +83 -0
- package/node_modules/pi-agent-ide-ast/src/scope-handler.ts +8 -1
- package/node_modules/pi-agent-ide-ast/src/scope-resolver.ts +1 -1
- package/node_modules/pi-agent-ide-ast/src/search-resolver.ts +83 -5
- package/node_modules/pi-agent-ide-changes/index.ts +22 -10
- package/node_modules/pi-agent-ide-changes/package.json +6 -6
- package/node_modules/pi-agent-ide-changes/src/last-text-transaction-store.ts +10 -0
- package/node_modules/pi-agent-ide-changes/src/tool-index-change.ts +5 -9
- package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +1 -5
- package/node_modules/pi-agent-ide-formatter/package.json +3 -3
- package/node_modules/pi-agent-ide-formatter/src/formatter.ts +36 -13
- package/node_modules/pi-agent-ide-formatter/src/registry.ts +9 -1
- package/node_modules/pi-agent-ide-languages/package.json +2 -2
- package/node_modules/pi-agent-ide-lint/index.ts +49 -17
- package/node_modules/pi-agent-ide-lint/package.json +7 -7
- package/node_modules/pi-agent-ide-lint/src/registry.ts +9 -1
- package/node_modules/pi-agent-ide-lsp/index.ts +127 -20
- package/node_modules/pi-agent-ide-lsp/package.json +9 -8
- package/node_modules/pi-agent-ide-lsp/src/declaration-targets.ts +61 -0
- package/node_modules/pi-agent-ide-lsp/src/diagnostic-source.ts +25 -7
- package/node_modules/pi-agent-ide-lsp/src/lsp/client.ts +12 -1
- package/node_modules/pi-agent-ide-lsp/src/lsp/code-views.ts +40 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/manager.ts +21 -32
- package/node_modules/pi-agent-ide-lsp/src/lsp/registry.ts +15 -2
- package/node_modules/pi-agent-ide-lsp/src/lsp/rename.ts +1 -1
- package/node_modules/pi-agent-ide-lsp/src/lsp/symbol-search.ts +32 -5
- package/node_modules/pi-agent-ide-lsp/src/rename-plan.ts +138 -0
- package/node_modules/pi-agent-ide-lsp/src/search-resolver.ts +9 -2
- package/node_modules/pi-agent-image/package.json +2 -2
- package/node_modules/pi-agent-image/src/image-converter.ts +1 -1
- package/node_modules/pi-agent-invariant/package.json +1 -1
- package/node_modules/pi-agent-pdf/package.json +2 -2
- package/node_modules/pi-agent-pdf/src/pdf-converter.ts +1 -1
- package/node_modules/pi-agent-read/package.json +6 -6
- package/node_modules/pi-agent-read/src/api/plugin-protocol.ts +1 -1
- package/node_modules/pi-agent-read/src/api/read-parameters.ts +29 -0
- package/node_modules/pi-agent-read/src/api/rendering.ts +3 -0
- package/node_modules/pi-agent-read/src/api/tools/read.ts +73 -1
- package/node_modules/pi-agent-read/src/core/read-core.ts +32 -28
- 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/output-truncation.ts +1 -1
- package/node_modules/pi-agent-read/src/core/tools/read/raw-read.ts +113 -0
- package/node_modules/pi-agent-read/src/core/tools/read/read-renderer.ts +87 -19
- package/node_modules/pi-agent-read/src/core/tools/read/read-result.ts +15 -0
- package/node_modules/pi-agent-read/src/core/tools/read/temp-resource-store.ts +35 -126
- package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +87 -53
- package/node_modules/pi-agent-resource/package.json +1 -1
- package/node_modules/pi-agent-resource/src/content-conversion/content-description.ts +1 -8
- package/node_modules/pi-agent-resource/src/resolver.ts +2 -0
- package/node_modules/pi-agent-search/package.json +3 -3
- package/node_modules/pi-agent-search/src/api/plugin-protocol.ts +1 -1
- package/node_modules/pi-agent-search/src/api/search-parameters.ts +25 -0
- package/node_modules/pi-agent-search/src/api/search.ts +55 -1
- package/node_modules/pi-agent-search/src/core/extension.ts +8 -27
- package/node_modules/pi-agent-search/src/core/search-core.ts +38 -3
- package/node_modules/pi-agent-search-text/index.ts +82 -33
- package/node_modules/pi-agent-search-text/package.json +6 -6
- 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 +112 -24
- package/node_modules/pi-agent-text/package.json +2 -2
- package/node_modules/pi-agent-text/src/text-converter.ts +1 -1
- package/node_modules/pi-agent-text/src/text-document.ts +5 -0
- package/node_modules/pi-agent-text/src/text-target.ts +4 -0
- package/node_modules/pi-agent-text-anchor-constant/package.json +3 -3
- package/node_modules/pi-agent-text-anchor-exact/package.json +3 -3
- package/node_modules/pi-agent-text-anchor-line-hash/index.ts +2 -6
- package/node_modules/pi-agent-text-anchor-line-hash/package.json +5 -5
- package/node_modules/pi-agent-text-anchor-line-hash/src/read-handler.ts +1 -0
- package/node_modules/pi-agent-text-editor/index.ts +1 -3
- package/node_modules/pi-agent-text-editor/package.json +34 -24
- package/node_modules/pi-agent-text-editor/runtime/entry-69.js +0 -1
- package/node_modules/pi-agent-text-editor/src/api/apply-renderer.ts +3 -0
- package/node_modules/pi-agent-text-editor/src/api/edit-completion.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/api/edit-pipeline.ts +15 -0
- package/node_modules/pi-agent-text-editor/src/api/last-resolved-resource.ts +5 -0
- package/node_modules/pi-agent-text-editor/src/api/mutation-result.ts +3 -0
- package/node_modules/pi-agent-text-editor/src/api/plugin-protocol.ts +15 -1
- package/node_modules/pi-agent-text-editor/src/api/post-edit.ts +74 -1
- package/node_modules/pi-agent-text-editor/src/core/apply/execution.ts +237 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/final-mutations.ts +50 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/format-source.ts +11 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/mixed-source.ts +208 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/mutation-outcome.ts +39 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/output.ts +216 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/prompt.ts +45 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/queue.ts +25 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/renderer.ts +324 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/results.ts +133 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/runtime.ts +112 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/tool.ts +132 -0
- package/node_modules/pi-agent-text-editor/src/core/builtin-edit-filter.ts +4 -12
- package/node_modules/pi-agent-text-editor/src/core/diff-tool.ts +205 -0
- package/node_modules/pi-agent-text-editor/src/core/extension.ts +13 -9
- package/node_modules/pi-agent-text-editor/src/core/file-operation-tools.ts +76 -0
- package/node_modules/pi-agent-text-editor/src/core/file-operations.ts +153 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/diff.ts +5 -2
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +28 -2
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +43 -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/post-edit-scope.ts +73 -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-change-engine.ts +10 -2
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +40 -0
- package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +178 -58
- package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +313 -21
- 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-renderer/index.ts +93 -2
- 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 +69 -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 +24 -13
- package/node_modules/pi-agent-text-editor-renderer/src/status-summary.ts +33 -0
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +5 -5
- package/node_modules/pi-agent-tool-call-interception/package.json +3 -3
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-73.js +1 -0
- 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-web/index.ts +1 -6
- package/node_modules/pi-agent-web/package.json +7 -7
- package/node_modules/pi-agent-web/runtime/entry-75.js +2 -0
- package/node_modules/pi-agent-web/src/browser-loader.ts +1 -0
- 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/package.json +38 -38
- package/src/api/plugin-protocol.ts +12 -2
- package/src/api/text-editor.ts +7 -0
- package/src/api/tool-config.ts +77 -2
- package/src/code-view/diagnostic-view.ts +22 -3
- package/src/composite/builtin-extensions.ts +138 -67
- package/src/composite/extensions-config.ts +59 -0
- package/src/composite/feature-flags.ts +32 -0
- package/src/composite/module-labels.ts +55 -0
- package/src/composite/module-settings-store.ts +44 -0
- package/src/composite/module-settings.ts +132 -0
- package/src/composite/selection.ts +4 -4
- package/src/composite/settings-panel.ts +71 -0
- package/src/core/diagnostic-delivery.ts +29 -0
- package/src/core/diagnostic-entry.ts +142 -0
- package/src/core/diagnostic-store.ts +96 -23
- package/src/core/extension.ts +45 -22
- 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 +6 -6
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +3 -3
- 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/runtime/entry-76.js +2 -0
- 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/runtime/entry-75.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/browser-loader.ts +1 -0
- package/src/extensions/pi-agent-read/package.json +6 -6
- package/src/extensions/pi-agent-read/src/api/plugin-protocol.ts +1 -1
- package/src/extensions/pi-agent-read/src/api/read-parameters.ts +29 -0
- package/src/extensions/pi-agent-read/src/api/rendering.ts +3 -0
- package/src/extensions/pi-agent-read/src/api/tools/read.ts +73 -1
- package/src/extensions/pi-agent-read/src/core/read-core.ts +32 -28
- 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/output-truncation.ts +1 -1
- package/src/extensions/pi-agent-read/src/core/tools/read/raw-read.ts +113 -0
- package/src/extensions/pi-agent-read/src/core/tools/read/read-renderer.ts +87 -19
- package/src/extensions/pi-agent-read/src/core/tools/read/read-result.ts +15 -0
- package/src/extensions/pi-agent-read/src/core/tools/read/temp-resource-store.ts +35 -126
- package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +87 -53
- package/src/extensions/pi-agent-search/package.json +3 -3
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +82 -33
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +6 -6
- 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 +112 -24
- package/src/extensions/pi-agent-search/src/api/plugin-protocol.ts +1 -1
- package/src/extensions/pi-agent-search/src/api/search-parameters.ts +25 -0
- package/src/extensions/pi-agent-search/src/api/search.ts +55 -1
- package/src/extensions/pi-agent-search/src/core/extension.ts +8 -27
- package/src/extensions/pi-agent-search/src/core/search-core.ts +38 -3
- package/src/extensions/pi-agent-text-editor/index.ts +1 -3
- package/src/extensions/pi-agent-text-editor/package.json +34 -24
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +3 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +3 -3
- 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 +5 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/src/read-handler.ts +1 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/index.ts +93 -2
- 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 +69 -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 +24 -13
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/status-summary.ts +33 -0
- 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/runtime/entry-69.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-70.js +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/apply-renderer.ts +3 -0
- package/src/extensions/pi-agent-text-editor/src/api/edit-completion.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/edit-pipeline.ts +15 -0
- package/src/extensions/pi-agent-text-editor/src/api/last-resolved-resource.ts +5 -0
- package/src/extensions/pi-agent-text-editor/src/api/mutation-result.ts +3 -0
- package/src/extensions/pi-agent-text-editor/src/api/plugin-protocol.ts +15 -1
- package/src/extensions/pi-agent-text-editor/src/api/post-edit.ts +74 -1
- package/src/extensions/pi-agent-text-editor/src/core/apply/execution.ts +237 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/final-mutations.ts +50 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/format-source.ts +11 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/mixed-source.ts +208 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/mutation-outcome.ts +39 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/output.ts +216 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/prompt.ts +45 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/queue.ts +25 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/renderer.ts +324 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/results.ts +133 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/runtime.ts +112 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/tool.ts +132 -0
- package/src/extensions/pi-agent-text-editor/src/core/builtin-edit-filter.ts +4 -12
- package/src/extensions/pi-agent-text-editor/src/core/diff-tool.ts +205 -0
- package/src/extensions/pi-agent-text-editor/src/core/extension.ts +13 -9
- package/src/extensions/pi-agent-text-editor/src/core/file-operation-tools.ts +76 -0
- package/src/extensions/pi-agent-text-editor/src/core/file-operations.ts +153 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/diff.ts +5 -2
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +28 -2
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +43 -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/post-edit-scope.ts +73 -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-change-engine.ts +10 -2
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +40 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +178 -58
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +313 -21
- 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 +45 -0
- package/src/plugins/pi-agent-ide-ast/package.json +9 -9
- package/src/plugins/pi-agent-ide-ast/src/ast/outline.ts +89 -19
- package/src/plugins/pi-agent-ide-ast/src/extension.ts +11 -15
- package/src/plugins/pi-agent-ide-ast/src/overflow-handler.ts +83 -0
- package/src/plugins/pi-agent-ide-ast/src/scope-handler.ts +8 -1
- package/src/plugins/pi-agent-ide-ast/src/scope-resolver.ts +1 -1
- package/src/plugins/pi-agent-ide-ast/src/search-resolver.ts +83 -5
- package/src/plugins/pi-agent-ide-changes/index.ts +22 -10
- package/src/plugins/pi-agent-ide-changes/package.json +6 -6
- package/src/plugins/pi-agent-ide-changes/src/last-text-transaction-store.ts +10 -0
- package/src/plugins/pi-agent-ide-changes/src/tool-index-change.ts +5 -9
- package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +1 -5
- package/src/plugins/pi-agent-ide-diagnostics/src/extension.ts +62 -26
- package/src/plugins/pi-agent-ide-formatter/package.json +3 -3
- package/src/plugins/pi-agent-ide-formatter/src/formatter.ts +36 -13
- package/src/plugins/pi-agent-ide-formatter/src/registry.ts +9 -1
- package/src/plugins/pi-agent-ide-languages/package.json +2 -2
- package/src/plugins/pi-agent-ide-lint/index.ts +49 -17
- package/src/plugins/pi-agent-ide-lint/package.json +7 -7
- package/src/plugins/pi-agent-ide-lint/src/registry.ts +9 -1
- package/src/plugins/pi-agent-ide-lsp/index.ts +127 -20
- package/src/plugins/pi-agent-ide-lsp/package.json +9 -8
- package/src/plugins/pi-agent-ide-lsp/src/declaration-targets.ts +61 -0
- package/src/plugins/pi-agent-ide-lsp/src/diagnostic-source.ts +25 -7
- package/src/plugins/pi-agent-ide-lsp/src/lsp/client.ts +12 -1
- package/src/plugins/pi-agent-ide-lsp/src/lsp/code-views.ts +40 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/manager.ts +21 -32
- package/src/plugins/pi-agent-ide-lsp/src/lsp/registry.ts +15 -2
- package/src/plugins/pi-agent-ide-lsp/src/lsp/rename.ts +1 -1
- package/src/plugins/pi-agent-ide-lsp/src/lsp/symbol-search.ts +32 -5
- package/src/plugins/pi-agent-ide-lsp/src/rename-plan.ts +138 -0
- package/src/plugins/pi-agent-ide-lsp/src/search-resolver.ts +9 -2
- package/src/post-edit/gate.ts +57 -15
- package/src/toolchain/types.ts +2 -0
- package/dist/chunk-2SKAED2I.js +0 -2
- package/dist/chunk-2XYXV5HS.js +0 -4
- package/dist/chunk-2ZMYT6ZC.js +0 -1
- package/dist/chunk-34ZQTTU2.js +0 -2
- package/dist/chunk-4SQQKEVD.js +0 -16
- package/dist/chunk-5BWUVAR4.js +0 -1
- package/dist/chunk-6DN7NO7L.js +0 -1
- package/dist/chunk-6SMFVLTY.js +0 -1
- package/dist/chunk-6XQQBKPE.js +0 -58
- package/dist/chunk-BYWAG6X3.js +0 -6
- 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-JASLOB2X.js +0 -1
- package/dist/chunk-KH5KPBCR.js +0 -10
- package/dist/chunk-KNMWCDDK.js +0 -7
- package/dist/chunk-KYVOMBO5.js +0 -1
- package/dist/chunk-L4FA6OD4.js +0 -1
- package/dist/chunk-LFV6G5Z3.js +0 -1
- package/dist/chunk-LGN7EJYR.js +0 -13
- package/dist/chunk-MB6VVVAF.js +0 -2
- package/dist/chunk-MTQSGWZJ.js +0 -1
- package/dist/chunk-NI2NK4JU.js +0 -1
- package/dist/chunk-NXHPO7ER.js +0 -6
- package/dist/chunk-OFHVDY4Q.js +0 -2
- package/dist/chunk-OIL6BB2S.js +0 -33
- package/dist/chunk-ONWUJXUR.js +0 -1
- package/dist/chunk-PODWLGNO.js +0 -6
- package/dist/chunk-QZANC2IG.js +0 -1
- package/dist/chunk-SSZB66C3.js +0 -3
- package/dist/chunk-TG6H6EOI.js +0 -1
- package/dist/chunk-UTTW55S2.js +0 -1
- package/dist/chunk-VEJGSURY.js +0 -8
- package/dist/chunk-W3XYKJ5H.js +0 -1
- package/dist/chunk-XGUAL3CA.js +0 -1
- package/dist/chunk-YPHXLAQF.js +0 -1
- package/dist/chunk-ZIHEF6K3.js +0 -3
- package/dist/entry-80.js +0 -1
- package/node_modules/pi-agent-read/src/core/tools/read/views.ts +0 -29
- package/node_modules/pi-agent-text-editor/src/core/tool-description.ts +0 -14
- package/node_modules/pi-agent-text-editor-argument-order/index.ts +0 -26
- package/node_modules/pi-agent-text-editor-argument-order/package.json +0 -16
- package/node_modules/pi-agent-text-editor-argument-order/src/argument-order-guard.ts +0 -100
- package/node_modules/pi-agent-text-editor-overwrite/index.ts +0 -365
- package/node_modules/pi-agent-text-editor-overwrite/package.json +0 -17
- package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-73.js +0 -2
- package/node_modules/pi-agent-tool-ui/runtime/entry-75.js +0 -1
- package/node_modules/pi-agent-web-text/runtime/entry-80.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-80.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-76.js +0 -2
- package/src/extensions/pi-agent-read/src/core/tools/read/views.ts +0 -29
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/index.ts +0 -26
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/package.json +0 -16
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/runtime/entry-70.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/src/argument-order-guard.ts +0 -100
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/index.ts +0 -365
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/package.json +0 -17
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-73.js +0 -2
- package/src/extensions/pi-agent-text-editor/src/core/tool-description.ts +0 -14
- /package/dist/{chunk-3H2EU7VQ.js → chunk-4U2GUKNJ.js} +0 -0
- /package/node_modules/{pi-agent-text-editor-argument-order → pi-agent-text-editor}/runtime/entry-70.js +0 -0
- /package/node_modules/{pi-agent-text-editor-overwrite → pi-agent-text-editor-renderer}/runtime/entry-71.js +0 -0
- /package/node_modules/{pi-agent-text-editor-renderer → pi-agent-text-editor-stale-anchor}/runtime/entry-72.js +0 -0
- /package/node_modules/{pi-agent-tool-call-interception → pi-agent-tool-ui}/runtime/entry-74.js +0 -0
- /package/node_modules/{pi-agent-web → pi-agent-web-html}/runtime/entry-76.js +0 -0
- /package/node_modules/{pi-agent-web-html → pi-agent-web-image}/runtime/entry-77.js +0 -0
- /package/node_modules/{pi-agent-web-image → pi-agent-web-pdf}/runtime/entry-78.js +0 -0
- /package/node_modules/{pi-agent-web-pdf → pi-agent-web-text}/runtime/entry-79.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-html → pi-agent-web-image}/runtime/entry-77.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-image → pi-agent-web-pdf}/runtime/entry-78.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-pdf → pi-agent-web-text}/runtime/entry-79.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-overwrite → pi-agent-text-editor-renderer}/runtime/entry-71.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-renderer → pi-agent-text-editor-stale-anchor}/runtime/entry-72.js +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Buffer ready notifications at a fixed first-arrival deadline and serialize flushes. */
|
|
2
|
+
export function createDiagnosticDelivery(
|
|
3
|
+
flush: (cwd: string) => Promise<void>,
|
|
4
|
+
delayMs: number,
|
|
5
|
+
onError: (error: unknown) => void = console.error,
|
|
6
|
+
): { schedule(cwd: string): void; dispose(): void } {
|
|
7
|
+
const timers = new Map<string, ReturnType<typeof setTimeout>>();
|
|
8
|
+
let closed = false;
|
|
9
|
+
let pending = Promise.resolve();
|
|
10
|
+
return {
|
|
11
|
+
schedule(cwd) {
|
|
12
|
+
if (closed || timers.has(cwd)) return;
|
|
13
|
+
const timer = setTimeout(() => {
|
|
14
|
+
timers.delete(cwd);
|
|
15
|
+
pending = pending
|
|
16
|
+
.then(async () => {
|
|
17
|
+
if (!closed) await flush(cwd);
|
|
18
|
+
})
|
|
19
|
+
.catch(onError);
|
|
20
|
+
}, delayMs);
|
|
21
|
+
timers.set(cwd, timer);
|
|
22
|
+
},
|
|
23
|
+
dispose() {
|
|
24
|
+
closed = true;
|
|
25
|
+
for (const timer of timers.values()) clearTimeout(timer);
|
|
26
|
+
timers.clear();
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
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<
|
|
72
|
+
DiagnosticEntryData | { readonly files: readonly DiagnosticEntryData[] }
|
|
73
|
+
>(DIAGNOSTIC_ENTRY_TYPE, (entry, options, theme) => {
|
|
74
|
+
const data = requiredValue(entry.data);
|
|
75
|
+
return "files" in data
|
|
76
|
+
? renderDiagnosticBatch(data.files, theme, options.expanded)
|
|
77
|
+
: renderDiagnosticEntry(data, theme, options.expanded);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** One stable summary per delivery; expansion retains each file and provider. */
|
|
82
|
+
export function renderDiagnosticBatch(
|
|
83
|
+
files: readonly DiagnosticEntryData[],
|
|
84
|
+
theme: Theme,
|
|
85
|
+
expanded = false,
|
|
86
|
+
): Component {
|
|
87
|
+
return {
|
|
88
|
+
render(width) {
|
|
89
|
+
const visible = files.filter((file) =>
|
|
90
|
+
file.sources.some(
|
|
91
|
+
(source) =>
|
|
92
|
+
source.status !== "pending" &&
|
|
93
|
+
source.status !== "unavailable" &&
|
|
94
|
+
Object.values(source.counts).some((count) => count > 0),
|
|
95
|
+
),
|
|
96
|
+
);
|
|
97
|
+
if (visible.length === 1 && visible[0])
|
|
98
|
+
return renderDiagnosticEntry(visible[0], theme, expanded).render(width);
|
|
99
|
+
if (visible.length === 0) return [];
|
|
100
|
+
const counts = { error: 0, warning: 0, info: 0, hint: 0 };
|
|
101
|
+
const providers = new Set<string>();
|
|
102
|
+
for (const file of visible)
|
|
103
|
+
for (const source of file.sources) {
|
|
104
|
+
if (source.status === "pending" || source.status === "unavailable") continue;
|
|
105
|
+
providers.add(source.source);
|
|
106
|
+
for (const severity of ["error", "warning", "info", "hint"] as const)
|
|
107
|
+
counts[severity] += source.counts[severity];
|
|
108
|
+
}
|
|
109
|
+
const head = new Text(
|
|
110
|
+
`${theme.fg("accent", "Diagnostics")} · ${visible.length} files · ${renderCounts(counts, theme)} · ${providers.size} tools`,
|
|
111
|
+
0,
|
|
112
|
+
0,
|
|
113
|
+
).render(width);
|
|
114
|
+
return expanded
|
|
115
|
+
? [
|
|
116
|
+
...head,
|
|
117
|
+
...visible.flatMap((file) => renderDiagnosticEntry(file, theme, true).render(width)),
|
|
118
|
+
]
|
|
119
|
+
: head;
|
|
120
|
+
},
|
|
121
|
+
invalidate() {},
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function renderCounts(
|
|
125
|
+
counts: DiagnosticEntryData["sources"][number]["counts"],
|
|
126
|
+
theme: Theme,
|
|
127
|
+
): string {
|
|
128
|
+
return (["error", "warning", "info", "hint"] as const)
|
|
129
|
+
.filter((severity) => counts[severity] > 0)
|
|
130
|
+
.map((severity) => {
|
|
131
|
+
const count = counts[severity];
|
|
132
|
+
const label = severity === "info" || count === 1 ? severity : `${severity}s`;
|
|
133
|
+
const color =
|
|
134
|
+
count > 0 && (severity === "error" || severity === "warning") ? severity : "muted";
|
|
135
|
+
return theme.fg(color, `${count} ${label}`);
|
|
136
|
+
})
|
|
137
|
+
.join(", ");
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function plain(value: string): string {
|
|
141
|
+
return value.replace(/[\u0000-\u001f\u007f-\u009f]/g, " ");
|
|
142
|
+
}
|
|
@@ -3,12 +3,20 @@ import path from "node:path";
|
|
|
3
3
|
|
|
4
4
|
import type {
|
|
5
5
|
IdeDiagnosticReport,
|
|
6
|
+
IdeDiagnosticReadContext,
|
|
6
7
|
IdeDiagnosticResult,
|
|
7
8
|
IdeDiagnosticSnapshot,
|
|
8
9
|
IdeDiagnosticSource,
|
|
9
10
|
} from "#src/api/plugin-protocol.js";
|
|
10
11
|
import type { ToolContext } from "#src/toolchain/types.js";
|
|
11
12
|
|
|
13
|
+
/** Nonempty findings shared by hidden model delivery and a separate UI summary. */
|
|
14
|
+
export interface DiagnosticNotification {
|
|
15
|
+
readonly filePath: string;
|
|
16
|
+
readonly results: readonly IdeDiagnosticResult[];
|
|
17
|
+
readonly text: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
12
20
|
interface FileState {
|
|
13
21
|
readonly cwd: string;
|
|
14
22
|
readonly filePath: string;
|
|
@@ -27,6 +35,13 @@ export class DiagnosticStore {
|
|
|
27
35
|
private readonly queue: (() => Promise<void>)[] = [];
|
|
28
36
|
private running = 0;
|
|
29
37
|
private disposed = false;
|
|
38
|
+
private readonly changeListeners = new Set<(cwd: string, findings: boolean) => void>();
|
|
39
|
+
|
|
40
|
+
/** Observe published reports immediately, independently of agent turns. */
|
|
41
|
+
onDidChange(listener: (cwd: string, findings: boolean) => void): () => void {
|
|
42
|
+
this.changeListeners.add(listener);
|
|
43
|
+
return () => this.changeListeners.delete(listener);
|
|
44
|
+
}
|
|
30
45
|
|
|
31
46
|
constructor(
|
|
32
47
|
private readonly sources: readonly IdeDiagnosticSource[],
|
|
@@ -43,55 +58,107 @@ export class DiagnosticStore {
|
|
|
43
58
|
}
|
|
44
59
|
|
|
45
60
|
/** Read one current text snapshot; never label unfinished checks as clean. */
|
|
46
|
-
async read(
|
|
61
|
+
async read(
|
|
62
|
+
filePath: string,
|
|
63
|
+
{ cwd, mode, signal }: IdeDiagnosticReadContext,
|
|
64
|
+
): Promise<IdeDiagnosticSnapshot> {
|
|
65
|
+
signal?.throwIfAborted();
|
|
47
66
|
this.assertActive();
|
|
48
67
|
const absolute = path.resolve(cwd, filePath);
|
|
49
68
|
const content = await readFile(absolute, "utf8");
|
|
50
69
|
this.assertActive();
|
|
51
70
|
const state = this.ensure(absolute, content, cwd);
|
|
52
|
-
await
|
|
71
|
+
if (mode === "complete") await this.waitComplete(state, signal);
|
|
72
|
+
else if (mode !== "snapshot")
|
|
73
|
+
await waitAtMost(Promise.all(state.jobs), this.options.readWaitMs ?? 5000);
|
|
74
|
+
signal?.throwIfAborted();
|
|
53
75
|
this.assertActive();
|
|
54
76
|
const currentText = await readFile(absolute, "utf8");
|
|
55
77
|
this.assertActive();
|
|
56
78
|
const current = this.ensure(absolute, currentText, cwd);
|
|
79
|
+
if (mode === "complete" && current !== state)
|
|
80
|
+
throw Object.assign(new Error("File changed during diagnostics"), {
|
|
81
|
+
code: "DIAGNOSTICS_STALE",
|
|
82
|
+
});
|
|
57
83
|
return { filePath: absolute, content: current.content, results: [...current.results.values()] };
|
|
58
84
|
}
|
|
59
85
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
86
|
+
private async waitComplete(state: FileState, signal?: AbortSignal): Promise<void> {
|
|
87
|
+
const combined = signal
|
|
88
|
+
? AbortSignal.any([signal, state.controller.signal])
|
|
89
|
+
: state.controller.signal;
|
|
90
|
+
combined.throwIfAborted();
|
|
91
|
+
const cleanupWaiters: (() => void)[] = [];
|
|
92
|
+
await new Promise<void>((resolve, reject) => {
|
|
93
|
+
const fail = (code: string) =>
|
|
94
|
+
reject(Object.assign(new Error(code), { code, details: [...state.results.values()] }));
|
|
95
|
+
const check = () => {
|
|
96
|
+
const results = [...state.results.values()];
|
|
97
|
+
if (results.some((result) => result.status === "unavailable"))
|
|
98
|
+
fail("DIAGNOSTICS_UNAVAILABLE");
|
|
99
|
+
else if (results.every((result) => result.status === "ready")) resolve();
|
|
100
|
+
};
|
|
101
|
+
const abort = () => reject(combined.reason);
|
|
102
|
+
const detach = this.onDidChange(check);
|
|
103
|
+
const timer = setTimeout(
|
|
104
|
+
() => fail("DIAGNOSTICS_TIMEOUT"),
|
|
105
|
+
this.options.checkTimeoutMs ?? 30_000,
|
|
106
|
+
);
|
|
107
|
+
combined.addEventListener("abort", abort, { once: true });
|
|
108
|
+
const cleanup = () => {
|
|
109
|
+
clearTimeout(timer);
|
|
110
|
+
detach();
|
|
111
|
+
combined.removeEventListener("abort", abort);
|
|
112
|
+
};
|
|
113
|
+
// Cleanup follows either outcome without changing the original rejection.
|
|
114
|
+
void Promise.resolve().then(check);
|
|
115
|
+
cleanupWaiters.push(cleanup);
|
|
116
|
+
}).finally(() => {
|
|
117
|
+
for (const cleanup of cleanupWaiters) cleanup();
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
/** Drain current findings for delivery; pending, unavailable and empty reports stay silent. */
|
|
121
|
+
async takeNotifications(cwd: string): Promise<DiagnosticNotification[]> {
|
|
122
|
+
const notifications: DiagnosticNotification[] = [];
|
|
63
123
|
for (const state of [...this.dirty]) {
|
|
64
124
|
if (state.cwd !== path.resolve(cwd)) continue;
|
|
65
125
|
this.dirty.delete(state);
|
|
66
126
|
if (!(await this.isCurrent(state))) continue;
|
|
67
|
-
const results = [...state.results.values()]
|
|
127
|
+
const results = [...state.results.values()].filter(
|
|
128
|
+
(result) =>
|
|
129
|
+
result.status !== "pending" &&
|
|
130
|
+
result.status !== "unavailable" &&
|
|
131
|
+
result.diagnostics.length > 0,
|
|
132
|
+
);
|
|
133
|
+
const key = this.key(state.filePath, state.cwd);
|
|
134
|
+
// Fingerprint only findings: empty provider updates must not resend the same report.
|
|
135
|
+
const fingerprint = JSON.stringify(results);
|
|
136
|
+
if (this.sent.get(key) === fingerprint) continue;
|
|
137
|
+
this.sent.set(key, fingerprint);
|
|
138
|
+
// Remember the empty state so a later recurrence can notify again.
|
|
139
|
+
if (results.length === 0) continue;
|
|
68
140
|
const summary = results
|
|
69
141
|
.map((result) => {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
(severity) =>
|
|
75
|
-
`${result.diagnostics.filter((item) => item.severity === severity).length} ${severity}`,
|
|
76
|
-
);
|
|
142
|
+
const counts = ["error", "warning", "info", "hint"].flatMap((severity) => {
|
|
143
|
+
const count = result.diagnostics.filter((item) => item.severity === severity).length;
|
|
144
|
+
return count > 0 ? [`${count} ${severity}`] : [];
|
|
145
|
+
});
|
|
77
146
|
return `${result.source} ${counts.join(", ")}${result.status === "snapshot" ? " (snapshot; completion unknown)" : result.status === "unversioned" ? " (unversioned)" : ""}`;
|
|
78
147
|
})
|
|
79
148
|
.join("; ");
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
lines.push(
|
|
86
|
-
`${JSON.stringify(path.relative(cwd, state.filePath))}: ${summary || "no diagnostic sources"}.`,
|
|
87
|
-
);
|
|
149
|
+
notifications.push({
|
|
150
|
+
filePath: path.relative(cwd, state.filePath),
|
|
151
|
+
results,
|
|
152
|
+
text: `${JSON.stringify(path.relative(cwd, state.filePath))}: ${summary}.`,
|
|
153
|
+
});
|
|
88
154
|
}
|
|
89
|
-
return
|
|
155
|
+
return notifications;
|
|
90
156
|
}
|
|
91
157
|
|
|
92
158
|
/** Invalidate all revision-bound callbacks and cancel session-owned work. */
|
|
93
159
|
dispose(): void {
|
|
94
160
|
this.disposed = true;
|
|
161
|
+
this.changeListeners.clear();
|
|
95
162
|
for (const state of this.files.values()) state.controller.abort();
|
|
96
163
|
this.files.clear();
|
|
97
164
|
this.dirty.clear();
|
|
@@ -181,10 +248,16 @@ export class DiagnosticStore {
|
|
|
181
248
|
const publication = (state.publications.get(source) ?? 0) + 1;
|
|
182
249
|
state.publications.set(source, publication);
|
|
183
250
|
if (!(await this.isCurrent(state)) || state.publications.get(source) !== publication) return;
|
|
184
|
-
const result: IdeDiagnosticResult = {
|
|
251
|
+
const result: IdeDiagnosticResult = { ...report, source: report.source ?? source };
|
|
185
252
|
if (JSON.stringify(state.results.get(source)) === JSON.stringify(result)) return;
|
|
186
253
|
state.results.set(source, result);
|
|
187
254
|
this.dirty.add(state);
|
|
255
|
+
const findings = [...state.results.values()].some(
|
|
256
|
+
(item) =>
|
|
257
|
+
item.status !== "pending" && item.status !== "unavailable" && item.diagnostics.length > 0,
|
|
258
|
+
);
|
|
259
|
+
if (!findings) this.sent.delete(this.key(state.filePath, state.cwd));
|
|
260
|
+
for (const listener of this.changeListeners) listener(state.cwd, findings);
|
|
188
261
|
}
|
|
189
262
|
|
|
190
263
|
private async check(state: FileState, source: IdeDiagnosticSource): Promise<void> {
|
package/src/core/extension.ts
CHANGED
|
@@ -6,9 +6,18 @@ import {
|
|
|
6
6
|
isIdePluginRegistrationRequest,
|
|
7
7
|
} from "#src/api/plugin-protocol.js";
|
|
8
8
|
import { createIdeCore } from "#src/core/ide-core.js";
|
|
9
|
+
import { createDiagnosticDelivery } from "#src/core/diagnostic-delivery.js";
|
|
10
|
+
import {
|
|
11
|
+
diagnosticEntryData,
|
|
12
|
+
DIAGNOSTIC_ENTRY_TYPE,
|
|
13
|
+
registerDiagnosticEntryRenderer,
|
|
14
|
+
} from "#src/core/diagnostic-entry.js";
|
|
9
15
|
import { runIdePostEditGate } from "#src/post-edit/gate.js";
|
|
10
16
|
import { resetRegistry } from "#src/toolchain/registry.js";
|
|
11
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
connectTextEditorPostEditHandler,
|
|
19
|
+
afterPostEditScope,
|
|
20
|
+
} from "pi-agent-text-editor/api/post-edit";
|
|
12
21
|
|
|
13
22
|
import path from "node:path";
|
|
14
23
|
import { connectTextEditorPlugin } from "pi-agent-text-editor/api/connect-plugin";
|
|
@@ -20,13 +29,9 @@ import {
|
|
|
20
29
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
21
30
|
|
|
22
31
|
export default async function registerPiAgentIde(pi: ExtensionAPI): Promise<void> {
|
|
23
|
-
pi.registerFlag("old-tools", {
|
|
24
|
-
description: "Use the old IDE and text editor tools",
|
|
25
|
-
type: "boolean",
|
|
26
|
-
default: false,
|
|
27
|
-
});
|
|
28
32
|
resetRegistry();
|
|
29
33
|
const core = createIdeCore();
|
|
34
|
+
registerDiagnosticEntryRenderer(pi);
|
|
30
35
|
const unsubscribePlugins = pi.events.on(IDE_PLUGIN_REGISTER_EVENT, (request) => {
|
|
31
36
|
if (!isIdePluginRegistrationRequest(request)) {
|
|
32
37
|
throw new Error("Invalid pi-agent-ide plugin registration request");
|
|
@@ -41,7 +46,10 @@ export default async function registerPiAgentIde(pi: ExtensionAPI): Promise<void
|
|
|
41
46
|
});
|
|
42
47
|
connectTextEditorPostEditHandler(pi, {
|
|
43
48
|
id: "pi-agent-ide",
|
|
44
|
-
handler:
|
|
49
|
+
handler: (transaction) =>
|
|
50
|
+
pi.getFlag("pi-agent-ide-no-post-processing") === true
|
|
51
|
+
? Promise.resolve({ formatting: { status: "disabled" } })
|
|
52
|
+
: runIdePostEditGate(transaction),
|
|
45
53
|
});
|
|
46
54
|
pi.events.emit(IDE_CORE_READY_EVENT, {
|
|
47
55
|
protocol: IDE_PROTOCOL,
|
|
@@ -54,30 +62,45 @@ export default async function registerPiAgentIde(pi: ExtensionAPI): Promise<void
|
|
|
54
62
|
id: "ide-diagnostics",
|
|
55
63
|
setup(api) {
|
|
56
64
|
api.onDidEdit((completion) => {
|
|
65
|
+
if (
|
|
66
|
+
pi.getFlag("pi-agent-ide-no-post-processing") === true ||
|
|
67
|
+
completion.postProcessing === "deferred"
|
|
68
|
+
)
|
|
69
|
+
return;
|
|
57
70
|
if (path.isAbsolute(completion.resourceSource)) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
71
|
+
afterPostEditScope(() =>
|
|
72
|
+
core.diagnostics.schedule(completion.resourceSource, completion.after.content, {
|
|
73
|
+
cwd: completion.cwd,
|
|
74
|
+
}),
|
|
75
|
+
);
|
|
61
76
|
}
|
|
62
77
|
});
|
|
63
78
|
},
|
|
64
79
|
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
...event.messages,
|
|
80
|
+
let closed = false;
|
|
81
|
+
const delivery = createDiagnosticDelivery(
|
|
82
|
+
async (cwd) => {
|
|
83
|
+
const notifications = await core.diagnostics.takeNotifications(cwd);
|
|
84
|
+
if (closed || notifications.length === 0) return;
|
|
85
|
+
pi.sendMessage(
|
|
72
86
|
{
|
|
73
|
-
role: "custom" as const,
|
|
74
87
|
customType: "ide-diagnostics",
|
|
75
88
|
display: false,
|
|
76
|
-
content: `File diagnostics:\n${
|
|
77
|
-
timestamp: Date.now(),
|
|
89
|
+
content: `File diagnostics:\n${notifications.map((item) => item.text).join("\n")}`,
|
|
78
90
|
},
|
|
79
|
-
|
|
80
|
-
|
|
91
|
+
{ triggerTurn: true, deliverAs: "steer" },
|
|
92
|
+
);
|
|
93
|
+
pi.appendEntry(DIAGNOSTIC_ENTRY_TYPE, { files: notifications.map(diagnosticEntryData) });
|
|
94
|
+
},
|
|
95
|
+
pi.getFlag("pi-agent-ide-no-diagnostic-buffer") === true ? 0 : 5000,
|
|
96
|
+
);
|
|
97
|
+
const unsubscribeDiagnostics = core.diagnostics.onDidChange((cwd, findings) => {
|
|
98
|
+
if (findings) delivery.schedule(cwd);
|
|
99
|
+
});
|
|
100
|
+
pi.on("session_shutdown", () => {
|
|
101
|
+
closed = true;
|
|
102
|
+
delivery.dispose();
|
|
103
|
+
unsubscribeDiagnostics();
|
|
81
104
|
});
|
|
82
105
|
|
|
83
106
|
await core.waitForPendingPlugins();
|
|
@@ -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,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-image": "0.
|
|
10
|
-
"pi-agent-read": "0.
|
|
11
|
-
"pi-agent-resource": "0.
|
|
12
|
-
"pi-agent-text": "0.
|
|
13
|
-
"pi-agent-text-editor": "0.
|
|
9
|
+
"pi-agent-image": "0.3.0",
|
|
10
|
+
"pi-agent-read": "0.3.0",
|
|
11
|
+
"pi-agent-resource": "0.3.0",
|
|
12
|
+
"pi-agent-text": "0.3.0",
|
|
13
|
+
"pi-agent-text-editor": "0.3.0"
|
|
14
14
|
},
|
|
15
15
|
"pi": {
|
|
16
16
|
"extensions": [
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-image",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#extension": "./index.ts"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-image": "0.
|
|
10
|
-
"pi-agent-resource": "0.
|
|
9
|
+
"pi-agent-image": "0.3.0",
|
|
10
|
+
"pi-agent-resource": "0.3.0"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-pdf",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-pdf": "0.
|
|
7
|
-
"pi-agent-resource": "0.
|
|
6
|
+
"pi-agent-pdf": "0.3.0",
|
|
7
|
+
"pi-agent-resource": "0.3.0"
|
|
8
8
|
},
|
|
9
9
|
"pi": {
|
|
10
10
|
"extensions": [
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-text",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#extension": "./index.ts"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-resource": "0.
|
|
10
|
-
"pi-agent-text": "0.
|
|
9
|
+
"pi-agent-resource": "0.3.0",
|
|
10
|
+
"pi-agent-text": "0.3.0"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
@@ -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.
|
|
3
|
+
"version": "0.3.0",
|
|
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.
|
|
12
|
-
"pi-agent-image": "0.
|
|
13
|
-
"pi-agent-read": "0.
|
|
14
|
-
"pi-agent-resource": "0.
|
|
15
|
-
"pi-agent-text": "0.
|
|
11
|
+
"pi-agent-doctor": "0.3.0",
|
|
12
|
+
"pi-agent-image": "0.3.0",
|
|
13
|
+
"pi-agent-read": "0.3.0",
|
|
14
|
+
"pi-agent-resource": "0.3.0",
|
|
15
|
+
"pi-agent-text": "0.3.0",
|
|
16
16
|
"playwright-core": "^1.62.1"
|
|
17
17
|
},
|
|
18
18
|
"pi": {
|
|
19
19
|
"extensions": [
|
|
20
|
-
"./runtime/entry-
|
|
20
|
+
"./runtime/entry-75.js"
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-web-html",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"defuddle": "^0.19.1",
|
|
10
10
|
"linkedom": "^0.18.12",
|
|
11
|
-
"pi-agent-resource": "0.
|
|
11
|
+
"pi-agent-resource": "0.3.0"
|
|
12
12
|
},
|
|
13
13
|
"pi": {
|
|
14
14
|
"extensions": [
|
|
15
|
-
"./runtime/entry-
|
|
15
|
+
"./runtime/entry-76.js"
|
|
16
16
|
]
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
@@ -8,7 +8,7 @@ const htmlSignature = /^\u{FEFF}?\s*(?:<!doctype\s+html\b|<(?:article|body|head|
|
|
|
8
8
|
export function createHtmlContentConverter(): ContentConverter {
|
|
9
9
|
return {
|
|
10
10
|
id: "html",
|
|
11
|
-
description: "
|
|
11
|
+
description: "Web page URLs return readable page content.",
|
|
12
12
|
async tryConvert(input, context) {
|
|
13
13
|
if (!isHtmlInput(input.bytes, input.mediaType)) {
|
|
14
14
|
return { kind: "not-handled" };
|
package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-web-image",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-image": "0.
|
|
7
|
-
"pi-agent-resource": "0.
|
|
6
|
+
"pi-agent-image": "0.3.0",
|
|
7
|
+
"pi-agent-resource": "0.3.0"
|
|
8
8
|
},
|
|
9
9
|
"pi": {
|
|
10
10
|
"extensions": [
|
|
11
|
-
"./runtime/entry-
|
|
11
|
+
"./runtime/entry-77.js"
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|