pi-agent-ide 0.8.0 → 0.8.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 +70 -40
- package/README.md +15 -8
- package/dist/{chunk-ICDI27GZ.js → chunk-235QMMVA.js} +1 -1
- package/dist/{chunk-N7LMRL64.js → chunk-47SPPIXK.js} +1 -1
- package/dist/chunk-4DIUPEDF.js +2 -0
- package/dist/{chunk-JMVDFOTQ.js → chunk-57F5GTHO.js} +1 -1
- package/dist/{chunk-NULNW6GK.js → chunk-6FGLAVPJ.js} +1 -1
- package/dist/{chunk-KL776TGR.js → chunk-6H32W35W.js} +1 -1
- package/dist/{chunk-QP2QSQ4U.js → chunk-6OJ565FL.js} +1 -1
- package/dist/{chunk-TWWND6NI.js → chunk-6R3Y4AD3.js} +1 -1
- package/dist/{chunk-CPZJPGLG.js → chunk-6T7PSDQW.js} +1 -1
- package/dist/{chunk-4OYVLXWD.js → chunk-6TJPMBUQ.js} +1 -1
- package/dist/{chunk-SBLKPTL3.js → chunk-6XFUICD7.js} +1 -1
- package/dist/chunk-7VSVJRRF.js +28 -0
- package/dist/{chunk-7JV4VN73.js → chunk-AAC77UD4.js} +1 -1
- package/dist/chunk-ANM3Y5FO.js +11 -0
- package/dist/chunk-BB4A5UI3.js +5 -0
- package/dist/{chunk-7TJ6DWW3.js → chunk-CPELC6JE.js} +1 -1
- package/dist/chunk-FTPC44FP.js +33 -0
- package/dist/{chunk-SBNR4WZF.js → chunk-GSOYVIQS.js} +1 -1
- package/dist/{chunk-Z3PGADVA.js → chunk-HSRH76JN.js} +1 -1
- package/dist/{chunk-CSXHCSTH.js → chunk-HSZ4AQ6L.js} +1 -1
- package/dist/chunk-I6NPILT5.js +1 -0
- package/dist/chunk-K7SRNBIV.js +1 -0
- package/dist/{chunk-R5XJSEOE.js → chunk-LCWBVOII.js} +3 -3
- package/dist/{chunk-MZXX353D.js → chunk-LEJKDYCK.js} +1 -1
- package/dist/{chunk-3G54ZL2L.js → chunk-NJ7C4KMA.js} +1 -1
- package/dist/{chunk-CTJV77FR.js → chunk-NUM3YQGK.js} +1 -1
- package/dist/chunk-OJEIX7OZ.js +1 -0
- package/dist/{chunk-EY65TFHJ.js → chunk-PJL3UVMJ.js} +1 -1
- package/dist/{chunk-E4HPRLRB.js → chunk-QT3EAHOG.js} +1 -1
- package/dist/{chunk-HCN5W76B.js → chunk-RIJMXO43.js} +1 -1
- package/dist/chunk-RMI3NMQY.js +23 -0
- package/dist/chunk-RQ7JJ7GV.js +4 -0
- package/dist/{chunk-4XPUN4QN.js → chunk-RVU73VKN.js} +1 -1
- package/dist/{chunk-OJX3RJ5A.js → chunk-RW2GTYQI.js} +1 -1
- package/dist/{chunk-PNP2KNGP.js → chunk-SDAH3ECM.js} +1 -1
- package/dist/chunk-SGQWRIRJ.js +10 -0
- package/dist/{chunk-IUSLSROY.js → chunk-SMIFCAAX.js} +1 -1
- package/dist/chunk-SWBJS3U4.js +1 -0
- package/dist/chunk-T7MWQQIF.js +3 -0
- package/dist/{chunk-RAZP42IQ.js → chunk-VAXLSPPU.js} +1 -1
- package/dist/{chunk-XZDOVPRC.js → chunk-VMTOFEXF.js} +1 -1
- package/dist/{chunk-7HDK3NRQ.js → chunk-VXP5BMW7.js} +1 -1
- package/dist/{chunk-WE42GBGU.js → chunk-XAHU42FP.js} +3 -3
- package/dist/{chunk-UBH6X3D3.js → chunk-XBQR74IK.js} +1 -1
- package/dist/{chunk-7NS3QUIE.js → chunk-XG7QNAKW.js} +1 -1
- package/dist/{chunk-GW6NZQTQ.js → chunk-XLWCSJMR.js} +1 -1
- package/dist/{chunk-2K65BSXS.js → chunk-XXLLY66B.js} +1 -1
- package/dist/chunk-YFP4P2FV.js +1 -0
- package/dist/{chunk-75SWXD2Z.js → chunk-YIXP2ALP.js} +1 -1
- package/dist/{chunk-MOJ5RR35.js → chunk-ZJQRLVVV.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-15.js +1 -1
- package/dist/entry-16.js +1 -1
- package/dist/entry-17.js +1 -1
- package/dist/entry-18.js +1 -0
- package/dist/entry-19.js +1 -1
- package/dist/entry-2.js +1 -1
- package/dist/entry-20.js +1 -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 +1 -2
- package/dist/entry-27.js +1 -1
- package/dist/entry-28.js +1 -4
- package/dist/entry-29.js +2 -1
- package/dist/entry-3.js +1 -1
- package/dist/entry-30.js +1 -1
- package/dist/entry-31.js +4 -1
- package/dist/entry-32.js +1 -18
- package/dist/entry-33.js +1 -1
- package/dist/entry-34.js +1 -1
- package/dist/entry-35.js +18 -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 +1 -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 +1 -1
- package/dist/entry-46.js +1 -25
- package/dist/entry-47.js +1 -1
- package/dist/entry-48.js +1 -1
- package/dist/entry-49.js +25 -1
- package/dist/entry-5.js +1 -1
- package/dist/entry-50.js +1 -1
- package/dist/entry-51.js +1 -3
- package/dist/entry-52.js +1 -13
- package/dist/entry-53.js +1 -1
- package/dist/entry-54.js +3 -1
- package/dist/entry-55.js +13 -1
- package/dist/entry-56.js +1 -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-6.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 +1 -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 +0 -1
- package/dist/entry-68.js +1 -1
- package/dist/entry-69.js +1 -1
- package/dist/entry-7.js +1 -1
- package/dist/entry-70.js +1 -1
- package/dist/entry-71.js +1 -1
- package/dist/entry-72.js +1 -0
- package/dist/entry-73.js +1 -1
- package/dist/entry-74.js +1 -0
- package/dist/entry-75.js +0 -1
- package/dist/entry-76.js +1 -1
- package/dist/entry-77.js +0 -1
- package/dist/entry-78.js +1 -80
- package/dist/entry-79.js +1 -21
- package/dist/entry-8.js +1 -1
- package/dist/entry-80.js +1 -2
- package/dist/entry-81.js +80 -1
- package/dist/entry-82.js +22 -1
- package/dist/entry-83.js +2 -1
- package/dist/entry-84.js +1 -3
- package/dist/entry-85.js +1 -1
- package/dist/entry-86.js +1 -1
- package/dist/entry-87.js +1 -1
- package/dist/entry-88.js +3 -0
- package/dist/entry-89.js +1 -0
- package/dist/entry-9.js +1 -1
- package/dist/entry-90.js +1 -0
- package/dist/entry-91.js +1 -0
- package/dist/pi-agent-ide.js +53 -31
- package/docs/agent-guides/debugger.md +2 -0
- package/docs/agent-guides/editing.md +3 -3
- package/docs/agent-guides/search-code.md +5 -3
- package/docs/agent-guides/select-code.md +9 -6
- package/docs/agent-guides/ssh.md +1 -1
- package/docs/code-review.md +5 -0
- package/docs/configuration.md +52 -8
- package/docs/development.md +9 -13
- package/docs/directory-operations.md +1 -1
- package/docs/extensions.md +99 -2
- package/docs/releases.md +1 -1
- package/docs/settings-help.md +39 -0
- package/docs/structured-results.md +11 -6
- package/docs/tools.md +1 -0
- package/docs/user-hooks.md +4 -2
- package/node_modules/pi-agent-doctor/package.json +7 -10
- package/node_modules/pi-agent-doctor/runtime/entry-26.js +1 -0
- package/node_modules/pi-agent-doctor/runtime/entry-27.js +1 -0
- package/node_modules/pi-agent-documentation/package.json +2 -2
- package/node_modules/pi-agent-documentation/runtime/entry-28.js +1 -0
- package/node_modules/pi-agent-filesystem/package.json +8 -8
- package/node_modules/pi-agent-filesystem-image/package.json +4 -4
- package/node_modules/pi-agent-filesystem-jq/package.json +6 -7
- package/node_modules/pi-agent-filesystem-jq/runtime/entry-31.js +2 -0
- 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-33.js +2 -0
- package/node_modules/pi-agent-ide-ast/package.json +15 -41
- package/node_modules/pi-agent-ide-ast/runtime/entry-34.js +1 -0
- package/node_modules/pi-agent-ide-ast/src/select-schema.ts +6 -5
- package/node_modules/pi-agent-ide-changes/package.json +10 -11
- package/node_modules/pi-agent-ide-changes/runtime/entry-36.js +1 -0
- package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +6 -5
- package/node_modules/pi-agent-ide-formatter/package.json +4 -4
- package/node_modules/pi-agent-ide-languages/package.json +3 -3
- package/node_modules/pi-agent-ide-languages/runtime/entry-39.js +2 -0
- package/node_modules/pi-agent-ide-lint/package.json +8 -8
- package/node_modules/pi-agent-ide-lint/runtime/entry-40.js +2 -0
- package/node_modules/pi-agent-ide-lsp/package.json +10 -13
- package/node_modules/pi-agent-ide-lsp/runtime/entry-41.js +2 -0
- package/node_modules/pi-agent-image/package.json +3 -3
- package/node_modules/pi-agent-invariant/package.json +2 -2
- package/node_modules/pi-agent-pdf/package.json +3 -4
- package/node_modules/pi-agent-read/package.json +12 -12
- package/node_modules/pi-agent-read/runtime/entry-46.js +0 -1
- package/node_modules/pi-agent-read/runtime/entry-49.js +2 -0
- package/node_modules/pi-agent-resource/package.json +2 -2
- package/node_modules/pi-agent-resource/src/resource-error.ts +11 -0
- package/node_modules/pi-agent-resource/src/result-targets.ts +9 -0
- package/node_modules/pi-agent-search/package.json +9 -9
- package/node_modules/pi-agent-search/runtime/entry-51.js +0 -1
- package/node_modules/pi-agent-search/runtime/entry-52.js +1 -0
- package/node_modules/pi-agent-search/runtime/entry-54.js +2 -0
- package/node_modules/pi-agent-search/src/api/plugin-protocol.ts +1 -1
- package/node_modules/pi-agent-search/src/api/presentation.ts +10 -2
- package/node_modules/pi-agent-search/src/api/search-parameters.ts +6 -5
- package/node_modules/pi-agent-search/src/api/search.ts +7 -0
- package/node_modules/pi-agent-search/src/core/search-core.ts +23 -3
- package/node_modules/pi-agent-search-text/index.ts +2 -0
- package/node_modules/pi-agent-search-text/package.json +14 -14
- package/node_modules/pi-agent-search-text/runtime/entry-55.js +1 -0
- package/node_modules/pi-agent-search-text/runtime/entry-57.js +1 -0
- package/node_modules/pi-agent-search-text/src/search-backend.ts +18 -10
- package/node_modules/pi-agent-search-text/src/search-session.ts +68 -9
- package/node_modules/pi-agent-text/package.json +3 -3
- package/node_modules/pi-agent-text/runtime/entry-59.js +1 -0
- package/node_modules/pi-agent-text-anchor-constant/package.json +4 -4
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-60.js +2 -0
- package/node_modules/pi-agent-text-anchor-exact/package.json +5 -6
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-61.js +1 -0
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-62.js +2 -0
- package/node_modules/pi-agent-text-anchor-line-hash/package.json +7 -7
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-64.js +2 -0
- package/node_modules/pi-agent-text-editor/index.ts +2 -0
- package/node_modules/pi-agent-text-editor/package.json +26 -34
- package/node_modules/pi-agent-text-editor/runtime/entry-78.js +0 -1
- package/node_modules/pi-agent-text-editor/runtime/entry-79.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-80.js +1 -0
- package/node_modules/pi-agent-text-editor/runtime/entry-81.js +2 -0
- package/node_modules/pi-agent-text-editor/src/api/delete-guard.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/api/edit-completion.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/api/mutation-tool.ts +5 -0
- package/node_modules/pi-agent-text-editor/src/api/native-edit-batch-event.ts +2 -2
- package/node_modules/pi-agent-text-editor/src/core/delete-policy.ts +6 -12
- package/node_modules/pi-agent-text-editor/src/core/extension.ts +4 -1
- package/node_modules/pi-agent-text-editor/src/core/file-operation-tools.ts +40 -11
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/grouped-replacements.ts +18 -9
- package/node_modules/pi-agent-text-editor/src/core/native-text-edit-batch.ts +29 -20
- package/node_modules/pi-agent-text-editor/src/core/temporary-directories.ts +13 -9
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts +16 -8
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +118 -36
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch.ts +7 -4
- package/node_modules/pi-agent-text-editor/src/core/text-edit-origin.ts +38 -0
- package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +106 -48
- package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +35 -14
- package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +22 -1
- package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts +39 -44
- package/node_modules/pi-agent-text-editor/src/core/write-agent-result.ts +3 -1
- package/node_modules/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +6 -5
- package/node_modules/pi-agent-text-editor-renderer/package.json +6 -8
- package/node_modules/pi-agent-text-editor-renderer/runtime/entry-82.js +2 -0
- package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +35 -2
- package/node_modules/pi-agent-text-editor-stale-anchor/index.ts +17 -0
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +6 -5
- package/node_modules/pi-agent-tool-call-interception/package.json +3 -3
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-84.js +1 -0
- package/node_modules/pi-agent-tool-ui/package.json +6 -2
- package/node_modules/pi-agent-tool-ui/runtime/entry-85.js +1 -0
- package/node_modules/pi-agent-tool-ui/runtime/entry-86.js +1 -0
- package/node_modules/pi-agent-tool-ui/src/operation-approval.ts +271 -0
- package/node_modules/pi-agent-web/package.json +8 -11
- package/node_modules/pi-agent-web-html/package.json +3 -5
- package/node_modules/pi-agent-web-html/runtime/entry-88.js +2 -0
- package/node_modules/pi-agent-web-image/package.json +4 -4
- package/node_modules/pi-agent-web-image/runtime/entry-89.js +2 -0
- package/node_modules/pi-agent-web-pdf/package.json +4 -4
- package/node_modules/pi-agent-web-pdf/runtime/entry-90.js +2 -0
- package/node_modules/pi-agent-web-text/package.json +4 -4
- package/node_modules/pi-agent-web-text/runtime/entry-91.js +2 -0
- package/package.json +65 -53
- package/skills/configure-agent-ide/SKILL.md +38 -0
- package/src/api/approval.ts +5 -0
- package/src/api/content.ts +6 -0
- package/src/api/settings.ts +198 -0
- package/src/api/tips.ts +3 -0
- package/src/backend/debugger-registration.ts +5 -1
- package/src/code-review/extension.ts +10 -4
- package/src/code-review/reviewer.ts +8 -0
- package/src/composite/host-version.ts +29 -5
- package/src/composite/ide-alias-rendering.ts +97 -0
- package/src/composite/nested-tool-rendering.ts +90 -9
- package/src/composite/preferences.ts +13 -0
- package/src/composite/search-facts.ts +45 -0
- package/src/composite/settings-documentation.ts +68 -0
- package/src/composite/settings-help.ts +106 -0
- package/src/composite/settings-registry.ts +94 -0
- package/src/composite/text-results.ts +170 -30
- package/src/composite/tool-availability.ts +11 -2
- package/src/core/diagnostic-entry.ts +31 -8
- package/src/core/diagnostic-store.ts +19 -3
- package/src/core/extension.ts +7 -2
- package/src/documentation/extension.ts +12 -0
- package/src/documentation/registry.ts +10 -2
- package/src/documentation/search.ts +166 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +8 -8
- 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-jq/package.json +6 -7
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/runtime/entry-31.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/runtime/entry-32.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/runtime/entry-33.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-29.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +8 -11
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +3 -5
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-88.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/runtime/entry-89.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/runtime/entry-90.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-91.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-87.js +2 -0
- package/src/extensions/pi-agent-read/package.json +12 -12
- package/src/extensions/pi-agent-read/runtime/entry-46.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-47.js +1 -0
- package/src/extensions/pi-agent-read/runtime/entry-49.js +2 -0
- package/src/extensions/pi-agent-search/package.json +9 -9
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +2 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +14 -14
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-55.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-56.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-57.js +1 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-backend.ts +18 -10
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-session.ts +68 -9
- package/src/extensions/pi-agent-search/runtime/entry-51.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-52.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-53.js +1 -0
- package/src/extensions/pi-agent-search/runtime/entry-54.js +2 -0
- package/src/extensions/pi-agent-search/src/api/plugin-protocol.ts +1 -1
- package/src/extensions/pi-agent-search/src/api/presentation.ts +10 -2
- package/src/extensions/pi-agent-search/src/api/search-parameters.ts +6 -5
- package/src/extensions/pi-agent-search/src/api/search.ts +7 -0
- package/src/extensions/pi-agent-search/src/core/search-core.ts +23 -3
- package/src/extensions/pi-agent-text-editor/index.ts +2 -0
- package/src/extensions/pi-agent-text-editor/package.json +26 -34
- 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-60.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +5 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-61.js +1 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-62.js +2 -0
- 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-63.js +1 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-64.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +6 -8
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-82.js +2 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +35 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/index.ts +17 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +6 -5
- package/src/extensions/pi-agent-text-editor/runtime/entry-78.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-79.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-80.js +1 -0
- package/src/extensions/pi-agent-text-editor/runtime/entry-81.js +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/delete-guard.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/api/edit-completion.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/mutation-tool.ts +5 -0
- package/src/extensions/pi-agent-text-editor/src/api/native-edit-batch-event.ts +2 -2
- package/src/extensions/pi-agent-text-editor/src/core/delete-policy.ts +6 -12
- package/src/extensions/pi-agent-text-editor/src/core/extension.ts +4 -1
- package/src/extensions/pi-agent-text-editor/src/core/file-operation-tools.ts +40 -11
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/grouped-replacements.ts +18 -9
- package/src/extensions/pi-agent-text-editor/src/core/native-text-edit-batch.ts +29 -20
- package/src/extensions/pi-agent-text-editor/src/core/temporary-directories.ts +13 -9
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts +16 -8
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +118 -36
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch.ts +7 -4
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-origin.ts +38 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +106 -48
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +35 -14
- package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +22 -1
- package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts +39 -44
- package/src/extensions/pi-agent-text-editor/src/core/write-agent-result.ts +3 -1
- package/src/extensions/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +6 -5
- package/src/pi-agent-ide.ts +74 -15
- package/src/plugins/pi-agent-ide-ast/package.json +15 -41
- package/src/plugins/pi-agent-ide-ast/runtime/entry-34.js +1 -0
- package/src/plugins/pi-agent-ide-ast/src/select-schema.ts +6 -5
- package/src/plugins/pi-agent-ide-changes/package.json +10 -11
- package/src/plugins/pi-agent-ide-changes/runtime/entry-36.js +1 -0
- package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +6 -5
- package/src/plugins/pi-agent-ide-debugger/index.ts +158 -55
- package/src/plugins/pi-agent-ide-debugger/src/debugmcp-client.ts +118 -0
- package/src/plugins/pi-agent-ide-debugger/src/doctor-plugin.ts +47 -0
- package/src/plugins/pi-agent-ide-debugger/src/renderer.ts +2 -0
- package/src/plugins/pi-agent-ide-debugger/src/session-manager.ts +146 -1
- package/src/plugins/pi-agent-ide-debugger/src/ui.ts +12 -0
- package/src/plugins/pi-agent-ide-debugger/src/vscode-backend.ts +497 -0
- package/src/plugins/pi-agent-ide-formatter/package.json +4 -4
- package/src/plugins/pi-agent-ide-languages/package.json +3 -3
- package/src/plugins/pi-agent-ide-languages/runtime/entry-39.js +2 -0
- package/src/plugins/pi-agent-ide-lint/package.json +8 -8
- package/src/plugins/pi-agent-ide-lint/runtime/entry-40.js +2 -0
- package/src/plugins/pi-agent-ide-lsp/package.json +10 -13
- package/src/plugins/pi-agent-ide-lsp/runtime/entry-41.js +2 -0
- package/src/plugins/pi-agent-ide-terminal/index.ts +2 -0
- package/src/plugins/pi-agent-ide-terminal/src/origin.ts +30 -0
- package/src/plugins/pi-agent-ide-terminal/src/session-manager.ts +34 -0
- package/src/plugins/pi-agent-ide-terminal/src/tools.ts +11 -2
- package/src/plugins/pi-agent-ide-terminal/src/types.ts +9 -0
- package/src/plugins/pi-agent-ide-terminal/src/ui.ts +72 -26
- package/src/tips/core.ts +5 -2
- package/src/tips/extension.ts +30 -2
- package/src/tips/persistence.ts +29 -27
- package/src/tips/setup-hint.ts +19 -0
- package/dist/chunk-3ZGDMTMD.js +0 -25
- package/dist/chunk-5KFVDYCI.js +0 -1
- package/dist/chunk-ABFCAOU5.js +0 -1
- package/dist/chunk-BIG45IPN.js +0 -2
- package/dist/chunk-BMOJTJJJ.js +0 -3
- package/dist/chunk-BQ67M4NC.js +0 -3
- package/dist/chunk-IH5NW5JX.js +0 -11
- package/dist/chunk-NRZO5KJT.js +0 -9
- package/dist/chunk-O36UC74T.js +0 -1
- package/dist/chunk-OLI3JPHJ.js +0 -28
- package/dist/chunk-SSWUUBIR.js +0 -1
- package/dist/chunk-UUJJRXHG.js +0 -29
- package/dist/entry-21.js +0 -1
- package/docs/research/apply-native-capability-matrix.md +0 -174
- package/docs/research/apply-read-latency.md +0 -221
- package/docs/research/codemode-write-context.md +0 -56
- package/docs/research/lpt-393-fuzzy-results/file.json +0 -152
- package/docs/research/lpt-393-fuzzy-results/repo.json +0 -122
- package/docs/research/lpt-393-search-fuzzy-fallback.md +0 -97
- package/docs/research/native-codemode-batch-decision.md +0 -31
- package/docs/research/native-codemode-batching.md +0 -65
- package/node_modules/pi-agent-doctor/runtime/entry-19.js +0 -1
- package/node_modules/pi-agent-doctor/runtime/entry-20.js +0 -1
- package/node_modules/pi-agent-doctor/runtime/entry-21.js +0 -1
- package/node_modules/pi-agent-filesystem/runtime/entry-26.js +0 -2
- package/node_modules/pi-agent-filesystem-image/runtime/entry-27.js +0 -2
- package/node_modules/pi-agent-filesystem-jq/runtime/entry-28.js +0 -2
- package/node_modules/pi-agent-ide-ast/runtime/entry-31.js +0 -1
- package/node_modules/pi-agent-ide-changes/runtime/entry-33.js +0 -1
- package/node_modules/pi-agent-ide-changes/runtime/entry-34.js +0 -2
- package/node_modules/pi-agent-ide-languages/runtime/entry-36.js +0 -2
- package/node_modules/pi-agent-image/runtime/entry-39.js +0 -1
- package/node_modules/pi-agent-invariant/runtime/entry-40.js +0 -1
- package/node_modules/pi-agent-pdf/runtime/entry-41.js +0 -1
- package/node_modules/pi-agent-search/runtime/entry-49.js +0 -1
- package/node_modules/pi-agent-search-text/runtime/entry-52.js +0 -2
- package/node_modules/pi-agent-search-text/runtime/entry-54.js +0 -1
- package/node_modules/pi-agent-text-anchor-constant/runtime/entry-57.js +0 -2
- package/node_modules/pi-agent-text-anchor-exact/runtime/entry-59.js +0 -2
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-60.js +0 -1
- package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-61.js +0 -2
- package/node_modules/pi-agent-text-editor/runtime/entry-62.js +0 -1
- package/node_modules/pi-agent-text-editor/runtime/entry-64.js +0 -1
- package/node_modules/pi-agent-text-editor-renderer/runtime/entry-79.js +0 -2
- package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-80.js +0 -2
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-81.js +0 -1
- package/node_modules/pi-agent-tool-ui/runtime/entry-82.js +0 -1
- package/node_modules/pi-agent-web-html/runtime/entry-84.js +0 -2
- package/node_modules/pi-agent-web-image/runtime/entry-85.js +0 -2
- package/node_modules/pi-agent-web-pdf/runtime/entry-86.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-27.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/runtime/entry-28.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/runtime/entry-29.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-26.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-84.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/runtime/entry-85.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/runtime/entry-86.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-87.js +0 -2
- package/src/extensions/pi-agent-read/runtime/entry-42.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-43.js +0 -1
- package/src/extensions/pi-agent-read/runtime/entry-44.js +0 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-52.js +0 -2
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-53.js +0 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-54.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-49.js +0 -1
- package/src/extensions/pi-agent-search/runtime/entry-50.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-57.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-59.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-60.js +0 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-61.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-79.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-80.js +0 -2
- package/src/extensions/pi-agent-text-editor/runtime/entry-62.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-63.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-64.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-31.js +0 -1
- package/src/plugins/pi-agent-ide-ast/runtime/entry-32.js +0 -2
- package/src/plugins/pi-agent-ide-changes/runtime/entry-33.js +0 -1
- package/src/plugins/pi-agent-ide-changes/runtime/entry-34.js +0 -2
- package/src/plugins/pi-agent-ide-languages/runtime/entry-36.js +0 -2
- /package/node_modules/{pi-agent-documentation → pi-agent-doctor}/runtime/entry-25.js +0 -0
- /package/node_modules/{pi-agent-filesystem-pdf → pi-agent-filesystem}/runtime/entry-29.js +0 -0
- /package/node_modules/{pi-agent-filesystem-text → pi-agent-filesystem-image}/runtime/entry-30.js +0 -0
- /package/node_modules/{pi-agent-ide-ast → pi-agent-filesystem-pdf}/runtime/entry-32.js +0 -0
- /package/node_modules/{pi-agent-ide-formatter → pi-agent-ide-ast}/runtime/entry-35.js +0 -0
- /package/node_modules/{pi-agent-ide-lint → pi-agent-ide-changes}/runtime/entry-37.js +0 -0
- /package/node_modules/{pi-agent-ide-lsp → pi-agent-ide-formatter}/runtime/entry-38.js +0 -0
- /package/node_modules/{pi-agent-read → pi-agent-image}/runtime/entry-42.js +0 -0
- /package/node_modules/{pi-agent-read → pi-agent-invariant}/runtime/entry-43.js +0 -0
- /package/node_modules/{pi-agent-read → pi-agent-pdf}/runtime/entry-44.js +0 -0
- /package/node_modules/{pi-agent-resource → pi-agent-read}/runtime/entry-47.js +0 -0
- /package/node_modules/{pi-agent-search → pi-agent-read}/runtime/entry-48.js +0 -0
- /package/node_modules/{pi-agent-search → pi-agent-resource}/runtime/entry-50.js +0 -0
- /package/node_modules/{pi-agent-search-text → pi-agent-search}/runtime/entry-53.js +0 -0
- /package/node_modules/{pi-agent-text → pi-agent-search-text}/runtime/entry-56.js +0 -0
- /package/node_modules/{pi-agent-text-anchor-exact → pi-agent-search-text}/runtime/entry-58.js +0 -0
- /package/node_modules/{pi-agent-text-editor → pi-agent-text-anchor-line-hash}/runtime/entry-63.js +0 -0
- /package/node_modules/{pi-agent-web → pi-agent-text-editor-stale-anchor}/runtime/entry-83.js +0 -0
- /package/node_modules/{pi-agent-web-text → pi-agent-web}/runtime/entry-87.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-text → pi-agent-filesystem-image}/runtime/entry-30.js +0 -0
- /package/src/extensions/{pi-agent-search → pi-agent-read}/runtime/entry-48.js +0 -0
- /package/src/extensions/{pi-agent-text-editor/plugins/pi-agent-text-anchor-exact → pi-agent-search/plugins/pi-agent-search-text}/runtime/entry-58.js +0 -0
- /package/src/extensions/{pi-agent-read/extensions/pi-agent-web → pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor}/runtime/entry-83.js +0 -0
- /package/src/plugins/{pi-agent-ide-formatter → pi-agent-ide-ast}/runtime/entry-35.js +0 -0
- /package/src/plugins/{pi-agent-ide-lint → pi-agent-ide-changes}/runtime/entry-37.js +0 -0
- /package/src/plugins/{pi-agent-ide-lsp → pi-agent-ide-formatter}/runtime/entry-38.js +0 -0
|
@@ -16,6 +16,28 @@ export interface DiagnosticEntryData {
|
|
|
16
16
|
}[];
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/** One persisted UI summary owned by one visible execution, or explicitly left unowned. */
|
|
20
|
+
export interface DiagnosticEntryBatch {
|
|
21
|
+
readonly files: readonly DiagnosticEntryData[];
|
|
22
|
+
readonly parentToolCallId?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Split a buffered delivery by real execution ownership without copying private findings. */
|
|
26
|
+
export function diagnosticEntryGroups(
|
|
27
|
+
notifications: readonly DiagnosticNotification[],
|
|
28
|
+
): DiagnosticEntryBatch[] {
|
|
29
|
+
const groups = new Map<string | undefined, DiagnosticEntryData[]>();
|
|
30
|
+
for (const notification of notifications) {
|
|
31
|
+
const owner = notification.parentToolCallId;
|
|
32
|
+
const files = groups.get(owner) ?? [];
|
|
33
|
+
files.push(diagnosticEntryData(notification));
|
|
34
|
+
groups.set(owner, files);
|
|
35
|
+
}
|
|
36
|
+
return [...groups].map(([parentToolCallId, files]) => ({
|
|
37
|
+
files,
|
|
38
|
+
...(parentToolCallId === undefined ? {} : { parentToolCallId }),
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
19
41
|
/** Derive visible data from the exact report delivered to the model. */
|
|
20
42
|
export function diagnosticEntryData(notification: DiagnosticNotification): DiagnosticEntryData {
|
|
21
43
|
return {
|
|
@@ -68,14 +90,15 @@ export function renderDiagnosticEntry(
|
|
|
68
90
|
|
|
69
91
|
/** Register durable UI-only entries; appending one never adds model context or starts a turn. */
|
|
70
92
|
export function registerDiagnosticEntryRenderer(pi: ExtensionAPI): void {
|
|
71
|
-
pi.registerEntryRenderer<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
93
|
+
pi.registerEntryRenderer<DiagnosticEntryData | DiagnosticEntryBatch>(
|
|
94
|
+
DIAGNOSTIC_ENTRY_TYPE,
|
|
95
|
+
(entry, options, theme) => {
|
|
96
|
+
const data = requiredValue(entry.data);
|
|
97
|
+
return "files" in data
|
|
98
|
+
? renderDiagnosticBatch(data.files, theme, options.expanded)
|
|
99
|
+
: renderDiagnosticEntry(data, theme, options.expanded);
|
|
100
|
+
},
|
|
101
|
+
);
|
|
79
102
|
}
|
|
80
103
|
|
|
81
104
|
/** One stable summary per delivery; expansion retains each file and provider. */
|
|
@@ -17,12 +17,15 @@ export interface DiagnosticNotification {
|
|
|
17
17
|
readonly filePath: string;
|
|
18
18
|
readonly results: readonly IdeDiagnosticResult[];
|
|
19
19
|
readonly text: string;
|
|
20
|
+
/** Visible execution that produced this exact checked snapshot, when known. */
|
|
21
|
+
readonly parentToolCallId?: string;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
interface FileState {
|
|
23
25
|
readonly cwd: string;
|
|
24
26
|
readonly filePath: string;
|
|
25
27
|
readonly content: string;
|
|
28
|
+
readonly parentToolCallId?: string;
|
|
26
29
|
readonly controller: AbortController;
|
|
27
30
|
readonly results: Map<string, IdeDiagnosticResult>;
|
|
28
31
|
readonly jobs: Promise<void>[];
|
|
@@ -56,8 +59,12 @@ export class DiagnosticStore {
|
|
|
56
59
|
) {}
|
|
57
60
|
|
|
58
61
|
/** Schedule final edit text without waiting for a diagnostic provider. */
|
|
59
|
-
schedule(
|
|
60
|
-
|
|
62
|
+
schedule(
|
|
63
|
+
filePath: string,
|
|
64
|
+
content: string,
|
|
65
|
+
{ cwd, parentToolCallId }: ToolContext & { readonly parentToolCallId?: string },
|
|
66
|
+
): void {
|
|
67
|
+
if (!this.disposed) this.ensure(filePath, content, cwd, parentToolCallId);
|
|
61
68
|
}
|
|
62
69
|
|
|
63
70
|
/** Read one current text snapshot; never label unfinished checks as clean. */
|
|
@@ -154,6 +161,9 @@ export class DiagnosticStore {
|
|
|
154
161
|
: path.relative(cwd, state.filePath);
|
|
155
162
|
notifications.push({
|
|
156
163
|
filePath: source,
|
|
164
|
+
...(state.parentToolCallId === undefined
|
|
165
|
+
? {}
|
|
166
|
+
: { parentToolCallId: state.parentToolCallId }),
|
|
157
167
|
results,
|
|
158
168
|
text: `${JSON.stringify(source)}: ${summary}.`,
|
|
159
169
|
});
|
|
@@ -191,7 +201,12 @@ export class DiagnosticStore {
|
|
|
191
201
|
]);
|
|
192
202
|
}
|
|
193
203
|
|
|
194
|
-
private ensure(
|
|
204
|
+
private ensure(
|
|
205
|
+
filePath: string,
|
|
206
|
+
content: string,
|
|
207
|
+
cwd: string,
|
|
208
|
+
parentToolCallId?: string,
|
|
209
|
+
): FileState {
|
|
195
210
|
const key = this.key(filePath, cwd);
|
|
196
211
|
const previous = this.files.get(key);
|
|
197
212
|
if (previous?.content === content) return previous;
|
|
@@ -201,6 +216,7 @@ export class DiagnosticStore {
|
|
|
201
216
|
cwd: cwd.includes("://") ? cwd : path.resolve(cwd),
|
|
202
217
|
filePath: resolveCodeViewPath(filePath, cwd),
|
|
203
218
|
content,
|
|
219
|
+
...(parentToolCallId === undefined ? {} : { parentToolCallId }),
|
|
204
220
|
controller: new AbortController(),
|
|
205
221
|
results: new Map(),
|
|
206
222
|
jobs: [],
|
package/src/core/extension.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import { createIdeCore } from "#src/core/ide-core.js";
|
|
9
9
|
import { createDiagnosticDelivery } from "#src/core/diagnostic-delivery.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
11
|
+
diagnosticEntryGroups,
|
|
12
12
|
DIAGNOSTIC_ENTRY_TYPE,
|
|
13
13
|
registerDiagnosticEntryRenderer,
|
|
14
14
|
} from "#src/core/diagnostic-entry.js";
|
|
@@ -72,6 +72,9 @@ export default async function registerPiAgentIde(pi: ExtensionAPI): Promise<void
|
|
|
72
72
|
afterPostEditScope(() =>
|
|
73
73
|
core.diagnostics.schedule(completion.resourceSource, completion.after.content, {
|
|
74
74
|
cwd: completion.cwd,
|
|
75
|
+
...(completion.parentToolCallId === undefined
|
|
76
|
+
? {}
|
|
77
|
+
: { parentToolCallId: completion.parentToolCallId }),
|
|
75
78
|
}),
|
|
76
79
|
);
|
|
77
80
|
}
|
|
@@ -91,7 +94,9 @@ export default async function registerPiAgentIde(pi: ExtensionAPI): Promise<void
|
|
|
91
94
|
},
|
|
92
95
|
{ triggerTurn: true, deliverAs: "steer" },
|
|
93
96
|
);
|
|
94
|
-
|
|
97
|
+
for (const group of diagnosticEntryGroups(notifications)) {
|
|
98
|
+
pi.appendEntry(DIAGNOSTIC_ENTRY_TYPE, group);
|
|
99
|
+
}
|
|
95
100
|
},
|
|
96
101
|
pi.getFlag("pi-agent-ide-no-diagnostic-buffer") === true ? 0 : 5000,
|
|
97
102
|
);
|
|
@@ -9,6 +9,9 @@ import {
|
|
|
9
9
|
type AgentDocumentation,
|
|
10
10
|
} from "#src/api/documentation.js";
|
|
11
11
|
import { AgentDocumentationRegistry } from "#src/documentation/registry.js";
|
|
12
|
+
import { connectSearchPlugin } from "pi-agent-search/api/connect-plugin";
|
|
13
|
+
import { SEARCH_API_VERSION, SEARCH_PROTOCOL } from "pi-agent-search/api/plugin-protocol";
|
|
14
|
+
import { createDocumentationSearchResolver } from "#src/documentation/search.js";
|
|
12
15
|
|
|
13
16
|
interface RegistrationRequest {
|
|
14
17
|
readonly documents: readonly AgentDocumentation[];
|
|
@@ -75,6 +78,15 @@ export default async function registerProgressiveDocumentation(pi: ExtensionAPI)
|
|
|
75
78
|
},
|
|
76
79
|
});
|
|
77
80
|
|
|
81
|
+
await connectSearchPlugin(pi, {
|
|
82
|
+
protocol: SEARCH_PROTOCOL,
|
|
83
|
+
apiVersion: SEARCH_API_VERSION,
|
|
84
|
+
id: "agent-documentation",
|
|
85
|
+
setup(api) {
|
|
86
|
+
// Claim docs: scopes before filesystem query-protocol resolvers.
|
|
87
|
+
api.addResolver({ resolver: createDocumentationSearchResolver(registry), priority: -20 });
|
|
88
|
+
},
|
|
89
|
+
});
|
|
78
90
|
pi.on("session_start", (_event, context) => {
|
|
79
91
|
restoreClaims(context.sessionManager.getBranch(), registry, claimed);
|
|
80
92
|
});
|
|
@@ -65,7 +65,7 @@ function validateDocument(document: AgentDocumentation, existingIds: ReadonlySet
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
function freezeDocument(document: AgentDocumentation): AgentDocumentation {
|
|
68
|
-
|
|
68
|
+
const snapshot = {
|
|
69
69
|
...document,
|
|
70
70
|
triggers: Object.freeze(
|
|
71
71
|
document.triggers.map((trigger) =>
|
|
@@ -80,7 +80,15 @@ function freezeDocument(document: AgentDocumentation): AgentDocumentation {
|
|
|
80
80
|
}),
|
|
81
81
|
),
|
|
82
82
|
),
|
|
83
|
-
}
|
|
83
|
+
};
|
|
84
|
+
// A deliberate getter keeps metadata catalogs current without re-registering their guide ID.
|
|
85
|
+
const markdown = Object.getOwnPropertyDescriptor(document, "markdown");
|
|
86
|
+
if (markdown?.get !== undefined)
|
|
87
|
+
Object.defineProperty(snapshot, "markdown", {
|
|
88
|
+
get: markdown.get.bind(document),
|
|
89
|
+
enumerable: true,
|
|
90
|
+
});
|
|
91
|
+
return Object.freeze(snapshot);
|
|
84
92
|
}
|
|
85
93
|
|
|
86
94
|
function readViews(input: unknown): readonly string[] {
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import {
|
|
2
|
+
renderSearchMatches,
|
|
3
|
+
selectionData,
|
|
4
|
+
type SearchRequest,
|
|
5
|
+
type SearchResolver,
|
|
6
|
+
type SearchSelectionMatch,
|
|
7
|
+
} from "pi-agent-search/api/search";
|
|
8
|
+
import type { AgentDocumentationRegistry } from "#src/documentation/registry.js";
|
|
9
|
+
|
|
10
|
+
interface DocumentationSearchResult {
|
|
11
|
+
readonly source: string;
|
|
12
|
+
readonly matches: readonly SearchSelectionMatch[];
|
|
13
|
+
readonly complete: boolean;
|
|
14
|
+
readonly reason?: "limit" | "output";
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Search current packaged guide bodies without granting edit targets or marking guides read. */
|
|
18
|
+
export function createDocumentationSearchResolver(
|
|
19
|
+
registry: AgentDocumentationRegistry,
|
|
20
|
+
): SearchResolver {
|
|
21
|
+
return {
|
|
22
|
+
id: "agent-documentation",
|
|
23
|
+
readResources: (request) => (request.path?.startsWith("docs:") === true ? [request.path] : []),
|
|
24
|
+
async tryResolve(request, context) {
|
|
25
|
+
const source = request.path;
|
|
26
|
+
if (source === undefined || !source.startsWith("docs:")) return { kind: "not-handled" };
|
|
27
|
+
if (request.include !== undefined || request.exclude !== undefined)
|
|
28
|
+
return {
|
|
29
|
+
kind: "failed",
|
|
30
|
+
error: new Error("File include/exclude globs do not apply to docs: resources."),
|
|
31
|
+
};
|
|
32
|
+
if (/^(?:files|ast|symbols|process):/u.test(request.query))
|
|
33
|
+
return {
|
|
34
|
+
kind: "failed",
|
|
35
|
+
error: new Error("Use a text or regex: query for docs: resources."),
|
|
36
|
+
};
|
|
37
|
+
const id = source.slice("docs:".length);
|
|
38
|
+
if (id.length === 0)
|
|
39
|
+
return {
|
|
40
|
+
kind: "failed",
|
|
41
|
+
error: new Error(
|
|
42
|
+
"Use docs:all to search all guides or docs:<id> for one guide. Read docs: to list IDs.",
|
|
43
|
+
),
|
|
44
|
+
};
|
|
45
|
+
const guide = id === "all" ? undefined : registry.get(id);
|
|
46
|
+
if (id !== "all" && guide === undefined)
|
|
47
|
+
return { kind: "failed", error: new Error(`Unknown documentation ID: ${id}`) };
|
|
48
|
+
const pattern = searchPattern(request);
|
|
49
|
+
const matches: SearchSelectionMatch[] = [];
|
|
50
|
+
const maximum = request.limit ?? 50;
|
|
51
|
+
let bytes = 0;
|
|
52
|
+
for (const document of guide === undefined ? registry.list() : [guide]) {
|
|
53
|
+
context.signal?.throwIfAborted();
|
|
54
|
+
for (const [index, lineText] of document.markdown.split(/\r\n|\n|\r/u).entries()) {
|
|
55
|
+
context.signal?.throwIfAborted();
|
|
56
|
+
for (const found of lineText.matchAll(pattern)) {
|
|
57
|
+
if (found[0].length === 0) continue;
|
|
58
|
+
const startColumn = found.index;
|
|
59
|
+
const endColumn = startColumn + found[0].length;
|
|
60
|
+
if (
|
|
61
|
+
request.wholeWord === true &&
|
|
62
|
+
(/[\p{L}\p{N}_]/u.test(lineText[startColumn - 1] ?? "") ||
|
|
63
|
+
/[\p{L}\p{N}_]/u.test(lineText[endColumn] ?? ""))
|
|
64
|
+
)
|
|
65
|
+
continue;
|
|
66
|
+
if (matches.length === maximum)
|
|
67
|
+
return {
|
|
68
|
+
kind: "resolved",
|
|
69
|
+
payload: {
|
|
70
|
+
source,
|
|
71
|
+
matches,
|
|
72
|
+
complete: false,
|
|
73
|
+
reason: "limit",
|
|
74
|
+
} satisfies DocumentationSearchResult,
|
|
75
|
+
};
|
|
76
|
+
const match: SearchSelectionMatch = {
|
|
77
|
+
source: `docs:${document.id}`,
|
|
78
|
+
lineNumber: index + 1,
|
|
79
|
+
startColumn,
|
|
80
|
+
endColumn,
|
|
81
|
+
matchedText: found[0],
|
|
82
|
+
lineText,
|
|
83
|
+
};
|
|
84
|
+
bytes += Buffer.byteLength(matchRow(match)) + 1;
|
|
85
|
+
if (bytes > 48 * 1024)
|
|
86
|
+
return {
|
|
87
|
+
kind: "resolved",
|
|
88
|
+
payload: {
|
|
89
|
+
source,
|
|
90
|
+
matches,
|
|
91
|
+
complete: false,
|
|
92
|
+
reason: "output",
|
|
93
|
+
} satisfies DocumentationSearchResult,
|
|
94
|
+
};
|
|
95
|
+
matches.push(match);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
kind: "resolved",
|
|
101
|
+
payload: { source, matches, complete: true } satisfies DocumentationSearchResult,
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
toScriptData(payload) {
|
|
105
|
+
const result = payload as DocumentationSearchResult;
|
|
106
|
+
return selectionData(result.matches, result.complete);
|
|
107
|
+
},
|
|
108
|
+
format(payload) {
|
|
109
|
+
const result = payload as DocumentationSearchResult;
|
|
110
|
+
const count = `${result.matches.length}${result.complete ? "" : "+"}`;
|
|
111
|
+
const heading =
|
|
112
|
+
result.matches.length === 0 && result.complete
|
|
113
|
+
? `No matches in ${result.source}`
|
|
114
|
+
: `${count} matches in ${result.source}`;
|
|
115
|
+
return {
|
|
116
|
+
content: [
|
|
117
|
+
{
|
|
118
|
+
type: "text",
|
|
119
|
+
text: [heading, ...notices(result), ...result.matches.map(matchRow)].join("\n"),
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
details: result,
|
|
123
|
+
};
|
|
124
|
+
},
|
|
125
|
+
renderResult(result, options, theme) {
|
|
126
|
+
const data = result.details as DocumentationSearchResult;
|
|
127
|
+
return renderSearchMatches(
|
|
128
|
+
data.matches,
|
|
129
|
+
data.complete,
|
|
130
|
+
theme,
|
|
131
|
+
options.expanded,
|
|
132
|
+
undefined,
|
|
133
|
+
notices(data),
|
|
134
|
+
);
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function notices(result: DocumentationSearchResult): string[] {
|
|
140
|
+
return [
|
|
141
|
+
"Packaged guides · read-only. Read docs:<id> for the full guide; search excerpts do not mark it read.",
|
|
142
|
+
...(result.reason === "limit"
|
|
143
|
+
? ["Limit reached · incomplete results. Narrow the query or raise limit."]
|
|
144
|
+
: []),
|
|
145
|
+
...(result.reason === "output"
|
|
146
|
+
? ["Output shortened · incomplete results. Narrow the query."]
|
|
147
|
+
: []),
|
|
148
|
+
];
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function matchRow(match: SearchSelectionMatch): string {
|
|
152
|
+
const from = Math.max(0, match.startColumn - 64);
|
|
153
|
+
const to = Math.min(match.lineText.length, match.startColumn + 192);
|
|
154
|
+
const preview = `${from > 0 ? "…" : ""}${match.lineText.slice(from, to)}${to < match.lineText.length ? "…" : ""}`;
|
|
155
|
+
return `${match.source}:${match.lineNumber}:${match.startColumn + 1} ${preview}`;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function searchPattern(request: SearchRequest): RegExp {
|
|
159
|
+
if (/\r|\n/u.test(request.query)) throw new Error("Search supports one-line patterns only.");
|
|
160
|
+
const query = request.query;
|
|
161
|
+
const literal = query.startsWith('"') && query.endsWith('"') ? query.slice(1, -1) : query;
|
|
162
|
+
const pattern = query.startsWith("regex:")
|
|
163
|
+
? query.slice(6)
|
|
164
|
+
: literal.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&");
|
|
165
|
+
return new RegExp(pattern, request.caseSensitive === true ? "gu" : "giu");
|
|
166
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-image": "0.8.
|
|
10
|
-
"pi-agent-invariant": "0.8.
|
|
11
|
-
"pi-agent-read": "0.8.
|
|
12
|
-
"pi-agent-resource": "0.8.
|
|
13
|
-
"pi-agent-text": "0.8.
|
|
14
|
-
"pi-agent-text-editor": "0.8.
|
|
9
|
+
"pi-agent-image": "0.8.2",
|
|
10
|
+
"pi-agent-invariant": "0.8.2",
|
|
11
|
+
"pi-agent-read": "0.8.2",
|
|
12
|
+
"pi-agent-resource": "0.8.2",
|
|
13
|
+
"pi-agent-text": "0.8.2",
|
|
14
|
+
"pi-agent-text-editor": "0.8.2"
|
|
15
15
|
},
|
|
16
16
|
"pi": {
|
|
17
17
|
"extensions": [
|
|
18
|
-
"./runtime/entry-
|
|
18
|
+
"./runtime/entry-29.js"
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-image",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#extension": "./index.ts"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-image": "0.8.
|
|
10
|
-
"pi-agent-resource": "0.8.
|
|
9
|
+
"pi-agent-image": "0.8.2",
|
|
10
|
+
"pi-agent-resource": "0.8.2"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
14
|
-
"./runtime/entry-
|
|
14
|
+
"./runtime/entry-30.js"
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-jq",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"
|
|
10
|
-
"pi-agent-
|
|
11
|
-
"pi-agent-
|
|
12
|
-
"pi-agent-
|
|
13
|
-
"pi-agent-text": "0.8.0"
|
|
9
|
+
"pi-agent-doctor": "0.8.2",
|
|
10
|
+
"pi-agent-documentation": "0.8.2",
|
|
11
|
+
"pi-agent-read": "0.8.2",
|
|
12
|
+
"pi-agent-text": "0.8.2"
|
|
14
13
|
},
|
|
15
14
|
"pi": {
|
|
16
15
|
"extensions": [
|
|
17
|
-
"./runtime/entry-
|
|
16
|
+
"./runtime/entry-31.js"
|
|
18
17
|
]
|
|
19
18
|
},
|
|
20
19
|
"peerDependencies": {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-pdf",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-pdf": "0.8.
|
|
7
|
-
"pi-agent-resource": "0.8.
|
|
6
|
+
"pi-agent-pdf": "0.8.2",
|
|
7
|
+
"pi-agent-resource": "0.8.2"
|
|
8
8
|
},
|
|
9
9
|
"pi": {
|
|
10
10
|
"extensions": [
|
|
11
|
-
"./runtime/entry-
|
|
11
|
+
"./runtime/entry-32.js"
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-filesystem-text",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#extension": "./index.ts"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"pi-agent-resource": "0.8.
|
|
10
|
-
"pi-agent-text": "0.8.
|
|
9
|
+
"pi-agent-resource": "0.8.2",
|
|
10
|
+
"pi-agent-text": "0.8.2"
|
|
11
11
|
},
|
|
12
12
|
"pi": {
|
|
13
13
|
"extensions": [
|
|
14
|
-
"./runtime/entry-
|
|
14
|
+
"./runtime/entry-33.js"
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-web",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"pi-agent-
|
|
12
|
-
"pi-agent-
|
|
13
|
-
"pi-agent-
|
|
14
|
-
"pi-agent-
|
|
15
|
-
"pi-agent-search": "0.8.0",
|
|
16
|
-
"pi-agent-text": "0.8.0",
|
|
17
|
-
"playwright-core": "^1.62.1"
|
|
9
|
+
"pi-agent-doctor": "0.8.2",
|
|
10
|
+
"pi-agent-image": "0.8.2",
|
|
11
|
+
"pi-agent-read": "0.8.2",
|
|
12
|
+
"pi-agent-resource": "0.8.2",
|
|
13
|
+
"pi-agent-search": "0.8.2",
|
|
14
|
+
"pi-agent-text": "0.8.2"
|
|
18
15
|
},
|
|
19
16
|
"pi": {
|
|
20
17
|
"extensions": [
|
|
21
|
-
"./runtime/entry-
|
|
18
|
+
"./runtime/entry-87.js"
|
|
22
19
|
]
|
|
23
20
|
},
|
|
24
21
|
"peerDependencies": {
|
package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-web-html",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"
|
|
10
|
-
"linkedom": "^0.18.12",
|
|
11
|
-
"pi-agent-resource": "0.8.0"
|
|
9
|
+
"pi-agent-resource": "0.8.2"
|
|
12
10
|
},
|
|
13
11
|
"pi": {
|
|
14
12
|
"extensions": [
|
|
15
|
-
"./runtime/entry-
|
|
13
|
+
"./runtime/entry-88.js"
|
|
16
14
|
]
|
|
17
15
|
},
|
|
18
16
|
"peerDependencies": {
|
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.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-image": "0.8.
|
|
7
|
-
"pi-agent-resource": "0.8.
|
|
6
|
+
"pi-agent-image": "0.8.2",
|
|
7
|
+
"pi-agent-resource": "0.8.2"
|
|
8
8
|
},
|
|
9
9
|
"pi": {
|
|
10
10
|
"extensions": [
|
|
11
|
-
"./runtime/entry-
|
|
11
|
+
"./runtime/entry-89.js"
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-web-pdf",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-pdf": "0.8.
|
|
7
|
-
"pi-agent-resource": "0.8.
|
|
6
|
+
"pi-agent-pdf": "0.8.2",
|
|
7
|
+
"pi-agent-resource": "0.8.2"
|
|
8
8
|
},
|
|
9
9
|
"pi": {
|
|
10
10
|
"extensions": [
|
|
11
|
-
"./runtime/entry-
|
|
11
|
+
"./runtime/entry-90.js"
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-web-text",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-resource": "0.8.
|
|
7
|
-
"pi-agent-text": "0.8.
|
|
6
|
+
"pi-agent-resource": "0.8.2",
|
|
7
|
+
"pi-agent-text": "0.8.2"
|
|
8
8
|
},
|
|
9
9
|
"pi": {
|
|
10
10
|
"extensions": [
|
|
11
|
-
"./runtime/entry-
|
|
11
|
+
"./runtime/entry-91.js"
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|