pi-agent-ide 0.5.1 → 0.6.0

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 (322) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +10 -4
  3. package/dist/chunk-22CLOM2D.js +1 -0
  4. package/dist/{chunk-LY6U5EAD.js → chunk-2527OQ4Y.js} +1 -1
  5. package/dist/chunk-3XJ3KDPZ.js +16 -0
  6. package/dist/chunk-5JELU6RV.js +7 -0
  7. package/dist/chunk-DDKHZZDO.js +5 -0
  8. package/dist/chunk-FEDVTZJG.js +1 -0
  9. package/dist/chunk-HSM6R7IB.js +27 -0
  10. package/dist/chunk-K5G4FDXD.js +1 -0
  11. package/dist/chunk-M5IVSCR2.js +1 -0
  12. package/dist/chunk-OYWIZII6.js +1 -0
  13. package/dist/{chunk-7ALCBKCW.js → chunk-PCZH7GOX.js} +11 -11
  14. package/dist/{chunk-DQXPQOF7.js → chunk-SQ7ZTGOP.js} +1 -1
  15. package/dist/entry-10.js +1 -1
  16. package/dist/entry-11.js +1 -1
  17. package/dist/entry-12.js +1 -1
  18. package/dist/entry-13.js +1 -1
  19. package/dist/entry-14.js +1 -1
  20. package/dist/entry-15.js +1 -1
  21. package/dist/entry-16.js +1 -0
  22. package/dist/entry-18.js +1 -1
  23. package/dist/entry-19.js +1 -1
  24. package/dist/entry-20.js +1 -1
  25. package/dist/entry-21.js +1 -1
  26. package/dist/entry-22.js +1 -2
  27. package/dist/entry-23.js +2 -1
  28. package/dist/entry-24.js +1 -1
  29. package/dist/entry-25.js +1 -1
  30. package/dist/entry-26.js +1 -1
  31. package/dist/entry-27.js +1 -12
  32. package/dist/entry-28.js +12 -1
  33. package/dist/entry-29.js +1 -1
  34. package/dist/entry-30.js +1 -1
  35. package/dist/entry-31.js +1 -1
  36. package/dist/entry-32.js +1 -4
  37. package/dist/entry-33.js +3 -8
  38. package/dist/entry-34.js +9 -1
  39. package/dist/entry-35.js +1 -1
  40. package/dist/entry-36.js +1 -1
  41. package/dist/entry-37.js +1 -1
  42. package/dist/entry-38.js +1 -1
  43. package/dist/entry-39.js +1 -1
  44. package/dist/entry-40.js +1 -1
  45. package/dist/entry-41.js +1 -18
  46. package/dist/entry-42.js +18 -1
  47. package/dist/entry-43.js +1 -1
  48. package/dist/entry-44.js +1 -1
  49. package/dist/entry-45.js +1 -1
  50. package/dist/entry-46.js +1 -7
  51. package/dist/entry-47.js +7 -11
  52. package/dist/entry-48.js +11 -1
  53. package/dist/entry-49.js +1 -1
  54. package/dist/entry-50.js +1 -1
  55. package/dist/entry-51.js +1 -1
  56. package/dist/entry-52.js +1 -1
  57. package/dist/entry-53.js +1 -1
  58. package/dist/entry-54.js +1 -1
  59. package/dist/entry-55.js +1 -1
  60. package/dist/entry-56.js +1 -0
  61. package/dist/entry-57.js +0 -1
  62. package/dist/entry-58.js +1 -0
  63. package/dist/entry-59.js +0 -1
  64. package/dist/entry-60.js +1 -1
  65. package/dist/entry-61.js +1 -1
  66. package/dist/entry-62.js +1 -1
  67. package/dist/entry-63.js +1 -1
  68. package/dist/entry-64.js +1 -1
  69. package/dist/entry-65.js +1 -0
  70. package/dist/entry-66.js +0 -1
  71. package/dist/entry-67.js +1 -0
  72. package/dist/entry-68.js +0 -1
  73. package/dist/entry-69.js +1 -1
  74. package/dist/entry-70.js +1 -1
  75. package/dist/entry-71.js +1 -203
  76. package/dist/entry-72.js +254 -25
  77. package/dist/entry-73.js +30 -2
  78. package/dist/entry-74.js +2 -1
  79. package/dist/entry-75.js +1 -1
  80. package/dist/entry-76.js +1 -3
  81. package/dist/entry-77.js +3 -3
  82. package/dist/entry-78.js +3 -1
  83. package/dist/entry-79.js +1 -1
  84. package/dist/entry-80.js +1 -1
  85. package/dist/entry-81.js +1 -0
  86. package/dist/pi-agent-ide.js +3 -3
  87. package/docs/configuration.md +3 -1
  88. package/docs/tools.md +12 -0
  89. package/node_modules/pi-agent-doctor/package.json +6 -6
  90. package/node_modules/pi-agent-doctor/runtime/entry-22.js +1 -0
  91. package/node_modules/pi-agent-filesystem/package.json +7 -7
  92. package/node_modules/pi-agent-filesystem-image/package.json +4 -4
  93. package/node_modules/pi-agent-filesystem-pdf/package.json +4 -4
  94. package/node_modules/pi-agent-filesystem-text/package.json +4 -4
  95. package/node_modules/pi-agent-filesystem-text/runtime/entry-26.js +2 -0
  96. package/node_modules/pi-agent-ide-ast/package.json +12 -11
  97. package/node_modules/pi-agent-ide-ast/runtime/entry-27.js +0 -1
  98. package/node_modules/pi-agent-ide-ast/runtime/entry-28.js +2 -0
  99. package/node_modules/pi-agent-ide-ast/src/search-resolver.ts +8 -6
  100. package/node_modules/pi-agent-ide-changes/package.json +8 -8
  101. package/node_modules/pi-agent-ide-changes/runtime/entry-29.js +0 -1
  102. package/node_modules/pi-agent-ide-formatter/package.json +4 -4
  103. package/node_modules/pi-agent-ide-languages/package.json +3 -3
  104. package/node_modules/pi-agent-ide-lint/package.json +8 -8
  105. package/node_modules/pi-agent-ide-lint/src/command-linter.ts +3 -1
  106. package/node_modules/pi-agent-ide-lsp/package.json +10 -10
  107. package/node_modules/pi-agent-ide-lsp/runtime/entry-34.js +2 -0
  108. package/node_modules/pi-agent-image/package.json +3 -3
  109. package/node_modules/pi-agent-invariant/package.json +2 -2
  110. package/node_modules/pi-agent-pdf/package.json +3 -3
  111. package/node_modules/pi-agent-read/package.json +11 -11
  112. package/node_modules/pi-agent-read/runtime/entry-41.js +0 -1
  113. package/node_modules/pi-agent-read/runtime/entry-42.js +2 -0
  114. package/node_modules/pi-agent-read/src/api/read-parameters.ts +2 -2
  115. package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +11 -6
  116. package/node_modules/pi-agent-resource/package.json +2 -2
  117. package/node_modules/pi-agent-search/package.json +7 -7
  118. package/node_modules/pi-agent-search/runtime/entry-46.js +0 -1
  119. package/node_modules/pi-agent-search-text/package.json +9 -9
  120. package/node_modules/pi-agent-search-text/runtime/entry-48.js +1 -0
  121. package/node_modules/pi-agent-text/package.json +3 -3
  122. package/node_modules/pi-agent-text/runtime/entry-50.js +1 -0
  123. package/node_modules/pi-agent-text-anchor-constant/package.json +4 -4
  124. package/node_modules/pi-agent-text-anchor-constant/runtime/entry-51.js +2 -0
  125. package/node_modules/pi-agent-text-anchor-exact/index.ts +3 -3
  126. package/node_modules/pi-agent-text-anchor-exact/package.json +5 -5
  127. package/node_modules/pi-agent-text-anchor-exact/runtime/entry-52.js +0 -1
  128. package/node_modules/pi-agent-text-anchor-exact/runtime/entry-53.js +2 -0
  129. package/node_modules/pi-agent-text-anchor-exact/src/config.ts +2 -2
  130. package/node_modules/pi-agent-text-anchor-line-hash/package.json +7 -7
  131. package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-54.js +0 -1
  132. package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-55.js +2 -0
  133. package/node_modules/pi-agent-text-editor/package.json +25 -25
  134. package/node_modules/pi-agent-text-editor/runtime/entry-71.js +0 -1
  135. package/node_modules/pi-agent-text-editor/src/core/apply/execution.ts +125 -3
  136. package/node_modules/pi-agent-text-editor/src/core/apply/mixed-source.ts +1 -1
  137. package/node_modules/pi-agent-text-editor/src/core/apply/mutation-outcome.ts +14 -0
  138. package/node_modules/pi-agent-text-editor/src/core/apply/output.ts +32 -3
  139. package/node_modules/pi-agent-text-editor/src/core/apply/prompt.ts +21 -19
  140. package/node_modules/pi-agent-text-editor/src/core/apply/renderer.ts +37 -0
  141. package/node_modules/pi-agent-text-editor/src/core/apply/runtime.ts +85 -34
  142. package/node_modules/pi-agent-text-editor/src/core/apply/tool.ts +2 -3
  143. package/node_modules/pi-agent-text-editor/src/core/apply/transaction.ts +589 -241
  144. package/node_modules/pi-agent-text-editor/src/core/post-edit-scope.ts +5 -0
  145. package/node_modules/pi-agent-text-editor/src/core/text-editor-config.ts +3 -3
  146. package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +9 -1
  147. package/node_modules/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +53 -0
  148. package/node_modules/pi-agent-text-editor/src/tools/tool-text-copy.ts +11 -41
  149. package/node_modules/pi-agent-text-editor/src/tools/tool-text-delete.ts +8 -18
  150. package/node_modules/pi-agent-text-editor/src/tools/tool-text-move.ts +11 -41
  151. package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +9 -19
  152. package/node_modules/pi-agent-text-editor-renderer/package.json +6 -6
  153. package/node_modules/pi-agent-text-editor-stale-anchor/package.json +5 -5
  154. package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-74.js +2 -0
  155. package/node_modules/pi-agent-tool-call-interception/package.json +3 -3
  156. package/node_modules/pi-agent-tool-ui/package.json +2 -2
  157. package/node_modules/pi-agent-tool-ui/runtime/entry-76.js +1 -0
  158. package/node_modules/pi-agent-web/package.json +7 -7
  159. package/node_modules/pi-agent-web-html/package.json +3 -3
  160. package/node_modules/pi-agent-web-image/package.json +4 -4
  161. package/node_modules/pi-agent-web-pdf/package.json +4 -4
  162. package/node_modules/pi-agent-web-text/package.json +4 -4
  163. package/node_modules/pi-agent-web-text/runtime/entry-81.js +2 -0
  164. package/package.json +43 -38
  165. package/src/api/path-identity.ts +15 -0
  166. package/src/composite/builtin-extensions.ts +7 -2
  167. package/src/composite/module-labels.ts +4 -0
  168. package/src/composite/module-settings.ts +34 -14
  169. package/src/composite/preferences.ts +46 -3
  170. package/src/composite/selection.ts +5 -1
  171. package/src/doctor/inventory.ts +7 -2
  172. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +7 -7
  173. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +4 -4
  174. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +4 -4
  175. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +4 -4
  176. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/runtime/entry-26.js +2 -0
  177. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-23.js +2 -0
  178. package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +7 -7
  179. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +3 -3
  180. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +4 -4
  181. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +4 -4
  182. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +4 -4
  183. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-81.js +2 -0
  184. package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-77.js +2 -0
  185. package/src/extensions/pi-agent-read/package.json +11 -11
  186. package/src/extensions/pi-agent-read/runtime/entry-41.js +0 -1
  187. package/src/extensions/pi-agent-read/runtime/entry-42.js +2 -0
  188. package/src/extensions/pi-agent-read/src/api/read-parameters.ts +2 -2
  189. package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +11 -6
  190. package/src/extensions/pi-agent-search/package.json +7 -7
  191. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +9 -9
  192. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-48.js +1 -0
  193. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-49.js +1 -0
  194. package/src/extensions/pi-agent-search/runtime/entry-46.js +0 -1
  195. package/src/extensions/pi-agent-search/runtime/entry-47.js +2 -0
  196. package/src/extensions/pi-agent-text-editor/package.json +25 -25
  197. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +4 -4
  198. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-51.js +2 -0
  199. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/index.ts +3 -3
  200. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +5 -5
  201. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-52.js +0 -1
  202. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-53.js +2 -0
  203. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/src/config.ts +2 -2
  204. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +7 -7
  205. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-54.js +0 -1
  206. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-55.js +2 -0
  207. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +6 -6
  208. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +5 -5
  209. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-74.js +2 -0
  210. package/src/extensions/pi-agent-text-editor/runtime/entry-71.js +0 -1
  211. package/src/extensions/pi-agent-text-editor/runtime/entry-72.js +2 -0
  212. package/src/extensions/pi-agent-text-editor/src/core/apply/execution.ts +125 -3
  213. package/src/extensions/pi-agent-text-editor/src/core/apply/mixed-source.ts +1 -1
  214. package/src/extensions/pi-agent-text-editor/src/core/apply/mutation-outcome.ts +14 -0
  215. package/src/extensions/pi-agent-text-editor/src/core/apply/output.ts +32 -3
  216. package/src/extensions/pi-agent-text-editor/src/core/apply/prompt.ts +21 -19
  217. package/src/extensions/pi-agent-text-editor/src/core/apply/renderer.ts +37 -0
  218. package/src/extensions/pi-agent-text-editor/src/core/apply/runtime.ts +85 -34
  219. package/src/extensions/pi-agent-text-editor/src/core/apply/tool.ts +2 -3
  220. package/src/extensions/pi-agent-text-editor/src/core/apply/transaction.ts +589 -241
  221. package/src/extensions/pi-agent-text-editor/src/core/post-edit-scope.ts +5 -0
  222. package/src/extensions/pi-agent-text-editor/src/core/text-editor-config.ts +3 -3
  223. package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +9 -1
  224. package/src/extensions/pi-agent-text-editor/src/tools/text-tool-schema-properties.ts +53 -0
  225. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-copy.ts +11 -41
  226. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-delete.ts +8 -18
  227. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-move.ts +11 -41
  228. package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +9 -19
  229. package/src/pi-agent-ide.ts +15 -2
  230. package/src/plugins/pi-agent-ide-ast/package.json +12 -11
  231. package/src/plugins/pi-agent-ide-ast/runtime/entry-27.js +0 -1
  232. package/src/plugins/pi-agent-ide-ast/runtime/entry-28.js +2 -0
  233. package/src/plugins/pi-agent-ide-ast/src/search-resolver.ts +8 -6
  234. package/src/plugins/pi-agent-ide-changes/package.json +8 -8
  235. package/src/plugins/pi-agent-ide-changes/runtime/entry-29.js +0 -1
  236. package/src/plugins/pi-agent-ide-debugger/index.ts +2 -8
  237. package/src/plugins/pi-agent-ide-debugger/src/adapter-executables.ts +31 -0
  238. package/src/plugins/pi-agent-ide-debugger/src/breakpoint-view.ts +3 -1
  239. package/src/plugins/pi-agent-ide-debugger/src/catalog.ts +24 -23
  240. package/src/plugins/pi-agent-ide-debugger/src/dap-client.ts +5 -2
  241. package/src/plugins/pi-agent-ide-debugger/src/doctor-plugin.ts +55 -17
  242. package/src/plugins/pi-agent-ide-debugger/src/session-manager.ts +55 -22
  243. package/src/plugins/pi-agent-ide-formatter/package.json +4 -4
  244. package/src/plugins/pi-agent-ide-languages/package.json +3 -3
  245. package/src/plugins/pi-agent-ide-lint/package.json +8 -8
  246. package/src/plugins/pi-agent-ide-lint/src/command-linter.ts +3 -1
  247. package/src/plugins/pi-agent-ide-lsp/package.json +10 -10
  248. package/src/plugins/pi-agent-ide-lsp/runtime/entry-34.js +2 -0
  249. package/src/plugins/pi-agent-ide-processes/src/registry.ts +4 -0
  250. package/src/plugins/pi-agent-ide-processes/src/ui.ts +18 -9
  251. package/src/plugins/pi-agent-ide-terminal/src/process-provider.ts +1 -0
  252. package/src/plugins/pi-agent-ide-terminal/src/session-manager.ts +1 -0
  253. package/src/plugins/pi-agent-ide-terminal/src/tools.ts +2 -2
  254. package/src/plugins/pi-agent-ide-terminal/src/types.ts +1 -0
  255. package/src/plugins/pi-agent-ide-vision/index.ts +232 -0
  256. package/src/plugins/pi-agent-ide-vision/src/vision.ts +530 -0
  257. package/src/plugins/pi-agent-ide-vision/src/windows-display-capture.ps1 +30 -0
  258. package/src/plugins/pi-agent-ide-vision/src/windows-window-capture.ps1 +33 -0
  259. package/dist/chunk-5PLV4HLG.js +0 -1
  260. package/dist/chunk-G725MARR.js +0 -16
  261. package/dist/chunk-HKXDP2FD.js +0 -7
  262. package/dist/chunk-IRECDTJG.js +0 -27
  263. package/dist/chunk-J4RTW44E.js +0 -1
  264. package/dist/chunk-NZYDMBM6.js +0 -1
  265. package/dist/chunk-WGGIQ7IJ.js +0 -1
  266. package/dist/entry-17.js +0 -1
  267. package/node_modules/pi-agent-doctor/runtime/entry-17.js +0 -1
  268. package/node_modules/pi-agent-filesystem/runtime/entry-22.js +0 -2
  269. package/node_modules/pi-agent-ide-ast/runtime/entry-26.js +0 -1
  270. package/node_modules/pi-agent-ide-changes/runtime/entry-28.js +0 -1
  271. package/node_modules/pi-agent-image/runtime/entry-34.js +0 -1
  272. package/node_modules/pi-agent-resource/runtime/entry-42.js +0 -1
  273. package/node_modules/pi-agent-text-anchor-constant/runtime/entry-50.js +0 -2
  274. package/node_modules/pi-agent-text-anchor-exact/runtime/entry-51.js +0 -1
  275. package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-53.js +0 -1
  276. package/node_modules/pi-agent-text-editor/runtime/entry-55.js +0 -1
  277. package/node_modules/pi-agent-tool-call-interception/runtime/entry-74.js +0 -1
  278. package/node_modules/pi-agent-web/runtime/entry-76.js +0 -2
  279. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-23.js +0 -2
  280. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-22.js +0 -2
  281. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-77.js +0 -2
  282. package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-76.js +0 -2
  283. package/src/extensions/pi-agent-read/runtime/entry-37.js +0 -1
  284. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-47.js +0 -2
  285. package/src/extensions/pi-agent-search/runtime/entry-43.js +0 -1
  286. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-50.js +0 -2
  287. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-51.js +0 -1
  288. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-53.js +0 -1
  289. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-72.js +0 -2
  290. package/src/extensions/pi-agent-text-editor/runtime/entry-55.js +0 -1
  291. package/src/plugins/pi-agent-ide-ast/runtime/entry-26.js +0 -1
  292. package/src/plugins/pi-agent-ide-changes/runtime/entry-28.js +0 -1
  293. /package/node_modules/{pi-agent-filesystem-image → pi-agent-filesystem}/runtime/entry-23.js +0 -0
  294. /package/node_modules/{pi-agent-filesystem-pdf → pi-agent-filesystem-image}/runtime/entry-24.js +0 -0
  295. /package/node_modules/{pi-agent-filesystem-text → pi-agent-filesystem-pdf}/runtime/entry-25.js +0 -0
  296. /package/node_modules/{pi-agent-ide-formatter → pi-agent-ide-changes}/runtime/entry-30.js +0 -0
  297. /package/node_modules/{pi-agent-ide-languages → pi-agent-ide-formatter}/runtime/entry-31.js +0 -0
  298. /package/node_modules/{pi-agent-ide-lint → pi-agent-ide-languages}/runtime/entry-32.js +0 -0
  299. /package/node_modules/{pi-agent-ide-lsp → pi-agent-ide-lint}/runtime/entry-33.js +0 -0
  300. /package/node_modules/{pi-agent-invariant → pi-agent-image}/runtime/entry-35.js +0 -0
  301. /package/node_modules/{pi-agent-pdf → pi-agent-invariant}/runtime/entry-36.js +0 -0
  302. /package/node_modules/{pi-agent-read → pi-agent-pdf}/runtime/entry-37.js +0 -0
  303. /package/node_modules/{pi-agent-search → pi-agent-resource}/runtime/entry-43.js +0 -0
  304. /package/node_modules/{pi-agent-search-text → pi-agent-search}/runtime/entry-47.js +0 -0
  305. /package/node_modules/{pi-agent-text → pi-agent-search-text}/runtime/entry-49.js +0 -0
  306. /package/node_modules/{pi-agent-text-editor-renderer → pi-agent-text-editor}/runtime/entry-72.js +0 -0
  307. /package/node_modules/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor-renderer}/runtime/entry-73.js +0 -0
  308. /package/node_modules/{pi-agent-tool-ui → pi-agent-tool-call-interception}/runtime/entry-75.js +0 -0
  309. /package/node_modules/{pi-agent-web-html → pi-agent-web}/runtime/entry-77.js +0 -0
  310. /package/node_modules/{pi-agent-web-image → pi-agent-web-html}/runtime/entry-78.js +0 -0
  311. /package/node_modules/{pi-agent-web-pdf → pi-agent-web-image}/runtime/entry-79.js +0 -0
  312. /package/node_modules/{pi-agent-web-text → pi-agent-web-pdf}/runtime/entry-80.js +0 -0
  313. /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-pdf → pi-agent-filesystem-image}/runtime/entry-24.js +0 -0
  314. /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-text → pi-agent-filesystem-pdf}/runtime/entry-25.js +0 -0
  315. /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-image → pi-agent-web-html}/runtime/entry-78.js +0 -0
  316. /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-pdf → pi-agent-web-image}/runtime/entry-79.js +0 -0
  317. /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-text → pi-agent-web-pdf}/runtime/entry-80.js +0 -0
  318. /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-stale-anchor → pi-agent-text-editor-renderer}/runtime/entry-73.js +0 -0
  319. /package/src/plugins/{pi-agent-ide-formatter → pi-agent-ide-changes}/runtime/entry-30.js +0 -0
  320. /package/src/plugins/{pi-agent-ide-languages → pi-agent-ide-formatter}/runtime/entry-31.js +0 -0
  321. /package/src/plugins/{pi-agent-ide-lint → pi-agent-ide-languages}/runtime/entry-32.js +0 -0
  322. /package/src/plugins/{pi-agent-ide-lsp → pi-agent-ide-lint}/runtime/entry-33.js +0 -0
