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.
Files changed (776) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-ZXO4D5UB.js → chunk-2AANEKFS.js} +1 -1
  4. package/dist/{chunk-BU7IZLKB.js → chunk-2DSY4U73.js} +1 -1
  5. package/dist/chunk-2YO6RVX4.js +1 -0
  6. package/dist/{chunk-WES2E4VR.js → chunk-33U3RUM3.js} +1 -1
  7. package/dist/{chunk-CJPS4GXD.js → chunk-34IYWKY5.js} +1 -1
  8. package/dist/{chunk-2TTSJOLO.js → chunk-4CSNQX54.js} +1 -1
  9. package/dist/{chunk-DAZQSXUW.js → chunk-53IV6EKV.js} +1 -1
  10. package/dist/{chunk-7PVDTMEM.js → chunk-5AROEOJB.js} +1 -1
  11. package/dist/{chunk-IG5DXVDJ.js → chunk-5D4C225L.js} +1 -1
  12. package/dist/{chunk-GHO6TCPJ.js → chunk-5DN2XBVI.js} +1 -1
  13. package/dist/{chunk-FHRHYY4M.js → chunk-5W6QQZFI.js} +1 -1
  14. package/dist/{chunk-5PC5INOL.js → chunk-6W4OJLCJ.js} +1 -1
  15. package/dist/chunk-6ZYCTWQE.js +1 -0
  16. package/dist/{chunk-B25LXXNV.js → chunk-72FL5FHZ.js} +1 -1
  17. package/dist/{chunk-BB4A5UI3.js → chunk-7JWZPJI5.js} +1 -1
  18. package/dist/{chunk-T3Z4KXOX.js → chunk-AMSNDWBT.js} +1 -1
  19. package/dist/{chunk-DFXXT6MJ.js → chunk-APWMLLSE.js} +6 -6
  20. package/dist/{chunk-NA2NEU4V.js → chunk-B5UJCNQU.js} +1 -1
  21. package/dist/chunk-BMSAVDRD.js +13 -0
  22. package/dist/{chunk-MPNE25CY.js → chunk-BRJIXNFU.js} +1 -1
  23. package/dist/chunk-C2GZLLSP.js +5 -0
  24. package/dist/{chunk-XCPIIDFS.js → chunk-DHOIQZUF.js} +1 -1
  25. package/dist/chunk-ECSMTGVM.js +6 -0
  26. package/dist/{chunk-DEP55R35.js → chunk-EHFWODRT.js} +1 -1
  27. package/dist/{chunk-6WCHBHFW.js → chunk-EWTVVPUA.js} +1 -1
  28. package/dist/{chunk-H3GEEOOL.js → chunk-FBR7ZLLN.js} +1 -1
  29. package/dist/{chunk-UD3DMY3Q.js → chunk-FGN2ZMEN.js} +1 -1
  30. package/dist/{chunk-MKDOT76B.js → chunk-FJSYWOE6.js} +1 -1
  31. package/dist/{chunk-LF325WYO.js → chunk-FTECKRK6.js} +1 -1
  32. package/dist/chunk-GRZTKMXQ.js +1 -0
  33. package/dist/chunk-H6FEBUAP.js +1 -0
  34. package/dist/{chunk-FYOU4RBH.js → chunk-HFCHOFLV.js} +1 -1
  35. package/dist/chunk-HFF4GY7R.js +3 -0
  36. package/dist/{chunk-QJ6V5IAY.js → chunk-HJXSEPO7.js} +14 -12
  37. package/dist/{chunk-SRFWT562.js → chunk-HSEDKYH4.js} +1 -1
  38. package/dist/{chunk-6P7LTQZT.js → chunk-II7AOJNH.js} +1 -1
  39. package/dist/chunk-J6CDIH3S.js +84 -0
  40. package/dist/{chunk-USG6WHAT.js → chunk-JHWLRL4U.js} +1 -1
  41. package/dist/{chunk-35LZOKEW.js → chunk-JMQ67UNK.js} +1 -1
  42. package/dist/{chunk-7OUML24Z.js → chunk-JRIP33PC.js} +1 -1
  43. package/dist/chunk-JXULBI4S.js +2 -0
  44. package/dist/chunk-JYITLCXC.js +1 -0
  45. package/dist/{chunk-4IWEKRSP.js → chunk-KJAR2WDO.js} +1 -1
  46. package/dist/{chunk-GS5ZRTUG.js → chunk-KQV2ZXLP.js} +1 -1
  47. package/dist/{chunk-AMIIOWFL.js → chunk-KX7MG72M.js} +1 -1
  48. package/dist/{chunk-HGCJDIRR.js → chunk-LIGOOMJS.js} +5 -5
  49. package/dist/{chunk-OMNKD7WW.js → chunk-LY2UANKU.js} +3 -3
  50. package/dist/chunk-M7P7V4WI.js +25 -0
  51. package/dist/chunk-N2NEFXHB.js +13 -0
  52. package/dist/{chunk-2TZDG2JH.js → chunk-NF74ITWT.js} +2 -2
  53. package/dist/{chunk-AP2BOC24.js → chunk-NQYUIQRH.js} +1 -1
  54. package/dist/{chunk-7C73WVPB.js → chunk-OCU6NW5Y.js} +1 -1
  55. package/dist/chunk-OIEA4QWF.js +4 -0
  56. package/dist/{chunk-FXPY3V4L.js → chunk-ON5HDFNL.js} +1 -1
  57. package/dist/{chunk-U2N73BUY.js → chunk-P43GGKUC.js} +5 -5
  58. package/dist/{chunk-5BGWNYQS.js → chunk-P7FUD4WY.js} +1 -1
  59. package/dist/{chunk-VMLPXSMK.js → chunk-PPCWY4BB.js} +1 -1
  60. package/dist/{chunk-YPYROPQF.js → chunk-QGXZ4RWX.js} +1 -1
  61. package/dist/chunk-S3T5NOSL.js +1 -0
  62. package/dist/chunk-S7E2D5K7.js +5 -0
  63. package/dist/{chunk-DDH3FP4G.js → chunk-SIYPD5MM.js} +3 -3
  64. package/dist/{chunk-6A3ORNW3.js → chunk-T5ACAOKJ.js} +3 -3
  65. package/dist/chunk-TILMPAF2.js +1 -0
  66. package/dist/{chunk-RIJRPAL2.js → chunk-TSNY2FSU.js} +1 -1
  67. package/dist/{chunk-UI4KSKS3.js → chunk-TWJINFQB.js} +4 -4
  68. package/dist/chunk-TWQ6ACOI.js +1 -0
  69. package/dist/chunk-UDVVKVG4.js +1 -0
  70. package/dist/{chunk-WQIMM4SU.js → chunk-V2D5MLGE.js} +1 -1
  71. package/dist/{chunk-PQWANILR.js → chunk-VDSSAP6Y.js} +1 -1
  72. package/dist/{chunk-AVJVTF5H.js → chunk-VHYJTAXX.js} +1 -1
  73. package/dist/{chunk-MJFY4RGT.js → chunk-WCSWQDJ2.js} +1 -1
  74. package/dist/{chunk-JWSJCEIB.js → chunk-WQTF6Q2X.js} +1 -1
  75. package/dist/chunk-YFPU2LRR.js +23 -0
  76. package/dist/{chunk-KWJD7FBS.js → chunk-YLEERRX3.js} +14 -14
  77. package/dist/chunk-YNOR4LIE.js +1 -0
  78. package/dist/{chunk-WEE3NM6L.js → chunk-YOJHCARZ.js} +1 -1
  79. package/dist/chunk-YPTDPMK5.js +1 -0
  80. package/dist/{chunk-GXL4NMHR.js → chunk-YZTVC7ME.js} +1 -1
  81. package/dist/entry-0.js +1 -1
  82. package/dist/entry-10.js +1 -1
  83. package/dist/entry-11.js +1 -1
  84. package/dist/entry-12.js +1 -1
  85. package/dist/entry-14.js +1 -1
  86. package/dist/entry-15.js +1 -1
  87. package/dist/entry-17.js +1 -1
  88. package/dist/entry-19.js +1 -1
  89. package/dist/entry-2.js +1 -1
  90. package/dist/entry-20.js +1 -1
  91. package/dist/entry-21.js +1 -1
  92. package/dist/entry-22.js +1 -1
  93. package/dist/entry-25.js +1 -1
  94. package/dist/entry-31.js +2 -2
  95. package/dist/entry-32.js +1 -1
  96. package/dist/entry-33.js +1 -1
  97. package/dist/entry-34.js +1 -1
  98. package/dist/entry-35.js +1 -1
  99. package/dist/entry-36.js +1 -1
  100. package/dist/entry-37.js +1 -1
  101. package/dist/entry-38.js +13 -13
  102. package/dist/entry-39.js +1 -1
  103. package/dist/entry-4.js +1 -1
  104. package/dist/entry-40.js +1 -1
  105. package/dist/entry-41.js +1 -1
  106. package/dist/entry-42.js +1 -1
  107. package/dist/entry-43.js +1 -1
  108. package/dist/entry-44.js +1 -1
  109. package/dist/entry-48.js +1 -1
  110. package/dist/entry-49.js +1 -1
  111. package/dist/entry-50.js +1 -1
  112. package/dist/entry-51.js +1 -1
  113. package/dist/entry-52.js +1 -1
  114. package/dist/entry-53.js +1 -1
  115. package/dist/entry-56.js +1 -1
  116. package/dist/entry-57.js +1 -1
  117. package/dist/entry-58.js +1 -1
  118. package/dist/entry-59.js +1 -1
  119. package/dist/entry-60.js +1 -1
  120. package/dist/entry-61.js +1 -1
  121. package/dist/entry-62.js +1 -1
  122. package/dist/entry-63.js +1 -1
  123. package/dist/entry-64.js +1 -1
  124. package/dist/entry-65.js +1 -1
  125. package/dist/entry-66.js +1 -1
  126. package/dist/entry-67.js +1 -1
  127. package/dist/entry-69.js +1 -1
  128. package/dist/entry-72.js +1 -1
  129. package/dist/entry-74.js +1 -1
  130. package/dist/entry-75.js +1 -1
  131. package/dist/entry-77.js +1 -1
  132. package/dist/entry-79.js +1 -1
  133. package/dist/entry-8.js +1 -1
  134. package/dist/entry-82.js +1 -1
  135. package/dist/entry-84.js +1 -1
  136. package/dist/entry-85.js +1 -1
  137. package/dist/entry-86.js +1 -1
  138. package/dist/entry-87.js +1 -1
  139. package/dist/entry-90.js +1 -1
  140. package/dist/entry-91.js +1 -1
  141. package/dist/entry-92.js +1 -1
  142. package/dist/entry-93.js +1 -1
  143. package/dist/entry-94.js +1 -1
  144. package/dist/pi-agent-ide.js +11 -11
  145. package/docs/development.md +2 -0
  146. package/docs/generated/tool-catalog/python.md +1 -0
  147. package/docs/tools.md +2 -0
  148. package/node_modules/pi-agent-doctor/package.json +1 -1
  149. package/node_modules/pi-agent-doctor/src/connect-plugin.ts +2 -2
  150. package/node_modules/pi-agent-doctor/src/evidence.ts +1 -1
  151. package/node_modules/pi-agent-doctor/src/fixtures/executable-probe.ts +2 -2
  152. package/node_modules/pi-agent-doctor/src/plugin-protocol.ts +4 -4
  153. package/node_modules/pi-agent-doctor/src/project-probes.ts +2 -2
  154. package/node_modules/pi-agent-doctor/src/workspace.ts +2 -2
  155. package/node_modules/pi-agent-documentation/package.json +1 -1
  156. package/node_modules/pi-agent-filesystem/index.ts +2 -2
  157. package/node_modules/pi-agent-filesystem/package.json +7 -7
  158. package/node_modules/pi-agent-filesystem/src/file-write-lock.ts +70 -0
  159. package/node_modules/pi-agent-filesystem/src/replace-file.ts +50 -0
  160. package/node_modules/pi-agent-filesystem/src/resolver.ts +28 -8
  161. package/node_modules/pi-agent-filesystem-image/package.json +3 -3
  162. package/node_modules/pi-agent-filesystem-jq/index.ts +1 -1
  163. package/node_modules/pi-agent-filesystem-jq/package.json +5 -5
  164. package/node_modules/pi-agent-filesystem-jq/src/api/jq.ts +1 -1
  165. package/node_modules/pi-agent-filesystem-pdf/package.json +3 -3
  166. package/node_modules/pi-agent-filesystem-text/package.json +3 -3
  167. package/node_modules/pi-agent-ide-ast/index.ts +1 -1
  168. package/node_modules/pi-agent-ide-ast/package.json +13 -13
  169. package/node_modules/pi-agent-ide-ast/src/api/scope.ts +1 -1
  170. package/node_modules/pi-agent-ide-ast/src/ast/manager.ts +33 -11
  171. package/node_modules/pi-agent-ide-ast/src/ast/native-parser.ts +1 -1
  172. package/node_modules/pi-agent-ide-ast/src/ast/outline.ts +60 -55
  173. package/node_modules/pi-agent-ide-ast/src/doctor-plugin.ts +4 -3
  174. package/node_modules/pi-agent-ide-ast/src/extension.ts +10 -10
  175. package/node_modules/pi-agent-ide-ast/src/outline-resolver.ts +3 -3
  176. package/node_modules/pi-agent-ide-ast/src/overflow-handler.ts +1 -1
  177. package/node_modules/pi-agent-ide-ast/src/scope-handler.ts +35 -8
  178. package/node_modules/pi-agent-ide-ast/src/scope-resolver.ts +1 -1
  179. package/node_modules/pi-agent-ide-ast/src/search-resolver.ts +161 -23
  180. package/node_modules/pi-agent-ide-ast/src/tool-ast-search.ts +1 -1
  181. package/node_modules/pi-agent-ide-changes/index.ts +9 -9
  182. package/node_modules/pi-agent-ide-changes/package.json +8 -8
  183. package/node_modules/pi-agent-ide-changes/src/change-anchor.ts +4 -4
  184. package/node_modules/pi-agent-ide-changes/src/changes/change-groups.ts +1 -1
  185. package/node_modules/pi-agent-ide-changes/src/changes/change-service.ts +4 -4
  186. package/node_modules/pi-agent-ide-changes/src/changes/git-changes-backend.ts +1 -1
  187. package/node_modules/pi-agent-ide-changes/src/current-change-presenter.ts +4 -4
  188. package/node_modules/pi-agent-ide-changes/src/tool-index-change.ts +5 -5
  189. package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +6 -6
  190. package/node_modules/pi-agent-ide-formatter/index.ts +5 -5
  191. package/node_modules/pi-agent-ide-formatter/package.json +3 -3
  192. package/node_modules/pi-agent-ide-formatter/src/doctor-plugin.ts +2 -2
  193. package/node_modules/pi-agent-ide-formatter/src/formatter.ts +2 -2
  194. package/node_modules/pi-agent-ide-formatter/src/registry.ts +1 -1
  195. package/node_modules/pi-agent-ide-languages/index.ts +1 -1
  196. package/node_modules/pi-agent-ide-languages/package.json +2 -2
  197. package/node_modules/pi-agent-ide-lint/index.ts +9 -9
  198. package/node_modules/pi-agent-ide-lint/package.json +7 -7
  199. package/node_modules/pi-agent-ide-lint/src/catalog.ts +4 -0
  200. package/node_modules/pi-agent-ide-lint/src/command-linter.ts +15 -6
  201. package/node_modules/pi-agent-ide-lint/src/diagnostics.ts +8 -14
  202. package/node_modules/pi-agent-ide-lint/src/doctor-plugin.ts +3 -3
  203. package/node_modules/pi-agent-ide-lint/src/registry.ts +1 -1
  204. package/node_modules/pi-agent-ide-lsp/index.ts +37 -16
  205. package/node_modules/pi-agent-ide-lsp/package.json +12 -12
  206. package/node_modules/pi-agent-ide-lsp/src/catalog.ts +12 -1
  207. package/node_modules/pi-agent-ide-lsp/src/declaration-targets.ts +21 -14
  208. package/node_modules/pi-agent-ide-lsp/src/diagnostic-source.ts +63 -20
  209. package/node_modules/pi-agent-ide-lsp/src/doctor-plugin.ts +4 -4
  210. package/node_modules/pi-agent-ide-lsp/src/idle-timeout.ts +15 -0
  211. package/node_modules/pi-agent-ide-lsp/src/lsp/abort.ts +11 -0
  212. package/node_modules/pi-agent-ide-lsp/src/lsp/client.ts +434 -80
  213. package/node_modules/pi-agent-ide-lsp/src/lsp/code-views.ts +121 -35
  214. package/node_modules/pi-agent-ide-lsp/src/lsp/diagnostic-adapters.ts +1 -1
  215. package/node_modules/pi-agent-ide-lsp/src/lsp/diagnostics.ts +26 -12
  216. package/node_modules/pi-agent-ide-lsp/src/lsp/document-leases.ts +31 -0
  217. package/node_modules/pi-agent-ide-lsp/src/lsp/errors.ts +4 -0
  218. package/node_modules/pi-agent-ide-lsp/src/lsp/file-watchers.ts +1 -77
  219. package/node_modules/pi-agent-ide-lsp/src/lsp/index.ts +19 -19
  220. package/node_modules/pi-agent-ide-lsp/src/lsp/language-map.ts +1 -1
  221. package/node_modules/pi-agent-ide-lsp/src/lsp/lsp-compiler.ts +5 -4
  222. package/node_modules/pi-agent-ide-lsp/src/lsp/manager.ts +59 -28
  223. package/node_modules/pi-agent-ide-lsp/src/lsp/navigation.ts +42 -22
  224. package/node_modules/pi-agent-ide-lsp/src/lsp/owner-transport.ts +1 -1
  225. package/node_modules/pi-agent-ide-lsp/src/lsp/position-map.ts +52 -0
  226. package/node_modules/pi-agent-ide-lsp/src/lsp/project.ts +1 -1
  227. package/node_modules/pi-agent-ide-lsp/src/lsp/registry.ts +2 -2
  228. package/node_modules/pi-agent-ide-lsp/src/lsp/rename.ts +2 -2
  229. package/node_modules/pi-agent-ide-lsp/src/lsp/server-request-handlers.mjs +325 -0
  230. package/node_modules/pi-agent-ide-lsp/src/lsp/shared-server-host.mjs +797 -0
  231. package/node_modules/pi-agent-ide-lsp/src/lsp/shared-servers.ts +322 -0
  232. package/node_modules/pi-agent-ide-lsp/src/lsp/source-changes.ts +29 -0
  233. package/node_modules/pi-agent-ide-lsp/src/lsp/symbol-search.ts +76 -17
  234. package/node_modules/pi-agent-ide-lsp/src/lsp/symbols.ts +3 -3
  235. package/node_modules/pi-agent-ide-lsp/src/lsp/workspace-owner.ts +1 -1
  236. package/node_modules/pi-agent-ide-lsp/src/manager-provider.ts +1 -1
  237. package/node_modules/pi-agent-ide-lsp/src/rename-plan.ts +16 -8
  238. package/node_modules/pi-agent-ide-lsp/src/search-resolver.ts +149 -134
  239. package/node_modules/pi-agent-ide-lsp/src/tool-lsp-search.ts +1 -1
  240. package/node_modules/pi-agent-image/package.json +2 -2
  241. package/node_modules/pi-agent-image/src/index.ts +1 -1
  242. package/node_modules/pi-agent-invariant/package.json +1 -1
  243. package/node_modules/pi-agent-pdf/package.json +2 -2
  244. package/node_modules/pi-agent-pdf/src/index.ts +1 -1
  245. package/node_modules/pi-agent-read/index.ts +1 -1
  246. package/node_modules/pi-agent-read/package.json +7 -7
  247. package/node_modules/pi-agent-read/src/api/connect-plugin.ts +1 -1
  248. package/node_modules/pi-agent-read/src/api/plugin-protocol.ts +1 -1
  249. package/node_modules/pi-agent-read/src/api/read-parameters.ts +1 -1
  250. package/node_modules/pi-agent-read/src/api/rendering.ts +2 -2
  251. package/node_modules/pi-agent-read/src/api/tools/read.ts +8 -2
  252. package/node_modules/pi-agent-read/src/core/extension.ts +4 -4
  253. package/node_modules/pi-agent-read/src/core/read-core.ts +4 -4
  254. package/node_modules/pi-agent-read/src/core/tools/read/output-truncation.ts +2 -2
  255. package/node_modules/pi-agent-read/src/core/tools/read/persisted-result.ts +1 -1
  256. package/node_modules/pi-agent-read/src/core/tools/read/raw-read.ts +3 -3
  257. package/node_modules/pi-agent-read/src/core/tools/read/read-renderer.ts +4 -4
  258. package/node_modules/pi-agent-read/src/core/tools/read/read-result.ts +21 -14
  259. package/node_modules/pi-agent-read/src/core/tools/read/result-target.ts +24 -18
  260. package/node_modules/pi-agent-read/src/core/tools/read/structured-result.ts +2 -2
  261. package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +44 -18
  262. package/node_modules/pi-agent-resource/package.json +1 -1
  263. package/node_modules/pi-agent-resource/src/content-conversion/connect-plugin.ts +4 -4
  264. package/node_modules/pi-agent-resource/src/content-conversion/content-converter.ts +1 -1
  265. package/node_modules/pi-agent-resource/src/content-conversion/content-description.ts +1 -1
  266. package/node_modules/pi-agent-resource/src/content-conversion/content-host.ts +4 -4
  267. package/node_modules/pi-agent-resource/src/content-conversion/content-runner.ts +3 -3
  268. package/node_modules/pi-agent-resource/src/content-conversion/plugin-protocol.ts +2 -2
  269. package/node_modules/pi-agent-resource/src/content-conversion/validation.ts +2 -2
  270. package/node_modules/pi-agent-resource/src/index.ts +19 -19
  271. package/node_modules/pi-agent-resource/src/resolver.ts +1 -1
  272. package/node_modules/pi-agent-resource/src/resource-access.ts +1 -1
  273. package/node_modules/pi-agent-resource/src/resource-error.ts +1 -1
  274. package/node_modules/pi-agent-resource/src/resource.ts +1 -1
  275. package/node_modules/pi-agent-resource/src/result-images.ts +1 -1
  276. package/node_modules/pi-agent-resource/src/result-targets.ts +23 -2
  277. package/node_modules/pi-agent-resource/src/temp-resource-store.ts +2 -2
  278. package/node_modules/pi-agent-resource/src/tool-result.ts +2 -2
  279. package/node_modules/pi-agent-resource/src/validation.ts +3 -3
  280. package/node_modules/pi-agent-search/index.ts +1 -1
  281. package/node_modules/pi-agent-search/package.json +5 -5
  282. package/node_modules/pi-agent-search/src/api/connect-plugin.ts +1 -1
  283. package/node_modules/pi-agent-search/src/api/fuzzy.ts +2 -2
  284. package/node_modules/pi-agent-search/src/api/plugin-protocol.ts +1 -1
  285. package/node_modules/pi-agent-search/src/api/presentation.ts +1 -1
  286. package/node_modules/pi-agent-search/src/api/search-scope.ts +1 -1
  287. package/node_modules/pi-agent-search/src/api/search.ts +7 -7
  288. package/node_modules/pi-agent-search/src/core/extension.ts +7 -7
  289. package/node_modules/pi-agent-search/src/core/search-core.ts +3 -3
  290. package/node_modules/pi-agent-search-text/index.ts +8 -8
  291. package/node_modules/pi-agent-search-text/package.json +10 -10
  292. package/node_modules/pi-agent-search-text/src/doctor-plugin.ts +1 -1
  293. package/node_modules/pi-agent-search-text/src/file-search.ts +1 -1
  294. package/node_modules/pi-agent-search-text/src/fuzzy-search.ts +2 -2
  295. package/node_modules/pi-agent-search-text/src/persisted-result.ts +1 -1
  296. package/node_modules/pi-agent-search-text/src/resolvers.ts +9 -9
  297. package/node_modules/pi-agent-search-text/src/scoped-search.ts +4 -4
  298. package/node_modules/pi-agent-search-text/src/search-backend.ts +3 -3
  299. package/node_modules/pi-agent-search-text/src/search-presentation.ts +1 -1
  300. package/node_modules/pi-agent-search-text/src/search-recipe.ts +2 -2
  301. package/node_modules/pi-agent-search-text/src/search-renderer.ts +3 -3
  302. package/node_modules/pi-agent-search-text/src/search-result.ts +2 -2
  303. package/node_modules/pi-agent-search-text/src/search-session.ts +132 -67
  304. package/node_modules/pi-agent-search-text/src/tool-file-search.ts +1 -1
  305. package/node_modules/pi-agent-text/package.json +2 -2
  306. package/node_modules/pi-agent-text/src/index.ts +7 -7
  307. package/node_modules/pi-agent-text/src/source-line.ts +1 -1
  308. package/node_modules/pi-agent-text/src/text-document.ts +50 -2
  309. package/node_modules/pi-agent-text-anchor-constant/index.ts +1 -1
  310. package/node_modules/pi-agent-text-anchor-constant/package.json +3 -3
  311. package/node_modules/pi-agent-text-anchor-exact/index.ts +2 -2
  312. package/node_modules/pi-agent-text-anchor-exact/package.json +3 -3
  313. package/node_modules/pi-agent-text-anchor-exact/src/anchor.ts +63 -48
  314. package/node_modules/pi-agent-text-anchor-exact/src/recovery.ts +3 -3
  315. package/node_modules/pi-agent-text-anchor-line-hash/index.ts +2 -2
  316. package/node_modules/pi-agent-text-anchor-line-hash/package.json +5 -5
  317. package/node_modules/pi-agent-text-anchor-line-hash/src/read-handler.ts +23 -12
  318. package/node_modules/pi-agent-text-editor/index.ts +5 -5
  319. package/node_modules/pi-agent-text-editor/package.json +9 -9
  320. package/node_modules/pi-agent-text-editor/src/api/connect-plugin.ts +1 -1
  321. package/node_modules/pi-agent-text-editor/src/api/edit-pipeline.ts +2 -2
  322. package/node_modules/pi-agent-text-editor/src/api/file-operations.ts +2 -2
  323. package/node_modules/pi-agent-text-editor/src/api/file-transfers.ts +1 -1
  324. package/node_modules/pi-agent-text-editor/src/api/mutation-guard.ts +4 -4
  325. package/node_modules/pi-agent-text-editor/src/api/mutation-result.ts +3 -3
  326. package/node_modules/pi-agent-text-editor/src/api/mutation-tool.ts +2 -2
  327. package/node_modules/pi-agent-text-editor/src/api/native-edit-batch-event.ts +1 -1
  328. package/node_modules/pi-agent-text-editor/src/api/native-files.ts +1 -1
  329. package/node_modules/pi-agent-text-editor/src/api/plugin-protocol.ts +14 -14
  330. package/node_modules/pi-agent-text-editor/src/api/post-edit.ts +3 -3
  331. package/node_modules/pi-agent-text-editor/src/api/tool-call-interceptor.ts +1 -1
  332. package/node_modules/pi-agent-text-editor/src/api/tool-renderer.ts +2 -2
  333. package/node_modules/pi-agent-text-editor/src/core/delete-policy.ts +3 -3
  334. package/node_modules/pi-agent-text-editor/src/core/diff-tool.ts +3 -3
  335. package/node_modules/pi-agent-text-editor/src/core/extension.ts +13 -13
  336. package/node_modules/pi-agent-text-editor/src/core/file-operation-guards.ts +2 -2
  337. package/node_modules/pi-agent-text-editor/src/core/file-operation-tools.ts +6 -6
  338. package/node_modules/pi-agent-text-editor/src/core/file-operations.ts +5 -5
  339. package/node_modules/pi-agent-text-editor/src/core/file-result-targets.ts +1 -1
  340. package/node_modules/pi-agent-text-editor/src/core/file-transfers.ts +3 -3
  341. package/node_modules/pi-agent-text-editor/src/core/image-write.ts +1 -1
  342. package/node_modules/pi-agent-text-editor/src/core/mutation-result/agent-diff.ts +11 -6
  343. package/node_modules/pi-agent-text-editor/src/core/mutation-result/diff.ts +213 -20
  344. package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +4 -4
  345. package/node_modules/pi-agent-text-editor/src/core/mutation-result/final-state-fragment.ts +39 -3
  346. package/node_modules/pi-agent-text-editor/src/core/mutation-result/grouped-replacements.ts +1 -1
  347. package/node_modules/pi-agent-text-editor/src/core/mutation-result/inline-hints.ts +1 -1
  348. package/node_modules/pi-agent-text-editor/src/core/mutation-result-targets.ts +6 -6
  349. package/node_modules/pi-agent-text-editor/src/core/native-text-edit-batch.ts +22 -22
  350. package/node_modules/pi-agent-text-editor/src/core/post-edit-scope.ts +1 -1
  351. package/node_modules/pi-agent-text-editor/src/core/read-fragment-resolver.ts +3 -3
  352. package/node_modules/pi-agent-text-editor/src/core/result-input.ts +1 -1
  353. package/node_modules/pi-agent-text-editor/src/core/result-target-anchors.ts +2 -2
  354. package/node_modules/pi-agent-text-editor/src/core/result-transfer.ts +4 -4
  355. package/node_modules/pi-agent-text-editor/src/core/source-change-retry.ts +41 -0
  356. package/node_modules/pi-agent-text-editor/src/core/structured-result.ts +2 -2
  357. package/node_modules/pi-agent-text-editor/src/core/temporary-directories.ts +2 -2
  358. package/node_modules/pi-agent-text-editor/src/core/text-anchor-recovery.ts +1 -1
  359. package/node_modules/pi-agent-text-editor/src/core/text-anchor-registry.ts +3 -3
  360. package/node_modules/pi-agent-text-editor/src/core/text-change-engine.ts +4 -7
  361. package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts +2 -2
  362. package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-recovery.ts +2 -2
  363. package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +34 -21
  364. package/node_modules/pi-agent-text-editor/src/core/text-edit-batch.ts +4 -4
  365. package/node_modules/pi-agent-text-editor/src/core/text-edit-origin.ts +1 -1
  366. package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +72 -30
  367. package/node_modules/pi-agent-text-editor/src/core/text-mutation-anchor-error.ts +1 -1
  368. package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +211 -159
  369. package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +4 -4
  370. package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts +1 -1
  371. package/node_modules/pi-agent-text-editor/src/core/write-agent-result.ts +3 -3
  372. package/node_modules/pi-agent-text-editor/src/tools/extension.ts +7 -7
  373. package/node_modules/pi-agent-text-editor/src/tools/text-selection.ts +2 -2
  374. package/node_modules/pi-agent-text-editor/src/tools/tool-text-copy.ts +4 -4
  375. package/node_modules/pi-agent-text-editor/src/tools/tool-text-delete.ts +4 -4
  376. package/node_modules/pi-agent-text-editor/src/tools/tool-text-insert.ts +3 -3
  377. package/node_modules/pi-agent-text-editor/src/tools/tool-text-move.ts +5 -5
  378. package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +4 -4
  379. package/node_modules/pi-agent-text-editor/src/tools/tool-text-write.ts +1 -1
  380. package/node_modules/pi-agent-text-editor-renderer/index.ts +5 -5
  381. package/node_modules/pi-agent-text-editor-renderer/package.json +5 -5
  382. package/node_modules/pi-agent-text-editor-renderer/src/diff-renderer.ts +3 -3
  383. package/node_modules/pi-agent-text-editor-renderer/src/diff-viewport.ts +1 -1
  384. package/node_modules/pi-agent-text-editor-renderer/src/frozen-viewport.ts +2 -2
  385. package/node_modules/pi-agent-text-editor-renderer/src/mutation-panel.ts +4 -4
  386. package/node_modules/pi-agent-text-editor-renderer/src/mutation-projection.ts +2 -2
  387. package/node_modules/pi-agent-text-editor-renderer/src/mutation-result.ts +3 -3
  388. package/node_modules/pi-agent-text-editor-renderer/src/persisted-result.ts +2 -2
  389. package/node_modules/pi-agent-text-editor-renderer/src/render-resource.ts +1 -1
  390. package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +7 -7
  391. package/node_modules/pi-agent-text-editor-stale-anchor/package.json +5 -5
  392. package/node_modules/pi-agent-tool-call-interception/package.json +2 -2
  393. package/node_modules/pi-agent-tool-call-interception/src/index.ts +32 -9
  394. package/node_modules/pi-agent-tool-ui/package.json +1 -1
  395. package/node_modules/pi-agent-tool-ui/src/index.ts +1 -1
  396. package/node_modules/pi-agent-tool-ui/src/result-panel.ts +1 -1
  397. package/node_modules/pi-agent-web/index.ts +3 -3
  398. package/node_modules/pi-agent-web/package.json +7 -7
  399. package/node_modules/pi-agent-web/src/doctor-plugin.ts +1 -1
  400. package/node_modules/pi-agent-web/src/resolver.ts +1 -1
  401. package/node_modules/pi-agent-web-html/index.ts +1 -1
  402. package/node_modules/pi-agent-web-html/package.json +2 -2
  403. package/node_modules/pi-agent-web-html/src/html-converter.ts +1 -1
  404. package/node_modules/pi-agent-web-image/package.json +3 -3
  405. package/node_modules/pi-agent-web-pdf/package.json +3 -3
  406. package/node_modules/pi-agent-web-text/package.json +3 -3
  407. package/package.json +36 -36
  408. package/src/api/code-view.ts +3 -3
  409. package/src/api/connect-plugin.ts +1 -1
  410. package/src/api/connect-tip-provider.ts +2 -2
  411. package/src/api/doctor-runtime.ts +1 -1
  412. package/src/api/doctor.ts +1 -1
  413. package/src/api/hooks.ts +2 -2
  414. package/src/api/plugin-protocol.ts +1 -1
  415. package/src/api/settings.ts +6 -1
  416. package/src/api/standalone.ts +1 -1
  417. package/src/api/tips.ts +1 -1
  418. package/src/api/tool-config/linters.json +1 -1
  419. package/src/api/tool-config/lsp-servers.json +11 -0
  420. package/src/api/tool-config.ts +45 -5
  421. package/src/api/toolchain.ts +3 -3
  422. package/src/backend/config.ts +2 -2
  423. package/src/backend/configured-process.ts +5 -5
  424. package/src/backend/dap-java-transport.ts +6 -6
  425. package/src/backend/dap-node-transport.ts +5 -5
  426. package/src/backend/dap-tcp-transport.ts +3 -3
  427. package/src/backend/dap-transport.ts +5 -5
  428. package/src/backend/debugger-registration.ts +7 -7
  429. package/src/backend/debugger-workspace-owner.ts +10 -10
  430. package/src/backend/doctor-registration.ts +5 -5
  431. package/src/backend/doctor-workspace.ts +13 -13
  432. package/src/backend/file-operation-resolver.ts +5 -5
  433. package/src/backend/file-revision.ts +1 -1
  434. package/src/backend/file-transfer.ts +4 -4
  435. package/src/backend/formatter-registration.ts +11 -11
  436. package/src/backend/git-registration.ts +4 -4
  437. package/src/backend/index.ts +3 -3
  438. package/src/backend/lint-registration.ts +11 -11
  439. package/src/backend/lsp-file-watchers.ts +5 -5
  440. package/src/backend/lsp-registration.ts +11 -11
  441. package/src/backend/lsp-transport.ts +7 -7
  442. package/src/backend/lsp-workspace-owner.ts +4 -4
  443. package/src/backend/object-transfer.ts +5 -5
  444. package/src/backend/owned-command.ts +2 -2
  445. package/src/backend/owned-process-stop.ts +4 -4
  446. package/src/backend/owned-read-command.ts +2 -2
  447. package/src/backend/process-environment.ts +2 -2
  448. package/src/backend/process-metadata.ts +2 -2
  449. package/src/backend/recipe-evidence.ts +2 -2
  450. package/src/backend/registration.ts +8 -8
  451. package/src/backend/registry.ts +2 -2
  452. package/src/backend/resource-resolver.ts +2 -2
  453. package/src/backend/search-environment.ts +3 -3
  454. package/src/backend/ssh-channel.ts +3 -3
  455. package/src/backend/ssh-transport.ts +2 -2
  456. package/src/backend/ssh.ts +6 -6
  457. package/src/backend/tool-config-access.ts +4 -4
  458. package/src/backend/tool-project.ts +5 -5
  459. package/src/backend/web-browser.ts +3 -3
  460. package/src/backend/web-http.ts +2 -2
  461. package/src/backend/web-owner.ts +5 -5
  462. package/src/backend/web-registration.ts +5 -5
  463. package/src/code-review/extension.ts +3 -3
  464. package/src/code-review/reviewer.ts +2 -2
  465. package/src/code-view/diagnostic-view.ts +4 -4
  466. package/src/composite/builtin-extensions.ts +37 -37
  467. package/src/composite/capabilities.ts +2 -2
  468. package/src/composite/capability-schemas.ts +1 -1
  469. package/src/composite/detached-results.ts +32 -0
  470. package/src/composite/extensions-config.ts +2 -2
  471. package/src/composite/module-settings-store.ts +2 -2
  472. package/src/composite/module-settings.ts +12 -12
  473. package/src/composite/nested-tool-rendering.ts +3 -3
  474. package/src/composite/output-limits.ts +6 -1
  475. package/src/composite/preferences.ts +10 -0
  476. package/src/composite/presets.ts +1 -1
  477. package/src/composite/reload-required.ts +6 -6
  478. package/src/composite/settings-documentation.ts +5 -5
  479. package/src/composite/settings-registry.ts +4 -4
  480. package/src/composite/text-results.ts +2 -2
  481. package/src/core/diagnostic-entry.ts +2 -2
  482. package/src/core/diagnostic-store.ts +3 -3
  483. package/src/core/extension.ts +8 -8
  484. package/src/core/ide-core.ts +4 -4
  485. package/src/doctor/config-writer.ts +3 -3
  486. package/src/doctor/core.ts +2 -2
  487. package/src/doctor/discovery.ts +4 -4
  488. package/src/doctor/extension.ts +7 -7
  489. package/src/doctor/index.ts +1 -1
  490. package/src/doctor/inventory.ts +1 -1
  491. package/src/doctor/run.ts +6 -6
  492. package/src/doctor/tip-provider.ts +2 -2
  493. package/src/documentation/extension.ts +3 -3
  494. package/src/documentation/registry.ts +1 -1
  495. package/src/documentation/search.ts +1 -1
  496. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/index.ts +2 -2
  497. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +7 -7
  498. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +3 -3
  499. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/index.ts +1 -1
  500. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/package.json +5 -5
  501. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/src/api/jq.ts +1 -1
  502. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +3 -3
  503. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +3 -3
  504. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/src/file-write-lock.ts +70 -0
  505. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/src/replace-file.ts +50 -0
  506. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/src/resolver.ts +28 -8
  507. package/src/extensions/pi-agent-read/extensions/pi-agent-web/index.ts +3 -3
  508. package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +7 -7
  509. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/index.ts +1 -1
  510. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +2 -2
  511. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/src/html-converter.ts +1 -1
  512. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +3 -3
  513. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +3 -3
  514. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +3 -3
  515. package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/doctor-plugin.ts +1 -1
  516. package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/resolver.ts +1 -1
  517. package/src/extensions/pi-agent-read/index.ts +1 -1
  518. package/src/extensions/pi-agent-read/package.json +7 -7
  519. package/src/extensions/pi-agent-read/src/api/connect-plugin.ts +1 -1
  520. package/src/extensions/pi-agent-read/src/api/plugin-protocol.ts +1 -1
  521. package/src/extensions/pi-agent-read/src/api/read-parameters.ts +1 -1
  522. package/src/extensions/pi-agent-read/src/api/rendering.ts +2 -2
  523. package/src/extensions/pi-agent-read/src/api/tools/read.ts +8 -2
  524. package/src/extensions/pi-agent-read/src/core/extension.ts +4 -4
  525. package/src/extensions/pi-agent-read/src/core/read-core.ts +4 -4
  526. package/src/extensions/pi-agent-read/src/core/tools/read/output-truncation.ts +2 -2
  527. package/src/extensions/pi-agent-read/src/core/tools/read/persisted-result.ts +1 -1
  528. package/src/extensions/pi-agent-read/src/core/tools/read/raw-read.ts +3 -3
  529. package/src/extensions/pi-agent-read/src/core/tools/read/read-renderer.ts +4 -4
  530. package/src/extensions/pi-agent-read/src/core/tools/read/read-result.ts +21 -14
  531. package/src/extensions/pi-agent-read/src/core/tools/read/result-target.ts +24 -18
  532. package/src/extensions/pi-agent-read/src/core/tools/read/structured-result.ts +2 -2
  533. package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +44 -18
  534. package/src/extensions/pi-agent-search/index.ts +1 -1
  535. package/src/extensions/pi-agent-search/package.json +5 -5
  536. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +8 -8
  537. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +10 -10
  538. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/doctor-plugin.ts +1 -1
  539. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/file-search.ts +1 -1
  540. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/fuzzy-search.ts +2 -2
  541. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/persisted-result.ts +1 -1
  542. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/resolvers.ts +9 -9
  543. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/scoped-search.ts +4 -4
  544. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-backend.ts +3 -3
  545. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-presentation.ts +1 -1
  546. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-recipe.ts +2 -2
  547. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-renderer.ts +3 -3
  548. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-result.ts +2 -2
  549. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-session.ts +132 -67
  550. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/tool-file-search.ts +1 -1
  551. package/src/extensions/pi-agent-search/src/api/connect-plugin.ts +1 -1
  552. package/src/extensions/pi-agent-search/src/api/fuzzy.ts +2 -2
  553. package/src/extensions/pi-agent-search/src/api/plugin-protocol.ts +1 -1
  554. package/src/extensions/pi-agent-search/src/api/presentation.ts +1 -1
  555. package/src/extensions/pi-agent-search/src/api/search-scope.ts +1 -1
  556. package/src/extensions/pi-agent-search/src/api/search.ts +7 -7
  557. package/src/extensions/pi-agent-search/src/core/extension.ts +7 -7
  558. package/src/extensions/pi-agent-search/src/core/search-core.ts +3 -3
  559. package/src/extensions/pi-agent-text-editor/index.ts +5 -5
  560. package/src/extensions/pi-agent-text-editor/package.json +9 -9
  561. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/index.ts +1 -1
  562. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +3 -3
  563. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/index.ts +2 -2
  564. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +3 -3
  565. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/anchor.ts +63 -48
  566. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/recovery.ts +3 -3
  567. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/index.ts +2 -2
  568. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +5 -5
  569. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/src/read-handler.ts +23 -12
  570. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/index.ts +5 -5
  571. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +5 -5
  572. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-renderer.ts +3 -3
  573. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-viewport.ts +1 -1
  574. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/frozen-viewport.ts +2 -2
  575. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-panel.ts +4 -4
  576. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-projection.ts +2 -2
  577. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-result.ts +3 -3
  578. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/persisted-result.ts +2 -2
  579. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/render-resource.ts +1 -1
  580. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +7 -7
  581. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +5 -5
  582. package/src/extensions/pi-agent-text-editor/src/api/connect-plugin.ts +1 -1
  583. package/src/extensions/pi-agent-text-editor/src/api/edit-pipeline.ts +2 -2
  584. package/src/extensions/pi-agent-text-editor/src/api/file-operations.ts +2 -2
  585. package/src/extensions/pi-agent-text-editor/src/api/file-transfers.ts +1 -1
  586. package/src/extensions/pi-agent-text-editor/src/api/mutation-guard.ts +4 -4
  587. package/src/extensions/pi-agent-text-editor/src/api/mutation-result.ts +3 -3
  588. package/src/extensions/pi-agent-text-editor/src/api/mutation-tool.ts +2 -2
  589. package/src/extensions/pi-agent-text-editor/src/api/native-edit-batch-event.ts +1 -1
  590. package/src/extensions/pi-agent-text-editor/src/api/native-files.ts +1 -1
  591. package/src/extensions/pi-agent-text-editor/src/api/plugin-protocol.ts +14 -14
  592. package/src/extensions/pi-agent-text-editor/src/api/post-edit.ts +3 -3
  593. package/src/extensions/pi-agent-text-editor/src/api/tool-call-interceptor.ts +1 -1
  594. package/src/extensions/pi-agent-text-editor/src/api/tool-renderer.ts +2 -2
  595. package/src/extensions/pi-agent-text-editor/src/core/delete-policy.ts +3 -3
  596. package/src/extensions/pi-agent-text-editor/src/core/diff-tool.ts +3 -3
  597. package/src/extensions/pi-agent-text-editor/src/core/extension.ts +13 -13
  598. package/src/extensions/pi-agent-text-editor/src/core/file-operation-guards.ts +2 -2
  599. package/src/extensions/pi-agent-text-editor/src/core/file-operation-tools.ts +6 -6
  600. package/src/extensions/pi-agent-text-editor/src/core/file-operations.ts +5 -5
  601. package/src/extensions/pi-agent-text-editor/src/core/file-result-targets.ts +1 -1
  602. package/src/extensions/pi-agent-text-editor/src/core/file-transfers.ts +3 -3
  603. package/src/extensions/pi-agent-text-editor/src/core/image-write.ts +1 -1
  604. package/src/extensions/pi-agent-text-editor/src/core/mutation-result/agent-diff.ts +11 -6
  605. package/src/extensions/pi-agent-text-editor/src/core/mutation-result/diff.ts +213 -20
  606. package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +4 -4
  607. package/src/extensions/pi-agent-text-editor/src/core/mutation-result/final-state-fragment.ts +39 -3
  608. package/src/extensions/pi-agent-text-editor/src/core/mutation-result/grouped-replacements.ts +1 -1
  609. package/src/extensions/pi-agent-text-editor/src/core/mutation-result/inline-hints.ts +1 -1
  610. package/src/extensions/pi-agent-text-editor/src/core/mutation-result-targets.ts +6 -6
  611. package/src/extensions/pi-agent-text-editor/src/core/native-text-edit-batch.ts +22 -22
  612. package/src/extensions/pi-agent-text-editor/src/core/post-edit-scope.ts +1 -1
  613. package/src/extensions/pi-agent-text-editor/src/core/read-fragment-resolver.ts +3 -3
  614. package/src/extensions/pi-agent-text-editor/src/core/result-input.ts +1 -1
  615. package/src/extensions/pi-agent-text-editor/src/core/result-target-anchors.ts +2 -2
  616. package/src/extensions/pi-agent-text-editor/src/core/result-transfer.ts +4 -4
  617. package/src/extensions/pi-agent-text-editor/src/core/source-change-retry.ts +41 -0
  618. package/src/extensions/pi-agent-text-editor/src/core/structured-result.ts +2 -2
  619. package/src/extensions/pi-agent-text-editor/src/core/temporary-directories.ts +2 -2
  620. package/src/extensions/pi-agent-text-editor/src/core/text-anchor-recovery.ts +1 -1
  621. package/src/extensions/pi-agent-text-editor/src/core/text-anchor-registry.ts +3 -3
  622. package/src/extensions/pi-agent-text-editor/src/core/text-change-engine.ts +4 -7
  623. package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-coordinator.ts +2 -2
  624. package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-recovery.ts +2 -2
  625. package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +34 -21
  626. package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch.ts +4 -4
  627. package/src/extensions/pi-agent-text-editor/src/core/text-edit-origin.ts +1 -1
  628. package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +72 -30
  629. package/src/extensions/pi-agent-text-editor/src/core/text-mutation-anchor-error.ts +1 -1
  630. package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +211 -159
  631. package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +4 -4
  632. package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts +1 -1
  633. package/src/extensions/pi-agent-text-editor/src/core/write-agent-result.ts +3 -3
  634. package/src/extensions/pi-agent-text-editor/src/tools/extension.ts +7 -7
  635. package/src/extensions/pi-agent-text-editor/src/tools/text-selection.ts +2 -2
  636. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-copy.ts +4 -4
  637. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-delete.ts +4 -4
  638. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-insert.ts +3 -3
  639. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-move.ts +5 -5
  640. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +4 -4
  641. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-write.ts +1 -1
  642. package/src/index.ts +1 -1
  643. package/src/pi-agent-ide.ts +22 -20
  644. package/src/plugins/pi-agent-ide-ast/index.ts +1 -1
  645. package/src/plugins/pi-agent-ide-ast/package.json +13 -13
  646. package/src/plugins/pi-agent-ide-ast/src/api/scope.ts +1 -1
  647. package/src/plugins/pi-agent-ide-ast/src/ast/manager.ts +33 -11
  648. package/src/plugins/pi-agent-ide-ast/src/ast/native-parser.ts +1 -1
  649. package/src/plugins/pi-agent-ide-ast/src/ast/outline.ts +60 -55
  650. package/src/plugins/pi-agent-ide-ast/src/doctor-plugin.ts +4 -3
  651. package/src/plugins/pi-agent-ide-ast/src/extension.ts +10 -10
  652. package/src/plugins/pi-agent-ide-ast/src/outline-resolver.ts +3 -3
  653. package/src/plugins/pi-agent-ide-ast/src/overflow-handler.ts +1 -1
  654. package/src/plugins/pi-agent-ide-ast/src/scope-handler.ts +35 -8
  655. package/src/plugins/pi-agent-ide-ast/src/scope-resolver.ts +1 -1
  656. package/src/plugins/pi-agent-ide-ast/src/search-resolver.ts +161 -23
  657. package/src/plugins/pi-agent-ide-ast/src/tool-ast-search.ts +1 -1
  658. package/src/plugins/pi-agent-ide-changes/index.ts +9 -9
  659. package/src/plugins/pi-agent-ide-changes/package.json +8 -8
  660. package/src/plugins/pi-agent-ide-changes/src/change-anchor.ts +4 -4
  661. package/src/plugins/pi-agent-ide-changes/src/changes/change-groups.ts +1 -1
  662. package/src/plugins/pi-agent-ide-changes/src/changes/change-service.ts +4 -4
  663. package/src/plugins/pi-agent-ide-changes/src/changes/git-changes-backend.ts +1 -1
  664. package/src/plugins/pi-agent-ide-changes/src/current-change-presenter.ts +4 -4
  665. package/src/plugins/pi-agent-ide-changes/src/tool-index-change.ts +5 -5
  666. package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +6 -6
  667. package/src/plugins/pi-agent-ide-debugger/index.ts +21 -13
  668. package/src/plugins/pi-agent-ide-debugger/src/breakpoint-view.ts +1 -1
  669. package/src/plugins/pi-agent-ide-debugger/src/doctor-plugin.ts +4 -4
  670. package/src/plugins/pi-agent-ide-debugger/src/java-runtime.ts +2 -2
  671. package/src/plugins/pi-agent-ide-debugger/src/process-provider.ts +3 -3
  672. package/src/plugins/pi-agent-ide-debugger/src/renderer.ts +1 -1
  673. package/src/plugins/pi-agent-ide-debugger/src/session-manager.ts +5 -5
  674. package/src/plugins/pi-agent-ide-debugger/src/ui.ts +1 -1
  675. package/src/plugins/pi-agent-ide-debugger/src/vscode-backend.ts +1 -1
  676. package/src/plugins/pi-agent-ide-debugger/src/workspace-owner.ts +2 -2
  677. package/src/plugins/pi-agent-ide-diagnostics/index.ts +1 -1
  678. package/src/plugins/pi-agent-ide-formatter/index.ts +5 -5
  679. package/src/plugins/pi-agent-ide-formatter/package.json +3 -3
  680. package/src/plugins/pi-agent-ide-formatter/src/doctor-plugin.ts +2 -2
  681. package/src/plugins/pi-agent-ide-formatter/src/formatter.ts +2 -2
  682. package/src/plugins/pi-agent-ide-formatter/src/registry.ts +1 -1
  683. package/src/plugins/pi-agent-ide-languages/index.ts +1 -1
  684. package/src/plugins/pi-agent-ide-languages/package.json +2 -2
  685. package/src/plugins/pi-agent-ide-lint/index.ts +9 -9
  686. package/src/plugins/pi-agent-ide-lint/package.json +7 -7
  687. package/src/plugins/pi-agent-ide-lint/src/catalog.ts +4 -0
  688. package/src/plugins/pi-agent-ide-lint/src/command-linter.ts +15 -6
  689. package/src/plugins/pi-agent-ide-lint/src/diagnostics.ts +8 -14
  690. package/src/plugins/pi-agent-ide-lint/src/doctor-plugin.ts +3 -3
  691. package/src/plugins/pi-agent-ide-lint/src/registry.ts +1 -1
  692. package/src/plugins/pi-agent-ide-lsp/index.ts +37 -16
  693. package/src/plugins/pi-agent-ide-lsp/package.json +12 -12
  694. package/src/plugins/pi-agent-ide-lsp/src/catalog.ts +12 -1
  695. package/src/plugins/pi-agent-ide-lsp/src/declaration-targets.ts +21 -14
  696. package/src/plugins/pi-agent-ide-lsp/src/diagnostic-source.ts +63 -20
  697. package/src/plugins/pi-agent-ide-lsp/src/doctor-plugin.ts +4 -4
  698. package/src/plugins/pi-agent-ide-lsp/src/idle-timeout.ts +15 -0
  699. package/src/plugins/pi-agent-ide-lsp/src/lsp/abort.ts +11 -0
  700. package/src/plugins/pi-agent-ide-lsp/src/lsp/client.ts +434 -80
  701. package/src/plugins/pi-agent-ide-lsp/src/lsp/code-views.ts +121 -35
  702. package/src/plugins/pi-agent-ide-lsp/src/lsp/diagnostic-adapters.ts +1 -1
  703. package/src/plugins/pi-agent-ide-lsp/src/lsp/diagnostics.ts +26 -12
  704. package/src/plugins/pi-agent-ide-lsp/src/lsp/document-leases.ts +31 -0
  705. package/src/plugins/pi-agent-ide-lsp/src/lsp/errors.ts +4 -0
  706. package/src/plugins/pi-agent-ide-lsp/src/lsp/file-watchers.ts +1 -77
  707. package/src/plugins/pi-agent-ide-lsp/src/lsp/index.ts +19 -19
  708. package/src/plugins/pi-agent-ide-lsp/src/lsp/language-map.ts +1 -1
  709. package/src/plugins/pi-agent-ide-lsp/src/lsp/lsp-compiler.ts +5 -4
  710. package/src/plugins/pi-agent-ide-lsp/src/lsp/manager.ts +59 -28
  711. package/src/plugins/pi-agent-ide-lsp/src/lsp/navigation.ts +42 -22
  712. package/src/plugins/pi-agent-ide-lsp/src/lsp/owner-transport.ts +1 -1
  713. package/src/plugins/pi-agent-ide-lsp/src/lsp/position-map.ts +52 -0
  714. package/src/plugins/pi-agent-ide-lsp/src/lsp/project.ts +1 -1
  715. package/src/plugins/pi-agent-ide-lsp/src/lsp/registry.ts +2 -2
  716. package/src/plugins/pi-agent-ide-lsp/src/lsp/rename.ts +2 -2
  717. package/src/plugins/pi-agent-ide-lsp/src/lsp/server-request-handlers.mjs +325 -0
  718. package/src/plugins/pi-agent-ide-lsp/src/lsp/shared-server-host.mjs +797 -0
  719. package/src/plugins/pi-agent-ide-lsp/src/lsp/shared-servers.ts +322 -0
  720. package/src/plugins/pi-agent-ide-lsp/src/lsp/source-changes.ts +29 -0
  721. package/src/plugins/pi-agent-ide-lsp/src/lsp/symbol-search.ts +76 -17
  722. package/src/plugins/pi-agent-ide-lsp/src/lsp/symbols.ts +3 -3
  723. package/src/plugins/pi-agent-ide-lsp/src/lsp/workspace-owner.ts +1 -1
  724. package/src/plugins/pi-agent-ide-lsp/src/manager-provider.ts +1 -1
  725. package/src/plugins/pi-agent-ide-lsp/src/rename-plan.ts +16 -8
  726. package/src/plugins/pi-agent-ide-lsp/src/search-resolver.ts +149 -134
  727. package/src/plugins/pi-agent-ide-lsp/src/tool-lsp-search.ts +1 -1
  728. package/src/plugins/pi-agent-ide-processes/index.ts +4 -4
  729. package/src/plugins/pi-agent-ide-processes/src/ui.ts +1 -1
  730. package/src/plugins/pi-agent-ide-semantic/src/vera-backend.ts +2 -2
  731. package/src/plugins/pi-agent-ide-terminal/index.ts +17 -17
  732. package/src/plugins/pi-agent-ide-terminal/src/origin.ts +1 -1
  733. package/src/plugins/pi-agent-ide-terminal/src/output-limits.ts +1 -1
  734. package/src/plugins/pi-agent-ide-terminal/src/process-provider.ts +3 -3
  735. package/src/plugins/pi-agent-ide-terminal/src/renderer.ts +3 -3
  736. package/src/plugins/pi-agent-ide-terminal/src/resources.ts +5 -5
  737. package/src/plugins/pi-agent-ide-terminal/src/screen-image.ts +1 -1
  738. package/src/plugins/pi-agent-ide-terminal/src/search.ts +2 -2
  739. package/src/plugins/pi-agent-ide-terminal/src/session-manager.ts +3 -3
  740. package/src/plugins/pi-agent-ide-terminal/src/shell-profile.ts +1 -1
  741. package/src/plugins/pi-agent-ide-terminal/src/shell-result.ts +1 -1
  742. package/src/plugins/pi-agent-ide-terminal/src/tools.ts +9 -9
  743. package/src/plugins/pi-agent-ide-terminal/src/types.ts +1 -1
  744. package/src/plugins/pi-agent-ide-terminal/src/ui.ts +3 -3
  745. package/src/post-edit/gate.ts +1 -1
  746. package/src/semantic/extension.ts +2 -2
  747. package/src/semantic/index.ts +4 -4
  748. package/src/standalone/resource-host.ts +13 -13
  749. package/src/standalone/scoped-api.ts +2 -2
  750. package/src/tips/core.ts +1 -1
  751. package/src/tips/extension.ts +6 -6
  752. package/src/tips/setup-hint.ts +1 -1
  753. package/src/toolchain/diagnostic.ts +1 -1
  754. package/src/toolchain/registry.ts +1 -1
  755. package/dist/chunk-2AY526TN.js +0 -3
  756. package/dist/chunk-52PFWQMU.js +0 -5
  757. package/dist/chunk-57F5GTHO.js +0 -1
  758. package/dist/chunk-5S74Z6Y4.js +0 -7
  759. package/dist/chunk-7D7PXIVV.js +0 -1
  760. package/dist/chunk-BT2CFM7D.js +0 -11
  761. package/dist/chunk-C2JT2G5K.js +0 -1
  762. package/dist/chunk-DEWWWKUF.js +0 -6
  763. package/dist/chunk-FEZLTM4L.js +0 -1
  764. package/dist/chunk-G4PRFO6G.js +0 -1
  765. package/dist/chunk-H5Z54BEU.js +0 -25
  766. package/dist/chunk-HISGZD3C.js +0 -81
  767. package/dist/chunk-HRBUY2FF.js +0 -4
  768. package/dist/chunk-ICIRQLZ4.js +0 -23
  769. package/dist/chunk-LIQ4BVOB.js +0 -1
  770. package/dist/chunk-LXDF2NWX.js +0 -1
  771. package/dist/chunk-MDD5ORB6.js +0 -1
  772. package/dist/chunk-OJEIX7OZ.js +0 -1
  773. package/dist/chunk-S5PL5DFQ.js +0 -1
  774. package/dist/chunk-U7YDLVFL.js +0 -1
  775. package/dist/chunk-VDJSH3DQ.js +0 -2
  776. package/dist/chunk-XH5WN5XA.js +0 -2
