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
|
probeProjectExecutable,
|
|
7
7
|
} from "pi-agent-doctor/api/project-probes";
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { withParsedDocument } from "./ast/manager.ts";
|
|
10
10
|
|
|
11
11
|
import type { DoctorPlugin } from "pi-agent-doctor/api/plugin-protocol";
|
|
12
12
|
|
|
@@ -108,13 +108,14 @@ export const astDoctorPlugin: DoctorPlugin = {
|
|
|
108
108
|
: await readFile(file, { encoding: "utf8", signal: context.signal });
|
|
109
109
|
if (source === undefined) throw new Error(`Source disappeared: ${file}`);
|
|
110
110
|
context.signal?.throwIfAborted();
|
|
111
|
-
const
|
|
111
|
+
const parsed = await withParsedDocument(
|
|
112
112
|
file,
|
|
113
113
|
context.cwd,
|
|
114
114
|
source.replaceAll("\r\n", "\n").split("\n"),
|
|
115
|
+
(tree) => tree !== undefined,
|
|
115
116
|
);
|
|
116
117
|
findings.push(
|
|
117
|
-
|
|
118
|
+
!parsed
|
|
118
119
|
? { status: "fail" as const, message: `${language} parser did not return a tree` }
|
|
119
120
|
: { status: "pass" as const, message: `${language} parser loaded`, detail: file },
|
|
120
121
|
);
|
|
@@ -18,14 +18,14 @@ import {
|
|
|
18
18
|
type TextEditorPlugin,
|
|
19
19
|
} from "pi-agent-text-editor/api/plugin-protocol";
|
|
20
20
|
|
|
21
|
-
import { AstScopeManager } from "./ast/manager.
|
|
22
|
-
import { astDoctorPlugin } from "./doctor-plugin.
|
|
23
|
-
import { createAstOutlineResolver } from "./outline-resolver.
|
|
24
|
-
import { createAstOverflowHandler, reduceAstReadOutput } from "./overflow-handler.
|
|
25
|
-
import { createAstScopePostReadHandler, createAstScopePresenter } from "./scope-handler.
|
|
26
|
-
import { createAstScopeAnchorResolver } from "./scope-resolver.
|
|
27
|
-
import { createAstSearchResolver } from "./search-resolver.
|
|
28
|
-
import { registerAstSearchTool, type AstSearchRuntime } from "./tool-ast-search.
|
|
21
|
+
import { AstScopeManager } from "./ast/manager.ts";
|
|
22
|
+
import { astDoctorPlugin } from "./doctor-plugin.ts";
|
|
23
|
+
import { createAstOutlineResolver } from "./outline-resolver.ts";
|
|
24
|
+
import { createAstOverflowHandler, reduceAstReadOutput } from "./overflow-handler.ts";
|
|
25
|
+
import { createAstScopePostReadHandler, createAstScopePresenter } from "./scope-handler.ts";
|
|
26
|
+
import { createAstScopeAnchorResolver } from "./scope-resolver.ts";
|
|
27
|
+
import { createAstSearchResolver } from "./search-resolver.ts";
|
|
28
|
+
import { registerAstSearchTool, type AstSearchRuntime } from "./tool-ast-search.ts";
|
|
29
29
|
|
|
30
30
|
const renderReadResult = createReadResultRenderer({ kind: "code-view", label: "AST" });
|
|
31
31
|
|
|
@@ -62,7 +62,8 @@ export default async function registerAst(pi: ExtensionAPI): Promise<void> {
|
|
|
62
62
|
when: { resolvedBy: "ast", contentKind: "text" },
|
|
63
63
|
handler: createSourceMappedTextReadHandler(),
|
|
64
64
|
});
|
|
65
|
-
|
|
65
|
+
// Scope context appends each scope's closing line, which may lie outside the range.
|
|
66
|
+
api.addView({ view: "ast", presenter, showsLinesOutsideRange: true });
|
|
66
67
|
const overflow = createAstOverflowHandler();
|
|
67
68
|
api.addOutputReducer(reduceAstReadOutput);
|
|
68
69
|
const scopes = createAstScopePostReadHandler();
|
|
@@ -91,7 +92,6 @@ export default async function registerAst(pi: ExtensionAPI): Promise<void> {
|
|
|
91
92
|
kind: TEXT_POSITION_ANCHOR_KIND,
|
|
92
93
|
type: "auxiliary",
|
|
93
94
|
});
|
|
94
|
-
api.addTextPresenter({ presenter });
|
|
95
95
|
},
|
|
96
96
|
} satisfies TextEditorPlugin;
|
|
97
97
|
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
resolveCodeViewPath,
|
|
5
5
|
} from "pi-agent-ide/api/code-view";
|
|
6
6
|
|
|
7
|
-
import type * as AstOutline from "./ast/outline.
|
|
8
|
-
import { MAX_SOURCE_BYTES } from "./ast/read-text.
|
|
7
|
+
import type * as AstOutline from "./ast/outline.ts";
|
|
8
|
+
import { MAX_SOURCE_BYTES } from "./ast/read-text.ts";
|
|
9
9
|
import type {
|
|
10
10
|
ResourceResolutionAttempt,
|
|
11
11
|
ResourceResolver,
|
|
@@ -68,7 +68,7 @@ function resolveAstOutlineSource(
|
|
|
68
68
|
link: canonicalSource,
|
|
69
69
|
async read({ signal }) {
|
|
70
70
|
signal?.throwIfAborted();
|
|
71
|
-
const astOutline = await (astOutlineModule ??= import("./ast/outline.
|
|
71
|
+
const astOutline = await (astOutlineModule ??= import("./ast/outline.ts"));
|
|
72
72
|
const outlineManager = manager ?? (defaultManager ??= new astOutline.AstOutlineManager());
|
|
73
73
|
let outline;
|
|
74
74
|
if (filePath.startsWith("ssh://")) {
|
|
@@ -18,7 +18,7 @@ export const reduceAstReadOutput: ReadOutputReducer = async (result, context, bu
|
|
|
18
18
|
)
|
|
19
19
|
return undefined;
|
|
20
20
|
try {
|
|
21
|
-
const { AstOutlineManager, isSupportedOutlinePath } = await import("./ast/outline.
|
|
21
|
+
const { AstOutlineManager, isSupportedOutlinePath } = await import("./ast/outline.ts");
|
|
22
22
|
if (!isSupportedOutlinePath(source)) return undefined;
|
|
23
23
|
const format = (outline: SourceViewBlock): string =>
|
|
24
24
|
[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AstScopeManager, ScopeEntry } from "./ast/manager.
|
|
1
|
+
import type { AstScopeManager, ScopeEntry } from "./ast/manager.ts";
|
|
2
2
|
import type {
|
|
3
3
|
ReadPostReadHandler,
|
|
4
4
|
ReadTextLine,
|
|
@@ -56,15 +56,23 @@ export function createAstScopePostReadHandler(): ReadPostReadHandler {
|
|
|
56
56
|
return { kind: "continue", context };
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
const fullLineByNumber =
|
|
60
|
-
|
|
59
|
+
const fullLineByNumber = lineLookup(state.text.lines);
|
|
60
|
+
// Built on the first scope boundary: reads without scope markers do not need it.
|
|
61
|
+
let renderedLineNumbers: ReadonlySet<number> | undefined;
|
|
61
62
|
const contextLines = new Map<number, ReadTextLine>();
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
// Indexed loops: a whole-file read of a large file passes every line through here, and
|
|
65
|
+
// most lines have no scope boundary.
|
|
66
|
+
for (let index = 0; index < renderedLines.length; index += 1) {
|
|
67
|
+
const lineNumber = renderedLines[index]?.lineNumber;
|
|
68
|
+
const boundaries =
|
|
69
|
+
lineNumber === undefined
|
|
70
|
+
? undefined
|
|
71
|
+
: getAstScopeMetadata(fullLineByNumber.get(lineNumber))?.boundaries;
|
|
72
|
+
if (boundaries === undefined) continue;
|
|
73
|
+
|
|
74
|
+
for (const boundary of boundaries) {
|
|
75
|
+
renderedLineNumbers ??= new Set(renderedLines.map((line) => line.lineNumber));
|
|
68
76
|
if (renderedLineNumbers.has(boundary.endLine)) {
|
|
69
77
|
continue;
|
|
70
78
|
}
|
|
@@ -95,6 +103,25 @@ export function createAstScopePostReadHandler(): ReadPostReadHandler {
|
|
|
95
103
|
};
|
|
96
104
|
}
|
|
97
105
|
|
|
106
|
+
/**
|
|
107
|
+
* Finds a line by its number. Read lines are numbered from 1 in order, so the line usually sits
|
|
108
|
+
* at its index; an index is built only for documents numbered differently. Building it for
|
|
109
|
+
* every read would cost one map entry per line of a large file.
|
|
110
|
+
*/
|
|
111
|
+
function lineLookup(lines: readonly ReadTextLine[]): {
|
|
112
|
+
get(lineNumber: number): ReadTextLine | undefined;
|
|
113
|
+
} {
|
|
114
|
+
let byNumber: Map<number, ReadTextLine> | undefined;
|
|
115
|
+
return {
|
|
116
|
+
get(lineNumber) {
|
|
117
|
+
const line = lines[lineNumber - 1];
|
|
118
|
+
if (line?.lineNumber === lineNumber) return line;
|
|
119
|
+
byNumber ??= new Map(lines.map((candidate) => [candidate.lineNumber, candidate]));
|
|
120
|
+
return byNumber.get(lineNumber);
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
98
125
|
function addScopeMarkers(
|
|
99
126
|
lines: readonly ReadTextLine[],
|
|
100
127
|
scopes: readonly ScopeEntry[],
|
|
@@ -10,7 +10,7 @@ import { selectionData, containsSearchMatch, splitGlobList } from "pi-agent-sear
|
|
|
10
10
|
import { verifyResultTargets, type ResolvedResultTargets } from "pi-agent-resource";
|
|
11
11
|
import { renderSearchResult } from "pi-agent-search-text/rendering";
|
|
12
12
|
|
|
13
|
-
import { createAstSearchPresentation } from "./search-presentation.
|
|
13
|
+
import { createAstSearchPresentation } from "./search-presentation.ts";
|
|
14
14
|
|
|
15
15
|
interface AstGrepMatch {
|
|
16
16
|
readonly text: string;
|
|
@@ -120,25 +120,30 @@ export function createAstSearchResolver(
|
|
|
120
120
|
|
|
121
121
|
const owner = (source: string): SearchEnvironment | undefined =>
|
|
122
122
|
context.environmentForSource?.(source) ?? context.environment;
|
|
123
|
+
// Bytes ast-grep parsed, by file, so results and captures map onto the same text even
|
|
124
|
+
// when another process writes the file meanwhile.
|
|
125
|
+
let snapshots = new Map<string, Buffer>();
|
|
126
|
+
const search = async (searched: SearchRequest, signal?: AbortSignal) => {
|
|
127
|
+
const environment = owner(searched.path ?? ".");
|
|
128
|
+
const snapshot =
|
|
129
|
+
environment === undefined
|
|
130
|
+
? await runAstGrepOnSnapshot(pattern, searched, context.cwd, signal)
|
|
131
|
+
: undefined;
|
|
132
|
+
if (snapshot === undefined)
|
|
133
|
+
return runAstGrep(pattern, searched, context.cwd, signal, environment);
|
|
134
|
+
snapshots.set(snapshot.source, snapshot.bytes);
|
|
135
|
+
return snapshot.matches;
|
|
136
|
+
};
|
|
123
137
|
const collect = async (signal?: AbortSignal) => {
|
|
138
|
+
snapshots = new Map();
|
|
124
139
|
if (context.scope !== undefined) await verifyResultTargets(context.scope, signal);
|
|
125
140
|
const found: AstGrepMatch[] = [];
|
|
126
141
|
if (context.scope === undefined) {
|
|
127
|
-
found.push(
|
|
128
|
-
...(await runAstGrep(pattern, request, context.cwd, signal, context.environment)),
|
|
129
|
-
);
|
|
142
|
+
found.push(...(await search(request, signal)));
|
|
130
143
|
} else {
|
|
131
144
|
for (const source of new Set(context.scope.targets.map((target) => target.source))) {
|
|
132
145
|
signal?.throwIfAborted();
|
|
133
|
-
found.push(
|
|
134
|
-
...(await runAstGrep(
|
|
135
|
-
pattern,
|
|
136
|
-
{ ...request, path: source },
|
|
137
|
-
context.cwd,
|
|
138
|
-
signal,
|
|
139
|
-
owner(source),
|
|
140
|
-
)),
|
|
141
|
-
);
|
|
146
|
+
found.push(...(await search({ ...request, path: source }, signal)));
|
|
142
147
|
}
|
|
143
148
|
}
|
|
144
149
|
const mapped = found.map((match) => ({
|
|
@@ -154,7 +159,7 @@ export function createAstSearchResolver(
|
|
|
154
159
|
const eligible: { raw: AstGrepMatch; selection: SearchSelectionMatch }[] = [];
|
|
155
160
|
for (const match of mapped) {
|
|
156
161
|
const selection = (
|
|
157
|
-
await selectionMatches([match], context.cwd, signal, owner(match.file))
|
|
162
|
+
await selectionMatches([match], context.cwd, signal, owner(match.file), snapshots)
|
|
158
163
|
)[0];
|
|
159
164
|
if (selection === undefined) throw new Error("Missing AST selection snapshot");
|
|
160
165
|
if (
|
|
@@ -184,18 +189,31 @@ export function createAstSearchResolver(
|
|
|
184
189
|
: eligible;
|
|
185
190
|
const kept = candidates.slice(0, request.limit ?? 100);
|
|
186
191
|
if (context.scope !== undefined) await verifyResultTargets(context.scope, signal);
|
|
187
|
-
|
|
192
|
+
// The search session keeps this result and its refresh closure for as long as its anchors
|
|
193
|
+
// live. A copy keeps only the matched text, not each file the text was cut from.
|
|
194
|
+
return structuredClone({
|
|
188
195
|
raw: kept.map((item) => item.raw),
|
|
189
196
|
matches: kept.map((item) => item.selection),
|
|
190
197
|
complete:
|
|
191
198
|
(context.scope?.complete ?? true) && candidates.length <= (request.limit ?? 100),
|
|
192
|
-
};
|
|
199
|
+
});
|
|
193
200
|
};
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
context
|
|
198
|
-
|
|
201
|
+
// Anchors register only while the file still has the searched text; another process may
|
|
202
|
+
// write it in between, so search again.
|
|
203
|
+
const { selected, session } = await collectWhileSourceChanges(async () => {
|
|
204
|
+
const selected = await collect(context.signal);
|
|
205
|
+
try {
|
|
206
|
+
const session = await registerSelection(
|
|
207
|
+
{ request, matches: selected.matches, complete: selected.complete, refresh: collect },
|
|
208
|
+
context,
|
|
209
|
+
);
|
|
210
|
+
return { selected, session };
|
|
211
|
+
} catch (error) {
|
|
212
|
+
if (error instanceof Error && error.name === "SearchSnapshotChangedError")
|
|
213
|
+
throw sourceChanged(error.message);
|
|
214
|
+
throw error;
|
|
215
|
+
}
|
|
216
|
+
}, context.signal);
|
|
199
217
|
const data = selectionData(selected.matches, selected.complete, session.id, session);
|
|
200
218
|
const captures: Record<string, ReturnType<typeof selectionData>["matches"]>[] = [];
|
|
201
219
|
const captureGroups: Record<string, { target: string; nodes: number }>[] = [];
|
|
@@ -224,6 +242,7 @@ export function createAstSearchResolver(
|
|
|
224
242
|
context.cwd,
|
|
225
243
|
context.signal,
|
|
226
244
|
owner(raw.file),
|
|
245
|
+
snapshots,
|
|
227
246
|
);
|
|
228
247
|
const group = await registerSelection(
|
|
229
248
|
{
|
|
@@ -340,11 +359,17 @@ async function selectionMatches(
|
|
|
340
359
|
cwd: string,
|
|
341
360
|
signal?: AbortSignal,
|
|
342
361
|
environment?: SearchEnvironment,
|
|
362
|
+
snapshots?: ReadonlyMap<string, Buffer>,
|
|
343
363
|
): Promise<SearchSelectionMatch[]> {
|
|
344
364
|
const sources = new Map<string, Buffer>();
|
|
345
365
|
for (const match of matches) {
|
|
346
366
|
const source = resolveSource(cwd, match.file, environment);
|
|
347
367
|
if (sources.has(source)) continue;
|
|
368
|
+
const snapshot = snapshots?.get(source);
|
|
369
|
+
if (snapshot !== undefined) {
|
|
370
|
+
sources.set(source, snapshot);
|
|
371
|
+
continue;
|
|
372
|
+
}
|
|
348
373
|
if (environment !== undefined) {
|
|
349
374
|
sources.set(source, Buffer.from(await environment.readText(source, signal)));
|
|
350
375
|
} else {
|
|
@@ -352,7 +377,7 @@ async function selectionMatches(
|
|
|
352
377
|
const bytes = await readFile(source, { signal });
|
|
353
378
|
const after = await stat(source);
|
|
354
379
|
if (before.mtimeMs !== after.mtimeMs || before.size !== after.size)
|
|
355
|
-
throw
|
|
380
|
+
throw sourceChanged("AST source changed during search. Run the structural query again.");
|
|
356
381
|
sources.set(source, bytes);
|
|
357
382
|
}
|
|
358
383
|
}
|
|
@@ -369,7 +394,7 @@ async function selectionMatches(
|
|
|
369
394
|
end > bytes.length ||
|
|
370
395
|
bytes.subarray(start, end).toString("utf8") !== match.text
|
|
371
396
|
)
|
|
372
|
-
throw
|
|
397
|
+
throw sourceChanged("AST range does not match its source snapshot. Search again.");
|
|
373
398
|
const prefix = bytes.subarray(0, start).toString("utf8");
|
|
374
399
|
const throughEnd = bytes.subarray(0, end).toString("utf8");
|
|
375
400
|
const lineNumber = prefix.split("\n").length;
|
|
@@ -494,3 +519,116 @@ async function runOwnedAstGrep(
|
|
|
494
519
|
file: environment.resolve(executionCwd, match.file),
|
|
495
520
|
}));
|
|
496
521
|
}
|
|
522
|
+
|
|
523
|
+
/** Searches of one pattern while other processes keep writing its files. */
|
|
524
|
+
const SOURCE_CHANGE_DELAYS_MS = [0, 100, 250, 500];
|
|
525
|
+
|
|
526
|
+
function sourceChanged(message: string): Error {
|
|
527
|
+
return Object.assign(new Error(message), { code: "SOURCE_CHANGED" });
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/** Another Pi process may write a file between ast-grep's parse and this snapshot. */
|
|
531
|
+
async function collectWhileSourceChanges<T>(
|
|
532
|
+
collect: () => Promise<T>,
|
|
533
|
+
signal: AbortSignal | undefined,
|
|
534
|
+
): Promise<T> {
|
|
535
|
+
for (let attempt = 0; ; attempt += 1) {
|
|
536
|
+
try {
|
|
537
|
+
return await collect();
|
|
538
|
+
} catch (error) {
|
|
539
|
+
const delay = SOURCE_CHANGE_DELAYS_MS[attempt];
|
|
540
|
+
const changed = (error as { code?: unknown } | null)?.code === "SOURCE_CHANGED";
|
|
541
|
+
if (!changed || delay === undefined || signal?.aborted) throw error;
|
|
542
|
+
if (delay > 0) await new Promise((resolve) => setTimeout(resolve, delay));
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Searches one local file through ast-grep's standard input, with the bytes read here. Returns
|
|
549
|
+
* undefined when the path is not one file or ast-grep cannot take the language from the request
|
|
550
|
+
* or the file extension; the caller then lets ast-grep read the path.
|
|
551
|
+
*/
|
|
552
|
+
async function runAstGrepOnSnapshot(
|
|
553
|
+
pattern: string,
|
|
554
|
+
request: SearchRequest,
|
|
555
|
+
cwd: string,
|
|
556
|
+
signal: AbortSignal | undefined,
|
|
557
|
+
): Promise<{ source: string; bytes: Buffer; matches: AstGrepMatch[] } | undefined> {
|
|
558
|
+
// Globs filter files by path, which standard input does not have.
|
|
559
|
+
if (
|
|
560
|
+
request.path === undefined ||
|
|
561
|
+
request.path.includes("://") ||
|
|
562
|
+
cwd.includes("://") ||
|
|
563
|
+
request.include !== undefined ||
|
|
564
|
+
request.exclude !== undefined
|
|
565
|
+
)
|
|
566
|
+
return undefined;
|
|
567
|
+
const source = path.resolve(cwd, request.path);
|
|
568
|
+
const isFile = await stat(source).then(
|
|
569
|
+
(info) => info.isFile(),
|
|
570
|
+
() => false,
|
|
571
|
+
);
|
|
572
|
+
if (!isFile) return undefined;
|
|
573
|
+
const { rule, language } = astOptions(request) ?? {};
|
|
574
|
+
const lang = language ?? path.extname(source).slice(1);
|
|
575
|
+
if (lang.length === 0) return undefined;
|
|
576
|
+
const bytes = await readFile(source, { signal });
|
|
577
|
+
const arguments_ =
|
|
578
|
+
rule === undefined
|
|
579
|
+
? ["run", "--pattern", pattern, "--lang", lang, "--stdin", "--json=compact"]
|
|
580
|
+
: [
|
|
581
|
+
"scan",
|
|
582
|
+
"--inline-rules",
|
|
583
|
+
JSON.stringify({ id: "ast_search", language, severity: "hint", rule }),
|
|
584
|
+
"--stdin",
|
|
585
|
+
"--json=compact",
|
|
586
|
+
];
|
|
587
|
+
const result = await spawnAstGrep(arguments_, cwd, signal, bytes);
|
|
588
|
+
if (result === undefined) return undefined;
|
|
589
|
+
return { source, bytes, matches: result.map((match) => ({ ...match, file: source })) };
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/** Runs ast-grep on standard input; undefined when it fails, such as for an unknown language. */
|
|
593
|
+
function spawnAstGrep(
|
|
594
|
+
arguments_: readonly string[],
|
|
595
|
+
cwd: string,
|
|
596
|
+
signal: AbortSignal | undefined,
|
|
597
|
+
input: Buffer,
|
|
598
|
+
): Promise<AstGrepMatch[] | undefined> {
|
|
599
|
+
signal?.throwIfAborted();
|
|
600
|
+
return new Promise((resolve, reject) => {
|
|
601
|
+
const child = spawn("ast-grep", [...arguments_], {
|
|
602
|
+
cwd,
|
|
603
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
604
|
+
}) as ChildProcessWithoutNullStreams;
|
|
605
|
+
let stdout = "";
|
|
606
|
+
child.stdout.setEncoding("utf8");
|
|
607
|
+
child.stdout.on("data", (chunk: string) => (stdout += chunk));
|
|
608
|
+
child.stderr.resume();
|
|
609
|
+
const abort = (): void => {
|
|
610
|
+
child.kill("SIGTERM");
|
|
611
|
+
};
|
|
612
|
+
signal?.addEventListener("abort", abort, { once: true });
|
|
613
|
+
child.once("error", reject);
|
|
614
|
+
child.stdin.on("error", () => undefined);
|
|
615
|
+
child.stdin.end(input);
|
|
616
|
+
child.once("close", (code) => {
|
|
617
|
+
signal?.removeEventListener("abort", abort);
|
|
618
|
+
if (signal?.aborted === true) {
|
|
619
|
+
reject(signal.reason instanceof Error ? signal.reason : new Error("AST search aborted"));
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
if (code !== 0 && code !== 1) {
|
|
623
|
+
resolve(undefined);
|
|
624
|
+
return;
|
|
625
|
+
}
|
|
626
|
+
try {
|
|
627
|
+
const value: unknown = JSON.parse(stdout.length === 0 ? "[]" : stdout);
|
|
628
|
+
resolve(Array.isArray(value) ? (value as AstGrepMatch[]) : undefined);
|
|
629
|
+
} catch {
|
|
630
|
+
resolve(undefined);
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
});
|
|
634
|
+
}
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import { toolCallHeader } from "pi-agent-tool-ui";
|
|
18
18
|
import { Type, type Static } from "typebox";
|
|
19
19
|
|
|
20
|
-
import type { AstSearchOptions } from "./search-resolver.
|
|
20
|
+
import type { AstSearchOptions } from "./search-resolver.ts";
|
|
21
21
|
|
|
22
22
|
export const astSearchSchema = Type.Object(
|
|
23
23
|
{
|
|
@@ -14,15 +14,15 @@ import {
|
|
|
14
14
|
type TextEditorPlugin,
|
|
15
15
|
} from "pi-agent-text-editor/api/plugin-protocol";
|
|
16
16
|
|
|
17
|
-
import { changesDoctorPlugin } from "#src/doctor-plugin.
|
|
18
|
-
import { CHANGE_ANCHOR_KIND, createChangeAnchorRegistration } from "#src/change-anchor.
|
|
19
|
-
import { extensionGitExecutor } from "#src/changes/git-changes-backend.
|
|
20
|
-
export type { GitCommandExecutor } from "#src/changes/git-changes-backend.
|
|
21
|
-
import { createCurrentChangePresenter } from "#src/current-change-presenter.
|
|
22
|
-
import { IndexMutationQueue } from "#src/index-mutation-queue.
|
|
23
|
-
import { LastTextTransactionStore } from "#src/last-text-transaction-store.
|
|
24
|
-
import { registerIndexChangeTools } from "#src/tool-index-change.
|
|
25
|
-
import { createUndoMutationTool } from "#src/tool-text-undo.
|
|
17
|
+
import { changesDoctorPlugin } from "#src/doctor-plugin.ts";
|
|
18
|
+
import { CHANGE_ANCHOR_KIND, createChangeAnchorRegistration } from "#src/change-anchor.ts";
|
|
19
|
+
import { extensionGitExecutor } from "#src/changes/git-changes-backend.ts";
|
|
20
|
+
export type { GitCommandExecutor } from "#src/changes/git-changes-backend.ts";
|
|
21
|
+
import { createCurrentChangePresenter } from "#src/current-change-presenter.ts";
|
|
22
|
+
import { IndexMutationQueue } from "#src/index-mutation-queue.ts";
|
|
23
|
+
import { LastTextTransactionStore } from "#src/last-text-transaction-store.ts";
|
|
24
|
+
import { registerIndexChangeTools } from "#src/tool-index-change.ts";
|
|
25
|
+
import { createUndoMutationTool } from "#src/tool-text-undo.ts";
|
|
26
26
|
|
|
27
27
|
export default function registerGitChanges(pi: ExtensionAPI): Promise<void> {
|
|
28
28
|
return registerGitChangesWithExecutor(pi, extensionGitExecutor(pi));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-changes",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"pi-agent-doctor": "0.9.
|
|
16
|
-
"pi-agent-documentation": "0.9.
|
|
17
|
-
"pi-agent-invariant": "0.9.
|
|
18
|
-
"pi-agent-read": "0.9.
|
|
19
|
-
"pi-agent-resource": "0.9.
|
|
20
|
-
"pi-agent-text": "0.9.
|
|
21
|
-
"pi-agent-text-editor": "0.9.
|
|
15
|
+
"pi-agent-doctor": "0.9.6",
|
|
16
|
+
"pi-agent-documentation": "0.9.6",
|
|
17
|
+
"pi-agent-invariant": "0.9.6",
|
|
18
|
+
"pi-agent-read": "0.9.6",
|
|
19
|
+
"pi-agent-resource": "0.9.6",
|
|
20
|
+
"pi-agent-text": "0.9.6",
|
|
21
|
+
"pi-agent-text-editor": "0.9.6"
|
|
22
22
|
},
|
|
23
23
|
"pi": {
|
|
24
24
|
"extensions": [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TextAnchor, type TextAnchorResolver, type TextAnchorResolverContext } from "pi-agent-text";
|
|
2
2
|
|
|
3
|
-
import { ChangeService } from "#src/changes/change-service.
|
|
4
|
-
import { gitSourceDirectory } from "#src/changes/git-paths.
|
|
3
|
+
import { ChangeService } from "#src/changes/change-service.ts";
|
|
4
|
+
import { gitSourceDirectory } from "#src/changes/git-paths.ts";
|
|
5
5
|
|
|
6
|
-
import type { ChangeGroup, ChangeInspection } from "#src/changes/change-types.
|
|
7
|
-
import type { GitCommandExecutor } from "#src/changes/git-changes-backend.
|
|
6
|
+
import type { ChangeGroup, ChangeInspection } from "#src/changes/change-types.ts";
|
|
7
|
+
import type { GitCommandExecutor } from "#src/changes/git-changes-backend.ts";
|
|
8
8
|
|
|
9
9
|
export const CHANGE_ANCHOR_KIND = "pi-agent-ide-changes/change";
|
|
10
10
|
|
|
@@ -3,7 +3,7 @@ import { createHash } from "node:crypto";
|
|
|
3
3
|
|
|
4
4
|
import { diffLines } from "diff";
|
|
5
5
|
|
|
6
|
-
import type { ChangeGroup, ChangeSegment, ChangeState } from "./change-types.
|
|
6
|
+
import type { ChangeGroup, ChangeSegment, ChangeState } from "./change-types.ts";
|
|
7
7
|
|
|
8
8
|
const CONTEXT_LINE_COUNT = 3;
|
|
9
9
|
const MINIMUM_SELECTOR_LENGTH = 4;
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
createChangeGroups,
|
|
4
4
|
replaceHeadRangeInIndex,
|
|
5
5
|
reverseChangeGroup,
|
|
6
|
-
} from "./change-groups.
|
|
7
|
-
import { GitChangesBackend } from "./git-changes-backend.
|
|
6
|
+
} from "./change-groups.ts";
|
|
7
|
+
import { GitChangesBackend } from "./git-changes-backend.ts";
|
|
8
8
|
|
|
9
9
|
import type {
|
|
10
10
|
ChangeIndexAction,
|
|
@@ -13,8 +13,8 @@ import type {
|
|
|
13
13
|
ChangeInspectionInput,
|
|
14
14
|
GitIndexUpdate,
|
|
15
15
|
PreparedUndoResult,
|
|
16
|
-
} from "./change-types.
|
|
17
|
-
import type { GitCommandExecutor } from "./git-changes-backend.
|
|
16
|
+
} from "./change-types.ts";
|
|
17
|
+
import type { GitCommandExecutor } from "./git-changes-backend.ts";
|
|
18
18
|
|
|
19
19
|
export type ChangeServiceCreation =
|
|
20
20
|
| { readonly status: "ready"; readonly service: ChangeService }
|
|
@@ -3,7 +3,7 @@ import os from "node:os";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
|
|
5
5
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
6
|
-
import { relativeGitSource, resolveGitSource } from "./git-paths.
|
|
6
|
+
import { relativeGitSource, resolveGitSource } from "./git-paths.ts";
|
|
7
7
|
|
|
8
8
|
export interface GitCommandResult {
|
|
9
9
|
readonly code: number;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { requiredValue } from "pi-agent-invariant";
|
|
2
2
|
import { diffLines } from "diff";
|
|
3
3
|
|
|
4
|
-
import { ChangeService } from "#src/changes/change-service.
|
|
5
|
-
import { gitSourceDirectory } from "#src/changes/git-paths.
|
|
4
|
+
import { ChangeService } from "#src/changes/change-service.ts";
|
|
5
|
+
import { gitSourceDirectory } from "#src/changes/git-paths.ts";
|
|
6
6
|
|
|
7
|
-
import type { ChangeGroup } from "#src/changes/change-types.
|
|
8
|
-
import type { GitCommandExecutor } from "#src/changes/git-changes-backend.
|
|
7
|
+
import type { ChangeGroup } from "#src/changes/change-types.ts";
|
|
8
|
+
import type { GitCommandExecutor } from "#src/changes/git-changes-backend.ts";
|
|
9
9
|
import type { PresentedTextRow, TextDocument, TextLine, TextLinePresenter } from "pi-agent-text";
|
|
10
10
|
|
|
11
11
|
const FILESYSTEM_RESOLVER_ID = "filesystem";
|
|
@@ -27,12 +27,12 @@ const indexDataSchema = Type.Object(
|
|
|
27
27
|
);
|
|
28
28
|
export const indexOutputSchema = structuredResultSchema(indexDataSchema);
|
|
29
29
|
|
|
30
|
-
import { ChangeService } from "#src/changes/change-service.
|
|
31
|
-
import { gitSourceDirectory, resolveGitSource } from "#src/changes/git-paths.
|
|
30
|
+
import { ChangeService } from "#src/changes/change-service.ts";
|
|
31
|
+
import { gitSourceDirectory, resolveGitSource } from "#src/changes/git-paths.ts";
|
|
32
32
|
|
|
33
|
-
import type { ChangeIndexAction } from "#src/changes/change-types.
|
|
34
|
-
import type { GitCommandExecutor } from "#src/changes/git-changes-backend.
|
|
35
|
-
import type { IndexMutationQueue } from "#src/index-mutation-queue.
|
|
33
|
+
import type { ChangeIndexAction } from "#src/changes/change-types.ts";
|
|
34
|
+
import type { GitCommandExecutor } from "#src/changes/git-changes-backend.ts";
|
|
35
|
+
import type { IndexMutationQueue } from "#src/index-mutation-queue.ts";
|
|
36
36
|
|
|
37
37
|
/** Shared validation for standalone and composed index changes. */
|
|
38
38
|
export const indexChangeSchema = Type.Object(
|
|
@@ -2,13 +2,13 @@ import { diffChars } from "diff";
|
|
|
2
2
|
import { Type } from "typebox";
|
|
3
3
|
import { resultInputSchema } from "pi-agent-resource";
|
|
4
4
|
|
|
5
|
-
import { CHANGE_ANCHOR_KIND } from "#src/change-anchor.
|
|
6
|
-
import { ChangeService } from "#src/changes/change-service.
|
|
7
|
-
import { gitSourceDirectory } from "#src/changes/git-paths.
|
|
5
|
+
import { CHANGE_ANCHOR_KIND } from "#src/change-anchor.ts";
|
|
6
|
+
import { ChangeService } from "#src/changes/change-service.ts";
|
|
7
|
+
import { gitSourceDirectory } from "#src/changes/git-paths.ts";
|
|
8
8
|
|
|
9
|
-
import type { GitCommandExecutor } from "#src/changes/git-changes-backend.
|
|
10
|
-
import type { IndexMutationQueue } from "#src/index-mutation-queue.
|
|
11
|
-
import type { LastTextTransactionStore } from "#src/last-text-transaction-store.
|
|
9
|
+
import type { GitCommandExecutor } from "#src/changes/git-changes-backend.ts";
|
|
10
|
+
import type { IndexMutationQueue } from "#src/index-mutation-queue.ts";
|
|
11
|
+
import type { LastTextTransactionStore } from "#src/last-text-transaction-store.ts";
|
|
12
12
|
import type { TextMutationToolRegistration } from "pi-agent-text-editor/api/mutation-tool";
|
|
13
13
|
|
|
14
14
|
export const undoSchema = Type.Object(
|
|
@@ -2,11 +2,11 @@ import { connectDoctorPlugin } from "pi-agent-doctor/api/connect-plugin";
|
|
|
2
2
|
import { connectIdePlugin } from "pi-agent-ide/api/connect-plugin";
|
|
3
3
|
import { IDE_API_VERSION, IDE_PROTOCOL, type IdePlugin } from "pi-agent-ide/api/plugin-protocol";
|
|
4
4
|
|
|
5
|
-
import { formatterDoctorPlugin } from "./src/doctor-plugin.
|
|
6
|
-
import { createFormatter, type FormatterRuntime } from "./src/formatter.
|
|
7
|
-
export { FormatterCommandRegistry } from "./src/registry.
|
|
8
|
-
export { FORMATTER_RECIPES } from "./src/catalog.
|
|
9
|
-
export type { FormatterRuntime } from "./src/formatter.
|
|
5
|
+
import { formatterDoctorPlugin } from "./src/doctor-plugin.ts";
|
|
6
|
+
import { createFormatter, type FormatterRuntime } from "./src/formatter.ts";
|
|
7
|
+
export { FormatterCommandRegistry } from "./src/registry.ts";
|
|
8
|
+
export { FORMATTER_RECIPES } from "./src/catalog.ts";
|
|
9
|
+
export type { FormatterRuntime } from "./src/formatter.ts";
|
|
10
10
|
|
|
11
11
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
12
12
|
import type { IdeTool } from "pi-agent-ide/api/toolchain";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-ide-formatter",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-doctor": "0.9.
|
|
6
|
+
"pi-agent-doctor": "0.9.6"
|
|
7
7
|
},
|
|
8
8
|
"pi": {
|
|
9
9
|
"extensions": [
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
14
|
"@earendil-works/pi-coding-agent": "*",
|
|
15
|
-
"pi-agent-ide": "0.9.
|
|
15
|
+
"pi-agent-ide": "0.9.6"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"pi-agent-ide": {
|