@@ -1,5 +1,4 @@
1
1
  import {
2
- DynamicBorder,
3
2
  type ExtensionAPI,
4
3
  type ExtensionContext,
5
4
  type Theme,
@@ -148,19 +147,24 @@ export class AgentIdeProcessesUi {
148
147
  invalidate: () => list.invalidate(),
149
148
  render(width: number) {
150
149
  const container = new Container();
151
- container.addChild(new DynamicBorder((text) => theme.fg("accent", text)));
150
+
152
151
  if (page === "list") {
153
- container.addChild(
154
- new Text(theme.fg("accent", theme.bold("Agent IDE processes")), 1, 0),
155
- );
156
152
  container.addChild(list);
157
153
  container.addChild(
158
- new Text(theme.fg("dim", "enter view · d stop · esc close"), 1, 0),
154
+ new Text(
155
+ theme.fg(
156
+ "dim",
157
+ active.length === 0 ? "esc close" : "enter view · d stop · esc close",
158
+ ),
159
+ 1,
160
+ 0,
161
+ ),
159
162
  );
160
163
  } else if (selected === undefined) {
161
164
  container.addChild(
162
165
  new Text(theme.fg("warning", "Process is no longer active."), 1, 0),
163
166
  );
167
+ container.addChild(new Text(theme.fg("dim", "esc back"), 1, 0));
164
168
  } else {
165
169
  container.addChild(selected.renderDetail(theme));
166
170
  container.addChild(
@@ -180,8 +184,13 @@ export class AgentIdeProcessesUi {
180
184
  ),
181
185
  );
182
186
  }
183
- container.addChild(new DynamicBorder((text) => theme.fg("accent", text)));
184
- return container.render(width);
187
+ const accent = (text: string): string => theme.fg("accent", text);
188
+ const innerWidth = Math.max(1, width - 2);
189
+ return [
190
+ borderTop("Agent IDE Processes", `${active.length} active`, width, accent),
191
+ ...container.render(innerWidth).map((line) => borderLine(line, width, accent)),
192
+ borderBottom(width, accent),
193
+ ];
185
194
  },
186
195
  handleInput(data: string) {
187
196
  if (page === "list") {
@@ -193,7 +202,7 @@ export class AgentIdeProcessesUi {
193
202
  } else list.handleInput(data);
194
203
  } else if (page === "detail") {
195
204
  if (matchesKey(data, Key.escape)) page = "list";
196
- else if (data === "d") page = "confirm";
205
+ else if (data === "d" && selected !== undefined) page = "confirm";
197
206
  else if (data === "i" && selected?.sendInput !== undefined) page = "input";
198
207
  } else if (page === "input") {
199
208
  if (matchesKey(data, Key.escape)) page = "detail";
@@ -21,6 +21,7 @@ export function terminalProcessProvider(manager: TerminalSessionManager): AgentI
21
21
  title: snapshot.shell.toLocaleLowerCase(),
22
22
  description: snapshot.command,
23
23
  status: snapshot.status === "stopping" ? ("stopping" as const) : ("running" as const),
24
+ ...(snapshot.pid === undefined ? {} : { pid: snapshot.pid, owned: true }),
24
25
  renderSummary: (theme) => renderActiveTerminal(snapshot, theme).split("\n"),
25
26
  renderDetail: (theme) => renderTerminalResult(snapshot, true, theme),
26
27
  sendInput: (data) => manager.write(snapshot.source, data),
@@ -65,6 +65,7 @@ export class TerminalSessionManager {
65
65
  cwd: session.cwd,
66
66
  shell: session.shell.displayName,
67
67
  shellFamily: session.shell.family,
68
+ ...(session.process === undefined ? {} : { pid: session.process.pid }),
68
69
  background: session.background,
69
70
  status: session.status,
70
71
  ...(session.waitReason === undefined ? {} : { waitReason: session.waitReason }),
@@ -65,9 +65,9 @@ export function registerTerminalTools(
65
65
  promptSnippet: `Execute ${profile.displayName} commands in synchronous or background terminal sessions`,
66
66
  promptGuidelines: [
67
67
  `Write commands for ${profile.displayName}; commands are not translated between shell languages.`,
68
- `Use ${toolName} with background for servers, watchers, and long builds. Foreground waits become background after timeoutSeconds (60 by default), on a stable interactive prompt, or when the turn is aborted. After a session enters background, do not poll it continuously; continue other work or wait for its automatic completion notification. Keep a short task in foreground wait when it should finish soon and no independent work remains. A background session with no output for two minutes wakes an idle agent so it can be inspected. Sessions survive extension reloads and keep the same shell: source. Large output returns a bounded tail and a fullOutput file path. Use the returned shell: source with read, write, insert, and delete.`,
68
+ `Use ${toolName} with background for servers, watchers, and long builds. After a session enters background, do not poll it continuously; continue other work or wait for completion. Keep short tasks in the foreground. Enable periodic or verbose output for long-running commands. Use the returned shell: source with read, write, insert, and delete.`,
69
69
  ],
70
- description: `Use ${toolName} to execute a command in the user's configured ${profile.displayName} shell (${profile.executable}). Every call creates an addressable terminal session. Set background to true to continue without waiting. A foreground wait automatically returns the live session as background on timeout, a stable interactive prompt, or turn abort. Background completion is delivered automatically and wakes the agent, so background sessions do not need continuous polling. Keep short tasks in foreground wait when they should finish soon and no independent work remains. Sessions survive extension reloads and keep the same shell: source. Output uses the shared Read limits, keeps the tail, and links a complete log file when truncated. ${shellSyntaxGuidance(profile)}`,
70
+ description: `Use ${toolName} to execute a command in the user's configured ${profile.displayName} shell (${profile.executable}). Every call creates an addressable terminal session. Set background to true to continue without waiting. A foreground wait automatically returns the live session as background on timeout, a stable interactive prompt, or turn abort. Background completion is delivered automatically and wakes the agent. Silent background sessions are treated as potentially stale after two minutes and wake an idle agent for inspection. Sessions survive extension reloads and keep the same shell: source. Output uses the shared Read limits, keeps the tail, and links a complete log file when truncated. ${shellSyntaxGuidance(profile)}`,
71
71
  parameters: runParameters,
72
72
  async execute(_toolCallId, input, signal, onUpdate, context) {
73
73
  ui.bind(context);
@@ -57,6 +57,7 @@ export interface TerminalSessionSnapshot {
57
57
  readonly cwd: string;
58
58
  readonly shell: string;
59
59
  readonly shellFamily: ShellProfile["family"];
60
+ readonly pid?: number;
60
61
  readonly background: boolean;
61
62
  readonly status: TerminalSessionStatus;
62
63
  readonly waitReason?: TerminalWaitReason;
@@ -0,0 +1,232 @@
1
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
+
3
+ import type { BuiltinExtensionContext } from "#src/composite/selection.js";
4
+ import { connectReadPlugin } from "pi-agent-read/api/connect-plugin";
5
+ import { READ_API_VERSION, READ_PROTOCOL } from "pi-agent-read/api/plugin-protocol";
6
+ import type { ReadRequest, ReadToolResult } from "pi-agent-read/api/tools/read";
7
+ import { connectSearchPlugin } from "pi-agent-search/api/connect-plugin";
8
+ import { SEARCH_API_VERSION, SEARCH_PROTOCOL } from "pi-agent-search/api/plugin-protocol";
9
+
10
+ import { agentIdeProcessRegistry } from "#src/plugins/pi-agent-ide-processes/src/registry.js";
11
+ import {
12
+ captureImages,
13
+ configureVision,
14
+ createCaptureBackend,
15
+ getVisionDefaults,
16
+ isExecutableAllowed,
17
+ listProcesses,
18
+ parseDisplaySource,
19
+ parseVisionView,
20
+ readProcess,
21
+ type VisionOptions,
22
+ } from "#src/plugins/pi-agent-ide-vision/src/vision.js";
23
+
24
+ /** Register process discovery and guarded visual capture resources. */
25
+ export default async function registerVision(
26
+ pi: ExtensionAPI,
27
+ context?: BuiltinExtensionContext,
28
+ ): Promise<void> {
29
+ const preferences = context?.preferences ?? {};
30
+ configureVision({
31
+ durationSeconds: preferences["vision.sequenceDurationSeconds"],
32
+ intervalSeconds: preferences["vision.sequenceIntervalSeconds"],
33
+ scale: preferences["vision.imageScale"],
34
+ allowedExecutables: preferences["vision.allowedExecutables"],
35
+ });
36
+ const registry = agentIdeProcessRegistry(pi);
37
+ const backend = createCaptureBackend();
38
+ await Promise.all([
39
+ connectReadPlugin(pi, {
40
+ protocol: READ_PROTOCOL,
41
+ apiVersion: READ_API_VERSION,
42
+ id: "vision",
43
+ setup(api) {
44
+ for (const view of ["image", "sequence"]) {
45
+ api.addView({
46
+ view,
47
+ presenter: { id: `vision-${view}`, present: (document) => document },
48
+ });
49
+ }
50
+ api.addHandler({
51
+ stage: "pre-read",
52
+ async handler(context) {
53
+ const source = context.request.path;
54
+ if (source === undefined) return { kind: "continue", context };
55
+ const displayIndex = parseDisplaySource(source);
56
+ if (displayIndex !== undefined) {
57
+ if (pi.getFlag("pi-agent-ide-vision-displays") !== true) {
58
+ return failed(
59
+ source,
60
+ "Display capture is disabled. Enable --pi-agent-ide-vision-displays to allow it.",
61
+ );
62
+ }
63
+ try {
64
+ const content = await captureImages(
65
+ () => backend.captureDisplay(displayIndex, context.resolverContext.signal),
66
+ options(context.request),
67
+ context.resolverContext.signal,
68
+ );
69
+ return returned(source, content);
70
+ } catch (error) {
71
+ return failed(source, errorMessage(error));
72
+ }
73
+ }
74
+ const processPid = prefixedPid(source, "process:");
75
+ if (processPid !== undefined) {
76
+ const metadata = await readProcess(processPid, registry);
77
+ return returned(source, [{ type: "text", text: formatProcess(metadata) }]);
78
+ }
79
+ const windowPid = prefixedPid(source, "window:");
80
+ if (windowPid !== undefined) {
81
+ const metadata = await readProcess(windowPid, registry);
82
+ if (
83
+ !metadata.owned &&
84
+ !isExecutableAllowed(metadata.command) &&
85
+ pi.getFlag("pi-agent-ide-vision-arbitrary-windows") !== true
86
+ ) {
87
+ return failed(
88
+ source,
89
+ `Window capture for PID ${windowPid} is denied because the process is neither Agent IDE-owned nor allowlisted by executable name. Enable --pi-agent-ide-vision-arbitrary-windows to allow it.`,
90
+ );
91
+ }
92
+
93
+ try {
94
+ const content = await captureImages(
95
+ () => backend.captureWindow(windowPid, context.resolverContext.signal),
96
+ options(context.request),
97
+ context.resolverContext.signal,
98
+ );
99
+ return returned(source, content);
100
+ } catch (error) {
101
+ return failed(source, errorMessage(error));
102
+ }
103
+ }
104
+ if (/^https?:\/\//iu.test(source) && requestsScreenshot(context.request)) {
105
+ const url = new URL(source);
106
+ try {
107
+ const content = await captureImages(
108
+ () => backend.captureUrl(url, context.resolverContext.signal),
109
+ options(context.request),
110
+ context.resolverContext.signal,
111
+ );
112
+ return returned(url.href, content);
113
+ } catch (error) {
114
+ return failed(url.href, errorMessage(error));
115
+ }
116
+ }
117
+ return { kind: "continue", context };
118
+ },
119
+ });
120
+ const defaults = getVisionDefaults();
121
+ api.describe(
122
+ `Process metadata: process:PID. Visual capture: window:PID and display: or display:#N. HTTP(S) sources accept image and sequence screenshots. Use named view parameters such as sequence:duration=2,interval=0.5,scale=0.5 and image:scale=0.5,region=0.25,0.25,0.5,0.5. Duration is limited to 10 seconds and sequences to 20 frames. Defaults: duration=${defaults.durationSeconds}, interval=${defaults.intervalSeconds}, scale=${defaults.scale}. Region uses normalized x,y,width,height and runs before scaling. For captures, limit is a square grid cell size in output pixels and offset is one zero-based row-major cell index; limit without offset selects cell 0, while offset without limit is invalid. Omit both for the bounded transformed image.`,
123
+ );
124
+ api.addPromptGuideline(
125
+ "Use search with process:<query> before reading process:PID or window:PID. Capture arbitrary desktop windows and full displays only when their dedicated flags are enabled; Agent IDE-owned terminal processes are allowed by default. Use a bounded sequence view only when one image is insufficient; set named duration, interval, scale and region parameters when the defaults do not fit. Use limit and offset to select one image grid cell.",
126
+ );
127
+ },
128
+ }),
129
+ connectSearchPlugin(pi, {
130
+ protocol: SEARCH_PROTOCOL,
131
+ apiVersion: SEARCH_API_VERSION,
132
+ id: "vision-processes",
133
+ setup(api) {
134
+ api.addResolver({
135
+ priority: -100,
136
+ resolver: {
137
+ id: "processes",
138
+ async tryResolve(request) {
139
+ const match = /^process:(.*)$/isu.exec(request.query);
140
+ if (match === null) return { kind: "not-handled" as const };
141
+ const query = (match[1] ?? "").trim().toLowerCase();
142
+ const matches = (await listProcesses(registry))
143
+ .filter(
144
+ (item) =>
145
+ query.length === 0 ||
146
+ String(item.pid) === query ||
147
+ item.command.toLowerCase().includes(query),
148
+ )
149
+ .slice(0, Math.min(request.limit ?? 50, 100));
150
+ return { kind: "resolved" as const, payload: matches };
151
+ },
152
+ format(payload) {
153
+ const processes = payload as Awaited<ReturnType<typeof listProcesses>>;
154
+ return {
155
+ content: [
156
+ {
157
+ type: "text" as const,
158
+ text:
159
+ processes.length === 0
160
+ ? "No matching processes."
161
+ : processes.map(formatProcess).join("\n\n"),
162
+ },
163
+ ],
164
+ details: { count: processes.length, processes },
165
+ };
166
+ },
167
+ },
168
+ });
169
+ api.describe(
170
+ "process:<query> finds running processes by PID or command for process:PID metadata reads and guarded window:PID capture.",
171
+ );
172
+ api.addPromptGuideline(
173
+ "Use process:<query> to discover a PID before selecting a process or window source.",
174
+ );
175
+ },
176
+ }),
177
+ ]);
178
+ }
179
+
180
+ function prefixedPid(source: string, prefix: string): number | undefined {
181
+ if (!source.startsWith(prefix)) return undefined;
182
+ const value = source.slice(prefix.length);
183
+ if (!/^\d+$/u.test(value)) throw new Error(`${prefix} sources require a numeric PID`);
184
+ return Number(value);
185
+ }
186
+ function options(request: ReadRequest): VisionOptions {
187
+ const selected = parseVisionView(request.views, getVisionDefaults()) ?? {
188
+ mode: "image" as const,
189
+ ...getVisionDefaults(),
190
+ };
191
+ return {
192
+ ...selected,
193
+ ...(request.limit === undefined ? {} : { cellSize: request.limit }),
194
+ ...(request.offset === undefined ? {} : { cellIndex: request.offset }),
195
+ };
196
+ }
197
+ function requestsScreenshot(request: ReadRequest): boolean {
198
+ return request.views?.some((view) => /^(?:image|sequence)(?::|$)/u.test(view)) === true;
199
+ }
200
+ function returned(source: string, content: ReadToolResult["content"]) {
201
+ return {
202
+ kind: "return" as const,
203
+ result: { content, details: { source, resolvedBy: "vision" } },
204
+ };
205
+ }
206
+ function failed(source: string, message: string) {
207
+ return {
208
+ kind: "return" as const,
209
+ result: {
210
+ content: [{ type: "text" as const, text: message }],
211
+ details: {
212
+ source,
213
+ resolvedBy: "vision",
214
+ failure: { code: "READ_FAILED" as const, source, resolverId: "vision", message },
215
+ },
216
+ isError: true,
217
+ },
218
+ };
219
+ }
220
+ function errorMessage(error: unknown): string {
221
+ return error instanceof Error ? error.message : String(error);
222
+ }
223
+ function formatProcess(item: Awaited<ReturnType<typeof readProcess>>): string {
224
+ return [
225
+ `PID: ${item.pid}`,
226
+ `Command: ${item.command}`,
227
+ `Owned by Agent IDE: ${item.owned ? "yes" : "no"}`,
228
+ ...(item.parentPid === undefined ? [] : [`Parent PID: ${item.parentPid}`]),
229
+ ...(item.started === undefined ? [] : [`Started: ${item.started}`]),
230
+ ...(item.source === undefined ? [] : [`Agent IDE source: ${item.source}`]),
231
+ ].join("\n");
232
+ }