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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-read",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
"./api/connect-plugin": {
|
|
10
10
|
"types": "./src/api/connect-plugin.ts",
|
|
11
|
-
"default": "./runtime/entry-
|
|
11
|
+
"default": "./runtime/entry-45.js"
|
|
12
12
|
},
|
|
13
13
|
"./api/rendering": {
|
|
14
14
|
"types": "./src/api/rendering.ts",
|
|
15
|
-
"default": "./runtime/entry-
|
|
15
|
+
"default": "./runtime/entry-46.js"
|
|
16
16
|
},
|
|
17
17
|
"./api/plugin-protocol": {
|
|
18
18
|
"types": "./src/api/plugin-protocol.ts",
|
|
19
|
-
"default": "./runtime/entry-
|
|
19
|
+
"default": "./runtime/entry-47.js"
|
|
20
20
|
},
|
|
21
21
|
"./api/tools/read": {
|
|
22
22
|
"types": "./src/api/tools/read.ts",
|
|
23
|
-
"default": "./runtime/entry-
|
|
23
|
+
"default": "./runtime/entry-48.js"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"pi-agent-documentation": "0.8.
|
|
28
|
-
"pi-agent-invariant": "0.8.
|
|
29
|
-
"pi-agent-resource": "0.8.
|
|
30
|
-
"pi-agent-text": "0.8.
|
|
31
|
-
"pi-agent-tool-call-interception": "0.8.
|
|
32
|
-
"pi-agent-tool-ui": "0.8.
|
|
27
|
+
"pi-agent-documentation": "0.8.2",
|
|
28
|
+
"pi-agent-invariant": "0.8.2",
|
|
29
|
+
"pi-agent-resource": "0.8.2",
|
|
30
|
+
"pi-agent-text": "0.8.2",
|
|
31
|
+
"pi-agent-tool-call-interception": "0.8.2",
|
|
32
|
+
"pi-agent-tool-ui": "0.8.2"
|
|
33
33
|
},
|
|
34
34
|
"pi": {
|
|
35
35
|
"extensions": [
|
|
36
|
-
"./runtime/entry-
|
|
36
|
+
"./runtime/entry-49.js"
|
|
37
37
|
]
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../../dist/entry-47.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-search",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -8,26 +8,26 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
"./api/connect-plugin": {
|
|
10
10
|
"types": "./src/api/connect-plugin.ts",
|
|
11
|
-
"default": "./runtime/entry-
|
|
11
|
+
"default": "./runtime/entry-51.js"
|
|
12
12
|
},
|
|
13
13
|
"./api/plugin-protocol": {
|
|
14
14
|
"types": "./src/api/plugin-protocol.ts",
|
|
15
|
-
"default": "./runtime/entry-
|
|
15
|
+
"default": "./runtime/entry-52.js"
|
|
16
16
|
},
|
|
17
17
|
"./api/search": {
|
|
18
18
|
"types": "./src/api/search.ts",
|
|
19
|
-
"default": "./runtime/entry-
|
|
19
|
+
"default": "./runtime/entry-53.js"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"pi-agent-documentation": "0.8.
|
|
24
|
-
"pi-agent-resource": "0.8.
|
|
25
|
-
"pi-agent-tool-call-interception": "0.8.
|
|
26
|
-
"pi-agent-tool-ui": "0.8.
|
|
23
|
+
"pi-agent-documentation": "0.8.2",
|
|
24
|
+
"pi-agent-resource": "0.8.2",
|
|
25
|
+
"pi-agent-tool-call-interception": "0.8.2",
|
|
26
|
+
"pi-agent-tool-ui": "0.8.2"
|
|
27
27
|
},
|
|
28
28
|
"pi": {
|
|
29
29
|
"extensions": [
|
|
30
|
-
"./runtime/entry-
|
|
30
|
+
"./runtime/entry-54.js"
|
|
31
31
|
]
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
@@ -122,7 +122,9 @@ export default async function registerTextSearch(pi: ExtensionAPI): Promise<void
|
|
|
122
122
|
protocol: SEARCH_PROTOCOL,
|
|
123
123
|
apiVersion: SEARCH_API_VERSION,
|
|
124
124
|
id: "local",
|
|
125
|
+
// The same store owns Read/edit selectors and Search input scopes.
|
|
125
126
|
setup(api): void {
|
|
127
|
+
api.addScopeProvider((value, context) => sessions.resolveSearchScope(value, context));
|
|
126
128
|
api.addSelectionProvider((selection, context) =>
|
|
127
129
|
sessions.register(
|
|
128
130
|
selection.request.query,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-search-text",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -8,34 +8,34 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./index.ts",
|
|
11
|
-
"default": "./runtime/entry-
|
|
11
|
+
"default": "./runtime/entry-55.js"
|
|
12
12
|
},
|
|
13
13
|
"./search-session": {
|
|
14
14
|
"types": "./src/search-session.ts",
|
|
15
|
-
"default": "./runtime/entry-
|
|
15
|
+
"default": "./runtime/entry-56.js"
|
|
16
16
|
},
|
|
17
17
|
"./rendering": {
|
|
18
18
|
"types": "./src/search-renderer.ts",
|
|
19
|
-
"default": "./runtime/entry-
|
|
19
|
+
"default": "./runtime/entry-57.js"
|
|
20
20
|
},
|
|
21
21
|
"./result": {
|
|
22
22
|
"types": "./src/search-result.ts",
|
|
23
|
-
"default": "./runtime/entry-
|
|
23
|
+
"default": "./runtime/entry-58.js"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"pi-agent-doctor": "0.8.
|
|
28
|
-
"pi-agent-invariant": "0.8.
|
|
29
|
-
"pi-agent-read": "0.8.
|
|
30
|
-
"pi-agent-resource": "0.8.
|
|
31
|
-
"pi-agent-search": "0.8.
|
|
32
|
-
"pi-agent-text": "0.8.
|
|
33
|
-
"pi-agent-text-editor": "0.8.
|
|
34
|
-
"pi-agent-tool-ui": "0.8.
|
|
27
|
+
"pi-agent-doctor": "0.8.2",
|
|
28
|
+
"pi-agent-invariant": "0.8.2",
|
|
29
|
+
"pi-agent-read": "0.8.2",
|
|
30
|
+
"pi-agent-resource": "0.8.2",
|
|
31
|
+
"pi-agent-search": "0.8.2",
|
|
32
|
+
"pi-agent-text": "0.8.2",
|
|
33
|
+
"pi-agent-text-editor": "0.8.2",
|
|
34
|
+
"pi-agent-tool-ui": "0.8.2"
|
|
35
35
|
},
|
|
36
36
|
"pi": {
|
|
37
37
|
"extensions": [
|
|
38
|
-
"./runtime/entry-
|
|
38
|
+
"./runtime/entry-55.js"
|
|
39
39
|
]
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../../../../dist/entry-56.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../../../../dist/entry-57.js";
|
|
@@ -55,7 +55,12 @@ export async function searchText(
|
|
|
55
55
|
throw new Error("Search supports one-line patterns only.");
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
if (request.condition !== undefined)
|
|
58
|
+
if (request.condition !== undefined)
|
|
59
|
+
return searchBoolean(
|
|
60
|
+
request,
|
|
61
|
+
(pattern, onLine) => searchPattern(pattern, cwd, signal, onLine, undefined, environment),
|
|
62
|
+
signal,
|
|
63
|
+
);
|
|
59
64
|
return searchPattern(request, cwd, signal, undefined, budget, environment);
|
|
60
65
|
}
|
|
61
66
|
|
|
@@ -102,7 +107,15 @@ export async function searchTextContent(
|
|
|
102
107
|
signal?: AbortSignal,
|
|
103
108
|
): Promise<TextSearchBackendResult> {
|
|
104
109
|
if (request.condition !== undefined)
|
|
105
|
-
|
|
110
|
+
return searchBoolean(
|
|
111
|
+
request,
|
|
112
|
+
async (pattern, onLine) => {
|
|
113
|
+
const result = await searchTextContent(pattern, content, cwd, signal);
|
|
114
|
+
for (const match of result.matches) onLine?.(match.source, match.lineNumber);
|
|
115
|
+
return result;
|
|
116
|
+
},
|
|
117
|
+
signal,
|
|
118
|
+
);
|
|
106
119
|
if (/\r|\n/u.test(request.query)) throw new Error("Search supports one-line patterns only.");
|
|
107
120
|
const result = await runRipgrep(
|
|
108
121
|
[
|
|
@@ -215,9 +228,8 @@ async function searchPattern(
|
|
|
215
228
|
|
|
216
229
|
async function searchBoolean(
|
|
217
230
|
request: TextSearchRequest,
|
|
218
|
-
|
|
231
|
+
search: (pattern: TextSearchRequest, onLine?: MatchingLine) => Promise<TextSearchBackendResult>,
|
|
219
232
|
signal?: AbortSignal,
|
|
220
|
-
environment?: SearchEnvironment,
|
|
221
233
|
): Promise<TextSearchBackendResult> {
|
|
222
234
|
const condition = request.condition;
|
|
223
235
|
if (condition === undefined) throw new Error("Boolean search requires a line condition.");
|
|
@@ -238,17 +250,13 @@ async function searchBoolean(
|
|
|
238
250
|
for (const pattern of patterns) {
|
|
239
251
|
signal?.throwIfAborted();
|
|
240
252
|
const lines = new Set<string>();
|
|
241
|
-
await
|
|
253
|
+
await search(
|
|
242
254
|
{ ...scope, query: pattern, regex: true, wholeWord: false },
|
|
243
|
-
cwd,
|
|
244
|
-
signal,
|
|
245
255
|
(source, lineNumber) => lines.add(JSON.stringify([source, lineNumber])),
|
|
246
|
-
undefined,
|
|
247
|
-
environment,
|
|
248
256
|
);
|
|
249
257
|
present.set(pattern, lines);
|
|
250
258
|
}
|
|
251
|
-
const result = await
|
|
259
|
+
const result = await search(scope);
|
|
252
260
|
const selected = new Set<string>();
|
|
253
261
|
const matches = result.matches.filter((match) => {
|
|
254
262
|
const key = lineKey(match);
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { requiredValue } from "pi-agent-invariant";
|
|
2
|
-
import type { ResultTargetStore } from "pi-agent-resource";
|
|
3
|
-
import type {
|
|
2
|
+
import type { ResultTargetStore, ResolvedResultTargets } from "pi-agent-resource";
|
|
3
|
+
import type {
|
|
4
|
+
SearchSelectionMatch,
|
|
5
|
+
SearchSelectionRegistration,
|
|
6
|
+
SearchContext,
|
|
7
|
+
} from "pi-agent-search/api/search";
|
|
4
8
|
import { createHash } from "node:crypto";
|
|
5
9
|
import { open, readFile } from "node:fs/promises";
|
|
6
10
|
import path from "node:path";
|
|
@@ -209,6 +213,7 @@ export class SearchSessionStore {
|
|
|
209
213
|
read,
|
|
210
214
|
...registerResultReferences(
|
|
211
215
|
this.resultTargets,
|
|
216
|
+
id,
|
|
212
217
|
matches,
|
|
213
218
|
contentBySource,
|
|
214
219
|
cwd,
|
|
@@ -334,6 +339,42 @@ export class SearchSessionStore {
|
|
|
334
339
|
};
|
|
335
340
|
}
|
|
336
341
|
|
|
342
|
+
/** Resolve Search input with the same numbered-snapshot and all-query refresh authority as edits. */
|
|
343
|
+
public async resolveSearchScope(
|
|
344
|
+
value: string,
|
|
345
|
+
context: SearchContext,
|
|
346
|
+
): Promise<ResolvedResultTargets | undefined> {
|
|
347
|
+
if (!value.startsWith("SEARCH#")) return undefined;
|
|
348
|
+
const result = await this.#resolveResources(value, context.cwd, context.signal, true);
|
|
349
|
+
if (result.kind !== "resolved")
|
|
350
|
+
throw new Error(
|
|
351
|
+
result.kind === "rejected" ? result.rejection.reason : "Invalid Search reference.",
|
|
352
|
+
);
|
|
353
|
+
const parsed = requiredValue(parseSearchAnchor(value));
|
|
354
|
+
const session = requiredValue(this.#sessions.get(parsed.id));
|
|
355
|
+
return {
|
|
356
|
+
complete: true,
|
|
357
|
+
targets: result.targets.map((target) => {
|
|
358
|
+
if (target.expectedContent === undefined)
|
|
359
|
+
throw new Error("Search snapshot is unavailable.");
|
|
360
|
+
return {
|
|
361
|
+
source: target.source,
|
|
362
|
+
expectedContent: target.expectedContent,
|
|
363
|
+
ranges: target.ranges ?? [],
|
|
364
|
+
readCurrent: async (signal?: AbortSignal) => {
|
|
365
|
+
const current = await readCurrent(
|
|
366
|
+
target.source,
|
|
367
|
+
signal,
|
|
368
|
+
session.environment,
|
|
369
|
+
session.read,
|
|
370
|
+
);
|
|
371
|
+
if (current === undefined) throw new Error("Search source is unavailable.");
|
|
372
|
+
return current;
|
|
373
|
+
},
|
|
374
|
+
};
|
|
375
|
+
}),
|
|
376
|
+
};
|
|
377
|
+
}
|
|
337
378
|
public resourceResolver(): TextAnchorResourceResolver {
|
|
338
379
|
return {
|
|
339
380
|
id: "search-targets",
|
|
@@ -396,27 +437,32 @@ export class SearchSessionStore {
|
|
|
396
437
|
};
|
|
397
438
|
}
|
|
398
439
|
|
|
399
|
-
async #resolveResources(
|
|
440
|
+
async #resolveResources(
|
|
441
|
+
value: string,
|
|
442
|
+
cwd: string,
|
|
443
|
+
signal?: AbortSignal,
|
|
444
|
+
allowEmpty = false,
|
|
445
|
+
): Promise<TextTargetResolutionAttempt> {
|
|
400
446
|
const parsed = parseSearchAnchor(value);
|
|
401
447
|
if (parsed === undefined) return { kind: "not-handled" };
|
|
402
448
|
const session = this.#sessions.get(parsed.id);
|
|
403
|
-
if (session === undefined) return staleAnchor();
|
|
449
|
+
if (session === undefined || session.cwd !== canonicalSource(cwd)) return staleAnchor();
|
|
404
450
|
if (parsed.selector === "all" && !session.complete) return missingCompleteAnchor();
|
|
405
451
|
let snapshot: SearchSnapshot = session;
|
|
406
452
|
if (parsed.selector === "all") {
|
|
407
453
|
if (session.refreshedComplete?.complete === true) {
|
|
408
454
|
snapshot = session.refreshedComplete;
|
|
409
455
|
} else if (session.refreshedComplete !== undefined) {
|
|
410
|
-
snapshot = await this.#refresh(session);
|
|
456
|
+
snapshot = await this.#refresh(session, signal);
|
|
411
457
|
if (!snapshot.complete) return missingCompleteAnchor();
|
|
412
458
|
}
|
|
413
459
|
const sources = new Set(
|
|
414
460
|
selectMatches(snapshot, parsed.selector, parsed.mode).map((match) => match.source),
|
|
415
461
|
);
|
|
416
462
|
for (const source of sources) {
|
|
417
|
-
const current = await readCurrent(source,
|
|
463
|
+
const current = await readCurrent(source, signal, session.environment, session.read);
|
|
418
464
|
if (current !== snapshot.contentBySource.get(source)) {
|
|
419
|
-
snapshot = await this.#refresh(session);
|
|
465
|
+
snapshot = await this.#refresh(session, signal);
|
|
420
466
|
if (!snapshot.complete) return missingCompleteAnchor();
|
|
421
467
|
break;
|
|
422
468
|
}
|
|
@@ -427,7 +473,7 @@ export class SearchSessionStore {
|
|
|
427
473
|
const source = selected[0]?.source;
|
|
428
474
|
if (
|
|
429
475
|
source !== undefined &&
|
|
430
|
-
(await readCurrent(source,
|
|
476
|
+
(await readCurrent(source, signal, session.environment, session.read)) !==
|
|
431
477
|
snapshot.contentBySource.get(source)
|
|
432
478
|
) {
|
|
433
479
|
return staleAnchor(selected[0]?.lineNumber);
|
|
@@ -453,7 +499,7 @@ export class SearchSessionStore {
|
|
|
453
499
|
ranges,
|
|
454
500
|
expectedContent: snapshot.contentBySource.get(source),
|
|
455
501
|
}));
|
|
456
|
-
return targets.length === 0
|
|
502
|
+
return targets.length === 0 && !(allowEmpty && parsed.selector === "all")
|
|
457
503
|
? { kind: "rejected", rejection: { code: "missing", reason: "search anchor has no matches" } }
|
|
458
504
|
: { kind: "resolved", targets };
|
|
459
505
|
}
|
|
@@ -484,6 +530,7 @@ export class SearchSessionStore {
|
|
|
484
530
|
|
|
485
531
|
function registerResultReferences(
|
|
486
532
|
store: ResultTargetStore | undefined,
|
|
533
|
+
sessionId: string,
|
|
487
534
|
matches: readonly TextSearchMatch[],
|
|
488
535
|
contents: ReadonlyMap<string, string>,
|
|
489
536
|
cwd: string,
|
|
@@ -500,6 +547,18 @@ function registerResultReferences(
|
|
|
500
547
|
ranges: [selectionRange(requiredValue(documents.get(match.source)), match, "match")],
|
|
501
548
|
readCurrent: (signal?: AbortSignal) => read(match.source, signal),
|
|
502
549
|
}));
|
|
550
|
+
for (const [index, match] of matches.slice(0, 100).entries()) {
|
|
551
|
+
const lineTarget = store.register(
|
|
552
|
+
[
|
|
553
|
+
{
|
|
554
|
+
...requiredValue(targets[index]),
|
|
555
|
+
ranges: [selectionRange(requiredValue(documents.get(match.source)), match, "line")],
|
|
556
|
+
},
|
|
557
|
+
],
|
|
558
|
+
cwd,
|
|
559
|
+
);
|
|
560
|
+
store.registerSearchReference(`SEARCH#${sessionId}:${index + 1}:line`, lineTarget, cwd);
|
|
561
|
+
}
|
|
503
562
|
return {
|
|
504
563
|
target: store.register(targets, cwd, complete),
|
|
505
564
|
matchTargets: targets.slice(0, 100).map((target) => store.register([target], cwd, complete)),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../../dist/entry-52.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../../dist/entry-53.js";
|
|
@@ -5,7 +5,7 @@ import type { SearchPluginApi } from "#src/api/search.js";
|
|
|
5
5
|
|
|
6
6
|
export const SEARCH_PROTOCOL = "pi-agent-search" as const;
|
|
7
7
|
|
|
8
|
-
export const SEARCH_API_VERSION =
|
|
8
|
+
export const SEARCH_API_VERSION = 6 as const;
|
|
9
9
|
|
|
10
10
|
export const SEARCH_CORE_READY_EVENT = "pi-agent-search/core/ready" as const;
|
|
11
11
|
|
|
@@ -37,7 +37,15 @@ export function renderSearchMatches(
|
|
|
37
37
|
source: match.source,
|
|
38
38
|
label,
|
|
39
39
|
...(link === undefined ? {} : { link }),
|
|
40
|
-
...(!local
|
|
40
|
+
...(!local
|
|
41
|
+
? {
|
|
42
|
+
badge: match.source.startsWith("docs:")
|
|
43
|
+
? "DOC"
|
|
44
|
+
: /^https?:/iu.test(match.source)
|
|
45
|
+
? "WEB"
|
|
46
|
+
: "SH",
|
|
47
|
+
}
|
|
48
|
+
: {}),
|
|
41
49
|
lineNumber: match.lineNumber + index,
|
|
42
50
|
text,
|
|
43
51
|
ranges: [
|
|
@@ -56,7 +64,7 @@ export function renderSearchMatches(
|
|
|
56
64
|
rows.push(...metadata.map((text) => ({ kind: "note" as const, text, expandedOnly: true })));
|
|
57
65
|
const count = `${matches.length}${complete ? "" : "+"}`;
|
|
58
66
|
const sources = new Set(matches.map((m) => m.source));
|
|
59
|
-
const local = matches.every((m) => path.isAbsolute(m.source));
|
|
67
|
+
const local = matches.length > 0 && matches.every((m) => path.isAbsolute(m.source));
|
|
60
68
|
return new ResultPanel(
|
|
61
69
|
{
|
|
62
70
|
summary: `${count} ${matches.length === 1 ? "match" : "matches"} in ${sources.size} ${local ? (sources.size === 1 ? "file" : "files") : sources.size === 1 ? "source" : "sources"}`,
|
|
@@ -9,11 +9,12 @@ export const searchSchema = Type.Object(
|
|
|
9
9
|
description:
|
|
10
10
|
"Text to find or a Boolean expression. Quote text to keep it literal. Use regex:<pattern> for regular expressions, files:<pattern> for file paths, ast:<pattern> for syntax patterns, symbols:<query> for language symbols, or process:<query> for running processes.",
|
|
11
11
|
}),
|
|
12
|
-
path: Type.Optional(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
path: Type.Optional(
|
|
13
|
+
Type.Union(resultInputSchema.anyOf, {
|
|
14
|
+
description:
|
|
15
|
+
"File, directory, URL, docs:all for all packaged guide bodies, docs:<id> for one guide, unchanged Read/Search/Select/edit result, its UUID, or an array of such results. Use literal text or regex: for docs: sources. Results select only their registered ranges unless symbols: navigation follows external references.",
|
|
16
|
+
}),
|
|
17
|
+
),
|
|
17
18
|
navigation: Type.Optional(
|
|
18
19
|
Type.Literal("references", {
|
|
19
20
|
description:
|
|
@@ -162,7 +162,14 @@ export type SearchSelectionProvider = (
|
|
|
162
162
|
selection: SearchSelectionRegistration,
|
|
163
163
|
context: SearchContext,
|
|
164
164
|
) => Promise<RegisteredSearchSelection>;
|
|
165
|
+
/** An input-scope owner must reject invalid references and retain its snapshot/refresh rules. */
|
|
166
|
+
export type SearchScopeProvider = (
|
|
167
|
+
value: string,
|
|
168
|
+
context: SearchContext,
|
|
169
|
+
) => Promise<ResolvedResultTargets | undefined>;
|
|
165
170
|
export interface SearchPluginApi {
|
|
171
|
+
/** Resolve owned issued references to exact, verified source ranges; undefined means unowned. */
|
|
172
|
+
addScopeProvider(provider: SearchScopeProvider): void;
|
|
166
173
|
/** Add a lazy scope owner. Failed plugin setup must not retain its provider. */
|
|
167
174
|
addEnvironmentProvider(provider: SearchEnvironmentProvider): void;
|
|
168
175
|
addResolver(registration: SearchResolverRegistration): void;
|
|
@@ -12,6 +12,7 @@ import type {
|
|
|
12
12
|
SearchActionRegistration,
|
|
13
13
|
SearchEnvironmentProvider,
|
|
14
14
|
SearchSelectionProvider,
|
|
15
|
+
SearchScopeProvider,
|
|
15
16
|
SearchContext,
|
|
16
17
|
SearchDescriptionSource,
|
|
17
18
|
SearchPluginApi,
|
|
@@ -54,6 +55,7 @@ export interface SearchCore {
|
|
|
54
55
|
export function createSearchCore(targets?: ResultTargetStore): SearchCore {
|
|
55
56
|
const resolvers: RegisteredResolver[] = [];
|
|
56
57
|
const environments: SearchEnvironmentProvider[] = [];
|
|
58
|
+
const scopeProviders: SearchScopeProvider[] = [];
|
|
57
59
|
let selectionProvider: SearchSelectionProvider | undefined;
|
|
58
60
|
const actions = new Map<string, SearchActionRegistration>();
|
|
59
61
|
const promptGuidelines = new Map<string, SearchDescriptionSource[]>();
|
|
@@ -76,11 +78,15 @@ export function createSearchCore(targets?: ResultTargetStore): SearchCore {
|
|
|
76
78
|
const ready = queue.then(async () => {
|
|
77
79
|
const draftResolvers: SearchResolverRegistration[] = [];
|
|
78
80
|
const draftEnvironments: SearchEnvironmentProvider[] = [];
|
|
81
|
+
const draftScopes: SearchScopeProvider[] = [];
|
|
79
82
|
const draftActions: SearchActionRegistration[] = [];
|
|
80
83
|
let draftSelectionProvider: SearchSelectionProvider | undefined;
|
|
81
84
|
let draftDescription: SearchDescriptionSource | undefined;
|
|
82
85
|
const draftPromptGuidelines: SearchDescriptionSource[] = [];
|
|
83
86
|
const api: SearchPluginApi = {
|
|
87
|
+
addScopeProvider(provider) {
|
|
88
|
+
draftScopes.push(provider);
|
|
89
|
+
},
|
|
84
90
|
addEnvironmentProvider(provider) {
|
|
85
91
|
draftEnvironments.push(provider);
|
|
86
92
|
},
|
|
@@ -156,6 +162,7 @@ export function createSearchCore(targets?: ResultTargetStore): SearchCore {
|
|
|
156
162
|
}
|
|
157
163
|
if (draftSelectionProvider !== undefined) selectionProvider = draftSelectionProvider;
|
|
158
164
|
environments.push(...draftEnvironments);
|
|
165
|
+
scopeProviders.push(...draftScopes);
|
|
159
166
|
|
|
160
167
|
for (const action of draftActions) {
|
|
161
168
|
actions.set(actionKey(action.resolverId, action.capability), action);
|
|
@@ -193,16 +200,28 @@ export function createSearchCore(targets?: ResultTargetStore): SearchCore {
|
|
|
193
200
|
"Reference navigation is supported only for symbols: queries.",
|
|
194
201
|
);
|
|
195
202
|
try {
|
|
203
|
+
if (typeof input.path === "string") {
|
|
204
|
+
for (const provider of scopeProviders) {
|
|
205
|
+
const scope = await provider(input.path, context);
|
|
206
|
+
if (scope === undefined) continue;
|
|
207
|
+
if (context.scope !== undefined) throw new Error("Pass one result scope, not two.");
|
|
208
|
+
if (targets !== undefined) await targets.verify(scope, context.signal);
|
|
209
|
+
context = { ...context, scope };
|
|
210
|
+
request = Object.assign({}, request, { path: undefined });
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
196
214
|
const scoped =
|
|
197
215
|
input.path !== undefined &&
|
|
198
|
-
(typeof input.path !== "string" ||
|
|
216
|
+
(typeof input.path !== "string" ||
|
|
217
|
+
(request.path === input.path && input.path.startsWith("RESULT#")));
|
|
199
218
|
if (scoped) {
|
|
200
219
|
if (targets === undefined) throw new Error("Result scopes are unavailable.");
|
|
201
220
|
if (context.scope !== undefined) throw new Error("Pass one result scope, not two.");
|
|
202
221
|
const scope = targets.resolve(input.path, context.cwd);
|
|
203
222
|
await targets.verify(scope, context.signal);
|
|
204
223
|
context = { ...context, scope };
|
|
205
|
-
request = {
|
|
224
|
+
request = Object.assign({}, request, { path: undefined });
|
|
206
225
|
}
|
|
207
226
|
if (context.scope !== undefined) {
|
|
208
227
|
const ownerContext = context;
|
|
@@ -251,7 +270,8 @@ export function createSearchCore(targets?: ResultTargetStore): SearchCore {
|
|
|
251
270
|
if (emptyProtocol && !entry.registration.fallback && context.scope === undefined) continue;
|
|
252
271
|
const resolver = entry.registration.resolver;
|
|
253
272
|
if (context.scope !== undefined && resolver.supportsResultScope !== true) continue;
|
|
254
|
-
|
|
273
|
+
// Unknown colon prefixes can be source text (for example, feature: "legacy").
|
|
274
|
+
// The fallback still searches only the verified scope; structural protocols stay above.
|
|
255
275
|
|
|
256
276
|
try {
|
|
257
277
|
const scope = Promise.resolve().then(async () => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { registerOperationApproval } from "pi-agent-tool-ui/operation-approval";
|
|
2
3
|
import { connectAgentDocumentation, loadPackagedAgentGuide } from "pi-agent-documentation";
|
|
3
4
|
|
|
4
5
|
import { hideBuiltinEdit } from "./src/core/builtin-edit.js";
|
|
@@ -8,6 +9,7 @@ import { registerNativeTextEditBatching } from "./src/core/native-text-edit-batc
|
|
|
8
9
|
import { registerTextEditorTools } from "./src/tools/extension.js";
|
|
9
10
|
|
|
10
11
|
export default async function registerTextEditor(pi: ExtensionAPI): Promise<void> {
|
|
12
|
+
registerOperationApproval(pi);
|
|
11
13
|
connectAgentDocumentation(pi, [
|
|
12
14
|
await loadPackagedAgentGuide({
|
|
13
15
|
id: "editing",
|