pi-agent-ide 0.8.1 → 0.8.3

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 (417) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +5 -3
  3. package/dist/{chunk-TGC2ZACO.js → chunk-235QMMVA.js} +1 -1
  4. package/dist/{chunk-OI3HBIPK.js → chunk-4DIUPEDF.js} +1 -1
  5. package/dist/{chunk-2ITKAXHO.js → chunk-6FGLAVPJ.js} +1 -1
  6. package/dist/{chunk-7LOVUWNI.js → chunk-6H32W35W.js} +1 -1
  7. package/dist/{chunk-YHREORHH.js → chunk-6OJ565FL.js} +1 -1
  8. package/dist/{chunk-E2PHA4SQ.js → chunk-6R3Y4AD3.js} +1 -1
  9. package/dist/{chunk-VNTY7BKC.js → chunk-6T7PSDQW.js} +1 -1
  10. package/dist/{chunk-D4IA2MTA.js → chunk-6TJPMBUQ.js} +1 -1
  11. package/dist/{chunk-JKMXND6V.js → chunk-6XFUICD7.js} +1 -1
  12. package/dist/{chunk-A64JRDZK.js → chunk-AAC77UD4.js} +1 -1
  13. package/dist/{chunk-HFJGCYFO.js → chunk-ANM3Y5FO.js} +5 -5
  14. package/dist/{chunk-Q5X6OXNS.js → chunk-CPELC6JE.js} +1 -1
  15. package/dist/chunk-GBUJOR6V.js +28 -0
  16. package/dist/{chunk-3WO2NOEQ.js → chunk-GSOYVIQS.js} +1 -1
  17. package/dist/{chunk-AIT3YWR5.js → chunk-HSRH76JN.js} +1 -1
  18. package/dist/{chunk-ID4RJIVZ.js → chunk-HSZ4AQ6L.js} +1 -1
  19. package/dist/chunk-I6NPILT5.js +1 -0
  20. package/dist/chunk-K7SRNBIV.js +1 -0
  21. package/dist/{chunk-DXONCYWF.js → chunk-LCWBVOII.js} +3 -3
  22. package/dist/{chunk-EMRJP6EM.js → chunk-LEJKDYCK.js} +1 -1
  23. package/dist/{chunk-HCK7OIQ3.js → chunk-NJ7C4KMA.js} +1 -1
  24. package/dist/{chunk-BQAKA3FU.js → chunk-NUM3YQGK.js} +1 -1
  25. package/dist/chunk-OJEIX7OZ.js +1 -0
  26. package/dist/chunk-PBQDHYNX.js +1 -0
  27. package/dist/{chunk-4HWKBCBH.js → chunk-PJL3UVMJ.js} +1 -1
  28. package/dist/chunk-PT35ZFLH.js +33 -0
  29. package/dist/{chunk-AKNHSDGV.js → chunk-QT3EAHOG.js} +1 -1
  30. package/dist/{chunk-LLRUJD62.js → chunk-RIJMXO43.js} +1 -1
  31. package/dist/chunk-RMI3NMQY.js +23 -0
  32. package/dist/chunk-RQ7JJ7GV.js +4 -0
  33. package/dist/{chunk-AUL5FGGK.js → chunk-RVU73VKN.js} +1 -1
  34. package/dist/{chunk-WPBQ45ZL.js → chunk-RW2GTYQI.js} +1 -1
  35. package/dist/{chunk-BR7GRH4A.js → chunk-SDAH3ECM.js} +1 -1
  36. package/dist/chunk-SGQWRIRJ.js +10 -0
  37. package/dist/{chunk-N56WAVYA.js → chunk-SMIFCAAX.js} +1 -1
  38. package/dist/chunk-SWBJS3U4.js +1 -0
  39. package/dist/{chunk-WXGTU2M6.js → chunk-VMTOFEXF.js} +1 -1
  40. package/dist/{chunk-GEMDU6XW.js → chunk-VXP5BMW7.js} +1 -1
  41. package/dist/{chunk-LAJQSHEI.js → chunk-XAHU42FP.js} +3 -3
  42. package/dist/{chunk-ZV5ETNLQ.js → chunk-XBQR74IK.js} +1 -1
  43. package/dist/{chunk-TXG2H7YQ.js → chunk-XG7QNAKW.js} +1 -1
  44. package/dist/{chunk-PRLIHLCS.js → chunk-XLWCSJMR.js} +1 -1
  45. package/dist/{chunk-M4TVRCMZ.js → chunk-XXLLY66B.js} +1 -1
  46. package/dist/chunk-YFP4P2FV.js +1 -0
  47. package/dist/{chunk-SWA5B5B2.js → chunk-YIXP2ALP.js} +1 -1
  48. package/dist/{chunk-246NTPOS.js → chunk-ZJQRLVVV.js} +1 -1
  49. package/dist/entry-0.js +1 -1
  50. package/dist/entry-1.js +1 -1
  51. package/dist/entry-10.js +1 -1
  52. package/dist/entry-11.js +1 -1
  53. package/dist/entry-12.js +1 -1
  54. package/dist/entry-13.js +1 -1
  55. package/dist/entry-14.js +1 -1
  56. package/dist/entry-15.js +1 -1
  57. package/dist/entry-16.js +1 -1
  58. package/dist/entry-17.js +1 -1
  59. package/dist/entry-18.js +1 -1
  60. package/dist/entry-19.js +1 -0
  61. package/dist/entry-2.js +1 -1
  62. package/dist/entry-20.js +1 -1
  63. package/dist/entry-22.js +1 -1
  64. package/dist/entry-23.js +1 -1
  65. package/dist/entry-24.js +1 -1
  66. package/dist/entry-25.js +1 -1
  67. package/dist/entry-26.js +1 -1
  68. package/dist/entry-27.js +1 -2
  69. package/dist/entry-28.js +1 -1
  70. package/dist/entry-29.js +2 -4
  71. package/dist/entry-3.js +1 -1
  72. package/dist/entry-30.js +1 -1
  73. package/dist/entry-31.js +4 -1
  74. package/dist/entry-32.js +1 -1
  75. package/dist/entry-33.js +1 -18
  76. package/dist/entry-34.js +1 -1
  77. package/dist/entry-35.js +18 -1
  78. package/dist/entry-36.js +1 -1
  79. package/dist/entry-37.js +1 -1
  80. package/dist/entry-38.js +1 -1
  81. package/dist/entry-39.js +1 -1
  82. package/dist/entry-4.js +1 -1
  83. package/dist/entry-40.js +1 -1
  84. package/dist/entry-41.js +1 -1
  85. package/dist/entry-42.js +1 -1
  86. package/dist/entry-43.js +1 -1
  87. package/dist/entry-44.js +1 -1
  88. package/dist/entry-45.js +1 -1
  89. package/dist/entry-46.js +1 -1
  90. package/dist/entry-47.js +1 -25
  91. package/dist/entry-48.js +1 -1
  92. package/dist/entry-49.js +25 -1
  93. package/dist/entry-5.js +1 -1
  94. package/dist/entry-50.js +1 -1
  95. package/dist/entry-51.js +1 -1
  96. package/dist/entry-52.js +1 -3
  97. package/dist/entry-53.js +1 -13
  98. package/dist/entry-54.js +3 -1
  99. package/dist/entry-55.js +13 -1
  100. package/dist/entry-56.js +1 -1
  101. package/dist/entry-57.js +1 -1
  102. package/dist/entry-58.js +1 -1
  103. package/dist/entry-59.js +1 -1
  104. package/dist/entry-6.js +1 -1
  105. package/dist/entry-60.js +1 -1
  106. package/dist/entry-61.js +1 -1
  107. package/dist/entry-62.js +1 -1
  108. package/dist/entry-63.js +1 -0
  109. package/dist/entry-64.js +1 -1
  110. package/dist/entry-66.js +1 -1
  111. package/dist/entry-67.js +0 -1
  112. package/dist/entry-68.js +1 -1
  113. package/dist/entry-69.js +1 -1
  114. package/dist/entry-7.js +1 -1
  115. package/dist/entry-70.js +1 -1
  116. package/dist/entry-71.js +1 -1
  117. package/dist/entry-72.js +1 -1
  118. package/dist/entry-73.js +1 -0
  119. package/dist/entry-74.js +1 -1
  120. package/dist/entry-76.js +1 -1
  121. package/dist/entry-77.js +0 -1
  122. package/dist/entry-78.js +1 -1
  123. package/dist/entry-79.js +1 -80
  124. package/dist/entry-8.js +1 -1
  125. package/dist/entry-80.js +1 -22
  126. package/dist/entry-81.js +80 -2
  127. package/dist/entry-82.js +22 -1
  128. package/dist/entry-83.js +2 -1
  129. package/dist/entry-84.js +1 -1
  130. package/dist/entry-85.js +1 -3
  131. package/dist/entry-86.js +1 -1
  132. package/dist/entry-87.js +1 -1
  133. package/dist/entry-88.js +3 -1
  134. package/dist/entry-89.js +1 -0
  135. package/dist/entry-9.js +1 -1
  136. package/dist/entry-90.js +1 -0
  137. package/dist/entry-91.js +1 -0
  138. package/dist/pi-agent-ide.js +29 -36
  139. package/docs/agent-guides/debugger.md +2 -0
  140. package/docs/agent-guides/editing.md +3 -3
  141. package/docs/agent-guides/search-code.md +2 -2
  142. package/docs/agent-guides/select-code.md +9 -6
  143. package/docs/code-review.md +5 -0
  144. package/docs/configuration.md +36 -4
  145. package/docs/development.md +8 -0
  146. package/docs/directory-operations.md +1 -1
  147. package/docs/extensions.md +98 -1
  148. package/docs/structured-results.md +11 -6
  149. package/docs/user-hooks.md +2 -2
  150. package/node_modules/pi-agent-doctor/package.json +7 -7
  151. package/node_modules/pi-agent-doctor/runtime/entry-27.js +1 -0
  152. package/node_modules/pi-agent-documentation/package.json +2 -2
  153. package/node_modules/pi-agent-documentation/runtime/entry-28.js +1 -0
  154. package/node_modules/pi-agent-filesystem/package.json +8 -8
  155. package/node_modules/pi-agent-filesystem-image/package.json +4 -4
  156. package/node_modules/pi-agent-filesystem-jq/package.json +6 -6
  157. package/node_modules/pi-agent-filesystem-pdf/package.json +4 -4
  158. package/node_modules/pi-agent-filesystem-pdf/runtime/entry-32.js +2 -0
  159. package/node_modules/pi-agent-filesystem-text/package.json +4 -4
  160. package/node_modules/pi-agent-ide-ast/package.json +15 -15
  161. package/node_modules/pi-agent-ide-ast/src/select-schema.ts +6 -5
  162. package/node_modules/pi-agent-ide-changes/package.json +10 -10
  163. package/node_modules/pi-agent-ide-changes/runtime/entry-36.js +1 -0
  164. package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +6 -5
  165. package/node_modules/pi-agent-ide-formatter/package.json +4 -4
  166. package/node_modules/pi-agent-ide-languages/package.json +3 -3
  167. package/node_modules/pi-agent-ide-lint/package.json +8 -8
  168. package/node_modules/pi-agent-ide-lint/runtime/entry-40.js +2 -0
  169. package/node_modules/pi-agent-ide-lsp/package.json +10 -10
  170. package/node_modules/pi-agent-ide-lsp/runtime/entry-41.js +2 -0
  171. package/node_modules/pi-agent-image/package.json +3 -3
  172. package/node_modules/pi-agent-invariant/package.json +2 -2
  173. package/node_modules/pi-agent-pdf/package.json +3 -3
  174. package/node_modules/pi-agent-read/package.json +12 -12
  175. package/node_modules/pi-agent-read/runtime/entry-47.js +0 -1
  176. package/node_modules/pi-agent-read/runtime/entry-49.js +2 -0
  177. package/node_modules/pi-agent-resource/package.json +2 -2
  178. package/node_modules/pi-agent-resource/src/resource-error.ts +11 -0
  179. package/node_modules/pi-agent-search/package.json +9 -9
  180. package/node_modules/pi-agent-search/runtime/entry-52.js +0 -1
  181. package/node_modules/pi-agent-search/runtime/entry-53.js +1 -0
  182. package/node_modules/pi-agent-search/runtime/entry-54.js +2 -0
  183. package/node_modules/pi-agent-search/src/api/search-parameters.ts +6 -5
  184. package/node_modules/pi-agent-search-text/package.json +14 -14
  185. package/node_modules/pi-agent-search-text/runtime/entry-55.js +1 -0
  186. package/node_modules/pi-agent-search-text/runtime/entry-58.js +1 -0
  187. package/node_modules/pi-agent-text/package.json +3 -3
  188. package/node_modules/pi-agent-text-anchor-constant/package.json +4 -4
  189. package/node_modules/pi-agent-text-anchor-exact/package.json +5 -5
  190. package/node_modules/pi-agent-text-anchor-line-hash/package.json +7 -7
  191. package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-64.js +2 -0
  192. package/node_modules/pi-agent-text-editor/index.ts +2 -0
  193. package/node_modules/pi-agent-text-editor/package.json +26 -26
  194. package/node_modules/pi-agent-text-editor/runtime/entry-79.js +0 -1
  195. package/node_modules/pi-agent-text-editor/runtime/entry-80.js +1 -0
  196. package/node_modules/pi-agent-text-editor/src/api/edit-completion.ts +2 -0
  197. package/node_modules/pi-agent-text-editor/src/api/mutation-tool.ts +5 -0
  198. package/node_modules/pi-agent-text-editor/src/core/extension.ts +3 -1
  199. package/node_modules/pi-agent-text-editor/src/core/file-operation-tools.ts +45 -44
  200. package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +2 -0
  201. package/node_modules/pi-agent-text-editor/src/core/native-text-edit-batch.ts +27 -18
  202. package/node_modules/pi-agent-text-editor/src/core/text-edit-origin.ts +38 -0
  203. package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +106 -48
  204. package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +29 -6
  205. package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts +39 -44
  206. package/node_modules/pi-agent-text-editor/src/core/write-agent-result.ts +3 -1
  207. package/node_modules/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +1 -1
  208. package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +6 -5
  209. package/node_modules/pi-agent-text-editor-renderer/package.json +6 -6
  210. package/node_modules/pi-agent-text-editor-renderer/runtime/entry-82.js +2 -0
  211. package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +14 -3
  212. package/node_modules/pi-agent-text-editor-stale-anchor/index.ts +17 -0
  213. package/node_modules/pi-agent-text-editor-stale-anchor/package.json +6 -5
  214. package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-83.js +2 -0
  215. package/node_modules/pi-agent-tool-call-interception/package.json +3 -3
  216. package/node_modules/pi-agent-tool-call-interception/runtime/entry-84.js +1 -0
  217. package/node_modules/pi-agent-tool-ui/package.json +6 -2
  218. package/node_modules/pi-agent-tool-ui/runtime/entry-85.js +1 -0
  219. package/node_modules/pi-agent-tool-ui/runtime/entry-86.js +1 -0
  220. package/node_modules/pi-agent-tool-ui/src/operation-approval.ts +271 -0
  221. package/node_modules/pi-agent-web/package.json +8 -8
  222. package/node_modules/pi-agent-web-html/package.json +3 -3
  223. package/node_modules/pi-agent-web-image/package.json +4 -4
  224. package/node_modules/pi-agent-web-image/runtime/entry-89.js +2 -0
  225. package/node_modules/pi-agent-web-pdf/package.json +4 -4
  226. package/node_modules/pi-agent-web-pdf/runtime/entry-90.js +2 -0
  227. package/node_modules/pi-agent-web-text/package.json +4 -4
  228. package/node_modules/pi-agent-web-text/runtime/entry-91.js +2 -0
  229. package/package.json +62 -54
  230. package/src/api/approval.ts +5 -0
  231. package/src/api/settings.ts +198 -0
  232. package/src/backend/debugger-registration.ts +5 -1
  233. package/src/code-review/extension.ts +10 -4
  234. package/src/code-review/reviewer.ts +8 -0
  235. package/src/composite/host-version.ts +29 -5
  236. package/src/composite/ide-alias-rendering.ts +97 -0
  237. package/src/composite/nested-tool-rendering.ts +74 -4
  238. package/src/composite/search-facts.ts +45 -0
  239. package/src/composite/settings-documentation.ts +32 -23
  240. package/src/composite/settings-registry.ts +94 -0
  241. package/src/composite/text-results.ts +120 -8
  242. package/src/composite/tool-availability.ts +11 -2
  243. package/src/core/diagnostic-entry.ts +31 -8
  244. package/src/core/diagnostic-store.ts +19 -3
  245. package/src/core/extension.ts +7 -2
  246. package/src/core/reload-resource-store.ts +23 -3
  247. package/src/documentation/registry.ts +10 -2
  248. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +8 -8
  249. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +4 -4
  250. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/package.json +6 -6
  251. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +4 -4
  252. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/runtime/entry-32.js +2 -0
  253. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +4 -4
  254. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/runtime/entry-33.js +2 -0
  255. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-29.js +2 -0
  256. package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +8 -8
  257. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +3 -3
  258. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +4 -4
  259. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/runtime/entry-89.js +2 -0
  260. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +4 -4
  261. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/runtime/entry-90.js +2 -0
  262. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +4 -4
  263. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-91.js +2 -0
  264. package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-87.js +2 -0
  265. package/src/extensions/pi-agent-read/package.json +12 -12
  266. package/src/extensions/pi-agent-read/runtime/entry-47.js +0 -1
  267. package/src/extensions/pi-agent-read/runtime/entry-48.js +1 -0
  268. package/src/extensions/pi-agent-read/runtime/entry-49.js +2 -0
  269. package/src/extensions/pi-agent-search/package.json +9 -9
  270. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +14 -14
  271. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-55.js +1 -0
  272. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-57.js +1 -0
  273. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-58.js +1 -0
  274. package/src/extensions/pi-agent-search/runtime/entry-52.js +0 -1
  275. package/src/extensions/pi-agent-search/runtime/entry-53.js +1 -0
  276. package/src/extensions/pi-agent-search/runtime/entry-54.js +2 -0
  277. package/src/extensions/pi-agent-search/src/api/search-parameters.ts +6 -5
  278. package/src/extensions/pi-agent-text-editor/index.ts +2 -0
  279. package/src/extensions/pi-agent-text-editor/package.json +26 -26
  280. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +4 -4
  281. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +5 -5
  282. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +7 -7
  283. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-63.js +1 -0
  284. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-64.js +2 -0
  285. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +6 -6
  286. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-82.js +2 -0
  287. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +14 -3
  288. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/index.ts +17 -0
  289. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +6 -5
  290. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-83.js +2 -0
  291. package/src/extensions/pi-agent-text-editor/runtime/entry-79.js +0 -1
  292. package/src/extensions/pi-agent-text-editor/runtime/entry-80.js +1 -0
  293. package/src/extensions/pi-agent-text-editor/runtime/entry-81.js +2 -0
  294. package/src/extensions/pi-agent-text-editor/src/api/edit-completion.ts +2 -0
  295. package/src/extensions/pi-agent-text-editor/src/api/mutation-tool.ts +5 -0
  296. package/src/extensions/pi-agent-text-editor/src/core/extension.ts +3 -1
  297. package/src/extensions/pi-agent-text-editor/src/core/file-operation-tools.ts +45 -44
  298. package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +2 -0
  299. package/src/extensions/pi-agent-text-editor/src/core/native-text-edit-batch.ts +27 -18
  300. package/src/extensions/pi-agent-text-editor/src/core/text-edit-origin.ts +38 -0
  301. package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +106 -48
  302. package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +29 -6
  303. package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/streaming-provider.ts +39 -44
  304. package/src/extensions/pi-agent-text-editor/src/core/write-agent-result.ts +3 -1
  305. package/src/extensions/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +1 -1
  306. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +6 -5
  307. package/src/pi-agent-ide.ts +61 -14
  308. package/src/plugins/pi-agent-ide-ast/package.json +15 -15
  309. package/src/plugins/pi-agent-ide-ast/src/select-schema.ts +6 -5
  310. package/src/plugins/pi-agent-ide-changes/package.json +10 -10
  311. package/src/plugins/pi-agent-ide-changes/runtime/entry-36.js +1 -0
  312. package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +6 -5
  313. package/src/plugins/pi-agent-ide-debugger/index.ts +159 -60
  314. package/src/plugins/pi-agent-ide-debugger/src/debugmcp-client.ts +118 -0
  315. package/src/plugins/pi-agent-ide-debugger/src/doctor-plugin.ts +47 -0
  316. package/src/plugins/pi-agent-ide-debugger/src/renderer.ts +2 -0
  317. package/src/plugins/pi-agent-ide-debugger/src/session-manager.ts +146 -1
  318. package/src/plugins/pi-agent-ide-debugger/src/ui.ts +12 -0
  319. package/src/plugins/pi-agent-ide-debugger/src/vscode-backend.ts +497 -0
  320. package/src/plugins/pi-agent-ide-formatter/package.json +4 -4
  321. package/src/plugins/pi-agent-ide-languages/package.json +3 -3
  322. package/src/plugins/pi-agent-ide-lint/package.json +8 -8
  323. package/src/plugins/pi-agent-ide-lint/runtime/entry-40.js +2 -0
  324. package/src/plugins/pi-agent-ide-lsp/package.json +10 -10
  325. package/src/plugins/pi-agent-ide-lsp/runtime/entry-41.js +2 -0
  326. package/src/plugins/pi-agent-ide-terminal/index.ts +3 -2
  327. package/src/plugins/pi-agent-ide-terminal/src/origin.ts +30 -0
  328. package/src/plugins/pi-agent-ide-terminal/src/session-manager.ts +34 -0
  329. package/src/plugins/pi-agent-ide-terminal/src/tools.ts +11 -2
  330. package/src/plugins/pi-agent-ide-terminal/src/types.ts +9 -0
  331. package/src/plugins/pi-agent-ide-terminal/src/ui.ts +72 -26
  332. package/dist/chunk-ESPNEJHK.js +0 -1
  333. package/dist/chunk-GNACBJM3.js +0 -1
  334. package/dist/chunk-VMGZMXEM.js +0 -10
  335. package/dist/chunk-W3YFF6OO.js +0 -1
  336. package/dist/chunk-W7M3V7FR.js +0 -28
  337. package/dist/chunk-WMHSVEIT.js +0 -29
  338. package/dist/chunk-XSIKDVAR.js +0 -25
  339. package/dist/chunk-YTYLS2UM.js +0 -1
  340. package/dist/chunk-Z2QGNTGQ.js +0 -1
  341. package/dist/entry-21.js +0 -1
  342. package/node_modules/pi-agent-doctor/runtime/entry-20.js +0 -1
  343. package/node_modules/pi-agent-doctor/runtime/entry-21.js +0 -1
  344. package/node_modules/pi-agent-filesystem/runtime/entry-27.js +0 -2
  345. package/node_modules/pi-agent-filesystem-image/runtime/entry-28.js +0 -2
  346. package/node_modules/pi-agent-ide-ast/runtime/entry-32.js +0 -1
  347. package/node_modules/pi-agent-ide-formatter/runtime/entry-36.js +0 -2
  348. package/node_modules/pi-agent-image/runtime/entry-40.js +0 -1
  349. package/node_modules/pi-agent-invariant/runtime/entry-41.js +0 -1
  350. package/node_modules/pi-agent-search/runtime/entry-49.js +0 -1
  351. package/node_modules/pi-agent-search-text/runtime/entry-53.js +0 -2
  352. package/node_modules/pi-agent-search-text/runtime/entry-54.js +0 -1
  353. package/node_modules/pi-agent-text-anchor-constant/runtime/entry-58.js +0 -2
  354. package/node_modules/pi-agent-text-editor/runtime/entry-64.js +0 -1
  355. package/node_modules/pi-agent-text-editor-renderer/runtime/entry-80.js +0 -2
  356. package/node_modules/pi-agent-tool-call-interception/runtime/entry-82.js +0 -1
  357. package/node_modules/pi-agent-tool-ui/runtime/entry-83.js +0 -1
  358. package/node_modules/pi-agent-web/runtime/entry-84.js +0 -2
  359. package/node_modules/pi-agent-web-html/runtime/entry-85.js +0 -2
  360. package/node_modules/pi-agent-web-image/runtime/entry-86.js +0 -2
  361. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-28.js +0 -2
  362. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/runtime/entry-29.js +0 -2
  363. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-27.js +0 -2
  364. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-85.js +0 -2
  365. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/runtime/entry-86.js +0 -2
  366. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/runtime/entry-87.js +0 -2
  367. package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-84.js +0 -2
  368. package/src/extensions/pi-agent-read/runtime/entry-43.js +0 -1
  369. package/src/extensions/pi-agent-read/runtime/entry-44.js +0 -1
  370. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-53.js +0 -2
  371. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-54.js +0 -1
  372. package/src/extensions/pi-agent-search/runtime/entry-49.js +0 -1
  373. package/src/extensions/pi-agent-search/runtime/entry-50.js +0 -1
  374. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-58.js +0 -2
  375. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-59.js +0 -1
  376. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-80.js +0 -2
  377. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-81.js +0 -2
  378. package/src/extensions/pi-agent-text-editor/runtime/entry-63.js +0 -1
  379. package/src/extensions/pi-agent-text-editor/runtime/entry-64.js +0 -1
  380. package/src/plugins/pi-agent-ide-ast/runtime/entry-32.js +0 -1
  381. package/src/plugins/pi-agent-ide-ast/runtime/entry-33.js +0 -2
  382. package/src/plugins/pi-agent-ide-formatter/runtime/entry-36.js +0 -2
  383. /package/node_modules/{pi-agent-documentation → pi-agent-doctor}/runtime/entry-26.js +0 -0
  384. /package/node_modules/{pi-agent-filesystem-jq → pi-agent-filesystem}/runtime/entry-29.js +0 -0
  385. /package/node_modules/{pi-agent-filesystem-pdf → pi-agent-filesystem-image}/runtime/entry-30.js +0 -0
  386. /package/node_modules/{pi-agent-filesystem-text → pi-agent-filesystem-jq}/runtime/entry-31.js +0 -0
  387. /package/node_modules/{pi-agent-ide-ast → pi-agent-filesystem-text}/runtime/entry-33.js +0 -0
  388. /package/node_modules/{pi-agent-ide-changes → pi-agent-ide-ast}/runtime/entry-34.js +0 -0
  389. /package/node_modules/{pi-agent-ide-changes → pi-agent-ide-ast}/runtime/entry-35.js +0 -0
  390. /package/node_modules/{pi-agent-ide-languages → pi-agent-ide-changes}/runtime/entry-37.js +0 -0
  391. /package/node_modules/{pi-agent-ide-lint → pi-agent-ide-formatter}/runtime/entry-38.js +0 -0
  392. /package/node_modules/{pi-agent-ide-lsp → pi-agent-ide-languages}/runtime/entry-39.js +0 -0
  393. /package/node_modules/{pi-agent-pdf → pi-agent-image}/runtime/entry-42.js +0 -0
  394. /package/node_modules/{pi-agent-read → pi-agent-invariant}/runtime/entry-43.js +0 -0
  395. /package/node_modules/{pi-agent-read → pi-agent-pdf}/runtime/entry-44.js +0 -0
  396. /package/node_modules/{pi-agent-resource → pi-agent-read}/runtime/entry-48.js +0 -0
  397. /package/node_modules/{pi-agent-search → pi-agent-resource}/runtime/entry-50.js +0 -0
  398. /package/node_modules/{pi-agent-text → pi-agent-search-text}/runtime/entry-57.js +0 -0
  399. /package/node_modules/{pi-agent-text-anchor-exact → pi-agent-text}/runtime/entry-59.js +0 -0
  400. /package/node_modules/{pi-agent-text-anchor-exact → pi-agent-text-anchor-constant}/runtime/entry-60.js +0 -0
  401. /package/node_modules/{pi-agent-text-anchor-line-hash → pi-agent-text-anchor-exact}/runtime/entry-61.js +0 -0
  402. /package/node_modules/{pi-agent-text-anchor-line-hash → pi-agent-text-anchor-exact}/runtime/entry-62.js +0 -0
  403. /package/node_modules/{pi-agent-text-editor → pi-agent-text-anchor-line-hash}/runtime/entry-63.js +0 -0
  404. /package/node_modules/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor}/runtime/entry-81.js +0 -0
  405. /package/node_modules/{pi-agent-web-pdf → pi-agent-web}/runtime/entry-87.js +0 -0
  406. /package/node_modules/{pi-agent-web-text → pi-agent-web-html}/runtime/entry-88.js +0 -0
  407. /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-pdf → pi-agent-filesystem-image}/runtime/entry-30.js +0 -0
  408. /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-text → pi-agent-filesystem-jq}/runtime/entry-31.js +0 -0
  409. /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-text → pi-agent-web-html}/runtime/entry-88.js +0 -0
  410. /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-anchor-exact → pi-agent-text-anchor-constant}/runtime/entry-60.js +0 -0
  411. /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-anchor-line-hash → pi-agent-text-anchor-exact}/runtime/entry-61.js +0 -0
  412. /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-anchor-line-hash → pi-agent-text-anchor-exact}/runtime/entry-62.js +0 -0
  413. /package/src/plugins/{pi-agent-ide-changes → pi-agent-ide-ast}/runtime/entry-34.js +0 -0
  414. /package/src/plugins/{pi-agent-ide-changes → pi-agent-ide-ast}/runtime/entry-35.js +0 -0
  415. /package/src/plugins/{pi-agent-ide-languages → pi-agent-ide-changes}/runtime/entry-37.js +0 -0
  416. /package/src/plugins/{pi-agent-ide-lint → pi-agent-ide-formatter}/runtime/entry-38.js +0 -0
  417. /package/src/plugins/{pi-agent-ide-lsp → pi-agent-ide-languages}/runtime/entry-39.js +0 -0
