pi-agent-ide 0.7.0 → 0.7.2

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 (323) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/chunk-6U5OU77O.js +3 -0
  3. package/dist/{chunk-6CZO43OH.js → chunk-BU7IZLKB.js} +1 -1
  4. package/dist/chunk-EURHXLN3.js +2 -0
  5. package/dist/{chunk-PYPPV2F5.js → chunk-F6IWZKOG.js} +6 -6
  6. package/dist/{chunk-GBLKIB6O.js → chunk-H445SHSJ.js} +2 -2
  7. package/dist/chunk-IG56UGSO.js +2 -0
  8. package/dist/chunk-IICJXZBU.js +6 -0
  9. package/dist/{chunk-XYS4FSCC.js → chunk-IM24DB3K.js} +1 -1
  10. package/dist/{chunk-YRF7OATP.js → chunk-KOVPDKSJ.js} +1 -1
  11. package/dist/chunk-MXLSGMRZ.js +3 -0
  12. package/dist/chunk-NRZO5KJT.js +9 -0
  13. package/dist/chunk-OB46OPMZ.js +1 -0
  14. package/dist/chunk-PKSQT6TC.js +1 -0
  15. package/dist/{chunk-PNU3E7IO.js → chunk-Q6CZ6GBR.js} +2 -2
  16. package/dist/{chunk-EDURPQAV.js → chunk-QRJLIV6P.js} +6 -6
  17. package/dist/chunk-QUYXINGZ.js +7 -0
  18. package/dist/{chunk-OBNING2A.js → chunk-S5PL5DFQ.js} +1 -1
  19. package/dist/chunk-SBP3ABH4.js +5 -0
  20. package/dist/{chunk-FXNKMNSJ.js → chunk-SJ4UZ4GU.js} +1 -1
  21. package/dist/chunk-SNF7PDDX.js +11 -0
  22. package/dist/{chunk-AJRIASPQ.js → chunk-STBJO3Z3.js} +1 -1
  23. package/dist/{chunk-3HYXQ4YA.js → chunk-TQGE7RH6.js} +13 -13
  24. package/dist/{chunk-S5LXX32D.js → chunk-XDG7EQRN.js} +3 -3
  25. package/dist/{chunk-F5YZG77W.js → chunk-XH5WN5XA.js} +1 -1
  26. package/dist/chunk-YWQS33DF.js +1 -0
  27. package/dist/chunk-ZIWPKIBZ.js +1 -0
  28. package/dist/entry-11.js +1 -1
  29. package/dist/entry-13.js +1 -1
  30. package/dist/entry-14.js +1 -1
  31. package/dist/entry-15.js +1 -1
  32. package/dist/entry-17.js +1 -1
  33. package/dist/entry-25.js +2 -2
  34. package/dist/entry-26.js +1 -1
  35. package/dist/entry-27.js +2 -2
  36. package/dist/entry-28.js +1 -1
  37. package/dist/entry-29.js +1 -1
  38. package/dist/entry-31.js +15 -13
  39. package/dist/entry-33.js +2 -1
  40. package/dist/entry-37.js +6 -6
  41. package/dist/entry-41.js +1 -1
  42. package/dist/entry-42.js +1 -1
  43. package/dist/entry-43.js +1 -1
  44. package/dist/entry-44.js +1 -1
  45. package/dist/entry-45.js +20 -13
  46. package/dist/entry-46.js +1 -1
  47. package/dist/entry-49.js +1 -1
  48. package/dist/entry-50.js +1 -1
  49. package/dist/entry-51.js +8 -7
  50. package/dist/entry-52.js +1 -1
  51. package/dist/entry-53.js +1 -1
  52. package/dist/entry-54.js +1 -1
  53. package/dist/entry-56.js +1 -1
  54. package/dist/entry-57.js +1 -1
  55. package/dist/entry-58.js +1 -1
  56. package/dist/entry-60.js +1 -1
  57. package/dist/entry-62.js +1 -1
  58. package/dist/entry-65.js +1 -1
  59. package/dist/entry-66.js +1 -1
  60. package/dist/entry-68.js +1 -1
  61. package/dist/entry-70.js +1 -1
  62. package/dist/entry-75.js +1 -1
  63. package/dist/entry-77.js +51 -43
  64. package/dist/entry-78.js +14 -14
  65. package/dist/entry-79.js +1 -1
  66. package/dist/entry-80.js +1 -1
  67. package/dist/entry-82.js +5 -5
  68. package/dist/entry-83.js +1 -1
  69. package/dist/entry-84.js +1 -1
  70. package/dist/entry-85.js +1 -1
  71. package/dist/entry-86.js +1 -1
  72. package/dist/pi-agent-ide.js +37 -9
  73. package/docs/agent-guides/editing.md +35 -46
  74. package/docs/agent-guides/git-changes.md +10 -0
  75. package/docs/agent-guides/read-resources.md +9 -50
  76. package/docs/agent-guides/search-code.md +18 -17
  77. package/docs/agent-guides/select-code.md +62 -140
  78. package/docs/agent-guides/terminal.md +9 -1
  79. package/docs/configuration.md +1 -1
  80. package/docs/releases.md +4 -0
  81. package/docs/research/native-codemode-batch-decision.md +2 -0
  82. package/docs/structured-results.md +27 -62
  83. package/docs/tools.md +15 -11
  84. package/node_modules/pi-agent-doctor/package.json +1 -1
  85. package/node_modules/pi-agent-documentation/package.json +1 -1
  86. package/node_modules/pi-agent-filesystem/index.ts +7 -6
  87. package/node_modules/pi-agent-filesystem/package.json +7 -7
  88. package/node_modules/pi-agent-filesystem-image/package.json +3 -3
  89. package/node_modules/pi-agent-filesystem-jq/index.ts +4 -3
  90. package/node_modules/pi-agent-filesystem-jq/package.json +5 -5
  91. package/node_modules/pi-agent-filesystem-jq/src/jq.ts +4 -1
  92. package/node_modules/pi-agent-filesystem-pdf/package.json +3 -3
  93. package/node_modules/pi-agent-filesystem-text/package.json +3 -3
  94. package/node_modules/pi-agent-ide-ast/package.json +13 -13
  95. package/node_modules/pi-agent-ide-ast/src/extension.ts +5 -4
  96. package/node_modules/pi-agent-ide-ast/src/overflow-handler.ts +2 -2
  97. package/node_modules/pi-agent-ide-ast/src/search-resolver.ts +35 -9
  98. package/node_modules/pi-agent-ide-ast/src/select-presentation.ts +1 -1
  99. package/node_modules/pi-agent-ide-ast/src/select-schema.ts +10 -8
  100. package/node_modules/pi-agent-ide-ast/src/tool-select.ts +28 -3
  101. package/node_modules/pi-agent-ide-changes/index.ts +4 -3
  102. package/node_modules/pi-agent-ide-changes/package.json +8 -8
  103. package/node_modules/pi-agent-ide-changes/src/tool-index-change.ts +66 -4
  104. package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +8 -11
  105. package/node_modules/pi-agent-ide-formatter/package.json +3 -3
  106. package/node_modules/pi-agent-ide-languages/package.json +2 -2
  107. package/node_modules/pi-agent-ide-lint/package.json +7 -7
  108. package/node_modules/pi-agent-ide-lsp/index.ts +3 -3
  109. package/node_modules/pi-agent-ide-lsp/package.json +9 -9
  110. package/node_modules/pi-agent-ide-lsp/src/search-resolver.ts +5 -2
  111. package/node_modules/pi-agent-image/package.json +2 -2
  112. package/node_modules/pi-agent-invariant/package.json +1 -1
  113. package/node_modules/pi-agent-pdf/package.json +2 -2
  114. package/node_modules/pi-agent-read/package.json +7 -7
  115. package/node_modules/pi-agent-read/src/api/plugin-protocol.ts +1 -1
  116. package/node_modules/pi-agent-read/src/api/read-parameters.ts +38 -1
  117. package/node_modules/pi-agent-read/src/api/tools/read.ts +18 -1
  118. package/node_modules/pi-agent-read/src/core/extension.ts +8 -2
  119. package/node_modules/pi-agent-read/src/core/read-core.ts +54 -35
  120. package/node_modules/pi-agent-read/src/core/tools/read/output-truncation.ts +91 -18
  121. package/node_modules/pi-agent-read/src/core/tools/read/raw-read.ts +8 -2
  122. package/node_modules/pi-agent-read/src/core/tools/read/read-renderer.ts +38 -1
  123. package/node_modules/pi-agent-read/src/core/tools/read/read-result.ts +57 -2
  124. package/node_modules/pi-agent-read/src/core/tools/read/structured-result.ts +3 -3
  125. package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +108 -46
  126. package/node_modules/pi-agent-resource/package.json +1 -1
  127. package/node_modules/pi-agent-resource/src/index.ts +1 -0
  128. package/node_modules/pi-agent-resource/src/result-targets.ts +186 -9
  129. package/node_modules/{pi-agent-read/src/core/tools/read → pi-agent-resource/src}/temp-resource-store.ts +17 -7
  130. package/node_modules/pi-agent-resource/src/tool-result.ts +13 -1
  131. package/node_modules/pi-agent-search/package.json +5 -5
  132. package/node_modules/pi-agent-search/src/api/fuzzy.ts +5 -1
  133. package/node_modules/pi-agent-search/src/api/search-parameters.ts +3 -3
  134. package/node_modules/pi-agent-search/src/core/extension.ts +2 -1
  135. package/node_modules/pi-agent-search/src/core/search-core.ts +13 -4
  136. package/node_modules/pi-agent-search-text/index.ts +1 -1
  137. package/node_modules/pi-agent-search-text/package.json +7 -7
  138. package/node_modules/pi-agent-search-text/src/resolvers.ts +11 -1
  139. package/node_modules/pi-agent-search-text/src/scoped-search.ts +1 -1
  140. package/node_modules/pi-agent-search-text/src/search-presentation.ts +42 -32
  141. package/node_modules/pi-agent-search-text/src/search-recipe.ts +1 -1
  142. package/node_modules/pi-agent-search-text/src/search-renderer.ts +6 -0
  143. package/node_modules/pi-agent-search-text/src/search-result.ts +17 -3
  144. package/node_modules/pi-agent-text/package.json +2 -2
  145. package/node_modules/pi-agent-text-anchor-constant/package.json +3 -3
  146. package/node_modules/pi-agent-text-anchor-exact/index.ts +65 -4
  147. package/node_modules/pi-agent-text-anchor-exact/package.json +3 -3
  148. package/node_modules/pi-agent-text-anchor-exact/src/anchor.ts +12 -2
  149. package/node_modules/pi-agent-text-anchor-line-hash/index.ts +4 -3
  150. package/node_modules/pi-agent-text-anchor-line-hash/package.json +5 -5
  151. package/node_modules/pi-agent-text-editor/package.json +9 -9
  152. package/node_modules/pi-agent-text-editor/src/api/edit-completion.ts +2 -2
  153. package/node_modules/pi-agent-text-editor/src/api/mutation-result.ts +2 -1
  154. package/node_modules/pi-agent-text-editor/src/api/native-edit-batch-event.ts +4 -0
  155. package/node_modules/pi-agent-text-editor/src/api/stale-anchor-message.ts +1 -1
  156. package/node_modules/pi-agent-text-editor/src/core/diff-tool.ts +54 -12
  157. package/node_modules/pi-agent-text-editor/src/core/editing-guidelines.ts +1 -1
  158. package/node_modules/pi-agent-text-editor/src/core/extension.ts +10 -3
  159. package/node_modules/pi-agent-text-editor/src/core/file-operations.ts +3 -13
  160. package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +35 -6
  161. package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +19 -1
  162. package/node_modules/pi-agent-text-editor/src/core/mutation-result-targets.ts +132 -11
  163. package/node_modules/pi-agent-text-editor/src/core/native-text-edit-batch.ts +232 -144
  164. package/node_modules/pi-agent-text-editor/src/core/post-edit-scope.ts +34 -10
  165. package/node_modules/pi-agent-text-editor/src/core/result-input.ts +24 -4
  166. package/node_modules/pi-agent-text-editor/src/core/result-transfer.ts +7 -2
  167. package/node_modules/pi-agent-text-editor/src/core/structured-result.ts +49 -214
  168. package/node_modules/pi-agent-text-editor/src/core/text-change-engine.ts +5 -1
  169. package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +152 -22
  170. package/node_modules/pi-agent-text-editor/src/core/text-edit-batch.ts +4 -0
  171. package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +76 -32
  172. package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +409 -209
  173. package/node_modules/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +1 -1
  174. package/node_modules/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +6 -9
  175. package/node_modules/pi-agent-text-editor/src/tools/tool-text-copy.ts +10 -3
  176. package/node_modules/pi-agent-text-editor/src/tools/tool-text-delete.ts +9 -4
  177. package/node_modules/pi-agent-text-editor/src/tools/tool-text-insert.ts +7 -8
  178. package/node_modules/pi-agent-text-editor/src/tools/tool-text-move.ts +1 -1
  179. package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +3 -4
  180. package/node_modules/pi-agent-text-editor/src/tools/tool-text-write.ts +10 -4
  181. package/node_modules/pi-agent-text-editor-renderer/package.json +5 -5
  182. package/node_modules/pi-agent-text-editor-renderer/src/mutation-panel.ts +11 -0
  183. package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +54 -5
  184. package/node_modules/pi-agent-text-editor-renderer/src/status-summary.ts +18 -3
  185. package/node_modules/pi-agent-text-editor-stale-anchor/package.json +4 -4
  186. package/node_modules/pi-agent-tool-call-interception/package.json +2 -2
  187. package/node_modules/pi-agent-tool-call-interception/src/index.ts +3 -0
  188. package/node_modules/pi-agent-tool-ui/package.json +1 -1
  189. package/node_modules/pi-agent-web/index.ts +4 -3
  190. package/node_modules/pi-agent-web/package.json +7 -7
  191. package/node_modules/pi-agent-web/src/resolver.ts +11 -13
  192. package/node_modules/pi-agent-web-html/package.json +2 -2
  193. package/node_modules/pi-agent-web-image/package.json +3 -3
  194. package/node_modules/pi-agent-web-pdf/package.json +3 -3
  195. package/node_modules/pi-agent-web-text/package.json +3 -3
  196. package/package.json +35 -35
  197. package/src/composite/nested-tool-rendering.ts +64 -6
  198. package/src/composite/output-limits.ts +125 -0
  199. package/src/composite/responses-tools.ts +25 -0
  200. package/src/composite/text-results.ts +372 -0
  201. package/src/documentation/extension.ts +11 -9
  202. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/index.ts +7 -6
  203. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +7 -7
  204. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +3 -3
  205. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/index.ts +4 -3
  206. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/package.json +5 -5
  207. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/src/jq.ts +4 -1
  208. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +3 -3
  209. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +3 -3
  210. package/src/extensions/pi-agent-read/extensions/pi-agent-web/index.ts +4 -3
  211. package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +7 -7
  212. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +2 -2
  213. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +3 -3
  214. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +3 -3
  215. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +3 -3
  216. package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/resolver.ts +11 -13
  217. package/src/extensions/pi-agent-read/package.json +7 -7
  218. package/src/extensions/pi-agent-read/src/api/plugin-protocol.ts +1 -1
  219. package/src/extensions/pi-agent-read/src/api/read-parameters.ts +38 -1
  220. package/src/extensions/pi-agent-read/src/api/tools/read.ts +18 -1
  221. package/src/extensions/pi-agent-read/src/core/extension.ts +8 -2
  222. package/src/extensions/pi-agent-read/src/core/read-core.ts +54 -35
  223. package/src/extensions/pi-agent-read/src/core/tools/read/output-truncation.ts +91 -18
  224. package/src/extensions/pi-agent-read/src/core/tools/read/raw-read.ts +8 -2
  225. package/src/extensions/pi-agent-read/src/core/tools/read/read-renderer.ts +38 -1
  226. package/src/extensions/pi-agent-read/src/core/tools/read/read-result.ts +57 -2
  227. package/src/extensions/pi-agent-read/src/core/tools/read/structured-result.ts +3 -3
  228. package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +108 -46
  229. package/src/extensions/pi-agent-search/package.json +5 -5
  230. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +1 -1
  231. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +7 -7
  232. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/resolvers.ts +11 -1
  233. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/scoped-search.ts +1 -1
  234. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-presentation.ts +42 -32
  235. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-recipe.ts +1 -1
  236. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-renderer.ts +6 -0
  237. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-result.ts +17 -3
  238. package/src/extensions/pi-agent-search/src/api/fuzzy.ts +5 -1
  239. package/src/extensions/pi-agent-search/src/api/search-parameters.ts +3 -3
  240. package/src/extensions/pi-agent-search/src/core/extension.ts +2 -1
  241. package/src/extensions/pi-agent-search/src/core/search-core.ts +13 -4
  242. package/src/extensions/pi-agent-text-editor/package.json +9 -9
  243. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +3 -3
  244. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/index.ts +65 -4
  245. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +3 -3
  246. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/anchor.ts +12 -2
  247. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/index.ts +4 -3
  248. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +5 -5
  249. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +5 -5
  250. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-panel.ts +11 -0
  251. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +54 -5
  252. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/status-summary.ts +18 -3
  253. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +4 -4
  254. package/src/extensions/pi-agent-text-editor/src/api/edit-completion.ts +2 -2
  255. package/src/extensions/pi-agent-text-editor/src/api/mutation-result.ts +2 -1
  256. package/src/extensions/pi-agent-text-editor/src/api/native-edit-batch-event.ts +4 -0
  257. package/src/extensions/pi-agent-text-editor/src/api/stale-anchor-message.ts +1 -1
  258. package/src/extensions/pi-agent-text-editor/src/core/diff-tool.ts +54 -12
  259. package/src/extensions/pi-agent-text-editor/src/core/editing-guidelines.ts +1 -1
  260. package/src/extensions/pi-agent-text-editor/src/core/extension.ts +10 -3
  261. package/src/extensions/pi-agent-text-editor/src/core/file-operations.ts +3 -13
  262. package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +35 -6
  263. package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +19 -1
  264. package/src/extensions/pi-agent-text-editor/src/core/mutation-result-targets.ts +132 -11
  265. package/src/extensions/pi-agent-text-editor/src/core/native-text-edit-batch.ts +232 -144
  266. package/src/extensions/pi-agent-text-editor/src/core/post-edit-scope.ts +34 -10
  267. package/src/extensions/pi-agent-text-editor/src/core/result-input.ts +24 -4
  268. package/src/extensions/pi-agent-text-editor/src/core/result-transfer.ts +7 -2
  269. package/src/extensions/pi-agent-text-editor/src/core/structured-result.ts +49 -214
  270. package/src/extensions/pi-agent-text-editor/src/core/text-change-engine.ts +5 -1
  271. package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +152 -22
  272. package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch.ts +4 -0
  273. package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +76 -32
  274. package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +409 -209
  275. package/src/extensions/pi-agent-text-editor/src/core/tool-call-interceptor/coordinator.ts +1 -1
  276. package/src/extensions/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +6 -9
  277. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-copy.ts +10 -3
  278. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-delete.ts +9 -4
  279. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-insert.ts +7 -8
  280. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-move.ts +1 -1
  281. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +3 -4
  282. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-write.ts +10 -4
  283. package/src/pi-agent-ide.ts +15 -1
  284. package/src/plugins/pi-agent-ide-ast/package.json +13 -13
  285. package/src/plugins/pi-agent-ide-ast/src/extension.ts +5 -4
  286. package/src/plugins/pi-agent-ide-ast/src/overflow-handler.ts +2 -2
  287. package/src/plugins/pi-agent-ide-ast/src/search-resolver.ts +35 -9
  288. package/src/plugins/pi-agent-ide-ast/src/select-presentation.ts +1 -1
  289. package/src/plugins/pi-agent-ide-ast/src/select-schema.ts +10 -8
  290. package/src/plugins/pi-agent-ide-ast/src/tool-select.ts +28 -3
  291. package/src/plugins/pi-agent-ide-changes/index.ts +4 -3
  292. package/src/plugins/pi-agent-ide-changes/package.json +8 -8
  293. package/src/plugins/pi-agent-ide-changes/src/tool-index-change.ts +66 -4
  294. package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +8 -11
  295. package/src/plugins/pi-agent-ide-debugger/index.ts +22 -10
  296. package/src/plugins/pi-agent-ide-debugger/src/dap-client.ts +5 -0
  297. package/src/plugins/pi-agent-ide-debugger/src/session-manager.ts +93 -38
  298. package/src/plugins/pi-agent-ide-diagnostics/src/extension.ts +6 -3
  299. package/src/plugins/pi-agent-ide-formatter/package.json +3 -3
  300. package/src/plugins/pi-agent-ide-languages/package.json +2 -2
  301. package/src/plugins/pi-agent-ide-lint/package.json +7 -7
  302. package/src/plugins/pi-agent-ide-lsp/index.ts +3 -3
  303. package/src/plugins/pi-agent-ide-lsp/package.json +9 -9
  304. package/src/plugins/pi-agent-ide-lsp/src/search-resolver.ts +5 -2
  305. package/src/plugins/pi-agent-ide-terminal/src/output-limits.ts +3 -3
  306. package/src/plugins/pi-agent-ide-terminal/src/resources.ts +8 -6
  307. package/src/plugins/pi-agent-ide-terminal/src/tools.ts +3 -3
  308. package/src/plugins/pi-agent-ide-vision/index.ts +13 -4
  309. package/src/post-edit/gate.ts +13 -2
  310. package/dist/chunk-3JO7QFIL.js +0 -1
  311. package/dist/chunk-4NIFBFFR.js +0 -11
  312. package/dist/chunk-64M3SQPG.js +0 -3
  313. package/dist/chunk-7LZKOHH2.js +0 -1
  314. package/dist/chunk-EAZGN5ND.js +0 -7
  315. package/dist/chunk-FK42RSF4.js +0 -1
  316. package/dist/chunk-KBP3QUDT.js +0 -2
  317. package/dist/chunk-KR36BT5E.js +0 -1
  318. package/dist/chunk-MBUXFKIW.js +0 -3
  319. package/dist/chunk-OE7QVAI2.js +0 -5
  320. package/dist/chunk-SILJ3OL4.js +0 -9
  321. package/dist/chunk-SQKAXYIR.js +0 -2
  322. package/dist/chunk-VCGNVTXQ.js +0 -1
  323. package/src/extensions/pi-agent-read/src/core/tools/read/temp-resource-store.ts +0 -105
