pi-agent-ide 0.9.4 → 0.9.6
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 +38 -0
- package/README.md +1 -1
- package/dist/{chunk-ZXO4D5UB.js → chunk-2AANEKFS.js} +1 -1
- package/dist/{chunk-BU7IZLKB.js → chunk-2DSY4U73.js} +1 -1
- package/dist/chunk-2YO6RVX4.js +1 -0
- package/dist/{chunk-WES2E4VR.js → chunk-33U3RUM3.js} +1 -1
- package/dist/{chunk-CJPS4GXD.js → chunk-34IYWKY5.js} +1 -1
- package/dist/{chunk-2TTSJOLO.js → chunk-4CSNQX54.js} +1 -1
- package/dist/{chunk-DAZQSXUW.js → chunk-53IV6EKV.js} +1 -1
- package/dist/{chunk-7PVDTMEM.js → chunk-5AROEOJB.js} +1 -1
- package/dist/{chunk-IG5DXVDJ.js → chunk-5D4C225L.js} +1 -1
- package/dist/{chunk-GHO6TCPJ.js → chunk-5DN2XBVI.js} +1 -1
- package/dist/{chunk-FHRHYY4M.js → chunk-5W6QQZFI.js} +1 -1
- package/dist/{chunk-5PC5INOL.js → chunk-6W4OJLCJ.js} +1 -1
- package/dist/chunk-6ZYCTWQE.js +1 -0
- package/dist/{chunk-B25LXXNV.js → chunk-72FL5FHZ.js} +1 -1
- package/dist/{chunk-BB4A5UI3.js → chunk-7JWZPJI5.js} +1 -1
- package/dist/{chunk-T3Z4KXOX.js → chunk-AMSNDWBT.js} +1 -1
- package/dist/{chunk-DFXXT6MJ.js → chunk-APWMLLSE.js} +6 -6
- package/dist/{chunk-NA2NEU4V.js → chunk-B5UJCNQU.js} +1 -1
- package/dist/chunk-BMSAVDRD.js +13 -0
- package/dist/{chunk-MPNE25CY.js → chunk-BRJIXNFU.js} +1 -1
- package/dist/chunk-C2GZLLSP.js +5 -0
- package/dist/{chunk-XCPIIDFS.js → chunk-DHOIQZUF.js} +1 -1
- package/dist/chunk-ECSMTGVM.js +6 -0
- package/dist/{chunk-DEP55R35.js → chunk-EHFWODRT.js} +1 -1
- package/dist/{chunk-6WCHBHFW.js → chunk-EWTVVPUA.js} +1 -1
- package/dist/{chunk-H3GEEOOL.js → chunk-FBR7ZLLN.js} +1 -1
- package/dist/{chunk-UD3DMY3Q.js → chunk-FGN2ZMEN.js} +1 -1
- package/dist/{chunk-MKDOT76B.js → chunk-FJSYWOE6.js} +1 -1
- package/dist/{chunk-LF325WYO.js → chunk-FTECKRK6.js} +1 -1
- package/dist/chunk-GRZTKMXQ.js +1 -0
- package/dist/chunk-H6FEBUAP.js +1 -0
- package/dist/{chunk-FYOU4RBH.js → chunk-HFCHOFLV.js} +1 -1
- package/dist/chunk-HFF4GY7R.js +3 -0
- package/dist/{chunk-QJ6V5IAY.js → chunk-HJXSEPO7.js} +14 -12
- package/dist/{chunk-SRFWT562.js → chunk-HSEDKYH4.js} +1 -1
- package/dist/{chunk-6P7LTQZT.js → chunk-II7AOJNH.js} +1 -1
- package/dist/chunk-J6CDIH3S.js +84 -0
- package/dist/{chunk-USG6WHAT.js → chunk-JHWLRL4U.js} +1 -1
- package/dist/{chunk-35LZOKEW.js → chunk-JMQ67UNK.js} +1 -1
- package/dist/{chunk-7OUML24Z.js → chunk-JRIP33PC.js} +1 -1
- package/dist/chunk-JXULBI4S.js +2 -0
- package/dist/chunk-JYITLCXC.js +1 -0
- package/dist/{chunk-4IWEKRSP.js → chunk-KJAR2WDO.js} +1 -1
- package/dist/{chunk-GS5ZRTUG.js → chunk-KQV2ZXLP.js} +1 -1
- package/dist/{chunk-AMIIOWFL.js → chunk-KX7MG72M.js} +1 -1
- package/dist/{chunk-HGCJDIRR.js → chunk-LIGOOMJS.js} +5 -5
- package/dist/{chunk-OMNKD7WW.js → chunk-LY2UANKU.js} +3 -3
- package/dist/chunk-M7P7V4WI.js +25 -0
- package/dist/chunk-N2NEFXHB.js +13 -0
- package/dist/{chunk-2TZDG2JH.js → chunk-NF74ITWT.js} +2 -2
- package/dist/{chunk-AP2BOC24.js → chunk-NQYUIQRH.js} +1 -1
- package/dist/{chunk-7C73WVPB.js → chunk-OCU6NW5Y.js} +1 -1
- package/dist/chunk-OIEA4QWF.js +4 -0
- package/dist/{chunk-FXPY3V4L.js → chunk-ON5HDFNL.js} +1 -1
- package/dist/{chunk-U2N73BUY.js → chunk-P43GGKUC.js} +5 -5
- package/dist/{chunk-5BGWNYQS.js → chunk-P7FUD4WY.js} +1 -1
- package/dist/{chunk-VMLPXSMK.js → chunk-PPCWY4BB.js} +1 -1
- package/dist/{chunk-YPYROPQF.js → chunk-QGXZ4RWX.js} +1 -1
- package/dist/chunk-S3T5NOSL.js +1 -0
- package/dist/chunk-S7E2D5K7.js +5 -0
- package/dist/{chunk-DDH3FP4G.js → chunk-SIYPD5MM.js} +3 -3
- package/dist/{chunk-6A3ORNW3.js → chunk-T5ACAOKJ.js} +3 -3
- package/dist/chunk-TILMPAF2.js +1 -0
- package/dist/{chunk-RIJRPAL2.js → chunk-TSNY2FSU.js} +1 -1
- package/dist/{chunk-UI4KSKS3.js → chunk-TWJINFQB.js} +4 -4
- package/dist/chunk-TWQ6ACOI.js +1 -0
- package/dist/chunk-UDVVKVG4.js +1 -0
- package/dist/{chunk-WQIMM4SU.js → chunk-V2D5MLGE.js} +1 -1
- package/dist/{chunk-PQWANILR.js → chunk-VDSSAP6Y.js} +1 -1
- package/dist/{chunk-AVJVTF5H.js → chunk-VHYJTAXX.js} +1 -1
- package/dist/{chunk-MJFY4RGT.js → chunk-WCSWQDJ2.js} +1 -1
- package/dist/{chunk-JWSJCEIB.js → chunk-WQTF6Q2X.js} +1 -1
- package/dist/chunk-YFPU2LRR.js +23 -0
- package/dist/{chunk-KWJD7FBS.js → chunk-YLEERRX3.js} +14 -14
- package/dist/chunk-YNOR4LIE.js +1 -0
- package/dist/{chunk-WEE3NM6L.js → chunk-YOJHCARZ.js} +1 -1
- package/dist/chunk-YPTDPMK5.js +1 -0
- package/dist/{chunk-GXL4NMHR.js → chunk-YZTVC7ME.js} +1 -1
- package/dist/entry-0.js +1 -1
- package/dist/entry-10.js +1 -1
- package/dist/entry-11.js +1 -1
- package/dist/entry-12.js +1 -1
- package/dist/entry-14.js +1 -1
- package/dist/entry-15.js +1 -1
- package/dist/entry-17.js +1 -1
- package/dist/entry-19.js +1 -1
- package/dist/entry-2.js +1 -1
- package/dist/entry-20.js +1 -1
- package/dist/entry-21.js +1 -1
- package/dist/entry-22.js +1 -1
- package/dist/entry-25.js +1 -1
- package/dist/entry-31.js +2 -2
- package/dist/entry-32.js +1 -1
- package/dist/entry-33.js +1 -1
- package/dist/entry-34.js +1 -1
- package/dist/entry-35.js +1 -1
- package/dist/entry-36.js +1 -1
- package/dist/entry-37.js +1 -1
- package/dist/entry-38.js +13 -13
- 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-48.js +1 -1
- package/dist/entry-49.js +1 -1
- package/dist/entry-50.js +1 -1
- package/dist/entry-51.js +1 -1
- package/dist/entry-52.js +1 -1
- package/dist/entry-53.js +1 -1
- package/dist/entry-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-60.js +1 -1
- package/dist/entry-61.js +1 -1
- package/dist/entry-62.js +1 -1
- package/dist/entry-63.js +1 -1
- package/dist/entry-64.js +1 -1
- package/dist/entry-65.js +1 -1
- package/dist/entry-66.js +1 -1
- package/dist/entry-67.js +1 -1
- package/dist/entry-69.js +1 -1
- package/dist/entry-72.js +1 -1
- package/dist/entry-74.js +1 -1
- package/dist/entry-75.js +1 -1
- package/dist/entry-77.js +1 -1
- package/dist/entry-79.js +1 -1
- package/dist/entry-8.js +1 -1
- package/dist/entry-82.js +1 -1
- package/dist/entry-84.js +1 -1
- package/dist/entry-85.js +1 -1
- package/dist/entry-86.js +1 -1
- package/dist/entry-87.js +1 -1
- package/dist/entry-90.js +1 -1
- package/dist/entry-91.js +1 -1
- package/dist/entry-92.js +1 -1
- package/dist/entry-93.js +1 -1
- package/dist/entry-94.js +1 -1
- package/dist/pi-agent-ide.js +11 -11
- package/docs/development.md +2 -0
- package/docs/generated/tool-catalog/python.md +1 -0
- package/docs/tools.md +2 -0
- package/node_modules/pi-agent-doctor/package.json +1 -1
- package/node_modules/pi-agent-doctor/src/connect-plugin.ts +2 -2
- package/node_modules/pi-agent-doctor/src/evidence.ts +1 -1
- package/node_modules/pi-agent-doctor/src/fixtures/executable-probe.ts +2 -2
- package/node_modules/pi-agent-doctor/src/plugin-protocol.ts +4 -4
- package/node_modules/pi-agent-doctor/src/project-probes.ts +2 -2
- package/node_modules/pi-agent-doctor/src/workspace.ts +2 -2
- package/node_modules/pi-agent-documentation/package.json +1 -1
- package/node_modules/pi-agent-filesystem/index.ts +2 -2
- package/node_modules/pi-agent-filesystem/package.json +7 -7
- package/node_modules/pi-agent-filesystem/src/file-write-lock.ts +70 -0
- package/node_modules/pi-agent-filesystem/src/replace-file.ts +50 -0
- package/node_modules/pi-agent-filesystem/src/resolver.ts +28 -8
- package/node_modules/pi-agent-filesystem-image/package.json +3 -3
- package/node_modules/pi-agent-filesystem-jq/index.ts +1 -1
- package/node_modules/pi-agent-filesystem-jq/package.json +5 -5
- package/node_modules/pi-agent-filesystem-jq/src/api/jq.ts +1 -1
- package/node_modules/pi-agent-filesystem-pdf/package.json +3 -3
- package/node_modules/pi-agent-filesystem-text/package.json +3 -3
- package/node_modules/pi-agent-ide-ast/index.ts +1 -1
- package/node_modules/pi-agent-ide-ast/package.json +13 -13
- package/node_modules/pi-agent-ide-ast/src/api/scope.ts +1 -1
- package/node_modules/pi-agent-ide-ast/src/ast/manager.ts +33 -11
- package/node_modules/pi-agent-ide-ast/src/ast/native-parser.ts +1 -1
- package/node_modules/pi-agent-ide-ast/src/ast/outline.ts +60 -55
- package/node_modules/pi-agent-ide-ast/src/doctor-plugin.ts +4 -3
- package/node_modules/pi-agent-ide-ast/src/extension.ts +10 -10
- package/node_modules/pi-agent-ide-ast/src/outline-resolver.ts +3 -3
- package/node_modules/pi-agent-ide-ast/src/overflow-handler.ts +1 -1
- package/node_modules/pi-agent-ide-ast/src/scope-handler.ts +35 -8
- package/node_modules/pi-agent-ide-ast/src/scope-resolver.ts +1 -1
- package/node_modules/pi-agent-ide-ast/src/search-resolver.ts +161 -23
- package/node_modules/pi-agent-ide-ast/src/tool-ast-search.ts +1 -1
- package/node_modules/pi-agent-ide-changes/index.ts +9 -9
- package/node_modules/pi-agent-ide-changes/package.json +8 -8
- package/node_modules/pi-agent-ide-changes/src/change-anchor.ts +4 -4
- package/node_modules/pi-agent-ide-changes/src/changes/change-groups.ts +1 -1
- package/node_modules/pi-agent-ide-changes/src/changes/change-service.ts +4 -4
- package/node_modules/pi-agent-ide-changes/src/changes/git-changes-backend.ts +1 -1
- package/node_modules/pi-agent-ide-changes/src/current-change-presenter.ts +4 -4
- package/node_modules/pi-agent-ide-changes/src/tool-index-change.ts +5 -5
- package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +6 -6
- package/node_modules/pi-agent-ide-formatter/index.ts +5 -5
- package/node_modules/pi-agent-ide-formatter/package.json +3 -3
- package/node_modules/pi-agent-ide-formatter/src/doctor-plugin.ts +2 -2
- package/node_modules/pi-agent-ide-formatter/src/formatter.ts +2 -2
- package/node_modules/pi-agent-ide-formatter/src/registry.ts +1 -1
- package/node_modules/pi-agent-ide-languages/index.ts +1 -1
- package/node_modules/pi-agent-ide-languages/package.json +2 -2
- package/node_modules/pi-agent-ide-lint/index.ts +9 -9
- package/node_modules/pi-agent-ide-lint/package.json +7 -7
- package/node_modules/pi-agent-ide-lint/src/catalog.ts +4 -0
- package/node_modules/pi-agent-ide-lint/src/command-linter.ts +15 -6
- package/node_modules/pi-agent-ide-lint/src/diagnostics.ts +8 -14
- package/node_modules/pi-agent-ide-lint/src/doctor-plugin.ts +3 -3
- package/node_modules/pi-agent-ide-lint/src/registry.ts +1 -1
- package/node_modules/pi-agent-ide-lsp/index.ts +37 -16
- package/node_modules/pi-agent-ide-lsp/package.json +12 -12
- package/node_modules/pi-agent-ide-lsp/src/catalog.ts +12 -1
- package/node_modules/pi-agent-ide-lsp/src/declaration-targets.ts +21 -14
- package/node_modules/pi-agent-ide-lsp/src/diagnostic-source.ts +63 -20
- package/node_modules/pi-agent-ide-lsp/src/doctor-plugin.ts +4 -4
- package/node_modules/pi-agent-ide-lsp/src/idle-timeout.ts +15 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/abort.ts +11 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/client.ts +434 -80
- package/node_modules/pi-agent-ide-lsp/src/lsp/code-views.ts +121 -35
- package/node_modules/pi-agent-ide-lsp/src/lsp/diagnostic-adapters.ts +1 -1
- package/node_modules/pi-agent-ide-lsp/src/lsp/diagnostics.ts +26 -12
- package/node_modules/pi-agent-ide-lsp/src/lsp/document-leases.ts +31 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/errors.ts +4 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/file-watchers.ts +1 -77
- package/node_modules/pi-agent-ide-lsp/src/lsp/index.ts +19 -19
- package/node_modules/pi-agent-ide-lsp/src/lsp/language-map.ts +1 -1
- package/node_modules/pi-agent-ide-lsp/src/lsp/lsp-compiler.ts +5 -4
- package/node_modules/pi-agent-ide-lsp/src/lsp/manager.ts +59 -28
- package/node_modules/pi-agent-ide-lsp/src/lsp/navigation.ts +42 -22
- package/node_modules/pi-agent-ide-lsp/src/lsp/owner-transport.ts +1 -1
- package/node_modules/pi-agent-ide-lsp/src/lsp/position-map.ts +52 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/project.ts +1 -1
- package/node_modules/pi-agent-ide-lsp/src/lsp/registry.ts +2 -2
- package/node_modules/pi-agent-ide-lsp/src/lsp/rename.ts +2 -2
- package/node_modules/pi-agent-ide-lsp/src/lsp/server-request-handlers.mjs +325 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/shared-server-host.mjs +797 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/shared-servers.ts +322 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/source-changes.ts +29 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/symbol-search.ts +76 -17
- package/node_modules/pi-agent-ide-lsp/src/lsp/symbols.ts +3 -3
- package/node_modules/pi-agent-ide-lsp/src/lsp/workspace-owner.ts +1 -1
- package/node_modules/pi-agent-ide-lsp/src/manager-provider.ts +1 -1
- package/node_modules/pi-agent-ide-lsp/src/rename-plan.ts +16 -8
- package/node_modules/pi-agent-ide-lsp/src/search-resolver.ts +149 -134
- package/node_modules/pi-agent-ide-lsp/src/tool-lsp-search.ts +1 -1
- package/node_modules/pi-agent-image/package.json +2 -2
- package/node_modules/pi-agent-image/src/index.ts +1 -1
- package/node_modules/pi-agent-invariant/package.json +1 -1
- package/node_modules/pi-agent-pdf/package.json +2 -2
- package/node_modules/pi-agent-pdf/src/index.ts +1 -1
- package/node_modules/pi-agent-read/index.ts +1 -1
- package/node_modules/pi-agent-read/package.json +7 -7
- package/node_modules/pi-agent-read/src/api/connect-plugin.ts +1 -1
- package/node_modules/pi-agent-read/src/api/plugin-protocol.ts +1 -1
- package/node_modules/pi-agent-read/src/api/read-parameters.ts +1 -1
- package/node_modules/pi-agent-read/src/api/rendering.ts +2 -2
- package/node_modules/pi-agent-read/src/api/tools/read.ts +8 -2
- package/node_modules/pi-agent-read/src/core/extension.ts +4 -4
- package/node_modules/pi-agent-read/src/core/read-core.ts +4 -4
- package/node_modules/pi-agent-read/src/core/tools/read/output-truncation.ts +2 -2
- package/node_modules/pi-agent-read/src/core/tools/read/persisted-result.ts +1 -1
- package/node_modules/pi-agent-read/src/core/tools/read/raw-read.ts +3 -3
- package/node_modules/pi-agent-read/src/core/tools/read/read-renderer.ts +4 -4
- package/node_modules/pi-agent-read/src/core/tools/read/read-result.ts +21 -14
- package/node_modules/pi-agent-read/src/core/tools/read/result-target.ts +24 -18
- package/node_modules/pi-agent-read/src/core/tools/read/structured-result.ts +2 -2
- package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +44 -18
- package/node_modules/pi-agent-resource/package.json +1 -1
- package/node_modules/pi-agent-resource/src/content-conversion/connect-plugin.ts +4 -4
- package/node_modules/pi-agent-resource/src/content-conversion/content-converter.ts +1 -1
- package/node_modules/pi-agent-resource/src/content-conversion/content-description.ts +1 -1
- package/node_modules/pi-agent-resource/src/content-conversion/content-host.ts +4 -4
- package/node_modules/pi-agent-resource/src/content-conversion/content-runner.ts +3 -3
- package/node_modules/pi-agent-resource/src/content-conversion/plugin-protocol.ts +2 -2
- package/node_modules/pi-agent-resource/src/content-conversion/validation.ts +2 -2
- package/node_modules/pi-agent-resource/src/index.ts +19 -19
- package/node_modules/pi-agent-resource/src/resolver.ts +1 -1
- package/node_modules/pi-agent-resource/src/resource-access.ts +1 -1
- package/node_modules/pi-agent-resource/src/resource-error.ts +1 -1
- package/node_modules/pi-agent-resource/src/resource.ts +1 -1
- package/node_modules/pi-agent-resource/src/result-images.ts +1 -1
- package/node_modules/pi-agent-resource/src/result-targets.ts +23 -2
- package/node_modules/pi-agent-resource/src/temp-resource-store.ts +2 -2
- package/node_modules/pi-agent-resource/src/tool-result.ts +2 -2
- package/node_modules/pi-agent-resource/src/validation.ts +3 -3
- package/node_modules/pi-agent-search/index.ts +1 -1
- package/node_modules/pi-agent-search/package.json +5 -5
- package/node_modules/pi-agent-search/src/api/connect-plugin.ts +1 -1
- package/node_modules/pi-agent-search/src/api/fuzzy.ts +2 -2
- package/node_modules/pi-agent-search/src/api/plugin-protocol.ts +1 -1
- package/node_modules/pi-agent-search/src/api/presentation.ts +1 -1
- package/node_modules/pi-agent-search/src/api/search-scope.ts +1 -1
- package/node_modules/pi-agent-search/src/api/search.ts +7 -7
- package/node_modules/pi-agent-search/src/core/extension.ts +7 -7
- package/node_modules/pi-agent-search/src/core/search-core.ts +3 -3
- package/node_modules/pi-agent-search-text/index.ts +8 -8
- package/node_modules/pi-agent-search-text/package.json +10 -10
- package/node_modules/pi-agent-search-text/src/doctor-plugin.ts +1 -1
- package/node_modules/pi-agent-search-text/src/file-search.ts +1 -1
- package/node_modules/pi-agent-search-text/src/fuzzy-search.ts +2 -2
- package/node_modules/pi-agent-search-text/src/persisted-result.ts +1 -1
- package/node_modules/pi-agent-search-text/src/resolvers.ts +9 -9
- package/node_modules/pi-agent-search-text/src/scoped-search.ts +4 -4
- package/node_modules/pi-agent-search-text/src/search-backend.ts +3 -3
- package/node_modules/pi-agent-search-text/src/search-presentation.ts +1 -1
- package/node_modules/pi-agent-search-text/src/search-recipe.ts +2 -2
- package/node_modules/pi-agent-search-text/src/search-renderer.ts +3 -3
- package/node_modules/pi-agent-search-text/src/search-result.ts +2 -2
- package/node_modules/pi-agent-search-text/src/search-session.ts +132 -67
- package/node_modules/pi-agent-search-text/src/tool-file-search.ts +1 -1
- package/node_modules/pi-agent-text/package.json +2 -2
- package/node_modules/pi-agent-text/src/index.ts +7 -7
- package/node_modules/pi-agent-text/src/source-line.ts +1 -1
- package/node_modules/pi-agent-text/src/text-document.ts +50 -2
- package/node_modules/pi-agent-text-anchor-constant/index.ts +1 -1
- package/node_modules/pi-agent-text-anchor-constant/package.json +3 -3
- package/node_modules/pi-agent-text-anchor-exact/index.ts +2 -2
- package/node_modules/pi-agent-text-anchor-exact/package.json +3 -3
- package/node_modules/pi-agent-text-anchor-exact/src/anchor.ts +63 -48
- package/node_modules/pi-agent-text-anchor-exact/src/recovery.ts +3 -3
- package/node_modules/pi-agent-text-anchor-line-hash/index.ts +2 -2
- package/node_modules/pi-agent-text-anchor-line-hash/package.json +5 -5
- package/node_modules/pi-agent-text-anchor-line-hash/src/read-handler.ts +23 -12
- package/node_modules/pi-agent-text-editor/index.ts +5 -5
- package/node_modules/pi-agent-text-editor/package.json +9 -9
- package/node_modules/pi-agent-text-editor/src/api/connect-plugin.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/api/edit-pipeline.ts +2 -2
- package/node_modules/pi-agent-text-editor/src/api/file-operations.ts +2 -2
- package/node_modules/pi-agent-text-editor/src/api/file-transfers.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/api/mutation-guard.ts +4 -4
- package/node_modules/pi-agent-text-editor/src/api/mutation-result.ts +3 -3
- package/node_modules/pi-agent-text-editor/src/api/mutation-tool.ts +2 -2
- package/node_modules/pi-agent-text-editor/src/api/native-edit-batch-event.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/api/native-files.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/api/plugin-protocol.ts +14 -14
- package/node_modules/pi-agent-text-editor/src/api/post-edit.ts +3 -3
- package/node_modules/pi-agent-text-editor/src/api/tool-call-interceptor.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/api/tool-renderer.ts +2 -2
- package/node_modules/pi-agent-text-editor/src/core/delete-policy.ts +3 -3
- package/node_modules/pi-agent-text-editor/src/core/diff-tool.ts +3 -3
- package/node_modules/pi-agent-text-editor/src/core/extension.ts +13 -13
- package/node_modules/pi-agent-text-editor/src/core/file-operation-guards.ts +2 -2
- package/node_modules/pi-agent-text-editor/src/core/file-operation-tools.ts +6 -6
- package/node_modules/pi-agent-text-editor/src/core/file-operations.ts +5 -5
- package/node_modules/pi-agent-text-editor/src/core/file-result-targets.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/file-transfers.ts +3 -3
- package/node_modules/pi-agent-text-editor/src/core/image-write.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/agent-diff.ts +11 -6
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/diff.ts +213 -20
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +4 -4
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/final-state-fragment.ts +39 -3
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/grouped-replacements.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/inline-hints.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/mutation-result-targets.ts +6 -6
- package/node_modules/pi-agent-text-editor/src/core/native-text-edit-batch.ts +22 -22
- package/node_modules/pi-agent-text-editor/src/core/post-edit-scope.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/read-fragment-resolver.ts +3 -3
- package/node_modules/pi-agent-text-editor/src/core/result-input.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/result-target-anchors.ts +2 -2
- package/node_modules/pi-agent-text-editor/src/core/result-transfer.ts +4 -4
- package/node_modules/pi-agent-text-editor/src/core/source-change-retry.ts +41 -0
- package/node_modules/pi-agent-text-editor/src/core/structured-result.ts +2 -2
- package/node_modules/pi-agent-text-editor/src/core/temporary-directories.ts +2 -2
- package/node_modules/pi-agent-text-editor/src/core/text-anchor-recovery.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/text-anchor-registry.ts +3 -3
- package/node_modules/pi-agent-text-editor/src/core/text-change-engine.ts +4 -7
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts +2 -2
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-recovery.ts +2 -2
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +34 -21
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch.ts +4 -4
- package/node_modules/pi-agent-text-editor/src/core/text-edit-origin.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +72 -30
- package/node_modules/pi-agent-text-editor/src/core/text-mutation-anchor-error.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +211 -159
- package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +4 -4
- package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts +1 -1
- package/node_modules/pi-agent-text-editor/src/core/write-agent-result.ts +3 -3
- package/node_modules/pi-agent-text-editor/src/tools/extension.ts +7 -7
- package/node_modules/pi-agent-text-editor/src/tools/text-selection.ts +2 -2
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-copy.ts +4 -4
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-delete.ts +4 -4
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-insert.ts +3 -3
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-move.ts +5 -5
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +4 -4
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-write.ts +1 -1
- package/node_modules/pi-agent-text-editor-renderer/index.ts +5 -5
- package/node_modules/pi-agent-text-editor-renderer/package.json +5 -5
- package/node_modules/pi-agent-text-editor-renderer/src/diff-renderer.ts +3 -3
- package/node_modules/pi-agent-text-editor-renderer/src/diff-viewport.ts +1 -1
- package/node_modules/pi-agent-text-editor-renderer/src/frozen-viewport.ts +2 -2
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-panel.ts +4 -4
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-projection.ts +2 -2
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-result.ts +3 -3
- package/node_modules/pi-agent-text-editor-renderer/src/persisted-result.ts +2 -2
- package/node_modules/pi-agent-text-editor-renderer/src/render-resource.ts +1 -1
- package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +7 -7
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +5 -5
- package/node_modules/pi-agent-tool-call-interception/package.json +2 -2
- package/node_modules/pi-agent-tool-call-interception/src/index.ts +32 -9
- package/node_modules/pi-agent-tool-ui/package.json +1 -1
- package/node_modules/pi-agent-tool-ui/src/index.ts +1 -1
- package/node_modules/pi-agent-tool-ui/src/result-panel.ts +1 -1
- package/node_modules/pi-agent-web/index.ts +3 -3
- package/node_modules/pi-agent-web/package.json +7 -7
- package/node_modules/pi-agent-web/src/doctor-plugin.ts +1 -1
- package/node_modules/pi-agent-web/src/resolver.ts +1 -1
- package/node_modules/pi-agent-web-html/index.ts +1 -1
- package/node_modules/pi-agent-web-html/package.json +2 -2
- package/node_modules/pi-agent-web-html/src/html-converter.ts +1 -1
- package/node_modules/pi-agent-web-image/package.json +3 -3
- package/node_modules/pi-agent-web-pdf/package.json +3 -3
- package/node_modules/pi-agent-web-text/package.json +3 -3
- package/package.json +36 -36
- package/src/api/code-view.ts +3 -3
- package/src/api/connect-plugin.ts +1 -1
- package/src/api/connect-tip-provider.ts +2 -2
- package/src/api/doctor-runtime.ts +1 -1
- package/src/api/doctor.ts +1 -1
- package/src/api/hooks.ts +2 -2
- package/src/api/plugin-protocol.ts +1 -1
- package/src/api/settings.ts +6 -1
- package/src/api/standalone.ts +1 -1
- package/src/api/tips.ts +1 -1
- package/src/api/tool-config/linters.json +1 -1
- package/src/api/tool-config/lsp-servers.json +11 -0
- package/src/api/tool-config.ts +45 -5
- package/src/api/toolchain.ts +3 -3
- package/src/backend/config.ts +2 -2
- package/src/backend/configured-process.ts +5 -5
- package/src/backend/dap-java-transport.ts +6 -6
- package/src/backend/dap-node-transport.ts +5 -5
- package/src/backend/dap-tcp-transport.ts +3 -3
- package/src/backend/dap-transport.ts +5 -5
- package/src/backend/debugger-registration.ts +7 -7
- package/src/backend/debugger-workspace-owner.ts +10 -10
- package/src/backend/doctor-registration.ts +5 -5
- package/src/backend/doctor-workspace.ts +13 -13
- package/src/backend/file-operation-resolver.ts +5 -5
- package/src/backend/file-revision.ts +1 -1
- package/src/backend/file-transfer.ts +4 -4
- package/src/backend/formatter-registration.ts +11 -11
- package/src/backend/git-registration.ts +4 -4
- package/src/backend/index.ts +3 -3
- package/src/backend/lint-registration.ts +11 -11
- package/src/backend/lsp-file-watchers.ts +5 -5
- package/src/backend/lsp-registration.ts +11 -11
- package/src/backend/lsp-transport.ts +7 -7
- package/src/backend/lsp-workspace-owner.ts +4 -4
- package/src/backend/object-transfer.ts +5 -5
- package/src/backend/owned-command.ts +2 -2
- package/src/backend/owned-process-stop.ts +4 -4
- package/src/backend/owned-read-command.ts +2 -2
- package/src/backend/process-environment.ts +2 -2
- package/src/backend/process-metadata.ts +2 -2
- package/src/backend/recipe-evidence.ts +2 -2
- package/src/backend/registration.ts +8 -8
- package/src/backend/registry.ts +2 -2
- package/src/backend/resource-resolver.ts +2 -2
- package/src/backend/search-environment.ts +3 -3
- package/src/backend/ssh-channel.ts +3 -3
- package/src/backend/ssh-transport.ts +2 -2
- package/src/backend/ssh.ts +6 -6
- package/src/backend/tool-config-access.ts +4 -4
- package/src/backend/tool-project.ts +5 -5
- package/src/backend/web-browser.ts +3 -3
- package/src/backend/web-http.ts +2 -2
- package/src/backend/web-owner.ts +5 -5
- package/src/backend/web-registration.ts +5 -5
- package/src/code-review/extension.ts +3 -3
- package/src/code-review/reviewer.ts +2 -2
- package/src/code-view/diagnostic-view.ts +4 -4
- package/src/composite/builtin-extensions.ts +37 -37
- package/src/composite/capabilities.ts +2 -2
- package/src/composite/capability-schemas.ts +1 -1
- package/src/composite/detached-results.ts +32 -0
- package/src/composite/extensions-config.ts +2 -2
- package/src/composite/module-settings-store.ts +2 -2
- package/src/composite/module-settings.ts +12 -12
- package/src/composite/nested-tool-rendering.ts +3 -3
- package/src/composite/output-limits.ts +6 -1
- package/src/composite/preferences.ts +10 -0
- package/src/composite/presets.ts +1 -1
- package/src/composite/reload-required.ts +6 -6
- package/src/composite/settings-documentation.ts +5 -5
- package/src/composite/settings-registry.ts +4 -4
- package/src/composite/text-results.ts +2 -2
- package/src/core/diagnostic-entry.ts +2 -2
- package/src/core/diagnostic-store.ts +3 -3
- package/src/core/extension.ts +8 -8
- package/src/core/ide-core.ts +4 -4
- package/src/doctor/config-writer.ts +3 -3
- package/src/doctor/core.ts +2 -2
- package/src/doctor/discovery.ts +4 -4
- package/src/doctor/extension.ts +7 -7
- package/src/doctor/index.ts +1 -1
- package/src/doctor/inventory.ts +1 -1
- package/src/doctor/run.ts +6 -6
- package/src/doctor/tip-provider.ts +2 -2
- package/src/documentation/extension.ts +3 -3
- package/src/documentation/registry.ts +1 -1
- package/src/documentation/search.ts +1 -1
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/index.ts +2 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +7 -7
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/index.ts +1 -1
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/package.json +5 -5
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/src/api/jq.ts +1 -1
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/src/file-write-lock.ts +70 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/src/replace-file.ts +50 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/src/resolver.ts +28 -8
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/index.ts +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +7 -7
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/index.ts +1 -1
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +2 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/src/html-converter.ts +1 -1
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/doctor-plugin.ts +1 -1
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/resolver.ts +1 -1
- package/src/extensions/pi-agent-read/index.ts +1 -1
- package/src/extensions/pi-agent-read/package.json +7 -7
- package/src/extensions/pi-agent-read/src/api/connect-plugin.ts +1 -1
- package/src/extensions/pi-agent-read/src/api/plugin-protocol.ts +1 -1
- package/src/extensions/pi-agent-read/src/api/read-parameters.ts +1 -1
- package/src/extensions/pi-agent-read/src/api/rendering.ts +2 -2
- package/src/extensions/pi-agent-read/src/api/tools/read.ts +8 -2
- package/src/extensions/pi-agent-read/src/core/extension.ts +4 -4
- package/src/extensions/pi-agent-read/src/core/read-core.ts +4 -4
- package/src/extensions/pi-agent-read/src/core/tools/read/output-truncation.ts +2 -2
- package/src/extensions/pi-agent-read/src/core/tools/read/persisted-result.ts +1 -1
- package/src/extensions/pi-agent-read/src/core/tools/read/raw-read.ts +3 -3
- package/src/extensions/pi-agent-read/src/core/tools/read/read-renderer.ts +4 -4
- package/src/extensions/pi-agent-read/src/core/tools/read/read-result.ts +21 -14
- package/src/extensions/pi-agent-read/src/core/tools/read/result-target.ts +24 -18
- package/src/extensions/pi-agent-read/src/core/tools/read/structured-result.ts +2 -2
- package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +44 -18
- package/src/extensions/pi-agent-search/index.ts +1 -1
- package/src/extensions/pi-agent-search/package.json +5 -5
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +8 -8
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +10 -10
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/doctor-plugin.ts +1 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/file-search.ts +1 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/fuzzy-search.ts +2 -2
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/persisted-result.ts +1 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/resolvers.ts +9 -9
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/scoped-search.ts +4 -4
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-backend.ts +3 -3
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-presentation.ts +1 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-recipe.ts +2 -2
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-renderer.ts +3 -3
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-result.ts +2 -2
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-session.ts +132 -67
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/tool-file-search.ts +1 -1
- package/src/extensions/pi-agent-search/src/api/connect-plugin.ts +1 -1
- package/src/extensions/pi-agent-search/src/api/fuzzy.ts +2 -2
- package/src/extensions/pi-agent-search/src/api/plugin-protocol.ts +1 -1
- package/src/extensions/pi-agent-search/src/api/presentation.ts +1 -1
- package/src/extensions/pi-agent-search/src/api/search-scope.ts +1 -1
- package/src/extensions/pi-agent-search/src/api/search.ts +7 -7
- package/src/extensions/pi-agent-search/src/core/extension.ts +7 -7
- package/src/extensions/pi-agent-search/src/core/search-core.ts +3 -3
- package/src/extensions/pi-agent-text-editor/index.ts +5 -5
- package/src/extensions/pi-agent-text-editor/package.json +9 -9
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/index.ts +1 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +3 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/index.ts +2 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +3 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/anchor.ts +63 -48
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/recovery.ts +3 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/index.ts +2 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +5 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/src/read-handler.ts +23 -12
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/index.ts +5 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +5 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-renderer.ts +3 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-viewport.ts +1 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/frozen-viewport.ts +2 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-panel.ts +4 -4
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-projection.ts +2 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-result.ts +3 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/persisted-result.ts +2 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/render-resource.ts +1 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +7 -7
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +5 -5
- package/src/extensions/pi-agent-text-editor/src/api/connect-plugin.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/api/edit-pipeline.ts +2 -2
- package/src/extensions/pi-agent-text-editor/src/api/file-operations.ts +2 -2
- package/src/extensions/pi-agent-text-editor/src/api/file-transfers.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/api/mutation-guard.ts +4 -4
- package/src/extensions/pi-agent-text-editor/src/api/mutation-result.ts +3 -3
- package/src/extensions/pi-agent-text-editor/src/api/mutation-tool.ts +2 -2
- package/src/extensions/pi-agent-text-editor/src/api/native-edit-batch-event.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/api/native-files.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/api/plugin-protocol.ts +14 -14
- package/src/extensions/pi-agent-text-editor/src/api/post-edit.ts +3 -3
- package/src/extensions/pi-agent-text-editor/src/api/tool-call-interceptor.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/api/tool-renderer.ts +2 -2
- package/src/extensions/pi-agent-text-editor/src/core/delete-policy.ts +3 -3
- package/src/extensions/pi-agent-text-editor/src/core/diff-tool.ts +3 -3
- package/src/extensions/pi-agent-text-editor/src/core/extension.ts +13 -13
- package/src/extensions/pi-agent-text-editor/src/core/file-operation-guards.ts +2 -2
- package/src/extensions/pi-agent-text-editor/src/core/file-operation-tools.ts +6 -6
- package/src/extensions/pi-agent-text-editor/src/core/file-operations.ts +5 -5
- package/src/extensions/pi-agent-text-editor/src/core/file-result-targets.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/file-transfers.ts +3 -3
- package/src/extensions/pi-agent-text-editor/src/core/image-write.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/agent-diff.ts +11 -6
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/diff.ts +213 -20
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +4 -4
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/final-state-fragment.ts +39 -3
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/grouped-replacements.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/inline-hints.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result-targets.ts +6 -6
- package/src/extensions/pi-agent-text-editor/src/core/native-text-edit-batch.ts +22 -22
- package/src/extensions/pi-agent-text-editor/src/core/post-edit-scope.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/read-fragment-resolver.ts +3 -3
- package/src/extensions/pi-agent-text-editor/src/core/result-input.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/result-target-anchors.ts +2 -2
- package/src/extensions/pi-agent-text-editor/src/core/result-transfer.ts +4 -4
- package/src/extensions/pi-agent-text-editor/src/core/source-change-retry.ts +41 -0
- package/src/extensions/pi-agent-text-editor/src/core/structured-result.ts +2 -2
- package/src/extensions/pi-agent-text-editor/src/core/temporary-directories.ts +2 -2
- package/src/extensions/pi-agent-text-editor/src/core/text-anchor-recovery.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/text-anchor-registry.ts +3 -3
- package/src/extensions/pi-agent-text-editor/src/core/text-change-engine.ts +4 -7
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts +2 -2
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-recovery.ts +2 -2
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +34 -21
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch.ts +4 -4
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-origin.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +72 -30
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation-anchor-error.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +211 -159
- package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +4 -4
- package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts +1 -1
- package/src/extensions/pi-agent-text-editor/src/core/write-agent-result.ts +3 -3
- package/src/extensions/pi-agent-text-editor/src/tools/extension.ts +7 -7
- package/src/extensions/pi-agent-text-editor/src/tools/text-selection.ts +2 -2
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-copy.ts +4 -4
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-delete.ts +4 -4
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-insert.ts +3 -3
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-move.ts +5 -5
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +4 -4
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-write.ts +1 -1
- package/src/index.ts +1 -1
- package/src/pi-agent-ide.ts +22 -20
- package/src/plugins/pi-agent-ide-ast/index.ts +1 -1
- package/src/plugins/pi-agent-ide-ast/package.json +13 -13
- package/src/plugins/pi-agent-ide-ast/src/api/scope.ts +1 -1
- package/src/plugins/pi-agent-ide-ast/src/ast/manager.ts +33 -11
- package/src/plugins/pi-agent-ide-ast/src/ast/native-parser.ts +1 -1
- package/src/plugins/pi-agent-ide-ast/src/ast/outline.ts +60 -55
- package/src/plugins/pi-agent-ide-ast/src/doctor-plugin.ts +4 -3
- package/src/plugins/pi-agent-ide-ast/src/extension.ts +10 -10
- package/src/plugins/pi-agent-ide-ast/src/outline-resolver.ts +3 -3
- package/src/plugins/pi-agent-ide-ast/src/overflow-handler.ts +1 -1
- package/src/plugins/pi-agent-ide-ast/src/scope-handler.ts +35 -8
- package/src/plugins/pi-agent-ide-ast/src/scope-resolver.ts +1 -1
- package/src/plugins/pi-agent-ide-ast/src/search-resolver.ts +161 -23
- package/src/plugins/pi-agent-ide-ast/src/tool-ast-search.ts +1 -1
- package/src/plugins/pi-agent-ide-changes/index.ts +9 -9
- package/src/plugins/pi-agent-ide-changes/package.json +8 -8
- package/src/plugins/pi-agent-ide-changes/src/change-anchor.ts +4 -4
- package/src/plugins/pi-agent-ide-changes/src/changes/change-groups.ts +1 -1
- package/src/plugins/pi-agent-ide-changes/src/changes/change-service.ts +4 -4
- package/src/plugins/pi-agent-ide-changes/src/changes/git-changes-backend.ts +1 -1
- package/src/plugins/pi-agent-ide-changes/src/current-change-presenter.ts +4 -4
- package/src/plugins/pi-agent-ide-changes/src/tool-index-change.ts +5 -5
- package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +6 -6
- package/src/plugins/pi-agent-ide-debugger/index.ts +21 -13
- package/src/plugins/pi-agent-ide-debugger/src/breakpoint-view.ts +1 -1
- package/src/plugins/pi-agent-ide-debugger/src/doctor-plugin.ts +4 -4
- package/src/plugins/pi-agent-ide-debugger/src/java-runtime.ts +2 -2
- package/src/plugins/pi-agent-ide-debugger/src/process-provider.ts +3 -3
- package/src/plugins/pi-agent-ide-debugger/src/renderer.ts +1 -1
- package/src/plugins/pi-agent-ide-debugger/src/session-manager.ts +5 -5
- package/src/plugins/pi-agent-ide-debugger/src/ui.ts +1 -1
- package/src/plugins/pi-agent-ide-debugger/src/vscode-backend.ts +1 -1
- package/src/plugins/pi-agent-ide-debugger/src/workspace-owner.ts +2 -2
- package/src/plugins/pi-agent-ide-diagnostics/index.ts +1 -1
- package/src/plugins/pi-agent-ide-formatter/index.ts +5 -5
- package/src/plugins/pi-agent-ide-formatter/package.json +3 -3
- package/src/plugins/pi-agent-ide-formatter/src/doctor-plugin.ts +2 -2
- package/src/plugins/pi-agent-ide-formatter/src/formatter.ts +2 -2
- package/src/plugins/pi-agent-ide-formatter/src/registry.ts +1 -1
- package/src/plugins/pi-agent-ide-languages/index.ts +1 -1
- package/src/plugins/pi-agent-ide-languages/package.json +2 -2
- package/src/plugins/pi-agent-ide-lint/index.ts +9 -9
- package/src/plugins/pi-agent-ide-lint/package.json +7 -7
- package/src/plugins/pi-agent-ide-lint/src/catalog.ts +4 -0
- package/src/plugins/pi-agent-ide-lint/src/command-linter.ts +15 -6
- package/src/plugins/pi-agent-ide-lint/src/diagnostics.ts +8 -14
- package/src/plugins/pi-agent-ide-lint/src/doctor-plugin.ts +3 -3
- package/src/plugins/pi-agent-ide-lint/src/registry.ts +1 -1
- package/src/plugins/pi-agent-ide-lsp/index.ts +37 -16
- package/src/plugins/pi-agent-ide-lsp/package.json +12 -12
- package/src/plugins/pi-agent-ide-lsp/src/catalog.ts +12 -1
- package/src/plugins/pi-agent-ide-lsp/src/declaration-targets.ts +21 -14
- package/src/plugins/pi-agent-ide-lsp/src/diagnostic-source.ts +63 -20
- package/src/plugins/pi-agent-ide-lsp/src/doctor-plugin.ts +4 -4
- package/src/plugins/pi-agent-ide-lsp/src/idle-timeout.ts +15 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/abort.ts +11 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/client.ts +434 -80
- package/src/plugins/pi-agent-ide-lsp/src/lsp/code-views.ts +121 -35
- package/src/plugins/pi-agent-ide-lsp/src/lsp/diagnostic-adapters.ts +1 -1
- package/src/plugins/pi-agent-ide-lsp/src/lsp/diagnostics.ts +26 -12
- package/src/plugins/pi-agent-ide-lsp/src/lsp/document-leases.ts +31 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/errors.ts +4 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/file-watchers.ts +1 -77
- package/src/plugins/pi-agent-ide-lsp/src/lsp/index.ts +19 -19
- package/src/plugins/pi-agent-ide-lsp/src/lsp/language-map.ts +1 -1
- package/src/plugins/pi-agent-ide-lsp/src/lsp/lsp-compiler.ts +5 -4
- package/src/plugins/pi-agent-ide-lsp/src/lsp/manager.ts +59 -28
- package/src/plugins/pi-agent-ide-lsp/src/lsp/navigation.ts +42 -22
- package/src/plugins/pi-agent-ide-lsp/src/lsp/owner-transport.ts +1 -1
- package/src/plugins/pi-agent-ide-lsp/src/lsp/position-map.ts +52 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/project.ts +1 -1
- package/src/plugins/pi-agent-ide-lsp/src/lsp/registry.ts +2 -2
- package/src/plugins/pi-agent-ide-lsp/src/lsp/rename.ts +2 -2
- package/src/plugins/pi-agent-ide-lsp/src/lsp/server-request-handlers.mjs +325 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/shared-server-host.mjs +797 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/shared-servers.ts +322 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/source-changes.ts +29 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/symbol-search.ts +76 -17
- package/src/plugins/pi-agent-ide-lsp/src/lsp/symbols.ts +3 -3
- package/src/plugins/pi-agent-ide-lsp/src/lsp/workspace-owner.ts +1 -1
- package/src/plugins/pi-agent-ide-lsp/src/manager-provider.ts +1 -1
- package/src/plugins/pi-agent-ide-lsp/src/rename-plan.ts +16 -8
- package/src/plugins/pi-agent-ide-lsp/src/search-resolver.ts +149 -134
- package/src/plugins/pi-agent-ide-lsp/src/tool-lsp-search.ts +1 -1
- package/src/plugins/pi-agent-ide-processes/index.ts +4 -4
- package/src/plugins/pi-agent-ide-processes/src/ui.ts +1 -1
- package/src/plugins/pi-agent-ide-semantic/src/vera-backend.ts +2 -2
- package/src/plugins/pi-agent-ide-terminal/index.ts +17 -17
- package/src/plugins/pi-agent-ide-terminal/src/origin.ts +1 -1
- package/src/plugins/pi-agent-ide-terminal/src/output-limits.ts +1 -1
- package/src/plugins/pi-agent-ide-terminal/src/process-provider.ts +3 -3
- package/src/plugins/pi-agent-ide-terminal/src/renderer.ts +3 -3
- package/src/plugins/pi-agent-ide-terminal/src/resources.ts +5 -5
- package/src/plugins/pi-agent-ide-terminal/src/screen-image.ts +1 -1
- package/src/plugins/pi-agent-ide-terminal/src/search.ts +2 -2
- package/src/plugins/pi-agent-ide-terminal/src/session-manager.ts +3 -3
- package/src/plugins/pi-agent-ide-terminal/src/shell-profile.ts +1 -1
- package/src/plugins/pi-agent-ide-terminal/src/shell-result.ts +1 -1
- package/src/plugins/pi-agent-ide-terminal/src/tools.ts +9 -9
- package/src/plugins/pi-agent-ide-terminal/src/types.ts +1 -1
- package/src/plugins/pi-agent-ide-terminal/src/ui.ts +3 -3
- package/src/post-edit/gate.ts +1 -1
- package/src/semantic/extension.ts +2 -2
- package/src/semantic/index.ts +4 -4
- package/src/standalone/resource-host.ts +13 -13
- package/src/standalone/scoped-api.ts +2 -2
- package/src/tips/core.ts +1 -1
- package/src/tips/extension.ts +6 -6
- package/src/tips/setup-hint.ts +1 -1
- package/src/toolchain/diagnostic.ts +1 -1
- package/src/toolchain/registry.ts +1 -1
- package/dist/chunk-2AY526TN.js +0 -3
- package/dist/chunk-52PFWQMU.js +0 -5
- package/dist/chunk-57F5GTHO.js +0 -1
- package/dist/chunk-5S74Z6Y4.js +0 -7
- package/dist/chunk-7D7PXIVV.js +0 -1
- package/dist/chunk-BT2CFM7D.js +0 -11
- package/dist/chunk-C2JT2G5K.js +0 -1
- package/dist/chunk-DEWWWKUF.js +0 -6
- package/dist/chunk-FEZLTM4L.js +0 -1
- package/dist/chunk-G4PRFO6G.js +0 -1
- package/dist/chunk-H5Z54BEU.js +0 -25
- package/dist/chunk-HISGZD3C.js +0 -81
- package/dist/chunk-HRBUY2FF.js +0 -4
- package/dist/chunk-ICIRQLZ4.js +0 -23
- package/dist/chunk-LIQ4BVOB.js +0 -1
- package/dist/chunk-LXDF2NWX.js +0 -1
- package/dist/chunk-MDD5ORB6.js +0 -1
- package/dist/chunk-OJEIX7OZ.js +0 -1
- package/dist/chunk-S5PL5DFQ.js +0 -1
- package/dist/chunk-U7YDLVFL.js +0 -1
- package/dist/chunk-VDJSH3DQ.js +0 -2
- package/dist/chunk-XH5WN5XA.js +0 -2
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "pi-agent-resource";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
9
|
-
import type { TextEditCompletion } from "#src/api/edit-completion.
|
|
9
|
+
import type { TextEditCompletion } from "#src/api/edit-completion.ts";
|
|
10
10
|
import type {
|
|
11
11
|
TextAnchorRecoveryCandidateRange,
|
|
12
12
|
TextAnchorRecoveryRange,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
FileMutationResult,
|
|
29
29
|
type MutationResultPresentation,
|
|
30
30
|
type MutationOperationReceipt,
|
|
31
|
-
} from "#src/api/mutation-result.
|
|
31
|
+
} from "#src/api/mutation-result.ts";
|
|
32
32
|
import {
|
|
33
33
|
isMutationAnchorValue,
|
|
34
34
|
mutationSource,
|
|
@@ -38,68 +38,71 @@ import {
|
|
|
38
38
|
type TextMutationToolRegistration,
|
|
39
39
|
type TextSemanticMutationResult,
|
|
40
40
|
withoutEmptyOptionalAnchors,
|
|
41
|
-
} from "#src/api/mutation-tool.
|
|
41
|
+
} from "#src/api/mutation-tool.ts";
|
|
42
42
|
import {
|
|
43
43
|
isFormattingContribution,
|
|
44
44
|
isDiffStatusContribution,
|
|
45
45
|
isTextMutationResultContributionData,
|
|
46
|
-
} from "#src/api/post-edit.
|
|
46
|
+
} from "#src/api/post-edit.ts";
|
|
47
47
|
import {
|
|
48
48
|
formatStaleAnchorMessage,
|
|
49
49
|
type StaleAnchorMessageDetails,
|
|
50
|
-
} from "#src/api/stale-anchor-message.
|
|
51
|
-
import { createUnifiedDiff } from "#src/core/mutation-result/diff.
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
50
|
+
} from "#src/api/stale-anchor-message.ts";
|
|
51
|
+
import { createUnifiedDiff } from "#src/core/mutation-result/diff.ts";
|
|
52
|
+
import { finalStateLineNumbers } from "#src/core/mutation-result/final-state-fragment.ts";
|
|
53
|
+
import { imageWriteResult, planImageWrite } from "#src/core/image-write.ts";
|
|
54
|
+
import { FileMutationAgentResult } from "#src/core/mutation-result/file-mutation-agent-result.ts";
|
|
55
|
+
import { readTextAnchorRecovery } from "#src/core/text-anchor-recovery.ts";
|
|
56
|
+
import { applyTextChanges, TextChangeDocument } from "#src/core/text-change-engine.ts";
|
|
57
|
+
import { resolvedTextAnchorType } from "#src/core/text-anchor-registry.ts";
|
|
58
|
+
import { executeTextToolWithBatch } from "#src/core/text-edit-batch-registrar.ts";
|
|
59
|
+
import { retryWhenSourceChanged, SOURCE_CHANGED } from "#src/core/source-change-retry.ts";
|
|
58
60
|
import {
|
|
59
61
|
executeNativeTextEditBatch,
|
|
60
62
|
runNativePostEditScope,
|
|
61
63
|
recordNativeTextMutation,
|
|
62
|
-
} from "#src/core/native-text-edit-batch.
|
|
64
|
+
} from "#src/core/native-text-edit-batch.ts";
|
|
63
65
|
import {
|
|
64
66
|
attachCommittedMutationTarget,
|
|
65
67
|
attachWriteTarget,
|
|
66
68
|
describeUnavailableCopyTarget,
|
|
67
69
|
unchangedCopySources,
|
|
68
|
-
} from "./mutation-result-targets.
|
|
69
|
-
import { wholeFileResultSource } from "./result-input.
|
|
70
|
-
import { TEXT_SEARCH_ANCHOR_KIND } from "#src/api/plugin-protocol.
|
|
71
|
-
import { isResultInput, prepareResultTransfer } from "./result-transfer.
|
|
70
|
+
} from "./mutation-result-targets.ts";
|
|
71
|
+
import { wholeFileResultSource } from "./result-input.ts";
|
|
72
|
+
import { TEXT_SEARCH_ANCHOR_KIND } from "#src/api/plugin-protocol.ts";
|
|
73
|
+
import { isResultInput, prepareResultTransfer } from "./result-transfer.ts";
|
|
72
74
|
import {
|
|
73
75
|
contextualizeTextMutationAnchorError,
|
|
74
76
|
TextMutationAnchorAggregateError,
|
|
75
77
|
TextMutationAnchorResolutionError,
|
|
76
|
-
} from "#src/core/text-mutation-anchor-error.
|
|
78
|
+
} from "#src/core/text-mutation-anchor-error.ts";
|
|
77
79
|
import {
|
|
78
80
|
TOOL_CALL_INTERCEPTION_ANCHOR_RENDER_PATCH,
|
|
79
81
|
type ToolCallInterceptionRenderStore,
|
|
80
82
|
withToolCallInterceptionRendering,
|
|
81
|
-
} from "#src/core/tool-call-interceptor/rendering.
|
|
83
|
+
} from "#src/core/tool-call-interceptor/rendering.ts";
|
|
82
84
|
|
|
83
|
-
import type { TextEditExecutionOutcome } from "#src/api/edit-pipeline.
|
|
85
|
+
import type { TextEditExecutionOutcome, TextPreEditState } from "#src/api/edit-pipeline.ts";
|
|
84
86
|
import type {
|
|
85
87
|
TextMutationPreviewOutcome,
|
|
86
88
|
TextMutationPreviewRequest,
|
|
87
|
-
} from "#src/api/mutation-preview.
|
|
89
|
+
} from "#src/api/mutation-preview.ts";
|
|
88
90
|
import type {
|
|
89
91
|
ResolveResourceTextAnchor,
|
|
90
92
|
TextEditorCore,
|
|
91
93
|
TextResourceEditFailure,
|
|
92
94
|
TextResourceEditOutcome,
|
|
95
|
+
TextPresentedLines,
|
|
93
96
|
TextResourcesEditOutcome,
|
|
94
|
-
} from "#src/core/text-editor-core.
|
|
97
|
+
} from "#src/core/text-editor-core.ts";
|
|
95
98
|
import { renderTextAnchor, type TextAnchor } from "pi-agent-text";
|
|
96
|
-
import { TextSelectionAnchor } from "#src/api/text-selection-anchor.
|
|
99
|
+
import { TextSelectionAnchor } from "#src/api/text-selection-anchor.ts";
|
|
97
100
|
import type { ToolCallAnchorRenderState } from "pi-agent-tool-call-interception";
|
|
98
101
|
import type { Static, TSchema } from "typebox";
|
|
99
|
-
import { executeWholeFileTool, isWholeFileInvocation } from "#src/core/file-operation-tools.
|
|
100
|
-
import { EDITING_GUIDELINES } from "#src/core/editing-guidelines.
|
|
101
|
-
import { writeAgentResult } from "./write-agent-result.
|
|
102
|
-
import { mutationResultSchema, structuredMutation } from "./structured-result.
|
|
102
|
+
import { executeWholeFileTool, isWholeFileInvocation } from "#src/core/file-operation-tools.ts";
|
|
103
|
+
import { EDITING_GUIDELINES } from "#src/core/editing-guidelines.ts";
|
|
104
|
+
import { writeAgentResult } from "./write-agent-result.ts";
|
|
105
|
+
import { mutationResultSchema, structuredMutation } from "./structured-result.ts";
|
|
103
106
|
import type { ResultImageStore, ResultTargetStore } from "pi-agent-resource";
|
|
104
107
|
|
|
105
108
|
/** Build a mutation tool; host events report terminal filesystem approvals to Herdr. */
|
|
@@ -1166,106 +1169,69 @@ export async function executeTextMutationPipeline<TParameters extends TSchema>(
|
|
|
1166
1169
|
input: parameters,
|
|
1167
1170
|
...(signal !== undefined && { signal }),
|
|
1168
1171
|
},
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
(texts) => {
|
|
1186
|
-
for (const file of plan.files) {
|
|
1187
|
-
if (texts.get(file.source) !== file.expectedContent)
|
|
1188
|
-
throw new Error(
|
|
1189
|
-
"A semantic edit source changed. Resolve the symbol again before retrying.",
|
|
1190
|
-
);
|
|
1191
|
-
}
|
|
1192
|
-
const edits = new Map(
|
|
1193
|
-
plan.files.map((file) => [
|
|
1194
|
-
file.source,
|
|
1195
|
-
{ changes: file.changes, action: "edited" as const },
|
|
1196
|
-
]),
|
|
1197
|
-
);
|
|
1198
|
-
return Promise.resolve({
|
|
1199
|
-
changes: new Map(plan.files.map((file) => [file.source, file.changes])),
|
|
1200
|
-
result: {
|
|
1201
|
-
edits,
|
|
1202
|
-
resultPresentations: new Map(
|
|
1203
|
-
plan.files.map((file) => [file.source, "plain" as const]),
|
|
1204
|
-
),
|
|
1205
|
-
},
|
|
1206
|
-
});
|
|
1207
|
-
},
|
|
1208
|
-
);
|
|
1209
|
-
return await completeTextMutation(outcome, requiredValue(plan.files[0]).source);
|
|
1210
|
-
}
|
|
1211
|
-
const sources = await resolveMutationSources(
|
|
1212
|
-
core,
|
|
1213
|
-
definition,
|
|
1214
|
-
state.input,
|
|
1215
|
-
state,
|
|
1216
|
-
lastResolvedSource,
|
|
1217
|
-
);
|
|
1218
|
-
const semanticHandler = core.getSemanticMutationHandler(definition.name, state.input);
|
|
1219
|
-
if (semanticHandler !== undefined) {
|
|
1220
|
-
return await core.editTexts(
|
|
1221
|
-
sources.resources.map((resourceSource) => ({
|
|
1222
|
-
source: resourceSource,
|
|
1223
|
-
read: true,
|
|
1224
|
-
requireWrite: false,
|
|
1225
|
-
})),
|
|
1226
|
-
{
|
|
1227
|
-
cwd: state.cwd,
|
|
1228
|
-
intent: definition.intent ?? "edit",
|
|
1229
|
-
...(state.signal !== undefined && { signal: state.signal }),
|
|
1230
|
-
},
|
|
1231
|
-
async (texts, resolveAnchor) => {
|
|
1232
|
-
for (const target of sources.targets) {
|
|
1233
|
-
if (
|
|
1234
|
-
target.expectedContent !== undefined &&
|
|
1235
|
-
texts.get(target.source) !== target.expectedContent
|
|
1236
|
-
) {
|
|
1237
|
-
throw new Error(
|
|
1238
|
-
"The selected source changed before the semantic action. Resolve it again.",
|
|
1239
|
-
);
|
|
1240
|
-
}
|
|
1241
|
-
}
|
|
1242
|
-
const mutationContext = createMutationContext(
|
|
1243
|
-
definition,
|
|
1244
|
-
state.input,
|
|
1245
|
-
state,
|
|
1246
|
-
sources,
|
|
1247
|
-
texts,
|
|
1248
|
-
resolveAnchor,
|
|
1249
|
-
publishAnchorRenderState,
|
|
1250
|
-
);
|
|
1251
|
-
await preflightMutationAnchors(definition, state.input, mutationContext);
|
|
1252
|
-
const semanticAction = await semanticHandler.execute(mutationContext, state.input);
|
|
1253
|
-
return {
|
|
1254
|
-
changes: new Map(),
|
|
1255
|
-
result: withResultPresentations(
|
|
1256
|
-
{ edits: new Map(), semanticAction },
|
|
1257
|
-
mutationContext,
|
|
1258
|
-
),
|
|
1259
|
-
resourceEffect: true,
|
|
1260
|
-
};
|
|
1261
|
-
},
|
|
1262
|
-
);
|
|
1263
|
-
}
|
|
1172
|
+
// Another Pi process may write the file between this edit's read and its write. The write
|
|
1173
|
+
// is then refused, and the edit runs again on the current text, anchors included.
|
|
1174
|
+
(state) => retryWhenSourceChanged(() => applyTextMutation(state)),
|
|
1175
|
+
);
|
|
1176
|
+
|
|
1177
|
+
async function applyTextMutation(
|
|
1178
|
+
state: TextPreEditState<Static<TParameters>>,
|
|
1179
|
+
): Promise<TextResourcesEditOutcome<TextMutation>> {
|
|
1180
|
+
try {
|
|
1181
|
+
if (state.editPlan !== undefined) {
|
|
1182
|
+
const plan = state.editPlan;
|
|
1183
|
+
if (
|
|
1184
|
+
plan.files.length === 0 ||
|
|
1185
|
+
new Set(plan.files.map((file) => file.source)).size !== plan.files.length
|
|
1186
|
+
)
|
|
1187
|
+
throw new Error("Semantic edit plan must contain distinct source files.");
|
|
1264
1188
|
const outcome = await core.editTexts(
|
|
1189
|
+
plan.files.map((file) => ({ source: file.source, read: true })),
|
|
1190
|
+
{
|
|
1191
|
+
cwd: state.cwd,
|
|
1192
|
+
intent: definition.intent ?? "edit",
|
|
1193
|
+
...(state.signal !== undefined && { signal: state.signal }),
|
|
1194
|
+
},
|
|
1195
|
+
(texts) => {
|
|
1196
|
+
for (const file of plan.files) {
|
|
1197
|
+
if (texts.get(file.source) !== file.expectedContent)
|
|
1198
|
+
throw new Error(
|
|
1199
|
+
"A semantic edit source changed. Resolve the symbol again before retrying.",
|
|
1200
|
+
);
|
|
1201
|
+
}
|
|
1202
|
+
const edits = new Map(
|
|
1203
|
+
plan.files.map((file) => [
|
|
1204
|
+
file.source,
|
|
1205
|
+
{ changes: file.changes, action: "edited" as const },
|
|
1206
|
+
]),
|
|
1207
|
+
);
|
|
1208
|
+
return Promise.resolve({
|
|
1209
|
+
changes: new Map(plan.files.map((file) => [file.source, file.changes])),
|
|
1210
|
+
result: {
|
|
1211
|
+
edits,
|
|
1212
|
+
resultPresentations: new Map(
|
|
1213
|
+
plan.files.map((file) => [file.source, "plain" as const]),
|
|
1214
|
+
),
|
|
1215
|
+
},
|
|
1216
|
+
});
|
|
1217
|
+
},
|
|
1218
|
+
);
|
|
1219
|
+
return await completeTextMutation(outcome, requiredValue(plan.files[0]).source);
|
|
1220
|
+
}
|
|
1221
|
+
const sources = await resolveMutationSources(
|
|
1222
|
+
core,
|
|
1223
|
+
definition,
|
|
1224
|
+
state.input,
|
|
1225
|
+
state,
|
|
1226
|
+
lastResolvedSource,
|
|
1227
|
+
);
|
|
1228
|
+
const semanticHandler = core.getSemanticMutationHandler(definition.name, state.input);
|
|
1229
|
+
if (semanticHandler !== undefined) {
|
|
1230
|
+
return await core.editTexts(
|
|
1265
1231
|
sources.resources.map((resourceSource) => ({
|
|
1266
1232
|
source: resourceSource,
|
|
1267
1233
|
read: true,
|
|
1268
|
-
|
|
1234
|
+
requireWrite: false,
|
|
1269
1235
|
})),
|
|
1270
1236
|
{
|
|
1271
1237
|
cwd: state.cwd,
|
|
@@ -1277,10 +1243,14 @@ export async function executeTextMutationPipeline<TParameters extends TSchema>(
|
|
|
1277
1243
|
if (
|
|
1278
1244
|
target.expectedContent !== undefined &&
|
|
1279
1245
|
texts.get(target.source) !== target.expectedContent
|
|
1280
|
-
)
|
|
1281
|
-
throw
|
|
1282
|
-
|
|
1246
|
+
) {
|
|
1247
|
+
throw Object.assign(
|
|
1248
|
+
new Error(
|
|
1249
|
+
"The selected source changed before the semantic action. Resolve it again.",
|
|
1250
|
+
),
|
|
1251
|
+
{ code: SOURCE_CHANGED },
|
|
1283
1252
|
);
|
|
1253
|
+
}
|
|
1284
1254
|
}
|
|
1285
1255
|
const mutationContext = createMutationContext(
|
|
1286
1256
|
definition,
|
|
@@ -1292,35 +1262,79 @@ export async function executeTextMutationPipeline<TParameters extends TSchema>(
|
|
|
1292
1262
|
publishAnchorRenderState,
|
|
1293
1263
|
);
|
|
1294
1264
|
await preflightMutationAnchors(definition, state.input, mutationContext);
|
|
1295
|
-
const
|
|
1296
|
-
const executedMutation: ExecutedTextMutation = {
|
|
1297
|
-
...withResultPresentations(mutation, mutationContext),
|
|
1298
|
-
...(definition.name === "write" && {
|
|
1299
|
-
unchangedWrite: {
|
|
1300
|
-
source: mutationContext.sourceFor("path"),
|
|
1301
|
-
content: mutationContext.sourceDocument.content,
|
|
1302
|
-
},
|
|
1303
|
-
}),
|
|
1304
|
-
};
|
|
1265
|
+
const semanticAction = await semanticHandler.execute(mutationContext, state.input);
|
|
1305
1266
|
return {
|
|
1306
|
-
changes: new Map(
|
|
1307
|
-
|
|
1267
|
+
changes: new Map(),
|
|
1268
|
+
result: withResultPresentations(
|
|
1269
|
+
{ edits: new Map(), semanticAction },
|
|
1270
|
+
mutationContext,
|
|
1308
1271
|
),
|
|
1309
|
-
|
|
1272
|
+
resourceEffect: true,
|
|
1310
1273
|
};
|
|
1311
1274
|
},
|
|
1312
1275
|
);
|
|
1313
|
-
return await completeTextMutation(outcome, mutationSource(definition, state.input));
|
|
1314
|
-
} catch (error) {
|
|
1315
|
-
return failedResourceEdit(
|
|
1316
|
-
mutationSource(definition, state.input),
|
|
1317
|
-
"INVALID_REQUEST",
|
|
1318
|
-
errorMessage(error),
|
|
1319
|
-
error,
|
|
1320
|
-
);
|
|
1321
1276
|
}
|
|
1322
|
-
|
|
1323
|
-
|
|
1277
|
+
const outcome = await core.editTexts(
|
|
1278
|
+
sources.resources.map((resourceSource) => ({
|
|
1279
|
+
source: resourceSource,
|
|
1280
|
+
read: true,
|
|
1281
|
+
...(definition.name === "write" && { allowReadFailure: true }),
|
|
1282
|
+
})),
|
|
1283
|
+
{
|
|
1284
|
+
cwd: state.cwd,
|
|
1285
|
+
intent: definition.intent ?? "edit",
|
|
1286
|
+
...(state.signal !== undefined && { signal: state.signal }),
|
|
1287
|
+
},
|
|
1288
|
+
async (texts, resolveAnchor) => {
|
|
1289
|
+
for (const target of sources.targets) {
|
|
1290
|
+
if (
|
|
1291
|
+
target.expectedContent !== undefined &&
|
|
1292
|
+
texts.get(target.source) !== target.expectedContent
|
|
1293
|
+
)
|
|
1294
|
+
throw Object.assign(
|
|
1295
|
+
new Error("The selected source changed before editing. Resolve the symbol again."),
|
|
1296
|
+
{ code: SOURCE_CHANGED },
|
|
1297
|
+
);
|
|
1298
|
+
}
|
|
1299
|
+
const mutationContext = createMutationContext(
|
|
1300
|
+
definition,
|
|
1301
|
+
state.input,
|
|
1302
|
+
state,
|
|
1303
|
+
sources,
|
|
1304
|
+
texts,
|
|
1305
|
+
resolveAnchor,
|
|
1306
|
+
publishAnchorRenderState,
|
|
1307
|
+
);
|
|
1308
|
+
await preflightMutationAnchors(definition, state.input, mutationContext);
|
|
1309
|
+
const mutation = await definition.mutate(mutationContext, state.input);
|
|
1310
|
+
const executedMutation: ExecutedTextMutation = {
|
|
1311
|
+
...withResultPresentations(mutation, mutationContext),
|
|
1312
|
+
...(definition.name === "write" && {
|
|
1313
|
+
unchangedWrite: {
|
|
1314
|
+
source: mutationContext.sourceFor("path"),
|
|
1315
|
+
content: mutationContext.sourceDocument.content,
|
|
1316
|
+
},
|
|
1317
|
+
}),
|
|
1318
|
+
};
|
|
1319
|
+
return {
|
|
1320
|
+
changes: new Map(
|
|
1321
|
+
[...mutation.edits].map(([editSource, edit]) => [editSource, edit.changes]),
|
|
1322
|
+
),
|
|
1323
|
+
result: executedMutation,
|
|
1324
|
+
presentedLines: presentedFinalStateLines([executedMutation]),
|
|
1325
|
+
};
|
|
1326
|
+
},
|
|
1327
|
+
);
|
|
1328
|
+
return await completeTextMutation(outcome, mutationSource(definition, state.input));
|
|
1329
|
+
} catch (error) {
|
|
1330
|
+
return failedResourceEdit(
|
|
1331
|
+
mutationSource(definition, state.input),
|
|
1332
|
+
"INVALID_REQUEST",
|
|
1333
|
+
errorMessage(error),
|
|
1334
|
+
error,
|
|
1335
|
+
);
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1324
1338
|
|
|
1325
1339
|
return { pipeline, source };
|
|
1326
1340
|
}
|
|
@@ -1390,6 +1404,53 @@ export function textMutationOperationReceipts(
|
|
|
1390
1404
|
: edit.changes.length;
|
|
1391
1405
|
return operation === "copy" && changes === 0 ? [] : [{ operation, changes }];
|
|
1392
1406
|
}
|
|
1407
|
+
function textMutationRawChanges(before: string, changes: TextMutationEdit["changes"]) {
|
|
1408
|
+
return applyTextChanges(before, changes, before.length === 0).changes.map(
|
|
1409
|
+
(change, editIndex) => ({
|
|
1410
|
+
editIndex,
|
|
1411
|
+
fromA: change.fromBefore,
|
|
1412
|
+
toA: change.toBefore,
|
|
1413
|
+
fromB: change.fromAfter,
|
|
1414
|
+
toB: change.toAfter,
|
|
1415
|
+
removedText: change.removedText,
|
|
1416
|
+
insertedText: change.insertedText,
|
|
1417
|
+
}),
|
|
1418
|
+
);
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
/**
|
|
1422
|
+
* Selects the final lines that a successful result shows with presenter output. Only results of
|
|
1423
|
+
* edits that used major anchors (LINE#HASH) show it, as fresh anchors for chaining edits.
|
|
1424
|
+
*/
|
|
1425
|
+
export function presentedFinalStateLines(
|
|
1426
|
+
mutations: readonly {
|
|
1427
|
+
readonly edits: ReadonlyMap<string, TextMutationEdit>;
|
|
1428
|
+
readonly resultPresentations: ReadonlyMap<string, MutationResultPresentation>;
|
|
1429
|
+
}[],
|
|
1430
|
+
): TextPresentedLines {
|
|
1431
|
+
return ({ source, before, after, postEditContributions }) => {
|
|
1432
|
+
if (
|
|
1433
|
+
!mutations.some(
|
|
1434
|
+
(mutation) =>
|
|
1435
|
+
mutation.edits.has(source) && mutation.resultPresentations.get(source) === "major-anchor",
|
|
1436
|
+
)
|
|
1437
|
+
)
|
|
1438
|
+
return [];
|
|
1439
|
+
return finalStateLineNumbers({
|
|
1440
|
+
before: before.content,
|
|
1441
|
+
after: after.content,
|
|
1442
|
+
rawChanges: textMutationRawChanges(
|
|
1443
|
+
before.content,
|
|
1444
|
+
mutations.flatMap((mutation) => mutation.edits.get(source)?.changes ?? []),
|
|
1445
|
+
),
|
|
1446
|
+
hints:
|
|
1447
|
+
postEditContributions
|
|
1448
|
+
.map((contribution) => contribution.data)
|
|
1449
|
+
.find(isTextMutationResultContributionData)?.hints ?? [],
|
|
1450
|
+
});
|
|
1451
|
+
};
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1393
1454
|
/** Builds a mutation receipt; peer ranges are supplied only for per-call batch display results. */
|
|
1394
1455
|
export function buildSuccessfulTextMutationResult(
|
|
1395
1456
|
resource: CompletedTextResource,
|
|
@@ -1408,20 +1469,11 @@ export function buildSuccessfulTextMutationResult(
|
|
|
1408
1469
|
): FileMutationResult {
|
|
1409
1470
|
const before = resource.before.content;
|
|
1410
1471
|
const finalAfter = resource.after.content;
|
|
1411
|
-
const applied = applyTextChanges(before, edit.changes, before.length === 0);
|
|
1412
1472
|
const unified = createUnifiedDiff(resultSource, before, diffAfterContent);
|
|
1413
1473
|
const mutationResultData = resource.postEditContributions
|
|
1414
1474
|
.map((contribution) => contribution.data)
|
|
1415
1475
|
.find(isTextMutationResultContributionData);
|
|
1416
|
-
const rawChanges =
|
|
1417
|
-
editIndex,
|
|
1418
|
-
fromA: change.fromBefore,
|
|
1419
|
-
toA: change.toBefore,
|
|
1420
|
-
fromB: change.fromAfter,
|
|
1421
|
-
toB: change.toAfter,
|
|
1422
|
-
removedText: change.removedText,
|
|
1423
|
-
insertedText: change.insertedText,
|
|
1424
|
-
}));
|
|
1476
|
+
const rawChanges = textMutationRawChanges(before, edit.changes);
|
|
1425
1477
|
|
|
1426
1478
|
return new FileMutationResult({
|
|
1427
1479
|
...mutationResultData,
|
|
@@ -4,7 +4,7 @@ Runtime for intercepting streamed Pi tool calls.
|
|
|
4
4
|
|
|
5
5
|
import { Allow } from "partial-json";
|
|
6
6
|
import { assertJsonData, resultError, withStructuredResult } from "pi-agent-resource";
|
|
7
|
-
import { mutationDataSchema } from "#src/core/structured-result.
|
|
7
|
+
import { mutationDataSchema } from "#src/core/structured-result.ts";
|
|
8
8
|
import {
|
|
9
9
|
isToolCallAnnotation,
|
|
10
10
|
type ToolCallAnnotation,
|
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
} from "pi-agent-tool-call-interception";
|
|
13
13
|
import { Guard } from "typebox-guard/guard";
|
|
14
14
|
|
|
15
|
-
import { resolvePartial } from "./partial-json-resolver.
|
|
15
|
+
import { resolvePartial } from "./partial-json-resolver.ts";
|
|
16
16
|
import {
|
|
17
17
|
type PartialToolRecoveryBatchEntry,
|
|
18
18
|
PartialToolRecoveryRegistry,
|
|
19
19
|
type PartialToolRecoveryResult,
|
|
20
|
-
} from "./partial-tool-recovery.
|
|
21
|
-
import { registerStreamingInterceptorProvider } from "./streaming-provider.
|
|
20
|
+
} from "./partial-tool-recovery.ts";
|
|
21
|
+
import { registerStreamingInterceptorProvider } from "./streaming-provider.ts";
|
|
22
22
|
|
|
23
23
|
import type {
|
|
24
24
|
AgentToolResult,
|
package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
type Provider,
|
|
12
12
|
} from "@earendil-works/pi-ai";
|
|
13
13
|
|
|
14
|
-
import type { GuardInterception } from "./coordinator.
|
|
14
|
+
import type { GuardInterception } from "./coordinator.ts";
|
|
15
15
|
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
16
16
|
|
|
17
17
|
type StreamSimple = (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AgentToolResult } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
import type { TextEditCompletion } from "#src/api/edit-completion.
|
|
3
|
-
import type { FileMutationBatchResult, FileMutationResult } from "#src/api/mutation-result.
|
|
4
|
-
import { mutationOutcome } from "./structured-result.
|
|
2
|
+
import type { TextEditCompletion } from "#src/api/edit-completion.ts";
|
|
3
|
+
import type { FileMutationBatchResult, FileMutationResult } from "#src/api/mutation-result.ts";
|
|
4
|
+
import { mutationOutcome } from "./structured-result.ts";
|
|
5
5
|
|
|
6
6
|
/** Keep hook feedback and short problem notices without copying diagnostics, diffs, or file text. */
|
|
7
7
|
export function writeProblemNotices(results: readonly FileMutationResult[]): string[] {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { copyMutationTool } from "#src/tools/tool-text-copy.
|
|
2
|
-
import { deleteMutationTool } from "#src/tools/tool-text-delete.
|
|
3
|
-
import { insertMutationTool } from "#src/tools/tool-text-insert.
|
|
4
|
-
import { moveMutationTool } from "#src/tools/tool-text-move.
|
|
5
|
-
import { replaceMutationTool } from "#src/tools/tool-text-replace.
|
|
6
|
-
import { writeMutationTool } from "#src/tools/tool-text-write.
|
|
1
|
+
import { copyMutationTool } from "#src/tools/tool-text-copy.ts";
|
|
2
|
+
import { deleteMutationTool } from "#src/tools/tool-text-delete.ts";
|
|
3
|
+
import { insertMutationTool } from "#src/tools/tool-text-insert.ts";
|
|
4
|
+
import { moveMutationTool } from "#src/tools/tool-text-move.ts";
|
|
5
|
+
import { replaceMutationTool } from "#src/tools/tool-text-replace.ts";
|
|
6
|
+
import { writeMutationTool } from "#src/tools/tool-text-write.ts";
|
|
7
7
|
|
|
8
|
-
import type { TextEditorCore } from "#src/core/text-editor-core.
|
|
8
|
+
import type { TextEditorCore } from "#src/core/text-editor-core.ts";
|
|
9
9
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
10
10
|
|
|
11
11
|
export function registerTextEditorTools(_pi: ExtensionAPI, core: TextEditorCore): void {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { requiredValue } from "pi-agent-invariant";
|
|
2
|
-
import { TextSelectionAnchor, type TextSelectionRange } from "#src/api/text-selection-anchor.
|
|
2
|
+
import { TextSelectionAnchor, type TextSelectionRange } from "#src/api/text-selection-anchor.ts";
|
|
3
3
|
|
|
4
|
-
import type { TextMutationContext } from "#src/api/mutation-tool.
|
|
4
|
+
import type { TextMutationContext } from "#src/api/mutation-tool.ts";
|
|
5
5
|
import type { TextAnchor } from "pi-agent-text";
|
|
6
6
|
|
|
7
7
|
export function textSelections(
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
resultSourceProperty,
|
|
5
5
|
sourceRangeProperties,
|
|
6
6
|
targetProperties,
|
|
7
|
-
} from "#src/tools/text-tool-schema-properties.
|
|
7
|
+
} from "#src/tools/text-tool-schema-properties.ts";
|
|
8
8
|
|
|
9
|
-
import { TEXT_POSITION_ANCHOR_KIND, TEXT_SEARCH_ANCHOR_KIND } from "#src/api/plugin-protocol.
|
|
10
|
-
import { anchorSpanRange, insertionAfterAnchor } from "#src/tools/text-selection.
|
|
9
|
+
import { TEXT_POSITION_ANCHOR_KIND, TEXT_SEARCH_ANCHOR_KIND } from "#src/api/plugin-protocol.ts";
|
|
10
|
+
import { anchorSpanRange, insertionAfterAnchor } from "#src/tools/text-selection.ts";
|
|
11
11
|
|
|
12
|
-
import type { TextMutationToolRegistration } from "#src/api/mutation-tool.
|
|
12
|
+
import type { TextMutationToolRegistration } from "#src/api/mutation-tool.ts";
|
|
13
13
|
|
|
14
14
|
export const copySchema = Type.Object(
|
|
15
15
|
{
|
|
@@ -3,17 +3,17 @@ import { Type } from "typebox";
|
|
|
3
3
|
import {
|
|
4
4
|
resultSourceProperty,
|
|
5
5
|
sourceRangeProperties,
|
|
6
|
-
} from "#src/tools/text-tool-schema-properties.
|
|
6
|
+
} from "#src/tools/text-tool-schema-properties.ts";
|
|
7
7
|
|
|
8
|
-
import { TEXT_POSITION_ANCHOR_KIND, TEXT_SEARCH_ANCHOR_KIND } from "#src/api/plugin-protocol.
|
|
8
|
+
import { TEXT_POSITION_ANCHOR_KIND, TEXT_SEARCH_ANCHOR_KIND } from "#src/api/plugin-protocol.ts";
|
|
9
9
|
import {
|
|
10
10
|
anchorSpanRange,
|
|
11
11
|
deleteAnchorSpan,
|
|
12
12
|
selectionChanges,
|
|
13
13
|
textSelections,
|
|
14
|
-
} from "#src/tools/text-selection.
|
|
14
|
+
} from "#src/tools/text-selection.ts";
|
|
15
15
|
|
|
16
|
-
import type { TextMutationToolRegistration } from "#src/api/mutation-tool.
|
|
16
|
+
import type { TextMutationToolRegistration } from "#src/api/mutation-tool.ts";
|
|
17
17
|
|
|
18
18
|
export const deleteSchema = Type.Object(
|
|
19
19
|
{
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Type } from "typebox";
|
|
2
2
|
|
|
3
|
-
import { TEXT_POSITION_ANCHOR_KIND, TEXT_SEARCH_ANCHOR_KIND } from "#src/api/plugin-protocol.
|
|
3
|
+
import { TEXT_POSITION_ANCHOR_KIND, TEXT_SEARCH_ANCHOR_KIND } from "#src/api/plugin-protocol.ts";
|
|
4
4
|
import {
|
|
5
5
|
insertionAfterAnchor,
|
|
6
6
|
insertionBeforeAnchor,
|
|
7
7
|
insertionChanges,
|
|
8
8
|
textSelections,
|
|
9
9
|
targetText,
|
|
10
|
-
} from "#src/tools/text-selection.
|
|
10
|
+
} from "#src/tools/text-selection.ts";
|
|
11
11
|
|
|
12
|
-
import type { TextMutationToolRegistration } from "#src/api/mutation-tool.
|
|
12
|
+
import type { TextMutationToolRegistration } from "#src/api/mutation-tool.ts";
|
|
13
13
|
|
|
14
14
|
export const insertSchema = Type.Object(
|
|
15
15
|
{
|
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
resultSourceProperty,
|
|
5
5
|
sourceRangeProperties,
|
|
6
6
|
targetProperties,
|
|
7
|
-
} from "#src/tools/text-tool-schema-properties.
|
|
7
|
+
} from "#src/tools/text-tool-schema-properties.ts";
|
|
8
8
|
|
|
9
|
-
import { TEXT_POSITION_ANCHOR_KIND, TEXT_SEARCH_ANCHOR_KIND } from "#src/api/plugin-protocol.
|
|
9
|
+
import { TEXT_POSITION_ANCHOR_KIND, TEXT_SEARCH_ANCHOR_KIND } from "#src/api/plugin-protocol.ts";
|
|
10
10
|
import {
|
|
11
11
|
anchorSpanRange,
|
|
12
12
|
deleteAnchorSpan,
|
|
13
13
|
insertionAfterAnchor,
|
|
14
|
-
} from "#src/tools/text-selection.
|
|
14
|
+
} from "#src/tools/text-selection.ts";
|
|
15
15
|
|
|
16
|
-
import type { TextMutationToolRegistration } from "#src/api/mutation-tool.
|
|
17
|
-
import type { TextChange } from "#src/core/text-change-engine.
|
|
16
|
+
import type { TextMutationToolRegistration } from "#src/api/mutation-tool.ts";
|
|
17
|
+
import type { TextChange } from "#src/core/text-change-engine.ts";
|
|
18
18
|
|
|
19
19
|
export const moveSchema = Type.Object(
|
|
20
20
|
{
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Type } from "typebox";
|
|
2
2
|
import { resultInputSchema } from "pi-agent-resource";
|
|
3
3
|
|
|
4
|
-
import { sourceRangeProperties } from "#src/tools/text-tool-schema-properties.
|
|
4
|
+
import { sourceRangeProperties } from "#src/tools/text-tool-schema-properties.ts";
|
|
5
5
|
|
|
6
|
-
import { TEXT_POSITION_ANCHOR_KIND, TEXT_SEARCH_ANCHOR_KIND } from "#src/api/plugin-protocol.
|
|
6
|
+
import { TEXT_POSITION_ANCHOR_KIND, TEXT_SEARCH_ANCHOR_KIND } from "#src/api/plugin-protocol.ts";
|
|
7
7
|
import {
|
|
8
8
|
anchorSpanRange,
|
|
9
9
|
replaceAnchorSpan,
|
|
10
10
|
selectionChanges,
|
|
11
11
|
textSelections,
|
|
12
|
-
} from "#src/tools/text-selection.
|
|
12
|
+
} from "#src/tools/text-selection.ts";
|
|
13
13
|
|
|
14
|
-
import type { TextMutationToolRegistration } from "#src/api/mutation-tool.
|
|
14
|
+
import type { TextMutationToolRegistration } from "#src/api/mutation-tool.ts";
|
|
15
15
|
|
|
16
16
|
export const replaceSchema = Type.Object(
|
|
17
17
|
{
|