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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import type { ResultRange, ResultTargetStore } from "pi-agent-resource";
|
|
3
|
-
import type { ReadPostReadHandler, ReadToolPluginApi } from "#src/api/tools/read.
|
|
3
|
+
import type { ReadPostReadHandler, ReadToolPluginApi } from "#src/api/tools/read.ts";
|
|
4
4
|
|
|
5
5
|
/** Retain exact local or SSH text windows with an owning, guarded reread; never grant authority to converted output. */
|
|
6
6
|
export function createReadResultTargetHandler(
|
|
@@ -78,23 +78,7 @@ export function createReadResultTargetHandler(
|
|
|
78
78
|
: retained.flatMap((target) =>
|
|
79
79
|
target.ranges.flatMap((seed) => intersectRange(seed, range)),
|
|
80
80
|
),
|
|
81
|
-
|
|
82
|
-
const current = await read(
|
|
83
|
-
{ path: state.source },
|
|
84
|
-
{
|
|
85
|
-
cwd: context.resolverContext.cwd,
|
|
86
|
-
...(signal === undefined ? {} : { signal }),
|
|
87
|
-
},
|
|
88
|
-
"script",
|
|
89
|
-
);
|
|
90
|
-
if (
|
|
91
|
-
current.isError ||
|
|
92
|
-
current.script?.kind !== "text" ||
|
|
93
|
-
current.script.source !== state.source
|
|
94
|
-
)
|
|
95
|
-
throw new Error("Could not verify the owning source; repeat Read/Search.");
|
|
96
|
-
return current.script.content;
|
|
97
|
-
},
|
|
81
|
+
readCurrent: ownedReader(read, state.source, context.resolverContext.cwd),
|
|
98
82
|
},
|
|
99
83
|
],
|
|
100
84
|
context.resolverContext.cwd,
|
|
@@ -106,6 +90,28 @@ export function createReadResultTargetHandler(
|
|
|
106
90
|
};
|
|
107
91
|
}
|
|
108
92
|
|
|
93
|
+
/**
|
|
94
|
+
Reread the owning source for a registered target. Defined outside the Read handler: the target
|
|
95
|
+
lives as long as its snapshot, and a closure there would keep the whole Read pipeline state,
|
|
96
|
+
including split lines and result text, alive with it.
|
|
97
|
+
*/
|
|
98
|
+
function ownedReader(
|
|
99
|
+
read: ReadToolPluginApi["read"],
|
|
100
|
+
source: string,
|
|
101
|
+
cwd: string,
|
|
102
|
+
): (signal?: AbortSignal) => Promise<string> {
|
|
103
|
+
return async (signal) => {
|
|
104
|
+
const current = await read(
|
|
105
|
+
{ path: source },
|
|
106
|
+
{ cwd, ...(signal === undefined ? {} : { signal }) },
|
|
107
|
+
"script",
|
|
108
|
+
);
|
|
109
|
+
if (current.isError || current.script?.kind !== "text" || current.script.source !== source)
|
|
110
|
+
throw new Error("Could not verify the owning source; repeat Read/Search.");
|
|
111
|
+
return current.script.content;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
109
115
|
function intersectRange(seed: ResultRange, window: ResultRange): ResultRange[] {
|
|
110
116
|
const compare = (a: ResultRange["start"], b: ResultRange["start"]) =>
|
|
111
117
|
a.lineNumber - b.lineNumber || a.column - b.column;
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
structuredResultSchema,
|
|
6
6
|
withStructuredResult,
|
|
7
7
|
} from "pi-agent-resource";
|
|
8
|
-
import type { ReadScriptData, ReadToolResult } from "#src/api/tools/read.
|
|
8
|
+
import type { ReadScriptData, ReadToolResult } from "#src/api/tools/read.ts";
|
|
9
9
|
import type { TextLine } from "pi-agent-text";
|
|
10
|
-
import { readFailureRecovery } from "#src/core/tools/read/read-result.
|
|
10
|
+
import { readFailureRecovery } from "#src/core/tools/read/read-result.ts";
|
|
11
11
|
|
|
12
12
|
const reference = Type.Object(
|
|
13
13
|
{ value: Type.String(), kind: Type.String(), state: Type.Optional(Type.String()) },
|
|
@@ -43,24 +43,25 @@ import {
|
|
|
43
43
|
type ReadViewRegistration,
|
|
44
44
|
type ResourceResolverRegistration,
|
|
45
45
|
type TextTargetResolverRegistration,
|
|
46
|
-
} from "#src/api/tools/read.
|
|
47
|
-
import { explainReadWindow, limitReadOutput } from "#src/core/tools/read/output-truncation.
|
|
48
|
-
import { createReadResultRenderer, renderReadCall } from "#src/core/tools/read/read-renderer.
|
|
46
|
+
} from "#src/api/tools/read.ts";
|
|
47
|
+
import { explainReadWindow, limitReadOutput } from "#src/core/tools/read/output-truncation.ts";
|
|
48
|
+
import { createReadResultRenderer, renderReadCall } from "#src/core/tools/read/read-renderer.ts";
|
|
49
49
|
import {
|
|
50
50
|
createReadState,
|
|
51
51
|
failureResult,
|
|
52
52
|
projectReadState,
|
|
53
|
+
resolveTextRange,
|
|
53
54
|
withReadCancellation,
|
|
54
|
-
} from "#src/core/tools/read/read-result.
|
|
55
|
+
} from "#src/core/tools/read/read-result.ts";
|
|
55
56
|
import { TempResourceStore } from "pi-agent-resource";
|
|
56
57
|
|
|
57
58
|
import {
|
|
58
59
|
type readParameters,
|
|
59
60
|
describeReadParameters,
|
|
60
61
|
type ReadParameterText,
|
|
61
|
-
} from "#src/api/read-parameters.
|
|
62
|
-
import { readRaw } from "#src/core/tools/read/raw-read.
|
|
63
|
-
import { readOutputSchema, structuredRead } from "./read/structured-result.
|
|
62
|
+
} from "#src/api/read-parameters.ts";
|
|
63
|
+
import { readRaw } from "#src/core/tools/read/raw-read.ts";
|
|
64
|
+
import { readOutputSchema, structuredRead } from "./read/structured-result.ts";
|
|
64
65
|
|
|
65
66
|
const fallbackReadRenderer = createReadResultRenderer({ kind: "source" });
|
|
66
67
|
|
|
@@ -240,7 +241,9 @@ export function createReadTool(
|
|
|
240
241
|
"agent",
|
|
241
242
|
outputSaver,
|
|
242
243
|
);
|
|
243
|
-
return
|
|
244
|
+
return withoutScriptData(
|
|
245
|
+
structuredRead(withReadCancellation(result, parameters.path, signal)),
|
|
246
|
+
);
|
|
244
247
|
} catch (error) {
|
|
245
248
|
if (signal?.aborted) throw error;
|
|
246
249
|
return structuredRead(
|
|
@@ -555,7 +558,7 @@ async function executeRead(
|
|
|
555
558
|
}
|
|
556
559
|
|
|
557
560
|
pipeline = processed.context;
|
|
558
|
-
pipeline = await runTextPresenters(pipeline, viewSnapshot, requestedViews);
|
|
561
|
+
pipeline = await runTextPresenters(pipeline, viewSnapshot, requestedViews, origin);
|
|
559
562
|
const projected = projectReadState(requiredValue(pipeline.state), pipeline.request, {
|
|
560
563
|
audience,
|
|
561
564
|
originLine: origin,
|
|
@@ -764,6 +767,16 @@ async function resolveTextTargets(
|
|
|
764
767
|
return undefined;
|
|
765
768
|
}
|
|
766
769
|
|
|
770
|
+
/**
|
|
771
|
+
* Pi keeps a returned result for the rest of the session, including fields it does not use. The
|
|
772
|
+
* script data has served as structured content by now, and its lines are cut from the whole
|
|
773
|
+
* source text, which they would keep in memory.
|
|
774
|
+
*/
|
|
775
|
+
function withoutScriptData(result: ReadToolResult): ReadToolResult {
|
|
776
|
+
const { script: _script, ...rest } = result;
|
|
777
|
+
return rest;
|
|
778
|
+
}
|
|
779
|
+
|
|
767
780
|
const ANCHOR_SEPARATOR = "#";
|
|
768
781
|
|
|
769
782
|
/** Splits `path#fragment`; returns undefined when there is nothing to anchor. */
|
|
@@ -1140,6 +1153,7 @@ async function runTextPresenters(
|
|
|
1140
1153
|
context: ReadPipelineContext,
|
|
1141
1154
|
views: readonly RegisteredView[],
|
|
1142
1155
|
requestedViews: ReadonlySet<string>,
|
|
1156
|
+
originLine?: number,
|
|
1143
1157
|
): Promise<ReadPipelineContext> {
|
|
1144
1158
|
const state = context.state;
|
|
1145
1159
|
|
|
@@ -1148,6 +1162,22 @@ async function runTextPresenters(
|
|
|
1148
1162
|
}
|
|
1149
1163
|
|
|
1150
1164
|
const document = state.text;
|
|
1165
|
+
const requestedRegistrations = views.filter(({ registration }) =>
|
|
1166
|
+
requestedViews.has(registration.view),
|
|
1167
|
+
);
|
|
1168
|
+
const includedViews = new Set(
|
|
1169
|
+
requestedRegistrations.flatMap(({ registration }) => registration.includes ?? []),
|
|
1170
|
+
);
|
|
1171
|
+
const activeViews = requestedRegistrations.filter(
|
|
1172
|
+
({ registration }) => !includedViews.has(registration.view),
|
|
1173
|
+
);
|
|
1174
|
+
// A read of a few lines of a large file presents only those lines, unless a view shows more.
|
|
1175
|
+
const ranged =
|
|
1176
|
+
(context.request.offset !== undefined || context.request.limit !== undefined) &&
|
|
1177
|
+
!activeViews.some(({ registration }) => registration.showsLinesOutsideRange === true);
|
|
1178
|
+
const range = ranged
|
|
1179
|
+
? resolveTextRange(context.request, document.lines.length, originLine)
|
|
1180
|
+
: undefined;
|
|
1151
1181
|
const presentationContext: TextPresentationContext = {
|
|
1152
1182
|
purpose: "read",
|
|
1153
1183
|
...(context.sourceText === undefined ? {} : { sourceText: context.sourceText }),
|
|
@@ -1156,17 +1186,13 @@ async function runTextPresenters(
|
|
|
1156
1186
|
source: state.source,
|
|
1157
1187
|
cwd: context.resolverContext.cwd,
|
|
1158
1188
|
resolvedBy: state.resolvedBy,
|
|
1189
|
+
...(range !== undefined && {
|
|
1190
|
+
lineNumbers: new Set(
|
|
1191
|
+
document.lines.slice(range.startIndex, range.endIndex).map((line) => line.lineNumber),
|
|
1192
|
+
),
|
|
1193
|
+
}),
|
|
1159
1194
|
...(context.resolverContext.signal !== undefined && { signal: context.resolverContext.signal }),
|
|
1160
1195
|
};
|
|
1161
|
-
const requestedRegistrations = views.filter(({ registration }) =>
|
|
1162
|
-
requestedViews.has(registration.view),
|
|
1163
|
-
);
|
|
1164
|
-
const includedViews = new Set(
|
|
1165
|
-
requestedRegistrations.flatMap(({ registration }) => registration.includes ?? []),
|
|
1166
|
-
);
|
|
1167
|
-
const activeViews = requestedRegistrations.filter(
|
|
1168
|
-
({ registration }) => !includedViews.has(registration.view),
|
|
1169
|
-
);
|
|
1170
1196
|
const contributions = await Promise.all(
|
|
1171
1197
|
activeViews.map(async ({ registration }) => ({
|
|
1172
1198
|
presenterId: registration.presenter.id,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { targetsEqual } from "./content-runner.
|
|
1
|
+
import { targetsEqual } from "./content-runner.ts";
|
|
2
2
|
import {
|
|
3
3
|
CONTENT_CONVERTER_REGISTER_EVENT,
|
|
4
4
|
CONTENT_HOST_READY_EVENT,
|
|
5
5
|
type ContentConverterRegistrationRequest,
|
|
6
6
|
isContentHostReady,
|
|
7
|
-
} from "./plugin-protocol.
|
|
8
|
-
import { isContentConverterRegistration } from "./validation.
|
|
7
|
+
} from "./plugin-protocol.ts";
|
|
8
|
+
import { isContentConverterRegistration } from "./validation.ts";
|
|
9
9
|
|
|
10
|
-
import type { ContentConverterRegistration } from "./content-converter.
|
|
10
|
+
import type { ContentConverterRegistration } from "./content-converter.ts";
|
|
11
11
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
12
12
|
|
|
13
13
|
export function connectContentConverter(
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { createContentRunner, targetsEqual } from "./content-runner.
|
|
1
|
+
import { createContentRunner, targetsEqual } from "./content-runner.ts";
|
|
2
2
|
import {
|
|
3
3
|
CONTENT_API_VERSION,
|
|
4
4
|
CONTENT_CONVERTER_REGISTER_EVENT,
|
|
5
5
|
CONTENT_HOST_READY_EVENT,
|
|
6
6
|
CONTENT_PROTOCOL,
|
|
7
7
|
isContentConverterRegistrationRequest,
|
|
8
|
-
} from "./plugin-protocol.
|
|
8
|
+
} from "./plugin-protocol.ts";
|
|
9
9
|
|
|
10
10
|
import type {
|
|
11
11
|
ContentConversionContext,
|
|
12
12
|
ContentDescription,
|
|
13
13
|
ContentInput,
|
|
14
14
|
ContentTarget,
|
|
15
|
-
} from "./content-converter.
|
|
16
|
-
import type { AgentContent } from "#src/content.
|
|
15
|
+
} from "./content-converter.ts";
|
|
16
|
+
import type { AgentContent } from "#src/content.ts";
|
|
17
17
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
18
18
|
|
|
19
19
|
export interface ContentHost {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
isContentConverterRegistration,
|
|
5
5
|
isContentInput,
|
|
6
6
|
isContentTarget,
|
|
7
|
-
} from "./validation.
|
|
7
|
+
} from "./validation.ts";
|
|
8
8
|
|
|
9
9
|
import type {
|
|
10
10
|
ContentConversionContext,
|
|
@@ -13,8 +13,8 @@ import type {
|
|
|
13
13
|
ContentDescription,
|
|
14
14
|
ContentInput,
|
|
15
15
|
ContentTarget,
|
|
16
|
-
} from "./content-converter.
|
|
17
|
-
import type { AgentContent } from "#src/content.
|
|
16
|
+
} from "./content-converter.ts";
|
|
17
|
+
import type { AgentContent } from "#src/content.ts";
|
|
18
18
|
|
|
19
19
|
interface RegisteredConverter {
|
|
20
20
|
readonly converter: ContentConverter;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type TSchema, Type } from "typebox";
|
|
2
2
|
import { Value } from "typebox/value";
|
|
3
3
|
|
|
4
|
-
import { isContentConverterRegistration, isContentTarget } from "./validation.
|
|
4
|
+
import { isContentConverterRegistration, isContentTarget } from "./validation.ts";
|
|
5
5
|
|
|
6
|
-
import type { ContentConverterRegistration, ContentTarget } from "./content-converter.
|
|
6
|
+
import type { ContentConverterRegistration, ContentTarget } from "./content-converter.ts";
|
|
7
7
|
|
|
8
8
|
export const CONTENT_PROTOCOL = "pi-agent-resource/content-conversion";
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type TSchema, Type } from "typebox";
|
|
2
2
|
import { Value } from "typebox/value";
|
|
3
3
|
|
|
4
|
-
import { isAgentContent } from "#src/validation.
|
|
4
|
+
import { isAgentContent } from "#src/validation.ts";
|
|
5
5
|
|
|
6
6
|
import type {
|
|
7
7
|
ContentConversionAttempt,
|
|
@@ -10,7 +10,7 @@ import type {
|
|
|
10
10
|
ContentConverterRegistration,
|
|
11
11
|
ContentInput,
|
|
12
12
|
ContentTarget,
|
|
13
|
-
} from "./content-converter.
|
|
13
|
+
} from "./content-converter.ts";
|
|
14
14
|
|
|
15
15
|
const objectOptions = { additionalProperties: true } as const;
|
|
16
16
|
const functionSchema = Type.Function([], Type.Unknown());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ResourceScheduler, resourceScheduler, type ResourceAccess } from "./resource-scheduler.
|
|
2
|
-
export { resourceAccesses } from "./resource-access.
|
|
3
|
-
export { TempResourceStore, type TempResourceStoreOptions } from "./temp-resource-store.
|
|
1
|
+
export { ResourceScheduler, resourceScheduler, type ResourceAccess } from "./resource-scheduler.ts";
|
|
2
|
+
export { resourceAccesses } from "./resource-access.ts";
|
|
3
|
+
export { TempResourceStore, type TempResourceStoreOptions } from "./temp-resource-store.ts";
|
|
4
4
|
export {
|
|
5
5
|
assertJsonData,
|
|
6
6
|
MAX_STRUCTURED_BYTES,
|
|
@@ -10,22 +10,22 @@ export {
|
|
|
10
10
|
withStructuredResult,
|
|
11
11
|
type ResultError,
|
|
12
12
|
type StructuredResult,
|
|
13
|
-
} from "./tool-result.
|
|
14
|
-
export { ResourceError } from "./resource-error.
|
|
13
|
+
} from "./tool-result.ts";
|
|
14
|
+
export { ResourceError } from "./resource-error.ts";
|
|
15
15
|
export {
|
|
16
16
|
resourceErrorMetadata,
|
|
17
17
|
resourceErrorMetadataOf,
|
|
18
18
|
resourceErrorMetadataSchema,
|
|
19
19
|
type ResourceErrorMetadata,
|
|
20
20
|
type ResourceRateLimit,
|
|
21
|
-
} from "./resource-error-metadata.
|
|
21
|
+
} from "./resource-error-metadata.ts";
|
|
22
22
|
export type {
|
|
23
23
|
AgentContent,
|
|
24
24
|
AgentContentBlock,
|
|
25
25
|
CustomContent,
|
|
26
26
|
ImageContent,
|
|
27
27
|
TextContent,
|
|
28
|
-
} from "./content.
|
|
28
|
+
} from "./content.ts";
|
|
29
29
|
|
|
30
30
|
export type {
|
|
31
31
|
ContentCapability,
|
|
@@ -36,20 +36,20 @@ export type {
|
|
|
36
36
|
ContentDescription,
|
|
37
37
|
ContentInput,
|
|
38
38
|
ContentTarget,
|
|
39
|
-
} from "./content-conversion/content-converter.
|
|
39
|
+
} from "./content-conversion/content-converter.ts";
|
|
40
40
|
|
|
41
|
-
export { renderContentDescription } from "./content-conversion/content-description.
|
|
41
|
+
export { renderContentDescription } from "./content-conversion/content-description.ts";
|
|
42
42
|
|
|
43
|
-
export { type ContentHost, createContentHost } from "./content-conversion/content-host.
|
|
43
|
+
export { type ContentHost, createContentHost } from "./content-conversion/content-host.ts";
|
|
44
44
|
|
|
45
45
|
export {
|
|
46
46
|
type ContentRunner,
|
|
47
47
|
createContentRunner,
|
|
48
48
|
targetsEqual,
|
|
49
49
|
UnsupportedContentError,
|
|
50
|
-
} from "./content-conversion/content-runner.
|
|
50
|
+
} from "./content-conversion/content-runner.ts";
|
|
51
51
|
|
|
52
|
-
export { connectContentConverter } from "./content-conversion/connect-plugin.
|
|
52
|
+
export { connectContentConverter } from "./content-conversion/connect-plugin.ts";
|
|
53
53
|
|
|
54
54
|
export {
|
|
55
55
|
CONTENT_API_VERSION,
|
|
@@ -60,7 +60,7 @@ export {
|
|
|
60
60
|
type ContentHostReady,
|
|
61
61
|
isContentConverterRegistrationRequest,
|
|
62
62
|
isContentHostReady,
|
|
63
|
-
} from "./content-conversion/plugin-protocol.
|
|
63
|
+
} from "./content-conversion/plugin-protocol.ts";
|
|
64
64
|
|
|
65
65
|
export {
|
|
66
66
|
isContentConversionAttempt,
|
|
@@ -69,7 +69,7 @@ export {
|
|
|
69
69
|
isContentConverterRegistration,
|
|
70
70
|
isContentInput,
|
|
71
71
|
isContentTarget,
|
|
72
|
-
} from "./content-conversion/validation.
|
|
72
|
+
} from "./content-conversion/validation.ts";
|
|
73
73
|
|
|
74
74
|
export type {
|
|
75
75
|
ReadableResource,
|
|
@@ -82,21 +82,21 @@ export type {
|
|
|
82
82
|
ResourceRead,
|
|
83
83
|
ResourceWrite,
|
|
84
84
|
WritableResource,
|
|
85
|
-
} from "./resource.
|
|
85
|
+
} from "./resource.ts";
|
|
86
86
|
|
|
87
87
|
export type {
|
|
88
88
|
ResourceResolutionAttempt,
|
|
89
89
|
ResourceResolver,
|
|
90
90
|
ResourceResolverContext,
|
|
91
91
|
ResourceTryResolve,
|
|
92
|
-
} from "./resolver.
|
|
92
|
+
} from "./resolver.ts";
|
|
93
93
|
|
|
94
94
|
export {
|
|
95
95
|
isAgentContent,
|
|
96
96
|
isResource,
|
|
97
97
|
isResourceResolutionAttempt,
|
|
98
98
|
isResourceResolver,
|
|
99
|
-
} from "./validation.
|
|
99
|
+
} from "./validation.ts";
|
|
100
100
|
|
|
101
101
|
export {
|
|
102
102
|
connectResultTargets,
|
|
@@ -106,5 +106,5 @@ export {
|
|
|
106
106
|
type ResultRange,
|
|
107
107
|
type ResultSourceTarget,
|
|
108
108
|
type ResolvedResultTargets,
|
|
109
|
-
} from "./result-targets.
|
|
110
|
-
export { connectResultImages, ResultImageStore } from "./result-images.
|
|
109
|
+
} from "./result-targets.ts";
|
|
110
|
+
export { connectResultImages, ResultImageStore } from "./result-images.ts";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { realpath, stat } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
-
import type { ResourceAccess } from "./resource-scheduler.
|
|
4
|
+
import type { ResourceAccess } from "./resource-scheduler.ts";
|
|
5
5
|
|
|
6
6
|
/** Identify file aliases (including hard links) or an owner's canonical protocol source. */
|
|
7
7
|
export async function resourceAccesses(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resourceErrorMetadataOf, type ResourceErrorMetadata } from "./resource-error-metadata.
|
|
1
|
+
import { resourceErrorMetadataOf, type ResourceErrorMetadata } from "./resource-error-metadata.ts";
|
|
2
2
|
|
|
3
3
|
const resourceErrorBrand = Symbol.for("pi-agent-resource.ResourceError");
|
|
4
4
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
3
|
-
import type { ImageContent } from "./content.
|
|
3
|
+
import type { ImageContent } from "./content.ts";
|
|
4
4
|
|
|
5
5
|
const event = "pi-agent-resource:result-images";
|
|
6
6
|
/** Base64 characters of images kept for later writes; the oldest results drop out first. */
|
|
@@ -53,6 +53,8 @@ export class ResultTargetStore {
|
|
|
53
53
|
string,
|
|
54
54
|
{ cwd: string; digest: string; consumable: boolean; references: string[]; resources: string[] }
|
|
55
55
|
>();
|
|
56
|
+
/** One retained copy of each current source text, shared by every entry that snapshots it. */
|
|
57
|
+
readonly #contents = new Map<string, { identity: string; content: string }>();
|
|
56
58
|
|
|
57
59
|
/** Forget results when the session closes or the extensions reload. */
|
|
58
60
|
public clear(): void {
|
|
@@ -60,6 +62,7 @@ export class ResultTargetStore {
|
|
|
60
62
|
this.#matchReferences.clear();
|
|
61
63
|
this.#snapshots.clear();
|
|
62
64
|
this.#results.clear();
|
|
65
|
+
this.#contents.clear();
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
/** Register trusted resolver data, not a live Resource or agent-supplied coordinates. */
|
|
@@ -68,7 +71,7 @@ export class ResultTargetStore {
|
|
|
68
71
|
const reference = `${prefix}${randomUUID()}`;
|
|
69
72
|
this.#entries.set(reference, {
|
|
70
73
|
state: "ready",
|
|
71
|
-
targets: combineTargets(targets),
|
|
74
|
+
targets: combineTargets(this.#shareContents(targets, cwd)),
|
|
72
75
|
complete,
|
|
73
76
|
cwd: path.resolve(cwd),
|
|
74
77
|
});
|
|
@@ -91,7 +94,7 @@ export class ResultTargetStore {
|
|
|
91
94
|
this.#entries.set(reference, {
|
|
92
95
|
state: "ready",
|
|
93
96
|
cwd: entry.cwd,
|
|
94
|
-
targets: combineTargets(targets),
|
|
97
|
+
targets: combineTargets(this.#shareContents(targets, cwd)),
|
|
95
98
|
complete: true,
|
|
96
99
|
});
|
|
97
100
|
}
|
|
@@ -268,6 +271,8 @@ export class ResultTargetStore {
|
|
|
268
271
|
|
|
269
272
|
/** Permanently retire every ready selection of a changed file, including derived results. */
|
|
270
273
|
public invalidate(source: string): void {
|
|
274
|
+
for (const [key, shared] of this.#contents)
|
|
275
|
+
if (shared.identity === source) this.#contents.delete(key);
|
|
271
276
|
const removed = new Set<string>();
|
|
272
277
|
for (const [reference, entry] of this.#entries) {
|
|
273
278
|
if (
|
|
@@ -306,6 +311,22 @@ export class ResultTargetStore {
|
|
|
306
311
|
for (const snapshot of [...this.#snapshots.values()])
|
|
307
312
|
this.refresh(snapshot.source, snapshot.cwd);
|
|
308
313
|
}
|
|
314
|
+
/** Replace equal snapshot text with the copy already retained, so repeated results add no copy. */
|
|
315
|
+
#shareContents(
|
|
316
|
+
targets: readonly ResultSourceTarget[],
|
|
317
|
+
cwd: string,
|
|
318
|
+
): readonly ResultSourceTarget[] {
|
|
319
|
+
return targets.map((target) => {
|
|
320
|
+
const identity = sourcePath(target.source, cwd);
|
|
321
|
+
const key = JSON.stringify([path.resolve(cwd), identity]);
|
|
322
|
+
const shared = this.#contents.get(key);
|
|
323
|
+
if (shared?.content === target.expectedContent)
|
|
324
|
+
return { ...target, expectedContent: shared.content };
|
|
325
|
+
this.#contents.set(key, { identity, content: target.expectedContent });
|
|
326
|
+
return target;
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
|
|
309
330
|
#references(input: unknown): string[] {
|
|
310
331
|
if (typeof input === "string" && input.startsWith(prefix)) return [input];
|
|
311
332
|
if (Array.isArray(input)) return input.flatMap((child) => this.#references(child));
|
|
@@ -3,8 +3,8 @@ import { mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
|
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
|
|
6
|
-
import type { AgentContent } from "./content.
|
|
7
|
-
import type { ResourceResolutionAttempt, ResourceResolver } from "./resolver.
|
|
6
|
+
import type { AgentContent } from "./content.ts";
|
|
7
|
+
import type { ResourceResolutionAttempt, ResourceResolver } from "./resolver.ts";
|
|
8
8
|
|
|
9
9
|
export interface TempResourceStoreOptions {
|
|
10
10
|
/** Parent folder for this store's private temporary directory. */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Type, type TSchema } from "typebox";
|
|
2
|
-
import { ResourceError } from "./resource-error.
|
|
2
|
+
import { ResourceError } from "./resource-error.ts";
|
|
3
3
|
import {
|
|
4
4
|
resourceErrorMetadataOf,
|
|
5
5
|
resourceErrorMetadataSchema,
|
|
6
6
|
type ResourceErrorMetadata,
|
|
7
|
-
} from "./resource-error-metadata.
|
|
7
|
+
} from "./resource-error-metadata.ts";
|
|
8
8
|
import { Value } from "typebox/value";
|
|
9
9
|
import type { AgentToolResult } from "@earendil-works/pi-coding-agent";
|
|
10
10
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type TSchema, Type } from "typebox";
|
|
2
2
|
import { Value } from "typebox/value";
|
|
3
3
|
|
|
4
|
-
import type { AgentContent } from "./content.
|
|
5
|
-
import type { ResourceResolutionAttempt, ResourceResolver } from "./resolver.
|
|
6
|
-
import type { Resource } from "./resource.
|
|
4
|
+
import type { AgentContent } from "./content.ts";
|
|
5
|
+
import type { ResourceResolutionAttempt, ResourceResolver } from "./resolver.ts";
|
|
6
|
+
import type { Resource } from "./resource.ts";
|
|
7
7
|
|
|
8
8
|
const objectOptions = { additionalProperties: true } as const;
|
|
9
9
|
const functionSchema = Type.Function([], Type.Unknown());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from "./src/core/extension.
|
|
1
|
+
export { default } from "./src/core/extension.ts";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-search",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#src/*": "./src/*"
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"pi-agent-documentation": "0.9.
|
|
24
|
-
"pi-agent-resource": "0.9.
|
|
25
|
-
"pi-agent-tool-call-interception": "0.9.
|
|
26
|
-
"pi-agent-tool-ui": "0.9.
|
|
23
|
+
"pi-agent-documentation": "0.9.6",
|
|
24
|
+
"pi-agent-resource": "0.9.6",
|
|
25
|
+
"pi-agent-tool-call-interception": "0.9.6",
|
|
26
|
+
"pi-agent-tool-ui": "0.9.6"
|
|
27
27
|
},
|
|
28
28
|
"pi": {
|
|
29
29
|
"extensions": [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SearchSelectionMatch } from "#src/api/search.
|
|
2
|
-
import { fuzzyDataSchema, selectionData } from "#src/api/structured-result.
|
|
1
|
+
import type { SearchSelectionMatch } from "#src/api/search.ts";
|
|
2
|
+
import { fuzzyDataSchema, selectionData } from "#src/api/structured-result.ts";
|
|
3
3
|
import { Value } from "typebox/value";
|
|
4
4
|
|
|
5
5
|
/** Fixed budgets for the extra branch, independent of ordinary Search's detail limit. */
|
|
@@ -2,7 +2,7 @@ import path from "node:path";
|
|
|
2
2
|
import { pathToFileURL } from "node:url";
|
|
3
3
|
import { ResultPanel, sourceRows, type ResultPanelRow } from "pi-agent-tool-ui";
|
|
4
4
|
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
5
|
-
import type { SearchSelectionMatch } from "./search.
|
|
5
|
+
import type { SearchSelectionMatch } from "./search.ts";
|
|
6
6
|
|
|
7
7
|
/** Present Search ranges consistently, without adding targets or pretending readonly sources are files. */
|
|
8
8
|
export function renderSearchMatches(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ResolvedResultTargets } from "pi-agent-resource";
|
|
2
|
-
import type { SearchSelectionMatch } from "./search.
|
|
2
|
+
import type { SearchSelectionMatch } from "./search.ts";
|
|
3
3
|
|
|
4
4
|
/** Keep a provider match only when one declared region wholly contains its exact range. */
|
|
5
5
|
export function containsSearchMatch(
|