package/dist/entry-55.js CHANGED
@@ -1 +1,13 @@
1
- import{b as a,c as b}from"./chunk-EMRJP6EM.js";import"./chunk-D4IA2MTA.js";import"./chunk-OI3HBIPK.js";import"./chunk-YTYLS2UM.js";import"./chunk-PS2B6THP.js";import"./chunk-DXONCYWF.js";import"./chunk-ZPT5D4VP.js";import"./chunk-EI7MMDWY.js";export{b as SearchResultPanel,a as renderSearchResult};
1
+ import{a as v,b as se,c as oe,d as ae,e as ie,f as ce,g as Ce,k as pe}from"./chunk-T7MWQQIF.js";import"./chunk-PLKYHUNT.js";import{a as fe,b as he}from"./chunk-LEJKDYCK.js";import{a as le,b as E,c as de,d as ue}from"./chunk-6TJPMBUQ.js";import{b as re,c as ne}from"./chunk-R2U5WXYR.js";import{a as Z}from"./chunk-47SPPIXK.js";import{c as b,e as K,f as P,g as Y,h as ee,i as te}from"./chunk-4DIUPEDF.js";import{a as Q,b as U}from"./chunk-VAXLSPPU.js";import{e as X}from"./chunk-I6NPILT5.js";import{a as D}from"./chunk-YJ6T3PEP.js";import{b as F,c as _}from"./chunk-S72FVLUX.js";import{a as J}from"./chunk-XXLLY66B.js";import{c as V,d as G,f as W}from"./chunk-235QMMVA.js";import{a as j}from"./chunk-PS2B6THP.js";import{a as M}from"./chunk-BU7IZLKB.js";import{a as H,b as L}from"./chunk-S5PL5DFQ.js";import{J as $,K as B}from"./chunk-LCWBVOII.js";import{m as O}from"./chunk-ZPT5D4VP.js";import"./chunk-756K3LJY.js";import"./chunk-ZC65Z3CK.js";import{a as f}from"./chunk-EI7MMDWY.js";import{readFile as De}from"node:fs/promises";var me={protocol:F,apiVersion:_,id:"search-text",setup(r){r.addSetupCheck({id:"ripgrep",async inspect(o){let s=o.workspace?"rg":v(o.env.PI_CODING_AGENT_DIR);return await ne(o,s)?{}:{actions:[{id:"ripgrep-unavailable",message:"Local search is unavailable because ripgrep was not found"}]}}}),r.addCheck({id:"ripgrep",title:"Local search",async run(o){let s=o.env.PI_CODING_AGENT_DIR,t=o.workspace?"rg":v(s),e=await re(o,t,["--version"]);return[e.ok?{status:"pass",message:"ripgrep is available",detail:e.detail}:{status:"fail",message:"ripgrep is not available",detail:e.detail}]}})}};import I from"node:path";import{pathToFileURL as Ie}from"node:url";async function k(r,o,s,t){if(r.include!==void 0||r.exclude!==void 0)throw new Error("Include/exclude globs are unsupported for result scopes; filter the target array instead.");let e=f(async(c,u=r.condition)=>{let m=[],p=new Set;for(let d of o.targets){t?.throwIfAborted(),await $({targets:[d],complete:o.complete},t);let l=O(d.source,d.expectedContent),g=[0];for(let h of l.lines)g.push((g.at(-1)??0)+h.content.length+h.lineEnding.length);for(let h of d.ranges){let y=(g[h.start.lineNumber-1]??l.content.length)+h.start.column,S=(g[h.end.lineNumber-1]??l.content.length)+h.end.column,w=await ae({...r,query:c,condition:u},l.content.slice(y,S),s.includes("://")?process.cwd():s,t);for(let R of w.matches){let x=h.start.lineNumber+R.lineNumber-1,z=R.lineNumber===1?h.start.column:0,C={...R,source:d.source,lineNumber:x,startColumn:R.startColumn+z,endColumn:R.endColumn+z,lineText:l.lines[x-1]?.content??""},N=JSON.stringify([C.source,x,C.startColumn,C.endColumn]);p.has(N)||(p.add(N),m.push(C))}}}return m.sort((d,l)=>d.source.localeCompare(l.source)||d.lineNumber-l.lineNumber||d.startColumn-l.startColumn||d.endColumn-l.endColumn),{matches:m,complete:o.complete}},"search"),n=r.query,a=await e(n),i=[];for(let c of r.fallbacks??[]){if(a.matches.length>0||!a.complete)break;try{a=await e(c.query,c.condition),n=c.query,i.push(c.mode==="regex"?"Search fallback: no literal matches; tried unquoted terms as regex.":"Search fallback: no matches in earlier modes; tried separate words. Use these matches as location hints; refine the query before editing.")}catch(u){if(t?.aborted||c.mode!=="regex"||!(u instanceof Error)||!/regex parse error:|PCRE2: error compiling pattern/iu.test(u.message))throw u;i.push("Search fallback: invalid regex skipped; literal search found no matches.")}}return await $(o,t),{...a,query:n,notices:i}}f(k,"runScopedSearch");import{spawn as Ee}from"node:child_process";import T from"node:path";async function Se(r,o,s,t,e){let n=o.limit??100,a=["--files","--hidden","--no-config","--no-ignore-parent","--glob","!.git/**"];for(let i of ge(o.include))a.push("--glob",i);for(let i of ge(o.exclude))a.push("--glob",`!${i}`);if(e!==void 0){let i=e.resolve(s,o.path??"."),c=await e.isDirectory(i,t),u=c?i:e.dirname(i);a.push("--",c?".":`./${e.basename(i)}`);let m=[],p=await e.runLines(a,u,d=>{let l=d.replace(/^\.\//u,"");ye(l,r)&&m.push(e.resolve(u,d))},t);if(t?.throwIfAborted(),p.code!==0&&p.code!==1)throw new Error(p.stderr||"File search failed.");return m.sort((d,l)=>d.localeCompare(l)),{files:m.slice(0,n),complete:m.length<=n}}if(o.path?.includes("://")||s.includes("://"))throw new Error("No search environment owns this scope.");return o.path!==void 0&&a.push(o.path),new Promise((i,c)=>{let u=Ee(v(),a,{cwd:s,stdio:["ignore","pipe","pipe"]}),m="",p="";u.stdout.setEncoding("utf8"),u.stderr.setEncoding("utf8"),u.stdout.on("data",l=>m+=l),u.stderr.on("data",l=>p+=l);let d=f(()=>{u.kill("SIGTERM")},"abort");t?.addEventListener("abort",d,{once:!0}),u.once("error",c),u.once("close",l=>{if(t?.removeEventListener("abort",d),t?.aborted===!0){c(t.reason instanceof Error?t.reason:new Error("File search aborted"));return}if(l!==0&&l!==1){c(new Error(p.trim()||`rg exited with code ${String(l)}`));return}let g=m.split(`
2
+ `).filter(Boolean).map(h=>T.relative(s,T.resolve(s,h))).filter(h=>ye(h,r)).sort((h,y)=>h.localeCompare(y));i({files:g.slice(0,n),complete:g.length<=n})})})}f(Se,"searchFiles");function ge(r){return r?.split(",").map(o=>o.trim()).filter(Boolean)??[]}f(ge,"splitGlobs");function ye(r,o){if(/[*?[\]{}]/u.test(o)){let s=o.replace(/^\.\//u,"");return T.matchesGlob(s.includes("/")?r:T.basename(r),s)}return Te(r,o)}f(ye,"matchFile");function Te(r,o){if(o.length===0)return!0;let s=0,t=r.toLowerCase();for(let e of o.toLowerCase()){if(s=t.indexOf(e,s),s===-1)return!1;s+=1}return!0}f(Te,"fuzzyMatch");import{spawn as $e}from"node:child_process";import{stat as Pe}from"node:fs/promises";async function be(r,o,s,t){let e=AbortSignal.timeout(b.timeoutMs),n=s===void 0?e:AbortSignal.any([s,e]);try{if(n.throwIfAborted(),t!==void 0&&t.byteSize===void 0)return A("source owner cannot bound candidate snapshots");let a=await qe(r,o,n,t);if(a.limited)return A("name collection reached its byte or unique-name budget");let i=[],c=0,u=new Set;for(let m of Y(r.query,a.names)){n.throwIfAborted();let p=await q({...r,query:m.identifier},o,n,t);if(p.matches.length===0){if(!p.complete)return A("candidate verification reached its byte budget before capturing a match");continue}for(let d of p.matches)if(!u.has(d.source)&&(u.add(d.source),c+=t===void 0?(await Pe(d.source)).size:await ke(t,d.source,n),c>b.vocabularyBytes))return A("candidate source snapshots exceeded the byte budget");i.push({...m,...p})}return i.length===0?void 0:{status:"ready",candidates:i}}catch(a){return s?.throwIfAborted(),A(e.aborted?"extra search reached its time budget":`extra search failed: ${a instanceof Error?a.message:String(a)}`)}}f(be,"searchFuzzy");async function q(r,o,s,t){let e=AbortSignal.timeout(b.timeoutMs),n=s===void 0?e:AbortSignal.any([s,e]),a=await se({...r,regex:!1,caseSensitive:!0,wholeWord:!0},o,n,{matches:b.matchesPerCandidate,bytes:b.verificationBytes},t);return{...a,matches:a.matches.filter(i=>i.lineText[i.startColumn-1]!=="$"&&i.lineText[i.endColumn]!=="$")}}f(q,"searchFuzzyAlternative");async function ke(r,o,s){if(r.byteSize===void 0)throw new Error("Source owner cannot bound candidate snapshots");return r.byteSize(o,s)}f(ke,"ownedByteSize");function A(r){return{status:"skipped",message:r,candidates:[]}}f(A,"skipped");async function qe(r,o,s,t){let e=await oe(r,o,t,s);if(t!==void 0){let n=new P,a=new AbortController,i=AbortSignal.any([s,a.signal]);try{let c=await t.runLines(["--only-matching","--no-filename","--case-sensitive",...e.arguments,"--","[A-Za-z_$][A-Za-z0-9_$]*",e.target],e.cwd,u=>{a.signal.aborted||(n.account(Buffer.byteLength(u)+1)&&n.add(u),n.limited&&a.abort())},i);if(!n.limited&&c.code!==0&&c.code!==1)throw new Error(c.stderr.trim()||"Ripgrep failed.")}catch(c){if(s.throwIfAborted(),!n.limited)throw c}return n}return s.throwIfAborted(),new Promise((n,a)=>{let i=$e(v(),["--only-matching","--no-filename","--case-sensitive",...e.arguments,"--","[A-Za-z_$][A-Za-z0-9_$]*",e.target],{cwd:e.cwd,stdio:["ignore","pipe","pipe"]}),c=new P,u="",m=!1,p="",d=f(()=>{i.kill()},"abort"),l=f(()=>{s.removeEventListener("abort",d)},"cleanup");i.stdout.on("data",g=>{if(!c.account(g.length)){i.kill();return}for(let h of g)if(h===10){if(m||c.add(u),u="",m=!1,c.limited){i.kill();break}}else m||(u.length===b.identifierLength?(u="",m=!0):u+=String.fromCharCode(h))}),i.stderr.setEncoding("utf8"),i.stderr.on("data",g=>{p=(p+g).slice(0,4096)}),i.once("error",g=>{l(),a(g)}),i.once("close",g=>{if(l(),s.aborted){a(s.reason);return}if(!c.limited&&g!==0&&g!==1){a(new Error(p.trim()||`ripgrep exited with code ${String(g)}`));return}n(c)}),s.addEventListener("abort",d,{once:!0}),s.aborted&&d()})}f(qe,"collectNames");var Re="Anchors: SEARCH#HASH:N:line (line), SEARCH#HASH:N:match (exact match), SEARCH#HASH:all:line (each unique containing line), SEARCH#HASH:all:match (every exact match)";function xe(r){return ze("text",r,ie)}f(xe,"createTextResolver");function ve(r){return ze("regex",r,o=>o.query.startsWith("regex:")?{...o,query:o.query.slice(6),regex:!0}:void 0)}f(ve,"createRegexResolver");function Ae(){return{id:"files",readResources:f((r,o)=>r.query.startsWith("files:")?[r.path??o.cwd]:[],"readResources"),toScriptData(r){let o=r;return{kind:"files",files:[...o.files],complete:o.complete}},async tryResolve(r,o){if(!r.query.startsWith("files:"))return{kind:"not-handled"};let s=r.query.slice(6).trim(),t=await Se(s,r,o.cwd,o.signal,o.environment);return{kind:"resolved",payload:{query:s,...t}}},renderResult(r,o,s){let t=r.details;return new j({summary:`${t.files.length}${t.complete?"":"+"} ${t.files.length===1?"file":"files"}`,rows:t.files.length?t.files.map(e=>({kind:"source",label:e,link:e.startsWith("ssh://")?e:Ie(I.resolve(t.cwd,e)).href})):[{kind:"note",text:"No files found"}]},s,o.expanded)},format(r,o){let s=r;return{content:[{type:"text",text:[s.complete?`${String(s.files.length)} files`:`${String(s.files.length)}+ files (limit reached)`,...s.files].join(`
3
+ `)}],details:{query:s.query,files:s.files,complete:s.complete,cwd:o.cwd}}}}}f(Ae,"createFileResolver");function ze(r,o,s){return{readResources:f((t,e)=>s(t)===void 0?[]:e.scope?.targets.map(n=>n.source)??[t.path??e.cwd],"readResources"),id:r,supportsResultScope:!0,toScriptData(t,e){let n=t,a=e,i=a.sessionId;return{...X(n.matches,n.complete,i,a),notices:[...n.notices],...a.fuzzy===void 0?{}:{fuzzy:a.fuzzy}}},async tryResolve(t,e){let n=s(t);if(n===void 0)return{kind:"not-handled"};let a=e.scope===void 0?await ce(n,e.cwd,e.signal,e.environment):await k(n,e.scope,e.cwd,e.signal),i=e.scope===void 0&&r==="text"&&a.complete&&a.matches.length===0&&K(t.query)?await be({...t,query:t.query},e.cwd,e.signal,e.environment):void 0;return{kind:"resolved",payload:{request:{...t,query:a.query},...a,recipe:{...n,originalQuery:t.query},...i===void 0?{}:{fuzzy:i}}}},async format(t,e){let n=t,a=e.scope,i=await o.registerIfCurrent(n.request.query,n.matches,n.complete,e.cwd,e.signal,n.recipe,a===void 0?void 0:m=>k(n.recipe,a,e.cwd,m),void 0,e.environment);if(n.fuzzy!==void 0){let m=E(n.request.query,[],n.complete,e.cwd),p=[],d=!1,l=AbortSignal.timeout(b.timeoutMs),g=e.signal===void 0?l:AbortSignal.any([e.signal,l]);for(let w of n.fuzzy.candidates){let R={...n.request,query:w.identifier,regex:!1,caseSensitive:!0,wholeWord:!0},x;try{x=await o.registerIfCurrent(w.identifier,w.matches,w.complete,e.cwd,g,R,z=>q(R,e.cwd,z,e.environment),b.vocabularyBytes,e.environment)}catch{e.signal?.throwIfAborted()}x===void 0&&(d=!0),p.push(ee(w,x?.id,x))}let h=d?"Some candidate files changed or could not be registered; locations are shown without stable references.":n.fuzzy.message,y={status:n.fuzzy.status,...h===void 0?{}:{message:h},candidates:p},S=[...n.notices,"No matches found."];return p.some(w=>w.selection.matches[0]?.references!==void 0)&&S.push(Re),y.status==="ready"&&y.message!==void 0&&S.push(y.message),y.status==="skipped"&&S.push(`Possible-name fallback skipped: ${y.message}`),p.length>0&&S.push("Possible names \u2014 spelling suggestions, not equivalent behavior.",...p.map(te)),{content:[{type:"text",text:S.join(`
4
+
5
+ `)}],details:{...m,...i?.target===void 0?{}:{target:i.target,matchTargets:[]},fuzzyPresentation:de(n.fuzzy.candidates,e.cwd),fuzzy:y}}}let c=n.request.limit??50;if(n.matches.length===0)return{content:[{type:"text",text:[...n.notices,"No matches found."].join(`
6
+ `)}],details:{...E(n.request.query,[],n.complete,e.cwd),...i?.target===void 0?{}:{target:i.target,matchTargets:[]}}};let u=i??{query:n.request.query,matches:n.matches,complete:n.complete};return{content:[{type:"text",text:[...n.notices,Ne(u,e.cwd,c,i!==void 0)].join(`
7
+ `)}],details:{...E(u.query,u.matches,u.complete,e.cwd,i?.id,c),...i?.target===void 0?{}:{target:i.target,matchTargets:i.matchTargets}}}},renderResult:he}}f(ze,"createMatchResolver");function Ne(r,o,s,t=!0){let e=new Set(r.matches.map(d=>d.source)).size,n=r.matches.length,a=`${String(n)}${r.complete?"":"+"} ${we(n,"match","matches")} in ${String(e)} ${we(e,"file","files")}`,i=t?r.complete?`SEARCH#${r.id}:all:line / SEARCH#${r.id}:all:match \u2014 ${a}`:`${a} (incomplete results; no all anchors were registered)`:`${a} (files changed during search; results shown without anchors)`,c=t?[Re,i]:[i],u=new Map(r.matches.map((d,l)=>[d,l+1])),m=le(r.matches,s);for(let[d,l]of m.files.entries()){d>0&&c.push("");let g=_e(l.source,o);if(l.kind==="compacted"){c.push(`${g}: ${String(l.matchCount)} matches across ${String(l.uniqueLineCount)} unique line texts (compacted)`);for(let h of l.groups)c.push(` \xD7${String(h.matchCount)} ${Fe(h.text)}`);l.groups.length<l.uniqueLineCount&&c.push(` \u2026 ${String(l.uniqueLineCount-l.groups.length)} more unique line texts`),c.push(` Search again with path: ${JSON.stringify(g)} and a narrower query to see individual matches.`);continue}for(let h of l.matches){let y=u.get(h);if(y===void 0)continue;let S=`${g}:${String(h.lineNumber)}:${String(h.startColumn+1)}-${String(h.endColumn+1)}`;c.push(t?`${S} SEARCH#${r.id}:${String(y)}:line SEARCH#${r.id}:${String(y)}:match`:S,` ${Oe(h)}`)}}let p=e-m.files.length;if(p>0){let d=m.files.reduce((l,g)=>l+(g.kind==="detailed"?g.matches.length:g.matchCount),0);c.push(`
8
+ \u2026 ${p} more files (${n-d} matches) not displayed. Narrow path, include, or query to see them.`)}return c.join(`
9
+ `)}f(Ne,"formatSearchSession");function Oe(r){let s=Math.max(0,r.startColumn-64),t=Math.min(r.lineText.length,r.endColumn+64);return`${s>0?"\u2026":""}${r.lineText.slice(s,r.startColumn)}\u27E6${r.lineText.slice(r.startColumn,r.endColumn)}\u27E7${r.lineText.slice(r.endColumn,t)}${t<r.lineText.length?"\u2026":""}`}f(Oe,"previewMatch");function Fe(r){return`${r.slice(0,129)}${r.length>129?"\u2026":""}`}f(Fe,"previewLine");function _e(r,o){if(r.includes("://"))return r;let s=I.relative(o,r);return s.length>0&&!s.startsWith("..")&&!I.isAbsolute(s)?s:r}f(_e,"displaySource");function we(r,o,s){return r===1?o:s}f(we,"plural");async function He(r){let o,s=new pe(void 0,B(r),async(t,e,n)=>{if(o===void 0){if(t.includes("://"))throw new Error("No search snapshot owner for this source.");return De(t,{encoding:"utf8",signal:n})}let a=await o.read({path:t},{cwd:e,signal:n},"script");if(a.isError||a.script?.kind!=="text"||a.script.source!==t)throw new Error(a.details.failure?.message??"The source cannot provide an exact text snapshot.");return a.script.content});r.on("tool_result",async(t,e)=>{if(t.toolName!=="replace"||t.isError||typeof t.details!="object"||t.details===null)return;let n="metadata"in t.details?t.details.metadata:void 0,a=n&&typeof n=="object"&&"searchObservations"in n?n.searchObservations:void 0,i=Array.isArray(a)?a:await s.observeAfterEdit([t.input.path,t.input.start,t.input.end],e.signal);if(i.length!==0)return{content:[...t.content,{type:"text",text:["Original search observed after editing (not task validation):",...i.map(c=>{let{query:u,fallbacks:m,...p}=c.scope;return[`SEARCH#${c.sessionId}: ${JSON.stringify(c.query)}`,`Scope and options: ${JSON.stringify(p)}`,c.error===void 0?`Matches: ${c.matches}${c.complete===!0?"; complete search.":"+; incomplete search, lower bound only."}`:`Search failed: ${c.error}. Applied edits remain applied.`,...c.notices??[]].join(`
10
+ `)})].join(`
11
+ `)}],details:{...t.details,searchObservations:i},...t.structuredContent===void 0?{}:{structuredContent:t.structuredContent}}}),r.on("tool_result",t=>{if(t.toolName!=="search"||typeof t.details!="object"||t.details===null)return;let e=t.details;if(ue(e.payload))return{details:{...e,payload:fe(e.payload,t.content.flatMap(n=>n.type==="text"?[n.text]:[]).join(`
12
+ `))}}}),await Promise.all([M(r,{protocol:H,apiVersion:L,id:"search-snapshots",setup(t){o=t}}),D(r,me),Z(r,{protocol:Q,apiVersion:U,id:"local",setup(t){t.addScopeProvider((e,n)=>s.resolveSearchScope(e,n)),t.addSelectionProvider((e,n)=>s.register(e.request.query,e.matches,e.complete,n.cwd,n.signal,{...e.request,regex:!1},e.refresh,void 0,n.environment)),t.addResolver({resolver:ve(s),priority:-10}),t.addResolver({resolver:Ae(),priority:-10}),t.addResolver({resolver:xe(s),fallback:!0}),t.describe(["Local queries try literal terms first, then unquoted terms as regex when no literal results exist, then separate words for ordinary multi-word queries. Quoted terms stay literal. Boolean conditions stay intact across fallback. Uppercase AND/OR, infix NOT, ||, and space-separated | are Boolean operators; unspaced | and regex groups/classes belong to regex terms. Parentheses containing Boolean operators group Boolean conditions. regex:<pattern> forces regex-only matching; files:<pattern> searches file paths: glob patterns use *, **, ?, character classes and braces; other queries use case-insensitive subsequence matching. Slash-containing globs match cwd-relative paths; basename globs match at any depth.","After a complete zero result, a single unquoted ASCII identifier may produce separate possible-name groups: naming-style changes, one leading/trailing component, then small typos. Each group reports a verified case-sensitive whole-identifier alternative in the same scope, its count/completeness, and Read references. Budget skips are explicit. A candidate all-reference refreshes that exact alternative, not the fuzzy ranking. Registered local candidate selections also expose strict snapshot targets. Result scopes stay exact and do not run this extra branch.","The result says when a query was broadened. Empty or unknown prefixes are searched as plain text. A recognized prefixed query returns its own results or error; it does not silently become a text search.","SEARCH#HASH:N:line selects one containing line; :match selects its exact match. :all:line selects all unique containing lines and :all:match selects all matches. Read returns containing lines for both forms. A SEARCH resource can be used as a read path or mutation path/anchor; omit the file path for an all-selection spanning files.","Use SEARCH references exactly as returned to select the matching content. A single-result reference becomes stale when its file changes; obtain a fresh result before using it again. An :all reference refreshes the original query when a selected file changes. Search compacts noisy files when the detail limit is exceeded; narrow the query to that file to see individual matches. Compaction does not remove complete :all selections."].join(`
13
+ `))}}),J(r,{protocol:V,apiVersion:G,id:"search-anchors",setup(t){t.tool("replace").addHandler({stage:"text-post-edit",async handler(e){if(!e.result||typeof e.result!="object"||!("kind"in e.result)||e.result.kind!=="completed"||!e.input||typeof e.input!="object")return e;let n=e.input,a=await s.observeAfterEdit([n.path,n.start,n.end],e.signal);return a.length===0?e:{...e,metadata:{...e.metadata,searchObservations:a}}}}),t.addAnchorResolver({resolver:s.anchorResolver(),resources:s.resourceResolver(),kind:W,type:"auxiliary",describeInPrompt:!1})}})])}f(He,"registerTextSearch");export{Ce as createSearchSessionId,He as default};
package/dist/entry-56.js CHANGED
@@ -1 +1 @@
1
- import{b as a,c as b,d as c}from"./chunk-D4IA2MTA.js";import"./chunk-OI3HBIPK.js";import"./chunk-YTYLS2UM.js";import"./chunk-PS2B6THP.js";import"./chunk-DXONCYWF.js";import"./chunk-EI7MMDWY.js";export{b as createFuzzyPresentation,a as createSearchToolDetails,c as isSearchToolDetails};
1
+ import{g as a,h as b,i as c,j as d,k as e}from"./chunk-T7MWQQIF.js";import"./chunk-PLKYHUNT.js";import"./chunk-ZPT5D4VP.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{e as SearchSessionStore,d as SearchSnapshotChangedError,c as allocateSearchSessionId,a as createSearchSessionId,b as createSearchSessionIdentity};
package/dist/entry-57.js CHANGED
@@ -1 +1 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"./chunk-ZPT5D4VP.js";import"./chunk-EI7MMDWY.js";export{a as TextAnchor,b as attachTextAnchorRenderer,p as createTextContentConverter,m as createTextDocument,c as getTextAnchorRenderer,i as getTextSourceLine,g as isTextAnchorRecoveryOutcome,f as isTextAnchorResolutionAttempt,e as isTextAnchorResolver,k as isTextLinePresenter,l as isTextPresenterRegistration,s as isTextTargetResolutionAttempt,q as isTextualMediaType,o as renderPresentedTextDocument,h as renderPresentedTextRows,d as renderTextAnchor,n as renderTextDocument,u as restoreText,t as storeText,r as textFromAgentContent,j as withTextSourceLine};
1
+ import{b as a,c as b}from"./chunk-LEJKDYCK.js";import"./chunk-6TJPMBUQ.js";import"./chunk-4DIUPEDF.js";import"./chunk-I6NPILT5.js";import"./chunk-PS2B6THP.js";import"./chunk-LCWBVOII.js";import"./chunk-ZPT5D4VP.js";import"./chunk-EI7MMDWY.js";export{b as SearchResultPanel,a as renderSearchResult};
package/dist/entry-58.js CHANGED
@@ -1 +1 @@
1
- import{a as d}from"./chunk-M4TVRCMZ.js";import{c as s,d as l,e as c}from"./chunk-TGC2ZACO.js";import"./chunk-DXONCYWF.js";import{a as i}from"./chunk-ZPT5D4VP.js";import{a as t}from"./chunk-EI7MMDWY.js";var o=class extends i{static{t(this,"ConstantTextAnchor")}constructor(n,r){super(n,r)}};function p(){return{id:"file-position",description:"`begin` and `end` select the first and last existing lines.",renderFull(e){return e},renderCompact(e){return e==="begin"?"file start":"file end"},tryResolve(e,n){return Promise.resolve(a(e,n))}}}t(p,"createConstantTextAnchorResolver");function a(e,n){return e!=="begin"&&e!=="end"?{kind:"not-handled"}:n.lines.length===0?{kind:"failed",error:new Error(`${e} cannot resolve in an empty file`)}:{kind:"resolved",anchor:new o(e,e==="begin"?1:n.lines.length)}}t(a,"resolveConstantAnchor");async function T(e){await d(e,{protocol:s,apiVersion:l,id:"text-anchor-constant",setup(r){r.addAnchorResolver({resolver:p(),kind:c,type:"constant"})}})}t(T,"registerConstantTextAnchors");export{T as default};
1
+ import{b as a,c as b,d as c}from"./chunk-6TJPMBUQ.js";import"./chunk-4DIUPEDF.js";import"./chunk-I6NPILT5.js";import"./chunk-PS2B6THP.js";import"./chunk-LCWBVOII.js";import"./chunk-EI7MMDWY.js";export{b as createFuzzyPresentation,a as createSearchToolDetails,c as isSearchToolDetails};
package/dist/entry-59.js CHANGED
@@ -1 +1 @@
1
- import{a,b,c}from"./chunk-QRJLIV6P.js";import"./chunk-PLKYHUNT.js";import"./chunk-ZPT5D4VP.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as createExactTextAnchorResolver,c as findExactTextMatches,b as resolveExactTextAnchor};
1
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"./chunk-ZPT5D4VP.js";import"./chunk-EI7MMDWY.js";export{a as TextAnchor,b as attachTextAnchorRenderer,p as createTextContentConverter,m as createTextDocument,c as getTextAnchorRenderer,i as getTextSourceLine,g as isTextAnchorRecoveryOutcome,f as isTextAnchorResolutionAttempt,e as isTextAnchorResolver,k as isTextLinePresenter,l as isTextPresenterRegistration,s as isTextTargetResolutionAttempt,q as isTextualMediaType,o as renderPresentedTextDocument,h as renderPresentedTextRows,d as renderTextAnchor,n as renderTextDocument,u as restoreText,t as storeText,r as textFromAgentContent,j as withTextSourceLine};
package/dist/entry-6.js CHANGED
@@ -1 +1 @@
1
- import{a,b,c,d,e,f,g}from"./chunk-57F5GTHO.js";import"./chunk-EI7MMDWY.js";export{c as TIP_API_VERSION,d as TIP_CORE_READY_EVENT,b as TIP_PROTOCOL,e as TIP_PROVIDER_REGISTER_EVENT,a as connectTipProvider,f as isTipCoreReady,g as isTipProviderRegistrationRequest};
1
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q}from"./chunk-IMGIDBCC.js";import"./chunk-BXGMMZT3.js";import"./chunk-756K3LJY.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as TOOL_CONFIG_VERSION,b as configuredExecutableName,p as createConfiguredProcessEnvironment,j as hasConfiguredExecutable,g as loadLayeredToolConfig,h as matchesConfiguredFile,n as parseFormattersConfig,o as parseLintersConfig,d as projectIdeConfigDirectory,e as projectIdeConfigPath,q as recipeMatchesFile,c as resolveExternalToolProjectRoot,f as resolveToolConfigPaths,m as runConfiguredFormatter,l as runConfiguredProcess,i as selectConfiguredEntry,k as toolRuntimeEvidence};
package/dist/entry-60.js CHANGED
@@ -1 +1 @@
1
- import{a as b}from"./chunk-QRJLIV6P.js";import"./chunk-PLKYHUNT.js";import{a as g}from"./chunk-M4TVRCMZ.js";import{c as m,d as y,f as x}from"./chunk-TGC2ZACO.js";import"./chunk-DXONCYWF.js";import"./chunk-ZPT5D4VP.js";import"./chunk-ZC65Z3CK.js";import{a as r}from"./chunk-EI7MMDWY.js";import z from"node:path";import{readFileSync as C}from"node:fs";import v from"node:path";function p(e){let t=w(e.settings,"recovery.exactText");t!==void 0&&T(t,["fuzzyEnabled","threshold","exactCandidateLimit","fuzzyCandidateLimit","maxFileSizeMiB","maxQuerySizeKiB","seedLimit","blockLineVariance"],"recovery.exactText");let n=r(i=>t===void 0?void 0:t[i],"value");return{fuzzyEnabled:h(n("fuzzyEnabled"),"fuzzyEnabled")??!0,threshold:f(n("threshold"),"threshold",0,1)??.8,exactCandidateLimit:u(n("exactCandidateLimit"),"exactCandidateLimit",1,100)??20,fuzzyCandidateLimit:u(n("fuzzyCandidateLimit"),"fuzzyCandidateLimit",1,20)??5,maxFileSizeMiB:f(n("maxFileSizeMiB"),"maxFileSizeMiB",.01,100)??20,maxQuerySizeKiB:f(n("maxQuerySizeKiB"),"maxQuerySizeKiB",.01,4096)??1024,seedLimit:u(n("seedLimit"),"seedLimit",1,10)??3,blockLineVariance:u(n("blockLineVariance"),"blockLineVariance",0,10)??2,contextLines:e.contextLines,timeoutMs:e.timeoutMs}}r(p,"parseExactTextRecoveryConfig");function E(e,t){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError(`${t} must be an object`);return Object.fromEntries(Object.entries(e))}r(E,"objectRecord");function w(e,t){return e===void 0?void 0:E(e,t)}r(w,"optionalObject");function T(e,t,n){let i=new Set(t),o=Object.keys(e).find(l=>!i.has(l));if(o!==void 0)throw new TypeError(`${n} contains unknown key ${o}`)}r(T,"assertKeys");function h(e,t){if(e===void 0||typeof e=="boolean")return e;throw new TypeError(`${t} must be a boolean`)}r(h,"optionalBoolean");function f(e,t,n,i){if(e!==void 0){if(typeof e!="number"||!Number.isFinite(e)||e<n||e>i)throw new RangeError(`${t} must be between ${n} and ${i}`);return e}}r(f,"optionalNumber");function u(e,t,n,i){let o=f(e,t,n,i);if(o!==void 0&&!Number.isInteger(o))throw new TypeError(`${t} must be an integer`);return o}r(u,"optionalInteger");function L(e){return["path","file","target","start","end","anchor","targetStart","targetEnd","change"].some(t=>{let n=e[t];return(Array.isArray(n)?n:[n]).some(o=>typeof o=="string"&&/^(?:RESULT#|SEARCH#|CHANGE#|scope-(?:begin|end)-|\d+#[a-f\d]+$|begin$|end$|<system-result)/iu.test(o))})}r(L,"usesRegisteredSelector");async function R(e){let t=new Set,n=new Set,i=r((d,a)=>z.resolve(a,d),"key"),o=r(()=>{t.clear(),n.clear()},"clear");e.on("session_start",o),e.on("session_shutdown",o),e.on("agent_end",()=>n.clear()),e.on("tool_result",(d,a)=>{let s=d.details;for(let c of s?.metadata?.exactTextFailures??[])t.add(i(c,a.cwd)),n.delete(i(c,a.cwd));if(!(d.isError||!L(d.input))){if(s?.nativeEditBatch?.state==="accepted"&&s.source){let c=i(s.source,a.cwd);t.has(c)&&n.add(c);return}for(let c of s?.results??[])c.data?.ok&&c.data.path&&t.delete(i(c.data.path,a.cwd))}}),await g(e,{protocol:m,apiVersion:y,id:"text-anchor-exact",setup(d){d.onDidEdit(a=>{let s=i(a.resourceSource,a.cwd);n.delete(s)&&t.delete(s)}),d.addAnchorResolver({resolver:b(p(d.recoveryConfig("exactText")),(a,s)=>t.has(i(a,s))),kind:x,type:"auxiliary",describeInPrompt:!1,priority:1e4})}})}r(R,"registerExactTextAnchor");export{R as default};
1
+ import{a as d}from"./chunk-XXLLY66B.js";import{c as s,d as l,e as c}from"./chunk-235QMMVA.js";import"./chunk-LCWBVOII.js";import{a as i}from"./chunk-ZPT5D4VP.js";import{a as t}from"./chunk-EI7MMDWY.js";var o=class extends i{static{t(this,"ConstantTextAnchor")}constructor(n,r){super(n,r)}};function p(){return{id:"file-position",description:"`begin` and `end` select the first and last existing lines.",renderFull(e){return e},renderCompact(e){return e==="begin"?"file start":"file end"},tryResolve(e,n){return Promise.resolve(a(e,n))}}}t(p,"createConstantTextAnchorResolver");function a(e,n){return e!=="begin"&&e!=="end"?{kind:"not-handled"}:n.lines.length===0?{kind:"failed",error:new Error(`${e} cannot resolve in an empty file`)}:{kind:"resolved",anchor:new o(e,e==="begin"?1:n.lines.length)}}t(a,"resolveConstantAnchor");async function T(e){await d(e,{protocol:s,apiVersion:l,id:"text-anchor-constant",setup(r){r.addAnchorResolver({resolver:p(),kind:c,type:"constant"})}})}t(T,"registerConstantTextAnchors");export{T as default};
package/dist/entry-61.js CHANGED
@@ -1 +1 @@
1
- import{a,b,c,d,e}from"./chunk-KZC7TI5M.js";import"./chunk-ZPT5D4VP.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{b as createLineHashAnchor,e as createLineHashAnchorResolver,c as formatLineHashAnchor,a as hashLine,d as renderLineHashLines};
1
+ import{a,b,c}from"./chunk-QRJLIV6P.js";import"./chunk-PLKYHUNT.js";import"./chunk-ZPT5D4VP.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as createExactTextAnchorResolver,c as findExactTextMatches,b as resolveExactTextAnchor};
package/dist/entry-62.js CHANGED
@@ -1 +1 @@
1
- import{b as T,e as x}from"./chunk-KZC7TI5M.js";import{a as P}from"./chunk-M4TVRCMZ.js";import{c as m,d as u,e as f}from"./chunk-TGC2ZACO.js";import{a as l}from"./chunk-BU7IZLKB.js";import{a as p,b as h}from"./chunk-S5PL5DFQ.js";import"./chunk-DXONCYWF.js";import{i as d}from"./chunk-ZPT5D4VP.js";import"./chunk-ZC65Z3CK.js";import{a}from"./chunk-EI7MMDWY.js";function g(){return{id:"line-hash",present(r,n){let o=r.lines.map(e=>{let i=(n.resolvedBy==="filesystem"||n.resolvedBy==="ssh")&&(n.purpose==="edit-diff"&&n.sourceText===void 0||n.sourceText===r.content)?{lineNumber:e.lineNumber,content:e.content}:d(e);return i===void 0?void 0:{anchor:T(i.lineNumber,i.content),lineNumber:i.lineNumber}}),c=Math.max(0,...o.map(e=>e?.anchor.value.length??0)),t=Math.max(0,...o.map(e=>String(e?.lineNumber??"").length)),E=r.lines.map((e,i)=>{let s=o[i];return s===void 0?e:{...e,anchors:[...new Set([...e.anchors??[],s.anchor.value])],presentation:{...e.presentation,prefix:`${s.anchor.value.padStart(c)}|${e.presentation?.prefix??""}`,compactPrefix:e.presentation?.compactPrefix??`${String(s.lineNumber).padStart(t)} \u2502 `}}});return{...r,lines:E}}}}a(g,"createLineHashPresenter");async function R(r){let n=g(),o={protocol:p,apiVersion:h,id:"text-anchor-line-hash",setup(t){t.addView({view:"anchors",presenter:n}),t.describe({views:"anchors \u2014 annotate text with returned line references in the form LINE#HASH, e.g. 12#A4F0 (line number 12 and its content hash). These references select source lines in edits or path#anchor reads; display annotations are not file content."})}},c={protocol:m,apiVersion:u,id:"text-anchor-line-hash",setup(t){t.addAnchorResolver({resolver:x(),kind:f,type:"major"}),t.addTextPresenter({presenter:n})}};await Promise.all([l(r,o),P(r,c)])}a(R,"registerLineHashTextAnchor");export{R as default};
1
+ import{a as b}from"./chunk-QRJLIV6P.js";import"./chunk-PLKYHUNT.js";import{a as g}from"./chunk-XXLLY66B.js";import{c as m,d as y,f as x}from"./chunk-235QMMVA.js";import"./chunk-LCWBVOII.js";import"./chunk-ZPT5D4VP.js";import"./chunk-ZC65Z3CK.js";import{a as r}from"./chunk-EI7MMDWY.js";import z from"node:path";import{readFileSync as C}from"node:fs";import v from"node:path";function p(e){let t=w(e.settings,"recovery.exactText");t!==void 0&&T(t,["fuzzyEnabled","threshold","exactCandidateLimit","fuzzyCandidateLimit","maxFileSizeMiB","maxQuerySizeKiB","seedLimit","blockLineVariance"],"recovery.exactText");let n=r(i=>t===void 0?void 0:t[i],"value");return{fuzzyEnabled:h(n("fuzzyEnabled"),"fuzzyEnabled")??!0,threshold:f(n("threshold"),"threshold",0,1)??.8,exactCandidateLimit:u(n("exactCandidateLimit"),"exactCandidateLimit",1,100)??20,fuzzyCandidateLimit:u(n("fuzzyCandidateLimit"),"fuzzyCandidateLimit",1,20)??5,maxFileSizeMiB:f(n("maxFileSizeMiB"),"maxFileSizeMiB",.01,100)??20,maxQuerySizeKiB:f(n("maxQuerySizeKiB"),"maxQuerySizeKiB",.01,4096)??1024,seedLimit:u(n("seedLimit"),"seedLimit",1,10)??3,blockLineVariance:u(n("blockLineVariance"),"blockLineVariance",0,10)??2,contextLines:e.contextLines,timeoutMs:e.timeoutMs}}r(p,"parseExactTextRecoveryConfig");function E(e,t){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError(`${t} must be an object`);return Object.fromEntries(Object.entries(e))}r(E,"objectRecord");function w(e,t){return e===void 0?void 0:E(e,t)}r(w,"optionalObject");function T(e,t,n){let i=new Set(t),o=Object.keys(e).find(l=>!i.has(l));if(o!==void 0)throw new TypeError(`${n} contains unknown key ${o}`)}r(T,"assertKeys");function h(e,t){if(e===void 0||typeof e=="boolean")return e;throw new TypeError(`${t} must be a boolean`)}r(h,"optionalBoolean");function f(e,t,n,i){if(e!==void 0){if(typeof e!="number"||!Number.isFinite(e)||e<n||e>i)throw new RangeError(`${t} must be between ${n} and ${i}`);return e}}r(f,"optionalNumber");function u(e,t,n,i){let o=f(e,t,n,i);if(o!==void 0&&!Number.isInteger(o))throw new TypeError(`${t} must be an integer`);return o}r(u,"optionalInteger");function L(e){return["path","file","target","start","end","anchor","targetStart","targetEnd","change"].some(t=>{let n=e[t];return(Array.isArray(n)?n:[n]).some(o=>typeof o=="string"&&/^(?:RESULT#|SEARCH#|CHANGE#|scope-(?:begin|end)-|\d+#[a-f\d]+$|begin$|end$|<system-result)/iu.test(o))})}r(L,"usesRegisteredSelector");async function R(e){let t=new Set,n=new Set,i=r((d,a)=>z.resolve(a,d),"key"),o=r(()=>{t.clear(),n.clear()},"clear");e.on("session_start",o),e.on("session_shutdown",o),e.on("agent_end",()=>n.clear()),e.on("tool_result",(d,a)=>{let s=d.details;for(let c of s?.metadata?.exactTextFailures??[])t.add(i(c,a.cwd)),n.delete(i(c,a.cwd));if(!(d.isError||!L(d.input))){if(s?.nativeEditBatch?.state==="accepted"&&s.source){let c=i(s.source,a.cwd);t.has(c)&&n.add(c);return}for(let c of s?.results??[])c.data?.ok&&c.data.path&&t.delete(i(c.data.path,a.cwd))}}),await g(e,{protocol:m,apiVersion:y,id:"text-anchor-exact",setup(d){d.onDidEdit(a=>{let s=i(a.resourceSource,a.cwd);n.delete(s)&&t.delete(s)}),d.addAnchorResolver({resolver:b(p(d.recoveryConfig("exactText")),(a,s)=>t.has(i(a,s))),kind:x,type:"auxiliary",describeInPrompt:!1,priority:1e4})}})}r(R,"registerExactTextAnchor");export{R as default};
package/dist/entry-63.js CHANGED
@@ -0,0 +1 @@
1
+ import{a,b,c,d,e}from"./chunk-KZC7TI5M.js";import"./chunk-ZPT5D4VP.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{b as createLineHashAnchor,e as createLineHashAnchorResolver,c as formatLineHashAnchor,a as hashLine,d as renderLineHashLines};
package/dist/entry-64.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-M4TVRCMZ.js";import"./chunk-TGC2ZACO.js";import"./chunk-DXONCYWF.js";import"./chunk-ZPT5D4VP.js";import"./chunk-EI7MMDWY.js";export{a as connectTextEditorPlugin};
1
+ import{b as T,e as x}from"./chunk-KZC7TI5M.js";import{a as P}from"./chunk-XXLLY66B.js";import{c as m,d as u,e as f}from"./chunk-235QMMVA.js";import{a as l}from"./chunk-BU7IZLKB.js";import{a as p,b as h}from"./chunk-S5PL5DFQ.js";import"./chunk-LCWBVOII.js";import{i as d}from"./chunk-ZPT5D4VP.js";import"./chunk-ZC65Z3CK.js";import{a}from"./chunk-EI7MMDWY.js";function g(){return{id:"line-hash",present(r,n){let o=r.lines.map(e=>{let i=(n.resolvedBy==="filesystem"||n.resolvedBy==="ssh")&&(n.purpose==="edit-diff"&&n.sourceText===void 0||n.sourceText===r.content)?{lineNumber:e.lineNumber,content:e.content}:d(e);return i===void 0?void 0:{anchor:T(i.lineNumber,i.content),lineNumber:i.lineNumber}}),c=Math.max(0,...o.map(e=>e?.anchor.value.length??0)),t=Math.max(0,...o.map(e=>String(e?.lineNumber??"").length)),E=r.lines.map((e,i)=>{let s=o[i];return s===void 0?e:{...e,anchors:[...new Set([...e.anchors??[],s.anchor.value])],presentation:{...e.presentation,prefix:`${s.anchor.value.padStart(c)}|${e.presentation?.prefix??""}`,compactPrefix:e.presentation?.compactPrefix??`${String(s.lineNumber).padStart(t)} \u2502 `}}});return{...r,lines:E}}}}a(g,"createLineHashPresenter");async function R(r){let n=g(),o={protocol:p,apiVersion:h,id:"text-anchor-line-hash",setup(t){t.addView({view:"anchors",presenter:n}),t.describe({views:"anchors \u2014 annotate text with returned line references in the form LINE#HASH, e.g. 12#A4F0 (line number 12 and its content hash). These references select source lines in edits or path#anchor reads; display annotations are not file content."})}},c={protocol:m,apiVersion:u,id:"text-anchor-line-hash",setup(t){t.addAnchorResolver({resolver:x(),kind:f,type:"major"}),t.addTextPresenter({presenter:n})}};await Promise.all([l(r,o),P(r,c)])}a(R,"registerLineHashTextAnchor");export{R as default};
package/dist/entry-66.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-U22JNO6N.js";import"./chunk-EI7MMDWY.js";export{a as isTextEditHandlerRegistration};
1
+ import{a}from"./chunk-XXLLY66B.js";import"./chunk-235QMMVA.js";import"./chunk-LCWBVOII.js";import"./chunk-ZPT5D4VP.js";import"./chunk-EI7MMDWY.js";export{a as connectTextEditorPlugin};
package/dist/entry-67.js CHANGED
@@ -1 +0,0 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk-TGC2ZACO.js";import"./chunk-DXONCYWF.js";import"./chunk-ZPT5D4VP.js";import"./chunk-EI7MMDWY.js";export{d as TEXT_EDITOR_API_VERSION,g as TEXT_EDITOR_CORE_READY_EVENT,h as TEXT_EDITOR_PLUGIN_REGISTER_EVENT,c as TEXT_EDITOR_PROTOCOL,e as TEXT_POSITION_ANCHOR_KIND,f as TEXT_SEARCH_ANCHOR_KIND,j as isResourceResolverRegistration,k as isTextAnchorResolverRegistration,l as isTextAnchorResourceResolutionAttempt,m as isTextEditorCoreReady,n as isTextEditorPlugin,o as isTextEditorPluginRegistrationRequest,i as isTextEditorToolId,b as localFileTransferAccess,a as snapshotLocalObjects};
package/dist/entry-68.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-MXLSGMRZ.js";import"./chunk-EI7MMDWY.js";export{a as formatStaleAnchorMessage};
1
+ import{a}from"./chunk-U22JNO6N.js";import"./chunk-EI7MMDWY.js";export{a as isTextEditHandlerRegistration};
package/dist/entry-69.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-PLKYHUNT.js";import"./chunk-ZPT5D4VP.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as TextSelectionAnchor};
1
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk-235QMMVA.js";import"./chunk-LCWBVOII.js";import"./chunk-ZPT5D4VP.js";import"./chunk-EI7MMDWY.js";export{d as TEXT_EDITOR_API_VERSION,g as TEXT_EDITOR_CORE_READY_EVENT,h as TEXT_EDITOR_PLUGIN_REGISTER_EVENT,c as TEXT_EDITOR_PROTOCOL,e as TEXT_POSITION_ANCHOR_KIND,f as TEXT_SEARCH_ANCHOR_KIND,j as isResourceResolverRegistration,k as isTextAnchorResolverRegistration,l as isTextAnchorResourceResolutionAttempt,m as isTextEditorCoreReady,n as isTextEditorPlugin,o as isTextEditorPluginRegistrationRequest,i as isTextEditorToolId,b as localFileTransferAccess,a as snapshotLocalObjects};
package/dist/entry-7.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-57F5GTHO.js";import"./chunk-EI7MMDWY.js";export{a as connectTipProvider};
1
+ import"./chunk-K4ZMRDEI.js";
package/dist/entry-70.js CHANGED
@@ -1 +1 @@
1
- import{a,d as b,g as c,h as d,i as e,j as f,k as g,l as h,m as i}from"./chunk-A64JRDZK.js";import"./chunk-TGC2ZACO.js";import"./chunk-DXONCYWF.js";import"./chunk-ZPT5D4VP.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{c as TEXT_EDITOR_POST_EDIT_REGISTER_EVENT,a as afterPostEditScope,i as connectTextEditorPostEditHandler,b as hasDeferredPostEdit,e as isDiffStatusContribution,d as isFormattingContribution,h as isTextMutationResultContributionData,f as isTextPostEditHandlerRegistration,g as isTextPostEditHandlerRegistrationRequest};
1
+ import{a}from"./chunk-MXLSGMRZ.js";import"./chunk-EI7MMDWY.js";export{a as formatStaleAnchorMessage};
package/dist/entry-71.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-YGGKGZO2.js";import"./chunk-EI7MMDWY.js";export{a as NATIVE_EDIT_BATCH_EVENT};
1
+ import{a}from"./chunk-PLKYHUNT.js";import"./chunk-ZPT5D4VP.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{a as TextSelectionAnchor};
package/dist/entry-72.js CHANGED
@@ -1 +1 @@
1
- import{a,b,d as c}from"./chunk-QUYXINGZ.js";import{a as d,b as e,d as f}from"./chunk-PRLIHLCS.js";import"./chunk-DXONCYWF.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{b as FileMutationResult,a as FileRange,c as computeChangedRanges,d as mutationDataSchema,e as mutationResultSchema,f as structuredMutation};
1
+ import{a,d as b,g as c,h as d,i as e,j as f,k as g,l as h,m as i}from"./chunk-AAC77UD4.js";import"./chunk-235QMMVA.js";import"./chunk-LCWBVOII.js";import"./chunk-ZPT5D4VP.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{c as TEXT_EDITOR_POST_EDIT_REGISTER_EVENT,a as afterPostEditScope,i as connectTextEditorPostEditHandler,b as hasDeferredPostEdit,e as isDiffStatusContribution,d as isFormattingContribution,h as isTextMutationResultContributionData,f as isTextPostEditHandlerRegistration,g as isTextPostEditHandlerRegistrationRequest};
package/dist/entry-73.js CHANGED
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-YGGKGZO2.js";import"./chunk-EI7MMDWY.js";export{a as NATIVE_EDIT_BATCH_EVENT};
package/dist/entry-74.js CHANGED
@@ -1 +1 @@
1
- import{a,b,c}from"./chunk-2RTCSZB3.js";import"./chunk-EI7MMDWY.js";export{b as assertTextMutationToolRegistration,a as isMutationAnchorValue,c as mutationSource};
1
+ import{a,b,d as c}from"./chunk-QUYXINGZ.js";import{a as d,b as e,d as f}from"./chunk-XLWCSJMR.js";import"./chunk-LCWBVOII.js";import"./chunk-ZC65Z3CK.js";import"./chunk-EI7MMDWY.js";export{b as FileMutationResult,a as FileRange,c as computeChangedRanges,d as mutationDataSchema,e as mutationResultSchema,f as structuredMutation};
package/dist/entry-76.js CHANGED
@@ -1 +1 @@
1
- import{a,b,c}from"./chunk-YHADTHQM.js";import"./chunk-EI7MMDWY.js";export{c as clearLastResolvedResource,b as getLastResolvedResource,a as rememberLastResolvedResource};
1
+ import{a,b,c}from"./chunk-2RTCSZB3.js";import"./chunk-EI7MMDWY.js";export{b as assertTextMutationToolRegistration,a as isMutationAnchorValue,c as mutationSource};
package/dist/entry-77.js CHANGED
@@ -1 +0,0 @@
1
- import{a as b,b as c}from"./chunk-HFJGCYFO.js";import{c as a}from"./chunk-XH5WN5XA.js";import"./chunk-PRLIHLCS.js";import"./chunk-PS2B6THP.js";import"./chunk-DXONCYWF.js";import"./chunk-EI7MMDWY.js";export{a as getToolCallInterception,c as registerToolCallAnnotationSink,b as registerToolCallInterceptor};
package/dist/entry-78.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-J34VKQGJ.js";import"./chunk-EI7MMDWY.js";export{a as isTextEditorToolRendererRegistration};
1
+ import{a,b,c}from"./chunk-YHADTHQM.js";import"./chunk-EI7MMDWY.js";export{c as clearLastResolvedResource,b as getLastResolvedResource,a as rememberLastResolvedResource};