@@ -1,7 +1,7 @@
1
- import type { LspWorkspaceOwner } from "#src/plugins/pi-agent-ide-lsp/index.js";
2
- import type { SshBackendRegistry } from "./registry.js";
3
- import { SshBackendError } from "./ssh.js";
4
- import { createSshLspTransport } from "./lsp-transport.js";
1
+ import type { LspWorkspaceOwner } from "#src/plugins/pi-agent-ide-lsp/index.ts";
2
+ import type { SshBackendRegistry } from "./registry.ts";
3
+ import { SshBackendError } from "./ssh.ts";
4
+ import { createSshLspTransport } from "./lsp-transport.ts";
5
5
 
6
6
  /** Workspace reads, marker checks and stdio remain on their configured SSH owner. */
7
7
  export function createSshLspWorkspaceOwner(registry: SshBackendRegistry): LspWorkspaceOwner {
@@ -10,11 +10,11 @@ import {
10
10
  type FileOperationResult,
11
11
  type FileTransferEndpoint,
12
12
  } from "pi-agent-text-editor/api/plugin-protocol";
13
- import type { ResolvedSshSource, SshBackendRegistry } from "./registry.js";
14
- import { remoteLocation } from "./identity.js";
15
- import { localTransferSource, transferFile } from "./file-transfer.js";
16
- import { checkCapturedRevision } from "./file-revision.js";
17
- import { SshBackendError } from "./ssh.js";
13
+ import type { ResolvedSshSource, SshBackendRegistry } from "./registry.ts";
14
+ import { remoteLocation } from "./identity.ts";
15
+ import { localTransferSource, transferFile } from "./file-transfer.ts";
16
+ import { checkCapturedRevision } from "./file-revision.ts";
17
+ import { SshBackendError } from "./ssh.ts";
18
18
 
19
19
  interface Endpoint extends FileTransferEndpoint {
20
20
  readonly remote?: ResolvedSshSource;
@@ -1,5 +1,5 @@
1
- import { startSshProcess, type SshProcessChannel } from "./ssh-channel.js";
2
- import { SshBackendError, type SshTarget } from "./ssh.js";
1
+ import { startSshProcess, type SshProcessChannel } from "./ssh-channel.ts";
2
+ import { SshBackendError, type SshTarget } from "./ssh.ts";
3
3
 
4
4
  /** Bounds for one owned, buffered command. Both output streams share the byte budget. */
5
5
  export interface OwnedCommandOptions {
@@ -1,7 +1,7 @@
1
- import { findSshProcessMetadata } from "./process-metadata.js";
2
- import type { SshBackendRegistry } from "./registry.js";
3
- import type { SshProcessChannel } from "./ssh-channel.js";
4
- import { SshBackendError } from "./ssh.js";
1
+ import { findSshProcessMetadata } from "./process-metadata.ts";
2
+ import type { SshBackendRegistry } from "./registry.ts";
3
+ import type { SshProcessChannel } from "./ssh-channel.ts";
4
+ import { SshBackendError } from "./ssh.ts";
5
5
 
6
6
  /** Stop an owned service; after carrier loss, confirm its exact native identity through a new connection.
7
7
  * Only native absence or PID reuse proves the original process is gone. Never signal a replacement.
@@ -1,5 +1,5 @@
1
- import { runOwnedSshCommand } from "./owned-command.js";
2
- import type { SshTarget } from "./ssh.js";
1
+ import { runOwnedSshCommand } from "./owned-command.ts";
2
+ import type { SshTarget } from "./ssh.ts";
3
3
 
4
4
  /** Bounds for one owned, buffered read service. Both output streams share the byte budget. */
5
5
  export interface OwnedReadCommandOptions {
@@ -1,6 +1,6 @@
1
1
  import path from "node:path";
2
- import type { SshBackend } from "./ssh.js";
3
- import { SshBackendError } from "./ssh.js";
2
+ import type { SshBackend } from "./ssh.ts";
3
+ import { SshBackendError } from "./ssh.ts";
4
4
 
5
5
  /** Read only remote PATH and prepend the existing project executable directories. */
6
6
  export async function sshProjectEnvironment(
@@ -1,8 +1,8 @@
1
1
  import { readFile } from "node:fs/promises";
2
2
  import { Type, type Static } from "typebox";
3
3
  import { Value } from "typebox/value";
4
- import type { SshBackendRegistry } from "./registry.js";
5
- import { SshBackendError } from "./ssh.js";
4
+ import type { SshBackendRegistry } from "./registry.ts";
5
+ import { SshBackendError } from "./ssh.ts";
6
6
 
7
7
  const rowSchema = Type.Object({
8
8
  pid: Type.Integer({ minimum: 1 }),
@@ -4,8 +4,8 @@ import { Type } from "typebox";
4
4
  import { Value } from "typebox/value";
5
5
  import type { ToolRecipe } from "pi-agent-doctor/api/catalog";
6
6
  import { inspectRecipeEvidence, type RecipeEvidence } from "pi-agent-doctor/api/evidence";
7
- import type { SshBackend } from "./ssh.js";
8
- import { SshBackendError } from "./ssh.js";
7
+ import type { SshBackend } from "./ssh.ts";
8
+ import { SshBackendError } from "./ssh.ts";
9
9
 
10
10
  const snapshotSchema = Type.Object({
11
11
  content: Type.Record(Type.String(), Type.Union([Type.String(), Type.Null()])),
@@ -1,8 +1,8 @@
1
- import { connectIdePlugin } from "#src/api/connect-plugin.js";
2
- import { IDE_PROTOCOL, IDE_API_VERSION } from "#src/api/plugin-protocol.js";
1
+ import { connectIdePlugin } from "#src/api/connect-plugin.ts";
2
+ import { IDE_PROTOCOL, IDE_API_VERSION } from "#src/api/plugin-protocol.ts";
3
3
  import { connectSearchPlugin } from "pi-agent-search/api/connect-plugin";
4
4
  import { SEARCH_API_VERSION, SEARCH_PROTOCOL } from "pi-agent-search/api/plugin-protocol";
5
- import { createSshSearchEnvironmentProvider } from "./search-environment.js";
5
+ import { createSshSearchEnvironmentProvider } from "./search-environment.ts";
6
6
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
7
7
  import { connectReadPlugin } from "pi-agent-read/api/connect-plugin";
8
8
  import {
@@ -20,11 +20,11 @@ import {
20
20
  type TextEditorPlugin,
21
21
  } from "pi-agent-text-editor/api/plugin-protocol";
22
22
 
23
- import { createSshFileOperationResolver } from "./file-operation-resolver.js";
24
- import { remoteLocation } from "./identity.js";
25
- import { SshBackendRegistry } from "./registry.js";
26
- import { createSshResourceResolver } from "./resource-resolver.js";
27
- import type { SshTarget } from "./ssh.js";
23
+ import { createSshFileOperationResolver } from "./file-operation-resolver.ts";
24
+ import { remoteLocation } from "./identity.ts";
25
+ import { SshBackendRegistry } from "./registry.ts";
26
+ import { createSshResourceResolver } from "./resource-resolver.ts";
27
+ import type { SshTarget } from "./ssh.ts";
28
28
 
29
29
  /** Connect explicitly configured targets to the existing tools, without startup connections. */
30
30
  export async function registerSshResources(
@@ -1,5 +1,5 @@
1
- import { resolveRemoteLocation, type RemoteLocation } from "./identity.js";
2
- import { SshBackend, SshBackendError, type SshTarget } from "./ssh.js";
1
+ import { resolveRemoteLocation, type RemoteLocation } from "./identity.ts";
2
+ import { SshBackend, SshBackendError, type SshTarget } from "./ssh.ts";
3
3
 
4
4
  /** A canonical remote source and the explicitly configured transport that owns it. */
5
5
  export interface ResolvedSshSource {
@@ -7,8 +7,8 @@ import type {
7
7
  } from "pi-agent-resource";
8
8
  import { textFromAgentContent } from "pi-agent-text";
9
9
 
10
- import type { SshBackendRegistry } from "./registry.js";
11
- import { SshBackendError } from "./ssh.js";
10
+ import type { SshBackendRegistry } from "./registry.ts";
11
+ import { SshBackendError } from "./ssh.ts";
12
12
 
13
13
  /** Bridge configured SSH targets to existing content hosts and read/editor resolver registries. */
14
14
  export function createSshResourceResolver(
@@ -1,9 +1,9 @@
1
1
  import path from "node:path";
2
2
  import { StringDecoder } from "node:string_decoder";
3
3
  import type { SearchEnvironmentProvider } from "pi-agent-search/api/search";
4
- import { remoteLocation } from "./identity.js";
5
- import type { SshBackendRegistry } from "./registry.js";
6
- import { SshBackendError } from "./ssh.js";
4
+ import { remoteLocation } from "./identity.ts";
5
+ import type { SshBackendRegistry } from "./registry.ts";
6
+ import { SshBackendError } from "./ssh.ts";
7
7
 
8
8
  /** Adapt configured SSH scopes to the existing search recipes, without startup probes. */
9
9
  export function createSshSearchEnvironmentProvider(
@@ -3,14 +3,14 @@ import { PassThrough, type Readable } from "node:stream";
3
3
  import { Type, type Static } from "typebox";
4
4
  import { Value } from "typebox/value";
5
5
 
6
- import { remoteLocation } from "./identity.js";
7
- import { SshBackendError, type SshTarget, type BackendOperationContext } from "./ssh.js";
6
+ import { remoteLocation } from "./identity.ts";
7
+ import { SshBackendError, type SshTarget, type BackendOperationContext } from "./ssh.ts";
8
8
  import {
9
9
  sshFailureCode,
10
10
  sshWorkerCommand,
11
11
  systemSshArguments,
12
12
  validateSshTarget,
13
- } from "./ssh-transport.js";
13
+ } from "./ssh-transport.ts";
14
14
 
15
15
  const frameSchema = Type.Union([
16
16
  Type.Object({
@@ -1,6 +1,6 @@
1
1
  import { readFile } from "node:fs/promises";
2
- import type { SshTarget } from "./ssh.js";
3
- import { remoteLocation } from "./identity.js";
2
+ import type { SshTarget } from "./ssh.ts";
3
+ import { remoteLocation } from "./identity.ts";
4
4
 
5
5
  /** Validate configured aliases without reading credentials or probing the host. */
6
6
  export function validateSshTarget(target: SshTarget): void {
@@ -4,9 +4,9 @@ import type { FileObjectSnapshot } from "pi-agent-text-editor/api/plugin-protoco
4
4
  import { Type, type Static, type TSchema } from "typebox";
5
5
  import { Value } from "typebox/value";
6
6
 
7
- import { remoteLocation } from "./identity.js";
8
- import type { SshProcessChannel, SshProcessContext } from "./ssh-channel.js";
9
- import { sshWorkerProgram, validateSshTarget } from "./ssh-transport.js";
7
+ import { remoteLocation } from "./identity.ts";
8
+ import type { SshProcessChannel, SshProcessContext } from "./ssh-channel.ts";
9
+ import { sshWorkerProgram, validateSshTarget } from "./ssh-transport.ts";
10
10
 
11
11
  /** One explicitly configured host alias. Authentication stays in the user's OpenSSH environment. */
12
12
  export interface SshTarget {
@@ -510,7 +510,7 @@ export class SshBackend {
510
510
  cwd: string,
511
511
  context: BackendOperationContext = {},
512
512
  ) {
513
- const { runOwnedSshCommand } = await import("./owned-command.js");
513
+ const { runOwnedSshCommand } = await import("./owned-command.ts");
514
514
  return runOwnedSshCommand(
515
515
  { ...this.target, workspace: cwd },
516
516
  command,
@@ -534,7 +534,7 @@ export class SshBackend {
534
534
  cwd: string,
535
535
  context: SshProcessContext = {},
536
536
  ): Promise<SshProcessChannel> {
537
- const { startSshProcess } = await import("./ssh-channel.js");
537
+ const { startSshProcess } = await import("./ssh-channel.ts");
538
538
  return startSshProcess(this.target, command, args, cwd, context);
539
539
  }
540
540
 
@@ -568,7 +568,7 @@ export class SshBackend {
568
568
  if (!Number.isFinite(deadline) || deadline <= 0)
569
569
  throw new TypeError("SSH operation deadline must be positive");
570
570
  context.signal?.throwIfAborted();
571
- const { runOwnedSshCommand } = await import("./owned-command.js");
571
+ const { runOwnedSshCommand } = await import("./owned-command.ts");
572
572
  const program = await sshWorkerProgram(new URL("./ssh-worker.py", import.meta.url));
573
573
  // Filesystem operands are absolute. A neutral existing cwd must not turn the workspace
574
574
  // into a sandbox or prevent creation beneath a missing parent.
@@ -1,8 +1,8 @@
1
1
  import path from "node:path";
2
- import type { ToolConfigLayerAccess } from "#src/api/tool-config.js";
3
- import { remoteLocation } from "./identity.js";
4
- import type { SshBackendRegistry } from "./registry.js";
5
- import { SshBackendError } from "./ssh.js";
2
+ import type { ToolConfigLayerAccess } from "#src/api/tool-config.ts";
3
+ import { remoteLocation } from "./identity.ts";
4
+ import type { SshBackendRegistry } from "./registry.ts";
5
+ import { SshBackendError } from "./ssh.ts";
6
6
 
7
7
  /** Read project and user-global tool settings on the selected target; no startup connection. */
8
8
  export function createSshToolConfigAccess(
@@ -1,10 +1,10 @@
1
1
  import path from "node:path";
2
2
  import type { ToolRecipe } from "pi-agent-doctor/api/catalog";
3
- import { recipeMatchesFile, type ToolConfigName } from "#src/api/tool-config.js";
4
- import type { SshBackend } from "./ssh.js";
5
- import { SshBackendError } from "./ssh.js";
6
- import { remoteLocation } from "./identity.js";
7
- import { inspectSshRecipeEvidence } from "./recipe-evidence.js";
3
+ import { recipeMatchesFile, type ToolConfigName } from "#src/api/tool-config.ts";
4
+ import type { SshBackend } from "./ssh.ts";
5
+ import { SshBackendError } from "./ssh.ts";
6
+ import { remoteLocation } from "./identity.ts";
7
+ import { inspectSshRecipeEvidence } from "./recipe-evidence.ts";
8
8
 
9
9
  /** Resolve an SSH file or directory's native project; an explicit current project keeps its context. */
10
10
  export async function resolveSshToolProject(
@@ -4,9 +4,9 @@ import { Value } from "typebox/value";
4
4
  import type {
5
5
  BrowserLoadOptions,
6
6
  BrowserPageSnapshot,
7
- } from "#src/extensions/pi-agent-read/extensions/pi-agent-web/src/browser-loader.js";
8
- import { readOwnedSshCommand } from "./owned-read-command.js";
9
- import { SshBackendError, type SshTarget } from "./ssh.js";
7
+ } from "#src/extensions/pi-agent-read/extensions/pi-agent-web/src/browser-loader.ts";
8
+ import { readOwnedSshCommand } from "./owned-read-command.ts";
9
+ import { SshBackendError, type SshTarget } from "./ssh.ts";
10
10
 
11
11
  const pageSchema = Type.Object({ html: Type.String(), source: Type.String() });
12
12
  const refusalCodes = new Set([
@@ -1,8 +1,8 @@
1
1
  import { readFile } from "node:fs/promises";
2
2
  import { Type } from "typebox";
3
3
  import { Value } from "typebox/value";
4
- import { SshBackendError, type SshTarget } from "./ssh.js";
5
- import { readOwnedSshCommand } from "./owned-read-command.js";
4
+ import { SshBackendError, type SshTarget } from "./ssh.ts";
5
+ import { readOwnedSshCommand } from "./owned-read-command.ts";
6
6
 
7
7
  const responseSchema = Type.Object({
8
8
  url: Type.String(),
@@ -1,9 +1,9 @@
1
1
  import type { ContentHost, ResourceResolver } from "pi-agent-resource";
2
- import { createWebResolver } from "#src/extensions/pi-agent-read/extensions/pi-agent-web/src/resolver.js";
3
- import { SshBackendError } from "./ssh.js";
4
- import type { SshBackendRegistry } from "./registry.js";
5
- import { fetchSshWebResponse } from "./web-http.js";
6
- import { readSshBrowserPage } from "./web-browser.js";
2
+ import { createWebResolver } from "#src/extensions/pi-agent-read/extensions/pi-agent-web/src/resolver.ts";
3
+ import { SshBackendError } from "./ssh.ts";
4
+ import type { SshBackendRegistry } from "./registry.ts";
5
+ import { fetchSshWebResponse } from "./web-http.ts";
6
+ import { readSshBrowserPage } from "./web-browser.ts";
7
7
 
8
8
  /** An explicit target web source; the nested HTTP(S) URL retains its query and fragment. */
9
9
  export function parseSshWebSource(
@@ -1,9 +1,9 @@
1
1
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
- import { registerWebWithOwner } from "#src/extensions/pi-agent-read/extensions/pi-agent-web/index.js";
3
- import { resolvePiAgentIdeExtensionsConfigPaths } from "#src/composite/extensions-config.js";
4
- import { readSshTargets, resolveSshConfigPaths } from "./config.js";
5
- import { SshBackendRegistry } from "./registry.js";
6
- import { createSshWebResolver } from "./web-owner.js";
2
+ import { registerWebWithOwner } from "#src/extensions/pi-agent-read/extensions/pi-agent-web/index.ts";
3
+ import { resolvePiAgentIdeExtensionsConfigPaths } from "#src/composite/extensions-config.ts";
4
+ import { readSshTargets, resolveSshConfigPaths } from "./config.ts";
5
+ import { SshBackendRegistry } from "./registry.ts";
6
+ import { createSshWebResolver } from "./web-owner.ts";
7
7
 
8
8
  /** Register explicit target web reads without changing the egress of ordinary URLs. */
9
9
  export default async function registerOwnedWeb(pi: ExtensionAPI): Promise<void> {
@@ -8,9 +8,9 @@ import {
8
8
  TEXT_EDITOR_PROTOCOL,
9
9
  } from "pi-agent-text-editor/api/plugin-protocol";
10
10
  import { afterPostEditScope } from "pi-agent-text-editor/api/post-edit";
11
- import { readReviewRules, REVIEW_RULES_PATH } from "./config.js";
12
- import { createCodeReview } from "./reviewer.js";
13
- import { createLiveFeatureFlag } from "#src/core/live-feature-flag.js";
11
+ import { readReviewRules, REVIEW_RULES_PATH } from "./config.ts";
12
+ import { createCodeReview } from "./reviewer.ts";
13
+ import { createLiveFeatureFlag } from "#src/core/live-feature-flag.ts";
14
14
 
15
15
  /** Connect optional background review and independently gated rule-capture guidance. */
16
16
  export default async function registerCodeReview(pi: ExtensionAPI): Promise<void> {
@@ -6,8 +6,8 @@ import type {
6
6
  ClassifierResult,
7
7
  ModelsClassifierOptions,
8
8
  } from "@earendil-works/pi-ai";
9
- import type { ReviewRule } from "./config.js";
10
- import { reviewFragments } from "./fragments.js";
9
+ import type { ReviewRule } from "./config.ts";
10
+ import { reviewFragments } from "./fragments.ts";
11
11
 
12
12
  /** Use Pi's authenticated classifier runtime, never a separate provider client. */
13
13
  export interface ReviewRuntime {
@@ -1,9 +1,9 @@
1
- import { resolveCodeViewPath } from "./reference.js";
1
+ import { resolveCodeViewPath } from "./reference.ts";
2
2
 
3
- import { formatDiagnostic } from "#src/toolchain/diagnostic.js";
3
+ import { formatDiagnostic } from "#src/toolchain/diagnostic.ts";
4
4
 
5
- import type { Diagnostic } from "#src/toolchain/types.js";
6
- import type { SourceMappedTextContent } from "./source-view.js";
5
+ import type { Diagnostic } from "#src/toolchain/types.ts";
6
+ import type { SourceMappedTextContent } from "./source-view.ts";
7
7
  import type { TextDocument, TextSourceLine } from "pi-agent-text";
8
8
 
9
9
  /** Diagnostics produced by one named source such as `lsp` or `lint`. */
@@ -1,151 +1,151 @@
1
- import type { BuiltinExtension } from "#src/composite/selection.js";
2
- import { moduleLabels } from "./module-labels.js";
1
+ import type { BuiltinExtension } from "#src/composite/selection.ts";
2
+ import { moduleLabels } from "./module-labels.ts";
3
3
 
4
4
  /**
5
5
  * Built-ins in their established registration order. Loading the catalog does not
6
6
  * import plugin code; only selected registrations load their modules.
7
7
  */
8
8
  export const BUILTIN_EXTENSIONS: readonly BuiltinExtension[] = [
9
- builtin("ide.core", () => import("#src/core/extension.js")),
10
- builtin("ide.tips", () => import("#src/tips/extension.js")),
11
- builtin("ide.doctor", () => import("#src/backend/doctor-registration.js")),
12
- builtin("ide.languages", () => import("#src/plugins/pi-agent-ide-languages/index.js"), [
9
+ builtin("ide.core", () => import("#src/core/extension.ts")),
10
+ builtin("ide.tips", () => import("#src/tips/extension.ts")),
11
+ builtin("ide.doctor", () => import("#src/backend/doctor-registration.ts")),
12
+ builtin("ide.languages", () => import("#src/plugins/pi-agent-ide-languages/index.ts"), [
13
13
  "ide.doctor",
14
14
  ]),
15
- builtin("read.core", () => import("#src/extensions/pi-agent-read/index.js")),
15
+ builtin("read.core", () => import("#src/extensions/pi-agent-read/index.ts")),
16
16
  builtin(
17
17
  "ide.documentation",
18
18
  async () => {
19
- const { default: register } = await import("#src/documentation/extension.js");
19
+ const { default: register } = await import("#src/documentation/extension.ts");
20
20
  return { default: (pi) => register(pi) };
21
21
  },
22
22
  ["read.core"],
23
23
  ),
24
24
  builtin(
25
25
  "read.filesystem",
26
- () => import("#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/index.js"),
26
+ () => import("#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/index.ts"),
27
27
  ["read.core", "editor.core"],
28
28
  ),
29
- builtin("read.ssh", () => import("#src/backend/index.js"), ["read.filesystem"]),
29
+ builtin("read.ssh", () => import("#src/backend/index.ts"), ["read.filesystem"]),
30
30
  builtin(
31
31
  "read.filesystem.jq",
32
32
  () =>
33
- import("#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/index.js"),
33
+ import("#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/index.ts"),
34
34
  ["read.filesystem", "ide.documentation", "ide.doctor"],
35
35
  ),
36
36
  builtin(
37
37
  "read.filesystem.image",
38
38
  () =>
39
- import("#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/index.js"),
39
+ import("#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/index.ts"),
40
40
  ["read.filesystem"],
41
41
  ),
42
42
  builtin(
43
43
  "read.filesystem.pdf",
44
44
  () =>
45
- import("#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/index.js"),
45
+ import("#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/index.ts"),
46
46
  ["read.filesystem"],
47
47
  ),
48
48
  builtin(
49
49
  "read.filesystem.text",
50
50
  () =>
51
- import("#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/index.js"),
51
+ import("#src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/index.ts"),
52
52
  ["read.filesystem"],
53
53
  ),
54
- builtin("read.web", () => import("#src/backend/web-registration.js"), ["read.core"]),
54
+ builtin("read.web", () => import("#src/backend/web-registration.ts"), ["read.core"]),
55
55
  builtin(
56
56
  "read.web.html",
57
57
  () =>
58
- import("#src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/index.js"),
58
+ import("#src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/index.ts"),
59
59
  ["read.web"],
60
60
  ),
61
61
  builtin(
62
62
  "read.web.image",
63
63
  () =>
64
- import("#src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/index.js"),
64
+ import("#src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/index.ts"),
65
65
  ["read.web"],
66
66
  ),
67
67
  builtin(
68
68
  "read.web.pdf",
69
69
  () =>
70
- import("#src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/index.js"),
70
+ import("#src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/index.ts"),
71
71
  ["read.web"],
72
72
  ),
73
73
  builtin(
74
74
  "read.web.text",
75
75
  () =>
76
- import("#src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/index.js"),
76
+ import("#src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/index.ts"),
77
77
  ["read.web"],
78
78
  ),
79
- builtin("search.core", () => import("#src/extensions/pi-agent-search/index.js")),
80
- builtin("search.semantic", () => import("#src/semantic/index.js"), ["search.core"]),
79
+ builtin("search.core", () => import("#src/extensions/pi-agent-search/index.ts")),
80
+ builtin("search.semantic", () => import("#src/semantic/index.ts"), ["search.core"]),
81
81
  builtin(
82
82
  "search.text",
83
- () => import("#src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.js"),
83
+ () => import("#src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts"),
84
84
  ["search.core"],
85
85
  ),
86
86
  builtin(
87
87
  "editor.renderer",
88
88
  () =>
89
- import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/index.js"),
89
+ import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/index.ts"),
90
90
  ["editor.core"],
91
91
  ),
92
- builtin("editor.core", () => import("#src/extensions/pi-agent-text-editor/index.js")),
92
+ builtin("editor.core", () => import("#src/extensions/pi-agent-text-editor/index.ts")),
93
93
  builtin(
94
94
  "editor.anchor.constant",
95
95
  () =>
96
- import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/index.js"),
96
+ import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/index.ts"),
97
97
  ["read.core", "editor.core"],
98
98
  ),
99
99
  builtin(
100
100
  "editor.anchor.line-hash",
101
101
  () =>
102
- import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/index.js"),
102
+ import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/index.ts"),
103
103
  ["read.core", "editor.core"],
104
104
  ),
105
105
  builtin(
106
106
  "editor.anchor.exact",
107
107
  () =>
108
- import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/index.js"),
108
+ import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/index.ts"),
109
109
  ["editor.core"],
110
110
  ),
111
111
  builtin(
112
112
  "editor.stale-anchor",
113
113
  () =>
114
- import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/index.js"),
114
+ import("#src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/index.ts"),
115
115
  ["editor.core"],
116
116
  ),
117
- builtin("ide.ast", () => import("#src/plugins/pi-agent-ide-ast/index.js"), [
117
+ builtin("ide.ast", () => import("#src/plugins/pi-agent-ide-ast/index.ts"), [
118
118
  "ide.core",
119
119
  "read.core",
120
120
  "search.core",
121
121
  "editor.core",
122
122
  ]),
123
- builtin("ide.formatter", () => import("#src/backend/formatter-registration.js"), ["ide.core"]),
124
- builtin("ide.lint", () => import("#src/backend/lint-registration.js"), ["ide.core"]),
125
- builtin("ide.changes", () => import("#src/backend/git-registration.js"), [
123
+ builtin("ide.formatter", () => import("#src/backend/formatter-registration.ts"), ["ide.core"]),
124
+ builtin("ide.lint", () => import("#src/backend/lint-registration.ts"), ["ide.core"]),
125
+ builtin("ide.changes", () => import("#src/backend/git-registration.ts"), [
126
126
  "ide.core",
127
127
  "read.core",
128
128
  "editor.core",
129
129
  ]),
130
- builtin("ide.lsp", () => import("#src/backend/lsp-registration.js"), [
130
+ builtin("ide.lsp", () => import("#src/backend/lsp-registration.ts"), [
131
131
  "ide.core",
132
132
  "read.core",
133
133
  "search.core",
134
134
  ]),
135
- builtin("ide.processes", () => import("#src/plugins/pi-agent-ide-processes/index.js")),
136
- builtin("ide.debugger", () => import("#src/backend/debugger-registration.js"), [
135
+ builtin("ide.processes", () => import("#src/plugins/pi-agent-ide-processes/index.ts")),
136
+ builtin("ide.debugger", () => import("#src/backend/debugger-registration.ts"), [
137
137
  "ide.processes",
138
138
  "read.core",
139
139
  "editor.core",
140
140
  ]),
141
- builtin("ide.terminal", () => import("#src/plugins/pi-agent-ide-terminal/index.js"), [
141
+ builtin("ide.terminal", () => import("#src/plugins/pi-agent-ide-terminal/index.ts"), [
142
142
  "ide.processes",
143
143
  "read.core",
144
144
  "search.core",
145
145
  "editor.core",
146
146
  "editor.anchor.constant",
147
147
  ]),
148
- builtin("ide.diagnostics", () => import("#src/plugins/pi-agent-ide-diagnostics/index.js"), [
148
+ builtin("ide.diagnostics", () => import("#src/plugins/pi-agent-ide-diagnostics/index.ts"), [
149
149
  "ide.core",
150
150
  "read.core",
151
151
  ]),
@@ -8,8 +8,8 @@ import {
8
8
  type IdeCapability,
9
9
  type IdeCapabilityRegistration,
10
10
  type IdeCapabilitySchema,
11
- } from "#src/api/capabilities.js";
12
- import { composeCapabilitySchema } from "./capability-schemas.js";
11
+ } from "#src/api/capabilities.ts";
12
+ import { composeCapabilitySchema } from "./capability-schemas.ts";
13
13
 
14
14
  const ENTRY = "ide-capabilities/v1";
15
15
 
@@ -1,5 +1,5 @@
1
1
  import type { ToolDefinition } from "@earendil-works/pi-coding-agent";
2
- import type { IdeCapabilitySchema } from "#src/api/capabilities.js";
2
+ import type { IdeCapabilitySchema } from "#src/api/capabilities.ts";
3
3
 
4
4
  function joinUnique(values: readonly (string | undefined)[]): string {
5
5
  return [
@@ -0,0 +1,32 @@
1
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
+
3
+ /**
4
+ * Copy each tool result's details and structured content before Pi keeps them for the rest of the
5
+ * session.
6
+ *
7
+ * A short string cut from a larger one, such as a line or a match taken from a file, shares the
8
+ * larger string's memory in V8. Pi keeps every result in the session history and the transcript,
9
+ * so one kept line would keep its whole file in memory for every result. The copy holds only the
10
+ * text it shows. Register after every other result handler, so the copy is final.
11
+ */
12
+ export function registerDetachedResults(pi: Pick<ExtensionAPI, "on">): void {
13
+ pi.on("tool_result", (event) => {
14
+ const details = detached(event.details);
15
+ const structuredContent = detached(event.structuredContent);
16
+ if (details === undefined && structuredContent === undefined) return;
17
+ return {
18
+ ...(details !== undefined && { details: details.value }),
19
+ ...(structuredContent !== undefined && { structuredContent: structuredContent.value }),
20
+ };
21
+ });
22
+ }
23
+
24
+ function detached<T>(value: T): { readonly value: T } | undefined {
25
+ if (value === undefined || value === null) return undefined;
26
+ try {
27
+ return { value: structuredClone(value) };
28
+ } catch {
29
+ // A value that is not plain data, such as a function, stays as it is.
30
+ return undefined;
31
+ }
32
+ }
@@ -1,5 +1,5 @@
1
- import type { AgentIdePreset } from "./presets.js";
2
- import { readAgentIdePreset } from "./presets.js";
1
+ import type { AgentIdePreset } from "./presets.ts";
2
+ import { readAgentIdePreset } from "./presets.ts";
3
3
  import { readFile } from "node:fs/promises";
4
4
  import os from "node:os";
5
5
  import path from "node:path";