@@ -303,7 +303,7 @@ class InterceptorImpl implements ToolCallInterceptor {
303
303
  content: guardResult.content,
304
304
  details,
305
305
  },
306
- mutationDataSchema,
306
+ mutationDataSchema(event.toolName),
307
307
  {
308
308
  status: "error",
309
309
  errors: [resultError(message, "INTERCEPTED")],
@@ -11,18 +11,20 @@ export function sourcePathProperty(description: string) {
11
11
  return Type.Optional(Type.String({ description }));
12
12
  }
13
13
 
14
- /** Build the inclusive source-range selectors shared by text mutation schemas. */
15
- export function sourceRangeProperties() {
14
+ /** Build shared source-range selectors, with optional tool-specific descriptions. */
15
+ export function sourceRangeProperties(descriptions: Partial<Record<"start" | "end", string>> = {}) {
16
16
  return {
17
17
  start: Type.Optional(
18
18
  Type.String({
19
19
  description:
20
+ descriptions.start ??
20
21
  "Anchor or unique exact text. Alone, selects that fragment; a line anchor selects only its line. Omit when path already selects text through a supported resource reference. With end, selects a whole-line range.",
21
22
  }),
22
23
  ),
23
24
  end: Type.Optional(
24
25
  Type.String({
25
26
  description:
27
+ descriptions.end ??
26
28
  "Optional anchor or unique exact text. Range includes start's first line through end's last line, even for SEARCH :match. Mixed types allowed; boundaries must be unique, in one file, and forward-ordered. Omit when start already selects the intended content; do not repeat start. The end line is included, not a stopping point before it.",
27
29
  }),
28
30
  ),
@@ -33,12 +35,12 @@ export function sourceRangeProperties() {
33
35
  export function targetProperties() {
34
36
  return {
35
37
  target: resultSourceProperty(
36
- "Destination file path or source result. A structured result replaces its exact ranges (zero-width ranges insert); omit targetStart/targetEnd. Source and destination selections pair in declared order with equal counts. A string target keeps its existing anchor semantics.",
38
+ "Destination file path, unchanged source result or its UUID. A result replaces its exact ranges (zero-width ranges insert); omit targetStart/targetEnd. Source and destination selections pair in declared order with equal counts. A file path keeps its existing anchor semantics. Whole-file transfers replace an existing regular destination file.",
37
39
  ),
38
40
  targetStart: Type.Optional(
39
41
  Type.String({
40
42
  description:
41
- "Registered anchor or unique exact text in the destination. Required for text transfers with a string target; omit for whole-file transfers or a structured target. Without targetEnd, inserts after the last containing line, keeping the selected text. With targetEnd, replacement starts at the first containing line. SEARCH :match also uses these line boundaries.",
43
+ "Registered anchor or unique exact text in the destination. Required for text transfers to a file path; omit for whole-file transfers or a result destination. Without targetEnd, inserts after the last containing line, keeping the selected text. With targetEnd, replacement starts at the first containing line. SEARCH :match also uses these line boundaries.",
42
44
  }),
43
45
  ),
44
46
  targetEnd: Type.Optional(
@@ -47,10 +49,5 @@ export function targetProperties() {
47
49
  "Optional inclusive destination end. Replaces whole lines through the last line containing this anchor, including SEARCH :match. May differ in type from targetStart; both must resolve uniquely in the target file and in forward order. Omit to insert after targetStart instead.",
48
50
  }),
49
51
  ),
50
- overwrite: Type.Optional(
51
- Type.Boolean({
52
- description: "Allow replacing an existing regular target file. Defaults to false.",
53
- }),
54
- ),
55
52
  };
56
53
  }
@@ -18,7 +18,7 @@ import type { TextMutationToolRegistration } from "#src/api/mutation-tool.js";
18
18
  export const copySchema = Type.Object(
19
19
  {
20
20
  path: resultSourceProperty(
21
- "Source file path or structured source selection; omit start/end for structured inputs. Use one whole-file result when target is a string without text selectors. Structured source/destination selections pair in declared order, with equal counts and duplicate ranges removed.",
21
+ "Source file path, unchanged source result or its UUID; omit start/end for result inputs. Use one whole-file result when the destination is a file path without text selectors. Source/destination selections pair in declared order, with equal counts and duplicate ranges removed.",
22
22
  ),
23
23
  ...sourceRangeProperties(),
24
24
  ...targetProperties(),
@@ -77,7 +77,11 @@ export const copyMutationTool: TextMutationToolRegistration<typeof copySchema> =
77
77
  const targetStarts = await context.resolveAnchors("targetStart");
78
78
  if (parameters.targetEnd === undefined) {
79
79
  const [target, change] = insertionAfterAnchor(context, targetStarts, "targetStart", copied);
80
- return { edits: new Map([[target, { changes: [change], action: "edited" }]]) };
80
+ return {
81
+ edits: new Map([
82
+ [target, { changes: [{ ...change, allowUnchanged: true }], action: "edited" }],
83
+ ]),
84
+ };
81
85
  }
82
86
 
83
87
  const targetEnds = await context.resolveAnchors("targetEnd");
@@ -92,7 +96,10 @@ export const copyMutationTool: TextMutationToolRegistration<typeof copySchema> =
92
96
  edits: new Map([
93
97
  [
94
98
  targetSpan.source,
95
- { changes: [replaceAnchorSpan(context, targetSpan, copied)], action: "edited" },
99
+ {
100
+ changes: [{ ...replaceAnchorSpan(context, targetSpan, copied), allowUnchanged: true }],
101
+ action: "edited",
102
+ },
96
103
  ],
97
104
  ]),
98
105
  };
@@ -18,9 +18,13 @@ import type { TextMutationToolRegistration } from "#src/api/mutation-tool.js";
18
18
  export const deleteSchema = Type.Object(
19
19
  {
20
20
  path: resultSourceProperty(
21
- "File path or structured source selection. A structured input deletes only its exact text ranges, even if it selects a whole file; omit start/end.",
21
+ "File path, shell:<session>, debug:<session>, debug:<session>/breakpoint/<id>, unchanged source result or its UUID, or an array of results. An ordinary file path without start/end deletes the file. A text result input removes only selected text and keeps the file, even for a whole-file selection. For Read results from symbol:<file>#<selector>, deletion removes only the declaration text; imports and references are unchanged. Omit start/end for result inputs. Omit path when a supplied text anchor identifies the file.",
22
22
  ),
23
- ...sourceRangeProperties(),
23
+ ...sourceRangeProperties({
24
+ start:
25
+ "Anchor or unique exact text locating the text to remove. Without end, exact text selects only that fragment; a line anchor selects its whole line. Omit when path already selects text.",
26
+ end: "Anchor or unique exact text locating the last line to remove. With start, removes whole lines including both boundary lines, even for SEARCH :match anchors. Both boundaries must be unique, in one file, and in forward order. Mixed anchor types are allowed. Omit when start alone selects the intended text.",
27
+ }),
24
28
  },
25
29
  { additionalProperties: false },
26
30
  );
@@ -34,9 +38,10 @@ export const deleteMutationTool: TextMutationToolRegistration<typeof deleteSchem
34
38
  name: "delete",
35
39
  wholeFileOperation: "delete",
36
40
  description:
37
- "Use delete to permanently delete one regular file when an ordinary string path is supplied without text selectors, or to remove selected text. Structured path removes only its text ranges and keeps the file, even for a whole-file selection. Whole-file deletion rejects directories and symlinks.",
41
+ "Use delete to remove selected text, permanently delete a regular file, terminate a terminal or debugger session, or remove a debugger breakpoint. Whole-file deletion rejects directories and symlinks.",
38
42
 
39
- promptSnippet: "Delete regular files, or delete selected text using exact matches or anchors",
43
+ promptSnippet:
44
+ "Delete files or selected text, terminate terminal or debugger sessions, or remove debugger breakpoints",
40
45
  parameters: deleteSchema,
41
46
  source: { field: "path", inherited: true },
42
47
  anchors: [
@@ -15,30 +15,30 @@ export const insertSchema = Type.Object(
15
15
  path: Type.Optional(
16
16
  Type.String({
17
17
  description:
18
- "Source resource reference or file path. A returned SEARCH# reference can select insertion positions.",
18
+ "Pass a file path, source resource reference, unchanged Read/Search/Select/edit result, or its UUID. Result inputs select only their registered ranges.",
19
19
  }),
20
20
  ),
21
21
  anchor: Type.Optional(
22
22
  Type.String({
23
23
  description:
24
- "Registered anchor or unique exact text locating the insertion. Required unless path already supplies a SEARCH selection. Inserts after the last containing line by default, or before the first containing line when before is true. This includes SEARCH :match and multiline exact text; the selected text is kept. Multiple matches on the same insertion line produce one insertion.",
24
+ "For text edits, use a registered anchor or unique exact text to locate the insertion. Omit anchor when path already supplies the intended selection; otherwise it is required. For live resources, follow the action rules above.",
25
25
  }),
26
26
  ),
27
27
  text: Type.String({
28
28
  minLength: 1,
29
29
  description:
30
- "New text only. The tool supplies the line boundary; do not prefix a newline just to start a new line. For example, 'NEW' inserts one line, while '\\nNEW' intentionally adds a blank line before it. A missing trailing newline is supplied before following text; additional newlines remain intentional blank lines. When appending after an unterminated final line, the tool supplies the separator before the new text without removing trailing newlines from the payload. Payload line endings follow the destination file's LF/CRLF style.",
30
+ "For text edits, supply non-empty new text. The tool adds missing line breaks between the insertion and existing text. Add a leading newline only for an intentional blank line, not to start a new line. Payload newlines are kept, with line endings converted to the file's LF/CRLF style. No trailing newline is added at EOF.",
31
31
  }),
32
32
  separation: Type.Optional(
33
33
  Type.Union([Type.Literal("line"), Type.Literal("blank-line")], {
34
34
  description:
35
- "Defaults to line. Use blank-line to add only missing blank lines between the inserted block and existing neighboring content; explicit payload newlines remain intact.",
35
+ "For text edits, defaults to line: separate inserted text from existing lines without adding extra blank lines. Use blank-line to add only missing blank lines between the insertion and existing text.",
36
36
  }),
37
37
  ),
38
38
  before: Type.Optional(
39
39
  Type.Boolean({
40
40
  description:
41
- "Defaults to false: insert after the last containing line. True: insert before the first containing line. The anchor's text and its lines are kept.",
41
+ "For text edits, defaults to false: insert after the last containing line of each selection. With true, insert before its first containing line. Selected text is kept. Multiple selections on the same insertion line produce one insertion.",
42
42
  }),
43
43
  ),
44
44
  },
@@ -56,10 +56,9 @@ interface InsertParameters {
56
56
  export const insertMutationTool: TextMutationToolRegistration<typeof insertSchema> = {
57
57
  name: "insert",
58
58
  description:
59
- "Use insert to add new text before or after selected lines while keeping existing text. Insertion is line-based, including for exact-text and SEARCH :match anchors.",
59
+ "Use insert to edit text or act on a live resource. For text edits, add new text before or after selected lines while keeping existing text. Insertion is line-based, including for exact-text and SEARCH :match anchors. An empty result selection makes no changes and is not an error.",
60
60
 
61
- promptSnippet:
62
- "Make precise file edits by inserting text before or after exact matches or anchors",
61
+ promptSnippet: "Insert file text, send terminal keys, or perform debugger actions",
63
62
  parameters: insertSchema,
64
63
  source: { field: "path", inherited: true },
65
64
  anchors: [
@@ -20,7 +20,7 @@ import type { TextChange } from "#src/core/text-change-engine.js";
20
20
  export const moveSchema = Type.Object(
21
21
  {
22
22
  path: resultSourceProperty(
23
- "Source file path or structured source selection; omit start/end for structured inputs. Use one whole-file result when target is a string without text selectors. Structured source/destination selections pair in declared order, with equal counts and duplicate ranges removed. Destinations must not overlap or touch source ranges.",
23
+ "Source file path, unchanged source result or its UUID; omit start/end for result inputs. Use one whole-file result when the destination is a file path without text selectors. Source/destination selections pair in declared order, with equal counts and duplicate ranges removed. Destinations must not overlap or touch source ranges.",
24
24
  ),
25
25
  ...sourceRangeProperties(),
26
26
  ...targetProperties(),
@@ -18,12 +18,12 @@ export const replaceSchema = Type.Object(
18
18
  path: Type.Optional({
19
19
  ...resultInputSchema,
20
20
  description:
21
- "Source path, SEARCH# selector, or source-aware Read/Search/Select/mutation result with a live target, RESULT# reference, or array of returned targets. Omit start/end when the result selects the intended text. Changed or expired result targets are rejected without writing.",
21
+ "Source path, SEARCH# selector, unchanged Read/Search/Select/edit result, its UUID, or an array of such results. Omit start/end when the result selects the intended text. Changed or expired results are rejected without writing.",
22
22
  }),
23
23
  ...sourceRangeProperties(),
24
24
  text: Type.String({
25
25
  description:
26
- "Replacement text. Empty text removes the selection; a whole-line selection removes its lines without inserting a blank line. Adjacent unselected lines are kept.",
26
+ "Replacement text for each selected range. Empty text removes the selection; a whole-line selection removes its lines without inserting a blank line. Adjacent unselected lines are kept.",
27
27
  }),
28
28
  },
29
29
  { additionalProperties: false },
@@ -37,8 +37,7 @@ interface ReplaceParameters {
37
37
 
38
38
  export const replaceMutationTool: TextMutationToolRegistration<typeof replaceSchema> = {
39
39
  name: "replace",
40
- description:
41
- "Use replace to change an existing text fragment, an inclusive line range, or every selected search match.",
40
+ description: "Use replace to replace a text fragment or each selected range.",
42
41
 
43
42
  promptSnippet: "Make precise file edits by replacing text using exact matches or anchors",
44
43
  parameters: replaceSchema,
@@ -8,9 +8,12 @@ export const writeSchema = Type.Object(
8
8
  path: {
9
9
  ...resultInputSchema,
10
10
  description:
11
- "Path to create or overwrite, or one whole-file source result. Partial scopes and multiple files are rejected.",
11
+ "File path or one whole-file source result. Partial file scopes and multiple files are rejected. Use shell:<session> to send input to a running terminal.",
12
12
  },
13
- content: Type.String({ description: "File content" }),
13
+ content: Type.String({
14
+ description:
15
+ "Complete file contents, or exact terminal input. Terminal input does not add Enter.",
16
+ }),
14
17
  },
15
18
  { additionalProperties: false },
16
19
  );
@@ -23,7 +26,7 @@ interface WriteParameters {
23
26
  export const writeMutationTool: TextMutationToolRegistration<typeof writeSchema> = {
24
27
  name: "write",
25
28
  description:
26
- "Use write to create a new file or deliberately replace a file's entire contents. Supply the complete new text; existing contents are overwritten.",
29
+ "Use write to create or deliberately overwrite a whole file, or send input to a running terminal.",
27
30
 
28
31
  promptSnippet: "Create or overwrite files",
29
32
  parameters: writeSchema,
@@ -34,7 +37,10 @@ export const writeMutationTool: TextMutationToolRegistration<typeof writeSchema>
34
37
  [
35
38
  context.sourceFor("path"),
36
39
  {
37
- changes: [context.sourceDocument.replaceAll(parameters.content)],
40
+ changes:
41
+ context.sourceDocument.content === parameters.content
42
+ ? []
43
+ : [context.sourceDocument.replaceAll(parameters.content)],
38
44
  action: "overwritten",
39
45
  },
40
46
  ],
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "pi-agent-text-editor-renderer",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
7
7
  },
8
8
  "dependencies": {
9
9
  "diff": "^9.0.0",
10
- "pi-agent-invariant": "0.7.0",
11
- "pi-agent-text-editor": "0.7.0",
12
- "pi-agent-tool-call-interception": "0.7.0",
13
- "pi-agent-tool-ui": "0.7.0",
10
+ "pi-agent-invariant": "0.7.2",
11
+ "pi-agent-text-editor": "0.7.2",
12
+ "pi-agent-tool-call-interception": "0.7.2",
13
+ "pi-agent-tool-ui": "0.7.2",
14
14
  "vscode-diff": "3.0.1"
15
15
  },
16
16
  "pi": {
@@ -317,6 +317,17 @@ function renderTail(
317
317
  : `Formatted ${grouped.formatted.length} files by ${by}`;
318
318
  statuses.unshift(theme.fg("success", label.replace(/[\u0000-\u001f\u007f-\u009f]/g, " ")));
319
319
  }
320
+ if (grouped.alreadyFormatted.length > 0) {
321
+ const by =
322
+ grouped.unchangedFormatters.length === 1
323
+ ? grouped.unchangedFormatters[0]
324
+ : `${grouped.unchangedFormatters.length} formatters`;
325
+ const label =
326
+ resources.length === 1
327
+ ? `Already formatted (${by})`
328
+ : `Already formatted ${grouped.alreadyFormatted.length} files by ${by}`;
329
+ statuses.unshift(theme.fg("success", label.replace(/[\u0000-\u001f\u007f-\u009f]/g, " ")));
330
+ }
320
331
  const text = [counts, ...statuses]
321
332
  .filter((item) => item !== undefined)
322
333
  .join(theme.fg("dim", " · "));
@@ -251,7 +251,17 @@ function createRenderer(
251
251
  options.expanded,
252
252
  theme,
253
253
  );
254
- return new Text("", 0, 0);
254
+ return new Text(
255
+ registration.name === "copy" &&
256
+ typeof result.details.metadata?.targetUnavailable === "string"
257
+ ? theme.fg(
258
+ "muted",
259
+ "No verified text selection. Read the destination before further edits.",
260
+ )
261
+ : "",
262
+ 0,
263
+ 0,
264
+ );
255
265
  }
256
266
 
257
267
  clearTypingRuntime(state);
@@ -272,14 +282,28 @@ function createRenderer(
272
282
  state.panel?.setPreviewResources([]);
273
283
 
274
284
  if (!context.isError && result.details.metadata?.emptyTargets === true) {
275
- return new Text(theme.fg("muted", "No changes · empty target set"), 0, 0);
285
+ return new Text(
286
+ theme.fg(
287
+ "muted",
288
+ registration.name === "copy"
289
+ ? "No changes: empty selection."
290
+ : "No changes · empty target set",
291
+ ),
292
+ 0,
293
+ 0,
294
+ );
276
295
  }
277
296
  const wholeFileSucceeded = wholeFileOperationSucceeded(result.details);
278
297
  if (wholeFileSucceeded !== undefined) {
279
298
  return new Text(
280
299
  theme.fg(
281
300
  wholeFileSucceeded ? "success" : "error",
282
- wholeFileSucceeded ? "✓ Applied" : "✗ Not applied",
301
+ wholeFileSucceeded
302
+ ? registration.name === "copy" &&
303
+ typeof result.details.metadata?.targetUnavailable === "string"
304
+ ? "✓ Applied · no verified text selection; read destination before further edits"
305
+ : "✓ Applied"
306
+ : "✗ Not applied",
283
307
  ),
284
308
  0,
285
309
  0,
@@ -292,7 +316,19 @@ function createRenderer(
292
316
  )
293
317
  .map((item) => item.text)
294
318
  .join("\n");
295
- const displayedOutput = context.isError ? userFacingFailure(output) : output;
319
+ const rollback =
320
+ registration.name === "copy" ? result.details.metadata?.copyRollback : undefined;
321
+ const uncertainExecution =
322
+ registration.name === "copy" && result.details.metadata?.copyExecution === "uncertain";
323
+ const displayedOutput = context.isError
324
+ ? uncertainExecution
325
+ ? "Copy failed · effects uncertain; read destination before retrying"
326
+ : rollback === "restored"
327
+ ? "Copy failed · changes rolled back"
328
+ : rollback === "failed"
329
+ ? "Copy failed · rollback failed; read destination before retrying"
330
+ : userFacingFailure(output, result.details)
331
+ : output;
296
332
  return new Text(
297
333
  displayedOutput.length === 0
298
334
  ? ""
@@ -868,7 +904,20 @@ function wholeFileOperationSucceeded(details: unknown): boolean | undefined {
868
904
  : undefined;
869
905
  }
870
906
 
871
- function userFacingFailure(agentOutput: string): string {
907
+ function userFacingFailure(
908
+ agentOutput: string,
909
+ details: FileMutationBatchResult | undefined,
910
+ ): string {
911
+ const rollback = details?.results?.find((result) => result.data.rollback !== undefined)?.data
912
+ .rollback;
913
+ if (rollback !== undefined) {
914
+ return rollback.failedSources.length === 0
915
+ ? "Rolled back · write failed"
916
+ : "State unknown · rollback failed";
917
+ }
918
+ if (details?.effect === "unknown") return "Effects unknown · edit failed";
919
+ if (details?.effect === "applied") return "Saved · post-write step failed";
920
+ if (details?.metadata?.rollback === "restored") return "Rolled back · edit failed";
872
921
  if (/\banchor\b[\s\S]*\bis ambiguous\./iu.test(agentOutput)) {
873
922
  return "Not changed · selection is ambiguous";
874
923
  }
@@ -9,12 +9,25 @@ export function summarizeStatuses(
9
9
  ) {
10
10
  const formatted = new Set<string>();
11
11
  const formatters = new Set<string>();
12
+ const alreadyFormatted = new Set<string>();
13
+ const unchangedFormatters = new Set<string>();
12
14
  const remaining = new Map<string, { status: MutationDiffStatus; paths: Set<string> }>();
13
15
  for (const resource of resources)
14
16
  for (const status of resource.diffStatuses ?? []) {
15
- if (status.formatter !== undefined && status.tone === "success") {
16
- formatted.add(resource.path);
17
- formatters.add(status.formatter);
17
+ if (
18
+ status.formatter !== undefined &&
19
+ status.tone === "success" &&
20
+ (status.formattingStatus === undefined ||
21
+ status.formattingStatus === "changed" ||
22
+ status.formattingStatus === "unchanged")
23
+ ) {
24
+ if (status.formattingStatus === "unchanged") {
25
+ alreadyFormatted.add(resource.path);
26
+ unchangedFormatters.add(status.formatter);
27
+ } else {
28
+ formatted.add(resource.path);
29
+ formatters.add(status.formatter);
30
+ }
18
31
  continue;
19
32
  }
20
33
  const key = JSON.stringify([status.text, status.tone]);
@@ -28,6 +41,8 @@ export function summarizeStatuses(
28
41
  return {
29
42
  formatted: [...formatted],
30
43
  formatters: [...formatters],
44
+ alreadyFormatted: [...alreadyFormatted],
45
+ unchangedFormatters: [...unchangedFormatters],
31
46
  statuses: [...remaining.values()].map(({ status, paths }) => ({ status, paths: [...paths] })),
32
47
  };
33
48
  }
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "pi-agent-text-editor-stale-anchor",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "pi-agent-invariant": "0.7.0",
7
- "pi-agent-read": "0.7.0",
8
- "pi-agent-text-editor": "0.7.0"
6
+ "pi-agent-invariant": "0.7.2",
7
+ "pi-agent-read": "0.7.2",
8
+ "pi-agent-text-editor": "0.7.2"
9
9
  },
10
10
  "pi": {
11
11
  "extensions": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-agent-tool-call-interception",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "type": "module",
5
5
  "types": "./src/index.ts",
6
6
  "exports": {
@@ -10,7 +10,7 @@
10
10
  }
11
11
  },
12
12
  "dependencies": {
13
- "pi-agent-tool-ui": "0.7.0"
13
+ "pi-agent-tool-ui": "0.7.2"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "@earendil-works/pi-coding-agent": "*",
@@ -339,6 +339,9 @@ export function withToolCallInterceptionRendering<TParameters extends TSchema, T
339
339
  get promptGuidelines() {
340
340
  return definition.promptGuidelines;
341
341
  },
342
+ get parameters() {
343
+ return definition.parameters;
344
+ },
342
345
  renderCall(arguments_, theme, context) {
343
346
  const state = context.state as InterceptionRenderState;
344
347
  const annotation = annotations.bind(context.toolCallId, context.invalidate);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-agent-tool-ui",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -35,9 +35,10 @@ export default async function registerWeb(pi: ExtensionAPI): Promise<void> {
35
35
  renderResult: renderWebResult,
36
36
  preserveTruncatedOutput: true,
37
37
  });
38
- api.describe(() =>
39
- renderContentDescription("HTTP(S) URL — remote content.", readHost.listDescriptions()),
40
- );
38
+ api.describe({
39
+ path: () =>
40
+ renderContentDescription("HTTP(S) URL — remote content.", readHost.listDescriptions()),
41
+ });
41
42
  },
42
43
  } satisfies ReadPlugin;
43
44
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-agent-web",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
@@ -8,12 +8,12 @@
8
8
  "dependencies": {
9
9
  "defuddle": "^0.19.1",
10
10
  "linkedom": "^0.18.12",
11
- "pi-agent-doctor": "0.7.0",
12
- "pi-agent-image": "0.7.0",
13
- "pi-agent-read": "0.7.0",
14
- "pi-agent-resource": "0.7.0",
15
- "pi-agent-search": "0.7.0",
16
- "pi-agent-text": "0.7.0",
11
+ "pi-agent-doctor": "0.7.2",
12
+ "pi-agent-image": "0.7.2",
13
+ "pi-agent-read": "0.7.2",
14
+ "pi-agent-resource": "0.7.2",
15
+ "pi-agent-search": "0.7.2",
16
+ "pi-agent-text": "0.7.2",
17
17
  "playwright-core": "^1.62.1"
18
18
  },
19
19
  "pi": {
@@ -261,7 +261,8 @@ function formatUnsupportedBinaryResponse(
261
261
  preview: Uint8Array,
262
262
  ): string {
263
263
  const lines = [
264
- "Binary response",
264
+ "Unsupported binary response",
265
+ "Read cannot convert this Content-Type. Showing response metadata and a byte preview, not document text.",
265
266
  `URL: ${requestedUrl.href}`,
266
267
  `HTTP: ${response.status} ${response.statusText}`.trimEnd(),
267
268
  `Content-Type: ${mediaType ?? "unknown"}`,
@@ -271,18 +272,15 @@ function formatUnsupportedBinaryResponse(
271
272
  if (filename !== undefined) lines.push(`Filename: ${filename}`);
272
273
  const length = response.headers.get("content-length");
273
274
  if (length !== null) lines.push(`Content-Length: ${length}`);
274
- lines.push("", "Headers:");
275
- for (const [name, value] of [...response.headers].sort(([left], [right]) =>
276
- left.localeCompare(right),
277
- )) {
278
- if (isSensitiveRedirectHeader(name)) continue;
279
- lines.push(`${name}: ${value}`);
280
- }
281
- lines.push(
282
- "",
283
- `Preview: first ${preview.length} bytes (hex); the remaining body was not downloaded`,
284
- formatHexPreview(preview),
285
- );
275
+ const headers = [...response.headers]
276
+ .filter(
277
+ ([name]) =>
278
+ !isSensitiveRedirectHeader(name) && name !== "content-type" && name !== "content-length",
279
+ )
280
+ .sort(([left], [right]) => left.localeCompare(right))
281
+ .map(([name, value]) => `${name}: ${value}`);
282
+ if (headers.length > 0) lines.push("", "Headers:", ...headers);
283
+ lines.push("", `Preview: first ${preview.length} bytes (hex).`, formatHexPreview(preview));
286
284
  return lines.join("\n");
287
285
  }
288
286
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-agent-web-html",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
@@ -8,7 +8,7 @@
8
8
  "dependencies": {
9
9
  "defuddle": "^0.19.1",
10
10
  "linkedom": "^0.18.12",
11
- "pi-agent-resource": "0.7.0"
11
+ "pi-agent-resource": "0.7.2"
12
12
  },
13
13
  "pi": {
14
14
  "extensions": [
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "pi-agent-web-image",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "pi-agent-image": "0.7.0",
7
- "pi-agent-resource": "0.7.0"
6
+ "pi-agent-image": "0.7.2",
7
+ "pi-agent-resource": "0.7.2"
8
8
  },
9
9
  "pi": {
10
10
  "extensions": [
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "pi-agent-web-pdf",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "pi-agent-pdf": "0.7.0",
7
- "pi-agent-resource": "0.7.0"
6
+ "pi-agent-pdf": "0.7.2",
7
+ "pi-agent-resource": "0.7.2"
8
8
  },
9
9
  "pi": {
10
10
  "extensions": [
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "pi-agent-web-text",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "pi-agent-resource": "0.7.0",
7
- "pi-agent-text": "0.7.0"
6
+ "pi-agent-resource": "0.7.2",
7
+ "pi-agent-text": "0.7.2"
8
8
  },
9
9
  "pi": {
10
10
  "extensions": [